|
@@ -304,7 +304,7 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
|
|
Page<BillPcr> page = new Page<>(Integer.parseInt(pageNum), Integer.parseInt(pageSize));
|
|
Page<BillPcr> page = new Page<>(Integer.parseInt(pageNum), Integer.parseInt(pageSize));
|
|
String[] locationIds = TokenSign.getWorkIdByJwtToken(httpServletRequest).split(",");
|
|
String[] locationIds = TokenSign.getWorkIdByJwtToken(httpServletRequest).split(",");
|
|
QueryWrapper<BillPcr> queryWrapper = new QueryWrapper<>();
|
|
QueryWrapper<BillPcr> queryWrapper = new QueryWrapper<>();
|
|
- queryWrapper.in("test_location_id", locationIds).orderByDesc("sub_date");
|
|
|
|
|
|
+ queryWrapper/*.in("test_location_id", locationIds)*/.orderByDesc("sub_date");
|
|
if ("0".equals(type)) {
|
|
if ("0".equals(type)) {
|
|
queryWrapper.in("bill_status", 0, 1, 2, 3, 4);
|
|
queryWrapper.in("bill_status", 0, 1, 2, 3, 4);
|
|
}
|
|
}
|
|
@@ -318,7 +318,7 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
|
|
queryWrapper.in("bill_status", 2, 3);
|
|
queryWrapper.in("bill_status", 2, 3);
|
|
}
|
|
}
|
|
QueryWrapper<BillPcr> queryWrapper2 = new QueryWrapper<>();
|
|
QueryWrapper<BillPcr> queryWrapper2 = new QueryWrapper<>();
|
|
- queryWrapper2.in("test_location_id", locationIds).orderByDesc("sub_date");
|
|
|
|
|
|
+ queryWrapper2/*.in("test_location_id", locationIds)*/.orderByDesc("sub_date");
|
|
queryWrapper2.eq("bill_status", 0);
|
|
queryWrapper2.eq("bill_status", 0);
|
|
return new Result(ResultCode.SUCCESS, pcrMapper.selectPage(page, queryWrapper), pcrMapper.selectCount(queryWrapper2));
|
|
return new Result(ResultCode.SUCCESS, pcrMapper.selectPage(page, queryWrapper), pcrMapper.selectCount(queryWrapper2));
|
|
}
|
|
}
|
|
@@ -333,7 +333,8 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
|
|
@Override
|
|
@Override
|
|
@Transactional
|
|
@Transactional
|
|
public Result edit(HttpServletRequest httpServletRequest, String farmId, String id, String date, String result,
|
|
public Result edit(HttpServletRequest httpServletRequest, String farmId, String id, String date, String result,
|
|
- MultipartFile img1, MultipartFile img2, MultipartFile img3, MultipartFile picture1, MultipartFile picture2, MultipartFile picture3) throws ParseException, IOException {
|
|
|
|
|
|
+ MultipartFile img1, MultipartFile img2, MultipartFile img3, MultipartFile picture1, MultipartFile picture2,
|
|
|
|
+ MultipartFile picture3) throws ParseException, IOException {
|
|
//1为合格2为异常
|
|
//1为合格2为异常
|
|
String s1 = "";
|
|
String s1 = "";
|
|
String s2 = "";
|
|
String s2 = "";
|
|
@@ -453,7 +454,8 @@ 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.getMidId(),billPcr.getMidName());
|
|
|
|
|
|
+ billPcr.getVistitType(), billPcr.getPhone(), billPcr.getDepartureName(), billPcr.getDepartureId()
|
|
|
|
+ ,billPcr.getMidId(),billPcr.getMidName(),billPcr.getFarmName());
|
|
System.out.println("这里是pcr通过的下一个流程id:" + nextId);
|
|
System.out.println("这里是pcr通过的下一个流程id:" + nextId);
|
|
if (nextId == 0) {
|
|
if (nextId == 0) {
|
|
if (split.length == 1) {
|
|
if (split.length == 1) {
|
|
@@ -498,8 +500,7 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
|
|
PeopleList peopleList = new PeopleList();
|
|
PeopleList peopleList = new PeopleList();
|
|
peopleList.setFarmId(billPcr.getFarmId().toString());
|
|
peopleList.setFarmId(billPcr.getFarmId().toString());
|
|
peopleList.setDeviceCode(deviceList.getDeviceCode());
|
|
peopleList.setDeviceCode(deviceList.getDeviceCode());
|
|
- UUID uuid = UUID.randomUUID();
|
|
|
|
- peopleList.setUserId(uuid.toString());
|
|
|
|
|
|
+ peopleList.setUserId(billPcr.getProcessId().toString());
|
|
peopleList.setUserName(billPcr.getAdmissionUserName());
|
|
peopleList.setUserName(billPcr.getAdmissionUserName());
|
|
peopleList.setPassword("123456");
|
|
peopleList.setPassword("123456");
|
|
peopleList.setType(0);
|
|
peopleList.setType(0);
|
|
@@ -529,8 +530,8 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
|
|
FlowUtil flowUtil = new FlowUtil();
|
|
FlowUtil flowUtil = new FlowUtil();
|
|
Object entity = flowUtil.getEntity(Integer.parseInt(split[1]), billPcr.getVistitType(), billPcr.getDestName()
|
|
Object entity = flowUtil.getEntity(Integer.parseInt(split[1]), billPcr.getVistitType(), billPcr.getDestName()
|
|
, billPcr.getDestId(), billPcr.getAdmissionUserId(), billPcr.getAdmissionUserName(), billPcr.getPhone(),
|
|
, billPcr.getDestId(), billPcr.getAdmissionUserId(), billPcr.getAdmissionUserName(), billPcr.getPhone(),
|
|
- billPcr.getVistitDate(), location.getId(), location.getLocationName(), Integer.parseInt(farmId)
|
|
|
|
- , baseProcess.getId(), billPcr.getDepartureName(), billPcr.getDepartureId(),billPcr.getMidId(),billPcr.getMidName());
|
|
|
|
|
|
+ billPcr.getVistitDate(), location.getId(), location.getLocationName(), billPcr.getFarmId()
|
|
|
|
+ , baseProcess.getId(), billPcr.getDepartureName(), billPcr.getDepartureId(),billPcr.getMidId(),billPcr.getMidName(),billPcr.getFarmName());
|
|
if (Integer.parseInt(split[1]) == 1) {
|
|
if (Integer.parseInt(split[1]) == 1) {
|
|
//新增采样
|
|
//新增采样
|
|
BillSampling billSampling = (BillSampling) entity;
|
|
BillSampling billSampling = (BillSampling) entity;
|
|
@@ -572,8 +573,7 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
|
|
PeopleList peopleList = new PeopleList();
|
|
PeopleList peopleList = new PeopleList();
|
|
peopleList.setFarmId(billPcr.getFarmId().toString());
|
|
peopleList.setFarmId(billPcr.getFarmId().toString());
|
|
peopleList.setDeviceCode(deviceList.getDeviceCode());
|
|
peopleList.setDeviceCode(deviceList.getDeviceCode());
|
|
- UUID uuid = UUID.randomUUID();
|
|
|
|
- peopleList.setUserId(uuid.toString());
|
|
|
|
|
|
+ peopleList.setUserId(billPcr.getProcessId().toString());
|
|
peopleList.setUserName(billPcr.getAdmissionUserName());
|
|
peopleList.setUserName(billPcr.getAdmissionUserName());
|
|
peopleList.setPassword("123456");
|
|
peopleList.setPassword("123456");
|
|
peopleList.setType(0);
|
|
peopleList.setType(0);
|
|
@@ -746,8 +746,7 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
|
|
PeopleList peopleList = new PeopleList();
|
|
PeopleList peopleList = new PeopleList();
|
|
peopleList.setFarmId(billPcr.getFarmId().toString());
|
|
peopleList.setFarmId(billPcr.getFarmId().toString());
|
|
peopleList.setDeviceCode(deviceList.getDeviceCode());
|
|
peopleList.setDeviceCode(deviceList.getDeviceCode());
|
|
- UUID uuid = UUID.randomUUID();
|
|
|
|
- peopleList.setUserId(uuid.toString());
|
|
|
|
|
|
+ peopleList.setUserId(billPcr.getProcessId().toString());
|
|
peopleList.setUserName(billPcr.getAdmissionUserName());
|
|
peopleList.setUserName(billPcr.getAdmissionUserName());
|
|
peopleList.setPassword("123456");
|
|
peopleList.setPassword("123456");
|
|
peopleList.setType(0);
|
|
peopleList.setType(0);
|
|
@@ -864,6 +863,562 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
+ @Transactional
|
|
|
|
+ public Result editBatch(HttpServletRequest httpServletRequest,String farmId, String ids, String date, String result,
|
|
|
|
+ MultipartFile img1, MultipartFile img2, MultipartFile img3, MultipartFile picture1, MultipartFile picture2, MultipartFile picture3) throws ParseException, IOException {
|
|
|
|
+
|
|
|
|
+ String s1 = "";
|
|
|
|
+ String s2 = "";
|
|
|
|
+ String s3 = "";
|
|
|
|
+ if (ObjectUtil.isNotEmpty(img1)) {
|
|
|
|
+ s1 = uploadImage.uploadImg(img1);
|
|
|
|
+ if (s1.equals("上传失败")) {
|
|
|
|
+ TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
|
|
+ return new Result(10001, "检测图片1上传失败", false);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (ObjectUtil.isNotEmpty(img2)) {
|
|
|
|
+ String s = uploadImage.uploadImg(img2);
|
|
|
|
+ s2 = "," + s;
|
|
|
|
+ if (s.equals("上传失败")) {
|
|
|
|
+ TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
|
|
+ return new Result(10001, "检测图片2上传失败", false);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (ObjectUtil.isNotEmpty(img3)) {
|
|
|
|
+ String s = uploadImage.uploadImg(img3);
|
|
|
|
+ s3 = "," + s;
|
|
|
|
+ if (s.equals("上传失败")) {
|
|
|
|
+ TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
|
|
+ return new Result(10001, "检测图片3上传失败", false);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ String s = s1 + s2 + s3;
|
|
|
|
+ String picUrl = null;
|
|
|
|
+ if (ObjectUtil.isNotEmpty(picture1)){
|
|
|
|
+ String pic1 = uploadImage.getImageCom(picture1);
|
|
|
|
+ if (pic1.equals("上传失败")){
|
|
|
|
+ TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
|
|
+ return new Result(10001, "物品检测图片1上传失败", false);
|
|
|
|
+ }else {
|
|
|
|
+ picUrl = pic1;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (ObjectUtil.isNotEmpty(picture2)){
|
|
|
|
+ String pic2 = uploadImage.getImageCom(picture2);
|
|
|
|
+ if (pic2.equals("上传失败")){
|
|
|
|
+ TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
|
|
+ return new Result(10001, "物品检测图片2上传失败", false);
|
|
|
|
+ }else {
|
|
|
|
+ picUrl = picUrl + ","+pic2;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (ObjectUtil.isNotEmpty(picture3)){
|
|
|
|
+ String pic3 = uploadImage.getImageCom(picture3);
|
|
|
|
+ if (pic3.equals("上传失败")){
|
|
|
|
+ TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
|
|
+ return new Result(10001, "物品检测图片3上传失败", false);
|
|
|
|
+ }else {
|
|
|
|
+ picUrl = picUrl + ","+pic3;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
|
|
|
|
+ if (StringUtils.isBlank(date)) {
|
|
|
|
+ date = sdf.format(new Date());
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ String[] splits = ids.split(",");
|
|
|
|
+ for (String id : splits) {
|
|
|
|
+ //1为合格2为异常
|
|
|
|
+ BillPcr billPcr = pcrMapper.selectById(id);
|
|
|
|
+ if (billPcr.getBillStatus() != 0) {
|
|
|
|
+ return new Result(10001, "此条记录已被他人修改,请退出刷新查看!", false);
|
|
|
|
+ }
|
|
|
|
+ billPcr.setImgUrl(s);
|
|
|
|
+ billPcr.setImgStatus(1);
|
|
|
|
+ if (billPcr.getVistitType() == 0){
|
|
|
|
+ if (ObjectUtil.isNotEmpty(picUrl)){
|
|
|
|
+ billPcr.setIsCarry(1);
|
|
|
|
+ billPcr.setPicUrl(picUrl);
|
|
|
|
+ }else {
|
|
|
|
+ billPcr.setIsCarry(0);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ QueryWrapper<BaseProcess> processQueryWrapper = new QueryWrapper<>();
|
|
|
|
+ processQueryWrapper.eq("id", billPcr.getProcessId());
|
|
|
|
+ BaseProcess baseProcess = processMapper.selectOne(processQueryWrapper);//进程
|
|
|
|
+
|
|
|
|
+ QueryWrapper<BaseLocation> locationQueryWrapper = new QueryWrapper<>();
|
|
|
|
+ locationQueryWrapper.eq("id", billPcr.getTestLocationId());
|
|
|
|
+ BaseLocation baseLocation = locationMapper.selectOne(locationQueryWrapper);//当前pcr检测所在的位置
|
|
|
|
+
|
|
|
|
+ String allLocationId = baseProcess.getAllLocationId();//所有的位置id
|
|
|
|
+ String allFlowId = baseProcess.getAllFlowId();//所有的流程id
|
|
|
|
+ String currentFlowId = baseProcess.getCurrentFlowId();//当前已经完成的流程id
|
|
|
|
+ String substring1 = allFlowId.substring(currentFlowId.length() + 1, allFlowId.length());
|
|
|
|
+ String[] split = substring1.split(",");
|
|
|
|
+ Integer nextId = Integer.parseInt(split[0]);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ if (billPcr.getBillStatus() != 0) {
|
|
|
|
+ return new Result(10001, "该订单已通过,无需再次提交!", false);
|
|
|
|
+ }
|
|
|
|
+ if (baseProcess.getProcessType() == 2 || baseProcess.getProcessType() == 1) {
|
|
|
|
+ return new Result(10001, "修改失败!该申请已提前结束或者被拒绝", false);
|
|
|
|
+ } else {
|
|
|
|
+ if ("1".equals(result)) {
|
|
|
|
+ Integer pcrTime = washoutPointMapper.selectOne(new QueryWrapper<BaseWashoutPoint>().eq("farm_ids", baseProcess.getFarmId())
|
|
|
|
+ .eq("visiting_type", billPcr.getVistitType()).eq("mid_id",billPcr.getMidId())
|
|
|
|
+ .eq("location_id", baseLocation.getId())).getPcrTime();
|
|
|
|
+ System.out.println("pcr的下一个流程id:" + nextId);
|
|
|
|
+ billPcr.setBillStatus(1);
|
|
|
|
+ billPcr.setPassUserName(TokenSign.getUserNameByJwtToken(httpServletRequest));
|
|
|
|
+ billPcr.setPassUserId(TokenSign.getMemberIdByJwtToken(httpServletRequest));
|
|
|
|
+ billPcr.setTestLocation(baseLocation.getLocationName());
|
|
|
|
+ billPcr.setTestLocationId(baseLocation.getId());
|
|
|
|
+ billPcr.setCheckDate(sdf.parse(date));
|
|
|
|
+ billPcr.setPassDate(sdf.parse(sdf.format(new Date())));
|
|
|
|
+ billPcr.setQualifiedDate(pcrTime);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ 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.getMidId()
|
|
|
|
+ ,billPcr.getMidName(),billPcr.getFarmName());
|
|
|
|
+ System.out.println("这里是pcr通过的下一个流程id:" + nextId);
|
|
|
|
+ if (nextId == 0) {
|
|
|
|
+ if (split.length == 1) {
|
|
|
|
+ baseProcess.setProcessType(1);
|
|
|
|
+ String[] strings = allLocationId.split(",");
|
|
|
|
+ String ss2 = "";
|
|
|
|
+ for (int i = 0; i < strings.length; i++) {
|
|
|
|
+ strings[i].replaceAll(strings[i], "2");
|
|
|
|
+ if (i == strings.length - 1) {
|
|
|
|
+ ss2 = ss2 + strings[i].replaceAll(strings[i], "2");
|
|
|
|
+ } else {
|
|
|
|
+ ss2 = strings[i].replaceAll(strings[i], "2") + "," + ss2;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ baseProcess.setAllLocationStatus(ss2);
|
|
|
|
+ //下发人脸门禁白名单
|
|
|
|
+ if (billPcr.getVistitType() == 0) {
|
|
|
|
+ //人员隔离中心流程
|
|
|
|
+ if (billPcr.getMidId() == 16 || billPcr.getMidId() == 29 || billPcr.getMidId() == 41 || billPcr.getMidId() == 53) {
|
|
|
|
+ DeviceList deviceList = deviceListMapper.selectOne(new QueryWrapper<DeviceList>().eq("farm_id", "2"));
|
|
|
|
+ PeopleList peopleList = new PeopleList();
|
|
|
|
+ peopleList.setFarmId("2");
|
|
|
|
+ peopleList.setDeviceCode(deviceList.getDeviceCode());
|
|
|
|
+ peopleList.setUserId(billPcr.getProcessId().toString());
|
|
|
|
+ peopleList.setUserName(billPcr.getAdmissionUserName());
|
|
|
|
+ peopleList.setPassword("123456");
|
|
|
|
+ peopleList.setType(0);
|
|
|
|
+ peopleList.setCreateTime(new Date());
|
|
|
|
+ Date now = new Date();
|
|
|
|
+ Calendar calendar = Calendar.getInstance();
|
|
|
|
+ calendar.setTime(now);
|
|
|
|
+ calendar.add(Calendar.HOUR_OF_DAY, 4);
|
|
|
|
+ Date date1 = calendar.getTime();
|
|
|
|
+ peopleList.setOutTime(date1);
|
|
|
|
+ SysAccountMultilevel sysAccountMultilevel = multilevelMapper.selectById(billPcr.getAdmissionUserId());
|
|
|
|
+ peopleList.setImgUrl(sysAccountMultilevel.getImgUrl());
|
|
|
|
+ peopleListMapper.insert(peopleList);
|
|
|
|
+ }
|
|
|
|
+ //人员基地外围
|
|
|
|
+ if (billPcr.getMidId() == 17 || billPcr.getMidId() == 30 || billPcr.getMidId() == 42 || billPcr.getMidId() == 54) {
|
|
|
|
+ DeviceList deviceList = deviceListMapper.selectOne(new QueryWrapper<DeviceList>().eq("farm_id", billPcr.getFarmId()));
|
|
|
|
+ PeopleList peopleList = new PeopleList();
|
|
|
|
+ peopleList.setFarmId(billPcr.getFarmId().toString());
|
|
|
|
+ peopleList.setDeviceCode(deviceList.getDeviceCode());
|
|
|
|
+ peopleList.setUserId(billPcr.getProcessId().toString());
|
|
|
|
+ peopleList.setUserName(billPcr.getAdmissionUserName());
|
|
|
|
+ peopleList.setPassword("123456");
|
|
|
|
+ peopleList.setType(0);
|
|
|
|
+ peopleList.setCreateTime(new Date());
|
|
|
|
+ Date now = new Date();
|
|
|
|
+ Calendar calendar = Calendar.getInstance();
|
|
|
|
+ calendar.setTime(now);
|
|
|
|
+ calendar.add(Calendar.HOUR_OF_DAY, 4);
|
|
|
|
+ Date date1 = calendar.getTime();
|
|
|
|
+ peopleList.setOutTime(date1);
|
|
|
|
+ SysAccountMultilevel sysAccountMultilevel = multilevelMapper.selectById(billPcr.getAdmissionUserId());
|
|
|
|
+ peopleList.setImgUrl(sysAccountMultilevel.getImgUrl());
|
|
|
|
+ peopleListMapper.insert(peopleList);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } 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> queryWrapper = new QueryWrapper();
|
|
|
|
+ queryWrapper.eq("id", strings[index + 2]);
|
|
|
|
+ BaseLocation location = locationMapper.selectOne(queryWrapper);
|
|
|
|
+ FlowUtil flowUtil = new FlowUtil();
|
|
|
|
+ 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(), billPcr.getFarmId()
|
|
|
|
+ , baseProcess.getId(), billPcr.getDepartureName(), billPcr.getDepartureId(),billPcr.getMidId(),billPcr.getMidName(),billPcr.getFarmName());
|
|
|
|
+ if (Integer.parseInt(split[1]) == 1) {
|
|
|
|
+ //新增采样
|
|
|
|
+ BillSampling billSampling = (BillSampling) entity;
|
|
|
|
+ if (billPcr.getVistitType() != 0) {
|
|
|
|
+ billSampling.setCarNum(billPcr.getCarNum());
|
|
|
|
+ }
|
|
|
|
+ if (billPcr.getVistitType() == 5) {
|
|
|
|
+ billSampling.setResource(billPcr.getResource());
|
|
|
|
+ billSampling.setFeedImgUrl(billPcr.getFeedImgUrl());
|
|
|
|
+ billSampling.setRemark(billPcr.getRemark());
|
|
|
|
+ }
|
|
|
|
+ samplingMapper.insert(billSampling);
|
|
|
|
+ //下发人脸门禁白名单
|
|
|
|
+ if (billPcr.getVistitType() == 0) {
|
|
|
|
+ //人员隔离中心流程
|
|
|
|
+ if (billPcr.getMidId() == 16 || billPcr.getMidId() == 29 || billPcr.getMidId() == 41 || billPcr.getMidId() == 53) {
|
|
|
|
+ DeviceList deviceList = deviceListMapper.selectOne(new QueryWrapper<DeviceList>().eq("farm_id", "2"));
|
|
|
|
+ PeopleList peopleList = new PeopleList();
|
|
|
|
+ peopleList.setFarmId("2");
|
|
|
|
+ peopleList.setDeviceCode(deviceList.getDeviceCode());
|
|
|
|
+ peopleList.setUserId(billPcr.getProcessId().toString());
|
|
|
|
+ peopleList.setUserName(billPcr.getAdmissionUserName());
|
|
|
|
+ peopleList.setPassword("123456");
|
|
|
|
+ peopleList.setType(0);
|
|
|
|
+ peopleList.setCreateTime(new Date());
|
|
|
|
+ Date now = new Date();
|
|
|
|
+ Calendar calendar = Calendar.getInstance();
|
|
|
|
+ calendar.setTime(now);
|
|
|
|
+ calendar.add(Calendar.HOUR_OF_DAY, 4);
|
|
|
|
+ Date date1 = calendar.getTime();
|
|
|
|
+ peopleList.setOutTime(date1);
|
|
|
|
+ SysAccountMultilevel sysAccountMultilevel = multilevelMapper.selectById(billPcr.getAdmissionUserId());
|
|
|
|
+ peopleList.setImgUrl(sysAccountMultilevel.getImgUrl());
|
|
|
|
+ peopleListMapper.insert(peopleList);
|
|
|
|
+ }
|
|
|
|
+ //人员基地外围
|
|
|
|
+ if (billPcr.getMidId() == 17 || billPcr.getMidId() == 30 || billPcr.getMidId() == 42 || billPcr.getMidId() == 54) {
|
|
|
|
+ DeviceList deviceList = deviceListMapper.selectOne(new QueryWrapper<DeviceList>().eq("farm_id", billPcr.getFarmId()));
|
|
|
|
+ PeopleList peopleList = new PeopleList();
|
|
|
|
+ peopleList.setFarmId(billPcr.getFarmId().toString());
|
|
|
|
+ peopleList.setDeviceCode(deviceList.getDeviceCode());
|
|
|
|
+ peopleList.setUserId(billPcr.getProcessId().toString());
|
|
|
|
+ peopleList.setUserName(billPcr.getAdmissionUserName());
|
|
|
|
+ peopleList.setPassword("123456");
|
|
|
|
+ peopleList.setType(0);
|
|
|
|
+ peopleList.setCreateTime(new Date());
|
|
|
|
+ Date now = new Date();
|
|
|
|
+ Calendar calendar = Calendar.getInstance();
|
|
|
|
+ calendar.setTime(now);
|
|
|
|
+ calendar.add(Calendar.HOUR_OF_DAY, 4);
|
|
|
|
+ Date date1 = calendar.getTime();
|
|
|
|
+ peopleList.setOutTime(date1);
|
|
|
|
+ SysAccountMultilevel sysAccountMultilevel = multilevelMapper.selectById(billPcr.getAdmissionUserId());
|
|
|
|
+ peopleList.setImgUrl(sysAccountMultilevel.getImgUrl());
|
|
|
|
+ peopleListMapper.insert(peopleList);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } else if (Integer.parseInt(split[1]) == 2) {
|
|
|
|
+ //新增pcr
|
|
|
|
+ BillPcr billClean = (BillPcr) entity;
|
|
|
|
+ if (billPcr.getVistitType() != 0) {
|
|
|
|
+ billClean.setCarNum(billPcr.getCarNum());
|
|
|
|
+ }
|
|
|
|
+ if (billPcr.getVistitType() == 5) {
|
|
|
|
+ billClean.setResource(billPcr.getResource());
|
|
|
|
+ billClean.setFeedImgUrl(billPcr.getFeedImgUrl());
|
|
|
|
+ billClean.setRemark(billPcr.getRemark());
|
|
|
|
+ }
|
|
|
|
+ pcrMapper.insert(billClean);
|
|
|
|
+ } else if (Integer.parseInt(split[1]) == 3) {
|
|
|
|
+ //新增洗澡
|
|
|
|
+ BillClean billClean = (BillClean) entity;
|
|
|
|
+ if (billPcr.getVistitType() != 0) {
|
|
|
|
+ billClean.setCarNum(billPcr.getCarNum());
|
|
|
|
+ }
|
|
|
|
+ if (billPcr.getVistitType() == 5) {
|
|
|
|
+ billClean.setResource(billPcr.getResource());
|
|
|
|
+ billClean.setFeedImgUrl(billPcr.getFeedImgUrl());
|
|
|
|
+ billClean.setRemark(billPcr.getRemark());
|
|
|
|
+ }
|
|
|
|
+ cleanMapper.insert(billClean);
|
|
|
|
+ } else if (Integer.parseInt(split[1]) == 4) {
|
|
|
|
+ //新增隔离
|
|
|
|
+ BillIsolate pcr = (BillIsolate) entity;
|
|
|
|
+ if (billPcr.getVistitType() != 0) {
|
|
|
|
+ pcr.setCarNum(billPcr.getCarNum());
|
|
|
|
+ }
|
|
|
|
+ if (billPcr.getVistitType() == 5) {
|
|
|
|
+ pcr.setResource(billPcr.getResource());
|
|
|
|
+ pcr.setFeedImgUrl(billPcr.getFeedImgUrl());
|
|
|
|
+ pcr.setRemark(billPcr.getRemark());
|
|
|
|
+ }
|
|
|
|
+ isolateMapper.insert(pcr);
|
|
|
|
+ } else if (Integer.parseInt(split[1]) == 5) {
|
|
|
|
+ BillDry billClean = (BillDry) entity;
|
|
|
|
+ if (billPcr.getVistitType() != 0) {
|
|
|
|
+ billClean.setCarNum(billPcr.getCarNum());
|
|
|
|
+ }
|
|
|
|
+ if (billPcr.getVistitType() == 5) {
|
|
|
|
+ billClean.setResource(billPcr.getResource());
|
|
|
|
+ billClean.setFeedImgUrl(billPcr.getFeedImgUrl());
|
|
|
|
+ billClean.setRemark(billPcr.getRemark());
|
|
|
|
+ }
|
|
|
|
+ dryMapper.insert(billClean);
|
|
|
|
+ //新增烘干
|
|
|
|
+ } else if (Integer.parseInt(split[1]) == 6) {
|
|
|
|
+ //新增洗澡前拍照
|
|
|
|
+ BillCleanBefore before = (BillCleanBefore) entity;
|
|
|
|
+ if (billPcr.getVistitType() != 0) {
|
|
|
|
+ before.setCarNum(billPcr.getCarNum());
|
|
|
|
+ }
|
|
|
|
+ if (billPcr.getVistitType() == 5) {
|
|
|
|
+ before.setResource(billPcr.getResource());
|
|
|
|
+ before.setFeedImgUrl(billPcr.getFeedImgUrl());
|
|
|
|
+ before.setRemark(billPcr.getRemark());
|
|
|
|
+ }
|
|
|
|
+ beforeMapper.insert(before);
|
|
|
|
+ } else if (Integer.parseInt(split[1]) == 7) {
|
|
|
|
+ //新增洗澡前拍照
|
|
|
|
+ BillGoodsInventory before = (BillGoodsInventory) entity;
|
|
|
|
+ if (billPcr.getVistitType() != 0) {
|
|
|
|
+ before.setCarNum(billPcr.getCarNum());
|
|
|
|
+ }
|
|
|
|
+ if (billPcr.getVistitType() == 5) {
|
|
|
|
+ before.setResource(billPcr.getResource());
|
|
|
|
+ before.setFeedImgUrl(billPcr.getFeedImgUrl());
|
|
|
|
+ before.setRemark(billPcr.getRemark());
|
|
|
|
+ }
|
|
|
|
+ inventoryMapper.insert(before);
|
|
|
|
+ }
|
|
|
|
+ baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId + "," + split[1]);
|
|
|
|
+
|
|
|
|
+ Integer locationId = billPcr.getTestLocationId();
|
|
|
|
+ String[] split2 = allLocationId.split(",");
|
|
|
|
+ int a = 0;
|
|
|
|
+ for (int i = 0; i < split2.length; i++) {
|
|
|
|
+ if (locationId.toString().equals(split2[i])) {
|
|
|
|
+ a = i + 1;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ int indexOf = 2 * (a - 2);//当前位置在所有流程位置中的下标
|
|
|
|
+
|
|
|
|
+ String substring = baseProcess.getAllLocationStatus().substring(0, indexOf + 3);//截取已经过的位置状态
|
|
|
|
+ String[] split1 = substring.split(",");
|
|
|
|
+ String sb2 = "";
|
|
|
|
+ for (int i = 0; i < split1.length; i++) {
|
|
|
|
+ if (i == split1.length - 1) {
|
|
|
|
+ sb2 = sb2 + split1[i].replaceAll(split1[i], "2");
|
|
|
|
+ } else {
|
|
|
|
+ sb2 = split1[i].replaceAll(split1[i], "2") + "," + sb2;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ sb2 = sb2 + baseProcess.getAllLocationStatus().substring(indexOf + 3);
|
|
|
|
+ StringBuilder sb = new StringBuilder(sb2);
|
|
|
|
+ sb.replace(indexOf + 4, indexOf + 5, "2");
|
|
|
|
+ sb.replace(indexOf + 6, indexOf + 7, "1");
|
|
|
|
+ baseProcess.setAllLocationStatus(sb.toString());
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ } else if (nextId == 1) {
|
|
|
|
+ //新增采样
|
|
|
|
+ BillSampling billSampling = (BillSampling) newObject;
|
|
|
|
+ if (billPcr.getVistitType() != 0) {
|
|
|
|
+ billSampling.setCarNum(billPcr.getCarNum());
|
|
|
|
+ }
|
|
|
|
+ if (billPcr.getVistitType() == 5) {
|
|
|
|
+ billSampling.setResource(billPcr.getResource());
|
|
|
|
+ billSampling.setFeedImgUrl(billPcr.getFeedImgUrl());
|
|
|
|
+ billSampling.setRemark(billPcr.getRemark());
|
|
|
|
+ }
|
|
|
|
+ samplingMapper.insert(billSampling);
|
|
|
|
+ baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
|
|
|
|
+ } else if (nextId == 2) {
|
|
|
|
+ //新增pcr
|
|
|
|
+ BillPcr billClean = (BillPcr) newObject;
|
|
|
|
+ if (billPcr.getVistitType() != 0) {
|
|
|
|
+ billClean.setCarNum(billPcr.getCarNum());
|
|
|
|
+ }
|
|
|
|
+ if (billPcr.getVistitType() == 5) {
|
|
|
|
+ billClean.setResource(billPcr.getResource());
|
|
|
|
+ billClean.setFeedImgUrl(billPcr.getFeedImgUrl());
|
|
|
|
+ billClean.setRemark(billPcr.getRemark());
|
|
|
|
+ }
|
|
|
|
+ pcrMapper.insert(billClean);
|
|
|
|
+ baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
|
|
|
|
+ //下发人脸门禁白名单
|
|
|
|
+ if (billPcr.getVistitType() == 0) {
|
|
|
|
+ //人员隔离中心流程
|
|
|
|
+ if (billPcr.getMidId() == 16 || billPcr.getMidId() == 29 || billPcr.getMidId() == 41 || billPcr.getMidId() == 53) {
|
|
|
|
+ DeviceList deviceList = deviceListMapper.selectOne(new QueryWrapper<DeviceList>().eq("farm_id", "2"));
|
|
|
|
+ PeopleList peopleList = new PeopleList();
|
|
|
|
+ peopleList.setFarmId("2");
|
|
|
|
+ peopleList.setDeviceCode(deviceList.getDeviceCode());
|
|
|
|
+ peopleList.setUserId(billPcr.getProcessId().toString());
|
|
|
|
+ peopleList.setUserName(billPcr.getAdmissionUserName());
|
|
|
|
+ peopleList.setPassword("123456");
|
|
|
|
+ peopleList.setType(0);
|
|
|
|
+ peopleList.setCreateTime(new Date());
|
|
|
|
+ Date now = new Date();
|
|
|
|
+ Calendar calendar = Calendar.getInstance();
|
|
|
|
+ calendar.setTime(now);
|
|
|
|
+ calendar.add(Calendar.HOUR_OF_DAY, 4);
|
|
|
|
+ Date date1 = calendar.getTime();
|
|
|
|
+ peopleList.setOutTime(date1);
|
|
|
|
+ SysAccountMultilevel sysAccountMultilevel = multilevelMapper.selectById(billPcr.getAdmissionUserId());
|
|
|
|
+ peopleList.setImgUrl(sysAccountMultilevel.getImgUrl());
|
|
|
|
+ peopleListMapper.insert(peopleList);
|
|
|
|
+ }
|
|
|
|
+ //人员基地外围
|
|
|
|
+ if (billPcr.getMidId() == 17 || billPcr.getMidId() == 30 || billPcr.getMidId() == 42 || billPcr.getMidId() == 54) {
|
|
|
|
+ DeviceList deviceList = deviceListMapper.selectOne(new QueryWrapper<DeviceList>().eq("farm_id", billPcr.getFarmId()));
|
|
|
|
+ PeopleList peopleList = new PeopleList();
|
|
|
|
+ peopleList.setFarmId(billPcr.getFarmId().toString());
|
|
|
|
+ peopleList.setDeviceCode(deviceList.getDeviceCode());
|
|
|
|
+ peopleList.setUserId(billPcr.getProcessId().toString());
|
|
|
|
+ peopleList.setUserName(billPcr.getAdmissionUserName());
|
|
|
|
+ peopleList.setPassword("123456");
|
|
|
|
+ peopleList.setType(0);
|
|
|
|
+ peopleList.setCreateTime(new Date());
|
|
|
|
+ Date now = new Date();
|
|
|
|
+ Calendar calendar = Calendar.getInstance();
|
|
|
|
+ calendar.setTime(now);
|
|
|
|
+ calendar.add(Calendar.HOUR_OF_DAY, 4);
|
|
|
|
+ Date date1 = calendar.getTime();
|
|
|
|
+ peopleList.setOutTime(date1);
|
|
|
|
+ SysAccountMultilevel sysAccountMultilevel = multilevelMapper.selectById(billPcr.getAdmissionUserId());
|
|
|
|
+ peopleList.setImgUrl(sysAccountMultilevel.getImgUrl());
|
|
|
|
+ peopleListMapper.insert(peopleList);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } else if (nextId == 3) {
|
|
|
|
+ //新增洗澡
|
|
|
|
+ BillClean billClean = (BillClean) newObject;
|
|
|
|
+ if (billPcr.getVistitType() != 0) {
|
|
|
|
+ billClean.setCarNum(billPcr.getCarNum());
|
|
|
|
+ }
|
|
|
|
+ if (billPcr.getVistitType() == 5) {
|
|
|
|
+ billClean.setResource(billPcr.getResource());
|
|
|
|
+ billClean.setFeedImgUrl(billPcr.getFeedImgUrl());
|
|
|
|
+ billClean.setRemark(billPcr.getRemark());
|
|
|
|
+ }
|
|
|
|
+ cleanMapper.insert(billClean);
|
|
|
|
+ baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
|
|
|
|
+ } else if (nextId == 4) {
|
|
|
|
+ //新增隔离
|
|
|
|
+ BillIsolate pcr = (BillIsolate) newObject;
|
|
|
|
+ if (billPcr.getVistitType() != 0) {
|
|
|
|
+ pcr.setCarNum(billPcr.getCarNum());
|
|
|
|
+ }
|
|
|
|
+ if (billPcr.getVistitType() == 5) {
|
|
|
|
+ pcr.setResource(billPcr.getResource());
|
|
|
|
+ pcr.setFeedImgUrl(billPcr.getFeedImgUrl());
|
|
|
|
+ pcr.setRemark(billPcr.getRemark());
|
|
|
|
+ }
|
|
|
|
+ isolateMapper.insert(pcr);
|
|
|
|
+ baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
|
|
|
|
+ } else if (nextId == 5) {
|
|
|
|
+ BillDry billClean = (BillDry) newObject;
|
|
|
|
+ if (billPcr.getVistitType() != 0) {
|
|
|
|
+ billClean.setCarNum(billPcr.getCarNum());
|
|
|
|
+ }
|
|
|
|
+ if (billPcr.getVistitType() == 5) {
|
|
|
|
+ billClean.setResource(billPcr.getResource());
|
|
|
|
+ billClean.setFeedImgUrl(billPcr.getFeedImgUrl());
|
|
|
|
+ billClean.setRemark(billPcr.getRemark());
|
|
|
|
+ }
|
|
|
|
+ dryMapper.insert(billClean);
|
|
|
|
+ baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
|
|
|
|
+ //新增烘干
|
|
|
|
+ } else if (nextId == 6) {
|
|
|
|
+ //新增洗澡前拍照
|
|
|
|
+ BillCleanBefore before = (BillCleanBefore) newObject;
|
|
|
|
+ if (billPcr.getVistitType() != 0) {
|
|
|
|
+ before.setCarNum(billPcr.getCarNum());
|
|
|
|
+ }
|
|
|
|
+ if (billPcr.getVistitType() == 5) {
|
|
|
|
+ before.setResource(billPcr.getResource());
|
|
|
|
+ before.setFeedImgUrl(billPcr.getFeedImgUrl());
|
|
|
|
+ before.setRemark(billPcr.getRemark());
|
|
|
|
+ }
|
|
|
|
+ beforeMapper.insert(before);
|
|
|
|
+ baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
|
|
|
|
+ } else if (nextId == 7) {
|
|
|
|
+ //新增洗澡前拍照
|
|
|
|
+ BillGoodsInventory before = (BillGoodsInventory) newObject;
|
|
|
|
+ if (billPcr.getVistitType() != 0) {
|
|
|
|
+ before.setCarNum(billPcr.getCarNum());
|
|
|
|
+ }
|
|
|
|
+ if (billPcr.getVistitType() == 5) {
|
|
|
|
+ before.setResource(billPcr.getResource());
|
|
|
|
+ before.setFeedImgUrl(billPcr.getFeedImgUrl());
|
|
|
|
+ before.setRemark(billPcr.getRemark());
|
|
|
|
+ }
|
|
|
|
+ inventoryMapper.insert(before);
|
|
|
|
+ baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ baseProcess.setUpdateDate(baseProcess.getUpdateDate() + "," + sdf.format(new Date()));
|
|
|
|
+ baseProcess.setCurrentLocation(baseProcess.getCurrentLocation() + "," + baseLocation.getLocationName());
|
|
|
|
+ baseProcess.setCurrentLocationId(baseProcess.getCurrentLocationId() + "," + baseLocation.getId());
|
|
|
|
+ String status = baseProcess.getCurrentStatus();
|
|
|
|
+ String substring = status.substring(0, status.length() - 1);
|
|
|
|
+
|
|
|
|
+ baseProcess.setCurrentStatus(substring + "1," + 0);
|
|
|
|
+
|
|
|
|
+ processMapper.updateById(baseProcess);
|
|
|
|
+ pcrMapper.updateById(billPcr);
|
|
|
|
+ if (billPcr.getVistitType() == 3 && billPcr.getFarmId() == 31 || billPcr.getTestLocationId() == 45) {
|
|
|
|
+ //风行下发单独的饲料车流程门禁
|
|
|
|
+ DeviceList deviceList = deviceListMapper.selectOne(new QueryWrapper<DeviceList>().eq("farm_id", "31"));
|
|
|
|
+ PeopleList peopleList = new PeopleList();
|
|
|
|
+ peopleList.setFarmId("31");
|
|
|
|
+ peopleList.setDeviceCode(deviceList.getDeviceCode());
|
|
|
|
+ peopleList.setUserId(billPcr.getProcessId().toString());
|
|
|
|
+ peopleList.setUserName(billPcr.getAdmissionUserName());
|
|
|
|
+ peopleList.setPassword("123456");
|
|
|
|
+ peopleList.setType(0);
|
|
|
|
+ peopleList.setCreateTime(new Date());
|
|
|
|
+ Date now = new Date();
|
|
|
|
+ Calendar calendar = Calendar.getInstance();
|
|
|
|
+ calendar.setTime(now);
|
|
|
|
+ calendar.add(Calendar.HOUR_OF_DAY, 4);
|
|
|
|
+ Date date1 = calendar.getTime();
|
|
|
|
+ peopleList.setOutTime(date1);
|
|
|
|
+ SysAccountMultilevel sysAccountMultilevel = multilevelMapper.selectById(billPcr.getAdmissionUserId());
|
|
|
|
+ peopleList.setImgUrl(sysAccountMultilevel.getImgUrl());
|
|
|
|
+ peopleListMapper.insert(peopleList);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return new Result(10000, "修改成功!", true);
|
|
|
|
+ } else {
|
|
|
|
+ billPcr.setBillStatus(2);
|
|
|
|
+ billPcr.setPcrType(1);
|
|
|
|
+ billPcr.setPassUserName(TokenSign.getUserNameByJwtToken(httpServletRequest));
|
|
|
|
+ billPcr.setPassUserId(TokenSign.getMemberIdByJwtToken(httpServletRequest));
|
|
|
|
+ billPcr.setTestLocation(baseLocation.getLocationName());
|
|
|
|
+ billPcr.setTestLocationId(baseLocation.getId());
|
|
|
|
+ billPcr.setCheckDate(sdf.parse(date));
|
|
|
|
+ billPcr.setPassDate(sdf.parse(sdf.format(new Date())));
|
|
|
|
+ baseProcess.setUpdateDate(baseProcess.getUpdateDate() + "," + sdf.format(new Date()));
|
|
|
|
+ String status = baseProcess.getCurrentStatus();
|
|
|
|
+ String substring = status.substring(0, status.length() - 1);
|
|
|
|
+ baseProcess.setCurrentStatus(substring + "2," + 0);
|
|
|
|
+
|
|
|
|
+ processMapper.updateById(baseProcess);
|
|
|
|
+ pcrMapper.updateById(billPcr);
|
|
|
|
+ return new Result(10000, "修改成功!", true);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return new Result(10000, "修改成功!", true);
|
|
|
|
+ }
|
|
|
|
+
|
|
public static void main(String[] args) {
|
|
public static void main(String[] args) {
|
|
Random random = new Random();
|
|
Random random = new Random();
|
|
int randomNum = random.nextInt(90000000) + 1000;
|
|
int randomNum = random.nextInt(90000000) + 1000;
|
|
@@ -931,7 +1486,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 midId,String midName) {
|
|
|
|
|
|
+ , Integer testLocationId, Integer vistitType, String phone, String departureName, Integer departureId,Integer midId,String midName,String farmName) {
|
|
if (id == 1) {
|
|
if (id == 1) {
|
|
//采样
|
|
//采样
|
|
BillSampling billSampling = new BillSampling();
|
|
BillSampling billSampling = new BillSampling();
|
|
@@ -951,6 +1506,7 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
|
|
billSampling.setDepartureId(departureId);
|
|
billSampling.setDepartureId(departureId);
|
|
billSampling.setMidId(midId);
|
|
billSampling.setMidId(midId);
|
|
billSampling.setMidName(midName);
|
|
billSampling.setMidName(midName);
|
|
|
|
+ billSampling.setFarmName(farmName);
|
|
return billSampling;
|
|
return billSampling;
|
|
}
|
|
}
|
|
if (id == 2) {
|
|
if (id == 2) {
|
|
@@ -973,6 +1529,7 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
|
|
billPcr.setDepartureId(departureId);
|
|
billPcr.setDepartureId(departureId);
|
|
billPcr.setMidId(midId);
|
|
billPcr.setMidId(midId);
|
|
billPcr.setMidName(midName);
|
|
billPcr.setMidName(midName);
|
|
|
|
+ billPcr.setFarmName(farmName);
|
|
return billPcr;
|
|
return billPcr;
|
|
}
|
|
}
|
|
if (id == 3) {
|
|
if (id == 3) {
|
|
@@ -995,6 +1552,7 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
|
|
billPcr.setDepartureId(departureId);
|
|
billPcr.setDepartureId(departureId);
|
|
billPcr.setMidId(midId);
|
|
billPcr.setMidId(midId);
|
|
billPcr.setMidName(midName);
|
|
billPcr.setMidName(midName);
|
|
|
|
+ billPcr.setFarmName(farmName);
|
|
return billPcr;
|
|
return billPcr;
|
|
}
|
|
}
|
|
if (id == 4) {
|
|
if (id == 4) {
|
|
@@ -1017,6 +1575,7 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
|
|
billPcr.setDepartureId(departureId);
|
|
billPcr.setDepartureId(departureId);
|
|
billPcr.setMidId(midId);
|
|
billPcr.setMidId(midId);
|
|
billPcr.setMidName(midName);
|
|
billPcr.setMidName(midName);
|
|
|
|
+ billPcr.setFarmName(farmName);
|
|
return billPcr;
|
|
return billPcr;
|
|
}
|
|
}
|
|
if (id == 5) {
|
|
if (id == 5) {
|
|
@@ -1039,6 +1598,7 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
|
|
billPcr.setDepartureId(departureId);
|
|
billPcr.setDepartureId(departureId);
|
|
billPcr.setMidId(midId);
|
|
billPcr.setMidId(midId);
|
|
billPcr.setMidName(midName);
|
|
billPcr.setMidName(midName);
|
|
|
|
+ billPcr.setFarmName(farmName);
|
|
return billPcr;
|
|
return billPcr;
|
|
}
|
|
}
|
|
if (id == 6) {
|
|
if (id == 6) {
|
|
@@ -1061,6 +1621,7 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
|
|
billCleanBefore.setDepartureId(departureId);
|
|
billCleanBefore.setDepartureId(departureId);
|
|
billCleanBefore.setMidId(midId);
|
|
billCleanBefore.setMidId(midId);
|
|
billCleanBefore.setMidName(midName);
|
|
billCleanBefore.setMidName(midName);
|
|
|
|
+ billCleanBefore.setFarmName(farmName);
|
|
return billCleanBefore;
|
|
return billCleanBefore;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1085,6 +1646,7 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
|
|
billCleanBefore.setProcessId(processId);
|
|
billCleanBefore.setProcessId(processId);
|
|
billCleanBefore.setMidId(midId);
|
|
billCleanBefore.setMidId(midId);
|
|
billCleanBefore.setMidName(midName);
|
|
billCleanBefore.setMidName(midName);
|
|
|
|
+ billCleanBefore.setFarmName(farmName);
|
|
return billCleanBefore;
|
|
return billCleanBefore;
|
|
}
|
|
}
|
|
return null;
|
|
return null;
|