feat: 添加上工程支持
This commit is contained in:
parent
ef77566b1d
commit
976080683f
BIN
db/jtDB.db
BIN
db/jtDB.db
Binary file not shown.
@ -2,7 +2,7 @@ from pymodbus.client import ModbusTcpClient
|
||||
import time
|
||||
client = ModbusTcpClient('localhost', port=5020)
|
||||
client.connect()
|
||||
client.write_registers(address=11, values=[2922])
|
||||
client.write_registers(address=11, values=[3922])
|
||||
# client.write_registers(address=3, values=[0])
|
||||
# time.sleep(2)
|
||||
# client.write_registers(address=0, values=[0])
|
||||
|
||||
@ -919,6 +919,7 @@ class MainWindow(MainWindowUI):
|
||||
if response.get("status", False):
|
||||
gc_info = response.get("data", {})
|
||||
self._current_gc_qd = gc_info.get("qd",0)
|
||||
self._current_gc_sc_gch = gc_info.get("sc_gch", "") # 保存sc_gch字段
|
||||
# 先获取当前 info_table 已有的数据
|
||||
order_info = {}
|
||||
for field_name, label in self.info_values.items():
|
||||
@ -2232,6 +2233,12 @@ class MainWindow(MainWindowUI):
|
||||
info['jt'] = "" # 默认值
|
||||
else:
|
||||
info['jt'] = "" # 默认值
|
||||
|
||||
# 添加sc_gch信息
|
||||
if hasattr(self, '_current_gc_sc_gch') and self._current_gc_sc_gch:
|
||||
info['sc_gch'] = self._current_gc_sc_gch
|
||||
else:
|
||||
info['sc_gch'] = "" # 默认值
|
||||
# 获取本机IP地址
|
||||
# import socket
|
||||
# try:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user