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