Conflicts:
	6.program/wms-empty/src/main/java/com/mt/wms/empty/task/RunTaskUtils.java
This commit is contained in:
lgh 2022-07-15 16:11:30 +08:00
commit 8047bab61c

View File

@ -80,9 +80,15 @@ public class RunTaskUtils {
//type=1为 //type=1为
yeya.put("type", 1); yeya.put("type", 1);
if ("YYT003".equals(startPoint.getNote())){ if ("YYT003".equals(startPoint.getNote())){
yeya.put("number", 2); yeya.put("number", 3);
} }
if ("YYT004".equals(startPoint.getNote())){ 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); yeya.put("number", 1);
} }
String yeyaJudgeStatus = JSON.toJSONString(yeya); String yeyaJudgeStatus = JSON.toJSONString(yeya);
@ -95,7 +101,7 @@ public class RunTaskUtils {
logger.error(new Date() + "WCS接口超时未响应"); logger.error(new Date() + "WCS接口超时未响应");
} }
//taskStatus==3满足条件其他状态值说明液压台不满足开始任务的条件无货物或者有货物但是没提升到位 //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()+"号液压台不满足任务执行所必须的条件,请检查液压台是否有货物且提升到位!"); return R.failed(startPoint.getName()+"号液压台不满足任务执行所必须的条件,请检查液压台是否有货物且提升到位!");
} }
} }
@ -292,12 +298,33 @@ public class RunTaskUtils {
//有小车在运行提示当前有车辆在运行请稍后 //有小车在运行提示当前有车辆在运行请稍后
return R.failed("当前轨道有RGV车辆在运动请等待当前RGV车辆执行完毕再执行任务"); return R.failed("当前轨道有RGV车辆在运动请等待当前RGV车辆执行完毕再执行任务");
} }
Boolean platFormStatus = platFormStatus(yeyaTaiCode); Map<String, Object> yeya = new HashMap();
//type=1随意赋值不用type了
if (!platFormStatus){ yeya.put("type", 1);
// TODO: 2022/3/19 delete if ("YYT003".equals(yeyaTaiCode)){
System.out.println("当前选定的液压台为在线或未提升到位,请检查后重试!"); yeya.put("number", 3);
return R.failed("当前选定的液压台为在线或未提升到位,请检查后重试!"); }
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 //计算出路径最短的车辆id
Long vehicleId = taskDistanceUtils.chooseVehicle(location.getCode(), yeyaTaiCode); Long vehicleId = taskDistanceUtils.chooseVehicle(location.getCode(), yeyaTaiCode);