IfscDto.java 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. package com.its.op.model.dto.database;
  2. import com.its.op.global.CodeManager;
  3. import com.its.op.global.NodeManager;
  4. import com.its.op.model.entity.database.Ifsc;
  5. import lombok.*;
  6. import java.io.Serializable;
  7. public class IfscDto implements Serializable {
  8. @Getter
  9. public static class IfscInfo {
  10. private final Long IFSC_ID; // N NUMBER(10) N 정보제공구간 ID
  11. private final String IFSC_NM; // N VARCHAR2(100) Y 정보제공구간 명
  12. private final String DRCT_CD; // N VARCHAR2(7) Y 방향 코드
  13. private final String STRT_NM; // N VARCHAR2(100) Y 시점 명
  14. private final String END_NM; // N VARCHAR2(100) Y 종점 명
  15. private final Integer SECT_LNGT; // N NUMBER(5) Y 0 구간 길이
  16. private final String EXTR_CNCT_SECT_YN; // N CHAR(1) Y 'N' 외부 연계 구간 여부
  17. private final String RMRK; // N VARCHAR2(600) Y 비고
  18. private final Long F_NODE_ID; // N NUMBER(10) Y 시작 노드 ID
  19. private final Long T_NODE_ID; // N NUMBER(10) Y 종료 노드 ID
  20. private final String SECT_GRAD_CD; // N VARCHAR2(7) Y 구간 등급 코드
  21. private final String AREA_CD; // N VARCHAR2(7) Y 지역 코드
  22. private final String DEL_YN; // N CHAR(1) Y 'N' 삭제 여부
  23. private final String FROM_NODE;
  24. private final String TO_NODE;
  25. private final String DRCT_CD_DESC;
  26. private final String SECT_GRAD_CD_DESC;
  27. public IfscInfo(Ifsc entity) {
  28. this.IFSC_ID = entity.getIFSC_ID();
  29. this.IFSC_NM = entity.getIFSC_NM();
  30. this.DRCT_CD = entity.getDRCT_CD();
  31. this.STRT_NM = entity.getSTRT_NM();
  32. this.END_NM = entity.getEND_NM();
  33. this.SECT_LNGT = entity.getSECT_LNGT();
  34. this.EXTR_CNCT_SECT_YN = entity.getEXTR_CNCT_SECT_YN();
  35. this.RMRK = entity.getRMRK();
  36. this.F_NODE_ID = entity.getF_NODE_ID();
  37. this.T_NODE_ID = entity.getT_NODE_ID();
  38. this.SECT_GRAD_CD = entity.getSECT_GRAD_CD();
  39. this.AREA_CD = entity.getAREA_CD();
  40. this.DEL_YN = entity.getDEL_YN();
  41. this.FROM_NODE = NodeManager.getNodeName(this.F_NODE_ID);
  42. this.TO_NODE = NodeManager.getNodeName(this.T_NODE_ID);
  43. this.DRCT_CD_DESC = CodeManager.getCodeDesc(CodeManager.DRCT_CD, this.DRCT_CD);
  44. this.SECT_GRAD_CD_DESC = CodeManager.getCodeDesc(CodeManager.SECT_GRAD_CD, this.SECT_GRAD_CD);
  45. }
  46. }
  47. @Getter
  48. @Setter
  49. @ToString
  50. @NoArgsConstructor(access = AccessLevel.PROTECTED)
  51. public static class IfscNameUpdateReq {
  52. private String IFSC_NM;
  53. private String STRT_NM;
  54. private String END_NM;
  55. @Builder
  56. public IfscNameUpdateReq(String IFSC_NM, String STRT_NM, String END_NM) {
  57. this.IFSC_NM = IFSC_NM;
  58. this.STRT_NM = STRT_NM;
  59. this.END_NM = END_NM;
  60. }
  61. }
  62. }