Browse Source

自测问题修复

master
psh 1 year ago
parent
commit
e59b2e7f71
  1. 31
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/KGHJRKTask.java

31
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/KGHJRKTask.java

@ -104,24 +104,31 @@ public class KGHJRKTask extends AbstractTask {
*/
private SchBasePoint findNextPoint(SchBasePoint startPoint) {
String regionCode = null;
if (startPoint.getRegion_code().endsWith("1")) {
//1找A区
regionCode = "KGHJ1";
if ("A1".equals(startPoint.getWorkshop_code())) {
//A1空架到HCQ3
regionCode = "HCQ3";
} else if (startPoint.getRegion_code().endsWith("2")) {
//2找B区
} else if ("A2".equals(startPoint.getWorkshop_code())) {
//A1空架到KGHJ2
regionCode = "KGHJ2";
}
List<SchBasePoint> schBasePointList = pointMapper.findPointByRegion(regionCode,null);
List<SchBasePoint> schBasePointList = pointMapper.findPointByRegion(regionCode,"1");
//从前往后判断,直到发现点位有货,取前一个
SchBasePoint schBasePoint=null;
for(int i=schBasePointList.size()-1;i>=0;i--) {
SchBasePoint schBasePoint = schBasePointList.get(i);
if(schBasePoint.getVehicle_qty()<3&&
ObjectUtil.isEmpty(schBasePoint.getIng_task_code())){
log.info("空固化架放货找到当前符合条件的点位{}",schBasePoint.getPoint_code());
return schBasePoint;
SchBasePoint temp = schBasePointList.get(i);
if(temp.getVehicle_qty()==1&&
ObjectUtil.isEmpty(temp.getIng_task_code())){
if(schBasePoint!=null) {
log.info("空固化架放货找到当前点位有货:{},取上一个空位:{}", temp.getPoint_code(), schBasePoint.getPoint_code());
}else{
log.info("当前区域:{}所有点位均已放满,暂时跳过",regionCode);
}
break;
}
schBasePoint=temp;
}
return null;
return schBasePoint;
}
@Override

Loading…
Cancel
Save