From d4cbebaaf4edefb7e56787310e938d8d55c7fe5b Mon Sep 17 00:00:00 2001 From: weitang Date: Thu, 15 May 2025 18:34:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=85=E9=9A=9C=E8=AF=8A=E6=96=AD=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E6=96=B0=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/AlgorithmDeviceController.java | 14 ++++++------- .../mapper/AlgorithmDeviceMapper.java | 4 ++++ .../service/IAlgorithmDeviceService.java | 2 ++ .../impl/AlgorithmDeviceServiceImpl.java | 14 +++++++++---- .../algorithm/AlgorithmDeviceMapper.xml | 20 ++++++++++++++++++- 5 files changed, 42 insertions(+), 12 deletions(-) diff --git a/riis-system/src/main/java/com/yfd/platform/modules/algorithm/controller/AlgorithmDeviceController.java b/riis-system/src/main/java/com/yfd/platform/modules/algorithm/controller/AlgorithmDeviceController.java index 4fe583e..049de98 100644 --- a/riis-system/src/main/java/com/yfd/platform/modules/algorithm/controller/AlgorithmDeviceController.java +++ b/riis-system/src/main/java/com/yfd/platform/modules/algorithm/controller/AlgorithmDeviceController.java @@ -51,11 +51,11 @@ public class AlgorithmDeviceController { return ResponseResult.successData(algorithmDeviceParams); } -// @PostMapping("/getAlgorithmDeviceParams") -// @ApiOperation("查询算法部件的参数") -// public ResponseResult getAlgorithmDeviceParams(String algorithmId, String componentId) { -// List> algorithmDeviceParams = algorithmDeviceService.getAlgorithmDeviceParams(algorithmId -// , componentId); -// return ResponseResult.successData(algorithmDeviceParams); -// } + @PostMapping("/getAlgorithmDeviceCurve") + @ApiOperation("查询算法部件的参数曲线") + public ResponseResult getAlgorithmDeviceCurve(String algorithmId, String componentId) { + Map algorithmDeviceCurve = algorithmDeviceService.getAlgorithmDeviceCurve(algorithmId, + componentId); + return ResponseResult.successData(algorithmDeviceCurve); + } } diff --git a/riis-system/src/main/java/com/yfd/platform/modules/algorithm/mapper/AlgorithmDeviceMapper.java b/riis-system/src/main/java/com/yfd/platform/modules/algorithm/mapper/AlgorithmDeviceMapper.java index db1976d..ab089eb 100644 --- a/riis-system/src/main/java/com/yfd/platform/modules/algorithm/mapper/AlgorithmDeviceMapper.java +++ b/riis-system/src/main/java/com/yfd/platform/modules/algorithm/mapper/AlgorithmDeviceMapper.java @@ -3,6 +3,9 @@ package com.yfd.platform.modules.algorithm.mapper; import com.yfd.platform.modules.algorithm.domain.AlgorithmDevice; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import java.util.List; +import java.util.Map; + /** *

* Mapper 接口 @@ -13,4 +16,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; */ public interface AlgorithmDeviceMapper extends BaseMapper { + List> getAlgorithmDeviceParams(String algorithmId, String componentId); } diff --git a/riis-system/src/main/java/com/yfd/platform/modules/algorithm/service/IAlgorithmDeviceService.java b/riis-system/src/main/java/com/yfd/platform/modules/algorithm/service/IAlgorithmDeviceService.java index 55ef38b..1840544 100644 --- a/riis-system/src/main/java/com/yfd/platform/modules/algorithm/service/IAlgorithmDeviceService.java +++ b/riis-system/src/main/java/com/yfd/platform/modules/algorithm/service/IAlgorithmDeviceService.java @@ -25,4 +25,6 @@ public interface IAlgorithmDeviceService extends IService { List> getAlgorithmDeviceParams(String algorithmId, String componentId); + Map getAlgorithmDeviceCurve(String algorithmId, String componentId); + } diff --git a/riis-system/src/main/java/com/yfd/platform/modules/algorithm/service/impl/AlgorithmDeviceServiceImpl.java b/riis-system/src/main/java/com/yfd/platform/modules/algorithm/service/impl/AlgorithmDeviceServiceImpl.java index 71ade96..461112f 100644 --- a/riis-system/src/main/java/com/yfd/platform/modules/algorithm/service/impl/AlgorithmDeviceServiceImpl.java +++ b/riis-system/src/main/java/com/yfd/platform/modules/algorithm/service/impl/AlgorithmDeviceServiceImpl.java @@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.yfd.platform.utils.SecurityUtils; import org.springframework.stereotype.Service; +import javax.annotation.Resource; import java.time.LocalDateTime; import java.util.List; import java.util.Map; @@ -24,6 +25,9 @@ import java.util.Map; @Service public class AlgorithmDeviceServiceImpl extends ServiceImpl implements IAlgorithmDeviceService { + @Resource + private AlgorithmDeviceMapper algorithmDeviceMapper; + /********************************** * 用途说明: 批量新增算法分类部件点位关联数据 * 参数说明 algorithmDeviceList @@ -41,9 +45,11 @@ public class AlgorithmDeviceServiceImpl extends ServiceImpl> getAlgorithmDeviceParams(String algorithmId, String componentId) { - LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); - queryWrapper.eq(StrUtil.isNotBlank(algorithmId), AlgorithmDevice::getAlgorithmId, algorithmId); - queryWrapper.eq(StrUtil.isNotBlank(componentId), AlgorithmDevice::getComponentId, componentId).select(AlgorithmDevice::getDeviceName, AlgorithmDevice::getDeviceId, AlgorithmDevice::getParamValue); - return this.listMaps(queryWrapper); + return algorithmDeviceMapper.getAlgorithmDeviceParams(algorithmId,componentId); + } + + @Override + public Map getAlgorithmDeviceCurve(String algorithmId, String componentId) { + return null; } } diff --git a/riis-system/src/main/resources/mapper/algorithm/AlgorithmDeviceMapper.xml b/riis-system/src/main/resources/mapper/algorithm/AlgorithmDeviceMapper.xml index a11f22c..940a1bf 100644 --- a/riis-system/src/main/resources/mapper/algorithm/AlgorithmDeviceMapper.xml +++ b/riis-system/src/main/resources/mapper/algorithm/AlgorithmDeviceMapper.xml @@ -1,5 +1,23 @@ - + +