From 4dc3a2da7f43f17c0793e7915902797e78375d00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=B0=8F=E6=9E=97?= <320730042@qq.com> Date: Fri, 20 Sep 2024 10:25:08 +0800 Subject: [PATCH] =?UTF-8?q?fit:=20bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/bellmann/manger/impl/DeviceTypeManagerImpl.java | 8 ++++++-- .../java/com/bellmann/service/impl/FaultServiceImpl.java | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/bellmann/manger/impl/DeviceTypeManagerImpl.java b/src/main/java/com/bellmann/manger/impl/DeviceTypeManagerImpl.java index 01d7e3c..050b375 100644 --- a/src/main/java/com/bellmann/manger/impl/DeviceTypeManagerImpl.java +++ b/src/main/java/com/bellmann/manger/impl/DeviceTypeManagerImpl.java @@ -32,8 +32,12 @@ public class DeviceTypeManagerImpl implements DeviceTypeManager { public EquipmentTypeVO findEquipmentType(Long typeAndVerId) { EquipmentTypeVO equipmentType = deviceTypeMapper.findEquipmentType(typeAndVerId); equipmentType.setOldCASeparation(IBaseEnum.getLabelByValue(equipmentType.getOldCASeparation(), OldCASeparationEnum.class)); - equipmentType.setDevAccessType(IBaseEnum.getLabelByValue(equipmentType.getDevAccessType(), DevAccessTypeEnum.class)); - equipmentType.setEquipmentTypeVer(IBaseEnum.getLabelByValue(equipmentType.getEquipmentTypeVer(), EquipmentTypeEnum.class)); + if (equipmentType.getDevAccessType()!=null) { + equipmentType.setDevAccessType(IBaseEnum.getLabelByValue(equipmentType.getDevAccessType(), DevAccessTypeEnum.class)); + } + if (equipmentType.getEquipmentTypeVer()!=null) { + equipmentType.setEquipmentTypeVer(IBaseEnum.getLabelByValue(equipmentType.getEquipmentTypeVer(), EquipmentTypeEnum.class)); + } return equipmentType; } } diff --git a/src/main/java/com/bellmann/service/impl/FaultServiceImpl.java b/src/main/java/com/bellmann/service/impl/FaultServiceImpl.java index 155f722..0116479 100644 --- a/src/main/java/com/bellmann/service/impl/FaultServiceImpl.java +++ b/src/main/java/com/bellmann/service/impl/FaultServiceImpl.java @@ -73,7 +73,7 @@ public class FaultServiceImpl implements FaultService { DeviceTypeVerDetail deviceTypeVerDetail = deviceTypeVerDetailMapper.selectOne(new LambdaQueryWrapper() .eq(DeviceTypeVerDetail::getTypeAndVerId, typeAndVerId) ); - if (deviceTypeVerDetail != null) { + if (deviceTypeVerDetail != null&&deviceTypeVerDetail.getDevAccessType()!=null) { faultBasicInfoQuery.setDevAccessType(IBaseEnum.getLabelByValue(deviceTypeVerDetail.getDevAccessType(), DevAccessTypeEnum.class)); } }