|
@@ -1890,15 +1890,23 @@ public class StorageBillController extends JeecgController<StorageBill, IStorage
|
|
|
.filter(info -> info.getStrandNo() != null && info.getStrandNo() >= 1 && info.getStrandNo() <= 8)
|
|
|
.collect(Collectors.groupingBy(BilletBasicInfo::getStrandNo, Collectors.counting()));
|
|
|
|
|
|
- // 将统计结果赋值到对应的属性
|
|
|
+ // 获取StrandNo等于1的所有定尺length,并去重后用逗号连接
|
|
|
heatsActualsInfo.setOneStrandNo(Math.toIntExact(strandCountMap.getOrDefault(1, 0L)));
|
|
|
+ heatsActualsInfo.setOneLength(getUniqueLengthsByStrandNo(billetBasicInfoList, 1));
|
|
|
heatsActualsInfo.setTwoStrandNo(Math.toIntExact(strandCountMap.getOrDefault(2, 0L)));
|
|
|
+ heatsActualsInfo.setTwoLength(getUniqueLengthsByStrandNo(billetBasicInfoList, 2));
|
|
|
heatsActualsInfo.setThreeStrandNo(Math.toIntExact(strandCountMap.getOrDefault(3, 0L)));
|
|
|
+ heatsActualsInfo.setThreeLength(getUniqueLengthsByStrandNo(billetBasicInfoList, 3));
|
|
|
heatsActualsInfo.setFourStrandNo(Math.toIntExact(strandCountMap.getOrDefault(4, 0L)));
|
|
|
+ heatsActualsInfo.setFourLength(getUniqueLengthsByStrandNo(billetBasicInfoList, 4));
|
|
|
heatsActualsInfo.setFiveStrandNo(Math.toIntExact(strandCountMap.getOrDefault(5, 0L)));
|
|
|
+ heatsActualsInfo.setFiveLength(getUniqueLengthsByStrandNo(billetBasicInfoList, 5));
|
|
|
heatsActualsInfo.setSixStrandNo(Math.toIntExact(strandCountMap.getOrDefault(6, 0L)));
|
|
|
+ heatsActualsInfo.setSixLength(getUniqueLengthsByStrandNo(billetBasicInfoList, 6));
|
|
|
heatsActualsInfo.setSevenStrandNo(Math.toIntExact(strandCountMap.getOrDefault(7, 0L)));
|
|
|
+ heatsActualsInfo.setSevenLength(getUniqueLengthsByStrandNo(billetBasicInfoList, 7));
|
|
|
heatsActualsInfo.setEightStrandNo(Math.toIntExact(strandCountMap.getOrDefault(8, 0L)));
|
|
|
+ heatsActualsInfo.setEightLength(getUniqueLengthsByStrandNo(billetBasicInfoList, 8));
|
|
|
|
|
|
// 直轧过滤并计算
|
|
|
List<BilletBasicInfo> filterDirectRollingList = billetBasicInfoList.stream()
|
|
@@ -2064,6 +2072,25 @@ public class StorageBillController extends JeecgController<StorageBill, IStorage
|
|
|
return Result.OK(heatsActualsInfoList);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 从钢坯信息列表中筛选指定流号的定尺长度,去重后用逗号连接
|
|
|
+ * @param billetList 钢坯信息列表
|
|
|
+ * @param strandNo 流号
|
|
|
+ * @return 去重后的定尺长度字符串,用逗号分隔
|
|
|
+ */
|
|
|
+ private String getUniqueLengthsByStrandNo(List<BilletBasicInfo> billetList, Integer strandNo) {
|
|
|
+ if (CollectionUtils.isEmpty(billetList) || strandNo == null) {
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ return billetList.stream()
|
|
|
+ .filter(info -> info.getStrandNo() != null && info.getStrandNo().equals(strandNo))
|
|
|
+ .map(BilletBasicInfo::getLength)
|
|
|
+ .filter(Objects::nonNull)
|
|
|
+ .distinct()
|
|
|
+ .map(String::valueOf)
|
|
|
+ .collect(Collectors.joining(","));
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 生成综合唯一编码
|
|
|
* @param date
|