diff --git a/src/main/java/com/zcloud/entity/accident/AccidentRecords.java b/src/main/java/com/zcloud/entity/accident/AccidentRecords.java index f44e8ca1..3fc18cc2 100644 --- a/src/main/java/com/zcloud/entity/accident/AccidentRecords.java +++ b/src/main/java/com/zcloud/entity/accident/AccidentRecords.java @@ -67,7 +67,7 @@ public class AccidentRecords implements Serializable { /** * 事故发生时间 */ - private Date incidentDate; + private String incidentDate; /** * 直接经济损失(万元) @@ -130,7 +130,7 @@ public class AccidentRecords implements Serializable { /** * 报出日期 */ - private Date reportDate; + private String reportDate; /** * 创建人 diff --git a/src/main/java/com/zcloud/service/accident/impl/AccidentRecordsServiceImpl.java b/src/main/java/com/zcloud/service/accident/impl/AccidentRecordsServiceImpl.java index 97919fec..493cf2d5 100644 --- a/src/main/java/com/zcloud/service/accident/impl/AccidentRecordsServiceImpl.java +++ b/src/main/java/com/zcloud/service/accident/impl/AccidentRecordsServiceImpl.java @@ -78,7 +78,7 @@ public class AccidentRecordsServiceImpl implements AccidentRecordsService { accidentRecords.setIncidentType(pageData.getString("incidentType")); accidentRecords.setIncidentLevel(pageData.getString("incidentLevel")); accidentRecords.setLocation(pageData.getString("location")); - accidentRecords.setIncidentDate(DateUtil.parse(pageData.getString("incidentDate"), DatePattern.UTC_MS_PATTERN)); + accidentRecords.setIncidentDate(pageData.getString("incidentDate")); accidentRecords.setDirectLoss(Convert.toInt(pageData.get("directLoss"))); accidentRecords.setInjured(Convert.toInt(pageData.get("injured"))); accidentRecords.setSeriouslyInjured(Convert.toInt(pageData.get("seriouslyInjured"))); @@ -88,7 +88,7 @@ public class AccidentRecordsServiceImpl implements AccidentRecordsService { accidentRecords.setSuggestions(pageData.getString("suggestions")); accidentRecords.setMeasures(pageData.getString("measures")); accidentRecords.setCreator(pageData.getString("creator")); - accidentRecords.setReportDate(DateUtil.parse(pageData.getString("reportDate"), DatePattern.UTC_MS_PATTERN)); + accidentRecords.setReportDate(pageData.getString("reportDate")); Assert.isTrue(accidentRecordsMapper.save(accidentRecords) == 1, "新增事故记录失败"); } @@ -102,7 +102,7 @@ public class AccidentRecordsServiceImpl implements AccidentRecordsService { accidentRecords.setIncidentType(pageData.getString("incidentType")); accidentRecords.setIncidentLevel(pageData.getString("incidentLevel")); accidentRecords.setLocation(pageData.getString("location")); - accidentRecords.setIncidentDate(DateUtil.parse(pageData.getString("incidentDate"), "YYYY-MM-DD HH:mm:ss")); + accidentRecords.setIncidentDate(pageData.getString("incidentDate")); accidentRecords.setDirectLoss(Convert.toInt(pageData.get("directLoss"))); accidentRecords.setInjured(Convert.toInt(pageData.get("injured"))); accidentRecords.setSeriouslyInjured(Convert.toInt(pageData.get("seriouslyInjured"))); @@ -112,7 +112,7 @@ public class AccidentRecordsServiceImpl implements AccidentRecordsService { accidentRecords.setSuggestions(pageData.getString("suggestions")); accidentRecords.setMeasures(pageData.getString("measures")); accidentRecords.setCreator(pageData.getString("creator")); - accidentRecords.setReportDate(DateUtil.parse(pageData.getString("reportDate"), "YYYY-MM-DD HH:mm:ss")); + accidentRecords.setReportDate(pageData.getString("reportDate")); accidentRecords.setUpdatedBy(Jurisdiction.getUsername()); accidentRecords.setUpdatedTime(new Date()); String corpinfoId = StrUtil.isEmpty(accidentRecords.getCorpinfoId()) ? Jurisdiction.getCORPINFO_ID() : accidentRecords.getCorpinfoId();