优化获取CNC程序:添加编程方式(人工/自动),如是快速订单,编程方式为人工
This commit is contained in:
@@ -114,7 +114,7 @@ class Manufacturing_Connect(http.Controller):
|
||||
logging.info('RfidCode:%s' % ret['RfidCode'])
|
||||
if 'RfidCode' in ret:
|
||||
workorder = request.env['mrp.workorder'].sudo().search(
|
||||
[('routing_type', '=', '装夹预调'), ('rfid_code', '=', ret['RfidCode'])])
|
||||
[('routing_type', '=', '装夹预调'), ('rfid_code', '=', ret['RfidCode'])], limit=1, order='id asc')
|
||||
if workorder:
|
||||
for item in workorder:
|
||||
if item.material_center_point:
|
||||
@@ -122,8 +122,8 @@ class Manufacturing_Connect(http.Controller):
|
||||
res['Datas'].append({
|
||||
'XOffset': 0 if not item.material_center_point else offset[0],
|
||||
'YOffset': 0 if not item.material_center_point else offset[1],
|
||||
'ZOffet': 0 if not item.material_center_point else offset[2],
|
||||
'COffset': 0 if not item.X_deviation_angle else item.X_deviation_angle,
|
||||
'ZOffset': 0 if not item.material_center_point else offset[2],
|
||||
'COffset': 0,
|
||||
'Coordinate': 'G54'
|
||||
})
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user