更新
This commit is contained in:
@@ -16,6 +16,7 @@ import org.nl.acs.device_driver.basedriver.empty_vehicle_stacking_position.Empty
|
||||
import org.nl.acs.device_driver.basedriver.hongxiang_conveyor.HongXiangStationDeviceDriver;
|
||||
import org.nl.acs.device_driver.basedriver.hongxiang_device.HongXiangConveyorDeviceDriver;
|
||||
import org.nl.acs.device_driver.basedriver.plug_pull_device_site.PlugPullDeviceSiteDeviceDriver;
|
||||
import org.nl.acs.device_driver.basedriver.siemens_conveyor.SiemensConveyorDeviceDriver;
|
||||
import org.nl.acs.device_driver.basedriver.standard_conveyor_control_with_scanner.StandardCoveyorControlWithScannerDeviceDriver;
|
||||
import org.nl.acs.device_driver.basedriver.standard_ordinary_site.StandardOrdinarySiteDefination;
|
||||
import org.nl.acs.device_driver.basedriver.standard_ordinary_site.StandardOrdinarySiteDeviceDriver;
|
||||
@@ -585,6 +586,22 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
if (StrUtil.isEmpty(route_plan_code)) {
|
||||
route_plan_code = "normal";
|
||||
}
|
||||
Device device = deviceAppService.findDeviceByCode(next_device_code);
|
||||
SiemensConveyorDeviceDriver siemensConveyorDeviceDriver;
|
||||
if(device.getDeviceDriver() instanceof SiemensConveyorDeviceDriver) {
|
||||
siemensConveyorDeviceDriver = (SiemensConveyorDeviceDriver) device.getDeviceDriver();
|
||||
if (ObjectUtil.equal("true", siemensConveyorDeviceDriver.getExtraValue().get("inspect_in_stock"))) {
|
||||
if(siemensConveyorDeviceDriver.getMove() == 1)
|
||||
{
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("task_code", task_code);
|
||||
json.put("ext_task_id", ext_task_id);
|
||||
json.put("message", "终点有货无法生成任务");
|
||||
errArr.add(json);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( StrUtil.equals(task_type,"5") && taskService.querySameDeviceReadyTask(start_device_code,next_device_code,"0") > 1){
|
||||
JSONObject json = new JSONObject();
|
||||
@@ -665,18 +682,6 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
try {
|
||||
// task_type=7 则是立库任务需要下刻下发
|
||||
if (StrUtil.equals(task_dto.getTask_type(), "7")) {
|
||||
// taskService.create(task_dto);
|
||||
// try{
|
||||
// taskService.createInst(task_dto.getTask_id());
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// JSONObject json = new JSONObject();
|
||||
// json.put("task_code", task_code);
|
||||
// json.put("ext_task_id", ext_task_id);
|
||||
// json.put("message", "创建指令失败:"+e.getMessage());
|
||||
// errArr.add(json);
|
||||
// }
|
||||
|
||||
//创建临时指令 不创建、不生成
|
||||
//等立库反馈成功才能创建任务和指令
|
||||
Instruction inst = taskService.createTemporaryInst(task_dto);
|
||||
|
||||
Reference in New Issue
Block a user