Browse Source

Merge branch 'pre-production'

newStockUp
zhenghaoyu 1 year ago
parent
commit
f0bb1052b1
  1. 8
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/TaskQuestServiceImpl.java

8
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/TaskQuestServiceImpl.java

@ -240,15 +240,15 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
List<QuestDetailEntity> zeroQuestDetailEntities = questDetailMap.get(2);
List<QuestDetailEntity> inventoryQuestDetailEntities = questDetailMap.get(3);
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)->{
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleClient.findEntityByStockArticleId(k);
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleClient.findStockArticleByOrderCodeAndWarehouseId(k,taskSearchDTO.getWarehouseId());
List<QuestDetailEntity> 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());
@ -408,7 +408,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
v.forEach( p ->{
taskTrayVO.setTrayCode(p.getTrayCode());
num.set(num.get() + p.getStockNum());
if(p.getQuestStatus().equals(1)){
if(p.getQuestStatus().equals(1) && p.getIsNew().equals(0)){
List<QuestDetailChildEntity> list = questDetailChildService.list(Wrappers.<QuestDetailChildEntity>query().lambda()
.eq(QuestDetailChildEntity::getQuestDetailId, p.getId())
.eq(QuestDetailChildEntity::getWarehouseId, warehouseId)

Loading…
Cancel
Save