|
|
|
|
@ -1313,9 +1313,11 @@ public class BaseLocationServiceImpl extends ServiceImpl<BaseLocationMapper, Bas |
|
|
|
|
if ("01".equals(tunnel) || "06".equals(tunnel)) { |
|
|
|
|
//如果是单深位,验证下双深位的是否有库存,如果有在判断车型颜色是否一致
|
|
|
|
|
String locationRow = baseLocation.getLocationRow(); |
|
|
|
|
if ("2".equals(locationRow) || "3".equals(locationRow) || "14".equals(locationRow)) { |
|
|
|
|
String locationColumn = baseLocation.getLocationColumn(); |
|
|
|
|
String layer = baseLocation.getLayer(); |
|
|
|
|
|
|
|
|
|
if ("2".equals(locationRow) || "3".equals(locationRow) || "14".equals(locationRow)) { |
|
|
|
|
|
|
|
|
|
if (locationRow.equals("2")) { |
|
|
|
|
locationRow = "1"; |
|
|
|
|
} else if (locationRow.equals("3")) { |
|
|
|
|
@ -1367,8 +1369,57 @@ public class BaseLocationServiceImpl extends ServiceImpl<BaseLocationMapper, Bas |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} else if ("1".equals(locationRow) || "4".equals(locationRow) || "15".equals(locationRow)) { |
|
|
|
|
//检查单深位是否有货
|
|
|
|
|
if (locationRow.equals("1")) { |
|
|
|
|
locationRow = "2"; |
|
|
|
|
} else if (locationRow.equals("4")) { |
|
|
|
|
locationRow = "3"; |
|
|
|
|
} else if (locationRow.equals("15")) { |
|
|
|
|
locationRow = "14"; |
|
|
|
|
} |
|
|
|
|
BaseLocation oneLocation = this.getOne(new LambdaQueryWrapper<BaseLocation>() |
|
|
|
|
.eq(BaseLocation::getLocationRow, locationRow) |
|
|
|
|
.eq(BaseLocation::getLocationColumn, locationColumn) |
|
|
|
|
.eq(BaseLocation::getLayer, layer)); |
|
|
|
|
String oneLocationStatus = oneLocation.getLocationStatus(); |
|
|
|
|
Boolean checkLoc = false; |
|
|
|
|
if (oneLocationStatus.equals("1") || oneLocationStatus.equals("2") || oneLocationStatus.equals("5")) { |
|
|
|
|
//入库货位是双深位,单深位有货,重新分配货位
|
|
|
|
|
checkLoc = true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (locationStatus.equals("1") || locationStatus.equals("2") || locationStatus.equals("5")) { |
|
|
|
|
//入库是双深位时,此货位有货,重新分配货位
|
|
|
|
|
checkLoc = true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (checkLoc) { |
|
|
|
|
if (businDataTaskGoodsVos != null && businDataTaskGoodsVos.size() > 0) { |
|
|
|
|
String goodsNo = businDataTaskGoodsVos.get(0).getGoodsNo(); |
|
|
|
|
BaseGoodsData baseGoodsData = iBaseGoodsDataService.getBaseGoodsByBarcodes(goodsNo); |
|
|
|
|
AssingEmptyLocBo assingEmptyLocBo = new AssingEmptyLocBo(); |
|
|
|
|
assingEmptyLocBo.setBusinDataTaskGoodsVos(businDataTaskGoodsVos); |
|
|
|
|
assingEmptyLocBo.setBatch(DateUtils.getDate()); |
|
|
|
|
assingEmptyLocBo.setGoodsNo(goodsNo); |
|
|
|
|
assingEmptyLocBo.setVehicheModel(baseGoodsData.getVehicheModel()); |
|
|
|
|
assingEmptyLocBo.setTunnel(baseLocation.getTunnel()); |
|
|
|
|
Result<BaseLocationVo> locationVoResult = this.assignEmptyLocationAll(assingEmptyLocBo, null); |
|
|
|
|
if (Result.isOk(locationVoResult)) { |
|
|
|
|
BaseLocationVo baseLocationVo = locationVoResult.getData(); |
|
|
|
|
baseLocation = BeanUtil.toBean(baseLocationVo, BaseLocation.class); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
//无数据是空托,重新分配货位
|
|
|
|
|
AssingEmptyLocBo assingEmptyLocBo = null; |
|
|
|
|
Result<BaseLocationVo> locationVoResult = this.assignEmptyLocationAll(assingEmptyLocBo, businDataTask.getTunnel()); |
|
|
|
|
if (Result.isOk(locationVoResult)) { |
|
|
|
|
BaseLocationVo baseLocationVo = locationVoResult.getData(); |
|
|
|
|
baseLocation = BeanUtil.toBean(baseLocationVo, BaseLocation.class); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
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)) { |
|
|
|
|
AssingEmptyLocBo assingEmptyLocBo = null; |
|
|
|
|
if (businDataTaskGoodsVos != null && businDataTaskGoodsVos.size() > 0) { |
|
|
|
|
|