|
|
@ -1,5 +1,6 @@ |
|
|
|
package org.nl.wms.sch.task_manage.task.tasks; |
|
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil; |
|
|
|
import cn.hutool.core.date.DateUtil; |
|
|
|
import cn.hutool.core.lang.Assert; |
|
|
|
import cn.hutool.core.util.ObjectUtil; |
|
|
@ -102,25 +103,36 @@ public class POINTTask extends AbstractTask { |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
task.setTask_status(TaskStatus.CREATED.getCode()); |
|
|
|
task.setVehicle_code(schBasePoint.getVehicle_code()); |
|
|
|
task.setVehicle_code2(schBasePoint.getVehicle_code2()); |
|
|
|
task.setRemark("下发"); |
|
|
|
taskService.update(task); |
|
|
|
//复制对象
|
|
|
|
SchBaseTask acs_task = BeanUtil.copyProperties(task,SchBaseTask.class); |
|
|
|
acs_task.setVehicle_code(schBasePoint.getVehicle_code()); |
|
|
|
acs_task.setVehicle_code2(schBasePoint.getVehicle_code2()); |
|
|
|
//下发
|
|
|
|
JSONObject result = this.renotifyAcs(acs_task); |
|
|
|
String status = result.getString("status"); |
|
|
|
//下发成功
|
|
|
|
if("200".equals(status)){ |
|
|
|
task.setTask_status(TaskStatus.CREATED.getCode()); |
|
|
|
task.setRemark("下发"); |
|
|
|
task.setVehicle_code(schBasePoint.getVehicle_code()); |
|
|
|
task.setVehicle_code2(schBasePoint.getVehicle_code2()); |
|
|
|
taskService.update(task); |
|
|
|
|
|
|
|
//发起任务时先把点位占用,防止发起重复任务
|
|
|
|
schBasePoint.setIng_task_code(task.getTask_code()); |
|
|
|
pointService.update(schBasePoint); |
|
|
|
nextSchBasePoint.setIng_task_code(task.getTask_code()); |
|
|
|
pointService.update(nextSchBasePoint); |
|
|
|
//去回温库的任务,更细工单表
|
|
|
|
if(nextSchBasePoint.getPoint_code().contains("XHW")){ |
|
|
|
//pdm_bd_workorder_two任务完成时,status改为2出库中
|
|
|
|
workorderService.update(schBasePoint.getVehicle_code2(),"2"); |
|
|
|
//发起任务时先把点位占用,防止发起重复任务
|
|
|
|
schBasePoint.setIng_task_code(task.getTask_code()); |
|
|
|
pointService.update(schBasePoint); |
|
|
|
nextSchBasePoint.setIng_task_code(task.getTask_code()); |
|
|
|
pointService.update(nextSchBasePoint); |
|
|
|
//去回温库的任务,更细工单表
|
|
|
|
if(nextSchBasePoint.getPoint_code().contains("XHW")){ |
|
|
|
//pdm_bd_workorder_two任务完成时,status改为2出库中
|
|
|
|
workorderService.update(schBasePoint.getVehicle_code2(),"2"); |
|
|
|
} |
|
|
|
now_num++; |
|
|
|
}else{ |
|
|
|
task.setRemark("下发acs失败:"+result.toString()); |
|
|
|
taskService.update(task); |
|
|
|
} |
|
|
|
//下发
|
|
|
|
this.renotifyAcs(task); |
|
|
|
now_num++; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|