|
|
|
|
@ -638,7 +638,19 @@ public class IBusinEnptyContainerServiceImpl extends ServiceImpl<BaseContainerMa |
|
|
|
|
BaseLocationVo resultLocationVo = null; |
|
|
|
|
//根据拣货路径选择最近一个货位
|
|
|
|
|
for (int i = 0; i < locationList.size(); i++) { |
|
|
|
|
BaseLocationVo locationVo = locationList.get(i); |
|
|
|
|
//BaseLocationVo locationVo = locationList.get(i);
|
|
|
|
|
|
|
|
|
|
//2024-09-05 调整代码,重新查询货位状态,如果货位状态为4则循环继续寻找下个货位
|
|
|
|
|
BaseLocationVo locationVoOld = locationList.get(i); |
|
|
|
|
BaseLocationVo locationVo = baseLocationMapper.queryLocationById(locationVoOld.getId()); |
|
|
|
|
if ( "1".equals(locationVo.getLocationStatus()) |
|
|
|
|
|| "2".equals(locationVo.getLocationStatus()) |
|
|
|
|
|| "4".equals(locationVo.getLocationStatus())) |
|
|
|
|
{ |
|
|
|
|
log.info("此货位已经被占用,继续查找其他货位:"+JsonUtil.toJSONString(locationVo)); |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//如果该货位为双深位,则直接选择该库位
|
|
|
|
|
if ("2".equals(locationVo.getIsDeep())) { |
|
|
|
|
return locationVo; |
|
|
|
|
@ -656,11 +668,13 @@ public class IBusinEnptyContainerServiceImpl extends ServiceImpl<BaseContainerMa |
|
|
|
|
if (baseLocationVos.size() > 0) { |
|
|
|
|
log.info("查询到的双深位库位信息:"+JsonUtil.toJSONString(baseLocationVos.get(0))); |
|
|
|
|
if(baseLocationVos.get(0).getLocationStatus().equals("4") |
|
|
|
|
|| baseLocationVos.get(0).getLocationStatus().equals("1")){ |
|
|
|
|
log.info("已有库存,继续查找:"+JsonUtil.toJSONString(baseLocationVos.get(0))); |
|
|
|
|
|| baseLocationVos.get(0).getLocationStatus().equals("1") |
|
|
|
|
|| baseLocationVos.get(0).getLocationStatus().equals("2") |
|
|
|
|
){ |
|
|
|
|
log.info("深位已有库存,继续查找其他货位:"+JsonUtil.toJSONString(baseLocationVos.get(0))); |
|
|
|
|
continue; |
|
|
|
|
}else{ |
|
|
|
|
return locationVo; |
|
|
|
|
return baseLocationVos.get(0); |
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
|
return locationVo; |
|
|
|
|
|