diff --git a/zc-business/src/main/java/com/zc/business/message/device/handler/DeviceMessageHandler.java b/zc-business/src/main/java/com/zc/business/message/device/handler/DeviceMessageHandler.java index f401e0fe..f55b91ef 100644 --- a/zc-business/src/main/java/com/zc/business/message/device/handler/DeviceMessageHandler.java +++ b/zc-business/src/main/java/com/zc/business/message/device/handler/DeviceMessageHandler.java @@ -320,7 +320,9 @@ public class DeviceMessageHandler { String title = direction + WarningSubclassEnum.getDecorateInfo(warningSubclass); // 标题 dcWarning.setWarningTitle(title); - dcWarning.setRemark(DateUtil.formatDateTime(DateUtil.date(captureTime)) + UniversalEnum.BLANK_SPACE.getValue() + title); + SimpleDateFormat sdf = new SimpleDateFormat(UniversalEnum.CHINESE_CHARACTER_TIME_FORMAT.getValue()); + String formattedDate = sdf.format(new Date()); + dcWarning.setRemark(formattedDate + UniversalEnum.BLANK_SPACE.getValue() + title); // 影响车道 // 物联设备id @@ -622,7 +624,9 @@ public class DeviceMessageHandler { DcWarning dcWarning = new DcWarning(); dcWarning.setWarningState(UniversalEnum.ONE.getNumber()); - dcWarning.setRemark(new Date() + UniversalEnum.BLANK_SPACE.getValue() + content); + SimpleDateFormat sdf = new SimpleDateFormat(UniversalEnum.CHINESE_CHARACTER_TIME_FORMAT.getValue()); + String formattedDate = sdf.format(new Date()); + dcWarning.setRemark(formattedDate + UniversalEnum.BLANK_SPACE.getValue() + content); dcWarning.setWarningTime(new Date()); dcWarning.setWarningType(UniversalEnum.EIGHT_ONE.getNumber()); dcWarning.setWarningSubclass(UniversalEnum.EIGHT_ONE.getValue()); @@ -669,7 +673,9 @@ public class DeviceMessageHandler { String string = object.toString(); DcWarning dcWarning = new DcWarning(); dcWarning.setWarningState(UniversalEnum.ONE.getNumber()); - dcWarning.setRemark(new Date() + UniversalEnum.BLANK_SPACE.getValue() + content); + SimpleDateFormat sdf = new SimpleDateFormat(UniversalEnum.CHINESE_CHARACTER_TIME_FORMAT.getValue()); + String formattedDate = sdf.format(new Date()); + dcWarning.setRemark(formattedDate + UniversalEnum.BLANK_SPACE.getValue() + content); dcWarning.setWarningTime(new Date()); dcWarning.setWarningType(UniversalEnum.EIGHT_FOUR.getNumber()); dcWarning.setWarningSubclass(UniversalEnum.EIGHT_FOUR.getValue());