Commit f252180eaea8630d80bf8e034d99b8b9397db1f0

Authored by 房远帅
2 parents 61d5a14f 771a6af9

Merge branch 'master_chujiang_0819' into master_plan

... ... @@ -926,7 +926,7 @@ public class PurchaseOrderInfoServiceImpl extends BaseMpServiceImpl<PurchaseOrde
926 926 if (CollectionUtils.isEmpty(orderLineList)) {
927 927 throw new DefaultClientException("订货单物料行数据不存在!");
928 928 }
929   - List<String> formattedProProcessList = new ArrayList<>();
  929 + Map<String, List<String>> processIndexMap = new LinkedHashMap<>();
930 930 String orderingUnit = orderInfo.getOrderingUnit();
931 931 String workshopId = orderInfo.getWorkshopId();
932 932 for (int i = 0; i < orderLineList.size(); i++) {
... ... @@ -958,11 +958,17 @@ public class PurchaseOrderInfoServiceImpl extends BaseMpServiceImpl<PurchaseOrde
958 958 String proProcess = getBaseMapper().queryHisProProcess(params);
959 959 if (StringUtils.isNotBlank(proProcess)) {
960 960 orderLine.setProductionProcess(proProcess);
961   - formattedProProcessList.add(formatProcessIndex(i + 1) + proProcess);
  961 + String circledIndex = formatProcessIndex(i + 1);
  962 + processIndexMap.computeIfAbsent(proProcess, k -> new ArrayList<>()).add(circledIndex);
962 963 }
963 964 }
964 965 orderInfo.setPurchaseOrderLineList(orderLineList);
965   - if (CollectionUtils.isNotEmpty(formattedProProcessList)) {
  966 + if (!processIndexMap.isEmpty()) {
  967 + List<String> formattedProProcessList = new ArrayList<>();
  968 + for (Map.Entry<String, List<String>> entry : processIndexMap.entrySet()) {
  969 + String indexes = String.join("、", entry.getValue());
  970 + formattedProProcessList.add(indexes + entry.getKey());
  971 + }
966 972 orderInfo.setProductionProcess(String.join(";", formattedProProcessList) + ";");
967 973 }
968 974
... ...