organization.proto 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706
  1. syntax = "proto3";
  2. package pb;
  3. option go_package = "./pb";
  4. message Pagination {
  5. uint32 current = 1;
  6. uint32 pageSize = 2;
  7. uint32 total = 3;
  8. }
  9. message AppInfo {
  10. int64 id = 1;
  11. string app_name = 2;
  12. repeated int64 project_ids = 3;
  13. string secret = 4;
  14. int64 status = 5;
  15. string expire_at = 6;
  16. string c_time = 7;
  17. }
  18. message DcWorkingReq{
  19. int64 project_id = 1;
  20. string device_code = 2;
  21. string stime = 3; // c_time的搜索
  22. string etime = 4; // c_time的搜索
  23. int64 page = 5;
  24. int64 page_size = 6;
  25. string order = 7; // 排序字段及方向 例: id desc
  26. }
  27. message WorkingMf{
  28. // @gotags: json:"id"
  29. int64 id = 1;
  30. // @gotags: json:"project_id"
  31. int64 project_id = 2;
  32. // @gotags: json:"device_code"
  33. string device_code = 3;
  34. // @gotags: json:"water_temperature"
  35. double water_temperature = 4; // 水温 摄氏度
  36. // @gotags: json:"feed_flow"
  37. double feed_flow = 5; // 进水流量
  38. // @gotags: json:"con_flow"
  39. double con_flow = 6; // 浓水流量
  40. // @gotags: json:"product_flow"
  41. double product_flow = 7; // 产水流量
  42. // @gotags: json:"feed_pressure"
  43. double feed_pressure = 8; // 进水压力
  44. // @gotags: json:"con_pressure"
  45. double con_pressure = 9; // 浓水压力
  46. // @gotags: json:"product_pressure"
  47. double product_pressure = 10; // 产水压力
  48. // @gotags: json:"tmp"
  49. double tmp = 11; // 跨膜压差
  50. // @gotags: json:"flux"
  51. double flux = 12; // 膜通量
  52. // @gotags: json:"feed_wq_turbidity"
  53. double feed_wq_turbidity = 13; // 进水浊度
  54. // @gotags: json:"feed_wq_ph"
  55. int64 feed_wq_ph = 14; // 进水 PH 值
  56. // @gotags: json:"product_wq_ph"
  57. int64 product_wq_ph = 15; // 产水 PH 值
  58. // @gotags: json:"feed_wq_al"
  59. double feed_wq_al = 16; // 进水水质:铝
  60. // @gotags: json:"product_wq_al"
  61. double product_wq_al = 17; // 产水水质:铝
  62. // @gotags: json:"feed_wq_fe"
  63. double feed_wq_fe = 18; // 进水水质:铁
  64. // @gotags: json:"product_wq_fe"
  65. double product_wq_fe = 19; // 产水水质:铁
  66. // @gotags: json:"feed_wq_mn"
  67. double feed_wq_mn = 20; // 进水水质:锰
  68. // @gotags: json:"product_wq_mn"
  69. double product_wq_mn = 21; // 产水水质:锰
  70. // @gotags: json:"feed_wq_sio2"
  71. double feed_wq_sio2 = 22; // 进水水质:二氧化硅
  72. // @gotags: json:"product_wq_sio2"
  73. double product_wq_sio2 = 23; // 产水水质:二氧化硅
  74. // @gotags: json:"feed_wq_cod"
  75. double feed_wq_cod = 24; // 进水水质:COD
  76. // @gotags: json:"product_wq_cod"
  77. double product_wq_cod = 25; // 产水水质:COD
  78. // @gotags: json:"feed_wq_p"
  79. double feed_wq_p = 26; // 进水水质:磷
  80. // @gotags: json:"product_wq_p"
  81. double product_wq_p = 27; // 产水水质:磷
  82. // @gotags: json:"step"
  83. int64 step = 28; // 设备当前步序值
  84. // @gotags: json:"c_time"
  85. string c_time = 29;
  86. }
  87. message WorkingUf{
  88. // @gotags: json:"id"
  89. int64 id = 1;
  90. // @gotags: json:"project_id"
  91. int64 project_id = 2;
  92. // @gotags: json:"device_code"
  93. string device_code = 3;
  94. // @gotags: json:"water_temperature"
  95. double water_temperature = 4; // 水温 摄氏度
  96. // @gotags: json:"feed_flow"
  97. double feed_flow = 5; // 进水流量
  98. // @gotags: json:"con_flow"
  99. double con_flow = 6; // 浓水流量
  100. // @gotags: json:"product_flow"
  101. double product_flow = 7; // 产水流量
  102. // @gotags: json:"feed_pressure"
  103. double feed_pressure = 8; // 进水压力
  104. // @gotags: json:"con_pressure"
  105. double con_pressure = 9; // 浓水压力
  106. // @gotags: json:"product_pressure"
  107. double product_pressure = 10; // 产水压力
  108. // @gotags: json:"tmp"
  109. double tmp = 11; // 跨膜压差
  110. // @gotags: json:"flux"
  111. double flux = 12; // 膜通量
  112. // @gotags: json:"permeability"
  113. double permeability = 32; // 渗透率
  114. // @gotags: json:"feed_wq_turbidity"
  115. double feed_wq_turbidity = 13; // 进水浊度
  116. // @gotags: json:"feed_wq_ph"
  117. int64 feed_wq_ph = 14; // 进水 PH 值
  118. // @gotags: json:"product_wq_ph"
  119. int64 product_wq_ph = 15; // 产水 PH 值
  120. // @gotags: json:"feed_wq_al"
  121. double feed_wq_al = 16; // 进水水质:铝
  122. // @gotags: json:"product_wq_al"
  123. double product_wq_al = 17; // 产水水质:铝
  124. // @gotags: json:"feed_wq_fe"
  125. double feed_wq_fe = 18; // 进水水质:铁
  126. // @gotags: json:"product_wq_fe"
  127. double product_wq_fe = 19; // 产水水质:铁
  128. // @gotags: json:"feed_wq_mn"
  129. double feed_wq_mn = 20; // 进水水质:锰
  130. // @gotags: json:"product_wq_mn"
  131. double product_wq_mn = 21; // 产水水质:锰
  132. // @gotags: json:"feed_wq_sio2"
  133. double feed_wq_sio2 = 22; // 进水水质:二氧化硅
  134. // @gotags: json:"product_wq_sio2"
  135. double product_wq_sio2 = 23; // 产水水质:二氧化硅
  136. // @gotags: json:"feed_wq_cod"
  137. double feed_wq_cod = 24; // 进水水质:COD
  138. // @gotags: json:"product_wq_cod"
  139. double product_wq_cod = 25; // 产水水质:COD
  140. // @gotags: json:"feed_wq_p"
  141. double feed_wq_p = 26; // 进水水质:磷
  142. // @gotags: json:"product_wq_p"
  143. double product_wq_p = 27; // 产水水质:磷
  144. // @gotags: json:"step"
  145. int64 step = 28; // 设备当前步序值
  146. // @gotags: json:"filter_time"
  147. double filter_time = 29;
  148. // @gotags: json:"filter_cycle"
  149. int64 filter_cycle = 30;
  150. // @gotags: json:"c_time"
  151. string c_time = 31;
  152. }
  153. message WorkingNf{
  154. // gotags: json:"id"
  155. int64 id = 1;
  156. // gotags: json:"project_id"
  157. int64 project_id = 2;
  158. // gotags: json:"device_code"
  159. string device_code = 3;
  160. // gotags: json:"water_temperature"
  161. double water_temperature = 4; // 水温 摄氏度
  162. // gotags: json:"feed_flow_1st"
  163. double feed_flow_1st = 5; // 一段进水流量
  164. // gotags: json:"con_flow_1st"
  165. double con_flow_1st = 6; // 一段浓水流量
  166. // gotags: json:"product_flow_1st"
  167. double product_flow_1st = 7; // 一段产水流量
  168. // gotags: json:"feed_pressure_1st"
  169. double feed_pressure_1st = 8; // 一段进水压力
  170. // gotags: json:"con_pressure_1st"
  171. double con_pressure_1st = 9; // 一段浓水压力
  172. // gotags: json:"product_pressure_1st"
  173. double product_pressure_1st = 10; // 一段产水压力
  174. // gotags: json:"tmp_1st"
  175. double tmp_1st = 11; // 一段跨膜压差
  176. // gotags: json:"flux_1st"
  177. double flux_1st = 12; // 一段膜通量
  178. // gotags: json:"permeability_1st"
  179. double permeability_1st = 13; // 一段渗透率
  180. // gotags: json:"feed_flow_2nd"
  181. double feed_flow_2nd = 14; // 二段进水流量
  182. // gotags: json:"con_flow_2nd"
  183. double con_flow_2nd = 15; // 二段浓水流量
  184. // gotags: json:"product_flow_2nd"
  185. double product_flow_2nd = 16; // 二段产水流量
  186. // gotags: json:"feed_pressure_2nd"
  187. double feed_pressure_2nd = 17; // 二段进水压力
  188. // gotags: json:"con_pressure_2nd"
  189. double con_pressure_2nd = 18; // 二段浓水压力
  190. // gotags: json:"product_pressure_2nd"
  191. double product_pressure_2nd = 19; // 二段产水压力
  192. // gotags: json:"tmp_2nd"
  193. double tmp_2nd = 20; // 二段压差
  194. // gotags: json:"flux_2nd"
  195. double flux_2nd = 21; // 二段通量
  196. // gotags: json:"permeability_2nd"
  197. double permeability_2nd = 22; // 二段渗透率
  198. // gotags: json:"feed_flow_3th"
  199. double feed_flow_3th = 23; // 三段进水流量
  200. // gotags: json:"con_flow_3th"
  201. double con_flow_3th = 24; // 三段浓水流量
  202. // gotags: json:"product_flow_3th"
  203. double product_flow_3th = 25; // 三段产水流量
  204. // gotags: json:"feed_pressure_3th"
  205. double feed_pressure_3th = 26; // 三段进水压力
  206. // gotags: json:"con_pressure_3th"
  207. double con_pressure_3th = 27; // 三段浓水压力
  208. // gotags: json:"product_pressure_3th"
  209. double product_pressure_3th = 28; // 三段产水压力
  210. // gotags: json:"tmp_3th"
  211. double tmp_3th = 29; // 三段压差
  212. // gotags: json:"flux_3th"
  213. double flux_3th = 30; // 三段通量
  214. // gotags: json:"permeability_3th"
  215. double permeability_3th = 31; // 三段渗透率
  216. // gotags: json:"feed_wq_turbidity"
  217. double feed_wq_turbidity = 32; // 进水浊度
  218. // gotags: json:"feed_wq_ph"
  219. int64 feed_wq_ph = 33; // 进水 PH 值
  220. // gotags: json:"product_wq_ph"
  221. int64 product_wq_ph = 34; // 产水 PH 值
  222. // gotags: json:"feed_wq_al"
  223. double feed_wq_al = 35; // 进水水质:铝
  224. // gotags: json:"product_wq_al"
  225. double product_wq_al = 36; // 产水水质:铝
  226. // gotags: json:"feed_wq_fe"
  227. double feed_wq_fe = 37; // 进水水质:铁
  228. // gotags: json:"product_wq_fe"
  229. double product_wq_fe = 38; // 产水水质:铁
  230. // gotags: json:"feed_wq_mn"
  231. double feed_wq_mn = 39; // 进水水质:锰
  232. // gotags: json:"product_wq_mn"
  233. double product_wq_mn = 40; // 产水水质:锰
  234. // gotags: json:"feed_wq_sio2"
  235. double feed_wq_sio2 = 41; // 进水水质:二氧化硅
  236. // gotags: json:"product_wq_sio2"
  237. double product_wq_sio2 = 42; // 产水水质:二氧化硅
  238. // gotags: json:"feed_wq_cod"
  239. double feed_wq_cod = 43; // 进水水质:COD
  240. // gotags: json:"product_wq_cod"
  241. double product_wq_cod = 44; // 产水水质:COD
  242. // gotags: json:"feed_wq_p"
  243. double feed_wq_p = 45; // 进水水质:磷
  244. // gotags: json:"product_wq_p"
  245. double product_wq_p = 46; // 产水水质:磷
  246. // gotags: json:"step"
  247. int64 step = 47; // 设备当前步序值
  248. // gotags: json:"c_time"
  249. string c_time = 48;
  250. }
  251. message WorkingRo{
  252. // gotags: json:"id"
  253. int64 id = 1;
  254. // gotags: json:"project_id"
  255. int64 project_id = 2;
  256. // gotags: json:"device_code"
  257. string device_code = 3;
  258. // gotags: json:"water_temperature"
  259. double water_temperature = 4; // 水温 摄氏度
  260. // gotags: json:"feed_flow_1st"
  261. double feed_flow_1st = 5; // 一段进水流量
  262. // gotags: json:"con_flow_1st"
  263. double con_flow_1st = 6; // 一段浓水流量
  264. // gotags: json:"product_flow_1st"
  265. double product_flow_1st = 7; // 一段产水流量
  266. // gotags: json:"feed_pressure_1st"
  267. double feed_pressure_1st = 8; // 一段进水压力
  268. // gotags: json:"con_pressure_1st"
  269. double con_pressure_1st = 9; // 一段浓水压力
  270. // gotags: json:"product_pressure_1st"
  271. double product_pressure_1st = 10; // 一段产水压力
  272. // gotags: json:"tmp_1st"
  273. double tmp_1st = 11; // 一段跨膜压差
  274. // gotags: json:"flux_1st"
  275. double flux_1st = 12; // 一段膜通量
  276. // gotags: json:"permeability_1st"
  277. double permeability_1st = 13; // 一段渗透率
  278. // gotags: json:"feed_flow_2nd"
  279. double feed_flow_2nd = 14; // 二段进水流量
  280. // gotags: json:"con_flow_2nd"
  281. double con_flow_2nd = 15; // 二段浓水流量
  282. // gotags: json:"product_flow_2nd"
  283. double product_flow_2nd = 16; // 二段产水流量
  284. // gotags: json:"feed_pressure_2nd"
  285. double feed_pressure_2nd = 17; // 二段进水压力
  286. // gotags: json:"con_pressure_2nd"
  287. double con_pressure_2nd = 18; // 二段浓水压力
  288. // gotags: json:"product_pressure_2nd"
  289. double product_pressure_2nd = 19; // 二段产水压力
  290. // gotags: json:"tmp_2nd"
  291. double tmp_2nd = 20; // 二段压差
  292. // gotags: json:"flux_2nd"
  293. double flux_2nd = 21; // 二段通量
  294. // gotags: json:"permeability_2nd"
  295. double permeability_2nd = 22; // 二段渗透率
  296. // gotags: json:"feed_flow_3th"
  297. double feed_flow_3th = 23; // 三段进水流量
  298. // gotags: json:"con_flow_3th"
  299. double con_flow_3th = 24; // 三段浓水流量
  300. // gotags: json:"product_flow_3th"
  301. double product_flow_3th = 25; // 三段产水流量
  302. // gotags: json:"feed_pressure_3th"
  303. double feed_pressure_3th = 26; // 三段进水压力
  304. // gotags: json:"con_pressure_3th"
  305. double con_pressure_3th = 27; // 三段浓水压力
  306. // gotags: json:"product_pressure_3th"
  307. double product_pressure_3th = 28; // 三段产水压力
  308. // gotags: json:"tmp_3th"
  309. double tmp_3th = 29; // 三段压差
  310. // gotags: json:"flux_3th"
  311. double flux_3th = 30; // 三段通量
  312. // gotags: json:"permeability_3th"
  313. double permeability_3th = 31; // 三段渗透率
  314. // gotags: json:"feed_wq_turbidity"
  315. double feed_wq_turbidity = 32; // 进水浊度
  316. // gotags: json:"feed_wq_ph"
  317. int64 feed_wq_ph = 33; // 进水 PH 值
  318. // gotags: json:"product_wq_ph"
  319. int64 product_wq_ph = 34; // 产水 PH 值
  320. // gotags: json:"feed_wq_al"
  321. double feed_wq_al = 35; // 进水水质:铝
  322. // gotags: json:"product_wq_al"
  323. double product_wq_al = 36; // 产水水质:铝
  324. // gotags: json:"feed_wq_fe"
  325. double feed_wq_fe = 37; // 进水水质:铁
  326. // gotags: json:"product_wq_fe"
  327. double product_wq_fe = 38; // 产水水质:铁
  328. // gotags: json:"feed_wq_mn"
  329. double feed_wq_mn = 39; // 进水水质:锰
  330. // gotags: json:"product_wq_mn"
  331. double product_wq_mn = 40; // 产水水质:锰
  332. // gotags: json:"feed_wq_sio2"
  333. double feed_wq_sio2 = 41; // 进水水质:二氧化硅
  334. // gotags: json:"product_wq_sio2"
  335. double product_wq_sio2 = 42; // 产水水质:二氧化硅
  336. // gotags: json:"feed_wq_cod"
  337. double feed_wq_cod = 43; // 进水水质:COD
  338. // gotags: json:"product_wq_cod"
  339. double product_wq_cod = 44; // 产水水质:COD
  340. // gotags: json:"feed_wq_p"
  341. double feed_wq_p = 45; // 进水水质:磷
  342. // gotags: json:"product_wq_p"
  343. double product_wq_p = 46; // 产水水质:磷
  344. // gotags: json:"step"
  345. int64 step = 47; // 设备当前步序值
  346. // gotags: json:"c_time"
  347. string c_time = 48;
  348. }
  349. message WorkingChest {
  350. // @gotags: json:"id"
  351. int64 id = 1;
  352. // @gotags: json:"project_id"
  353. int64 project_id = 2;
  354. // @gotags: json:"device_code"
  355. string device_code = 3;
  356. // @gotags: json:"switch"
  357. int64 switch = 4; // 药箱液位开关 0: 关 1: 开
  358. // @gotags: json:"level"
  359. double level = 5; // 液位高度
  360. // @gotags: json:"agitator_status"
  361. int64 agitator_status = 6; // 搅拌器运行状态 0: 未运行 1:运行中
  362. // @gotags: json:"agitator_duration"
  363. int64 agitator_duration = 7; // 搅拌器运行时长
  364. // @gotags: json:"agitator_fault_status"
  365. int64 agitator_fault_status = 8; // 搅拌器故障状态 0:正常 1:故障
  366. // @gotags: json:"c_time"
  367. string c_time = 9;
  368. }
  369. message WorkingPump {
  370. // @gotags: json:"id"
  371. int64 id = 1;
  372. // @gotags: json:"project_id"
  373. int64 project_id = 2;
  374. // @gotags: json:"device_code"
  375. string device_code = 3;
  376. // @gotags: json:"feed_pressure"
  377. double feed_pressure = 4; // 进水压力
  378. // @gotags: json:"out_pressure"
  379. double out_pressure = 5; // 出水压力
  380. // @gotags: json:"duration"
  381. int64 duration = 6; // 运行时长 单位 s
  382. // @gotags: json:"current"
  383. double current = 7; // 运行电流
  384. // @gotags: json:"frequency"
  385. double frequency = 8; // 运行频率
  386. // @gotags: json:"lift"
  387. double lift = 9; // 工作扬程
  388. // @gotags: json:"efficiency"
  389. double efficiency = 10; // 运行效率
  390. // @gotags: json:"run_status"
  391. int64 run_status = 11; // 运行状态 0: 停机 1: 运行正常
  392. // @gotags: json:"fault_status"
  393. int64 fault_status = 12; // 故障状态 0: 正常 1: 故障
  394. // @gotags: json:"c_time"
  395. string c_time = 13;
  396. }
  397. message WorkingValve {
  398. // @gotags: json:"id"
  399. int64 id = 1;
  400. // @gotags: json:"project_id"
  401. int64 project_id = 2;
  402. // @gotags: json:"device_code"
  403. string device_code = 3;
  404. // @gotags: json:"adjust"
  405. int64 adjust = 4; // 是否为调节阀门 0: 否 1: 是
  406. // @gotags: json:"opening"
  407. double opening = 5; // 当前阀门的开度
  408. // @gotags: json:"closed"
  409. int64 closed = 6; // 关到位 全关 0: 否 1: 是
  410. // @gotags: json:"opened"
  411. int64 opened = 7; // 开到位 开到 设置的开度 0: 否 1: 是
  412. // @gotags: json:"fault_status"
  413. int64 fault_status = 8; // 是否故障 0: 否 1: 是
  414. // @gotags: json:"c_time"
  415. string c_time = 9;
  416. }
  417. message ItemHistoryData {
  418. // @gotags: json:"project_id"
  419. int64 project_id = 1;
  420. // @gotags: json:"item_name"
  421. string item_name = 2;
  422. // @gotags: json:"val"
  423. double val = 3;
  424. // @gotags: json:"h_time"
  425. string h_time = 4;
  426. }
  427. message MultiAddItemHistoryDataReq {
  428. // @gotags: json:"project_id"
  429. int64 project_id = 1;
  430. // @gotags: json:"list"
  431. repeated ItemHistoryData list = 2;
  432. }
  433. message MultiAddItemHistoryDataResp {}
  434. message ItemHistoryDataListReq {
  435. // @gotags: json:"project_id"
  436. int64 project_id = 1;
  437. // @gotags: json:"item_name"
  438. string item_name = 2;
  439. // @gotags: json:"interval"
  440. string interval = 3; //时间单位 s,minute,h,day
  441. // @gotags: json:"aggregator"
  442. string aggregator = 4; //聚合方式 min,max,avg,sum,realtime, new
  443. // @gotags: json:"stime"
  444. string stime = 5;
  445. // @gotags: json:"etime"
  446. string etime = 6;
  447. // @gotags: json:"size"
  448. int64 size = 7;
  449. // @gotags: json:"order"
  450. string order = 8;
  451. }
  452. message ItemHistoryDataByTimeReq {
  453. // @gotags: json:"project_id"
  454. int64 project_id = 1;
  455. // @gotags: json:"item_name"
  456. string item_name = 2;
  457. // @gotags: json:"stime"
  458. string stime = 3;
  459. // @gotags: json:"etime"
  460. string etime = 4;
  461. // @gotags: json:"order"
  462. string order = 5;
  463. }
  464. message ItemHistoryDataMaxMinResp {
  465. // @gotags: json:"max_val"
  466. double max_val = 1;
  467. // @gotags: json:"min_val"
  468. double min_val = 2;
  469. // @gotags: json:"avg_val"
  470. double avg_val = 3;
  471. }
  472. message ItemHistoryDataFirstLastResp {
  473. // @gotags: json:"first"
  474. double first = 1;
  475. // @gotags: json:"last"
  476. double last = 2;
  477. }
  478. message ChangeTypeItemHistoryDataResp {
  479. // @gotags: json:"value"
  480. double value = 1;
  481. }
  482. message ItemHistoryDataList {
  483. // @gotags: json:"item_name"
  484. string item_name = 1;
  485. // @gotags: json:"val"
  486. double val = 2;
  487. // @gotags: json:"h_time"
  488. string h_time = 3;
  489. }
  490. message ItemHistoryDataForChart {
  491. // @gotags: json:"name"
  492. string name = 1;
  493. // @gotags: json:"val"
  494. double val = 2;
  495. // @gotags: json:"htime_at"
  496. string htime_at = 3;
  497. }
  498. message ItemHistoryDataForChartReq {
  499. // @gotags: json:"project_id"
  500. int64 project_id = 1;
  501. // @gotags: json:"item_name"
  502. string item_name = 2;
  503. // @gotags: json:"stime"
  504. string stime = 3;
  505. // @gotags: json:"etime"
  506. string etime = 4;
  507. // @gotags: json:"interval"
  508. string interval = 5;
  509. // @gotags: json:"size"
  510. int64 size = 6;
  511. // @gotags: json:"aggregator"
  512. string aggregator = 7;
  513. // @gotags: json:"order"
  514. string order = 8;
  515. // @gotags: json:"max_val"
  516. double max_val = 9;
  517. // @gotags: json:"min_val"
  518. double min_val = 10;
  519. }
  520. message ItemHistoryDataForChartResp {
  521. // @gotags: json:"list"
  522. repeated ItemHistoryDataForChart list = 1;
  523. }
  524. message ItemHistoryDataListResp {
  525. // @gotags: json:"list"
  526. repeated ItemHistoryDataList list = 1;
  527. }
  528. message GetWorkingUfByCodeResp{
  529. // @gotags: json:"list"
  530. repeated WorkingUf list = 1;
  531. }
  532. message FindWorkingUfByCycleReq{
  533. int64 project_id = 1;
  534. string device_code = 2;
  535. int64 filter_cycle = 3;
  536. int64 step = 4;
  537. double filter_time_start = 5;
  538. double filter_time_end = 6;
  539. int64 limit = 7;
  540. }
  541. message FindWorkingUfByCycleResp{
  542. // @gotags: json:"list"
  543. repeated WorkingUf list = 1;
  544. }
  545. message GetWorkingRoByCodeResp{
  546. // @gotags: json:"list"
  547. repeated WorkingRo list = 1;
  548. }
  549. message GetWorkingNfByCodeResp{
  550. // @gotags: json:"list"
  551. repeated WorkingNf list = 1;
  552. }
  553. message GetWorkingMfByCodeResp{
  554. // @gotags: json:"list"
  555. repeated WorkingMf list = 1;
  556. }
  557. message GetWorkingPumpByCodeResp{
  558. // @gotags: json:"list"
  559. repeated WorkingPump list = 1;
  560. }
  561. message GetWorkingValveByCodeResp{
  562. // @gotags: json:"list"
  563. repeated WorkingValve list = 1;
  564. }
  565. message GetWorkingChestByCodeResp{
  566. // @gotags: json:"list"
  567. repeated WorkingChest list = 1;
  568. }
  569. message FindAppListReq {
  570. int64 page = 1;
  571. int64 page_size = 2;
  572. string order = 3; // 排序字段及方向 例: id desc
  573. }
  574. message FindAppListResp {
  575. repeated AppInfo list = 1;
  576. Pagination pagination = 2;
  577. }
  578. message GetAppInfoReq {
  579. string app_name = 1;
  580. }
  581. message GetAppInfoResp {
  582. AppInfo app_info = 1;
  583. }
  584. message CreateAppInfoReq {
  585. string app_name = 1;
  586. repeated int64 project_ids = 2;
  587. int64 expire = 3;
  588. }
  589. message CreateAppInfoResp {
  590. AppInfo app_info = 1;
  591. }
  592. message RemoveAppInfoReq {
  593. string app_name = 1;
  594. }
  595. message RemoveAppInfoResp {
  596. bool ok = 1;
  597. }
  598. message DisableAppInfoReq {
  599. string app_name = 1;
  600. }
  601. message DisableAppInfoResp {
  602. bool ok = 1;
  603. }
  604. message EnableAppInfoReq {
  605. string app_name = 1;
  606. }
  607. message EnableAppInfoResp {
  608. bool ok = 1;
  609. }
  610. message ResetAppSecretReq {
  611. string app_name = 1;
  612. }
  613. message ResetAppSecretResp {
  614. string secret = 1;
  615. }
  616. message ExpireAppSecretReq {
  617. string app_name = 1;
  618. int64 expire = 3;
  619. }
  620. message ExpireAppSecretResp {
  621. string expire_at = 3;
  622. }
  623. message ResetAppProjectReq {
  624. string app_name = 1;
  625. repeated int64 project_ids = 2;
  626. }
  627. message ResetAppProjectResp {
  628. repeated int64 remove_project_ids = 1;
  629. }
  630. service Organization {
  631. rpc GetWorkingUfByCode(DcWorkingReq) returns(GetWorkingUfByCodeResp);
  632. rpc FindWorkingUfByCycle(FindWorkingUfByCycleReq) returns(FindWorkingUfByCycleResp);
  633. rpc GetWorkingRoByCode(DcWorkingReq) returns(GetWorkingRoByCodeResp);
  634. rpc GetWorkingChestByCode(DcWorkingReq) returns(GetWorkingChestByCodeResp);
  635. rpc GetWorkingPumpByCode(DcWorkingReq) returns(GetWorkingPumpByCodeResp);
  636. rpc GetWorkingValveByCode(DcWorkingReq) returns(GetWorkingValveByCodeResp);
  637. rpc MultiAddItemHistoryData(MultiAddItemHistoryDataReq) returns(MultiAddItemHistoryDataResp);
  638. rpc ItemHistoryDataList(ItemHistoryDataListReq) returns(ItemHistoryDataListResp);
  639. rpc ItemHistoryDataByTime(ItemHistoryDataByTimeReq) returns(ItemHistoryDataListResp);
  640. rpc ItemHistoryDataMaxMinByTime(ItemHistoryDataByTimeReq) returns(ItemHistoryDataMaxMinResp);
  641. rpc ItemHistoryDataFirstLastByTime(ItemHistoryDataByTimeReq) returns(ItemHistoryDataFirstLastResp);
  642. rpc ChangeTypeItemHistoryData(ItemHistoryDataByTimeReq) returns(ChangeTypeItemHistoryDataResp);
  643. rpc ItemHistoryDataForChart(ItemHistoryDataForChartReq) returns(ItemHistoryDataForChartResp);
  644. rpc FindAppList (FindAppListReq) returns (FindAppListResp);
  645. rpc GetAppInfo (GetAppInfoReq) returns (GetAppInfoResp);
  646. rpc CreateAppInfo (CreateAppInfoReq) returns (CreateAppInfoResp);
  647. rpc RemoveAppInfo (RemoveAppInfoReq) returns (RemoveAppInfoResp);
  648. rpc DisableAppInfo (DisableAppInfoReq) returns (DisableAppInfoResp);
  649. rpc EnableAppInfo (EnableAppInfoReq) returns (EnableAppInfoResp);
  650. rpc ResetAppSecret (ResetAppSecretReq) returns (ResetAppSecretResp);
  651. rpc ExpireAppSecret (ExpireAppSecretReq) returns (ExpireAppSecretResp);
  652. rpc ResetAppProject (ResetAppProjectReq) returns (ResetAppProjectResp);
  653. }