代码更新:
1. 修复大屏显示完成情况不对的问题 2. 修复卡outsideVehicles的问题。
This commit is contained in:
parent
ce34d2564f
commit
85abc5b176
|
|
@ -174,7 +174,7 @@ public class MonitorController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
total.add(currentStationWorkFlowList.size());
|
total.add(currentStationWorkFlowList.size());
|
||||||
complete.add(finishingRows/currentStationWorkFlowList.size());
|
complete.add((finishingRows * 100)/currentStationWorkFlowList.size());
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
total = Collections.emptyList();
|
total = Collections.emptyList();
|
||||||
|
|
|
||||||
|
|
@ -327,8 +327,7 @@ public class WmsTaskServiceImplements implements IWmsTaskService {
|
||||||
.last("limit 1"));
|
.last("limit 1"));
|
||||||
if (stock == null) {
|
if (stock == null) {
|
||||||
// 没有库存
|
// 没有库存
|
||||||
outsideVehicle.setRemainNum(BigDecimal.ZERO);
|
outsideVehiclesService.removeById(outsideVehicle);
|
||||||
outsideVehiclesService.updateById(outsideVehicle);
|
|
||||||
} else {
|
} else {
|
||||||
// 库存状态为正常
|
// 库存状态为正常
|
||||||
if (Objects.equals(stock.getStockStatus(), StockStatus.OK.getCode())) {
|
if (Objects.equals(stock.getStockStatus(), StockStatus.OK.getCode())) {
|
||||||
|
|
@ -375,8 +374,24 @@ public class WmsTaskServiceImplements implements IWmsTaskService {
|
||||||
.eq(OutsideVehicles::getGoodsId, goodsId)
|
.eq(OutsideVehicles::getGoodsId, goodsId)
|
||||||
.ne(OutsideVehicles::getOutStatus, 2));
|
.ne(OutsideVehicles::getOutStatus, 2));
|
||||||
if (!outsideVehiclesList.isEmpty()) {
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 不能呼叫库存
|
||||||
|
if (!canCallStock) {
|
||||||
return needNum;
|
return needNum;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// 查询库存,判断数量是否充足
|
// 查询库存,判断数量是否充足
|
||||||
List<Stock> stockList = stockService.list(new LambdaQueryWrapper<Stock>()
|
List<Stock> stockList = stockService.list(new LambdaQueryWrapper<Stock>()
|
||||||
.eq(Stock::getStockStatus, StockStatus.OK.getCode())
|
.eq(Stock::getStockStatus, StockStatus.OK.getCode())
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user