Merge branch 'master' of http://git.picaiba.com/mt-ck/mt-qj-wms-hd
Conflicts: 6.program/wms-empty/src/main/java/com/mt/wms/empty/task/RunTaskUtils.java
This commit is contained in:
commit
8047bab61c
@ -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,13 +298,34 @@ 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);
|
||||||
if (vehicleId==0){
|
if (vehicleId==0){
|
||||||
|
Loading…
Reference in New Issue
Block a user