|
@@ -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()));
|