datacenter.api 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. syntax = "v1"
  2. type DcWorkingUf{
  3. Id int64 `json:"id"`
  4. ProjectId int64 `json:"project_id"`
  5. DeviceCode string `json:"device_code"`
  6. WaterTemperature float64 `json:"water_temperature"` // 水温 摄氏度
  7. FeedFlow float64 `json:"feed_flow"` // 进水流量
  8. ConFlow float64 `json:"con_flow"` // 浓水流量
  9. ProductFlow float64 `json:"product_flow"` // 产水流量
  10. FeedPressure float64 `json:"feed_pressure"` // 进水压力
  11. ConPressure float64 `json:"con_pressure"` // 浓水压力
  12. ProductPressure float64 `json:"product_pressure"` // 产水压力
  13. Tmp float64 `json:"tmp"` // 跨膜压差
  14. Flux float64 `json:"flux"` // 膜通量
  15. FeedWqTurbidity float64 `json:"feed_wq_turbidity"` // 进水浊度
  16. FeedWqPh int64 `json:"feed_wq_ph"` // 进水 PH 值
  17. ProductWqPh int64 `json:"product_wq_ph"` // 产水 PH 值
  18. FeedWqAl float64 `json:"feed_wq_al"` // 进水水质:铝
  19. ProductWqAl float64 `json:"product_wq_al"` // 产水水质:铝
  20. FeedWqFe float64 `json:"feed_wq_fe"` // 进水水质:铁
  21. ProductWqFe float64 `json:"product_wq_fe"` // 产水水质:铁
  22. FeedWqMn float64 `json:"feed_wq_mn"` // 进水水质:锰
  23. ProductWqMn float64 `json:"product_wq_mn"` // 产水水质:锰
  24. FeedWqSio2 float64 `json:"feed_wq_sio2"` // 进水水质:二氧化硅
  25. ProductWqSio2 float64 `json:"product_wq_sio2"` // 产水水质:二氧化硅
  26. FeedWqCod float64 `json:"feed_wq_cod"` // 进水水质:COD
  27. ProductWqCod float64 `json:"product_wq_cod"` // 产水水质:COD
  28. FeedWqP float64 `json:"feed_wq_p"` // 进水水质:磷
  29. ProductWqP float64 `json:"product_wq_p"` // 产水水质:磷
  30. Step int64 `json:"step"` // 设备当前步序值
  31. CTime string `json:"c_time"`
  32. }
  33. type DcWorkingRo{
  34. Id int64 `json:"id"`
  35. ProjectId int64 `json:"project_id"`
  36. DeviceCode string `json:"device_code"`
  37. WaterTemperature float64 `json:"water_temperature"` // 水温 摄氏度
  38. FeedFlow1St float64 `json:"feed_flow_1st"` // 一段进水流量
  39. ConFlow1St float64 `json:"con_flow_1st"` // 一段浓水流量
  40. ProductFlow1St float64 `json:"product_flow_1st"` // 一段产水流量
  41. FeedPressure1St float64 `json:"feed_pressure_1st"` // 一段进水压力
  42. ConPressure1St float64 `json:"con_pressure_1st"` // 一段浓水压力
  43. ProductPressure1St float64 `json:"product_pressure_1st"` // 一段产水压力
  44. Tmp1St float64 `json:"tmp_1st"` // 一段跨膜压差
  45. Flux1St float64 `json:"flux_1st"` // 一段膜通量
  46. Permeability1St float64 `json:"permeability_1st"` // 一段渗透率
  47. FeedFlow2Nd float64 `json:"feed_flow_2nd"` // 二段进水流量
  48. ConFlow2Nd float64 `json:"con_flow_2nd"` // 二段浓水流量
  49. ProductFlow2Nd float64 `json:"product_flow_2nd"` // 二段产水流量
  50. FeedPressure2Nd float64 `json:"feed_pressure_2nd"` // 二段进水压力
  51. ConPressure2Nd float64 `json:"con_pressure_2nd"` // 二段浓水压力
  52. ProductPressure2Nd float64 `json:"product_pressure_2nd"` // 二段产水压力
  53. Tmp2Nd float64 `json:"tmp_2nd"` // 二段压差
  54. Flux2Nd float64 `json:"flux_2nd"` // 二段通量
  55. Permeability2Nd float64 `json:"permeability_2nd"` // 二段渗透率
  56. FeedFlow3Th float64 `json:"feed_flow_3th"` // 三段进水流量
  57. ConFlow3Th float64 `json:"con_flow_3th"` // 三段浓水流量
  58. ProductFlow3Th float64 `json:"product_flow_3th"` // 三段产水流量
  59. FeedPressure3Th float64 `json:"feed_pressure_3th"` // 三段进水压力
  60. ConPressure3Th float64 `json:"con_pressure_3th"` // 三段浓水压力
  61. ProductPressure3Th float64 `json:"product_pressure_3th"` // 三段产水压力
  62. Tmp3Th float64 `json:"tmp_3th"` // 三段压差
  63. Flux3Th float64 `json:"flux_3th"` // 三段通量
  64. Permeability3Th float64 `json:"permeability_3th"` // 三段渗透率
  65. FeedWqTurbidity float64 `json:"feed_wq_turbidity"` // 进水浊度
  66. FeedWqPh int64 `json:"feed_wq_ph"` // 进水 PH 值
  67. ProductWqPh int64 `json:"product_wq_ph"` // 产水 PH 值
  68. FeedWqAl float64 `json:"feed_wq_al"` // 进水水质:铝
  69. ProductWqAl float64 `json:"product_wq_al"` // 产水水质:铝
  70. FeedWqFe float64 `json:"feed_wq_fe"` // 进水水质:铁
  71. ProductWqFe float64 `json:"product_wq_fe"` // 产水水质:铁
  72. FeedWqMn float64 `json:"feed_wq_mn"` // 进水水质:锰
  73. ProductWqMn float64 `json:"product_wq_mn"` // 产水水质:锰
  74. FeedWqSio2 float64 `json:"feed_wq_sio2"` // 进水水质:二氧化硅
  75. ProductWqSio2 float64 `json:"product_wq_sio2"` // 产水水质:二氧化硅
  76. FeedWqCod float64 `json:"feed_wq_cod"` // 进水水质:COD
  77. ProductWqCod float64 `json:"product_wq_cod"` // 产水水质:COD
  78. FeedWqP float64 `json:"feed_wq_p"` // 进水水质:磷
  79. ProductWqP float64 `json:"product_wq_p"` // 产水水质:磷
  80. Step int64 `json:"step"` // 设备当前步序值
  81. CTime string `json:"c_time"`
  82. }
  83. type DcWorkingChest {
  84. Id int64 `json:"id"`
  85. ProjectId int64 `json:"project_id"`
  86. DeviceCode string `json:"device_code"`
  87. Switch int64 `json:"switch"` // 药箱液位开关 0: 关 1: 开
  88. Level float64 `json:"level"` // 液位高度
  89. AgitatorStatus int64 `json:"agitator_status"` // 搅拌器运行状态 0: 未运行 1:运行中
  90. AgitatorDuration int64 `json:"agitator_duration"` // 搅拌器运行时长
  91. AgitatorFaultStatus int64 `json:"agitator_fault_status"` // 搅拌器故障状态 0:正常 1:故障
  92. CTime string `json:"c_time"`
  93. }
  94. type DcWorkingPump {
  95. Id int64 `json:"id"`
  96. ProjectId int64 `json:"project_id"`
  97. DeviceCode string `json:"device_code"`
  98. FeedPressure float64 `json:"feed_pressure"` // 进水压力
  99. OutPressure float64 `json:"out_pressure"` // 出水压力
  100. Duration int64 `json:"duration"` // 运行时长 单位 s
  101. Current float64 `json:"current"` // 运行电流
  102. Frequency float64 `json:"frequency"` // 运行频率
  103. Lift float64 `json:"lift"` // 工作扬程
  104. Efficiency float64 `json:"efficiency"` // 运行效率
  105. RunStatus int64 `json:"run_status"` // 运行状态 0: 停机 1: 运行正常
  106. FaultStatus int64 `json:"fault_status"` // 故障状态 0: 正常 1: 故障
  107. CTime string `json:"c_time"`
  108. }
  109. type DcWorkingValve {
  110. Id int64 `json:"id"`
  111. ProjectId int64 `json:"project_id"`
  112. DeviceCode string `json:"device_code"`
  113. Adjust int64 `json:"adjust"` // 是否为调节阀门 0: 否 1: 是
  114. Opening float64 `json:"opening"` // 当前阀门的开度
  115. Closed int64 `json:"closed"` // 关到位 全关 0: 否 1: 是
  116. Opened int64 `json:"opened"` // 开到位 开到 设置的开度 0: 否 1: 是
  117. FaultStatus int64 `json:"fault_status"` // 是否故障 0: 否 1: 是
  118. CTime string `json:"c_time"`
  119. }
  120. type (
  121. DcWorkingReq{
  122. ProjectId int64 `form:"project_id"`
  123. DeviceCode string `form:"device_code"`
  124. }
  125. WorkingUfResp{
  126. Info *DcWorkingUf `json:"info"`
  127. }
  128. WorkingRoResp{
  129. Info *DcWorkingRo `json:"info"`
  130. }
  131. WorkingChestResp{
  132. Info *DcWorkingChest `json:"info"`
  133. }
  134. WorkingValveResp{
  135. Info *DcWorkingValve `json:"info"`
  136. }
  137. WorkingPumpResp{
  138. Info *DcWorkingPump `json:"info"`
  139. }
  140. )
  141. type (
  142. ItemHistoryData {
  143. ProjectId int64 `json:"project_id"`
  144. ItemName string `json:"item_name"`
  145. Val float64 `json:"val"`
  146. CTime string `json:"h_time"`
  147. }
  148. MultiAddItemHistoryDataReq{
  149. List []*ItemHistoryData `json:"list"`
  150. }
  151. MultiAddItemHistoryDataResq{}
  152. )