|
|
@ -240,15 +240,15 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ |
|
|
|
List<QuestDetailEntity> zeroQuestDetailEntities = questDetailMap.get(2); |
|
|
|
List<QuestDetailEntity> zeroQuestDetailEntities = questDetailMap.get(2); |
|
|
|
List<QuestDetailEntity> inventoryQuestDetailEntities = questDetailMap.get(3); |
|
|
|
List<QuestDetailEntity> inventoryQuestDetailEntities = questDetailMap.get(3); |
|
|
|
if (Func.isNotEmpty(questDetailEntities)){ |
|
|
|
if (Func.isNotEmpty(questDetailEntities)){ |
|
|
|
Map<Long, List<QuestDetailEntity>> orderMap = questDetailEntities.stream().collect(Collectors.groupingBy(QuestDetailEntity::getOrderId)); |
|
|
|
Map<String, List<QuestDetailEntity>> orderMap = questDetailEntities.stream().collect(Collectors.groupingBy(QuestDetailEntity::getOrderCode)); |
|
|
|
orderMap.forEach((k,v)->{ |
|
|
|
orderMap.forEach((k,v)->{ |
|
|
|
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleClient.findEntityByStockArticleId(k); |
|
|
|
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleClient.findStockArticleByOrderCodeAndWarehouseId(k,taskSearchDTO.getWarehouseId()); |
|
|
|
List<QuestDetailEntity> detailEntities = orderMap.get(k); |
|
|
|
List<QuestDetailEntity> detailEntities = orderMap.get(k); |
|
|
|
TaskContractVO taskContractVO = new TaskContractVO(); |
|
|
|
TaskContractVO taskContractVO = new TaskContractVO(); |
|
|
|
taskContractVO.setIsInventory(0); |
|
|
|
taskContractVO.setIsInventory(0); |
|
|
|
taskContractVO.setIsZero(0); |
|
|
|
taskContractVO.setIsZero(0); |
|
|
|
taskContractVO.setOrderCode(detailEntities.get(0).getOrderCode()); |
|
|
|
taskContractVO.setOrderCode(detailEntities.get(0).getOrderCode()); |
|
|
|
taskContractVO.setOrderId(k); |
|
|
|
taskContractVO.setOrderId(detailEntities.get(0).getOrderId()); |
|
|
|
taskContractVO.setTotal(detailEntities.stream().mapToInt(QuestDetailEntity::getStockNum).sum()); |
|
|
|
taskContractVO.setTotal(detailEntities.stream().mapToInt(QuestDetailEntity::getStockNum).sum()); |
|
|
|
taskContractVO.setZktotal(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()); |
|
|
|
taskContractVO.setUnTotal(detailEntities.stream().filter(q->Func.equals(q.getQuestStatus(),1)).mapToInt(QuestDetailEntity::getStockNum).sum()); |
|
|
|