|
|
@@ -0,0 +1,178 @@
|
|
|
+package com.its.vms.dto;
|
|
|
+
|
|
|
+import com.fasterxml.jackson.annotation.JsonProperty;
|
|
|
+import com.its.vms.entity.TbEsbVmsShortMsg;
|
|
|
+import io.swagger.annotations.ApiModel;
|
|
|
+import io.swagger.annotations.ApiModelProperty;
|
|
|
+import lombok.*;
|
|
|
+
|
|
|
+import javax.validation.constraints.PositiveOrZero;
|
|
|
+import javax.validation.constraints.Size;
|
|
|
+import java.io.Serializable;
|
|
|
+
|
|
|
+/**
|
|
|
+ * ESB 연계 긴급 단문메시지 전송 DTO Class
|
|
|
+ */
|
|
|
+@Data
|
|
|
+@Builder
|
|
|
+@ApiModel("TbEsbVmsShortMsgDto(ESB 연계 긴급 단문메시지 전송)")
|
|
|
+public class TbEsbVmsShortMsgDto implements Serializable {
|
|
|
+ private static final long serialVersionUID = 1L;
|
|
|
+
|
|
|
+ private Long msgId;
|
|
|
+ private String rgstDt;
|
|
|
+ private Integer msgTp;
|
|
|
+ private String dsplStrtDt;
|
|
|
+ private String dsplEndDt;
|
|
|
+ private Integer fontNameCd;
|
|
|
+ private Integer fontColrCd;
|
|
|
+ private Integer fontSize;
|
|
|
+ private Integer fontBold;
|
|
|
+ private String dsplMsgLn1;
|
|
|
+ private String dsplMsgLn2;
|
|
|
+ private String dsplMsgLn3;
|
|
|
+ private String combineId;
|
|
|
+ private String userId;
|
|
|
+ private String sendYn;
|
|
|
+ private String sendDt;
|
|
|
+ private Long tryCnt;
|
|
|
+ private String lastTryDt;
|
|
|
+
|
|
|
+ @ApiModel("TbEsbVmsShortMsgReq(ESB 연계 긴급 단문메시지 전송 요청)")
|
|
|
+ @Getter
|
|
|
+ @Setter
|
|
|
+ @ToString
|
|
|
+ @NoArgsConstructor//(access = AccessLevel.PROTECTED)
|
|
|
+ public static class TbEsbVmsShortMsgReq {
|
|
|
+ @ApiModelProperty("메시지유형(1:1단 메시지, 2:2단 메시지, 3:3단 메시지), 1단 메시지만 사용함, Nullable = Y, NUMBER(1)") // Y NUMBER(1)
|
|
|
+ @JsonProperty("msg_tp")
|
|
|
+ @PositiveOrZero
|
|
|
+ private Integer msgTp;
|
|
|
+
|
|
|
+ @ApiModelProperty("표출 시작시각, 예비, Nullable = Y, VARCHAR(14)") // Y VARCHAR(14)
|
|
|
+ @JsonProperty("dspl_strt_dt")
|
|
|
+ @Size(min=14, max=14)
|
|
|
+ private String dsplStrtDt;
|
|
|
+
|
|
|
+ @ApiModelProperty("표출 종료시각, 예비, Nullable = Y, VARCHAR(14)") // Y VARCHAR(14)
|
|
|
+ @JsonProperty("dspl_end_dt")
|
|
|
+ @Size(min=14, max=14)
|
|
|
+ private String dsplEndDt;
|
|
|
+
|
|
|
+ @ApiModelProperty("글자유형(0:굴림체, 1:바탕체), Nullable = Y, NUMBER(1)") // Y NUMBER(1)
|
|
|
+ @JsonProperty("font_name_cd")
|
|
|
+ @PositiveOrZero
|
|
|
+ private Integer fontNameCd;
|
|
|
+
|
|
|
+ @ApiModelProperty("글자색상(0:흑색-Black, 1:적색-Red, 2:라임-Lime, 3:황색-Yellow), Nullable = Y, NUMBER(1)") // Y NUMBER(1)
|
|
|
+ @JsonProperty("font_colr_cd")
|
|
|
+ @PositiveOrZero
|
|
|
+ private Integer fontColrCd;
|
|
|
+
|
|
|
+ @ApiModelProperty("글자크기(픽셀단위:16, 24, 32, 48 등), Nullable = Y, NUMBER(3)") // Y NUMBER(3)
|
|
|
+ @JsonProperty("font_size")
|
|
|
+ @PositiveOrZero
|
|
|
+ private Integer fontSize;
|
|
|
+
|
|
|
+ @ApiModelProperty("글꼴 방식(0:Normal,1:Bold), 예비, Nullable = Y, NUMBER(1)") // Y NUMBER(1)
|
|
|
+ @JsonProperty("font_bold")
|
|
|
+ @PositiveOrZero
|
|
|
+ private Integer fontBold;
|
|
|
+
|
|
|
+ @ApiModelProperty("1단 문자열, Nullable = N, VARCHAR(50)") // N VARCHAR(50)
|
|
|
+ @JsonProperty("dspl_msg_ln1")
|
|
|
+ @Size(min=1, max=50)
|
|
|
+ private String dsplMsgLn1;
|
|
|
+
|
|
|
+ @ApiModelProperty("2단 문자열, Nullable = Y, VARCHAR(50)") // Y VARCHAR(50)
|
|
|
+ @JsonProperty("dspl_msg_ln2")
|
|
|
+ @Size(max=50)
|
|
|
+ private String dsplMsgLn2;
|
|
|
+
|
|
|
+ @ApiModelProperty("3단 문자열, Nullable = Y, VARCHAR(50)") // Y VARCHAR(50)
|
|
|
+ @JsonProperty("dspl_msg_ln3")
|
|
|
+ @Size(max=50)
|
|
|
+ private String dsplMsgLn3;
|
|
|
+
|
|
|
+ @ApiModelProperty("통합플랫폼 ID, Nullable = N, VARCHAR(15)") // N VARCHAR(15)
|
|
|
+ @JsonProperty("combine_id")
|
|
|
+ @Size(min=15, max=15)
|
|
|
+ private String combineId;
|
|
|
+
|
|
|
+ @ApiModelProperty("사용자 ID, Nullable = Y, VARCHAR(20)") // Y VARCHAR(20)
|
|
|
+ @JsonProperty("user_id")
|
|
|
+ @Size(min=1, max=20)
|
|
|
+ private String userId;
|
|
|
+
|
|
|
+ @Builder
|
|
|
+ public TbEsbVmsShortMsgReq(Integer msg_tp, String dspl_strt_dt, String dspl_end_dt, Integer font_name_cd, Integer font_colr_cd, Integer font_size, Integer font_bold, String dspl_msg_ln1, String dspl_msg_ln2, String dspl_msg_ln3, String combine_id, String user_id) {
|
|
|
+ this.msgTp = msg_tp;
|
|
|
+ this.dsplStrtDt = dspl_strt_dt;
|
|
|
+ this.dsplEndDt = dspl_end_dt;
|
|
|
+ this.fontNameCd = font_name_cd;
|
|
|
+ this.fontColrCd = font_colr_cd;
|
|
|
+ this.fontSize = font_size;
|
|
|
+ this.fontBold = font_bold;
|
|
|
+ this.dsplMsgLn1 = dspl_msg_ln1;
|
|
|
+ this.dsplMsgLn2 = dspl_msg_ln2;
|
|
|
+ this.dsplMsgLn3 = dspl_msg_ln3;
|
|
|
+ this.combineId = combine_id;
|
|
|
+ this.userId = user_id;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiModel("TbEsbVmsShortMsgReqRes(ESB 연계 긴급 단문메시지 전송 요청 응답)")
|
|
|
+ @Getter
|
|
|
+ @Setter
|
|
|
+ @ToString
|
|
|
+ @NoArgsConstructor//(access = AccessLevel.PROTECTED)
|
|
|
+ public static class TbEsbVmsShortMsgReqRes {
|
|
|
+
|
|
|
+ @ApiModelProperty("메시지 id")
|
|
|
+ @JsonProperty("msg_id")
|
|
|
+ private Long msgId;
|
|
|
+
|
|
|
+ @ApiModelProperty("제어결과(0: 성공, 기타: 오류")
|
|
|
+ @JsonProperty("error")
|
|
|
+ private Integer error;
|
|
|
+
|
|
|
+ @ApiModelProperty("제어결과메시지")
|
|
|
+ @JsonProperty("message")
|
|
|
+ private String message;
|
|
|
+
|
|
|
+ public void setResult(Integer error, String message) {
|
|
|
+ this.error = error;
|
|
|
+ this.message = message;
|
|
|
+ }
|
|
|
+ @Builder
|
|
|
+ public TbEsbVmsShortMsgReqRes(Long msgId, Integer error, String message) {
|
|
|
+ this.msgId = msgId;
|
|
|
+ this.error = error;
|
|
|
+ this.message = message;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public TbEsbVmsShortMsg toEntity() {
|
|
|
+ return TbEsbVmsShortMsg.builder()
|
|
|
+ .msgId(this.msgId)
|
|
|
+ .rgstDt(this.rgstDt)
|
|
|
+ .msgTp(this.msgTp)
|
|
|
+ .dsplStrtDt(this.dsplStrtDt)
|
|
|
+ .dsplEndDt(this.dsplEndDt)
|
|
|
+ .fontNameCd(this.fontNameCd)
|
|
|
+ .fontColrCd(this.fontColrCd)
|
|
|
+ .fontSize(this.fontSize)
|
|
|
+ .fontBold(this.fontBold)
|
|
|
+ .dsplMsgLn1(this.dsplMsgLn1)
|
|
|
+ .dsplMsgLn2(this.dsplMsgLn2)
|
|
|
+ .dsplMsgLn3(this.dsplMsgLn3)
|
|
|
+ .combineId(this.combineId)
|
|
|
+ .userId(this.userId)
|
|
|
+ .sendYn(this.sendYn)
|
|
|
+ .sendDt(this.sendDt)
|
|
|
+ .tryCnt(this.tryCnt)
|
|
|
+ .lastTryDt(this.lastTryDt)
|
|
|
+ .build();
|
|
|
+ }
|
|
|
+
|
|
|
+}
|