|
|
@@ -0,0 +1,217 @@
|
|
|
+package com.its.api.op.model.dto.traffic;
|
|
|
+
|
|
|
+import com.fasterxml.jackson.annotation.JsonProperty;
|
|
|
+import com.its.api.op.model.entity.traffic.TbLinkTraf;
|
|
|
+import io.swagger.annotations.ApiModel;
|
|
|
+import io.swagger.annotations.ApiModelProperty;
|
|
|
+import lombok.*;
|
|
|
+
|
|
|
+import javax.validation.constraints.Pattern;
|
|
|
+import javax.validation.constraints.Positive;
|
|
|
+import javax.validation.constraints.Size;
|
|
|
+import java.io.Serializable;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 링크 소통상황 DTO Class
|
|
|
+ */
|
|
|
+@Data
|
|
|
+@Builder
|
|
|
+@ApiModel("TbLinkTrafDto(링크 소통상황)")
|
|
|
+public class TbLinkTrafDto implements Serializable {
|
|
|
+ private static final long serialVersionUID = 1L;
|
|
|
+
|
|
|
+ @ApiModelProperty("링크ID") // N NUMBER(10)
|
|
|
+ @JsonProperty("link_id")
|
|
|
+ private Long linkId;
|
|
|
+
|
|
|
+ @ApiModelProperty("가공 일시") // Y VARCHAR(14)
|
|
|
+ @JsonProperty("prcn_dt")
|
|
|
+ private String prcnDt;
|
|
|
+
|
|
|
+ @ApiModelProperty("교통량") // Y NUMBER(6)
|
|
|
+ @JsonProperty("tfvl")
|
|
|
+ private Integer tfvl;
|
|
|
+
|
|
|
+ @ApiModelProperty("속도") // Y NUMBER(3)
|
|
|
+ @JsonProperty("sped")
|
|
|
+ private Integer sped;
|
|
|
+
|
|
|
+ @ApiModelProperty("점유 율") // Y NUMBER(5,2)
|
|
|
+ @JsonProperty("ocpy_rate")
|
|
|
+ private Double ocpyRate;
|
|
|
+
|
|
|
+ @ApiModelProperty("통행 시간") // Y NUMBER(6)
|
|
|
+ @JsonProperty("trvl_hh")
|
|
|
+ private Integer trvlHh;
|
|
|
+
|
|
|
+ @ApiModelProperty("소통 등급 코드") // Y VARCHAR(7)
|
|
|
+ @JsonProperty("cmtr_grad_cd")
|
|
|
+ private String cmtrGradCd;
|
|
|
+
|
|
|
+ @ApiModelProperty("결측 여부") // Y CHAR(1)
|
|
|
+ @JsonProperty("miss_yn")
|
|
|
+ private String missYn;
|
|
|
+
|
|
|
+ @ApiModelProperty("가공 속도") // Y NUMBER(3)
|
|
|
+ @JsonProperty("prcn_sped")
|
|
|
+ private Integer prcnSped;
|
|
|
+
|
|
|
+ @ApiModelProperty("평활화 속도") // Y NUMBER(3)
|
|
|
+ @JsonProperty("smth_sped")
|
|
|
+ private Integer smthSped;
|
|
|
+
|
|
|
+ @ApiModelProperty("보정 속도") // Y NUMBER(3)
|
|
|
+ @JsonProperty("adjs_sped")
|
|
|
+ private Integer adjsSped;
|
|
|
+
|
|
|
+ @ApiModelProperty("패턴 속도") // Y NUMBER(3)
|
|
|
+ @JsonProperty("ptrn_sped")
|
|
|
+ private Integer ptrnSped;
|
|
|
+
|
|
|
+ @ApiModelProperty("가공 소스") // Y VARCHAR(7)
|
|
|
+ @JsonProperty("prcn_sorc")
|
|
|
+ private String prcnSorc;
|
|
|
+
|
|
|
+ @ApiModelProperty("보정 소스") // Y VARCHAR(7)
|
|
|
+ @JsonProperty("adjs_sorc")
|
|
|
+ private String adjsSorc;
|
|
|
+
|
|
|
+ @ApiModelProperty("데이터 개수") // Y NUMBER(3)
|
|
|
+ @JsonProperty("data_num")
|
|
|
+ private Integer dataNum;
|
|
|
+
|
|
|
+ // Code Description Field
|
|
|
+ @ApiModelProperty("소통 등급 코드 설명")
|
|
|
+ @JsonProperty("cmtr_grad_desc") // CMTR_GRAD_CD
|
|
|
+ private String cmtrGradDesc;
|
|
|
+
|
|
|
+ @ApiModelProperty("결측 여부 설명")
|
|
|
+ @JsonProperty("miss_desc") // MISS_YN
|
|
|
+ private String missDesc;
|
|
|
+
|
|
|
+ @ApiModel("TbLinkTrafUpdReq(링크 소통상황 정보변경)")
|
|
|
+ @Getter
|
|
|
+ @Setter
|
|
|
+ @ToString
|
|
|
+ @NoArgsConstructor(access = AccessLevel.PROTECTED)
|
|
|
+ public static class TbLinkTrafUpdReq {
|
|
|
+
|
|
|
+ @ApiModelProperty("링크ID, Nullable = N, NUMBER(10)") // N NUMBER(10)
|
|
|
+ @JsonProperty("link_id")
|
|
|
+ @Positive
|
|
|
+ private Long linkId;
|
|
|
+
|
|
|
+ @ApiModelProperty("가공 일시, Nullable = Y, VARCHAR(14)") // Y VARCHAR(14)
|
|
|
+ @JsonProperty("prcn_dt")
|
|
|
+ @Size(min=1, max=14)
|
|
|
+ private String prcnDt;
|
|
|
+
|
|
|
+ @ApiModelProperty("교통량, Nullable = Y, NUMBER(6)") // Y NUMBER(6)
|
|
|
+ @JsonProperty("tfvl")
|
|
|
+ @Positive
|
|
|
+ private Integer tfvl;
|
|
|
+
|
|
|
+ @ApiModelProperty("속도, Nullable = Y, NUMBER(3)") // Y NUMBER(3)
|
|
|
+ @JsonProperty("sped")
|
|
|
+ @Positive
|
|
|
+ private Integer sped;
|
|
|
+
|
|
|
+ @ApiModelProperty("점유 율, , NUMBER(5,2)") // Y NUMBER(5,2)
|
|
|
+ @JsonProperty("ocpy_rate")
|
|
|
+ private Double ocpyRate;
|
|
|
+
|
|
|
+ @ApiModelProperty("통행 시간, Nullable = Y, NUMBER(6)") // Y NUMBER(6)
|
|
|
+ @JsonProperty("trvl_hh")
|
|
|
+ @Positive
|
|
|
+ private Integer trvlHh;
|
|
|
+
|
|
|
+ @ApiModelProperty("소통 등급 코드, Nullable = Y, VARCHAR(7)") // Y VARCHAR(7)
|
|
|
+ @JsonProperty("cmtr_grad_cd")
|
|
|
+ @Size(min=1, max=7)
|
|
|
+ private String cmtrGradCd;
|
|
|
+
|
|
|
+ @ApiModelProperty("결측 여부, Nullable = Y, CHAR(1)") // Y CHAR(1)
|
|
|
+ @JsonProperty("miss_yn")
|
|
|
+ @Size(min=1, max=1)
|
|
|
+ @Pattern(regexp = "[YN]")
|
|
|
+ private String missYn;
|
|
|
+
|
|
|
+ @ApiModelProperty("가공 속도, Nullable = Y, NUMBER(3)") // Y NUMBER(3)
|
|
|
+ @JsonProperty("prcn_sped")
|
|
|
+ @Positive
|
|
|
+ private Integer prcnSped;
|
|
|
+
|
|
|
+ @ApiModelProperty("평활화 속도, Nullable = Y, NUMBER(3)") // Y NUMBER(3)
|
|
|
+ @JsonProperty("smth_sped")
|
|
|
+ @Positive
|
|
|
+ private Integer smthSped;
|
|
|
+
|
|
|
+ @ApiModelProperty("보정 속도, Nullable = Y, NUMBER(3)") // Y NUMBER(3)
|
|
|
+ @JsonProperty("adjs_sped")
|
|
|
+ @Positive
|
|
|
+ private Integer adjsSped;
|
|
|
+
|
|
|
+ @ApiModelProperty("패턴 속도, Nullable = Y, NUMBER(3)") // Y NUMBER(3)
|
|
|
+ @JsonProperty("ptrn_sped")
|
|
|
+ @Positive
|
|
|
+ private Integer ptrnSped;
|
|
|
+
|
|
|
+ @ApiModelProperty("가공 소스, Nullable = Y, VARCHAR(7)") // Y VARCHAR(7)
|
|
|
+ @JsonProperty("prcn_sorc")
|
|
|
+ @Size(min=1, max=7)
|
|
|
+ private String prcnSorc;
|
|
|
+
|
|
|
+ @ApiModelProperty("보정 소스, Nullable = Y, VARCHAR(7)") // Y VARCHAR(7)
|
|
|
+ @JsonProperty("adjs_sorc")
|
|
|
+ @Size(min=1, max=7)
|
|
|
+ private String adjsSorc;
|
|
|
+
|
|
|
+ @ApiModelProperty("데이터 개수, Nullable = Y, NUMBER(3)") // Y NUMBER(3)
|
|
|
+ @JsonProperty("data_num")
|
|
|
+ @Positive
|
|
|
+ private Integer dataNum;
|
|
|
+
|
|
|
+ @Builder
|
|
|
+ public TbLinkTrafUpdReq(Long link_id, String prcn_dt, Integer tfvl, Integer sped, Double ocpy_rate, Integer trvl_hh, String cmtr_grad_cd, String miss_yn, Integer prcn_sped, Integer smth_sped, Integer adjs_sped, Integer ptrn_sped, String prcn_sorc, String adjs_sorc, Integer data_num) {
|
|
|
+ this.linkId = link_id;
|
|
|
+ this.prcnDt = prcn_dt;
|
|
|
+ this.tfvl = tfvl;
|
|
|
+ this.sped = sped;
|
|
|
+ this.ocpyRate = ocpy_rate;
|
|
|
+ this.trvlHh = trvl_hh;
|
|
|
+ this.cmtrGradCd = cmtr_grad_cd;
|
|
|
+ this.missYn = miss_yn;
|
|
|
+ this.prcnSped = prcn_sped;
|
|
|
+ this.smthSped = smth_sped;
|
|
|
+ this.adjsSped = adjs_sped;
|
|
|
+ this.ptrnSped = ptrn_sped;
|
|
|
+ this.prcnSorc = prcn_sorc;
|
|
|
+ this.adjsSorc = adjs_sorc;
|
|
|
+ this.dataNum = data_num;
|
|
|
+ }
|
|
|
+
|
|
|
+ public TbLinkTraf toEntity() {
|
|
|
+ TbLinkTraf entity = TbLinkTraf.builder()
|
|
|
+ .linkId(this.linkId)
|
|
|
+ .prcnDt(this.prcnDt)
|
|
|
+ .tfvl(this.tfvl)
|
|
|
+ .sped(this.sped)
|
|
|
+ .ocpyRate(this.ocpyRate)
|
|
|
+ .trvlHh(this.trvlHh)
|
|
|
+ .cmtrGradCd(this.cmtrGradCd)
|
|
|
+ .missYn(this.missYn)
|
|
|
+ .prcnSped(this.prcnSped)
|
|
|
+ .smthSped(this.smthSped)
|
|
|
+ .adjsSped(this.adjsSped)
|
|
|
+ .ptrnSped(this.ptrnSped)
|
|
|
+ .prcnSorc(this.prcnSorc)
|
|
|
+ .adjsSorc(this.adjsSorc)
|
|
|
+ .dataNum(this.dataNum)
|
|
|
+ .build();
|
|
|
+
|
|
|
+ return entity;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+}
|