Browse Source

修复psid判断类型错误,天津列入新的建模流程

master
youwater 2 years ago
parent
commit
6459771b01
  1. 3
      libs/config.py
  2. 4
      libs/libs_db.py

3
libs/config.py

@ -82,14 +82,13 @@ ps_floor_sticker = {
"default" : floor_sticker_distances['v2'], "default" : floor_sticker_distances['v2'],
"1" : floor_sticker_distances['v5'], "1" : floor_sticker_distances['v5'],
"13" : floor_sticker_distances['v1'], "13" : floor_sticker_distances['v1'],
"17" : floor_sticker_distances['v1'],
"18" : floor_sticker_distances['v1'], "18" : floor_sticker_distances['v1'],
"29" : floor_sticker_distances['v1'], "29" : floor_sticker_distances['v1'],
"85" : floor_sticker_distances['v4'], "85" : floor_sticker_distances['v4'],
} }
# 需要加入新建模系统的影棚 # 需要加入新建模系统的影棚
new_make_psids = ['1', '29', '44', '54', '55', '63', '65', '77', '79', '80', '85', '86'] new_make_psids = ['1', '17', '29', '44', '54', '55', '63', '65', '77', '79', '80', '85', '86']
#企业微信通知人员 #企业微信通知人员
notify_user_Ids = ["DongZhangXi","YouShui"] notify_user_Ids = ["DongZhangXi","YouShui"]

4
libs/libs_db.py

@ -39,9 +39,9 @@ def add_task(data):
cursor = conn.cursor() cursor = conn.cursor()
#判断是否是昆山教学的,是的话优先级设置为默认 #判断是否是昆山教学的,是的话优先级设置为默认
if data["psid"] == 85: if data["psid"] == '85':
sql = f'insert into tasks (task_type, task_key) values ("{data["task_type"]}", "{data["task_key"]}")' sql = f'insert into tasks (task_type, task_key) values ("{data["task_type"]}", "{data["task_key"]}")'
elif data["psid"] == 1: elif data["psid"] == '1':
#实验室的订单走分布式处理 #实验室的订单走分布式处理
sql = f'insert into task_distributed (task_type, task_key, priority,created_at) values ("{data["task_type"]}", "{data["task_key"]}", 1,"{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())}")' sql = f'insert into task_distributed (task_type, task_key, priority,created_at) values ("{data["task_type"]}", "{data["task_key"]}", 1,"{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())}")'
else: else:

Loading…
Cancel
Save