Newspaper 1 anno fa
parent
commit
7a73638dd3

+ 2 - 1
huimv-receive/src/main/java/com/huimv/receive/common/utils/FlowUtil.java

@@ -5,8 +5,9 @@ import org.springframework.stereotype.Component;
 
 import java.time.LocalDateTime;
 
+@Component
 public class FlowUtil {
-    public static Object getEntity(Integer nextFlowId, Integer vistitType, String destName, Integer destId, Integer userId, String userName, String phone, LocalDateTime vistitDate, Integer locationId, String locationName, Integer farmId, Integer processId){
+    public Object getEntity(Integer nextFlowId,Integer vistitType, String destName, Integer destId, Integer userId, String userName, String phone, LocalDateTime vistitDate, Integer locationId, String locationName, Integer farmId, Integer processId){
         if (nextFlowId == 1){
             BillSampling billSampling = new BillSampling();
             billSampling.setVistitType(vistitType);

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

@@ -339,7 +339,7 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
                 baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextFlowId);
 
                 if (Integer.valueOf(nextFlowId) == 1){
-                    BillSampling billSampling = (BillSampling) FlowUtil.getEntity(Integer.valueOf(nextFlowId),
+                    BillSampling billSampling = (BillSampling) flowUtil.getEntity(Integer.valueOf(nextFlowId),
                             billPersonnelAdmission.getVistitType(),
                             billPersonnelAdmission.getDestName(),
                             billPersonnelAdmission.getDestId(),
@@ -356,7 +356,7 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
                     }
                     billSamplingMapper.insert(billSampling);
                 }else if (Integer.valueOf(nextFlowId) == 2){
-                    BillPcr billPcr = (BillPcr) FlowUtil.getEntity(Integer.valueOf(nextFlowId),
+                    BillPcr billPcr = (BillPcr) flowUtil.getEntity(Integer.valueOf(nextFlowId),
                             billPersonnelAdmission.getVistitType(),
                             billPersonnelAdmission.getDestName(),
                             billPersonnelAdmission.getDestId(),
@@ -373,7 +373,7 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
                     }
                     pcrMapper.insert(billPcr);
                 }else if (Integer.valueOf(nextFlowId) == 3){
-                    BillClean billClean = (BillClean) FlowUtil.getEntity(Integer.valueOf(nextFlowId),
+                    BillClean billClean = (BillClean) flowUtil.getEntity(Integer.valueOf(nextFlowId),
                             billPersonnelAdmission.getVistitType(),
                             billPersonnelAdmission.getDestName(),
                             billPersonnelAdmission.getDestId(),
@@ -390,7 +390,7 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
                     }
                     cleanMapper.insert(billClean);
                 }else if (Integer.valueOf(nextFlowId) == 4){
-                    BillIsolate billIsolate = (BillIsolate) FlowUtil.getEntity(Integer.valueOf(nextFlowId),
+                    BillIsolate billIsolate = (BillIsolate) flowUtil.getEntity(Integer.valueOf(nextFlowId),
                             billPersonnelAdmission.getVistitType(),
                             billPersonnelAdmission.getDestName(),
                             billPersonnelAdmission.getDestId(),
@@ -404,7 +404,7 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
                             baseProcess.getId());
                     billIsolateMapper.insert(billIsolate);
                 }else if (Integer.valueOf(nextFlowId) == 5){
-                    BillDry billDry = (BillDry) FlowUtil.getEntity(Integer.valueOf(nextFlowId),
+                    BillDry billDry = (BillDry) flowUtil.getEntity(Integer.valueOf(nextFlowId),
                             billPersonnelAdmission.getVistitType(),
                             billPersonnelAdmission.getDestName(),
                             billPersonnelAdmission.getDestId(),
@@ -418,7 +418,7 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
                             baseProcess.getId());
                     dryMapper.insert(billDry);
                 }else {
-                    BillCleanBefore billCleanBefore = (BillCleanBefore) FlowUtil.getEntity(Integer.valueOf(nextFlowId),
+                    BillCleanBefore billCleanBefore = (BillCleanBefore) flowUtil.getEntity(Integer.valueOf(nextFlowId),
                             billPersonnelAdmission.getVistitType(),
                             billPersonnelAdmission.getDestName(),
                             billPersonnelAdmission.getDestId(),