CDSTrafficOprLinkF.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. //---------------------------------------------------------------------------
  2. #ifndef CDSTrafficOprLinkFH
  3. #define CDSTrafficOprLinkFH
  4. //---------------------------------------------------------------------------
  5. #include <Classes.hpp>
  6. #include <ADODB.hpp>
  7. #include <DB.hpp>
  8. #include "cxCustomData.hpp"
  9. #include "LibSTLF.hpp"
  10. #include "ITSDbF.h"
  11. //---------------------------------------------------------------------------
  12. /*
  13. * TrafficOprLink class
  14. */
  15. class TItsTrafficOprLink
  16. {
  17. public:
  18. TItsTrafficOprLink();
  19. virtual ~TItsTrafficOprLink();
  20. void Clear();
  21. private:
  22. int FEditMode;
  23. bool FModified;
  24. bool FCompleted;
  25. public:
  26. String FLINK_ID; // 링크ID
  27. String FCRTN_DT; // 생성 일시
  28. String FAPLY_STRT_DT; // 적용 시작 일시
  29. String FAPLY_END_DT; // 적용 종료 일시
  30. String FTFVL; // 교통량
  31. String FSPED; // 속도
  32. String FOCPY_RATE; // 점유율
  33. String FTRVL_HH; // 통행 시간
  34. /*
  35. LINK_ID NUMBER(10) NOT NULL,
  36. CRTN_DT VARCHAR2(14) NOT NULL,
  37. APLY_STRT_DT VARCHAR2(14),
  38. APLY_END_DT VARCHAR2(14),
  39. TFVL NUMBER(6) DEFAULT 0,
  40. SPED NUMBER(3) DEFAULT 0,
  41. OCPY_RATE NUMBER(5,2) DEFAULT 0,
  42. TRVL_HH NUMBER(6) DEFAULT 0
  43. comment on table TB_LINK_SYOP_TRAF is '링크 운영자 소통상황';
  44. comment on column TB_LINK_SYOP_TRAF.link_id is '링크ID';
  45. comment on column TB_LINK_SYOP_TRAF.crtn_dt is '생성 일시';
  46. comment on column TB_LINK_SYOP_TRAF.aply_strt_dt is '적용 시작 일시';
  47. comment on column TB_LINK_SYOP_TRAF.aply_end_dt is '적용 종료 일시';
  48. comment on column TB_LINK_SYOP_TRAF.tfvl is '교통량';
  49. comment on column TB_LINK_SYOP_TRAF.sped is '속도';
  50. comment on column TB_LINK_SYOP_TRAF.ocpy_rate is '점유 율';
  51. comment on column TB_LINK_SYOP_TRAF.trvl_hh is '통행 시간';
  52. */
  53. int FGridIndex; // 메인폼에 뿌려지는 그리드 인덱스
  54. void SetValue(String &AOrgValue, String AValue);
  55. protected:
  56. void SetFLINK_ID(String AValue);
  57. void SetFCRTN_DT(String AValue);
  58. void SetFAPLY_STRT_DT(String AValue);
  59. void SetFAPLY_END_DT(String AValue);
  60. void SetFTFVL(String AValue);
  61. void SetFSPED(String AValue);
  62. void SetFOCPY_RATE(String AValue);
  63. void SetFTRVL_HH(String AValue);
  64. public:
  65. __property bool Modified = {read = FModified};
  66. __property bool Completed = {read = FCompleted, write = FCompleted};
  67. __property int EditMode = {read = FEditMode, write = FEditMode };
  68. __property String LINK_ID = {read = FLINK_ID, write = SetFLINK_ID };
  69. __property String CRTN_DT = {read = FCRTN_DT, write = SetFCRTN_DT };
  70. __property String APLY_STRT_DT = {read = FAPLY_STRT_DT, write = SetFAPLY_STRT_DT };
  71. __property String APLY_END_DT = {read = FAPLY_END_DT, write = SetFAPLY_END_DT };
  72. __property String TFVL = {read = FTFVL, write = SetFTFVL };
  73. __property String SPED = {read = FSPED, write = SetFSPED };
  74. __property String OCPY_RATE = {read = FOCPY_RATE, write = SetFOCPY_RATE };
  75. __property String TRVL_HH = {read = FTRVL_HH, write = SetFTRVL_HH };
  76. __property int GridIndex = {read = FGridIndex, write = FGridIndex };
  77. };
  78. //---------------------------------------------------------------------------
  79. /*
  80. * TrafficOprLink Manager
  81. */
  82. class TItsTrafficOprLinkManager
  83. {
  84. public:
  85. TItsTrafficOprLinkManager();
  86. virtual ~TItsTrafficOprLinkManager();
  87. public:
  88. int FDataSeq;
  89. ListMap<TItsTrafficOprLink> FLists;
  90. public:
  91. bool LoadFromDb(TADOConnection *ADbConn=NULL);
  92. bool AllDelete(TADOConnection *ADbConn=NULL);
  93. bool AllApply(int ALinkLevel, TADOConnection *ADbConn=NULL);
  94. };
  95. //---------------------------------------------------------------------------
  96. extern TItsTrafficOprLinkManager *ItsTrafficOprLinkManager;
  97. //---------------------------------------------------------------------------
  98. #endif