修复工件配送时间
This commit is contained in:
@@ -445,7 +445,7 @@ class Manufacturing_Connect(http.Controller):
|
||||
('production_id', '=', wd.production_id.id)])
|
||||
if next_workpiece:
|
||||
logging.info('next_workpiece:%s' % next_workpiece.delivery_num)
|
||||
next_workpiece.write({'status': '待下发'})
|
||||
next_workpiece.write({'status': '待下发', 'task_delivery_time': datetime.now()})
|
||||
else:
|
||||
res = {'Succeed': False, 'ErrorCode': 203, 'Error': '该DeviceId没有对应的已配送工件数据'}
|
||||
else:
|
||||
@@ -497,10 +497,11 @@ class Manufacturing_Connect(http.Controller):
|
||||
('production_id', '=', wd.production_id.id)])
|
||||
if next_workpiece:
|
||||
logging.info('next_workpiece:%s' % next_workpiece.delivery_num)
|
||||
next_workpiece.write({'status': '待下发'})
|
||||
next_workpiece.write({'status': '待下发', 'task_delivery_time': datetime.now()})
|
||||
if delivery_Arr:
|
||||
logging.info('delivery_Arr:%s' % delivery_Arr)
|
||||
delivery_workpiece = request.env['sf.workpiece.delivery'].sudo().search([('id','in',delivery_Arr)])
|
||||
delivery_workpiece = request.env['sf.workpiece.delivery'].sudo().search(
|
||||
[('id', 'in', delivery_Arr)])
|
||||
if delivery_workpiece:
|
||||
logging.info('开始向agv下发下产线任务')
|
||||
delivery_workpiece._delivery_avg()
|
||||
|
||||
Reference in New Issue
Block a user