123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535 |
- syntax = "proto3";
- package pb;
- option go_package = "./pb";
- message DcWorkingReq{
- int64 project_id = 1;
- string device_code = 2;
- string stime = 3; // c_time的搜索
- string etime = 4; // c_time的搜索
- int64 page = 5;
- int64 page_size = 6;
- string order = 7; // 排序字段及方向 例: id desc
- }
- message WorkingMf{
- // @gotags: json:"id"
- int64 id = 1;
- // @gotags: json:"project_id"
- int64 project_id = 2;
- // @gotags: json:"device_code"
- string device_code = 3;
- // @gotags: json:"water_temperature"
- double water_temperature = 4; // 水温 摄氏度
- // @gotags: json:"feed_flow"
- double feed_flow = 5; // 进水流量
- // @gotags: json:"con_flow"
- double con_flow = 6; // 浓水流量
- // @gotags: json:"product_flow"
- double product_flow = 7; // 产水流量
- // @gotags: json:"feed_pressure"
- double feed_pressure = 8; // 进水压力
- // @gotags: json:"con_pressure"
- double con_pressure = 9; // 浓水压力
- // @gotags: json:"product_pressure"
- double product_pressure = 10; // 产水压力
- // @gotags: json:"tmp"
- double tmp = 11; // 跨膜压差
- // @gotags: json:"flux"
- double flux = 12; // 膜通量
- // @gotags: json:"feed_wq_turbidity"
- double feed_wq_turbidity = 13; // 进水浊度
- // @gotags: json:"feed_wq_ph"
- int64 feed_wq_ph = 14; // 进水 PH 值
- // @gotags: json:"product_wq_ph"
- int64 product_wq_ph = 15; // 产水 PH 值
- // @gotags: json:"feed_wq_al"
- double feed_wq_al = 16; // 进水水质:铝
- // @gotags: json:"product_wq_al"
- double product_wq_al = 17; // 产水水质:铝
- // @gotags: json:"feed_wq_fe"
- double feed_wq_fe = 18; // 进水水质:铁
- // @gotags: json:"product_wq_fe"
- double product_wq_fe = 19; // 产水水质:铁
- // @gotags: json:"feed_wq_mn"
- double feed_wq_mn = 20; // 进水水质:锰
- // @gotags: json:"product_wq_mn"
- double product_wq_mn = 21; // 产水水质:锰
- // @gotags: json:"feed_wq_sio2"
- double feed_wq_sio2 = 22; // 进水水质:二氧化硅
- // @gotags: json:"product_wq_sio2"
- double product_wq_sio2 = 23; // 产水水质:二氧化硅
- // @gotags: json:"feed_wq_cod"
- double feed_wq_cod = 24; // 进水水质:COD
- // @gotags: json:"product_wq_cod"
- double product_wq_cod = 25; // 产水水质:COD
- // @gotags: json:"feed_wq_p"
- double feed_wq_p = 26; // 进水水质:磷
- // @gotags: json:"product_wq_p"
- double product_wq_p = 27; // 产水水质:磷
- // @gotags: json:"step"
- int64 step = 28; // 设备当前步序值
- // @gotags: json:"c_time"
- string c_time = 29;
- }
- message WorkingUf{
- // @gotags: json:"id"
- int64 id = 1;
- // @gotags: json:"project_id"
- int64 project_id = 2;
- // @gotags: json:"device_code"
- string device_code = 3;
- // @gotags: json:"water_temperature"
- double water_temperature = 4; // 水温 摄氏度
- // @gotags: json:"feed_flow"
- double feed_flow = 5; // 进水流量
- // @gotags: json:"con_flow"
- double con_flow = 6; // 浓水流量
- // @gotags: json:"product_flow"
- double product_flow = 7; // 产水流量
- // @gotags: json:"feed_pressure"
- double feed_pressure = 8; // 进水压力
- // @gotags: json:"con_pressure"
- double con_pressure = 9; // 浓水压力
- // @gotags: json:"product_pressure"
- double product_pressure = 10; // 产水压力
- // @gotags: json:"tmp"
- double tmp = 11; // 跨膜压差
- // @gotags: json:"flux"
- double flux = 12; // 膜通量
- // @gotags: json:"feed_wq_turbidity"
- double feed_wq_turbidity = 13; // 进水浊度
- // @gotags: json:"feed_wq_ph"
- int64 feed_wq_ph = 14; // 进水 PH 值
- // @gotags: json:"product_wq_ph"
- int64 product_wq_ph = 15; // 产水 PH 值
- // @gotags: json:"feed_wq_al"
- double feed_wq_al = 16; // 进水水质:铝
- // @gotags: json:"product_wq_al"
- double product_wq_al = 17; // 产水水质:铝
- // @gotags: json:"feed_wq_fe"
- double feed_wq_fe = 18; // 进水水质:铁
- // @gotags: json:"product_wq_fe"
- double product_wq_fe = 19; // 产水水质:铁
- // @gotags: json:"feed_wq_mn"
- double feed_wq_mn = 20; // 进水水质:锰
- // @gotags: json:"product_wq_mn"
- double product_wq_mn = 21; // 产水水质:锰
- // @gotags: json:"feed_wq_sio2"
- double feed_wq_sio2 = 22; // 进水水质:二氧化硅
- // @gotags: json:"product_wq_sio2"
- double product_wq_sio2 = 23; // 产水水质:二氧化硅
- // @gotags: json:"feed_wq_cod"
- double feed_wq_cod = 24; // 进水水质:COD
- // @gotags: json:"product_wq_cod"
- double product_wq_cod = 25; // 产水水质:COD
- // @gotags: json:"feed_wq_p"
- double feed_wq_p = 26; // 进水水质:磷
- // @gotags: json:"product_wq_p"
- double product_wq_p = 27; // 产水水质:磷
- // @gotags: json:"step"
- int64 step = 28; // 设备当前步序值
- // @gotags: json:"c_time"
- string c_time = 29;
- }
- message WorkingNf{
- // gotags: json:"id"
- int64 id = 1;
- // gotags: json:"project_id"
- int64 project_id = 2;
- // gotags: json:"device_code"
- string device_code = 3;
- // gotags: json:"water_temperature"
- double water_temperature = 4; // 水温 摄氏度
- // gotags: json:"feed_flow_1st"
- double feed_flow_1st = 5; // 一段进水流量
- // gotags: json:"con_flow_1st"
- double con_flow_1st = 6; // 一段浓水流量
- // gotags: json:"product_flow_1st"
- double product_flow_1st = 7; // 一段产水流量
- // gotags: json:"feed_pressure_1st"
- double feed_pressure_1st = 8; // 一段进水压力
- // gotags: json:"con_pressure_1st"
- double con_pressure_1st = 9; // 一段浓水压力
- // gotags: json:"product_pressure_1st"
- double product_pressure_1st = 10; // 一段产水压力
- // gotags: json:"tmp_1st"
- double tmp_1st = 11; // 一段跨膜压差
- // gotags: json:"flux_1st"
- double flux_1st = 12; // 一段膜通量
- // gotags: json:"permeability_1st"
- double permeability_1st = 13; // 一段渗透率
- // gotags: json:"feed_flow_2nd"
- double feed_flow_2nd = 14; // 二段进水流量
- // gotags: json:"con_flow_2nd"
- double con_flow_2nd = 15; // 二段浓水流量
- // gotags: json:"product_flow_2nd"
- double product_flow_2nd = 16; // 二段产水流量
- // gotags: json:"feed_pressure_2nd"
- double feed_pressure_2nd = 17; // 二段进水压力
- // gotags: json:"con_pressure_2nd"
- double con_pressure_2nd = 18; // 二段浓水压力
- // gotags: json:"product_pressure_2nd"
- double product_pressure_2nd = 19; // 二段产水压力
- // gotags: json:"tmp_2nd"
- double tmp_2nd = 20; // 二段压差
- // gotags: json:"flux_2nd"
- double flux_2nd = 21; // 二段通量
- // gotags: json:"permeability_2nd"
- double permeability_2nd = 22; // 二段渗透率
- // gotags: json:"feed_flow_3th"
- double feed_flow_3th = 23; // 三段进水流量
- // gotags: json:"con_flow_3th"
- double con_flow_3th = 24; // 三段浓水流量
- // gotags: json:"product_flow_3th"
- double product_flow_3th = 25; // 三段产水流量
- // gotags: json:"feed_pressure_3th"
- double feed_pressure_3th = 26; // 三段进水压力
- // gotags: json:"con_pressure_3th"
- double con_pressure_3th = 27; // 三段浓水压力
- // gotags: json:"product_pressure_3th"
- double product_pressure_3th = 28; // 三段产水压力
- // gotags: json:"tmp_3th"
- double tmp_3th = 29; // 三段压差
- // gotags: json:"flux_3th"
- double flux_3th = 30; // 三段通量
- // gotags: json:"permeability_3th"
- double permeability_3th = 31; // 三段渗透率
- // gotags: json:"feed_wq_turbidity"
- double feed_wq_turbidity = 32; // 进水浊度
- // gotags: json:"feed_wq_ph"
- int64 feed_wq_ph = 33; // 进水 PH 值
- // gotags: json:"product_wq_ph"
- int64 product_wq_ph = 34; // 产水 PH 值
- // gotags: json:"feed_wq_al"
- double feed_wq_al = 35; // 进水水质:铝
- // gotags: json:"product_wq_al"
- double product_wq_al = 36; // 产水水质:铝
- // gotags: json:"feed_wq_fe"
- double feed_wq_fe = 37; // 进水水质:铁
- // gotags: json:"product_wq_fe"
- double product_wq_fe = 38; // 产水水质:铁
- // gotags: json:"feed_wq_mn"
- double feed_wq_mn = 39; // 进水水质:锰
- // gotags: json:"product_wq_mn"
- double product_wq_mn = 40; // 产水水质:锰
- // gotags: json:"feed_wq_sio2"
- double feed_wq_sio2 = 41; // 进水水质:二氧化硅
- // gotags: json:"product_wq_sio2"
- double product_wq_sio2 = 42; // 产水水质:二氧化硅
- // gotags: json:"feed_wq_cod"
- double feed_wq_cod = 43; // 进水水质:COD
- // gotags: json:"product_wq_cod"
- double product_wq_cod = 44; // 产水水质:COD
- // gotags: json:"feed_wq_p"
- double feed_wq_p = 45; // 进水水质:磷
- // gotags: json:"product_wq_p"
- double product_wq_p = 46; // 产水水质:磷
- // gotags: json:"step"
- int64 step = 47; // 设备当前步序值
- // gotags: json:"c_time"
- string c_time = 48;
- }
- message WorkingRo{
- // gotags: json:"id"
- int64 id = 1;
- // gotags: json:"project_id"
- int64 project_id = 2;
- // gotags: json:"device_code"
- string device_code = 3;
- // gotags: json:"water_temperature"
- double water_temperature = 4; // 水温 摄氏度
- // gotags: json:"feed_flow_1st"
- double feed_flow_1st = 5; // 一段进水流量
- // gotags: json:"con_flow_1st"
- double con_flow_1st = 6; // 一段浓水流量
- // gotags: json:"product_flow_1st"
- double product_flow_1st = 7; // 一段产水流量
- // gotags: json:"feed_pressure_1st"
- double feed_pressure_1st = 8; // 一段进水压力
- // gotags: json:"con_pressure_1st"
- double con_pressure_1st = 9; // 一段浓水压力
- // gotags: json:"product_pressure_1st"
- double product_pressure_1st = 10; // 一段产水压力
- // gotags: json:"tmp_1st"
- double tmp_1st = 11; // 一段跨膜压差
- // gotags: json:"flux_1st"
- double flux_1st = 12; // 一段膜通量
- // gotags: json:"permeability_1st"
- double permeability_1st = 13; // 一段渗透率
- // gotags: json:"feed_flow_2nd"
- double feed_flow_2nd = 14; // 二段进水流量
- // gotags: json:"con_flow_2nd"
- double con_flow_2nd = 15; // 二段浓水流量
- // gotags: json:"product_flow_2nd"
- double product_flow_2nd = 16; // 二段产水流量
- // gotags: json:"feed_pressure_2nd"
- double feed_pressure_2nd = 17; // 二段进水压力
- // gotags: json:"con_pressure_2nd"
- double con_pressure_2nd = 18; // 二段浓水压力
- // gotags: json:"product_pressure_2nd"
- double product_pressure_2nd = 19; // 二段产水压力
- // gotags: json:"tmp_2nd"
- double tmp_2nd = 20; // 二段压差
- // gotags: json:"flux_2nd"
- double flux_2nd = 21; // 二段通量
- // gotags: json:"permeability_2nd"
- double permeability_2nd = 22; // 二段渗透率
- // gotags: json:"feed_flow_3th"
- double feed_flow_3th = 23; // 三段进水流量
- // gotags: json:"con_flow_3th"
- double con_flow_3th = 24; // 三段浓水流量
- // gotags: json:"product_flow_3th"
- double product_flow_3th = 25; // 三段产水流量
- // gotags: json:"feed_pressure_3th"
- double feed_pressure_3th = 26; // 三段进水压力
- // gotags: json:"con_pressure_3th"
- double con_pressure_3th = 27; // 三段浓水压力
- // gotags: json:"product_pressure_3th"
- double product_pressure_3th = 28; // 三段产水压力
- // gotags: json:"tmp_3th"
- double tmp_3th = 29; // 三段压差
- // gotags: json:"flux_3th"
- double flux_3th = 30; // 三段通量
- // gotags: json:"permeability_3th"
- double permeability_3th = 31; // 三段渗透率
- // gotags: json:"feed_wq_turbidity"
- double feed_wq_turbidity = 32; // 进水浊度
- // gotags: json:"feed_wq_ph"
- int64 feed_wq_ph = 33; // 进水 PH 值
- // gotags: json:"product_wq_ph"
- int64 product_wq_ph = 34; // 产水 PH 值
- // gotags: json:"feed_wq_al"
- double feed_wq_al = 35; // 进水水质:铝
- // gotags: json:"product_wq_al"
- double product_wq_al = 36; // 产水水质:铝
- // gotags: json:"feed_wq_fe"
- double feed_wq_fe = 37; // 进水水质:铁
- // gotags: json:"product_wq_fe"
- double product_wq_fe = 38; // 产水水质:铁
- // gotags: json:"feed_wq_mn"
- double feed_wq_mn = 39; // 进水水质:锰
- // gotags: json:"product_wq_mn"
- double product_wq_mn = 40; // 产水水质:锰
- // gotags: json:"feed_wq_sio2"
- double feed_wq_sio2 = 41; // 进水水质:二氧化硅
- // gotags: json:"product_wq_sio2"
- double product_wq_sio2 = 42; // 产水水质:二氧化硅
- // gotags: json:"feed_wq_cod"
- double feed_wq_cod = 43; // 进水水质:COD
- // gotags: json:"product_wq_cod"
- double product_wq_cod = 44; // 产水水质:COD
- // gotags: json:"feed_wq_p"
- double feed_wq_p = 45; // 进水水质:磷
- // gotags: json:"product_wq_p"
- double product_wq_p = 46; // 产水水质:磷
- // gotags: json:"step"
- int64 step = 47; // 设备当前步序值
- // gotags: json:"c_time"
- string c_time = 48;
- }
- message WorkingChest {
- // @gotags: json:"id"
- int64 id = 1;
- // @gotags: json:"project_id"
- int64 project_id = 2;
- // @gotags: json:"device_code"
- string device_code = 3;
- // @gotags: json:"switch"
- int64 switch = 4; // 药箱液位开关 0: 关 1: 开
- // @gotags: json:"level"
- double level = 5; // 液位高度
- // @gotags: json:"agitator_status"
- int64 agitator_status = 6; // 搅拌器运行状态 0: 未运行 1:运行中
- // @gotags: json:"agitator_duration"
- int64 agitator_duration = 7; // 搅拌器运行时长
- // @gotags: json:"agitator_fault_status"
- int64 agitator_fault_status = 8; // 搅拌器故障状态 0:正常 1:故障
- // @gotags: json:"c_time"
- string c_time = 9;
- }
- message WorkingPump {
- // @gotags: json:"id"
- int64 id = 1;
- // @gotags: json:"project_id"
- int64 project_id = 2;
- // @gotags: json:"device_code"
- string device_code = 3;
- // @gotags: json:"feed_pressure"
- double feed_pressure = 4; // 进水压力
- // @gotags: json:"out_pressure"
- double out_pressure = 5; // 出水压力
- // @gotags: json:"duration"
- int64 duration = 6; // 运行时长 单位 s
- // @gotags: json:"current"
- double current = 7; // 运行电流
- // @gotags: json:"frequency"
- double frequency = 8; // 运行频率
- // @gotags: json:"lift"
- double lift = 9; // 工作扬程
- // @gotags: json:"efficiency"
- double efficiency = 10; // 运行效率
- // @gotags: json:"run_status"
- int64 run_status = 11; // 运行状态 0: 停机 1: 运行正常
- // @gotags: json:"fault_status"
- int64 fault_status = 12; // 故障状态 0: 正常 1: 故障
- // @gotags: json:"c_time"
- string c_time = 13;
- }
- message WorkingValve {
- // @gotags: json:"id"
- int64 id = 1;
- // @gotags: json:"project_id"
- int64 project_id = 2;
- // @gotags: json:"device_code"
- string device_code = 3;
- // @gotags: json:"adjust"
- int64 adjust = 4; // 是否为调节阀门 0: 否 1: 是
- // @gotags: json:"opening"
- double opening = 5; // 当前阀门的开度
- // @gotags: json:"closed"
- int64 closed = 6; // 关到位 全关 0: 否 1: 是
- // @gotags: json:"opened"
- int64 opened = 7; // 开到位 开到 设置的开度 0: 否 1: 是
- // @gotags: json:"fault_status"
- int64 fault_status = 8; // 是否故障 0: 否 1: 是
- // @gotags: json:"c_time"
- string c_time = 9;
- }
- message ItemHistoryData {
- // @gotags: json:"project_id"
- int64 project_id = 1;
- // @gotags: json:"item_name"
- string item_name = 2;
- // @gotags: json:"val"
- double val = 3;
- // @gotags: json:"h_time"
- string h_time = 4;
- }
- message MultiAddItemHistoryDataReq {
- // @gotags: json:"project_id"
- int64 project_id = 1;
- // @gotags: json:"list"
- repeated ItemHistoryData list = 2;
- }
- message MultiAddItemHistoryDataResp {}
- message ItemHistoryDataListReq {
- // @gotags: json:"project_id"
- int64 project_id = 1;
- // @gotags: json:"item_name"
- string item_name = 2;
- // @gotags: json:"interval"
- string interval = 3; //时间单位 s,minute,h,day
- // @gotags: json:"aggregator"
- string aggregator = 4; //聚合方式 min,max,avg,sum,realtime, new
- // @gotags: json:"stime"
- string stime = 5;
- // @gotags: json:"etime"
- string etime = 6;
- // @gotags: json:"size"
- int64 size = 7;
- }
- message ItemHistoryDataByTimeReq {
- // @gotags: json:"project_id"
- int64 project_id = 1;
- // @gotags: json:"item_name"
- string item_name = 2;
- // @gotags: json:"stime"
- string stime = 3;
- // @gotags: json:"etime"
- string etime = 4;
- }
- message ItemHistoryDataMaxMinResp {
- // @gotags: json:"max_val"
- double max_val = 1;
- // @gotags: json:"min_val"
- double min_val = 2;
- }
- message ItemHistoryDataFirstLastResp {
- // @gotags: json:"first"
- double first = 1;
- // @gotags: json:"last"
- double last = 2;
- }
- message ChangeTypeItemHistoryDataResp {
- // @gotags: json:"value"
- double value = 1;
- }
- message ItemHistoryDataList {
- // @gotags: json:"item_name"
- string item_name = 1;
- // @gotags: json:"val"
- double val = 2;
- // @gotags: json:"h_time"
- string h_time = 3;
- }
- message ItemHistoryDataListResp {
- // @gotags: json:"list"
- repeated ItemHistoryDataList list = 1;
- }
- message GetWorkingUfByCodeResp{
- // @gotags: json:"list"
- repeated WorkingUf list = 1;
- }
- message GetWorkingRoByCodeResp{
- // @gotags: json:"list"
- repeated WorkingRo list = 1;
- }
- message GetWorkingNfByCodeResp{
- // @gotags: json:"list"
- repeated WorkingNf list = 1;
- }
- message GetWorkingMfByCodeResp{
- // @gotags: json:"list"
- repeated WorkingMf list = 1;
- }
- message GetWorkingPumpByCodeResp{
- // @gotags: json:"list"
- repeated WorkingPump list = 1;
- }
- message GetWorkingValveByCodeResp{
- // @gotags: json:"list"
- repeated WorkingValve list = 1;
- }
- message GetWorkingChestByCodeResp{
- // @gotags: json:"list"
- repeated WorkingChest list = 1;
- }
- service Organization {
- rpc GetWorkingUfByCode(DcWorkingReq) returns(GetWorkingUfByCodeResp);
- rpc GetWorkingRoByCode(DcWorkingReq) returns(GetWorkingRoByCodeResp);
- rpc GetWorkingChestByCode(DcWorkingReq) returns(GetWorkingChestByCodeResp);
- rpc GetWorkingPumpByCode(DcWorkingReq) returns(GetWorkingPumpByCodeResp);
- rpc GetWorkingValveByCode(DcWorkingReq) returns(GetWorkingValveByCodeResp);
- rpc MultiAddItemHistoryData(MultiAddItemHistoryDataReq) returns(MultiAddItemHistoryDataResp);
- rpc ItemHistoryDataList(ItemHistoryDataListReq) returns(ItemHistoryDataListResp);
- rpc ItemHistoryDataByTime(ItemHistoryDataByTimeReq) returns(ItemHistoryDataListResp);
- rpc ItemHistoryDataMaxMinByTime(ItemHistoryDataByTimeReq) returns(ItemHistoryDataMaxMinResp);
- rpc ItemHistoryDataFirstLastByTime(ItemHistoryDataByTimeReq) returns(ItemHistoryDataFirstLastResp);
- rpc ChangeTypeItemHistoryData(ItemHistoryDataByTimeReq) returns(ChangeTypeItemHistoryDataResp);
- }
|