代码更新:
1. 修复修改站台要料信息的bug。 2. 修改呼叫库存的逻辑,一料一箱转化为一站台一料一箱。
This commit is contained in:
parent
ccba66f71e
commit
87998c0a28
|
|
@ -374,21 +374,14 @@ public class WmsTaskServiceImplements implements IWmsTaskService {
|
|||
.eq(OutsideVehicles::getGoodsId, goodsId)
|
||||
.ne(OutsideVehicles::getOutStatus, 2));
|
||||
if (!outsideVehiclesList.isEmpty()) {
|
||||
boolean canCallStock = true;
|
||||
// 判断这些outsideVehicles对应的库存是不是都是0
|
||||
for (OutsideVehicles outsideVehicle : outsideVehiclesList) {
|
||||
Stock stock = stockService.getOne(new LambdaQueryWrapper<Stock>()
|
||||
.eq(Stock::getVehicleId, outsideVehicle.getVehicleId())
|
||||
.apply("goods_related ->> '$.goodsId' = {0}" + MYSQL_JSON_CI, goodsId)
|
||||
.apply("goods_related ->> '$.remainNum' > 0")
|
||||
.last("limit 1"));
|
||||
if (stock != null) {
|
||||
canCallStock = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// 这些箱子
|
||||
List<String> outsideVehicleIds = outsideVehiclesList.stream().map(OutsideVehicles::getVehicleId).distinct().toList();
|
||||
// 这些箱子是不是有去到当前站台的拣选任务
|
||||
List<PickTask> outsidePickTasks = pickTaskService.list(new LambdaQueryWrapper<PickTask>()
|
||||
.in(PickTask::getVehicleId, outsideVehicleIds)
|
||||
.eq(PickTask::getStandId, workStation));
|
||||
if (!outsidePickTasks.isEmpty()) {
|
||||
// 不能呼叫库存
|
||||
if (!canCallStock) {
|
||||
return needNum;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -274,15 +274,6 @@ public class WorkServiceImplements implements IWorkService {
|
|||
newGoodsToStation.setDistributedNum(newGoodsToStation.getDistributedNum().subtract(needNum));
|
||||
newGoodsToStation.setDistributeStatus(1);
|
||||
needDistributeGoodsMap.put(notFinishedWorkFlow.getGoodsId(), newGoodsToStation);
|
||||
} else {
|
||||
GoodsToStation goodsToStation = new GoodsToStation();
|
||||
goodsToStation.setConfigId(notFinishedWorkFlow.getGoodsId() + "_" + workStation);
|
||||
goodsToStation.setGoodsId(notFinishedWorkFlow.getGoodsId());
|
||||
goodsToStation.setWorkStation(workStation);
|
||||
goodsToStation.setDistributeStatus(0);
|
||||
goodsToStation.setDistributedNum(BigDecimal.ZERO);
|
||||
goodsToStation.setTotalNum(needNum);
|
||||
needDistributeGoodsMap.put(notFinishedWorkFlow.getGoodsId(), goodsToStation);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user