1、优化刀具接口

This commit is contained in:
yuxianghui
2024-02-22 18:12:51 +08:00
parent e27f2f72bf
commit 3c4a2b58b1
6 changed files with 79 additions and 52 deletions

View File

@@ -11,12 +11,11 @@ class CNCprocessing(models.Model):
# ==========MES装刀指令接口==========
def register_cnc_processing(self, cnc_processing):
create_url = '/AutoDeviceApi/ToolLoadInstruct'
sf_sync_config = self.env['res.config.settings'].get_values()
token = sf_sync_config['token']
sf_secret_key = sf_sync_config['sf_secret_key']
headers = Common.get_headers(self, token, sf_secret_key)
strurl = sf_sync_config['sf_url'] + create_url
strurl = "https://x24467i973.zicp.fun/AutoDeviceApi/ToolLoadInstruct"
val = {
'DeviceId': cnc_processing.workorder_id.machine_tool_name,
'RfidCode': None,