|
|
@ -275,6 +275,13 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ |
|
|
|
TaskContractVO taskContractVO = new TaskContractVO(); |
|
|
|
TaskContractVO taskContractVO = new TaskContractVO(); |
|
|
|
taskContractVO.setOrderCode(questDetailEntity.getOrderCode()); |
|
|
|
taskContractVO.setOrderCode(questDetailEntity.getOrderCode()); |
|
|
|
taskContractVO.setOrderId(questDetailEntity.getStockId()); |
|
|
|
taskContractVO.setOrderId(questDetailEntity.getStockId()); |
|
|
|
|
|
|
|
taskContractVO.setMartialCode(questDetailEntity.getIncomingBatch()); |
|
|
|
|
|
|
|
if (Func.isNotEmpty(questDetailEntity.getCategoryName())){ |
|
|
|
|
|
|
|
taskContractVO.setMaterialName(questDetailEntity.getCategoryName()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (Func.isNotEmpty(questDetailEntity.getMaterialName())){ |
|
|
|
|
|
|
|
taskContractVO.setMaterialName(questDetailEntity.getMaterialName()); |
|
|
|
|
|
|
|
} |
|
|
|
taskContractVO.setTotal(stockListEntity.getQuantityStock()); |
|
|
|
taskContractVO.setTotal(stockListEntity.getQuantityStock()); |
|
|
|
taskContractVO.setIsZero(0); |
|
|
|
taskContractVO.setIsZero(0); |
|
|
|
taskContractVO.setIsInventory(1); |
|
|
|
taskContractVO.setIsInventory(1); |
|
|
@ -1096,8 +1103,8 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ |
|
|
|
log.error("#####################TaskId参数缺失:{}",taskSearchDTO.getTaskId()); |
|
|
|
log.error("#####################TaskId参数缺失:{}",taskSearchDTO.getTaskId()); |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|
if (Func.isEmpty(taskSearchDTO.getOrderId())){ |
|
|
|
if (Func.isEmpty(taskSearchDTO.getOrderCode())){ |
|
|
|
log.error("#####################OrderId参数缺失:{}",taskSearchDTO.getOrderId()); |
|
|
|
log.error("#####################OrderCode参数缺失:{}",taskSearchDTO.getOrderCode()); |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|
if (Func.isEmpty(taskSearchDTO.getWarehouseId())){ |
|
|
|
if (Func.isEmpty(taskSearchDTO.getWarehouseId())){ |
|
|
@ -1110,9 +1117,10 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ |
|
|
|
.eq(QuestDetailEntity::getWarehouseId, taskSearchDTO.getWarehouseId()) |
|
|
|
.eq(QuestDetailEntity::getWarehouseId, taskSearchDTO.getWarehouseId()) |
|
|
|
.eq(QuestDetailEntity::getQuestType, 3); |
|
|
|
.eq(QuestDetailEntity::getQuestType, 3); |
|
|
|
if (Func.equals(isInventory,1)){ |
|
|
|
if (Func.equals(isInventory,1)){ |
|
|
|
queryWrapper.eq(QuestDetailEntity::getStockId, taskSearchDTO.getOrderId()); |
|
|
|
queryWrapper |
|
|
|
|
|
|
|
.eq(QuestDetailEntity::getIncomingBatch, taskSearchDTO.getOrderCode()); |
|
|
|
}else { |
|
|
|
}else { |
|
|
|
queryWrapper.eq(QuestDetailEntity::getOrderId, taskSearchDTO.getOrderId()); |
|
|
|
queryWrapper.eq(QuestDetailEntity::getOrderCode, taskSearchDTO.getOrderCode()); |
|
|
|
} |
|
|
|
} |
|
|
|
List<QuestDetailEntity> questDetailEntities = questDetailService.list(queryWrapper); |
|
|
|
List<QuestDetailEntity> questDetailEntities = questDetailService.list(queryWrapper); |
|
|
|
List<Integer> type = questDetailEntities.stream().filter(f -> Func.isNotEmpty(f.getQuestTarget())).map(QuestDetailEntity::getQuestTarget).distinct().collect(Collectors.toList()); |
|
|
|
List<Integer> type = questDetailEntities.stream().filter(f -> Func.isNotEmpty(f.getQuestTarget())).map(QuestDetailEntity::getQuestTarget).distinct().collect(Collectors.toList()); |
|
|
@ -1302,7 +1310,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ |
|
|
|
.eq(QuestDetailEntity::getWarehouseId, taskSearchDTO.getWarehouseId())); |
|
|
|
.eq(QuestDetailEntity::getWarehouseId, taskSearchDTO.getWarehouseId())); |
|
|
|
if (Func.isNotEmpty(questDetailEntityList) && questDetailEntityList.size()>0){ |
|
|
|
if (Func.isNotEmpty(questDetailEntityList) && questDetailEntityList.size()>0){ |
|
|
|
TaskContractVO taskContractVO = new TaskContractVO(); |
|
|
|
TaskContractVO taskContractVO = new TaskContractVO(); |
|
|
|
Map<Long, List<QuestDetailEntity>> orderMap = questDetailEntityList.stream().collect(Collectors.groupingBy(QuestDetailEntity::getOrderId)); |
|
|
|
Map<String, List<QuestDetailEntity>> orderMap = questDetailEntityList.stream().collect(Collectors.groupingBy(QuestDetailEntity::getOrderCode)); |
|
|
|
orderMap.forEach((k,v)->{ |
|
|
|
orderMap.forEach((k,v)->{ |
|
|
|
List<QuestDetailEntity> questDetailEntities = orderMap.get(k); |
|
|
|
List<QuestDetailEntity> questDetailEntities = orderMap.get(k); |
|
|
|
taskContractVO.setTotal(v.stream().mapToInt(QuestDetailEntity::getStockNum).sum()); |
|
|
|
taskContractVO.setTotal(v.stream().mapToInt(QuestDetailEntity::getStockNum).sum()); |
|
|
|