Commit 777a0b16 authored by z5335534 Ao Guo's avatar z5335534 Ao Guo

info层再次修改

parent 93958978
This diff is collapsed.
......@@ -490,11 +490,13 @@ class DiggingWorkArea(Base):
Id = Column(VARCHAR(50), primary_key=True)
Material = Column(VARCHAR(36))
ExactorId = Column(VARCHAR(36))
ExactorUuid = Column(VARCHAR(50))
def __init__(self, Id, Material, ExactorId):
def __init__(self, Id, Material, ExactorId, ExactorUuid):
self.Id = Id
self.Material = Material
self.ExactorId = ExactorId
self.ExactorUuid = ExactorUuid
class DispatchRule(Base):
......@@ -558,18 +560,22 @@ class DispatchMatch(Base):
group_code = Column(VARCHAR(36))
match_code = Column(VARCHAR(36))
team_id = Column(VARCHAR(36))
load_area_id = Column(VARCHAR(36))
# excavator_id = Column(VARCHAR(36))
dump_id = Column(VARCHAR(36))
exactor_id = Column(VARCHAR(36))
unload_area_id = Column(VARCHAR(36))
excavator_id = Column(VARCHAR(36))
def __init__(self, id, group_type, group_code, match_code, team_id, unload_area_id, excavator_id):
def __init__(self, id, group_type, group_code, match_code, team_id, load_area_id, dump_id, exactor_id, unload_area_id):
self.id = id
self.group_type = group_type
self.group_code = group_code
self.match_code = match_code
self.team_id = team_id
self.load_area_id = load_area_id
self.dump_id = dump_id
self.exactor_id = exactor_id
self.unload_area_id = unload_area_id
self.excavator_id = excavator_id
class DispatchEquipment(Base):
__tablename__ = 'sys_dispatch_equipment'
......
from static_data_process import *
from settings import *
import numpy as np
from data.dispatchInfo import DispatchInfo
from bidict import bidict
from alg.algorithm import AlgorithmBase
if __name__ == '__main__':
# dynamic_excavator_set = set(update_autodisp_excavator())
# dynamic_excavator_num = len(dynamic_excavator_set)
#
# dynamic_dump_set = set(update_autodisp_dump())
# dynamic_dump_num = len(dynamic_dump_set)
# dynamic_excavator_list = []
# for item in (
# session_mysql.query(Dispatch).filter_by(isdeleted=0, isauto=1).all()
# ):
# dynamic_excavator_list.append(item.exactor_id)
# if len(dynamic_excavator_list) < 1:
# raise Exception("无动态派车计划可用-动态派车挖机/卸载设备集合读取异常")
# 更新数据库缓存
DispatchInfo.renew_set()
DispatchInfo.update_device_group_structure()
DispatchInfo.update_route_distance()
#
DispatchInfo.update_group_mode()
a = DispatchInfo.get_group_mode('9bb14655-4fd5-49da-a31a-13f6ced88d6c')
a_excavator = DispatchInfo.get_excavator_dict('9bb14655-4fd5-49da-a31a-13f6ced88d6c')
a_dump = DispatchInfo.get_dump_dict('9bb14655-4fd5-49da-a31a-13f6ced88d6c')
a_truck = DispatchInfo.get_truck_set('9bb14655-4fd5-49da-a31a-13f6ced88d6c')
bb = DispatchInfo.excavator_load_dict
cc = DispatchInfo.load_excavator_dict
# print(bb)
# print(cc)
hh = DispatchInfo.group_excavator_dict
print(hh)
# print(a)
# print(a_excavator)
# print(a_dump)
# print(a_truck)
# for i in a_excavator:
# load = DispatchInfo.get_load_area(i)
# print(load)
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