|
@@ -331,7 +331,7 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
|
|
|
@Override
|
|
|
@Transactional
|
|
|
public Result edit(HttpServletRequest httpServletRequest, String farmId, String id, String date, String result,
|
|
|
- MultipartFile img1, MultipartFile img2, MultipartFile img3) throws ParseException, IOException {
|
|
|
+ MultipartFile img1, MultipartFile img2, MultipartFile img3, MultipartFile picture1, MultipartFile picture2, MultipartFile picture3) throws ParseException, IOException {
|
|
|
//1为合格2为异常
|
|
|
String s1 = "";
|
|
|
String s2 = "";
|
|
@@ -339,25 +339,55 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
|
|
|
if (ObjectUtil.isNotEmpty(img1)) {
|
|
|
if (uploadImage.getImageCom(img1).equals("上传失败")) {
|
|
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
|
- return new Result(10001, "图片1上传失败", false);
|
|
|
+ return new Result(10001, "检测图片1上传失败", false);
|
|
|
}
|
|
|
s1 = uploadImage.uploadImg(img1);
|
|
|
}
|
|
|
if (ObjectUtil.isNotEmpty(img2)) {
|
|
|
if (uploadImage.getImageCom(img2).equals("上传失败")) {
|
|
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
|
- return new Result(10001, "图片2上传失败", false);
|
|
|
+ return new Result(10001, "检测图片2上传失败", false);
|
|
|
}
|
|
|
s2 = "," + uploadImage.uploadImg(img2);
|
|
|
}
|
|
|
if (ObjectUtil.isNotEmpty(img3)) {
|
|
|
if (uploadImage.getImageCom(img3).equals("上传失败")) {
|
|
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
|
- return new Result(10001, "图片3上传失败", false);
|
|
|
+ return new Result(10001, "检测图片3上传失败", false);
|
|
|
}
|
|
|
s3 = "," + uploadImage.uploadImg(img3);
|
|
|
}
|
|
|
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)) {
|
|
@@ -369,6 +399,14 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
|
|
|
}
|
|
|
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<>();
|