Commit c78adec7 authored by 刘林's avatar 刘林

fix(jg):管道导入报错

parent 4f898dd5
......@@ -2290,8 +2290,12 @@ public class DataDockServiceImpl {
JSONObject inspectionDetectionInfoJO = (JSONObject) JSON.toJSON(inspectionDetectionInfo);
jsonObject.putAll(inspectionDetectionInfoJO);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
jsonObject.put("inspectDate", sdf.format(inspectionDetectionInfo.getInspectDate()));
jsonObject.put("nextInspectDate", sdf.format(inspectionDetectionInfo.getNextInspectDate()));
jsonObject.put("inspectDate", Optional.ofNullable(inspectionDetectionInfo.getInspectDate())
.map(sdf::format)
.orElse(null));
jsonObject.put("nextInspectDate", Optional.ofNullable(inspectionDetectionInfo.getNextInspectDate())
.map(sdf::format)
.orElse(null));
jsonObject.put("orgBranchCode", paramsDto.getOrgBranchCode() + "_" + paramsDto.getOrgBranchName());
jsonObject.put("projectContraption", projectContraption.getProjectContraption());
jsonObject.put("projectContraptionNo", projectContraption.getProjectContraptionNo());
......
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