Explorar el Código

流程修改2

wwh hace 1 año
padre
commit
44486fb7e8

+ 12 - 1
huimv-receive/src/main/java/com/huimv/receive/service/impl/BillCleanBeforeServiceImpl.java

@@ -168,7 +168,9 @@ public class BillCleanBeforeServiceImpl extends ServiceImpl<BillCleanBeforeMappe
         if (nextId == 0) {
             if (split.length == 1) {
                 baseProcess.setProcessType(1);
-                if (allLocationId.length() > 5) {
+                if (allLocationId.length() > 9) {
+                    baseProcess.setAllLocationStatus("2,2,2,2,2,2,2");
+                } else if (allLocationId.length() > 5 && allLocationId.length() < 10) {
                     baseProcess.setAllLocationStatus("2,2,2,2,2");
                 } else {
                     baseProcess.setAllLocationStatus("2,2,2");
@@ -227,6 +229,15 @@ public class BillCleanBeforeServiceImpl extends ServiceImpl<BillCleanBeforeMappe
                     billCleanBeforeMapper.insert(before);
                 }
                 baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId + "," + split[1]);
+                if (allLocationId.length() > 9) {
+                    if (index == 1) {
+                        baseProcess.setAllLocationStatus("2,2,2,1,0,0,0");
+                    } else {
+                        baseProcess.setAllLocationStatus("2,2,2,2,2,1,0");
+                    }
+                } else if (allLocationId.length() > 5 && allLocationId.length() < 10) {
+                    baseProcess.setAllLocationStatus("2,2,2,1,0");
+                }
             }
         } else if (nextId == 1) {
             //新增采样

+ 24 - 2
huimv-receive/src/main/java/com/huimv/receive/service/impl/BillCleanServiceImpl.java

@@ -857,7 +857,9 @@ public class BillCleanServiceImpl extends ServiceImpl<BillCleanMapper, BillClean
                 if (nextId == 0) {
                     if (StringUtils.isBlank(splits[1])) {
                         baseProcess.setProcessType(1);
-                        if (allLocationId.length() > 5) {
+                        if (allLocationId.length() > 9) {
+                            baseProcess.setAllLocationStatus("2,2,2,2,2,2,2");
+                        } else if (allLocationId.length() > 5 && allLocationId.length() < 10) {
                             baseProcess.setAllLocationStatus("2,2,2,2,2");
                         } else {
                             baseProcess.setAllLocationStatus("2,2,2");
@@ -916,6 +918,15 @@ public class BillCleanServiceImpl extends ServiceImpl<BillCleanMapper, BillClean
                             beforeMapper.insert(before);
                         }
                         baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId + "," + splits[1]);
+                        if (allLocationId.length() > 9) {
+                            if (index == 1) {
+                                baseProcess.setAllLocationStatus("2,2,2,1,0,0,0");
+                            } else {
+                                baseProcess.setAllLocationStatus("2,2,2,2,2,1,0");
+                            }
+                        } else if (allLocationId.length() > 5 && allLocationId.length() < 10) {
+                            baseProcess.setAllLocationStatus("2,2,2,1,0");
+                        }
                     }
                 }else if (nextId == 1) {
                     //新增采样
@@ -1038,7 +1049,9 @@ public class BillCleanServiceImpl extends ServiceImpl<BillCleanMapper, BillClean
                     if (nextId == 0) {
                         if (StringUtils.isBlank(splits[1])) {
                             baseProcess.setProcessType(1);
-                            if (allLocationId.length() > 5) {
+                            if (allLocationId.length() > 9) {
+                                baseProcess.setAllLocationStatus("2,2,2,2,2,2,2");
+                            } else if (allLocationId.length() > 5 && allLocationId.length() < 10) {
                                 baseProcess.setAllLocationStatus("2,2,2,2,2");
                             } else {
                                 baseProcess.setAllLocationStatus("2,2,2");
@@ -1097,6 +1110,15 @@ public class BillCleanServiceImpl extends ServiceImpl<BillCleanMapper, BillClean
                                 beforeMapper.insert(before);
                             }
                             baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId + "," + splits[1]);
+                            if (allLocationId.length() > 9) {
+                                if (index == 1) {
+                                    baseProcess.setAllLocationStatus("2,2,2,1,0,0,0");
+                                } else {
+                                    baseProcess.setAllLocationStatus("2,2,2,2,2,1,0");
+                                }
+                            } else if (allLocationId.length() > 5 && allLocationId.length() < 10) {
+                                baseProcess.setAllLocationStatus("2,2,2,1,0");
+                            }
                         }
                     } else if (nextId == 1) {
                         //新增采样

+ 27 - 16
huimv-receive/src/main/java/com/huimv/receive/service/impl/BillPcrServiceImpl.java

@@ -413,7 +413,9 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
                 if (nextId == 0) {
                     if (split.length == 1) {
                         baseProcess.setProcessType(1);
-                        if (allLocationId.length() > 5) {
+                        if (allLocationId.length() > 9) {
+                            baseProcess.setAllLocationStatus("2,2,2,2,2,2,2");
+                        } else if (allLocationId.length() > 5 && allLocationId.length() < 10) {
                             baseProcess.setAllLocationStatus("2,2,2,2,2");
                         } else {
                             baseProcess.setAllLocationStatus("2,2,2");
@@ -472,6 +474,15 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
                             beforeMapper.insert(before);
                         }
                         baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId + "," + split[1]);
+                        if (allLocationId.length() > 9) {
+                            if (index == 1) {
+                                baseProcess.setAllLocationStatus("2,2,2,1,0,0,0");
+                            } else {
+                                baseProcess.setAllLocationStatus("2,2,2,2,2,1,0");
+                            }
+                        } else if (allLocationId.length() > 5 && allLocationId.length() < 10) {
+                            baseProcess.setAllLocationStatus("2,2,2,1,0");
+                        }
                     }
                 } else if (nextId == 1) {
                     //新增采样
@@ -617,26 +628,26 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
 
     public static void main(String[] args) {
         String s = "0,1,0,2,0";
-        String[] split = s.split(",");
-        Integer index = 0;
-        for (int i = 0; i < split.length; i++) {
-            if ("1".equals(split[i])) {
-                index = i;
-            }
-        }
-        System.out.println(index);
-        System.out.println(split[index + 2]);
+//        String[] split = s.split(",");
+//        Integer index = 0;
+//        for (int i = 0; i < split.length; i++) {
+//            if ("1".equals(split[i])) {
+//                index = i;
+//            }
+//        }
+//        System.out.println(index);
+//        System.out.println(split[index + 2]);
 //        StringBuilder sb = new StringBuilder(s);
 //        Integer a = s.length() - 3;
 //        sb.setCharAt(a,'0');
 //        System.out.println(sb.toString());
 
-//        String s1 = "2,0,0";
-//        System.out.println(s1.indexOf("2"));
-//        StringBuilder sb = new StringBuilder(s1);
-//        sb.setCharAt(2, '1');
-//        sb.setCharAt(4, '1');
-//        System.out.println(sb.toString());
+        String s1 = "2,0,0";
+        System.out.println(s1.indexOf("2"));
+        StringBuilder sb = new StringBuilder(s1);
+        sb.setCharAt(2, '1');
+        sb.setCharAt(4, '1');
+        System.out.println(sb.toString());
 
     }
 

+ 12 - 1
huimv-receive/src/main/java/com/huimv/receive/service/impl/BillPersonnelAdmissionServiceImpl.java

@@ -1305,7 +1305,9 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
         if (nextId == 0) {
             if (StringUtils.isBlank(splits[1])) {
                 baseProcess.setProcessType(1);
-                if (allLocationId.length() > 5) {
+                if (allLocationId.length() > 9) {
+                    baseProcess.setAllLocationStatus("2,2,2,2,2,2,2");
+                } else if (allLocationId.length() > 5 && allLocationId.length() < 10) {
                     baseProcess.setAllLocationStatus("2,2,2,2,2");
                 } else {
                     baseProcess.setAllLocationStatus("2,2,2");
@@ -1352,6 +1354,15 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
                     beforeMapper.insert(before);
                 }
                 baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId + "," + splits[1]);
+                if (allLocationId.length() > 9) {
+                    if (index == 1) {
+                        baseProcess.setAllLocationStatus("2,2,2,1,0,0,0");
+                    } else {
+                        baseProcess.setAllLocationStatus("2,2,2,2,2,1,0");
+                    }
+                } else if (allLocationId.length() > 5 && allLocationId.length() < 10) {
+                    baseProcess.setAllLocationStatus("2,2,2,1,0");
+                }
             }
         } else if (nextId == 1) {
             //新增采样

+ 12 - 1
huimv-receive/src/main/java/com/huimv/receive/service/impl/BillSamplingServiceImpl.java

@@ -171,7 +171,9 @@ public class BillSamplingServiceImpl extends ServiceImpl<BillSamplingMapper, Bil
         if (nextId == 0) {
             if (split.length == 1) {
                 baseProcess.setProcessType(1);
-                if (allLocationId.length() > 5) {
+                if (allLocationId.length() > 9) {
+                    baseProcess.setAllLocationStatus("2,2,2,2,2,2,2");
+                } else if (allLocationId.length() > 5 && allLocationId.length() < 10) {
                     baseProcess.setAllLocationStatus("2,2,2,2,2");
                 } else {
                     baseProcess.setAllLocationStatus("2,2,2");
@@ -230,6 +232,15 @@ public class BillSamplingServiceImpl extends ServiceImpl<BillSamplingMapper, Bil
                     billCleanBeforeMapper.insert(before);
                 }
                 baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId + "," + split[1]);
+                if (allLocationId.length() > 9) {
+                    if (index == 1) {
+                        baseProcess.setAllLocationStatus("2,2,2,1,0,0,0");
+                    } else {
+                        baseProcess.setAllLocationStatus("2,2,2,2,2,1,0");
+                    }
+                } else if (allLocationId.length() > 5 && allLocationId.length() < 10) {
+                    baseProcess.setAllLocationStatus("2,2,2,1,0");
+                }
             }
         } else if (nextId == 1) {
             //新增采样