Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/修改机床参数bug

This commit is contained in:
qihao.gong@jikimo.com
2024-02-23 11:58:26 +08:00
5 changed files with 39 additions and 20 deletions

View File

@@ -362,7 +362,10 @@ class Manufacturing_Connect(http.Controller):
workpiece_delivery = request.env['sf.workpiece.delivery'].sudo().search(
[('feeder_station_destination', '=', ret['DeviceId'])])
if workpiece_delivery:
workpiece_delivery.production_id.write({'production_line_state': '已上产线'})
for wd in workpiece_delivery:
if wd.production_id.production_line_state == '待上产线':
logging.info('wd.production_id:%s' % workpiece_delivery.production_id.id)
wd.production_id.write({'production_line_state': '已上产线'})
else:
res = {'Succeed': False, 'ErrorCode': 203, 'Error': '该DeviceId没有对应的工件配送数据'}
else:
@@ -391,7 +394,10 @@ class Manufacturing_Connect(http.Controller):
workpiece_delivery = request.env['sf.workpiece.delivery'].sudo().search(
[('feeder_station_destination', '=', ret['DeviceId'])])
if workpiece_delivery:
workpiece_delivery.production_id.write({'production_line_state': '已下产线'})
for wd in workpiece_delivery:
if wd.production_id.production_line_state == '已上产线':
logging.info('wd.production_id:%s' % workpiece_delivery.production_id.id)
wd.production_id.write({'production_line_state': '已下产线'})
else:
res = {'Succeed': False, 'ErrorCode': 203, 'Error': '该DeviceId没有对应的工件配送数据'}
else: