diff --git a/hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/MessageConstants.java b/hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/MessageConstants.java index f8d51ff..e6a42b3 100644 --- a/hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/MessageConstants.java +++ b/hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/MessageConstants.java @@ -49,6 +49,10 @@ public class MessageConstants { EQUIPMENT("equipment","设备管理"), SAFE_PRODUCT("safeProduct","安全管理"), ASSETS("assets","资产管理"), + WARNING("warning","告警消息"), + DUTY("duty","值班消息"), + SAFE("safe","安全消息"), + ACCESS("access","检修消息"), ; @Getter private String key; diff --git a/hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/dto/PlanMsgRecordDto.java b/hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/dto/PlanMsgRecordDto.java index e449437..0fa7270 100644 --- a/hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/dto/PlanMsgRecordDto.java +++ b/hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/dto/PlanMsgRecordDto.java @@ -1,11 +1,14 @@ package com.hnac.hzims.message.dto; +import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.ser.std.NullSerializer; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; +import org.springblade.core.tool.utils.DateUtil; +import org.springframework.format.annotation.DateTimeFormat; import javax.validation.constraints.NotNull; import java.io.Serializable; @@ -44,6 +47,8 @@ public class PlanMsgRecordDto implements Serializable { private Long receiver; @ApiModelProperty("消息推送计划时间") + @JsonFormat(pattern = DateUtil.PATTERN_DATETIME) + @DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME) @NotNull private LocalDateTime planTime; diff --git a/hzims-service/message/src/main/java/com/hnac/hzims/message/fegin/MessageClient.java b/hzims-service/message/src/main/java/com/hnac/hzims/message/fegin/MessageClient.java index 60ac7bc..b997af9 100644 --- a/hzims-service/message/src/main/java/com/hnac/hzims/message/fegin/MessageClient.java +++ b/hzims-service/message/src/main/java/com/hnac/hzims/message/fegin/MessageClient.java @@ -81,7 +81,9 @@ public class MessageClient extends BladeController implements IMessageClient{ if(Func.isNotEmpty(template.getType())) { Func.toStrList(",",template.getType()).forEach(type -> { MessagePushRecordEntity entity = BeanUtil.copy(template,MessagePushRecordEntity.class); + entity.setId(null); entity.setType(type); + entity.setTaskId(request.getTaskId()); entity.setTemplateId(messageId); entity.setDeptId(request.getDeptId()); entity.setCreateUser(request.getCreateUser());