检测计划新增数据处理原则字段、全局配置中移除数据处理原则字段
This commit is contained in:
@@ -53,10 +53,11 @@ import com.njcn.gather.storage.pojo.po.AdNonHarmonicResult;
|
||||
import com.njcn.gather.storage.pojo.vo.RawDataVO;
|
||||
import com.njcn.gather.storage.service.AdHarmonicService;
|
||||
import com.njcn.gather.storage.service.AdNonHarmonicService;
|
||||
import com.njcn.gather.system.cfg.pojo.po.SysTestConfig;
|
||||
import com.njcn.gather.system.cfg.service.ISysTestConfigService;
|
||||
import com.njcn.gather.system.dictionary.pojo.enums.DictDataEnum;
|
||||
import com.njcn.gather.system.dictionary.pojo.po.DictData;
|
||||
import com.njcn.gather.system.dictionary.pojo.po.DictTree;
|
||||
import com.njcn.gather.system.dictionary.service.IDictDataService;
|
||||
import com.njcn.gather.system.dictionary.service.IDictTreeService;
|
||||
import com.njcn.web.utils.ExcelUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@@ -90,6 +91,7 @@ public class ResultServiceImpl implements IResultService {
|
||||
private final IPqScriptCheckDataService pqScriptCheckDataService;
|
||||
private final TableGenMapper tableGenMapper;
|
||||
private final DetectionServiceImpl detectionServiceImpl;
|
||||
private final IDictDataService dictDataService;
|
||||
|
||||
/**
|
||||
* 谐波类code,取树形字典表中的code
|
||||
@@ -108,7 +110,7 @@ public class ResultServiceImpl implements IResultService {
|
||||
adPlanService.visualize(Collections.singletonList(plan));
|
||||
}
|
||||
formContentVO.setScriptName(plan.getScriptId());
|
||||
formContentVO.setDataRule(sysTestConfigService.getConfig().getDataRule());
|
||||
formContentVO.setDataRule(plan.getDataRule());
|
||||
formContentVO.setDeviceName(pqDevService.getById(queryParam.getDeviceId()).getName());
|
||||
|
||||
List<Map<String, String>> chnList = new ArrayList<>();
|
||||
@@ -1510,12 +1512,19 @@ public class ResultServiceImpl implements IResultService {
|
||||
// PqDev dev = pqDevService.getById(devId);
|
||||
devIdMapComm.put(devId, devId);
|
||||
|
||||
SysTestConfig oneConfig = sysTestConfigService.getOneConfig();
|
||||
DictDataEnum dataRule;
|
||||
if (ObjectUtil.isNotNull(oneConfig)) {
|
||||
dataRule = DictDataEnum.getDictDataEnumByCode(oneConfig.getDataRule());
|
||||
// SysTestConfig oneConfig = sysTestConfigService.getOneConfig();
|
||||
// if (ObjectUtil.isNotNull(oneConfig)) {
|
||||
// dataRule = DictDataEnum.getDictDataEnumByCode(oneConfig.getDataRule());
|
||||
// } else {
|
||||
// dataRule = DictDataEnum.SECTION_VALUE;
|
||||
// }
|
||||
AdPlan plan = adPlanService.getById(planId);
|
||||
DictData dictData = dictDataService.getDictDataById(plan.getDataRule());
|
||||
if (ObjectUtil.isNotNull(dictData)) {
|
||||
dataRule = DictDataEnum.getDictDataEnumByCode(dictData.getCode());
|
||||
} else {
|
||||
dataRule = DictDataEnum.AT_WILL_VALUE;
|
||||
dataRule = DictDataEnum.SECTION_VALUE;
|
||||
}
|
||||
|
||||
List<AdNonHarmonicResult> allNonHarmonicRawData = adNonHarmonicService.listAllRawData(scriptId, oldCode, devId);
|
||||
|
||||
Reference in New Issue
Block a user