|
|
|
@ -1442,11 +1442,39 @@ public class BaseLocationServiceImpl extends ServiceImpl<BaseLocationMapper, Bas |
|
|
|
String tunnel = baseLocation.getTunnel(); |
|
|
|
String tunnel = baseLocation.getTunnel(); |
|
|
|
String locationStatus = baseLocation.getLocationStatus(); |
|
|
|
String locationStatus = baseLocation.getLocationStatus(); |
|
|
|
if ("01".equals(tunnel) || "06".equals(tunnel)) { |
|
|
|
if ("01".equals(tunnel) || "06".equals(tunnel)) { |
|
|
|
//如果是单深位,验证下双深位的是否有库存,如果有在判断车型颜色是否一致
|
|
|
|
|
|
|
|
String locationRow = baseLocation.getLocationRow(); |
|
|
|
String locationRow = baseLocation.getLocationRow(); |
|
|
|
String locationColumn = baseLocation.getLocationColumn(); |
|
|
|
String locationColumn = baseLocation.getLocationColumn(); |
|
|
|
String layer = baseLocation.getLayer(); |
|
|
|
String layer = baseLocation.getLayer(); |
|
|
|
|
|
|
|
//先判断货位是否已经有货,如果有则重新分配货位
|
|
|
|
|
|
|
|
if ("1".equals(locationStatus) || "2".equals(locationStatus) || "5".equals(locationStatus)) { |
|
|
|
|
|
|
|
Result<BaseLocationVo> locationVoResult; |
|
|
|
|
|
|
|
AssingEmptyLocBo assingEmptyLocBo = null; |
|
|
|
|
|
|
|
if (businDataTaskGoodsVos !=null && businDataTaskGoodsVos.size()>0){ |
|
|
|
|
|
|
|
assingEmptyLocBo = new AssingEmptyLocBo(); |
|
|
|
|
|
|
|
assingEmptyLocBo.setBusinDataTaskGoodsVos(businDataTaskGoodsVos); |
|
|
|
|
|
|
|
assingEmptyLocBo.setBatch(DateUtils.getDate()); |
|
|
|
|
|
|
|
assingEmptyLocBo.setGoodsNo(businDataTaskGoodsVos.get(0).getGoodsNo()); |
|
|
|
|
|
|
|
assingEmptyLocBo.setVehicheModel(businDataTaskGoodsVos.get(0).getVehicheModel()); |
|
|
|
|
|
|
|
assingEmptyLocBo.setTunnel(baseLocation.getTunnel()); |
|
|
|
|
|
|
|
locationVoResult = this.assignEmptyLocationAll(assingEmptyLocBo, null); |
|
|
|
|
|
|
|
}else { |
|
|
|
|
|
|
|
locationVoResult = this.assignEmptyLocationAll(assingEmptyLocBo, tunnel); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (Result.isOk(locationVoResult)){ |
|
|
|
|
|
|
|
BaseLocationVo baseLocationVo = locationVoResult.getData(); |
|
|
|
|
|
|
|
log.info("给堆垛机下发任务:" + businDataTask.getId() + " 原货位:" +baseLocation.getLocationCode()+" 新货位:"+baseLocationVo.getLocationCode()); |
|
|
|
|
|
|
|
businDataTask.setToLayer(baseLocationVo.getLayer()); |
|
|
|
|
|
|
|
businDataTask.setToColumn(baseLocationVo.getLocationColumn()); |
|
|
|
|
|
|
|
businDataTask.setToRow(baseLocationVo.getLocationRow()); |
|
|
|
|
|
|
|
businDataTask.setLocationId(baseLocationVo.getId()); |
|
|
|
|
|
|
|
log.info("原货位已被占用,重新分配的货位:" + JsonUtil.toJSONString(baseLocationVo)); |
|
|
|
|
|
|
|
iBusinDataTaskService.updateById(businDataTask); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//如果是单深位,验证下双深位的是否有库存,如果有在判断车型颜色是否一致
|
|
|
|
if ("2".equals(locationRow) || "3".equals(locationRow) || "14".equals(locationRow)) { |
|
|
|
if ("2".equals(locationRow) || "3".equals(locationRow) || "14".equals(locationRow)) { |
|
|
|
|
|
|
|
|
|
|
|
if (locationRow.equals("2")) { |
|
|
|
if (locationRow.equals("2")) { |
|
|
|
@ -1500,7 +1528,8 @@ public class BaseLocationServiceImpl extends ServiceImpl<BaseLocationMapper, Bas |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} else if ("1".equals(locationRow) || "4".equals(locationRow) || "15".equals(locationRow)) { |
|
|
|
} |
|
|
|
|
|
|
|
else if ("1".equals(locationRow) || "4".equals(locationRow) || "15".equals(locationRow)) { |
|
|
|
//检查单深位是否有货
|
|
|
|
//检查单深位是否有货
|
|
|
|
if (locationRow.equals("1")) { |
|
|
|
if (locationRow.equals("1")) { |
|
|
|
locationRow = "2"; |
|
|
|
locationRow = "2"; |
|
|
|
@ -1550,7 +1579,8 @@ public class BaseLocationServiceImpl extends ServiceImpl<BaseLocationMapper, Bas |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} else if (tunnel.equals("06") && locationRow.equals("13")) { |
|
|
|
} |
|
|
|
|
|
|
|
else if (tunnel.equals("06") && locationRow.equals("13")) { |
|
|
|
if ("1".equals(locationStatus) || "2".equals(locationStatus) || "5".equals(locationStatus)) { |
|
|
|
if ("1".equals(locationStatus) || "2".equals(locationStatus) || "5".equals(locationStatus)) { |
|
|
|
AssingEmptyLocBo assingEmptyLocBo = null; |
|
|
|
AssingEmptyLocBo assingEmptyLocBo = null; |
|
|
|
if (businDataTaskGoodsVos != null && businDataTaskGoodsVos.size() > 0) { |
|
|
|
if (businDataTaskGoodsVos != null && businDataTaskGoodsVos.size() > 0) { |
|
|
|
@ -1583,7 +1613,6 @@ public class BaseLocationServiceImpl extends ServiceImpl<BaseLocationMapper, Bas |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if ("1".equals(locationStatus) || "2".equals(locationStatus) || "5".equals(locationStatus)) { |
|
|
|
if ("1".equals(locationStatus) || "2".equals(locationStatus) || "5".equals(locationStatus)) { |
|
|
|
|
|
|
|
|
|
|
|
BaseLocationVo baseLocationVo = this.queryLocationByTunnel(tunnel); |
|
|
|
BaseLocationVo baseLocationVo = this.queryLocationByTunnel(tunnel); |
|
|
|
BaseLocation newLocation = BeanUtil.toBean(baseLocationVo, BaseLocation.class); |
|
|
|
BaseLocation newLocation = BeanUtil.toBean(baseLocationVo, BaseLocation.class); |
|
|
|
newLocation.setLocationStatus("4"); |
|
|
|
newLocation.setLocationStatus("4"); |
|
|
|
|