|
@@ -2,6 +2,7 @@ package com.sckw.slope.detection.service;
|
|
|
|
|
|
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
import com.github.pagehelper.PageHelper;
|
|
import com.github.pagehelper.PageHelper;
|
|
|
import com.github.pagehelper.PageInfo;
|
|
import com.github.pagehelper.PageInfo;
|
|
|
import com.sckw.core.exception.BusinessException;
|
|
import com.sckw.core.exception.BusinessException;
|
|
@@ -360,8 +361,8 @@ public class ThresholdService {
|
|
|
kwsThreshold.setItemName(itemName);
|
|
kwsThreshold.setItemName(itemName);
|
|
|
kwsThreshold.setMountainId(headerData.getMountainId());
|
|
kwsThreshold.setMountainId(headerData.getMountainId());
|
|
|
//计算设置状态 便于select
|
|
//计算设置状态 便于select
|
|
|
- String setting = checkAndSettings(configurationDTO, headerData);
|
|
|
|
|
- kwsThreshold.setSetting(setting);
|
|
|
|
|
|
|
+// String setting = checkAndSettings(configurationDTO, headerData);
|
|
|
|
|
+// kwsThreshold.setSetting(setting);
|
|
|
kwsThreshold.setLevel(Integer.valueOf(thresholdBean.getLevel()));
|
|
kwsThreshold.setLevel(Integer.valueOf(thresholdBean.getLevel()));
|
|
|
kwsThreshold.setMax(String.valueOf(thresholdBean.getMax()));
|
|
kwsThreshold.setMax(String.valueOf(thresholdBean.getMax()));
|
|
|
kwsThreshold.setMin(String.valueOf(thresholdBean.getMin()));
|
|
kwsThreshold.setMin(String.valueOf(thresholdBean.getMin()));
|
|
@@ -378,8 +379,8 @@ public class ThresholdService {
|
|
|
} else {
|
|
} else {
|
|
|
selected.setLevel(Integer.valueOf(thresholdBean.getLevel()));
|
|
selected.setLevel(Integer.valueOf(thresholdBean.getLevel()));
|
|
|
//计算设置状态 便于select
|
|
//计算设置状态 便于select
|
|
|
- String setting = checkAndSettings(configurationDTO, headerData);
|
|
|
|
|
- selected.setSetting(setting);
|
|
|
|
|
|
|
+// String setting = checkAndSettings(configurationDTO, headerData);
|
|
|
|
|
+// selected.setSetting(setting);
|
|
|
selected.setMax(String.valueOf(thresholdBean.getMax()));
|
|
selected.setMax(String.valueOf(thresholdBean.getMax()));
|
|
|
selected.setMin(String.valueOf(thresholdBean.getMin()));
|
|
selected.setMin(String.valueOf(thresholdBean.getMin()));
|
|
|
selected.setPhones(phones);
|
|
selected.setPhones(phones);
|
|
@@ -390,6 +391,12 @@ public class ThresholdService {
|
|
|
thresholdRepository.saveOrUpdate(selected);
|
|
thresholdRepository.saveOrUpdate(selected);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ //计算设置状态 便于select
|
|
|
|
|
+ String setting = checkAndSettings(configurationDTO, headerData);
|
|
|
|
|
+ thresholdMapper.update(null,
|
|
|
|
|
+ new LambdaUpdateWrapper<KwsThreshold>()
|
|
|
|
|
+ .eq(KwsThreshold::getDeviceId,configurationDTO.getDeviceId())
|
|
|
|
|
+ .set(KwsThreshold::getSetting,setting));
|
|
|
Map<String, SystemDict> dict = commonService.getDictByDictCode(DictEnum.MODEL_PART);
|
|
Map<String, SystemDict> dict = commonService.getDictByDictCode(DictEnum.MODEL_PART);
|
|
|
KwsProject project = projectMapper.selectOne(new LambdaQueryWrapper<KwsProject>()
|
|
KwsProject project = projectMapper.selectOne(new LambdaQueryWrapper<KwsProject>()
|
|
|
.eq(KwsProject::getId, Long.parseLong(projectId)));
|
|
.eq(KwsProject::getId, Long.parseLong(projectId)));
|