From 39f19b35268be4425b6cc08a6ee3a142428a0f13 Mon Sep 17 00:00:00 2001 From: shanao Date: Sat, 14 Sep 2024 20:41:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=97=B6=E9=97=B4=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/zcloud/entity/accident/AccidentRecords.java | 4 ++-- .../service/accident/impl/AccidentRecordsServiceImpl.java | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) 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();