diff --git a/dao/inspection_dao.py b/dao/inspection_dao.py index 0337638..eda0d20 100644 --- a/dao/inspection_dao.py +++ b/dao/inspection_dao.py @@ -827,7 +827,7 @@ class InspectionDAO: try: sql = """ SELECT DISTINCT data_corp, user_id, user_name, gzl_zl, mzl, ddmo, xpack, qd, spack_type, mxzs, jt, ddnote, code, type, lable, lib, gzl, maxsl, cz, size, cd, luno, - qfqd, pono, xj, ysl, dycz, zx_code, edit_id, remarks, zx_name, bccd, tccd, zzyq, customer, customerexp, bz_bqd as bqd, bz_tqd as tqd, type_name, remarks_hb + coalesce(qfqd,'') as qfqd, pono, xj, ysl, dycz, zx_code, edit_id, remarks, zx_name, bccd, tccd, zzyq, customer, customerexp, bz_bqd as bqd, bz_tqd as tqd, type_name, remarks_hb FROM wsbz_order_info WHERE ddmo = ? """ params = (order_id,) diff --git a/db/jtDB.db b/db/jtDB.db index 128bcfc..23878a9 100644 Binary files a/db/jtDB.db and b/db/jtDB.db differ diff --git a/from pymodbus.py b/from pymodbus.py index bff86fa..62e789a 100644 --- a/from pymodbus.py +++ b/from pymodbus.py @@ -2,7 +2,7 @@ from pymodbus.client import ModbusTcpClient import time client = ModbusTcpClient('localhost', port=5020) client.connect() -client.write_registers(address=11, values=[14322]) +client.write_registers(address=11, values=[5962]) # client.write_registers(address=3, values=[0]) # time.sleep(2) # client.write_registers(address=0, values=[0]) diff --git a/widgets/main_window.py b/widgets/main_window.py index abde4b4..ddc3f42 100644 --- a/widgets/main_window.py +++ b/widgets/main_window.py @@ -4738,4 +4738,7 @@ class MainWindow(MainWindowUI): except Exception as e: logging.error(f"处理炉号选择失败: {str(e)}") from PySide6.QtWidgets import QMessageBox - QMessageBox.critical(self, "错误", f"处理炉号选择失败: {str(e)}") \ No newline at end of file + QMessageBox.critical(self, "错误", f"处理炉号选择失败: {str(e)}") + +def safe_str(val): + return "" if val is None else str(val) \ No newline at end of file