调整爆出位置
This commit is contained in:
@@ -100,7 +100,8 @@ class Sf_Mrs_Connect(http.Controller, MultiInheritController):
|
||||
|
||||
# 更新编程记录
|
||||
for production in productions:
|
||||
record_ids_obj = production.programming_record_ids.filtered(lambda r: r.current_programming_count == ret['reprogramming_num'])
|
||||
record_ids_obj = production.programming_record_ids.filtered(
|
||||
lambda r: r.current_programming_count == ret['reprogramming_num'])
|
||||
if record_ids_obj:
|
||||
record_ids_obj.write({'send_time': ret['send_time']})
|
||||
if ret['reprogramming_num'] == 0:
|
||||
@@ -130,12 +131,15 @@ class Sf_Mrs_Connect(http.Controller, MultiInheritController):
|
||||
'production_ids': productions.ids
|
||||
})
|
||||
|
||||
# 对制造订单所以面的cnc工单的程序用刀进行校验
|
||||
# 对制造订单所有面的cnc工单的程序用刀进行校验
|
||||
try:
|
||||
logging.info(f'已更新制造订单:{productions}')
|
||||
productions.production_cnc_tool_checkout()
|
||||
re_tool_chekout = False
|
||||
re_tool_chekout = productions.production_cnc_tool_checkout()
|
||||
if re_tool_chekout:
|
||||
return json.JSONEncoder().encode({'status': -2, 'message': '对cnc工单的程序用刀进行校验失败'})
|
||||
except Exception as e:
|
||||
res = {'status': -2, 'message': '对cnc工单的程序用刀进行校验失败'}
|
||||
# res = {'status': -2, 'message': '对cnc工单的程序用刀进行校验失败'}
|
||||
logging.info(f'对cnc工单的程序用刀进行校验报错:{e}')
|
||||
return json.JSONEncoder().encode(res)
|
||||
|
||||
|
||||
@@ -203,6 +203,7 @@ class MrpProduction(models.Model):
|
||||
self.write({'programming_state': '编程中', 'work_state': '编程中'})
|
||||
self[0].workorder_ids.filtered(
|
||||
lambda a: a.name == '装夹预调' and a.state not in ['rework', 'done', 'cancel'])._compute_state()
|
||||
return True
|
||||
if missing_tool_1:
|
||||
logging.info(f'线边、机内缺刀:{missing_tool_1}')
|
||||
# 修改 修改cnc程序的‘刀具状态’ 为 ‘缺刀’
|
||||
|
||||
Reference in New Issue
Block a user