feat: 添加强度

This commit is contained in:
zhu-mengmeng 2025-07-18 14:35:38 +08:00
parent 83a3426219
commit 9fa3ed66f7
3 changed files with 17 additions and 6 deletions

Binary file not shown.

View File

@ -371,9 +371,6 @@ class MainWindowUI(QMainWindow):
# 设置表格填充整个容器
self.info_table.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
# 禁用滚动条,避免用户误触
self.info_table.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
self.info_table.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
# 添加表格到主布局
self.material_content_layout.addWidget(self.info_table)

View File

@ -99,6 +99,7 @@ class MainWindow(MainWindowUI):
self._current_unload_info = None # 存储当前下料信息
self._loading_info = None # 存储上料对话框的信息
self._is_loading_active = False # 标识上料任务是否正在进行
self._current_gc_qd = 0 # 当前工程号的强度数据
# 信号的连接在connect_signals方法中统一处理不在这里连接
@ -723,8 +724,20 @@ class MainWindow(MainWindowUI):
logging.info(f"输入的工程号: {gc_note}")
#判断是否是接口,如果不是接口直接添加如果是则走接口
# 如果开启接口模式,则需要调用接口同步到业务库
self.add_new_inspection_row(gc_note, self._current_order_code)
if AppMode.is_api():
from dao.inspection_dao import InspectionDAO
from apis.gc_api import GcApi
inspection_dao = InspectionDAO()
# 调用接口
gc_api = GcApi()
response = gc_api.get_gc_info(gc_note)
if response.get("status", False):
gc_info = response.get("data", {})
self._current_gc_qd = gc_info.get("qd",0)
self.update_info_table({"qd": self._current_gc_qd})
self.add_new_inspection_row(gc_note, self._current_order_code)
else:
self.add_new_inspection_row(gc_note, self._current_order_code)
else:
logging.warning("工程号为空")
@ -2005,7 +2018,8 @@ class MainWindow(MainWindowUI):
info['mzl'] = weight_kg
info['printsl'] = 1
info['pono'] = self._current_order_code
info["dycz"] = info.get("cz")
info["dycz"] = info.get("cz")
info['qd'] = self._current_gc_qd
# 获取本机IP地址
# import socket
# try: