|
|
@ -79,13 +79,28 @@ public class AssemblyVisualListPrintStrategy implements IPrintTemplateStrategySe
|
|
|
|
|
|
|
|
|
|
|
|
// 总个数
|
|
|
|
// 总个数
|
|
|
|
Integer totalCount = partProdGroup.getTotalCount();
|
|
|
|
Integer totalCount = partProdGroup.getTotalCount();
|
|
|
|
|
|
|
|
Map<Integer, List<MesWorkOrderAssembly>> collect = workOrderAssemblyList.stream().collect(Collectors.groupingBy(MesWorkOrderAssembly::getDisplaySeq));
|
|
|
|
// 为空时显示内容
|
|
|
|
// 为空时显示内容
|
|
|
|
String isNullViewContent = StringUtils.isEmpty(partProdGroup.getIsNullViewContent()) ? "" : partProdGroup.getIsNullViewContent();
|
|
|
|
String isNullViewContent = StringUtils.isEmpty(partProdGroup.getIsNullViewContent()) ? "" : partProdGroup.getIsNullViewContent();
|
|
|
|
for (Integer index = 0; index < totalCount; index++) {
|
|
|
|
for (int index = 0; index < collect.size(); index++) {
|
|
|
|
String displayValue = workOrderAssemblyList.size() -1 < index ? isNullViewContent : workOrderAssemblyList.get(index).getDisplayValue();
|
|
|
|
List<MesWorkOrderAssembly> orderAssemblyList = collect.get(index+1);
|
|
|
|
|
|
|
|
List<String> disPlayValues = orderAssemblyList.stream().map(MesWorkOrderAssembly::getDisplayValue).distinct().collect(Collectors.toList());
|
|
|
|
|
|
|
|
String displayValue =isNullViewContent;
|
|
|
|
|
|
|
|
if(!disPlayValues.isEmpty()){
|
|
|
|
|
|
|
|
displayValue = String.join("\r\n", disPlayValues);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// String displayValue = workOrderAssemblyList.size() -1 < index ? isNullViewContent : workOrderAssemblyList.get(index).getDisplayValue();
|
|
|
|
|
|
|
|
|
|
|
|
resultMap.put(MesExtConstWords.ASSEMBLY_PARAM + (index+1), StringUtils.isEmpty(displayValue) ? StringUtils.isEmpty(isNullViewContent) ? "" : null : displayValue);
|
|
|
|
// resultMap.put(MesPcnExtConstWords.ASSEMBLY_PARAM + (index+1), StringUtils.isEmpty(displayValue) ? StringUtils.isEmpty(isNullViewContent) ? "" : isNullViewContent : displayValue);
|
|
|
|
|
|
|
|
resultMap.put(MesExtConstWords.ASSEMBLY_PARAM + (index+1), displayValue);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// 为空时显示内容
|
|
|
|
|
|
|
|
// String isNullViewContent = StringUtils.isEmpty(partProdGroup.getIsNullViewContent()) ? "" : partProdGroup.getIsNullViewContent();
|
|
|
|
|
|
|
|
// for (Integer index = 0; index < totalCount; index++) {
|
|
|
|
|
|
|
|
// String displayValue = workOrderAssemblyList.size() -1 < index ? isNullViewContent : workOrderAssemblyList.get(index).getDisplayValue();
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// resultMap.put(MesExtConstWords.ASSEMBLY_PARAM + (index+1), StringUtils.isEmpty(displayValue) ? StringUtils.isEmpty(isNullViewContent) ? "" : null : displayValue);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
printDataMapList.add(resultMap);
|
|
|
|
printDataMapList.add(resultMap);
|
|
|
|
|
|
|
|
|
|
|
|