DLC hace 8 meses
padre
commit
3858104069

+ 26 - 20
cx-aps/cx-aps-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ApsProcessOperationServiceImpl.java

@@ -1501,18 +1501,21 @@ public class ApsProcessOperationServiceImpl extends ServiceImpl<ApsProcessOperat
                         }
                     }
 
-                    StringBuffer planoutsb = new StringBuffer();
-                    Collections.sort(planoutputList);
-                    Integer outIndex = 1;
-                    if (planoutputList.size() == 1) {
-                        planoutsb.append("[1]" + planoutputList.get(0));
-                    } else {
-                        for (String planout : planoutputList) {
-                            planoutsb.append("[" + outIndex + "]" + planout + "/n");
-                            outIndex++;
+                    if (planoutputList.size() > 0) {
+                        StringBuffer planoutsb = new StringBuffer();
+                        Collections.sort(planoutputList);
+                        Integer outIndex = 1;
+                        if (planoutputList.size() == 1) {
+                            planoutsb.append("[1]" + planoutputList.get(0));
+                        } else {
+                            for (String planout : planoutputList) {
+                                planoutsb.append("[" + outIndex + "]" + planout + "/n");
+                                outIndex++;
+                            }
                         }
+                        apsProcessOperationDo.setPlanoutput(planoutsb.toString());
                     }
-                    apsProcessOperationDo.setPlanoutput(planoutsb.toString());
+
                     if (outval > 1) {
                         apsProcessOperationDo.setIssubsection("是");
                     } else {
@@ -1831,18 +1834,21 @@ public class ApsProcessOperationServiceImpl extends ServiceImpl<ApsProcessOperat
             }
         }
 
-        StringBuffer planoutsb = new StringBuffer();
-        Collections.sort(planoutputList);
-        Integer outIndex = 1;
-        if (planoutputList.size() == 1) {
-            planoutsb.append("[1]" + planoutputList.get(0));
-        } else {
-            for (String planout : planoutputList) {
-                planoutsb.append("[" + outIndex + "]" + planout + "/n");
-                outIndex++;
+        if (planoutputList.size() > 0) {
+            StringBuffer planoutsb = new StringBuffer();
+            Collections.sort(planoutputList);
+            Integer outIndex = 1;
+            if (planoutputList.size() == 1) {
+                planoutsb.append("[1]" + planoutputList.get(0));
+            } else {
+                for (String planout : planoutputList) {
+                    planoutsb.append("[" + outIndex + "]" + planout + "/n");
+                    outIndex++;
+                }
             }
+            apsProcessOperationDo.setPlanoutput(planoutsb.toString());
         }
-        apsProcessOperationDo.setPlanoutput(planoutsb.toString());
+
         if (outval > 1) {
             apsProcessOperationDo.setIssubsection("是");
         } else {