ElectricDataBaseManger.h 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. #pragma once
  2. #include "YD_DBOperator.h"
  3. #include "DateBaseManger.h"
  4. #include "ElectricEqpmt_Breaker.h"
  5. #include "ElectricEqpmt_Line_110kV_BusLine.h"
  6. #include "ElectricEqpmt_Line_110kV_PowerLine_Input.h"
  7. #include "ElectricEqpmt_Line_35kV_BusLine.h"
  8. #include "ElectricEqpmt_Line_35kV_PowerLine_Input.h"
  9. #include "ElectricEqpmt_Line_35kV_PowerLine_Output.h"
  10. #include "ElectricEqpmt_Line_35kV_PowerLine_Feeder.h"
  11. #include "ElectricEqpmt_Line_DC_Positive_BusLine.h"
  12. #include "ElectricEqpmt_Line_DC_Negative_BusLine.h"
  13. #include "ElectricEqpmt_Line_TouchNet.h"
  14. #include "ElectricEqpmt_Line_Track.h"
  15. #include "ElectricEqpmt_Line_DC_PowerLine_Input.h"
  16. #include "ElectricEqpmt_Line_DC_PowerLine_Feeder.h"
  17. #include "ElectricEqpmt_Line_DC_ReturnLine.h"
  18. #include "ElectricEqpmt_Line_400V_BusLine.h"
  19. #include "ElectricEqpmt_Line_400V_PowerLine_Input.h"
  20. #include "ElectricEqpmt_Line_400V_PowerLine_Feeder.h"
  21. #include "ElectricEqpmt_Breaker_110kV_Input.h"
  22. #include "ElectricEqpmt_Breaker_110kV_Circuit.h"
  23. #include "ElectricEqpmt_Breaker_35kV.h"
  24. #include "ElectricEqpmt_Breaker_35kV_Input.h"
  25. #include "ElectricEqpmt_Breaker_35kV_Output.h"
  26. #include "ElectricEqpmt_Breaker_35kV_Feeder.h"
  27. #include "ElectricEqpmt_Breaker_35kV_Circuit.h"
  28. #include "ElectricEqpmt_Breaker_400V.h"
  29. #include "ElectricEqpmt_Breaker_400V_Input.h"
  30. #include "ElectricEqpmt_Breaker_400V_Feeder.h"
  31. #include "ElectricEqpmt_Breaker_400V_Circuit.h"
  32. #include "ElectricEqpmt_Breaker_DC.h"
  33. #include "ElectricEqpmt_Breaker_DC_Input.h"
  34. #include "ElectricEqpmt_Breaker_DC_Feeder.h"
  35. #include "ElectricEqpmt_IsolatingSwitch_ThreePosition.h"
  36. #include "ElectricEqpmt_IsolatingSwitch_Power.h"
  37. #include "ElectricEqpmt_IsolatingSwitch_Manual.h"
  38. #include "ElectricEqpmt_OVPD.h"
  39. #include "ElectricEqpmt_PowerBolt_110kV.h"
  40. #include "ElectricEqpmt_PowerBolt_35kV.h"
  41. #include "ElectricEqpmt_PowerBolt_400V.h"
  42. #include "ElectricEqpmt_Breaker_DC.h"
  43. #include "ElectricEqpmt_PowerBolt.h"
  44. #include "ElectricEqpmt_BreakHand.h"
  45. #include "ElectricEqpmt_IsolatingSwitch_Power.h"
  46. #include "ElectricEqpmt_Rectifier.h"
  47. #include "ElectricEqpmt_Line.h"
  48. #include "ElectricEqpmt_Transformer.h"
  49. #include "ElectricEqpmt_Transformer_Main.h"
  50. #include "ElectricEqpmt_Transformer_Power.h"
  51. #include "ElectricEqpmt_Transformer_Traction.h"
  52. #include "ElectricEqpmt_IsolatingSwitch_Manual.h"
  53. #include "ElectricEqpmt_EarthSwitch.h"
  54. #include "ACSysMG.h"
  55. #include "DCSysMG.h"
  56. #include "ElectricEqpmt_TelesignalisationMng.h"
  57. #include "ElectricEqpmt_ElcTurnOffAreaMng.h"
  58. #include "ElectricEqpmt_SettingGroup.h"
  59. #include "ElectricEqpmt_StationThreeLoadCut.h"
  60. #include "ElectricEqpmt_Station400VLoadMng.h"
  61. #include "ElectricEqpmt_ControlPermission.h"
  62. #include "ElectricEqpmt_BreakRailPotential.h"
  63. #include <string>
  64. #include <sstream>
  65. #include <iomanip>
  66. typedef struct tgSEqpmtDEqpmtID
  67. {
  68. string DEqpmtID ;
  69. string SEqpmtID ;
  70. }SEqpmtDEqpmtID;
  71. class ElectricDataBaseManger : public CDateBaseManger //此类的作用,类中各个函数的功能或作用?????
  72. {
  73. public:
  74. ElectricDataBaseManger(void);
  75. void setDDServerConfig(string configItem, string configValue);
  76. bool initDDServerConfigInfo();//电调的服务器模块配置 add by yangs
  77. bool initBaseEqpmtDefineInfo();//基础设备定义信息 add by yangs
  78. bool SavePowerValue(int trainid,int stationid,string eqpmtid,int datatype,double tvalue);
  79. bool InitDC_StationInfo(DCSysMG& DcSys);//?此函数的功能和作用?
  80. bool InitAc_PowerLineInfo(ACSysMG& AcSys);//?此函数的功能和作用?
  81. bool InitAc_PowerCalNodeInfo(ACSysMG& AcSys);//?此函数的功能和作用?
  82. bool InitAc_PowerLineSwitch(ACSysMG& AcSys); //读取交流侧支路关联开关编号
  83. bool GetEqpmt_TouchNet_FromDB(ELEEQPMTMAP* ElectricEqpmtMap,TOUCHNETMAP* TouchNetMap);//?此函数的功能和作用?
  84. bool GetPowerStationFromDB(ELECSTATIONMAP& stationmap);//?此函数的功能和作用?
  85. bool GetEqpmt_TouchNet_Track_Relation_FromDB(DCSysMG& DcSys);//?此函数的功能和作用?
  86. bool GetEqpmt_InPutRelation_FromDB(ELEEQPMTMAP* ElectricEqpmtMap);//?此函数的功能和作用?
  87. bool GetTrackRelationXDData(TrackRelationXDMAP& trackrelationxdmap); //读取接触轨轨道关系
  88. bool GetEqpmtsFromDB(ELEEQPMTMAP* ElectricEqpmtMap);
  89. bool GetEqpmtsBeeLineFromDB(/*_RecordsetPtr r_set,*/ELEEQPMTMAP* ElectricEqpmtMap); //获取直线元件
  90. bool GetEqpmtsThirdTrackBeeLineFromDB(/*_RecordsetPtr r_set,*/ELEEQPMTMAP* ElectricEqpmtMap); //获取直线元件
  91. bool GetEqpmtsNotThirdTrackBeeLineFromDB(/*_RecordsetPtr r_set,*/ELEEQPMTMAP* ElectricEqpmtMap); //获取直线元件
  92. bool GetEqpmtsNotUnionCtrlBeeLineFromDB(/*_RecordsetPtr r_set,*/ELEEQPMTMAP* ElectricEqpmtMap); //获取直线元件
  93. bool GetEqpmtsUnionCtrlBeeLineFromDB(/*_RecordsetPtr r_set,*/ELEEQPMTMAP* ElectricEqpmtMap); //获取直线元件
  94. bool GetEqpmtsPicUnitFromDB(/*_RecordsetPtr r_set,*/ELEEQPMTMAP* ElectricEqpmtMap); //获取图元元件
  95. bool GetEqpmtsProtects(); //保护元件
  96. bool GetEqpmtsActUnions(); //联控
  97. bool GetEqpmtsHander(); //手车
  98. bool GetEqpmtsCtrlType(); //控制类型
  99. bool GetEqpmtsProtectEqpmts(); //保护关系及其设备信息
  100. bool GetEqpmtsCtrlUnions(); //联控、联跳
  101. bool InitLogicRelationData(); //初始化逻辑关系数据
  102. bool UpdateEqpmtBaseInfo(std::shared_ptr<iDBReadSet> r_set,BaseElectricEqpmt* pUnit);
  103. bool GetPreEqpmtUnionCtrlMap();
  104. bool GetRepeatShutData();
  105. bool GetEqpmtAlarmInfoFromDB(ELCEQPMTALARMINFOMAP* ElcEqpmtAlarmInfoMap); //获取电调系统设备报警点表 xyx新增
  106. bool GetEqpmt_EarthSwitchRelation_FromDB(ELEEQPMTMAP* ElectricEqpmtMap);//获取接地开关相关元件信息 add by yangs
  107. //bool GetBreakAutoBolt();
  108. bool GetErrorToProtectData();
  109. bool UpdateProtectLockingEqpmt(ELEEQPMTMAP* ElectricEqpmtMap);
  110. bool UpdateFaultSceneLockingEqpmt(ELEEQPMTMAP* ElectricEqpmtMap);
  111. bool LoadTelesignalisationData( ElectricEqpmt_TelesignalisationMng& telesignalisationMng, ELEEQPMTMAP* ElectricEqpmtMap );
  112. bool LoadElcTurnOffAreaData( ELEEQPMTMAP* ElectricEqpmtMap, ElectricEqpmt_ElcTurnOffAreaMng& elcTurnOffAreaMng );
  113. bool LoadElcEqpmtAutoBoltLogic( ELEEQPMTMAP* ElectricEqpmtMap);
  114. bool LoadStation400VLoadMng( ElectricEqpmt_Station400VLoadMng* pStation400VLoadMng, ELEEQPMTMAP* ElectricEqpmtMap );
  115. bool AddProtectingEqpmt(ELEEQPMTMAP* ElectricEqpmtMap); //添加断路器开关所保护的故障设备,xyx
  116. //获取多组模式信息
  117. bool GetMultiModeData(MULTIMODEMAP& multimodemap);
  118. //模式数据加载DD
  119. bool GetModeInfoData(MODEDATAMAP& modemap,MODEIDDATAMAP& modeidmap );
  120. //断路器遥测量波动数据
  121. bool GetEqpmtTelemeteryValue(EQPMTTELEINFO& mapTeleInfo);
  122. //电环联合数据加载
  123. bool LoadElcToEnvRelaData(ELEEQPMTMAP* ElectricEqpmtMap, ElectricEqpmt_ElcTurnOffAreaMng& elcTurnOffAreaMng );
  124. //加载设备与IBP映射数据
  125. bool GetElectric_EqpmtStatusToIBPLight_FromDB(MapIndex_ElcEqpmtStatusToIBPLight& MIEqpmtStatusToIBPLight);
  126. //加载设备与IBP映射数据
  127. bool loadRealEqpmtRelationFromDB(ELEEQPMTMAP* ElectricEqpmtMap);
  128. typedef std::multimap<string,ProtectValue> ProtectValueMap;
  129. ProtectValueMap m_ProtectValueMap;
  130. AutoActUnionMAP m_AutoActUnionMap;
  131. InPutRelationDataMAP m_HanderRelationDataMap;
  132. EqpmtCtrlAreaRelationMAP m_EqpmtCtrlAreaRelationMap;
  133. ProtectEqpmtRelationMAP m_ProtectEqpmtRelationMap;
  134. ProtectEqpmtTypeMAP m_ProtectEqpmtTypeMap;
  135. EqpmtCtrlUnionMAP m_EqpmtCtrlUnionMap;
  136. std::map<string,string> m_PreEqpmtUnionCtrlMap;
  137. std::map<int,SEqpmtDEqpmtID> m_SEqpmtDEqpmtIDmap;
  138. std::string Make2IntKey(int param1, int param2) {
  139. std::stringstream ss;
  140. ss << std::setw(5) << std::setfill('0') << param1 << "_"
  141. << std::setw(5) << std::setfill('0') << param2;
  142. return ss.str();
  143. }
  144. void SetEqpmtStartID(int nstartid){m_nEqpmtStartID = nstartid;}
  145. void SetDataAssociationView(string strAssView){m_strDataAssociationView = strAssView;}
  146. void SetMainViewID(int nViewID_35kV, int nViewID_1500V, int nViewID_400V) {
  147. m_nMainViewID_35kV = nViewID_35kV;
  148. m_nMainViewID_1500V = nViewID_1500V;
  149. m_nMainViewID_400V = nViewID_400V;
  150. }
  151. public:
  152. ~ElectricDataBaseManger(void);
  153. protected:
  154. int m_nMainViewID_35kV;
  155. int m_nMainViewID_1500V;
  156. int m_nMainViewID_400V;
  157. int m_nEqpmtStartID; //设备起始编号
  158. string m_strDataAssociationView; //数据关联视图
  159. };