Accept Merge Request #981: (feature/修复工件配送时间 -> develop)
Merge Request: 修复工件配送时间 Created By: @杨金灵 Reviewed By: @马广威 Approved By: @马广威 Accepted By: @杨金灵 URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/981?initial=true
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()
|
||||
|
||||
@@ -31,7 +31,7 @@ class Workpiece(http.Controller):
|
||||
[('production_id.name', '=', req_code.rsplit('-', 1)[0]),
|
||||
('delivery_num', '=', req_code.strip())])
|
||||
if workpiece_delivery:
|
||||
workpiece_delivery.write({'status': '已配送', 'task_completion_time': ret['reqTime']})
|
||||
workpiece_delivery.write({'status': '已配送', 'task_completion_time': datetime.now()})
|
||||
else:
|
||||
res = {'Succeed': False, 'ErrorCode': 203,
|
||||
'Error': '该reqCode暂未查到对应的工件配送记录'}
|
||||
|
||||
@@ -1128,8 +1128,8 @@ class WorkPieceDelivery(models.Model):
|
||||
is_not_route += 1
|
||||
else:
|
||||
raise UserError('请选择【任务路线】再进行配送')
|
||||
if production_type != item.type:
|
||||
raise UserError('请选择类型为【上产线】的制造订单进行配送')
|
||||
# if production_type != item.type:
|
||||
# raise UserError('请选择类型为【上产线】的制造订单进行配送')
|
||||
if down_status != item.status:
|
||||
raise UserError('请选择状态为【待下发】的制造订单进行配送')
|
||||
if same_production_line_id is None:
|
||||
|
||||
Reference in New Issue
Block a user