自测问题修复
This commit is contained in:
@@ -104,24 +104,31 @@ public class KGHJRKTask extends AbstractTask {
|
|||||||
*/
|
*/
|
||||||
private SchBasePoint findNextPoint(SchBasePoint startPoint) {
|
private SchBasePoint findNextPoint(SchBasePoint startPoint) {
|
||||||
String regionCode = null;
|
String regionCode = null;
|
||||||
if (startPoint.getRegion_code().endsWith("1")) {
|
if ("A1".equals(startPoint.getWorkshop_code())) {
|
||||||
//1找A区
|
//A1空架到HCQ3
|
||||||
regionCode = "KGHJ1";
|
regionCode = "HCQ3";
|
||||||
|
|
||||||
} else if (startPoint.getRegion_code().endsWith("2")) {
|
} else if ("A2".equals(startPoint.getWorkshop_code())) {
|
||||||
//2找B区
|
//A1空架到KGHJ2
|
||||||
regionCode = "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--) {
|
for(int i=schBasePointList.size()-1;i>=0;i--) {
|
||||||
SchBasePoint schBasePoint = schBasePointList.get(i);
|
SchBasePoint temp = schBasePointList.get(i);
|
||||||
if(schBasePoint.getVehicle_qty()<3&&
|
if(temp.getVehicle_qty()==1&&
|
||||||
ObjectUtil.isEmpty(schBasePoint.getIng_task_code())){
|
ObjectUtil.isEmpty(temp.getIng_task_code())){
|
||||||
log.info("空固化架放货找到当前符合条件的点位{}",schBasePoint.getPoint_code());
|
if(schBasePoint!=null) {
|
||||||
return schBasePoint;
|
log.info("空固化架放货找到当前点位有货:{},取上一个空位:{}", temp.getPoint_code(), schBasePoint.getPoint_code());
|
||||||
|
}else{
|
||||||
|
log.info("当前区域:{}所有点位均已放满,暂时跳过",regionCode);
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
schBasePoint=temp;
|
||||||
}
|
}
|
||||||
return null;
|
return schBasePoint;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user