代码调整

This commit is contained in:
caozehui
2025-04-01 09:50:53 +08:00
parent 00bda55ddd
commit 9b1b21dad5
9 changed files with 43 additions and 47 deletions

View File

@@ -37,6 +37,6 @@ public class PqScriptIssueParam {
@ApiModelProperty("表明指标类型例如Freq频率下的影响、Base额定下的影响、VOL电压下的影响")
private String scriptSubType;
@ApiModelProperty("脚本下发类型")
@ApiModelProperty("脚本下发类型") //在程控源功能中使用。因为在程控源功能中不知道装置的类型即不知道额定电压、额定电流而在正式检测时知道装置的类型。为了区分0表示正式检测1表示程控源功能。
private int type;
}

View File

@@ -9,6 +9,7 @@ import com.njcn.common.pojo.enums.common.DataStateEnum;
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
import com.njcn.common.pojo.exception.BusinessException;
import com.njcn.gather.detection.pojo.enums.DetectionCodeEnum;
import com.njcn.gather.detection.pojo.enums.DetectionResponseEnum;
import com.njcn.gather.script.mapper.PqScriptCheckDataMapper;
import com.njcn.gather.script.pojo.param.PqScriptCheckDataParam;
import com.njcn.gather.script.pojo.po.PqScriptCheckData;
@@ -80,7 +81,8 @@ public class PqScriptCheckDataServiceImpl extends ServiceImpl<PqScriptCheckDataM
.eq(PqScriptCheckData::getEnable, DataStateEnum.ENABLE.getCode());
List<PqScriptCheckData> pqScriptCheckData = this.baseMapper.selectList(queryWrapper);
if(CollUtil.isEmpty(pqScriptCheckData)){
throw new BusinessException(CommonResponseEnum.FAIL,"测试脚本项暂无配置");
// throw new BusinessException(CommonResponseEnum.FAIL,"测试脚本项暂无配置");
throw new BusinessException(DetectionResponseEnum.SCRIPT_CHECK_DATA_NOT_EXIST);
}
List<String> valueTypeList = pqScriptCheckData.stream().map(PqScriptCheckData::getValueType).distinct().collect(Collectors.toList());
LambdaQueryWrapper<DictTree> dictTreeLambdaQueryWrapper = new LambdaQueryWrapper<>();