wwh 1 rok temu
rodzic
commit
c786a3688f

+ 49 - 10
huimv-receive/src/main/java/com/huimv/receive/service/impl/BillCleanBeforeServiceImpl.java

@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.StringUtils;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.huimv.receive.common.token.TokenSign;
+import com.huimv.receive.common.utils.FlowUtil;
 import com.huimv.receive.common.utils.Result;
 import com.huimv.receive.common.utils.ResultCode;
 import com.huimv.receive.common.utils.UploadImage;
@@ -165,35 +166,73 @@ public class BillCleanBeforeServiceImpl extends ServiceImpl<BillCleanBeforeMappe
                 cleanBefore.getProcessId(), Integer.parseInt(cleanBefore.getFarmId()), cleanBefore.getTestLocation(), cleanBefore.getTestLocationId(),
                 cleanBefore.getVistitType(), cleanBefore.getPhone(),cleanBefore.getDepartureName(),cleanBefore.getDepartureId());
         if (nextId == 0) {
-            int index = allLocationId.indexOf(baseLocation.getId());
-            StringBuilder status = new StringBuilder(baseProcess.getAllLocationId());
-            status.setCharAt(index, '1');
-            status.setCharAt(index + 2, '1');
-            baseProcess.setAllLocationStatus(status.toString());
+            if (StringUtils.isBlank(split[1])) {
+                baseProcess.setProcessType(1);
+                if (allLocationId.length() > 5) {
+                    baseProcess.setAllLocationStatus("2,2,2,2,2");
+                } else {
+                    baseProcess.setAllLocationStatus("2,2,2");
+                }
+            } else {
+                String[] strings = allLocationId.split(",");
+                Integer index = 0;
+                for (int i = 0; i < strings.length; i++) {
+                    if ((baseLocation.getId().toString()).equals(strings[i])) {
+                        index = i;
+                    }
+                }
+                QueryWrapper<BaseLocation> queryWrapper1 = new QueryWrapper();
+                queryWrapper1.eq("id", strings[index + 2]);
+                BaseLocation location = locationMapper.selectOne(queryWrapper1);
+                FlowUtil flowUtil = new FlowUtil();
+                flowUtil.getEntity(Integer.parseInt(split[1]), cleanBefore.getVistitType(), cleanBefore.getDestName()
+                        , cleanBefore.getDestId(), cleanBefore.getAdmissionUserId(), cleanBefore.getAdmissionUserName(), cleanBefore.getPhone(),
+                        cleanBefore.getVistitDate(), location.getId(), location.getLocationName(), Integer.parseInt(farmId)
+                        , baseProcess.getId(), cleanBefore.getDepartureName(), cleanBefore.getDepartureId());
+                baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId + "," + split[1]);
+            }
         } else if (nextId == 1) {
             //新增采样
             BillSampling billSampling = (BillSampling) newObject;
+            if (cleanBefore.getVistitType() != 0) {
+                billSampling.setCarNum(cleanBefore.getCarNum());
+            }
             samplingMapper.insert(billSampling);
-        } else if (nextId == 2) {
+            baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
+        }else if (nextId == 2) {
             //新增pcr
             BillPcr billClean = (BillPcr) newObject;
             pcrMapper.insert(billClean);
-        } else if (nextId == 3) {
+            baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
+        }else if (nextId == 3) {
             //新增洗澡
             BillClean billClean = (BillClean) newObject;
+            if (cleanBefore.getVistitType() != 0) {
+                billClean.setCarNum(cleanBefore.getCarNum());
+            }
             cleanMapper.insert(billClean);
-        } else if (nextId == 4) {
+            baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
+        }else if (nextId == 4) {
             //新增隔离
             BillIsolate pcr = (BillIsolate) newObject;
             isolateMapper.insert(pcr);
-        } else if (nextId == 5) {
+            baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
+        }else if (nextId == 5) {
             BillDry billClean = (BillDry) newObject;
+            if (cleanBefore.getVistitType() != 0) {
+                billClean.setCarNum(cleanBefore.getCarNum());
+            }
             dryMapper.insert(billClean);
+            baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
             //新增烘干
-        } else if (nextId == 6) {
+        }else if (nextId == 6) {
             //新增洗澡前拍照
             BillCleanBefore before = (BillCleanBefore) newObject;
+            if (cleanBefore.getVistitType() != 0) {
+                before.setCarNum(cleanBefore.getCarNum());
+            }
             billCleanBeforeMapper.insert(before);
+            baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
         }
         baseProcess.setUpdateDate(baseProcess.getUpdateDate() + "," + LocalDateTime.now().format(dateTimeFormatter));
         baseProcess.setCurrentLocation(baseProcess.getCurrentLocation() + "," + baseLocation.getLocationName());

+ 103 - 28
huimv-receive/src/main/java/com/huimv/receive/service/impl/BillCleanServiceImpl.java

@@ -568,7 +568,6 @@ public class BillCleanServiceImpl extends ServiceImpl<BillCleanMapper, BillClean
     private BillSamplingMapper samplingMapper;
 
 
-
     @Override
     public Result listPersonalClean(HttpServletRequest httpServletRequest, Map<String, String> paramsMap) {
         String pageNo = paramsMap.get("pageNum");
@@ -854,37 +853,75 @@ public class BillCleanServiceImpl extends ServiceImpl<BillCleanMapper, BillClean
                 Object newObject = BillPcrServiceImpl.getNewObject(nextId, billClean.getDestName(), billClean.getDestId(), billClean.getAdmissionUserName(),
                         billClean.getAdmissionUserId(), billClean.getVistitDate(), billClean.getSubDate(),
                         billClean.getProcessId(), billClean.getFarmId(), billClean.getTestLocation(), billClean.getTestLocationId(),
-                        billClean.getVistitType(),billClean.getPhone(),billClean.getDepartureName(),billClean.getDepartureId());
+                        billClean.getVistitType(), billClean.getPhone(), billClean.getDepartureName(), billClean.getDepartureId());
                 if (nextId == 0) {
-                    int index = allLocationId.indexOf(baseLocation.getId());
-                    StringBuilder status = new StringBuilder(baseProcess.getAllLocationId());
-                    status.setCharAt(index, '1');
-                    status.setCharAt(index + 2, '1');
-                    baseProcess.setAllLocationStatus(status.toString());
-                } else if (nextId == 1) {
+                    if (StringUtils.isBlank(splits[1])) {
+                        baseProcess.setProcessType(1);
+                        if (allLocationId.length() > 5) {
+                            baseProcess.setAllLocationStatus("2,2,2,2,2");
+                        } else {
+                            baseProcess.setAllLocationStatus("2,2,2");
+                        }
+                    } else {
+                        String[] strings = allLocationId.split(",");
+                        Integer index = 0;
+                        for (int i = 0; i < strings.length; i++) {
+                            if ((baseLocation.getId().toString()).equals(strings[i])) {
+                                index = i;
+                            }
+                        }
+                        QueryWrapper<BaseLocation> queryWrapper1 = new QueryWrapper();
+                        queryWrapper1.eq("id", strings[index + 2]);
+                        BaseLocation location = locationMapper.selectOne(queryWrapper1);
+                        FlowUtil flowUtil = new FlowUtil();
+                        flowUtil.getEntity(Integer.parseInt(splits[1]), billClean.getVistitType(), billClean.getDestName()
+                                , billClean.getDestId(), billClean.getAdmissionUserId(), billClean.getAdmissionUserName(), billClean.getPhone(),
+                                billClean.getVistitDate(), location.getId(), location.getLocationName(), Integer.parseInt(farmId)
+                                , baseProcess.getId(), billClean.getDepartureName(), billClean.getDepartureId());
+                        baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId + "," + splits[1]);
+                    }
+                }else if (nextId == 1) {
                     //新增采样
                     BillSampling billSampling = (BillSampling) newObject;
+                    if (billClean.getVistitType() != 0) {
+                        billSampling.setCarNum(billClean.getCarNum());
+                    }
                     samplingMapper.insert(billSampling);
+                    baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
                 }else if (nextId == 2) {
                     //新增pcr
-                    BillPcr pcr = (BillPcr) newObject;
-                    pcrMapper.insert(pcr);
+                    BillPcr billClean1 = (BillPcr) newObject;
+                    pcrMapper.insert(billClean1);
+                    baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
                 }else if (nextId == 3) {
                     //新增洗澡
-                    BillClean pcr = (BillClean) newObject;
-                    cleanMapper.insert(pcr);
+                    BillClean billClean2 = (BillClean) newObject;
+                    if (billClean.getVistitType() != 0) {
+                        billClean2.setCarNum(billClean.getCarNum());
+                    }
+                    cleanMapper.insert(billClean2);
+                    baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
                 }else if (nextId == 4) {
-                    BillIsolate billIsolate = (BillIsolate) newObject;
-                    isolateMapper.insert(billIsolate);
                     //新增隔离
+                    BillIsolate pcr = (BillIsolate) newObject;
+                    isolateMapper.insert(pcr);
+                    baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
                 }else if (nextId == 5) {
-                    BillDry pcr = (BillDry) newObject;
-                    dryMapper.insert(pcr);
+                    BillDry billClean2 = (BillDry) newObject;
+                    if (billClean.getVistitType() != 0) {
+                        billClean2.setCarNum(billClean.getCarNum());
+                    }
+                    dryMapper.insert(billClean2);
+                    baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
                     //新增烘干
                 }else if (nextId == 6) {
                     //新增洗澡前拍照
                     BillCleanBefore before = (BillCleanBefore) newObject;
+                    if (billClean.getVistitType() != 0) {
+                        before.setCarNum(billClean.getCarNum());
+                    }
                     beforeMapper.insert(before);
+                    baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
                 }
                 baseProcess.setUpdateDate(baseProcess.getUpdateDate() + "," + sdf.format(new Date()));
                 baseProcess.setCurrentLocation(baseProcess.getCurrentLocation() + "," + baseLocation.getLocationName());
@@ -961,37 +998,75 @@ public class BillCleanServiceImpl extends ServiceImpl<BillCleanMapper, BillClean
                     Object newObject = BillPcrServiceImpl.getNewObject(nextId, billClean.getDestName(), billClean.getDestId(), billClean.getAdmissionUserName(),
                             billClean.getAdmissionUserId(), billClean.getVistitDate(), billClean.getSubDate(),
                             billClean.getProcessId(), billClean.getFarmId(), billClean.getTestLocation(), billClean.getTestLocationId(),
-                            billClean.getVistitType(),billClean.getPhone(),billClean.getDepartureName(),billClean.getDepartureId());
+                            billClean.getVistitType(), billClean.getPhone(), billClean.getDepartureName(), billClean.getDepartureId());
                     if (nextId == 0) {
-                        int index = allLocationId.indexOf(baseLocation.getId());
-                        StringBuilder status = new StringBuilder(baseProcess.getAllLocationId());
-                        status.setCharAt(index, '1');
-                        status.setCharAt(index + 2, '1');
-                        baseProcess.setAllLocationStatus(status.toString());
+                        if (StringUtils.isBlank(splits[1])) {
+                            baseProcess.setProcessType(1);
+                            if (allLocationId.length() > 5) {
+                                baseProcess.setAllLocationStatus("2,2,2,2,2");
+                            } else {
+                                baseProcess.setAllLocationStatus("2,2,2");
+                            }
+                        } else {
+                            String[] strings = allLocationId.split(",");
+                            Integer index = 0;
+                            for (int i = 0; i < strings.length; i++) {
+                                if ((baseLocation.getId().toString()).equals(strings[i])) {
+                                    index = i;
+                                }
+                            }
+                            QueryWrapper<BaseLocation> queryWrapper1 = new QueryWrapper();
+                            queryWrapper1.eq("id", strings[index + 2]);
+                            BaseLocation location = locationMapper.selectOne(queryWrapper1);
+                            FlowUtil flowUtil = new FlowUtil();
+                            flowUtil.getEntity(Integer.parseInt(splits[1]), billClean.getVistitType(), billClean.getDestName()
+                                    , billClean.getDestId(), billClean.getAdmissionUserId(), billClean.getAdmissionUserName(), billClean.getPhone(),
+                                    billClean.getVistitDate(), location.getId(), location.getLocationName(), Integer.parseInt(farmId)
+                                    , baseProcess.getId(), billClean.getDepartureName(), billClean.getDepartureId());
+                            baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId + "," + splits[1]);
+                        }
                     } else if (nextId == 1) {
                         //新增采样
                         BillSampling billSampling = (BillSampling) newObject;
+                        if (billClean.getVistitType() != 0) {
+                            billSampling.setCarNum(billClean.getCarNum());
+                        }
                         samplingMapper.insert(billSampling);
+                        baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
                     }else if (nextId == 2) {
                         //新增pcr
-                        BillPcr pcr = (BillPcr) newObject;
-                        pcrMapper.insert(pcr);
+                        BillPcr billClean1 = (BillPcr) newObject;
+                        pcrMapper.insert(billClean1);
+                        baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
                     }else if (nextId == 3) {
                         //新增洗澡
-                        BillClean pcr = (BillClean) newObject;
-                        cleanMapper.insert(pcr);
+                        BillClean billClean2 = (BillClean) newObject;
+                        if (billClean.getVistitType() != 0) {
+                            billClean2.setCarNum(billClean.getCarNum());
+                        }
+                        cleanMapper.insert(billClean2);
+                        baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
                     }else if (nextId == 4) {
                         //新增隔离
                         BillIsolate pcr = (BillIsolate) newObject;
                         isolateMapper.insert(pcr);
+                        baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
                     }else if (nextId == 5) {
-                        BillDry pcr = (BillDry) newObject;
-                        dryMapper.insert(pcr);
+                        BillDry billClean2 = (BillDry) newObject;
+                        if (billClean.getVistitType() != 0) {
+                            billClean2.setCarNum(billClean.getCarNum());
+                        }
+                        dryMapper.insert(billClean2);
+                        baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
                         //新增烘干
                     }else if (nextId == 6) {
                         //新增洗澡前拍照
                         BillCleanBefore before = (BillCleanBefore) newObject;
+                        if (billClean.getVistitType() != 0) {
+                            before.setCarNum(billClean.getCarNum());
+                        }
                         beforeMapper.insert(before);
+                        baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
                     }
 
                     baseProcess.setUpdateDate(baseProcess.getUpdateDate() + "," + sdf.format(new Date()));

+ 29 - 22
huimv-receive/src/main/java/com/huimv/receive/service/impl/BillPcrServiceImpl.java

@@ -421,7 +421,7 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
                         String[] strings = allLocationId.split(",");
                         Integer index = 0;
                         for (int i = 0; i < strings.length; i++) {
-                            if (baseLocation.getId().equals(strings[i])) {
+                            if ((baseLocation.getId().toString()).equals(strings[i])) {
                                 index=i;
                             }
                         }
@@ -434,15 +434,13 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
                                 billPcr.getVistitDate(),location.getId(),location.getLocationName(),Integer.parseInt(farmId)
                                 ,baseProcess.getId(),billPcr.getDepartureName(),billPcr.getDepartureId());
                         baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId+","+split[1]);
-                        int index1 = allLocationId.indexOf(baseLocation.getId());
-                        StringBuilder status = new StringBuilder(baseProcess.getAllLocationId());
-                        status.setCharAt(index1, '1');
-                        status.setCharAt(index1 + 2, '1');
-                        baseProcess.setAllLocationStatus(status.toString());
                     }
                 } else if (nextId == 1) {
                     //新增采样
                     BillSampling billSampling = (BillSampling) newObject;
+                    if (billPcr.getVistitType() != 0) {
+                        billSampling.setCarNum(billPcr.getCarNum());
+                    }
                     samplingMapper.insert(billSampling);
                     baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
                 }else if (nextId == 2) {
@@ -453,6 +451,9 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
                 }else if (nextId == 3) {
                     //新增洗澡
                     BillClean billClean = (BillClean) newObject;
+                    if (billPcr.getVistitType() != 0) {
+                        billClean.setCarNum(billPcr.getCarNum());
+                    }
                     cleanMapper.insert(billClean);
                     baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
                 }else if (nextId == 4) {
@@ -462,12 +463,18 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
                     baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
                 }else if (nextId == 5) {
                     BillDry billClean = (BillDry) newObject;
+                    if (billPcr.getVistitType() != 0) {
+                        billClean.setCarNum(billPcr.getCarNum());
+                    }
                     dryMapper.insert(billClean);
                     baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
                     //新增烘干
                 }else if (nextId == 6) {
                     //新增洗澡前拍照
                     BillCleanBefore before = (BillCleanBefore) newObject;
+                    if (billPcr.getVistitType() != 0) {
+                        before.setCarNum(billPcr.getCarNum());
+                    }
                     beforeMapper.insert(before);
                     baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
                 }
@@ -571,27 +578,27 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
     }
 
     public static void main(String[] args) {
-//        String s = "0,1,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]);
+        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]);
 //        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());
 
     }
 

+ 25 - 5
huimv-receive/src/main/java/com/huimv/receive/service/impl/BillPersonnelAdmissionServiceImpl.java

@@ -1303,11 +1303,31 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
                 billIsolate.getProcessId(), billIsolate.getFarmId(), billIsolate.getIsolateLocation(), billIsolate.getIsolateLocationId(),
                 billIsolate.getVistitType(),billIsolate.getPhone(),billIsolate.getDepartureName(),billIsolate.getDepartureId());
         if (nextId == 0) {
-            int index = allLocationId.indexOf(baseLocation.getId());
-            StringBuilder status = new StringBuilder(baseProcess.getAllLocationId());
-            status.setCharAt(index, '1');
-            status.setCharAt(index + 2, '1');
-            baseProcess.setAllLocationStatus(status.toString());
+            if (StringUtils.isBlank(splits[1])) {
+                baseProcess.setProcessType(1);
+                if (allLocationId.length() > 5) {
+                    baseProcess.setAllLocationStatus("2,2,2,2,2");
+                } else {
+                    baseProcess.setAllLocationStatus("2,2,2");
+                }
+            } else {
+                String[] strings = allLocationId.split(",");
+                Integer index = 0;
+                for (int i = 0; i < strings.length; i++) {
+                    if ((baseLocation.getId().toString()).equals(strings[i])) {
+                        index = i;
+                    }
+                }
+                QueryWrapper<BaseLocation> queryWrapper1 = new QueryWrapper();
+                queryWrapper1.eq("id", strings[index + 2]);
+                BaseLocation location = locationMapper.selectOne(queryWrapper1);
+                FlowUtil flowUtil = new FlowUtil();
+                flowUtil.getEntity(Integer.parseInt(splits[1]), billIsolate.getVistitType(), billIsolate.getDestName()
+                        , billIsolate.getDestId(), billIsolate.getAdmissionUserId(), billIsolate.getAdmissionUserName(), billIsolate.getPhone(),
+                        billIsolate.getVistitDate(), location.getId(), location.getLocationName(), Integer.parseInt(farmId)
+                        , baseProcess.getId(), billIsolate.getDepartureName(), billIsolate.getDepartureId());
+                baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId + "," + splits[1]);
+            }
         } else if (nextId == 1) {
             //新增采样
             BillSampling billSampling = (BillSampling) newObject;

+ 50 - 11
huimv-receive/src/main/java/com/huimv/receive/service/impl/BillSamplingServiceImpl.java

@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.StringUtils;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.huimv.receive.common.token.TokenSign;
+import com.huimv.receive.common.utils.FlowUtil;
 import com.huimv.receive.common.utils.Result;
 import com.huimv.receive.common.utils.ResultCode;
 import com.huimv.receive.common.utils.UploadImage;
@@ -168,35 +169,73 @@ public class BillSamplingServiceImpl extends ServiceImpl<BillSamplingMapper, Bil
                 sampling.getProcessId(), Integer.parseInt(sampling.getFarmId()), sampling.getTestLocation(), sampling.getTestLocationId(),
                 sampling.getVistitType(), sampling.getPhone(),sampling.getDepartureName(),sampling.getDepartureId());
         if (nextId == 0) {
-            int index = allLocationId.indexOf(baseLocation.getId());
-            StringBuilder status = new StringBuilder(baseProcess.getAllLocationId());
-            status.setCharAt(index, '1');
-            status.setCharAt(index + 2, '1');
-            baseProcess.setAllLocationStatus(status.toString());
+            if (StringUtils.isBlank(split[1])) {
+                baseProcess.setProcessType(1);
+                if (allLocationId.length() > 5) {
+                    baseProcess.setAllLocationStatus("2,2,2,2,2");
+                } else {
+                    baseProcess.setAllLocationStatus("2,2,2");
+                }
+            } else {
+                String[] strings = allLocationId.split(",");
+                Integer index = 0;
+                for (int i = 0; i < strings.length; i++) {
+                    if ((baseLocation.getId().toString()).equals(strings[i])) {
+                        index = i;
+                    }
+                }
+                QueryWrapper<BaseLocation> queryWrapper1 = new QueryWrapper();
+                queryWrapper1.eq("id", strings[index + 2]);
+                BaseLocation location = locationMapper.selectOne(queryWrapper1);
+                FlowUtil flowUtil = new FlowUtil();
+                flowUtil.getEntity(Integer.parseInt(split[1]), sampling.getVistitType(), sampling.getDestName()
+                        , sampling.getDestId(), sampling.getAdmissionUserId(), sampling.getAdmissionUserName(), sampling.getPhone(),
+                        sampling.getVistitDate(), location.getId(), location.getLocationName(), Integer.parseInt(farmId)
+                        , baseProcess.getId(), sampling.getDepartureName(), sampling.getDepartureId());
+                baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId + "," + split[1]);
+            }
         } else if (nextId == 1) {
             //新增采样
             BillSampling billSampling = (BillSampling) newObject;
+            if (sampling.getVistitType() != 0) {
+                billSampling.setCarNum(sampling.getCarNum());
+            }
             billSamplingMapper.insert(billSampling);
-        } else if (nextId == 2) {
+            baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
+        }else if (nextId == 2) {
             //新增pcr
             BillPcr billClean = (BillPcr) newObject;
             pcrMapper.insert(billClean);
-        } else if (nextId == 3) {
+            baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
+        }else if (nextId == 3) {
             //新增洗澡
             BillClean billClean = (BillClean) newObject;
+            if (sampling.getVistitType() != 0) {
+                billClean.setCarNum(sampling.getCarNum());
+            }
             cleanMapper.insert(billClean);
-        } else if (nextId == 4) {
+            baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
+        }else if (nextId == 4) {
             //新增隔离
             BillIsolate pcr = (BillIsolate) newObject;
             isolateMapper.insert(pcr);
-        } else if (nextId == 5) {
+            baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
+        }else if (nextId == 5) {
             BillDry billClean = (BillDry) newObject;
+            if (sampling.getVistitType() != 0) {
+                billClean.setCarNum(sampling.getCarNum());
+            }
             dryMapper.insert(billClean);
+            baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
             //新增烘干
-        } else if (nextId == 6) {
+        }else if (nextId == 6) {
             //新增洗澡前拍照
-            BillCleanBefore before =(BillCleanBefore) newObject;
+            BillCleanBefore before = (BillCleanBefore) newObject;
+            if (sampling.getVistitType() != 0) {
+                before.setCarNum(sampling.getCarNum());
+            }
             billCleanBeforeMapper.insert(before);
+            baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
         }
         baseProcess.setUpdateDate(baseProcess.getUpdateDate() + "," + LocalDateTime.now().format(dateTimeFormatter));
         baseProcess.setCurrentLocation(baseProcess.getCurrentLocation() + "," + baseLocation.getLocationName());