代码调整

This commit is contained in:
2025-01-08 15:54:12 +08:00
parent 84fdd18f4e
commit 2b49a8b268
2 changed files with 3 additions and 2 deletions

View File

@@ -406,7 +406,7 @@ public class PqDevServiceImpl extends ServiceImpl<PqDevMapper, PqDev> implements
public List<PreDetection> getDevInfo(List<String> devIds) {
List<PreDetection> preDetections = this.baseMapper.selectDevInfo(devIds);
if(devIds.size() != preDetections.size()){
throw new BusinessException("返回装置数量与查询装置数量不一致");
throw new BusinessException(DevResponseEnum.DEVICE_DIS_ERROR);
}
for (PreDetection preDetection : preDetections) {

View File

@@ -18,7 +18,8 @@ public enum DevResponseEnum {
IMPORT_PLAN_DATA_FAIL("A001010", "导入的检测计划为空"),
IMPORT_DATA_FORMAT_FAIL("A001011", "导入数据格式错误"),
IMPORT_SOURCE_ERROR("A001012","当前模式下一个检测计划只能有一个检测源" ),
IMPORT_DATASOURCE_ERROR("A001013","当前模式下一个检测计划只能有一个数据源" );
IMPORT_DATASOURCE_ERROR("A001013","当前模式下一个检测计划只能有一个数据源" ),
DEVICE_DIS_ERROR("A001014","装置配置异常" );
private final String message;
private final String code;