|
@@ -282,7 +282,7 @@ public class BizTakeStockPeriodController extends BaseController
|
|
|
//获取所有批次的id
|
|
|
List<Long> lotIds = taskStockList.stream().map(BizTaksStockInboundOrderDetail::getLotId).distinct().collect(Collectors.toList());
|
|
|
//根据批次id查询到对应批次的零存或领取信息
|
|
|
- List<BizStorageRetrieval> storageRetrievalList = bizStorageRetrievalService.query().in("lot_id", lotIds).or().in("retrieval_lotId", lotIds).list();
|
|
|
+ List<BizStorageRetrieval> storageRetrievalList = bizStorageRetrievalService.query().in("lot_id", lotIds).or().in("retrieval_lot_id", lotIds).list();
|
|
|
//根据批次id查询到对应批次已经上架的入库单信息
|
|
|
List<BizInboundOrderDetail> inboundOrderDetailList = bizInboundOrderDetailService.query().in("lot_id", lotIds).eq("is_inbound", 1).list();
|
|
|
//根据批次id查询到对应批次的盘点批次信息
|
|
@@ -314,14 +314,13 @@ public class BizTakeStockPeriodController extends BaseController
|
|
|
for (BizTaksStockLot item : filteredList) {
|
|
|
//拿到当前批次的盘点数量
|
|
|
long resultNum = item.getProdNum();
|
|
|
-
|
|
|
// 减去零存数量
|
|
|
resultNum -= storageNumByLotId.getOrDefault(item.getLotId(), 0L);
|
|
|
|
|
|
// 加上领取数量
|
|
|
resultNum += storageNumByRetrievalLotId.getOrDefault(item.getLotId(), 0L);
|
|
|
|
|
|
- // 减去inboundOrderDetailList中lotId对应的inboundNum总和
|
|
|
+ // 减去入库数量
|
|
|
resultNum -= inboundNumByLotId.getOrDefault(item.getLotId(), 0L);
|
|
|
|
|
|
// 判断当前批次的盘点数量是否为0
|