瀏覽代碼

流程修改2

wwh 1 年之前
父節點
當前提交
a5751f63f4

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

@@ -185,10 +185,47 @@ public class BillCleanBeforeServiceImpl extends ServiceImpl<BillCleanBeforeMappe
                 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()
+                Object entity = 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());
+                if (Integer.parseInt(split[1]) == 1) {
+                    //新增采样
+                    BillSampling billSampling = (BillSampling) entity;
+                    if (cleanBefore.getVistitType() != 0) {
+                        billSampling.setCarNum(cleanBefore.getCarNum());
+                    }
+                    samplingMapper.insert(billSampling);
+                } else if (Integer.parseInt(split[1]) == 2) {
+                    //新增pcr
+                    BillPcr billClean = (BillPcr) entity;
+                    pcrMapper.insert(billClean);
+                } else if (Integer.parseInt(split[1]) == 3) {
+                    //新增洗澡
+                    BillClean billClean = (BillClean) entity;
+                    if (cleanBefore.getVistitType() != 0) {
+                        billClean.setCarNum(cleanBefore.getCarNum());
+                    }
+                    cleanMapper.insert(billClean);
+                } else if (Integer.parseInt(split[1]) == 4) {
+                    //新增隔离
+                    BillIsolate pcr = (BillIsolate) entity;
+                    isolateMapper.insert(pcr);
+                } else if (Integer.parseInt(split[1]) == 5) {
+                    BillDry billClean = (BillDry) entity;
+                    if (cleanBefore.getVistitType() != 0) {
+                        billClean.setCarNum(cleanBefore.getCarNum());
+                    }
+                    dryMapper.insert(billClean);
+                    //新增烘干
+                } else if (Integer.parseInt(split[1]) == 6) {
+                    //新增洗澡前拍照
+                    BillCleanBefore before = (BillCleanBefore) entity;
+                    if (cleanBefore.getVistitType() != 0) {
+                        before.setCarNum(cleanBefore.getCarNum());
+                    }
+                    billCleanBeforeMapper.insert(before);
+                }
                 baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId + "," + split[1]);
             }
         } else if (nextId == 1) {

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

@@ -874,10 +874,47 @@ public class BillCleanServiceImpl extends ServiceImpl<BillCleanMapper, BillClean
                         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()
+                        Object entity = 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());
+                        if (Integer.parseInt(splits[1]) == 1) {
+                            //新增采样
+                            BillSampling billSampling = (BillSampling) entity;
+                            if (billClean.getVistitType() != 0) {
+                                billSampling.setCarNum(billClean.getCarNum());
+                            }
+                            samplingMapper.insert(billSampling);
+                        } else if (Integer.parseInt(splits[1]) == 2) {
+                            //新增pcr
+                            BillPcr billClean1 = (BillPcr) entity;
+                            pcrMapper.insert(billClean1);
+                        } else if (Integer.parseInt(splits[1]) == 3) {
+                            //新增洗澡
+                            BillClean billClean1 = (BillClean) entity;
+                            if (billClean.getVistitType() != 0) {
+                                billClean1.setCarNum(billClean.getCarNum());
+                            }
+                            cleanMapper.insert(billClean1);
+                        } else if (Integer.parseInt(splits[1]) == 4) {
+                            //新增隔离
+                            BillIsolate pcr = (BillIsolate) entity;
+                            isolateMapper.insert(pcr);
+                        } else if (Integer.parseInt(splits[1]) == 5) {
+                            BillDry billClean1 = (BillDry) entity;
+                            if (billClean.getVistitType() != 0) {
+                                billClean1.setCarNum(billClean.getCarNum());
+                            }
+                            dryMapper.insert(billClean1);
+                            //新增烘干
+                        } else if (Integer.parseInt(splits[1]) == 6) {
+                            //新增洗澡前拍照
+                            BillCleanBefore before = (BillCleanBefore) entity;
+                            if (billClean.getVistitType() != 0) {
+                                before.setCarNum(billClean.getCarNum());
+                            }
+                            beforeMapper.insert(before);
+                        }
                         baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId + "," + splits[1]);
                     }
                 }else if (nextId == 1) {
@@ -1019,10 +1056,47 @@ public class BillCleanServiceImpl extends ServiceImpl<BillCleanMapper, BillClean
                             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()
+                            Object entity = 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());
+                            if (Integer.parseInt(splits[1]) == 1) {
+                                //新增采样
+                                BillSampling billSampling = (BillSampling) entity;
+                                if (billClean.getVistitType() != 0) {
+                                    billSampling.setCarNum(billClean.getCarNum());
+                                }
+                                samplingMapper.insert(billSampling);
+                            } else if (Integer.parseInt(splits[1]) == 2) {
+                                //新增pcr
+                                BillPcr billClean1 = (BillPcr) entity;
+                                pcrMapper.insert(billClean1);
+                            } else if (Integer.parseInt(splits[1]) == 3) {
+                                //新增洗澡
+                                BillClean billClean1 = (BillClean) entity;
+                                if (billClean.getVistitType() != 0) {
+                                    billClean1.setCarNum(billClean.getCarNum());
+                                }
+                                cleanMapper.insert(billClean1);
+                            } else if (Integer.parseInt(splits[1]) == 4) {
+                                //新增隔离
+                                BillIsolate pcr = (BillIsolate) entity;
+                                isolateMapper.insert(pcr);
+                            } else if (Integer.parseInt(splits[1]) == 5) {
+                                BillDry billClean1 = (BillDry) entity;
+                                if (billClean.getVistitType() != 0) {
+                                    billClean1.setCarNum(billClean.getCarNum());
+                                }
+                                dryMapper.insert(billClean1);
+                                //新增烘干
+                            } else if (Integer.parseInt(splits[1]) == 6) {
+                                //新增洗澡前拍照
+                                BillCleanBefore before = (BillCleanBefore) entity;
+                                if (billClean.getVistitType() != 0) {
+                                    before.setCarNum(billClean.getCarNum());
+                                }
+                                beforeMapper.insert(before);
+                            }
                             baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId + "," + splits[1]);
                         }
                     } else if (nextId == 1) {

+ 53 - 15
huimv-receive/src/main/java/com/huimv/receive/service/impl/BillPcrServiceImpl.java

@@ -288,6 +288,7 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
     private BillSamplingMapper samplingMapper;
     @Autowired
     private BillCleanBeforeMapper beforeMapper;
+
     @Override
     public Result list(HttpServletRequest httpServletRequest, Map<String, String> paramsMap) {
         String farmId = paramsMap.get("farmId");
@@ -393,7 +394,7 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
             if ("1".equals(result)) {
                 Integer pcrTime = washoutPointMapper.selectOne(new QueryWrapper<BaseWashoutPoint>().eq("farm_ids", farmId)
                         .eq("visiting_type", billPcr.getVistitType()).eq("location_id", baseLocation.getId())).getPcrTime();
-                System.out.println("pcr的下一个流程id:"+nextId);
+                System.out.println("pcr的下一个流程id:" + nextId);
                 billPcr.setBillStatus(1);
                 billPcr.setPassUserName(TokenSign.getUserNameByJwtToken(httpServletRequest));
                 billPcr.setPassUserId(TokenSign.getMemberIdByJwtToken(httpServletRequest));
@@ -407,7 +408,7 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
                 Object newObject = getNewObject(nextId, billPcr.getDestName(), billPcr.getDestId(), billPcr.getAdmissionUserName(),
                         billPcr.getAdmissionUserId(), billPcr.getVistitDate(), billPcr.getSubDate(),
                         billPcr.getProcessId(), billPcr.getFarmId(), billPcr.getTestLocation(), billPcr.getTestLocationId(),
-                        billPcr.getVistitType(),billPcr.getPhone(),billPcr.getDepartureName(),billPcr.getDepartureId());
+                        billPcr.getVistitType(), billPcr.getPhone(), billPcr.getDepartureName(), billPcr.getDepartureId());
                 System.out.println("这里是pcr通过的下一个流程id:" + nextId);
                 if (nextId == 0) {
                     if (StringUtils.isBlank(split[1])) {
@@ -422,18 +423,55 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
                         Integer index = 0;
                         for (int i = 0; i < strings.length; i++) {
                             if ((baseLocation.getId().toString()).equals(strings[i])) {
-                                index=i;
+                                index = i;
                             }
                         }
                         QueryWrapper<BaseLocation> queryWrapper = new QueryWrapper();
                         queryWrapper.eq("id", strings[index + 2]);
                         BaseLocation location = locationMapper.selectOne(queryWrapper);
                         FlowUtil flowUtil = new FlowUtil();
-                        flowUtil.getEntity(Integer.parseInt(split[1]),billPcr.getVistitType(),billPcr.getDestName()
-                                ,billPcr.getDestId(), billPcr.getAdmissionUserId(),billPcr.getAdmissionUserName(),billPcr.getPhone(),
-                                billPcr.getVistitDate(),location.getId(),location.getLocationName(),Integer.parseInt(farmId)
-                                ,baseProcess.getId(),billPcr.getDepartureName(),billPcr.getDepartureId());
-                        baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId+","+split[1]);
+                        Object entity = flowUtil.getEntity(Integer.parseInt(split[1]), billPcr.getVistitType(), billPcr.getDestName()
+                                , billPcr.getDestId(), billPcr.getAdmissionUserId(), billPcr.getAdmissionUserName(), billPcr.getPhone(),
+                                billPcr.getVistitDate(), location.getId(), location.getLocationName(), Integer.parseInt(farmId)
+                                , baseProcess.getId(), billPcr.getDepartureName(), billPcr.getDepartureId());
+                        if (Integer.parseInt(split[1]) == 1) {
+                            //新增采样
+                            BillSampling billSampling = (BillSampling) entity;
+                            if (billPcr.getVistitType() != 0) {
+                                billSampling.setCarNum(billPcr.getCarNum());
+                            }
+                            samplingMapper.insert(billSampling);
+                        } else if (Integer.parseInt(split[1]) == 2) {
+                            //新增pcr
+                            BillPcr billClean = (BillPcr) entity;
+                            pcrMapper.insert(billClean);
+                        } else if (Integer.parseInt(split[1]) == 3) {
+                            //新增洗澡
+                            BillClean billClean = (BillClean) entity;
+                            if (billPcr.getVistitType() != 0) {
+                                billClean.setCarNum(billPcr.getCarNum());
+                            }
+                            cleanMapper.insert(billClean);
+                        } else if (Integer.parseInt(split[1]) == 4) {
+                            //新增隔离
+                            BillIsolate pcr = (BillIsolate) entity;
+                            isolateMapper.insert(pcr);
+                        } else if (Integer.parseInt(split[1]) == 5) {
+                            BillDry billClean = (BillDry) entity;
+                            if (billPcr.getVistitType() != 0) {
+                                billClean.setCarNum(billPcr.getCarNum());
+                            }
+                            dryMapper.insert(billClean);
+                            //新增烘干
+                        } else if (Integer.parseInt(split[1]) == 6) {
+                            //新增洗澡前拍照
+                            BillCleanBefore before = (BillCleanBefore) entity;
+                            if (billPcr.getVistitType() != 0) {
+                                before.setCarNum(billPcr.getCarNum());
+                            }
+                            beforeMapper.insert(before);
+                        }
+                        baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId + "," + split[1]);
                     }
                 } else if (nextId == 1) {
                     //新增采样
@@ -443,12 +481,12 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
                     }
                     samplingMapper.insert(billSampling);
                     baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
-                }else if (nextId == 2) {
+                } else if (nextId == 2) {
                     //新增pcr
                     BillPcr billClean = (BillPcr) newObject;
                     pcrMapper.insert(billClean);
                     baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
-                }else if (nextId == 3) {
+                } else if (nextId == 3) {
                     //新增洗澡
                     BillClean billClean = (BillClean) newObject;
                     if (billPcr.getVistitType() != 0) {
@@ -456,12 +494,12 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
                     }
                     cleanMapper.insert(billClean);
                     baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
-                }else if (nextId == 4) {
+                } else if (nextId == 4) {
                     //新增隔离
                     BillIsolate pcr = (BillIsolate) newObject;
                     isolateMapper.insert(pcr);
                     baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
-                }else if (nextId == 5) {
+                } else if (nextId == 5) {
                     BillDry billClean = (BillDry) newObject;
                     if (billPcr.getVistitType() != 0) {
                         billClean.setCarNum(billPcr.getCarNum());
@@ -469,7 +507,7 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
                     dryMapper.insert(billClean);
                     baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
                     //新增烘干
-                }else if (nextId == 6) {
+                } else if (nextId == 6) {
                     //新增洗澡前拍照
                     BillCleanBefore before = (BillCleanBefore) newObject;
                     if (billPcr.getVistitType() != 0) {
@@ -587,7 +625,7 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
             }
         }
         System.out.println(index);
-        System.out.println(split[index+2]);
+        System.out.println(split[index + 2]);
 //        StringBuilder sb = new StringBuilder(s);
 //        Integer a = s.length() - 3;
 //        sb.setCharAt(a,'0');
@@ -631,7 +669,7 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
 
     public static Object getNewObject(Integer id, String destName, Integer destId, String admissionUserName, Integer admissionUserId
             , LocalDateTime vistitDate, LocalDateTime subDate, Integer processId, Integer farmId, String testLocation
-            , Integer testLocationId,Integer vistitType,String phone,String departureName,Integer departureId) {
+            , Integer testLocationId, Integer vistitType, String phone, String departureName, Integer departureId) {
         if (id == 1) {
             //采样
             BillSampling billSampling = new BillSampling();

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

@@ -1322,10 +1322,35 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
                 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()
+                Object entity = 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());
+                if (Integer.parseInt(splits[1]) == 1) {
+                    //新增采样
+                    BillSampling billSampling = (BillSampling) entity;
+                    samplingMapper.insert(billSampling);
+                } else if (Integer.parseInt(splits[1]) == 2) {
+                    //新增pcr
+                    BillPcr billClean = (BillPcr) entity;
+                    pcrMapper.insert(billClean);
+                } else if (Integer.parseInt(splits[1]) == 3) {
+                    //新增洗澡
+                    BillClean billClean = (BillClean) entity;
+                    cleanMapper.insert(billClean);
+                } else if (Integer.parseInt(splits[1]) == 4) {
+                    //新增隔离
+                    BillIsolate pcr = (BillIsolate) entity;
+                    isolateMapper.insert(pcr);
+                } else if (Integer.parseInt(splits[1]) == 5) {
+                    BillDry billClean = (BillDry) entity;
+                    dryMapper.insert(billClean);
+                    //新增烘干
+                } else if (Integer.parseInt(splits[1]) == 6) {
+                    //新增洗澡前拍照
+                    BillCleanBefore before = (BillCleanBefore) entity;
+                    beforeMapper.insert(before);
+                }
                 baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId + "," + splits[1]);
             }
         } else if (nextId == 1) {

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

@@ -188,10 +188,47 @@ public class BillSamplingServiceImpl extends ServiceImpl<BillSamplingMapper, Bil
                 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()
+                Object entity = 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());
+                if (Integer.parseInt(split[1]) == 1) {
+                    //新增采样
+                    BillSampling billSampling = (BillSampling) entity;
+                    if (sampling.getVistitType() != 0) {
+                        billSampling.setCarNum(sampling.getCarNum());
+                    }
+                    billSamplingMapper.insert(billSampling);
+                } else if (Integer.parseInt(split[1]) == 2) {
+                    //新增pcr
+                    BillPcr billClean = (BillPcr) entity;
+                    pcrMapper.insert(billClean);
+                } else if (Integer.parseInt(split[1]) == 3) {
+                    //新增洗澡
+                    BillClean billClean = (BillClean) entity;
+                    if (sampling.getVistitType() != 0) {
+                        billClean.setCarNum(sampling.getCarNum());
+                    }
+                    cleanMapper.insert(billClean);
+                } else if (Integer.parseInt(split[1]) == 4) {
+                    //新增隔离
+                    BillIsolate pcr = (BillIsolate) entity;
+                    isolateMapper.insert(pcr);
+                } else if (Integer.parseInt(split[1]) == 5) {
+                    BillDry billClean = (BillDry) entity;
+                    if (sampling.getVistitType() != 0) {
+                        billClean.setCarNum(sampling.getCarNum());
+                    }
+                    dryMapper.insert(billClean);
+                    //新增烘干
+                } else if (Integer.parseInt(split[1]) == 6) {
+                    //新增洗澡前拍照
+                    BillCleanBefore before = (BillCleanBefore) entity;
+                    if (sampling.getVistitType() != 0) {
+                        before.setCarNum(sampling.getCarNum());
+                    }
+                    billCleanBeforeMapper.insert(before);
+                }
                 baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId + "," + split[1]);
             }
         } else if (nextId == 1) {