diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/TaskQuestServiceImpl.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/TaskQuestServiceImpl.java index 84ec36f1a..b5afb5def 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/TaskQuestServiceImpl.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/TaskQuestServiceImpl.java @@ -240,15 +240,15 @@ public class TaskQuestServiceImpl extends BaseServiceImpl zeroQuestDetailEntities = questDetailMap.get(2); List inventoryQuestDetailEntities = questDetailMap.get(3); if (Func.isNotEmpty(questDetailEntities)){ - Map> orderMap = questDetailEntities.stream().collect(Collectors.groupingBy(QuestDetailEntity::getOrderId)); + Map> orderMap = questDetailEntities.stream().collect(Collectors.groupingBy(QuestDetailEntity::getOrderCode)); orderMap.forEach((k,v)->{ - DistributionStockArticleEntity stockArticleEntity = distributionStockArticleClient.findEntityByStockArticleId(k); + DistributionStockArticleEntity stockArticleEntity = distributionStockArticleClient.findStockArticleByOrderCodeAndWarehouseId(k,taskSearchDTO.getWarehouseId()); List detailEntities = orderMap.get(k); TaskContractVO taskContractVO = new TaskContractVO(); taskContractVO.setIsInventory(0); taskContractVO.setIsZero(0); taskContractVO.setOrderCode(detailEntities.get(0).getOrderCode()); - taskContractVO.setOrderId(k); + taskContractVO.setOrderId(detailEntities.get(0).getOrderId()); taskContractVO.setTotal(detailEntities.stream().mapToInt(QuestDetailEntity::getStockNum).sum()); taskContractVO.setZktotal(detailEntities.stream().mapToInt(QuestDetailEntity::getStockNum).sum()); taskContractVO.setUnTotal(detailEntities.stream().filter(q->Func.equals(q.getQuestStatus(),1)).mapToInt(QuestDetailEntity::getStockNum).sum());