修改字段名称,为一键下发增加异常捕获
This commit is contained in:
@@ -185,7 +185,7 @@ class Machine_ftp(models.Model):
|
||||
y_compensation_node = fields.Char('y补偿值节点')
|
||||
# 数采配置相关
|
||||
machine_ip = fields.Char('机床IP')
|
||||
machine_signed = fields.Char('刷新间隔')
|
||||
machine_signed = fields.Char('机床刷新间隔')
|
||||
machine_status = fields.Char('机床在线状态')
|
||||
machine_time_on = fields.Char('机床总在线时长')
|
||||
machine_tool_num = fields.Char('机床当前刀具')
|
||||
@@ -318,6 +318,7 @@ class WorkCenterBarcode(models.Model):
|
||||
print(host, port, username, pwd, remote_path)
|
||||
ftp = ftp_operate.FtpController(host, port, username, pwd)
|
||||
# ftp.delAllfile('C://Users//马广威//Desktop//ftp')
|
||||
try:
|
||||
for item in self.cnc_ids:
|
||||
a = item.cnc_id
|
||||
print(a.display_name)
|
||||
@@ -338,9 +339,9 @@ class WorkCenterBarcode(models.Model):
|
||||
_logger.info("=====================11================")
|
||||
ftp.upload_file(remotepath=file_path_remote, localpath=file_path_local)
|
||||
# _logger.info("=====================22================")
|
||||
# except Exception as e:
|
||||
# _logger.info("=====================================", e)
|
||||
# raise UserError('NC下发执行超时, 请检查下发状态')
|
||||
except Exception as e:
|
||||
_logger.info("=====================================", e)
|
||||
raise UserError('NC下发执行超时, 请检查下发状态')
|
||||
# 下发都执行完毕后,按钮标志位变为true
|
||||
self.button_up_all_state = True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user