|
@@ -91,6 +91,8 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
|
|
|
private BillSamplingMapper billSamplingMapper;
|
|
|
@Autowired
|
|
|
private BillCleanBeforeMapper billCleanBeforeMapper;
|
|
|
+ @Autowired
|
|
|
+ private FlowUtil flowUtil;
|
|
|
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@@ -337,7 +339,7 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
|
|
|
baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextFlowId);
|
|
|
|
|
|
if (Integer.valueOf(nextFlowId) == 1){
|
|
|
- BillSampling billSampling = (BillSampling) getEntity(Integer.valueOf(nextFlowId),
|
|
|
+ BillSampling billSampling = (BillSampling) FlowUtil.getEntity(Integer.valueOf(nextFlowId),
|
|
|
billPersonnelAdmission.getVistitType(),
|
|
|
billPersonnelAdmission.getDestName(),
|
|
|
billPersonnelAdmission.getDestId(),
|
|
@@ -354,7 +356,7 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
|
|
|
}
|
|
|
billSamplingMapper.insert(billSampling);
|
|
|
}else if (Integer.valueOf(nextFlowId) == 2){
|
|
|
- BillPcr billPcr = (BillPcr) getEntity(Integer.valueOf(nextFlowId),
|
|
|
+ BillPcr billPcr = (BillPcr) FlowUtil.getEntity(Integer.valueOf(nextFlowId),
|
|
|
billPersonnelAdmission.getVistitType(),
|
|
|
billPersonnelAdmission.getDestName(),
|
|
|
billPersonnelAdmission.getDestId(),
|
|
@@ -371,7 +373,7 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
|
|
|
}
|
|
|
pcrMapper.insert(billPcr);
|
|
|
}else if (Integer.valueOf(nextFlowId) == 3){
|
|
|
- BillClean billClean = (BillClean) getEntity(Integer.valueOf(nextFlowId),
|
|
|
+ BillClean billClean = (BillClean) FlowUtil.getEntity(Integer.valueOf(nextFlowId),
|
|
|
billPersonnelAdmission.getVistitType(),
|
|
|
billPersonnelAdmission.getDestName(),
|
|
|
billPersonnelAdmission.getDestId(),
|
|
@@ -388,7 +390,7 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
|
|
|
}
|
|
|
cleanMapper.insert(billClean);
|
|
|
}else if (Integer.valueOf(nextFlowId) == 4){
|
|
|
- BillIsolate billIsolate = (BillIsolate) getEntity(Integer.valueOf(nextFlowId),
|
|
|
+ BillIsolate billIsolate = (BillIsolate) FlowUtil.getEntity(Integer.valueOf(nextFlowId),
|
|
|
billPersonnelAdmission.getVistitType(),
|
|
|
billPersonnelAdmission.getDestName(),
|
|
|
billPersonnelAdmission.getDestId(),
|
|
@@ -402,7 +404,7 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
|
|
|
baseProcess.getId());
|
|
|
billIsolateMapper.insert(billIsolate);
|
|
|
}else if (Integer.valueOf(nextFlowId) == 5){
|
|
|
- BillDry billDry = (BillDry) getEntity(Integer.valueOf(nextFlowId),
|
|
|
+ BillDry billDry = (BillDry) FlowUtil.getEntity(Integer.valueOf(nextFlowId),
|
|
|
billPersonnelAdmission.getVistitType(),
|
|
|
billPersonnelAdmission.getDestName(),
|
|
|
billPersonnelAdmission.getDestId(),
|
|
@@ -416,7 +418,7 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
|
|
|
baseProcess.getId());
|
|
|
dryMapper.insert(billDry);
|
|
|
}else {
|
|
|
- BillCleanBefore billCleanBefore = (BillCleanBefore) getEntity(Integer.valueOf(nextFlowId),
|
|
|
+ BillCleanBefore billCleanBefore = (BillCleanBefore) FlowUtil.getEntity(Integer.valueOf(nextFlowId),
|
|
|
billPersonnelAdmission.getVistitType(),
|
|
|
billPersonnelAdmission.getDestName(),
|
|
|
billPersonnelAdmission.getDestId(),
|
|
@@ -576,101 +578,6 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
|
|
|
return Result.SUCCESS();
|
|
|
}
|
|
|
|
|
|
- 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);
|
|
|
- billSampling.setDestName(destName);
|
|
|
- billSampling.setDestId(destId);
|
|
|
- billSampling.setAdmissionUserName(userName);
|
|
|
- billSampling.setAdmissionUserId(userId);
|
|
|
- billSampling.setVistitDate(vistitDate);
|
|
|
- billSampling.setSubDate(LocalDateTime.now());
|
|
|
- billSampling.setPhone(phone);
|
|
|
- billSampling.setTestLocation(locationName);
|
|
|
- billSampling.setTestLocationId(locationId);
|
|
|
- billSampling.setProcessId(processId);
|
|
|
- billSampling.setFarmId(String.valueOf(farmId));
|
|
|
- return billSampling;
|
|
|
- }else if (nextFlowId == 2){
|
|
|
- BillPcr billPcr = new BillPcr();
|
|
|
- billPcr.setVistitType(vistitType);
|
|
|
- billPcr.setDestName(destName);
|
|
|
- billPcr.setDestId(destId);
|
|
|
- billPcr.setAdmissionUserName(userName);
|
|
|
- billPcr.setAdmissionUserId(userId);
|
|
|
- billPcr.setVistitDate(vistitDate);
|
|
|
- billPcr.setSubDate(LocalDateTime.now());
|
|
|
- billPcr.setPhone(phone);
|
|
|
- billPcr.setTestLocation(locationName);
|
|
|
- billPcr.setTestLocationId(locationId);
|
|
|
- billPcr.setProcessId(processId);
|
|
|
- billPcr.setFarmId(farmId);
|
|
|
- return billPcr;
|
|
|
- }else if (nextFlowId == 3){
|
|
|
- BillClean billClean = new BillClean();
|
|
|
- billClean.setVistitType(vistitType);
|
|
|
- billClean.setDestName(destName);
|
|
|
- billClean.setDestId(destId);
|
|
|
- billClean.setAdmissionUserName(userName);
|
|
|
- billClean.setAdmissionUserId(userId);
|
|
|
- billClean.setVistitDate(vistitDate);
|
|
|
- billClean.setSubDate(LocalDateTime.now());
|
|
|
- billClean.setPhone(phone);
|
|
|
- billClean.setTestLocation(locationName);
|
|
|
- billClean.setTestLocationId(locationId);
|
|
|
- billClean.setProcessId(processId);
|
|
|
- billClean.setFarmId(farmId);
|
|
|
- return billClean;
|
|
|
- }else if (nextFlowId == 4){
|
|
|
- BillIsolate billIsolate = new BillIsolate();
|
|
|
- billIsolate.setVistitType(vistitType);
|
|
|
- billIsolate.setDestName(destName);
|
|
|
- billIsolate.setDestId(destId);
|
|
|
- billIsolate.setAdmissionUserName(userName);
|
|
|
- billIsolate.setAdmissionUserId(userId);
|
|
|
- billIsolate.setVistitDate(vistitDate);
|
|
|
- billIsolate.setSubDate(LocalDateTime.now());
|
|
|
- billIsolate.setPhone(phone);
|
|
|
- billIsolate.setIsolateLocation(locationName);
|
|
|
- billIsolate.setIsolateLocationId(locationId);
|
|
|
- billIsolate.setProcessId(processId);
|
|
|
- billIsolate.setFarmId(farmId);
|
|
|
- return billIsolate;
|
|
|
- }else if (nextFlowId == 5){
|
|
|
- BillDry billDry = new BillDry();
|
|
|
- billDry.setVistitType(vistitType);
|
|
|
- billDry.setDestName(destName);
|
|
|
- billDry.setDestId(destId);
|
|
|
- billDry.setAdmissionUserName(userName);
|
|
|
- billDry.setAdmissionUserId(userId);
|
|
|
- billDry.setVistitDate(vistitDate);
|
|
|
- billDry.setSubDate(LocalDateTime.now());
|
|
|
- billDry.setPhone(phone);
|
|
|
- billDry.setTestLocation(locationName);
|
|
|
- billDry.setTestLocationId(locationId);
|
|
|
- billDry.setProcessId(processId);
|
|
|
- billDry.setFarmId(farmId);
|
|
|
- return billDry;
|
|
|
- }else {
|
|
|
- BillCleanBefore billCleanBefore = new BillCleanBefore();
|
|
|
- billCleanBefore.setVistitType(vistitType);
|
|
|
- billCleanBefore.setDestName(destName);
|
|
|
- billCleanBefore.setDestId(destId);
|
|
|
- billCleanBefore.setAdmissionUserName(userName);
|
|
|
- billCleanBefore.setAdmissionUserId(userId);
|
|
|
- billCleanBefore.setVistitDate(vistitDate);
|
|
|
- billCleanBefore.setSubDate(LocalDateTime.now());
|
|
|
- billCleanBefore.setPhone(phone);
|
|
|
- billCleanBefore.setTestLocation(locationName);
|
|
|
- billCleanBefore.setTestLocationId(locationId);
|
|
|
- billCleanBefore.setProcessId(processId);
|
|
|
- billCleanBefore.setFarmId(String.valueOf(farmId));
|
|
|
- return billCleanBefore;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
|
|
|
@Override
|
|
|
public Result listAll(HttpServletRequest httpServletRequest, Map<String, String> paramsMap) {
|