修改尾数控制和状态监控逻辑

This commit is contained in:
xiongyi
2025-11-13 16:50:50 +08:00
parent ec51d2f786
commit f7fbe2921c
40 changed files with 160 additions and 2299 deletions

View File

@ -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}")