فهرست منبع

2024/01/11 端口id修改

wk 1 سال پیش
والد
کامیت
e2f2650f4f
1فایلهای تغییر یافته به همراه2 افزوده شده و 5 حذف شده
  1. 2 5
      指令检查节点/node.py

+ 2 - 5
指令检查节点/node.py

@@ -16,9 +16,6 @@ import check_command_ZKXY as CHE_ZKXY
 import mytool.json_helper.parse_json as parse_json
 from http.server import HTTPServer, BaseHTTPRequestHandler
 from mytool.log_helper.logger import HandleLog
-
-
-
 def check_park_command(body):
     # print("接收停车指令 %s  message:%s" % (datetime.datetime.now(), body))
     log.info("接收停车指令 %s    message:%s" % (datetime.datetime.now(),body[0:260]))
@@ -33,7 +30,7 @@ def check_park_command(body):
     g_rabbitmq.publish(mq_config['mq_command_exchange_name'], response_port, tf.MessageToString(cmd, as_utf8=True))
     if cmd.statu.execute_statu == message.eNormal:
         # 指令检查正常
-        dispatch_key = "dispatch_park_command_request_port"
+        dispatch_key = "dispatch_park_command_%d_request_port" % cmd.unit_id
         g_rabbitmq.publish(mq_config['mq_command_exchange_name'], dispatch_key, tf.MessageToString(table, as_utf8=True))
         log.info("停车指令 %s OK:%s    检查成功!\n" % (datetime.datetime.now(), tf.MessageToString(table, as_utf8=True)))
     else:
@@ -67,7 +64,7 @@ def check_pick_command(body):
     if cmd.statu.execute_statu == message.eNormal and cmd.statu.table_process_mod != message.PROCESS_ONLY_TO_PAY:
         # 指令检查正常
         log.info("取车指令 %s OK :%s    检查成功!\n" % (datetime.datetime.now(), tf.MessageToString(cmd, as_utf8=True)))
-        dispatch_key = "dispatch_pick_command_request_port"
+        dispatch_key = "dispatch_pick_command_%d_request_port" % cmd.unit_id
         g_rabbitmq.publish(mq_config['mq_command_exchange_name'], dispatch_key, tf.MessageToString(cmd, as_utf8=True))
     else:
         if cmd.statu.execute_statu == message.eWarning: