refactor(WmsMaterialCoilService): 移除废弃的厚度分组统计逻辑
- 删除了基于修剪需求的厚度分组统计代码 - 移除了 CoilTrimStatisticsVo 和 TrimWidthStatisticsVo 的构建逻辑 - 保留了净边和毛边列表的获取功能 - 简化了数据处理流程并提高代码可读性
This commit is contained in:
@@ -4325,23 +4325,6 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
|||||||
Map<String, List<CoilTrimRawVo>> byTrim = thicknessList.stream()
|
Map<String, List<CoilTrimRawVo>> byTrim = thicknessList.stream()
|
||||||
.collect(Collectors.groupingBy(v -> v.getTrimmingRequirement() == null ? "未知" : v.getTrimmingRequirement()));
|
.collect(Collectors.groupingBy(v -> v.getTrimmingRequirement() == null ? "未知" : v.getTrimmingRequirement()));
|
||||||
|
|
||||||
List<CoilTrimStatisticsVo> resultList = new ArrayList<>();
|
|
||||||
for (Map.Entry<String, List<CoilTrimRawVo>> trimEntry : byTrim.entrySet()) {
|
|
||||||
CoilTrimStatisticsVo trimVo = new CoilTrimStatisticsVo();
|
|
||||||
trimVo.setThickness(trimEntry.getKey());
|
|
||||||
|
|
||||||
List<TrimWidthStatisticsVo> widthList = new ArrayList<>();
|
|
||||||
for (CoilTrimRawVo raw : trimEntry.getValue()) {
|
|
||||||
TrimWidthStatisticsVo widthVo = new TrimWidthStatisticsVo();
|
|
||||||
widthVo.setWidth(raw.getWidth() == null ? "空置" : raw.getWidth());
|
|
||||||
widthVo.setCoilCount(raw.getCoilCount() == null ? 0 : raw.getCoilCount());
|
|
||||||
widthVo.setTotalWeight(raw.getTotalWeight() == null ? BigDecimal.ZERO : raw.getTotalWeight());
|
|
||||||
widthList.add(widthVo);
|
|
||||||
}
|
|
||||||
trimVo.setTrimmedList(widthList);
|
|
||||||
resultList.add(trimVo);
|
|
||||||
}
|
|
||||||
|
|
||||||
List<CoilTrimRawVo> trimmedList = byTrim.getOrDefault("净边", new ArrayList<>());
|
List<CoilTrimRawVo> trimmedList = byTrim.getOrDefault("净边", new ArrayList<>());
|
||||||
List<CoilTrimRawVo> untrimmedList = byTrim.getOrDefault("毛边", new ArrayList<>());
|
List<CoilTrimRawVo> untrimmedList = byTrim.getOrDefault("毛边", new ArrayList<>());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user