|
@@ -181,14 +181,14 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
|
|
.collect(Collectors.toList());
|
|
.collect(Collectors.toList());
|
|
if (oConvertUtils.listIsEmpty(idList)){
|
|
if (oConvertUtils.listIsEmpty(idList)){
|
|
log.info("{}{}", "装运单ID为空,装运明细查询失败", JSON.toJSON(storageBill));
|
|
log.info("{}{}", "装运单ID为空,装运明细查询失败", JSON.toJSON(storageBill));
|
|
- return null;
|
|
|
|
|
|
+ return result;
|
|
}
|
|
}
|
|
|
|
|
|
//根据部门orgCode查询部门,需要将职位id进行传递
|
|
//根据部门orgCode查询部门,需要将职位id进行传递
|
|
BilletHotsendTypeConfig billetHotsendTypeConfig = billetHotsendTypeConfigService.getById(storageBill.getTypeConfigId());
|
|
BilletHotsendTypeConfig billetHotsendTypeConfig = billetHotsendTypeConfigService.getById(storageBill.getTypeConfigId());
|
|
if (oConvertUtils.isEmpty(billetHotsendTypeConfig)){
|
|
if (oConvertUtils.isEmpty(billetHotsendTypeConfig)){
|
|
log.info("{}{}", "钢坯类型配置信息查询为空,装运明细查询失败", JSON.toJSON(storageBill));
|
|
log.info("{}{}", "钢坯类型配置信息查询为空,装运明细查询失败", JSON.toJSON(storageBill));
|
|
- return null;
|
|
|
|
|
|
+ return result;
|
|
}
|
|
}
|
|
if ("billet_auto_tmp".equals(billetHotsendTypeConfig.getBelongTable())){
|
|
if ("billet_auto_tmp".equals(billetHotsendTypeConfig.getBelongTable())){
|
|
List<BilletAutoTmp> billetAutoTmpList = billetAutoTmpService.list(new LambdaQueryWrapper<BilletAutoTmp>().in(BilletAutoTmp::getStorageBillId, idList));
|
|
List<BilletAutoTmp> billetAutoTmpList = billetAutoTmpService.list(new LambdaQueryWrapper<BilletAutoTmp>().in(BilletAutoTmp::getStorageBillId, idList));
|
|
@@ -249,21 +249,21 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
|
|
.collect(Collectors.toList());
|
|
.collect(Collectors.toList());
|
|
if (oConvertUtils.listIsEmpty(idList)){
|
|
if (oConvertUtils.listIsEmpty(idList)){
|
|
log.info("{}{}", "装运单ID为空,装运明细查询失败", JSON.toJSON(storageBill));
|
|
log.info("{}{}", "装运单ID为空,装运明细查询失败", JSON.toJSON(storageBill));
|
|
- return null;
|
|
|
|
|
|
+ return result;
|
|
}
|
|
}
|
|
|
|
|
|
List<String> typeConfigIds = Arrays.stream(storageBill.getTypeConfigId().split(","))
|
|
List<String> typeConfigIds = Arrays.stream(storageBill.getTypeConfigId().split(","))
|
|
.collect(Collectors.toList());
|
|
.collect(Collectors.toList());
|
|
if (oConvertUtils.listIsEmpty(typeConfigIds)){
|
|
if (oConvertUtils.listIsEmpty(typeConfigIds)){
|
|
log.info("{}{}", "钢坯配置类型ID为空,装运明细查询失败", JSON.toJSON(storageBill));
|
|
log.info("{}{}", "钢坯配置类型ID为空,装运明细查询失败", JSON.toJSON(storageBill));
|
|
- return null;
|
|
|
|
|
|
+ return result;
|
|
}
|
|
}
|
|
|
|
|
|
//根据部门orgCode查询部门,需要将职位id进行传递
|
|
//根据部门orgCode查询部门,需要将职位id进行传递
|
|
List<BilletHotsendTypeConfig> billetHotsendTypeConfigs = billetHotsendTypeConfigService.listByIds(typeConfigIds);
|
|
List<BilletHotsendTypeConfig> billetHotsendTypeConfigs = billetHotsendTypeConfigService.listByIds(typeConfigIds);
|
|
if (CollectionUtils.isEmpty(billetHotsendTypeConfigs)){
|
|
if (CollectionUtils.isEmpty(billetHotsendTypeConfigs)){
|
|
log.info("{}{}", "钢坯类型配置信息查询为空,装运明细查询失败", JSON.toJSON(storageBill));
|
|
log.info("{}{}", "钢坯类型配置信息查询为空,装运明细查询失败", JSON.toJSON(storageBill));
|
|
- return null;
|
|
|
|
|
|
+ return result;
|
|
}
|
|
}
|
|
for (BilletHotsendTypeConfig billetHotsendTypeConfig : billetHotsendTypeConfigs) {
|
|
for (BilletHotsendTypeConfig billetHotsendTypeConfig : billetHotsendTypeConfigs) {
|
|
if ("billet_auto_tmp".equals(billetHotsendTypeConfig.getBelongTable())){
|
|
if ("billet_auto_tmp".equals(billetHotsendTypeConfig.getBelongTable())){
|
|
@@ -1604,9 +1604,7 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
|
|
log.info("{}{}", "查询当班装运单信息为空!", ccmNo);
|
|
log.info("{}{}", "查询当班装运单信息为空!", ccmNo);
|
|
return onDutyStorageBillStatistics;
|
|
return onDutyStorageBillStatistics;
|
|
}
|
|
}
|
|
- Integer allCarNum = storageBillList.stream()
|
|
|
|
- .map(StorageBill::getCarNum)
|
|
|
|
- .reduce(0, Integer::sum);
|
|
|
|
|
|
+ Integer allCarNum = storageBillList.stream().map(StorageBill::getCarNum).reduce(0, Integer::sum);
|
|
|
|
|
|
List<DestinationStatisticsDetails> statisticsDetailsList1 = new ArrayList<>();
|
|
List<DestinationStatisticsDetails> statisticsDetailsList1 = new ArrayList<>();
|
|
List<DestinationStatisticsDetails> statisticsDetailsList2 = new ArrayList<>();
|
|
List<DestinationStatisticsDetails> statisticsDetailsList2 = new ArrayList<>();
|
|
@@ -1634,18 +1632,8 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
|
|
double finalBlankOutput = bd.doubleValue();
|
|
double finalBlankOutput = bd.doubleValue();
|
|
String ccmNos = group.isEmpty() ? null : group.get(0).getCcmNo();
|
|
String ccmNos = group.isEmpty() ? null : group.get(0).getCcmNo();
|
|
return new DestinationStatisticsDetails(size, nums, finalBlankOutput, ccmNos);
|
|
return new DestinationStatisticsDetails(size, nums, finalBlankOutput, ccmNos);
|
|
- })
|
|
|
|
- .collect(Collectors.toList());
|
|
|
|
|
|
+ }).collect(Collectors.toList());
|
|
statisticsDetailsList1.addAll(currentList1);
|
|
statisticsDetailsList1.addAll(currentList1);
|
|
-
|
|
|
|
- int totalNums = currentList1.stream()
|
|
|
|
- .mapToInt(DestinationStatisticsDetails::getNums)
|
|
|
|
- .sum();
|
|
|
|
- onDutyStorageBillStatistics.setCounts(totalNums);
|
|
|
|
-
|
|
|
|
- double totalBlankOutputs = rollClubTwoDetailsList.stream().mapToDouble(RollClubTwoDetails::getBlankOutput).sum();
|
|
|
|
- BigDecimal bd = BigDecimal.valueOf(totalBlankOutputs).setScale(4, BigDecimal.ROUND_HALF_UP);
|
|
|
|
- onDutyStorageBillStatistics.setBlankOutputs(bd);
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1670,18 +1658,8 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
|
|
double finalBlankOutput = bd.doubleValue();
|
|
double finalBlankOutput = bd.doubleValue();
|
|
String ccmNos = group.isEmpty() ? null : group.get(0).getCcmNo();
|
|
String ccmNos = group.isEmpty() ? null : group.get(0).getCcmNo();
|
|
return new DestinationStatisticsDetails(size, nums, finalBlankOutput, ccmNos);
|
|
return new DestinationStatisticsDetails(size, nums, finalBlankOutput, ccmNos);
|
|
- })
|
|
|
|
- .collect(Collectors.toList());
|
|
|
|
|
|
+ }).collect(Collectors.toList());
|
|
statisticsDetailsList2.addAll(currentList2);
|
|
statisticsDetailsList2.addAll(currentList2);
|
|
-
|
|
|
|
- int totalNums = currentList2.stream()
|
|
|
|
- .mapToInt(DestinationStatisticsDetails::getNums)
|
|
|
|
- .sum();
|
|
|
|
- onDutyStorageBillStatistics.setCounts(totalNums);
|
|
|
|
-
|
|
|
|
- double totalBlankOutputs = rollClubThreeDetailsList.stream().mapToDouble(RollClubThreeDetails::getBlankOutput).sum();
|
|
|
|
- BigDecimal bd = BigDecimal.valueOf(totalBlankOutputs).setScale(4, BigDecimal.ROUND_HALF_UP);
|
|
|
|
- onDutyStorageBillStatistics.setBlankOutputs(bd);
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1706,18 +1684,8 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
|
|
double finalBlankOutput = bd.doubleValue();
|
|
double finalBlankOutput = bd.doubleValue();
|
|
String ccmNos = group.isEmpty() ? null : group.get(0).getCcmNo();
|
|
String ccmNos = group.isEmpty() ? null : group.get(0).getCcmNo();
|
|
return new DestinationStatisticsDetails(size, nums, finalBlankOutput, ccmNos);
|
|
return new DestinationStatisticsDetails(size, nums, finalBlankOutput, ccmNos);
|
|
- })
|
|
|
|
- .collect(Collectors.toList());
|
|
|
|
|
|
+ }).collect(Collectors.toList());
|
|
statisticsDetailsList3.addAll(currentList3);
|
|
statisticsDetailsList3.addAll(currentList3);
|
|
-
|
|
|
|
- int totalNums = currentList3.stream()
|
|
|
|
- .mapToInt(DestinationStatisticsDetails::getNums)
|
|
|
|
- .sum();
|
|
|
|
- onDutyStorageBillStatistics.setCounts(totalNums);
|
|
|
|
-
|
|
|
|
- double totalBlankOutputs = rollOutShippDetailsList.stream().mapToDouble(RollOutShippDetails::getBlankOutput).sum();
|
|
|
|
- BigDecimal bd = BigDecimal.valueOf(totalBlankOutputs).setScale(4, BigDecimal.ROUND_HALF_UP);
|
|
|
|
- onDutyStorageBillStatistics.setBlankOutputs(bd);
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1726,8 +1694,7 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
|
|
List<DestinationStatisticsDetails> mergedList = Stream.concat(
|
|
List<DestinationStatisticsDetails> mergedList = Stream.concat(
|
|
Stream.concat(statisticsDetailsList1.stream(), statisticsDetailsList2.stream()),
|
|
Stream.concat(statisticsDetailsList1.stream(), statisticsDetailsList2.stream()),
|
|
statisticsDetailsList3.stream()
|
|
statisticsDetailsList3.stream()
|
|
- )
|
|
|
|
- .collect(Collectors.groupingBy(DestinationStatisticsDetails::getSize))
|
|
|
|
|
|
+ ).collect(Collectors.groupingBy(DestinationStatisticsDetails::getSize))
|
|
.entrySet().stream()
|
|
.entrySet().stream()
|
|
.map(entry -> {
|
|
.map(entry -> {
|
|
String size = entry.getKey();
|
|
String size = entry.getKey();
|
|
@@ -1738,8 +1705,7 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
|
|
double finalBlankOutput = bd.doubleValue();
|
|
double finalBlankOutput = bd.doubleValue();
|
|
String ccmNoForGroup = group.isEmpty() ? null : group.get(0).getCcmNo();
|
|
String ccmNoForGroup = group.isEmpty() ? null : group.get(0).getCcmNo();
|
|
return new DestinationStatisticsDetails(size, totalNums, finalBlankOutput, ccmNoForGroup);
|
|
return new DestinationStatisticsDetails(size, totalNums, finalBlankOutput, ccmNoForGroup);
|
|
- })
|
|
|
|
- .collect(Collectors.toList());
|
|
|
|
|
|
+ }).collect(Collectors.toList());
|
|
// 遍历mergedList获取nums总和
|
|
// 遍历mergedList获取nums总和
|
|
int finalAmountTotal = mergedList.stream().mapToInt(DestinationStatisticsDetails::getNums).sum();
|
|
int finalAmountTotal = mergedList.stream().mapToInt(DestinationStatisticsDetails::getNums).sum();
|
|
// 遍历mergedList获取blankOutput总和
|
|
// 遍历mergedList获取blankOutput总和
|