|
@ -116,7 +116,7 @@ public class KGHJRKTask extends AbstractTask { |
|
|
if ("A1".equals(startPoint.getWorkshop_code())) { |
|
|
if ("A1".equals(startPoint.getWorkshop_code())) { |
|
|
//A1空架到HCQ1
|
|
|
//A1空架到HCQ1
|
|
|
regionCode = "HCQ7"; |
|
|
regionCode = "HCQ7"; |
|
|
regionCode2 ="HCQ1"; |
|
|
regionCode2 = "HCQ1"; |
|
|
if ("1".equals(vehicleType)) { |
|
|
if ("1".equals(vehicleType)) { |
|
|
regionCode = "ZJBKGHJDJW"; |
|
|
regionCode = "ZJBKGHJDJW"; |
|
|
} |
|
|
} |
|
@ -133,7 +133,9 @@ public class KGHJRKTask extends AbstractTask { |
|
|
for (int i = schBasePointList.size() - 1; i >= 0; i--) { |
|
|
for (int i = schBasePointList.size() - 1; i >= 0; i--) { |
|
|
SchBasePoint temp = schBasePointList.get(i); |
|
|
SchBasePoint temp = schBasePointList.get(i); |
|
|
if (temp.getVehicle_qty() > 1 && |
|
|
if (temp.getVehicle_qty() > 1 && |
|
|
ObjectUtil.isEmpty(temp.getIng_task_code())) { |
|
|
//放货三拖一起放,只能到01位置
|
|
|
|
|
|
temp.getPoint_code().endsWith("01") |
|
|
|
|
|
&& ObjectUtil.isEmpty(temp.getIng_task_code())) { |
|
|
if (schBasePoint != null) { |
|
|
if (schBasePoint != null) { |
|
|
log.info("空固化架放货找到当前点位有货:{},取上一个空位:{}", temp.getPoint_code(), schBasePoint.getPoint_code()); |
|
|
log.info("空固化架放货找到当前点位有货:{},取上一个空位:{}", temp.getPoint_code(), schBasePoint.getPoint_code()); |
|
|
} else { |
|
|
} else { |
|
@ -143,12 +145,12 @@ public class KGHJRKTask extends AbstractTask { |
|
|
} |
|
|
} |
|
|
schBasePoint = temp; |
|
|
schBasePoint = temp; |
|
|
} |
|
|
} |
|
|
if(ObjectUtil.isEmpty(schBasePoint)){ |
|
|
if (ObjectUtil.isEmpty(schBasePoint)) { |
|
|
schBasePointList = pointMapper.findPointByRegion(regionCode2, "1"); |
|
|
schBasePointList = pointMapper.findPointByRegion(regionCode2, "1"); |
|
|
for (int i = schBasePointList.size() - 1; i >= 0; i--) { |
|
|
for (int i = schBasePointList.size() - 1; i >= 0; i--) { |
|
|
SchBasePoint temp = schBasePointList.get(i); |
|
|
SchBasePoint temp = schBasePointList.get(i); |
|
|
//三拖一起放,如果不是01结尾直接跳过
|
|
|
//三拖一起放,如果不是01结尾直接跳过
|
|
|
if(!temp.getPoint_code().endsWith("01")){ |
|
|
if (!temp.getPoint_code().endsWith("01")) { |
|
|
continue; |
|
|
continue; |
|
|
} |
|
|
} |
|
|
if (temp.getVehicle_qty() == 1 && |
|
|
if (temp.getVehicle_qty() == 1 && |
|
@ -191,10 +193,13 @@ public class KGHJRKTask extends AbstractTask { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
String startPoint = taskObj.getPoint_code1(); // 获取起点
|
|
|
String startPoint = taskObj.getPoint_code1(); // 获取起点
|
|
|
|
|
|
if (taskObj.getPoint_code2().startsWith("QHQ")) { |
|
|
|
|
|
taskObj.setPoint_code2("HCQ" + taskObj.getPoint_code2().substring(3)); |
|
|
|
|
|
} |
|
|
String endPoint = taskObj.getPoint_code2(); // 获取终点
|
|
|
String endPoint = taskObj.getPoint_code2(); // 获取终点
|
|
|
SchBasePoint startPointObj = pointService.getById(startPoint); |
|
|
SchBasePoint startPointObj = pointService.getById(startPoint); |
|
|
if (endPoint.startsWith("ZJBDJW")) { |
|
|
if (endPoint.startsWith("ZJBDJW")) { |
|
|
endPoint=endPoint.substring(0,endPoint.length()-2); |
|
|
endPoint = endPoint.substring(0, endPoint.length() - 2); |
|
|
} |
|
|
} |
|
|
SchBasePoint endPointObj = pointService.getById(endPoint); |
|
|
SchBasePoint endPointObj = pointService.getById(endPoint); |
|
|
// 根据传来的类型去对任务进行操作
|
|
|
// 根据传来的类型去对任务进行操作
|
|
@ -207,16 +212,15 @@ public class KGHJRKTask extends AbstractTask { |
|
|
endPointObj.setIng_task_code(""); |
|
|
endPointObj.setIng_task_code(""); |
|
|
endPointObj.setVehicle_qty(1); |
|
|
endPointObj.setVehicle_qty(1); |
|
|
pointService.update(endPointObj); |
|
|
pointService.update(endPointObj); |
|
|
if("HCQ7".equals(endPointObj.getRegion_code())){ |
|
|
endPointObj = pointService.getById(endPoint.substring(0, endPoint.length() - 1) + "2"); |
|
|
endPointObj = pointService.getById(endPoint.substring(0,endPoint.length()-1)+"2"); |
|
|
endPointObj.setIng_task_code(""); |
|
|
endPointObj.setIng_task_code(""); |
|
|
endPointObj.setVehicle_qty(1); |
|
|
endPointObj.setVehicle_qty(1); |
|
|
pointService.update(endPointObj); |
|
|
pointService.update(endPointObj); |
|
|
endPointObj = pointService.getById(endPoint.substring(0, endPoint.length() - 1) + "3"); |
|
|
endPointObj = pointService.getById(endPoint.substring(0,endPoint.length()-1)+"3"); |
|
|
endPointObj.setIng_task_code(""); |
|
|
endPointObj.setIng_task_code(""); |
|
|
endPointObj.setVehicle_qty(1); |
|
|
endPointObj.setVehicle_qty(1); |
|
|
pointService.update(endPointObj); |
|
|
pointService.update(endPointObj); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 任务完成
|
|
|
// 任务完成
|
|
|
taskObj.setTask_status(TaskStatus.FINISHED.getCode()); |
|
|
taskObj.setTask_status(TaskStatus.FINISHED.getCode()); |
|
@ -255,7 +259,7 @@ public class KGHJRKTask extends AbstractTask { |
|
|
schBaseTask.setPoint_code2(point.getPoint_code() + "0" + (point.getVehicle_qty() + 1)); |
|
|
schBaseTask.setPoint_code2(point.getPoint_code() + "0" + (point.getVehicle_qty() + 1)); |
|
|
} else { |
|
|
} else { |
|
|
//空架缓存区不需要该逻辑,左右都是同一套点位体系
|
|
|
//空架缓存区不需要该逻辑,左右都是同一套点位体系
|
|
|
if(!"HCQ7".equals(point.getRegion_code())) { |
|
|
if (!"HCQ7".equals(point.getRegion_code())) { |
|
|
schBaseTask.setPoint_code2(point.getPoint_code().replace("HCQ", "QHQ")); |
|
|
schBaseTask.setPoint_code2(point.getPoint_code().replace("HCQ", "QHQ")); |
|
|
} |
|
|
} |
|
|
if (ObjectUtil.isNotEmpty(point.getIng_task_code()) && !schBaseTask.getTask_code().equals(point.getIng_task_code())) { |
|
|
if (ObjectUtil.isNotEmpty(point.getIng_task_code()) && !schBaseTask.getTask_code().equals(point.getIng_task_code())) { |
|
|