Commit b95b5228 authored by 张晓彤's avatar 张晓彤

修改

parent 40c4ed07
...@@ -325,7 +325,7 @@ class TruckInfo(WalkManage): ...@@ -325,7 +325,7 @@ class TruckInfo(WalkManage):
.first() .first()
) )
if task in (empty_task_set + heavy_task_set) and item is None: if task in (empty_task_set + heavy_task_set) and item is None:
raise Exception(f"矿卡 {truck_id} 配对关系异常") raise Exception(f"矿卡 {truck_id} 配对关系异常(不匹配或者不存在)")
except Exception as es: except Exception as es:
self.logger.error(es) self.logger.error(es)
session_postgre.rollback() session_postgre.rollback()
...@@ -459,7 +459,7 @@ class TruckInfo(WalkManage): ...@@ -459,7 +459,7 @@ class TruckInfo(WalkManage):
) )
if task in empty_task_set + heavy_task_set and item is None: # 矿卡处于正常工作状态, 但查询不到派车计划 if task in empty_task_set + heavy_task_set and item is None: # 矿卡处于正常工作状态, 但查询不到派车计划
raise Exception(f"矿卡 {truck_id} 配对关系异常") raise Exception(f"矿卡 {truck_id} 配对关系异常(不匹配或不存在)")
except Exception as es: except Exception as es:
self.logger.error("配对关系异常") self.logger.error("配对关系异常")
self.logger.error(es) self.logger.error(es)
......
...@@ -17,7 +17,7 @@ from app import app ...@@ -17,7 +17,7 @@ from app import app
import uuid import uuid
@app.route("/redispatch", methods=["POST"]) @app.route("/go_through", methods=["POST"])
def redispatch_request(): def redispatch_request():
# 获取报文数据 # 获取报文数据
data_json = request.get_json() data_json = request.get_json()
...@@ -25,7 +25,7 @@ def redispatch_request(): ...@@ -25,7 +25,7 @@ def redispatch_request():
# 车辆id # 车辆id
request_truck_id = data_json.get("truck_id") request_truck_id = data_json.get("truck_id")
request_truck_id = '309705a0-5ddf-4559-b6c4-ee17a57677ad' # request_truck_id = '309705a0-5ddf-4559-b6c4-ee17a57677ad'
# 调度开始时间 # 调度开始时间
rtd_start_time = datetime.now() rtd_start_time = datetime.now()
...@@ -134,8 +134,11 @@ def redispatch_request(): ...@@ -134,8 +134,11 @@ def redispatch_request():
# 装载区区分 # 装载区区分
# closer_area_id, further_area_id = area_analysis(excavators_id) # closer_area_id, further_area_id = area_analysis(excavators_id)
closer_area_id = 'f1d5f017-5134-65a0-f657-89eed06eacc1' # closer_area_id = 'f1d5f017-5134-65a0-f657-89eed06eacc1'
further_area_id = 'ef89f721-5134-3ef1-91e2-95b4e5004675' # further_area_id = 'ef89f721-5134-3ef1-91e2-95b4e5004675'
closer_area_id = '7ff73575-2134-afd4-1065-d5d60e8751c9'
further_area_id = '79584290-1134-8b85-f4cc-1dcf64fc3456'
closer_excavator_id, further_excavator_id = DispatchInfo.load_excavator_dict[closer_area_id], \ closer_excavator_id, further_excavator_id = DispatchInfo.load_excavator_dict[closer_area_id], \
DispatchInfo.load_excavator_dict[further_area_id] DispatchInfo.load_excavator_dict[further_area_id]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment