diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/task/RunTaskUtils.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/task/RunTaskUtils.java index 711fbbb..c8aaff3 100644 --- a/6.program/wms-empty/src/main/java/com/mt/wms/empty/task/RunTaskUtils.java +++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/task/RunTaskUtils.java @@ -80,9 +80,15 @@ public class RunTaskUtils { //type=1为 入 yeya.put("type", 1); if ("YYT003".equals(startPoint.getNote())){ - yeya.put("number", 2); + yeya.put("number", 3); } if ("YYT004".equals(startPoint.getNote())){ + yeya.put("number", 4); + } + if ("YYT002".equals(startPoint.getNote())){ + yeya.put("number", 2); + } + if ("YYT001".equals(startPoint.getNote())){ yeya.put("number", 1); } String yeyaJudgeStatus = JSON.toJSONString(yeya); @@ -95,7 +101,7 @@ public class RunTaskUtils { logger.error(new Date() + "WCS接口超时未响应!"); } //taskStatus==3满足条件,其他状态值说明液压台不满足开始任务的条件(无货物或者有货物但是没提升到位) - if (Integer.parseInt(JSONObject.parseObject(yeyaStatus).get("taskStatus").toString()) != 3){ + if (Integer.parseInt(JSONObject.parseObject(yeyaStatus).get("taskStatus").toString()) != 1){ return R.failed(startPoint.getName()+"号液压台不满足任务执行所必须的条件,请检查液压台是否有货物且提升到位!"); } } @@ -292,12 +298,34 @@ public class RunTaskUtils { //有小车在运行,提示当前有车辆在运行,请稍后 return R.failed("当前轨道有RGV车辆在运动,请等待当前RGV车辆执行完毕再执行任务!"); } - Boolean platFormStatus = platFormStatus(yeyaTaiCode); - if (!platFormStatus){ - // TODO: 2022/3/19 delete - System.out.println("当前选定的液压台为在线或未提升到位,请检查后重试!"); - return R.failed("当前选定的液压台为在线或未提升到位,请检查后重试!"); - } + Map yeya = new HashMap(); + //type=1随意赋值,不用type了 + yeya.put("type", 1); + if ("YYT003".equals(yeyaTaiCode)){ + yeya.put("number", 3); + } + if ("YYT004".equals(yeyaTaiCode)){ + yeya.put("number", 4); + } + if ("YYT002".equals(yeyaTaiCode)){ + yeya.put("number", 2); + } + if ("YYT001".equals(yeyaTaiCode)){ + yeya.put("number", 1); + } + String yeyaJudgeStatus = JSON.toJSONString(yeya); + //判断起点液压台是否在线且提升到位 + String yeyaStatus=null; + try { + yeyaStatus = HttpClient.httpPost("http://192.168.6.51:8009/yeya/isReadyForYeyaStatus", yeyaJudgeStatus); + } catch (IOException e) { + e.printStackTrace(); + logger.error(new Date() + "WCS接口超时未响应!"); + } + //taskStatus==3满足条件,其他状态值说明液压台不满足开始任务的条件(无货物或者有货物但是没提升到位) + if (Integer.parseInt(JSONObject.parseObject(yeyaStatus).get("taskStatus").toString()) != 1){ + return R.failed("液压台"+yeyaTaiCode+"不满足任务执行所必须的条件,请检查液压台是否有货物且提升到位!"); + } //计算出路径最短的车辆id Long vehicleId = taskDistanceUtils.chooseVehicle(location.getCode(), yeyaTaiCode); if (vehicleId==0){