From 34f317780e246ced256a274cf72d17c0920afb33 Mon Sep 17 00:00:00 2001 From: caozehui <2427765068@qq.com> Date: Thu, 29 May 2025 10:50:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../handler/SocketDevResponseService.java | 46 ------------------- .../device/service/impl/PqDevServiceImpl.java | 5 +- .../user/service/impl/SysRoleServiceImpl.java | 2 +- 3 files changed, 5 insertions(+), 48 deletions(-) diff --git a/detection/src/main/java/com/njcn/gather/detection/handler/SocketDevResponseService.java b/detection/src/main/java/com/njcn/gather/detection/handler/SocketDevResponseService.java index adad9d72..3ef43690 100644 --- a/detection/src/main/java/com/njcn/gather/detection/handler/SocketDevResponseService.java +++ b/detection/src/main/java/com/njcn/gather/detection/handler/SocketDevResponseService.java @@ -10,7 +10,6 @@ import com.njcn.gather.detection.pojo.dto.DevXiNumData; import com.njcn.gather.detection.pojo.enums.DetectionCodeEnum; import com.njcn.gather.detection.pojo.enums.SourceOperateCodeEnum; import com.njcn.gather.detection.pojo.enums.SourceResponseCodeEnum; -import com.njcn.gather.detection.pojo.param.DevPhaseSequenceParam; import com.njcn.gather.detection.pojo.param.PreDetectionParam; import com.njcn.gather.detection.pojo.po.DevData; import com.njcn.gather.detection.pojo.po.IcdCheckData; @@ -74,8 +73,6 @@ public class SocketDevResponseService { // ISO 8601格式 private final DateTimeFormatter formatter = DateTimeFormatter.ISO_DATE_TIME; - private DevPhaseSequenceParam devPhaseSequenceParam; - private List dataTypeList; private List icdTypeList; @@ -1914,47 +1911,4 @@ public class SocketDevResponseService { } } - /** - * 脚本与设备校验 - * - * @param param - * @param socketDataMsg - */ - public void scriptToDeviceCheck(PreDetectionParam param, SocketDataMsg socketDataMsg) { - String data = socketDataMsg.getData(); - DevData devData = JSON.parseObject(data, DevData.class); - SourceResponseCodeEnum dictDataEnumByCode = SourceResponseCodeEnum.getDictDataEnumByCode(socketDataMsg.getCode()); - //SourceIssue sourceIssue = SocketManager.getSourceList().get(0); - - switch (Objects.requireNonNull(dictDataEnumByCode)) { - case SUCCESS: - List dataTypeList = new ArrayList<>(); - devData.getSqlData().forEach(obj -> { - dataTypeList.add(obj.getDesc()); - }); - devData.getSqlDataHarm().forEach(obj -> { - dataTypeList.add(obj.getDesc()); - }); - List dataTypeCopy = new ArrayList<>(devPhaseSequenceParam.getDataType()); - dataTypeCopy.removeAll(dataTypeList); - - - break; - case UNPROCESSED_BUSINESS: - break; - case NORMAL_RESPONSE: - break; - case DEV_ERROR: - break; - case DEV_TARGET: - break; - case RE_OPERATE: - break; - case MESSAGE_PARSING_ERROR: - break; - default: - CnSocketUtil.sendUnSocket(param.getUserPageId()); - break; - } - } } diff --git a/detection/src/main/java/com/njcn/gather/device/service/impl/PqDevServiceImpl.java b/detection/src/main/java/com/njcn/gather/device/service/impl/PqDevServiceImpl.java index cf1827dc..de40fc6a 100644 --- a/detection/src/main/java/com/njcn/gather/device/service/impl/PqDevServiceImpl.java +++ b/detection/src/main/java/com/njcn/gather/device/service/impl/PqDevServiceImpl.java @@ -1092,7 +1092,10 @@ public class PqDevServiceImpl extends ServiceImpl implements public void visualizeProvinceDev(List pqDevs) { pqDevs.forEach(pqDev -> { pqDev.setDevType(devTypeService.getById(pqDev.getDevType()).getName()); - pqDev.setManufacturer(dictDataService.getDictDataById(pqDev.getManufacturer()).getName()); + if(StrUtil.isNotBlank(pqDev.getManufacturer())){ + pqDev.setManufacturer(dictDataService.getDictDataById(pqDev.getManufacturer()).getName()); + } + pqDev.setProtocol(dictDataService.getDictDataById(pqDev.getProtocol()).getName()); if (StrUtil.isNotBlank(pqDev.getDelegate())) { pqDev.setDelegate(dictDataService.getDictDataById(pqDev.getDelegate()).getName()); diff --git a/user/src/main/java/com/njcn/gather/user/user/service/impl/SysRoleServiceImpl.java b/user/src/main/java/com/njcn/gather/user/user/service/impl/SysRoleServiceImpl.java index 607fbab7..caf75002 100644 --- a/user/src/main/java/com/njcn/gather/user/user/service/impl/SysRoleServiceImpl.java +++ b/user/src/main/java/com/njcn/gather/user/user/service/impl/SysRoleServiceImpl.java @@ -101,7 +101,7 @@ public class SysRoleServiceImpl extends ServiceImpl impl @Override public List simpleList() { LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); - lambdaQueryWrapper.select(SysRole::getId, SysRole::getName).ne(SysRole::getType, RoleConst.TYPE_SUPER_ADMINISTRATOR).eq(SysRole::getState, DataStateEnum.ENABLE.getCode()); + lambdaQueryWrapper.select(SysRole::getId, SysRole::getName).eq(SysRole::getState, DataStateEnum.ENABLE.getCode()); return this.baseMapper.selectList(lambdaQueryWrapper); }