1.解决检测完成,可能有脏数据引发的不符合问题
2.优化检测树单位,解决自动生成表缺少部分字段
This commit is contained in:
@@ -177,10 +177,11 @@ public interface IPqDevService extends IService<PqDev> {
|
||||
/**
|
||||
* 正式监测完成,修改中断状态
|
||||
* @param ids
|
||||
* @param valueType
|
||||
* @param code
|
||||
* @return
|
||||
*/
|
||||
boolean updateResult(List<String> ids,String code);
|
||||
boolean updateResult(List<String> ids,List<String> valueType ,String code);
|
||||
|
||||
void updatePqDevReportState(String devId, int i);
|
||||
|
||||
|
||||
@@ -489,9 +489,9 @@ public class PqDevServiceImpl extends ServiceImpl<PqDevMapper, PqDev> implements
|
||||
|
||||
|
||||
@Override
|
||||
public boolean updateResult(List<String> ids, String code) {
|
||||
public boolean updateResult(List<String> ids,List<String> valueType, String code) {
|
||||
if (CollUtil.isNotEmpty(ids)) {
|
||||
Map<String, Integer> result = detectionDataDealService.devResult(ids, code);
|
||||
Map<String, Integer> result = detectionDataDealService.devResult(ids,valueType, code);
|
||||
List<PqDev> list = this.list(new LambdaQueryWrapper<PqDev>().in(PqDev::getId, ids));
|
||||
for (PqDev pqDev : list) {
|
||||
if (result.containsKey(pqDev.getId())) {
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
package com.njcn.gather.device.script.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.yulichang.toolkit.JoinWrappers;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
||||
import com.njcn.gather.device.script.mapper.PqScriptCheckDataMapper;
|
||||
import com.njcn.gather.device.script.pojo.param.PqScriptCheckDataParam;
|
||||
import com.njcn.gather.device.script.pojo.po.PqScriptCheckData;
|
||||
import com.njcn.gather.device.script.pojo.vo.PqScriptCheckDataVO;
|
||||
import com.njcn.gather.device.script.service.IPqScriptCheckDataService;
|
||||
import com.njcn.gather.system.dictionary.mapper.DictTreeMapper;
|
||||
import com.njcn.gather.system.dictionary.pojo.po.DictTree;
|
||||
@@ -18,7 +17,6 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -45,7 +43,7 @@ public class PqScriptCheckDataServiceImpl extends ServiceImpl<PqScriptCheckDataM
|
||||
queryWrapper.selectAll(PqScriptCheckData.class)
|
||||
.leftJoin(DictTree.class, DictTree::getId, PqScriptCheckData::getValueType)
|
||||
.eq(PqScriptCheckData::getScriptId, param.getScriptId())
|
||||
.eq(PqScriptCheckData::getIndex, param.getIndex())
|
||||
.eq(ObjectUtil.isNotNull(param.getIndex()),PqScriptCheckData::getIndex, param.getIndex())
|
||||
.eq(PqScriptCheckData::getEnable, DataStateEnum.ENABLE.getCode());
|
||||
if (param.getIsValueTypeName()) {
|
||||
queryWrapper.selectAs(DictTree::getCode, PqScriptCheckData::getValueType);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.njcn.gather.device.script.util;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.njcn.gather.device.script.pojo.enums.ResultUnitEnum;
|
||||
import com.njcn.gather.device.script.pojo.po.PqScriptDtls;
|
||||
|
||||
@@ -16,6 +17,9 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
public class ScriptDtlsDesc {
|
||||
public static StringBuffer getStringBuffer(List<PqScriptDtls> scriptDtlIndex, Boolean isValueType) {
|
||||
if(ObjectUtil.isNull(isValueType)){
|
||||
isValueType=false;
|
||||
}
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
buffer.append("输入:");
|
||||
appendValue(scriptDtlIndex, buffer, "Freq", "频率", ResultUnitEnum.FREQ_UNIT.getUnit(), null);
|
||||
|
||||
Reference in New Issue
Block a user