Commit 59a50137 authored by tianbo's avatar tianbo

fix(jg-register): 修复设备类别查询时记录ID为空的异常

- 添加对record参数的空值检查,避免findById调用时出现异常 - 当record为空时直接返回null,防止不必要的数据库查询
parent acebf6d1
...@@ -972,7 +972,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -972,7 +972,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
String submitType = String.valueOf(paramMap.get("submitType")); String submitType = String.valueOf(paramMap.get("submitType"));
String record = (String) equipmentInfoForm.get(RECORD); String record = (String) equipmentInfoForm.get(RECORD);
String dataSource = (String) equipmentInfoForm.get(DATA_SOURCE); String dataSource = (String) equipmentInfoForm.get(DATA_SOURCE);
ESEquipmentCategoryDto esEquipmentCategoryDto = esEquipmentCategory.findById(record).orElse(null); ESEquipmentCategoryDto esEquipmentCategoryDto = !ValidationUtil.isEmpty(record) ? esEquipmentCategory.findById(record).orElse(null) : null;
if (dataSource.contains("his")) { if (dataSource.contains("his")) {
// 使用登记证编号校验 // 使用登记证编号校验
this.checkUseRegistrationCodeIsNotNUll(equipmentInfoForm); this.checkUseRegistrationCodeIsNotNUll(equipmentInfoForm);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment