|
@@ -73,7 +73,7 @@ public class BillCleanBeforeServiceImpl extends ServiceImpl<BillCleanBeforeMappe
|
|
|
}
|
|
|
Page<BillCleanBefore> page = new Page<>(Integer.parseInt(pageNum), Integer.parseInt(pageSize));
|
|
|
QueryWrapper<BillCleanBefore> queryWrapper = new QueryWrapper<>();
|
|
|
- queryWrapper.eq("farm_id", farmId)
|
|
|
+ queryWrapper/*.in("farm_id", farmId)*/
|
|
|
.in("test_location_id", TokenSign.getWorkIdByJwtToken(httpServletRequest)).orderByDesc("sub_date").eq("vistit_type", type);
|
|
|
if ("0".equals(data)) {
|
|
|
queryWrapper.in("bill_status", 0, 1, 2, 3);
|
|
@@ -89,7 +89,7 @@ public class BillCleanBeforeServiceImpl extends ServiceImpl<BillCleanBeforeMappe
|
|
|
}
|
|
|
QueryWrapper<BillCleanBefore> queryWrapper2 = new QueryWrapper<>();
|
|
|
queryWrapper2.eq("vistit_type", type);
|
|
|
- queryWrapper2.eq("farm_id", farmId).in("test_location_id", TokenSign.getWorkIdByJwtToken(httpServletRequest)).orderByDesc("sub_date");
|
|
|
+ queryWrapper2/*.in("farm_id", farmId)*/.in("test_location_id", TokenSign.getWorkIdByJwtToken(httpServletRequest)).orderByDesc("sub_date");
|
|
|
queryWrapper2.eq("bill_status", 0);
|
|
|
return new Result(ResultCode.SUCCESS, billCleanBeforeMapper.selectPage(page, queryWrapper), billCleanBeforeMapper.selectCount(queryWrapper2));
|
|
|
}
|
|
@@ -120,14 +120,48 @@ public class BillCleanBeforeServiceImpl extends ServiceImpl<BillCleanBeforeMappe
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public Result edit(HttpServletRequest httpServletRequest, String farmId, String id, String date, MultipartFile img) throws ParseException, IOException {
|
|
|
- String s = "";
|
|
|
- String imgCom = uploadImage.getImageCom(img);
|
|
|
- if (imgCom.equals("上传失败")) {
|
|
|
- TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
|
- return new Result(10001, "图片1上传失败", false);
|
|
|
+ public Result edit(HttpServletRequest httpServletRequest, String farmId, String id, String date,
|
|
|
+ MultipartFile img1,MultipartFile img2,MultipartFile img3,MultipartFile img4) throws ParseException, IOException {
|
|
|
+ String imgUrl = "";
|
|
|
+ String s1 = "";
|
|
|
+ String s2 = "";
|
|
|
+ String s3 = "";
|
|
|
+ String s4 = "";
|
|
|
+
|
|
|
+ if (ObjectUtil.isNotEmpty(img1)) {
|
|
|
+ String s= uploadImage.uploadImg(img1);
|
|
|
+ if ("上传失败".equals(s1)) {
|
|
|
+ TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
|
+ return new Result(10001, "图片1上传失败", false);
|
|
|
+ }
|
|
|
+ s1 = s;
|
|
|
}
|
|
|
- s = imgCom;
|
|
|
+ if (ObjectUtil.isNotEmpty(img2)) {
|
|
|
+ String s= uploadImage.uploadImg(img2);
|
|
|
+ if ("上传失败".equals(s2)) {
|
|
|
+ TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
|
+ return new Result(10001, "图片2上传失败", false);
|
|
|
+ }
|
|
|
+ s2 = "," + s;
|
|
|
+ }
|
|
|
+ if (ObjectUtil.isNotEmpty(img3)) {
|
|
|
+ String s= uploadImage.uploadImg(img3);
|
|
|
+ s3 = "," + s;
|
|
|
+ if ("上传失败".equals(s)) {
|
|
|
+ TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
|
+ return new Result(10001, "图片3上传失败", false);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (ObjectUtil.isNotEmpty(img4)) {
|
|
|
+ String s = uploadImage.uploadImg(img4);
|
|
|
+ s4 = "," + s;
|
|
|
+ if ("上传失败".equals(s)) {
|
|
|
+ TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
|
+ return new Result(10001, "图片4上传失败", false);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ imgUrl=s1+s2+s3+s4;
|
|
|
+
|
|
|
|
|
|
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm");
|
|
|
|
|
@@ -135,7 +169,7 @@ public class BillCleanBeforeServiceImpl extends ServiceImpl<BillCleanBeforeMappe
|
|
|
if (cleanBefore.getBillStatus() != 0) {
|
|
|
return new Result(10001, "此条记录已被他人修改,请退出刷新查看!", false);
|
|
|
}
|
|
|
- cleanBefore.setImgUrl(s);
|
|
|
+ cleanBefore.setImgUrl(imgUrl);
|
|
|
cleanBefore.setImgStatus(1);
|
|
|
|
|
|
|