修改尾数控制和状态监控逻辑
This commit is contained in:
@ -108,7 +108,9 @@ class TCPServer:
|
||||
print(f"收到异常生产通知 - 时间: {timestamp}, ERP ID: {erp_id}")
|
||||
# 调用update_custom_table_status更新数据库状态
|
||||
try:
|
||||
update_custom_table_status(erp_id, "异常生产")
|
||||
from services.task_service import TaskService
|
||||
task_service = TaskService()
|
||||
task_service.update_custom_table_status(erp_id, "异常生产")
|
||||
print(f"数据库状态已更新为: 异常生产 (ERP ID: {erp_id})")
|
||||
except Exception as e:
|
||||
print(f"更新数据库状态时出错: {e}")
|
||||
@ -116,7 +118,9 @@ class TCPServer:
|
||||
print(f"收到中断生产通知 - 时间: {timestamp}, ERP ID: {erp_id}")
|
||||
# 调用update_custom_table_status更新数据库状态
|
||||
try:
|
||||
update_custom_table_status(erp_id, "取消生产")
|
||||
from services.task_service import TaskService
|
||||
task_service = TaskService()
|
||||
task_service.update_custom_table_status(erp_id, "取消生产")
|
||||
print(f"数据库状态已更新为: 取消生产 (ERP ID: {erp_id})")
|
||||
except Exception as e:
|
||||
print(f"更新数据库状态时出错: {e}")
|
||||
|
||||
Reference in New Issue
Block a user