Commit 33702a672c462bd3c62bf9fe08b5d7a6983558f6

Authored by 房远帅
1 parent 9e06f5d1

订货单:历史生产工艺

@@ -888,10 +888,11 @@ public class PurchaseOrderInfoServiceImpl extends BaseMpServiceImpl<PurchaseOrde @@ -888,10 +888,11 @@ public class PurchaseOrderInfoServiceImpl extends BaseMpServiceImpl<PurchaseOrde
888 if (CollectionUtils.isEmpty(orderLineList)) { 888 if (CollectionUtils.isEmpty(orderLineList)) {
889 throw new DefaultClientException("订货单物料行数据不存在!"); 889 throw new DefaultClientException("订货单物料行数据不存在!");
890 } 890 }
891 - List<String> proProcessList = new ArrayList<>(); 891 + List<String> formattedProProcessList = new ArrayList<>();
892 String orderingUnit = orderInfo.getOrderingUnit(); 892 String orderingUnit = orderInfo.getOrderingUnit();
893 String workshopId = orderInfo.getWorkshopId(); 893 String workshopId = orderInfo.getWorkshopId();
894 - for (PurchaseOrderLine orderLine : orderLineList) { 894 + for (int i = 0; i < orderLineList.size(); i++) {
  895 + PurchaseOrderLine orderLine = orderLineList.get(i);
895 String industry = orderLine.getIndustry(); 896 String industry = orderLine.getIndustry();
896 String brand = orderLine.getBrand(); 897 String brand = orderLine.getBrand();
897 String status = orderLine.getStatus(); 898 String status = orderLine.getStatus();
@@ -919,12 +920,12 @@ public class PurchaseOrderInfoServiceImpl extends BaseMpServiceImpl<PurchaseOrde @@ -919,12 +920,12 @@ public class PurchaseOrderInfoServiceImpl extends BaseMpServiceImpl<PurchaseOrde
919 String proProcess = getBaseMapper().queryHisProProcess(params); 920 String proProcess = getBaseMapper().queryHisProProcess(params);
920 if (StringUtils.isNotBlank(proProcess)) { 921 if (StringUtils.isNotBlank(proProcess)) {
921 orderLine.setProductionProcess(proProcess); 922 orderLine.setProductionProcess(proProcess);
922 - proProcessList.add(proProcess); 923 + formattedProProcessList.add(formatProcessIndex(i + 1) + proProcess);
923 } 924 }
924 } 925 }
925 orderInfo.setPurchaseOrderLineList(orderLineList); 926 orderInfo.setPurchaseOrderLineList(orderLineList);
926 - if (CollectionUtils.isNotEmpty(proProcessList)) {  
927 - orderInfo.setProductionProcess(String.join("\n", proProcessList)); 927 + if (CollectionUtils.isNotEmpty(formattedProProcessList)) {
  928 + orderInfo.setProductionProcess(String.join(";", formattedProProcessList) + ";");
928 } 929 }
929 930
930 return orderInfo; 931 return orderInfo;
@@ -950,6 +951,16 @@ public class PurchaseOrderInfoServiceImpl extends BaseMpServiceImpl<PurchaseOrde @@ -950,6 +951,16 @@ public class PurchaseOrderInfoServiceImpl extends BaseMpServiceImpl<PurchaseOrde
950 return list.stream().anyMatch(item -> item.compareTo(value) == 0); 951 return list.stream().anyMatch(item -> item.compareTo(value) == 0);
951 } 952 }
952 953
  954 + private String formatProcessIndex(int index) {
  955 + String[] circledNumbers = {
  956 + "①", "②", "③", "④", "⑤", "⑥", "⑦", "⑧"
  957 + };
  958 + if (index > 0 && index <= circledNumbers.length) {
  959 + return circledNumbers[index - 1];
  960 + }
  961 + return "(" + index + ")";
  962 + }
  963 +
953 964
954 @Override 965 @Override
955 public void cleanCacheByKey(Serializable key) { 966 public void cleanCacheByKey(Serializable key) {