|
|
|
@ -85,17 +85,16 @@ public class AssemblyVisualListPrintStrategy implements IPrintTemplateStrategySe
|
|
|
|
|
Map<Integer, List<MesWorkOrderAssembly>> collect = CollectionUtils.isEmpty(workOrderAssemblyList) ? null : workOrderAssemblyList.stream().filter(o -> null != o).collect(Collectors.groupingBy(MesWorkOrderAssembly::getDisplaySeq));
|
|
|
|
|
// 为空时显示内容
|
|
|
|
|
String isNullViewContent = StringUtils.isEmpty(partProdGroup.getIsNullViewContent()) ? "" : partProdGroup.getIsNullViewContent();
|
|
|
|
|
if (!CollectionUtils.isEmpty(collect)) {
|
|
|
|
|
for (Integer displaySeq : collect.keySet()) {
|
|
|
|
|
List<MesWorkOrderAssembly> orderAssemblyList = collect.get(displaySeq);
|
|
|
|
|
List<String> disPlayValues = (orderAssemblyList.stream().filter(o -> (null != o && !StringUtils.isEmpty(o.getDisplayValue()))).map(MesWorkOrderAssembly::getDisplayValue).collect(Collectors.toList()))
|
|
|
|
|
.stream().filter(o -> !StringUtils.isEmpty(o)).distinct().collect(Collectors.toList());
|
|
|
|
|
String displayValue = isNullViewContent;
|
|
|
|
|
if(!CollectionUtils.isEmpty(disPlayValues)){
|
|
|
|
|
displayValue = String.join("\r\n", disPlayValues);
|
|
|
|
|
}
|
|
|
|
|
resultMap.put(MesExtConstWords.ASSEMBLY_PARAM + displaySeq, displayValue);
|
|
|
|
|
for (int i = 1; i <= 9; i ++) {
|
|
|
|
|
List<MesWorkOrderAssembly> orderAssemblyList = CollectionUtils.isEmpty(collect) ? null : collect.get(i);
|
|
|
|
|
List<String> disPlayValues = CollectionUtils.isEmpty(orderAssemblyList) ? null :
|
|
|
|
|
(orderAssemblyList.stream().filter(o -> (null != o && !StringUtils.isEmpty(o.getDisplayValue()))).map(MesWorkOrderAssembly::getDisplayValue).collect(Collectors.toList()))
|
|
|
|
|
.stream().filter(o -> !StringUtils.isEmpty(o)).distinct().collect(Collectors.toList());
|
|
|
|
|
String displayValue = isNullViewContent;
|
|
|
|
|
if(!CollectionUtils.isEmpty(disPlayValues)){
|
|
|
|
|
displayValue = String.join("\r\n", disPlayValues);
|
|
|
|
|
}
|
|
|
|
|
resultMap.put(MesExtConstWords.ASSEMBLY_PARAM + i, displayValue);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
printDataMapList.add(resultMap);
|
|
|
|
|