|
@@ -60,6 +60,9 @@ public class KwsAlarmService {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
KwsDeviceMapper deviceMapper;
|
|
KwsDeviceMapper deviceMapper;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ KwsIntegrationMapper integrationMapper;
|
|
|
|
|
+
|
|
|
@Autowired
|
|
@Autowired
|
|
|
KwsDeviceReferenceMapper deviceReferenceMapper;
|
|
KwsDeviceReferenceMapper deviceReferenceMapper;
|
|
|
|
|
|
|
@@ -445,7 +448,24 @@ public class KwsAlarmService {
|
|
|
(thresholdLevel == null ? String.valueOf(kwsAlarm.getLevel()) : thresholdLevel.get(String.valueOf(kwsAlarm.getLevel())).getLabel()));
|
|
(thresholdLevel == null ? String.valueOf(kwsAlarm.getLevel()) : thresholdLevel.get(String.valueOf(kwsAlarm.getLevel())).getLabel()));
|
|
|
vo.setType(kwsThreshold == null ? null : (kwsThreshold.getItemName() == null ? null :
|
|
vo.setType(kwsThreshold == null ? null : (kwsThreshold.getItemName() == null ? null :
|
|
|
(dictByDictCode == null ? kwsThreshold.getItemName() : (dictByDictCode.get(kwsThreshold.getItemName()) == null ? kwsThreshold.getItemName() : dictByDictCode.get(kwsThreshold.getItemName()).getLabel()))));
|
|
(dictByDictCode == null ? kwsThreshold.getItemName() : (dictByDictCode.get(kwsThreshold.getItemName()) == null ? kwsThreshold.getItemName() : dictByDictCode.get(kwsThreshold.getItemName()).getLabel()))));
|
|
|
- vo.setValue(detail.getVal());
|
|
|
|
|
|
|
+// List<String> list1=new ArrayList<>();
|
|
|
|
|
+// list1.add(DictItemEnum.LONGITUDE_X.getValue());
|
|
|
|
|
+// list1.add(DictItemEnum.LATITUDE_Y.getValue());
|
|
|
|
|
+// list1.add(DictItemEnum.ALTITUDE_Z.getValue());
|
|
|
|
|
+ if (dictByDictCode.get(kwsThreshold.getItemName()) == null) {
|
|
|
|
|
+ String itemName = kwsThreshold.getItemName();
|
|
|
|
|
+ KwsIntegration kwsIntegration = integrationMapper.selectOne(new LambdaQueryWrapper<KwsIntegration>()
|
|
|
|
|
+ .eq(KwsIntegration::getIntegrationName, itemName));
|
|
|
|
|
+ String unit = "";
|
|
|
|
|
+ if (kwsIntegration != null) {
|
|
|
|
|
+ Map<String, SystemDict> dictCode = commonService.getDictByDictCode(DictEnum.INTEGRATION_UNIT);
|
|
|
|
|
+ unit = dictCode.get(kwsIntegration.getUnit()).getDescription();
|
|
|
|
|
+ }
|
|
|
|
|
+ vo.setValue(detail.getVal() + unit);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ vo.setValue(detail.getVal());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
vo.setItemName(kwsThreshold == null ? null : kwsThreshold.getItemName());
|
|
vo.setItemName(kwsThreshold == null ? null : kwsThreshold.getItemName());
|
|
|
vo.setPhone(kwsThreshold == null ? null : kwsThreshold.getPhones());
|
|
vo.setPhone(kwsThreshold == null ? null : kwsThreshold.getPhones());
|
|
|
KwsDevice kwsDevice = deviceMapper.selectById(kwsThreshold == null ? null : kwsThreshold.getDeviceId());
|
|
KwsDevice kwsDevice = deviceMapper.selectById(kwsThreshold == null ? null : kwsThreshold.getDeviceId());
|