Commit cb5c3fb9 authored by tianbo's avatar tianbo

fix(amos-boot-module-jg): 修复使用登记模块设置检验字段空指针异常

- 在 setInspectField 方法中增加对 inspectDetail 对象为空的判断 - 如果 inspectDetail 为空,则直接返回,避免后续的空指针异常
parent 4c06bf58
......@@ -785,6 +785,9 @@ public class JgUseRegistrationManageServiceImpl extends BaseService<JgUseRegistr
private void setInspectField(String record, UseFlagParamDto useFlagParamDto) {
Map<String, Object> inspectDetail = jgUseRegistrationMapper.getInspectDetail(record, null);
if (inspectDetail == null) {
return;
}
useFlagParamDto.setInspectionUnitName(inspectDetail.get("inspectOrgName") == null ? "" : inspectDetail.get("inspectOrgName").toString());
useFlagParamDto.setNextInspectionDate(inspectDetail.get("nextInspectDate") == null ? null : (Date) inspectDetail.get("nextInspectDate"));
}
......
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