|
@@ -337,7 +337,7 @@ public class KwsAlarmService {
|
|
|
if (!CollectionUtils.isEmpty(idsList) && idsList.size() > 0) {
|
|
if (!CollectionUtils.isEmpty(idsList) && idsList.size() > 0) {
|
|
|
wrapper.in(KwsAlarm::getId, idsList);
|
|
wrapper.in(KwsAlarm::getId, idsList);
|
|
|
}
|
|
}
|
|
|
- List<KwsAlarm> list = alarmMapper.selectExportListByQuery(query, headerData.getMountainId(),idsList);
|
|
|
|
|
|
|
+ List<KwsAlarm> list = alarmMapper.selectExportListByQuery(query, headerData.getMountainId(), idsList);
|
|
|
// List<KwsAlarm> list = alarmMapper.selectList(wrapper);
|
|
// List<KwsAlarm> list = alarmMapper.selectList(wrapper);
|
|
|
List<KwsAlarmExportVO> alarmVOS = new ArrayList<>();
|
|
List<KwsAlarmExportVO> alarmVOS = new ArrayList<>();
|
|
|
if (CollectionUtils.isEmpty(list)) {
|
|
if (CollectionUtils.isEmpty(list)) {
|
|
@@ -435,16 +435,19 @@ public class KwsAlarmService {
|
|
|
for (KwsAlarmDetail detail : detailList) {
|
|
for (KwsAlarmDetail detail : detailList) {
|
|
|
Long pid = detail.getPid();
|
|
Long pid = detail.getPid();
|
|
|
KwsThreshold kwsThreshold = thresholdMapper.selectById(pid);
|
|
KwsThreshold kwsThreshold = thresholdMapper.selectById(pid);
|
|
|
|
|
+ if (kwsThreshold == null) {
|
|
|
|
|
+ kwsThreshold = thresholdMapper.selectByPrimaryKey(pid);
|
|
|
|
|
+ }
|
|
|
ThresholdRecordDetailVO vo = new ThresholdRecordDetailVO();
|
|
ThresholdRecordDetailVO vo = new ThresholdRecordDetailVO();
|
|
|
vo.setId(detail.getId());
|
|
vo.setId(detail.getId());
|
|
|
vo.setAlarmLevel(kwsAlarm.getLevel() == null ? null :
|
|
vo.setAlarmLevel(kwsAlarm.getLevel() == null ? null :
|
|
|
(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.getItemName() == null ? null :
|
|
|
|
|
- (dictByDictCode == null ? kwsThreshold.getItemName() : dictByDictCode.get(kwsThreshold.getItemName()).getLabel()));
|
|
|
|
|
|
|
+ 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()))));
|
|
|
vo.setValue(detail.getVal());
|
|
vo.setValue(detail.getVal());
|
|
|
- vo.setItemName(kwsThreshold.getItemName());
|
|
|
|
|
- vo.setPhone(kwsThreshold.getPhones());
|
|
|
|
|
- KwsDevice kwsDevice = deviceMapper.selectById(kwsThreshold.getDeviceId());
|
|
|
|
|
|
|
+ vo.setItemName(kwsThreshold == null ? null : kwsThreshold.getItemName());
|
|
|
|
|
+ vo.setPhone(kwsThreshold == null ? null : kwsThreshold.getPhones());
|
|
|
|
|
+ KwsDevice kwsDevice = deviceMapper.selectById(kwsThreshold == null ? null : kwsThreshold.getDeviceId());
|
|
|
StringBuilder location = new StringBuilder();
|
|
StringBuilder location = new StringBuilder();
|
|
|
if (StringUtils.isNotBlank(kwsDevice.getLogicLng())) {
|
|
if (StringUtils.isNotBlank(kwsDevice.getLogicLng())) {
|
|
|
location.append(kwsDevice.getLogicLng()).append(";");
|
|
location.append(kwsDevice.getLogicLng()).append(";");
|