修改proto
Signed-off-by: yinzijian <yinzijian@haomozhixing.onaliyun.com>
This commit is contained in:
parent
ab5a549f4c
commit
7b67a7dd8b
|
|
@ -113,10 +113,10 @@ def QueryGreenWaveCrossPhaseTpCheck(waveid: str, citycode: int):
|
||||||
channel.close()
|
channel.close()
|
||||||
|
|
||||||
|
|
||||||
def QueryCrossRunningPhase(citycode: int, crossids: []):
|
def QueryCrossRunningPhase(citycode: int, crossids: [], date_list:[], tp=''):
|
||||||
stub, channel = channel_stub()
|
stub, channel = channel_stub()
|
||||||
try:
|
try:
|
||||||
request_params = phase_server_pb2.CrossRunningPhaseRequest(citycode=citycode, crossids=crossids)
|
request_params = phase_server_pb2.CrossRunningPhaseRequest(citycode=citycode, crossids=crossids, dateList=date_list, tp=tp)
|
||||||
return stub.CrossRunningPhase(request_params, timeout=30), None
|
return stub.CrossRunningPhase(request_params, timeout=30), None
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
return None, e
|
return None, e
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
|
|
||||||
package phase_server;
|
package phase_server;
|
||||||
|
|
||||||
service PhaseService {
|
service PhaseService {
|
||||||
|
|
@ -240,76 +239,81 @@ message GreenWaveCrossPhaseTpCheckResponse {
|
||||||
|
|
||||||
message CrossRunningPhaseRequest {
|
message CrossRunningPhaseRequest {
|
||||||
int32 citycode = 1;
|
int32 citycode = 1;
|
||||||
repeated string crossids = 2;
|
repeated string date_list = 2;
|
||||||
|
string tp = 3;
|
||||||
|
repeated string crossids = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
//路口运行中方案
|
|
||||||
message CrossRunningPhaseResponse {
|
message CrossRunningPhaseResponse {
|
||||||
int32 code = 1;
|
int32 code = 1;
|
||||||
string msg = 2;
|
string msg = 2;
|
||||||
repeated List data = 3; //数据列表
|
repeated List data = 3;
|
||||||
message List {
|
message List {
|
||||||
int32 citycode = 1; //城市ID
|
int32 citycode = 1;
|
||||||
string crossid = 2; //路口ID
|
string crossid = 2;
|
||||||
string jj_crossid = 3; //交警路口ID
|
string jj_crossid = 3;
|
||||||
int32 scheduleid = 4; //日计划号
|
int32 scheduleid = 4;
|
||||||
string schedule_week = 5; //日计划执行周,'1,2,3,4,5'
|
string schedule_week = 5;
|
||||||
string schedule_name = 6; //日计划执行名称,'工作日'或者'周末'
|
string schedule_name = 6;
|
||||||
repeated tps_list tps = 7; //时段列表
|
repeated tps_list tps = 7;
|
||||||
}
|
}
|
||||||
message tps_list {
|
message tps_list {
|
||||||
string tp_start = 1; //时段开始时间,'05:00'
|
string tp_start = 1;
|
||||||
string tp_end = 2; //时段结束时间,'17:00'
|
string tp_end = 2;
|
||||||
int32 planid = 3; //方案号
|
int32 planid = 3;
|
||||||
string plan_name = 4; //方案名称
|
string plan_name = 4;
|
||||||
string control_mode = 5; //控制模式,'固定模式'
|
string control_mode = 5;
|
||||||
int32 cycle = 6; //周期,180
|
int32 cycle = 6;
|
||||||
int32 coord_phaseid = 7; //协调相位ID
|
int32 coord_phaseid = 7;
|
||||||
int32 offset = 8; //相位差
|
int32 offset = 8;
|
||||||
repeated stages stage_list = 9; //一个方案中的多个阶段
|
repeated stages stage_list = 9;
|
||||||
}
|
}
|
||||||
message stages {
|
message stages {
|
||||||
int32 stageid = 1; //阶段ID
|
int32 stageid = 1;
|
||||||
int32 stage_duration = 2; //阶段时长
|
int32 stage_duration = 2;
|
||||||
string stage_name = 3; //阶段名称
|
string stage_name = 3;
|
||||||
int32 green = 4; //绿灯时长
|
int32 green = 4;
|
||||||
int32 yellow = 5; //黄灯时长
|
int32 yellow = 5;
|
||||||
int32 allred = 6; //全红时长
|
int32 allred = 6;
|
||||||
string phases = 7; //相位ID列表,'1,2,3'
|
string phases = 7;
|
||||||
string phases_name = 8; //相位名称列表,'北左转,北直行,南左转,南直行,东北直行,南行人'
|
string phases_name = 8;
|
||||||
int32 min_green = 9; //最小绿灯时长
|
int32 min_green = 9;
|
||||||
int32 max_green = 10; //最大绿灯时长
|
int32 max_green = 10;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
message CrossPhaseDiagnosisRequest {
|
message CrossPhaseDiagnosisRequest {
|
||||||
int32 citycode = 1;
|
int32 citycode = 1;
|
||||||
string crossid = 2;
|
string crossid = 2;
|
||||||
repeated string date_list = 3;
|
string start_tp = 3;
|
||||||
|
string end_tp = 4;
|
||||||
|
repeated string date_list = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
message CrossPhaseDiagnosisResponse {
|
message CrossPhaseDiagnosisResponse {
|
||||||
int32 code = 1;
|
int32 code = 1;
|
||||||
string msg = 2;
|
string msg = 2;
|
||||||
repeated List data = 3;
|
List data = 3;
|
||||||
message List {
|
message List {
|
||||||
string item = 1;
|
string item = 1;
|
||||||
repeated details detail_list = 2;
|
repeated details values = 2;
|
||||||
string suggestions = 3;
|
}
|
||||||
|
|
||||||
|
message details {
|
||||||
|
string item = 1;
|
||||||
|
repeated item_detail detail = 2;
|
||||||
|
repeated item_suggestions suggestions = 3;
|
||||||
string reason = 4;
|
string reason = 4;
|
||||||
}
|
}
|
||||||
message details {
|
|
||||||
repeated item_detail detail = 1;
|
|
||||||
}
|
|
||||||
message item_detail {
|
message item_detail {
|
||||||
string text = 1;
|
string text = 1;
|
||||||
string crossid = 2;
|
string color = 2;
|
||||||
int32 nodeid = 3;
|
int32 scheduleid = 3;
|
||||||
string color = 5;
|
string crossid = 4;
|
||||||
int32 scheduleid = 6;
|
}
|
||||||
string schedule_week = 7;
|
|
||||||
string schedule_name = 8;
|
message item_suggestions {
|
||||||
int32 plan_id = 9;
|
string text = 1;
|
||||||
string plan_name = 10;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue