wwh 1 月之前
父节点
当前提交
7c3381af92

+ 1 - 1
huimv-receive/src/main/java/com/huimv/receive/config/InterceptorConfig.java

@@ -69,7 +69,7 @@ public class InterceptorConfig implements WebMvcConfigurer {
                         ,"/secureApi/bill-clean-before/listCleanBefore"
                         ,"/secureApi/bill-clean-before/listCleanBefore"
                         ,"/secureApi/bill-goods-inventory/list"
                         ,"/secureApi/bill-goods-inventory/list"
 
 
-
+                        ,"/secureApi//bill-sampling/getVideo"
                         ,"/secureApi/bill-personnel-admission/jingJiAdmission"
                         ,"/secureApi/bill-personnel-admission/jingJiAdmission"
                         ,"/secureApi/bill-personnel-admission/allCount"
                         ,"/secureApi/bill-personnel-admission/allCount"
                         ,"/secureApi/bill-pcr/pcrList"
                         ,"/secureApi/bill-pcr/pcrList"

+ 2 - 13
huimv-receive/src/main/java/com/huimv/receive/controller/BillPersonnelAdmissionController.java

@@ -69,17 +69,12 @@ public class BillPersonnelAdmissionController {
                                @RequestParam(value = "picture1",required = false) MultipartFile picture1,
                                @RequestParam(value = "picture1",required = false) MultipartFile picture1,
                                @RequestParam(value = "picture2",required = false) MultipartFile picture2,
                                @RequestParam(value = "picture2",required = false) MultipartFile picture2,
                                @RequestParam(value = "picture3",required = false) MultipartFile picture3,
                                @RequestParam(value = "picture3",required = false) MultipartFile picture3,
-                               @RequestParam(value = "picture4",required = false) MultipartFile picture4,
-                               @RequestParam(value = "picture5",required = false) MultipartFile picture5,
-                               @RequestParam(value = "picture6",required = false) MultipartFile picture6,
-                               @RequestParam(value = "picture7",required = false) MultipartFile picture7,
-                               @RequestParam(value = "picture8",required = false) MultipartFile picture8,
                                @RequestParam("farmId") String farmId,
                                @RequestParam("farmId") String farmId,
                                @RequestParam("midId") Integer midId,
                                @RequestParam("midId") Integer midId,
                                @RequestParam("midName") String midName) throws IOException {
                                @RequestParam("midName") String midName) throws IOException {
         return billPersonnelAdmissionService.addAdmission(httpServletRequest, admissionType, vistitType, userName, phone,
         return billPersonnelAdmissionService.addAdmission(httpServletRequest, admissionType, vistitType, userName, phone,
                 workName, papersType, papersCode, imgUrl, img, vistitDate, vistitReson, destId, destName, farmId, carNum,
                 workName, papersType, papersCode, imgUrl, img, vistitDate, vistitReson, destId, destName, farmId, carNum,
-                source, goods, departureId, departureName, picture1, picture2, picture3,picture4,picture5,picture6,picture7,picture8,
+                source, goods, departureId, departureName, picture1, picture2, picture3,
                 midId,midName);
                 midId,midName);
     }
     }
 
 
@@ -307,17 +302,11 @@ public class BillPersonnelAdmissionController {
                                    @RequestParam(value = "picture1",required = false) MultipartFile picture1,
                                    @RequestParam(value = "picture1",required = false) MultipartFile picture1,
                                    @RequestParam(value = "picture2",required = false) MultipartFile picture2,
                                    @RequestParam(value = "picture2",required = false) MultipartFile picture2,
                                    @RequestParam(value = "picture3",required = false) MultipartFile picture3,
                                    @RequestParam(value = "picture3",required = false) MultipartFile picture3,
-                                   @RequestParam(value = "picture4",required = false) MultipartFile picture4,
-                                   @RequestParam(value = "picture5",required = false) MultipartFile picture5,
-                                   @RequestParam(value = "picture6",required = false) MultipartFile picture6,
-                                   @RequestParam(value = "picture7",required = false) MultipartFile picture7,
-                                   @RequestParam(value = "picture8",required = false) MultipartFile picture8,
                                    @RequestParam("midId") Integer midId,
                                    @RequestParam("midId") Integer midId,
                                    @RequestParam("midName") String midName) throws IOException {
                                    @RequestParam("midName") String midName) throws IOException {
         return billPersonnelAdmissionService.helpAddAdmission(httpServletRequest, userImgUrl, admissionType,
         return billPersonnelAdmissionService.helpAddAdmission(httpServletRequest, userImgUrl, admissionType,
                 vistitType, userName, phone, workName, papersType, papersCode, imgUrl, img, vistitDate, vistitReson,
                 vistitType, userName, phone, workName, papersType, papersCode, imgUrl, img, vistitDate, vistitReson,
-                destId, destName, farmId, carNum, source, goods, departureId, departureName,picture1,picture2,picture3,
-                picture4,picture5,picture6,picture7,picture8,midId,midName);
+                destId, destName, farmId, carNum, source, goods, departureId, departureName,picture1,picture2,picture3, midId,midName);
     }
     }
 
 
 }
 }

+ 14 - 2
huimv-receive/src/main/java/com/huimv/receive/controller/BillSamplingController.java

@@ -70,16 +70,28 @@ public class BillSamplingController {
     @PostMapping("/edit")
     @PostMapping("/edit")
     public Result goodsCarClean(HttpServletRequest httpServletRequest, @RequestParam("id") String id,
     public Result goodsCarClean(HttpServletRequest httpServletRequest, @RequestParam("id") String id,
                                 @RequestParam("date") String data,
                                 @RequestParam("date") String data,
-                                @RequestParam(value = "video", required = false) MultipartFile video,
+                                @RequestParam(value = "video1", required = false) String video1,
+                                @RequestParam(value = "video2", required = false) String video2,
+                                @RequestParam(value = "video3", required = false) String video3,
+                                @RequestParam(value = "video4", required = false) String video4,
+                                @RequestParam(value = "video5", required = false) String video5,
+                                @RequestParam(value = "video6", required = false) String video6,
+                                @RequestParam(value = "video7", required = false) String video7,
+                                @RequestParam(value = "video8", required = false) String video8,
                                 @RequestParam(value = "picture1", required = false) MultipartFile picture1,
                                 @RequestParam(value = "picture1", required = false) MultipartFile picture1,
                                 @RequestParam(value = "picture2", required = false) MultipartFile picture2,
                                 @RequestParam(value = "picture2", required = false) MultipartFile picture2,
                                 @RequestParam(value = "picture3", required = false) MultipartFile picture3,
                                 @RequestParam(value = "picture3", required = false) MultipartFile picture3,
                                 @RequestParam("farmId") String farmId) throws IOException, ParseException {
                                 @RequestParam("farmId") String farmId) throws IOException, ParseException {
-        return billSamplingService.edit(httpServletRequest, farmId, id, data, video,picture1,picture2,picture3);
+        return billSamplingService.edit(httpServletRequest, farmId, id, data, video1,video2,video3,video4,video5,video6,video7,video8,picture1,picture2,picture3);
     }
     }
 
 
     @RequestMapping("/listAll")
     @RequestMapping("/listAll")
     public Result listAll(HttpServletRequest httpServletRequest, @RequestBody Map<String, String> paramsMap) {
     public Result listAll(HttpServletRequest httpServletRequest, @RequestBody Map<String, String> paramsMap) {
         return billSamplingService.listAll(httpServletRequest, paramsMap);
         return billSamplingService.listAll(httpServletRequest, paramsMap);
     }
     }
+
+    @PostMapping("/getVideo")
+    public Result getVideo(@RequestParam(value = "video", required = true) MultipartFile video) throws IOException, ParseException {
+        return billSamplingService.getVideo( video);
+    }
 }
 }

+ 3 - 2
huimv-receive/src/main/java/com/huimv/receive/controller/SysUserController.java

@@ -95,14 +95,15 @@ public class SysUserController {
                       @RequestParam(value = "shi",required = false) String shi,
                       @RequestParam(value = "shi",required = false) String shi,
                       @RequestParam(value = "xxdz",required = false) String xxdz,
                       @RequestParam(value = "xxdz",required = false) String xxdz,
                       @RequestParam(value = "yzbm",required = false) String yzbm,
                       @RequestParam(value = "yzbm",required = false) String yzbm,
-                      @RequestParam("imgUrl") MultipartFile imgUrl) throws IOException {
+                      @RequestParam("imgUrl") MultipartFile imgUrl,
+                      @RequestParam(value = "isAllFarm",required = false) Integer isAllFarm) throws IOException {
         SysUser sysUser = new SysUser();
         SysUser sysUser = new SysUser();
         sysUser.setUserName(userName);
         sysUser.setUserName(userName);
         sysUser.setUserId(userId);
         sysUser.setUserId(userId);
         sysUser.setGender(Integer.parseInt(gender));
         sysUser.setGender(Integer.parseInt(gender));
         sysUser.setNation(nation);
         sysUser.setNation(nation);
         sysUser.setNativePlace(nativePlace);
         sysUser.setNativePlace(nativePlace);
-
+        sysUser.setIsAllFarm(isAllFarm);
         sysUser.setBirthday(DateUtil.parse(birthday,"yyyy-MM-dd"));
         sysUser.setBirthday(DateUtil.parse(birthday,"yyyy-MM-dd"));
         sysUser.setPoliticsPace(politicsPace);
         sysUser.setPoliticsPace(politicsPace);
         sysUser.setPeopleType(peopleType);
         sysUser.setPeopleType(peopleType);

+ 2 - 0
huimv-receive/src/main/java/com/huimv/receive/entity/BillPersonnelAdmission.java

@@ -170,4 +170,6 @@ public class BillPersonnelAdmission implements Serializable {
     private Integer midId;
     private Integer midId;
 
 
     private String midName;
     private String midName;
+
+    private String farmName;
 }
 }

+ 1 - 1
huimv-receive/src/main/java/com/huimv/receive/entity/SysUser.java

@@ -158,6 +158,6 @@ public class SysUser implements Serializable {
     private String xxdz;
     private String xxdz;
     private String yzbm;
     private String yzbm;
     private String imgUrl;
     private String imgUrl;
-
+    private Integer isAllFarm;
 
 
 }
 }

+ 1 - 5
huimv-receive/src/main/java/com/huimv/receive/service/IBillPersonnelAdmissionService.java

@@ -49,9 +49,7 @@ public interface IBillPersonnelAdmissionService extends IService<BillPersonnelAd
                         String vistitDate, String vistitReson, String destId, String destName, String farmId,
                         String vistitDate, String vistitReson, String destId, String destName, String farmId,
                         String carNum, String source, String goods, String departureId, String departureName,
                         String carNum, String source, String goods, String departureId, String departureName,
                         MultipartFile picture1, MultipartFile picture2, MultipartFile picture3
                         MultipartFile picture1, MultipartFile picture2, MultipartFile picture3
-            , MultipartFile picture4, MultipartFile picture5, MultipartFile picture6
-            , MultipartFile picture7, MultipartFile picture8
-            , Integer midId, String midName) throws IOException;
+            ,  Integer midId, String midName) throws IOException;
 
 
     Result addAdmissionFeed(HttpServletRequest httpServletRequest, String admissionType, String vistitType,
     Result addAdmissionFeed(HttpServletRequest httpServletRequest, String admissionType, String vistitType,
                             String userName, String phone, String workName, String papersType, String papersCode,
                             String userName, String phone, String workName, String papersType, String papersCode,
@@ -102,8 +100,6 @@ public interface IBillPersonnelAdmissionService extends IService<BillPersonnelAd
                             String img, String vistitDate, String vistitReson, String destId, String destName,
                             String img, String vistitDate, String vistitReson, String destId, String destName,
                             String farmId, String carNum, String source, String goods, String departureId, String departureName,
                             String farmId, String carNum, String source, String goods, String departureId, String departureName,
                             MultipartFile picture1, MultipartFile picture2, MultipartFile picture3
                             MultipartFile picture1, MultipartFile picture2, MultipartFile picture3
-            , MultipartFile picture4, MultipartFile picture5, MultipartFile picture6
-            , MultipartFile picture7, MultipartFile picture8
             , Integer midId, String midName) throws IOException;
             , Integer midId, String midName) throws IOException;
 
 
     //统一审批多个人的入场申请
     //统一审批多个人的入场申请

+ 4 - 1
huimv-receive/src/main/java/com/huimv/receive/service/IBillSamplingService.java

@@ -27,7 +27,10 @@ public interface IBillSamplingService extends IService<BillSampling> {
     Result listPersonalSample(HttpServletRequest httpServletRequest, Map<String, String> paramsMap);
     Result listPersonalSample(HttpServletRequest httpServletRequest, Map<String, String> paramsMap);
 
 
     Result edit(HttpServletRequest httpServletRequest, String farmId, String id, String date,
     Result edit(HttpServletRequest httpServletRequest, String farmId, String id, String date,
-                MultipartFile video, MultipartFile picture1, MultipartFile picture2, MultipartFile picture3) throws ParseException, IOException;
+                String video1,String video2,String video3,String video4,String video5,String video6
+                ,String video7,String video8,MultipartFile picture1, MultipartFile picture2, MultipartFile picture3) throws ParseException, IOException;
 
 
     Result listAll(HttpServletRequest httpServletRequest, Map<String, String> paramsMap);
     Result listAll(HttpServletRequest httpServletRequest, Map<String, String> paramsMap);
+
+    Result getVideo(MultipartFile video) throws IOException;
 }
 }

+ 78 - 204
huimv-receive/src/main/java/com/huimv/receive/service/impl/BillPersonnelAdmissionServiceImpl.java

@@ -95,6 +95,13 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
     private FlowUtil flowUtil;
     private FlowUtil flowUtil;
     @Autowired
     @Autowired
     private BillGoodsInventoryMapper inventoryMapper;
     private BillGoodsInventoryMapper inventoryMapper;
+    @Autowired
+    private SysAccountMultilevelMapper multilevelMapper;
+    @Autowired
+    private SysUserMapper userMapper;
+    @Autowired
+    private BaseFarmMapper farmMapper;
+
 
 
     @Override
     @Override
     @Transactional(rollbackFor = Exception.class)
     @Transactional(rollbackFor = Exception.class)
@@ -103,8 +110,7 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
                                MultipartFile imgUrl, String img, String vistitDate, String vistitReson, String destId,
                                MultipartFile imgUrl, String img, String vistitDate, String vistitReson, String destId,
                                String destName, String farmId, String carNum, String source, String goods,
                                String destName, String farmId, String carNum, String source, String goods,
                                String departureId, String departureName, MultipartFile picture1, MultipartFile picture2,
                                String departureId, String departureName, MultipartFile picture1, MultipartFile picture2,
-                               MultipartFile picture3, MultipartFile picture4, MultipartFile picture5
-            , MultipartFile picture6, MultipartFile picture7, MultipartFile picture8, Integer midId, String midName) throws IOException {
+                               MultipartFile picture3, Integer midId, String midName) throws IOException {
         Integer userId = TokenSign.getMemberIdByJwtToken(httpServletRequest);
         Integer userId = TokenSign.getMemberIdByJwtToken(httpServletRequest);
         if (!PhoneNumberValidator.isValidPhoneNumber(phone)) {
         if (!PhoneNumberValidator.isValidPhoneNumber(phone)) {
             return new Result(10001, "手机号格式错误!", false);
             return new Result(10001, "手机号格式错误!", false);
@@ -127,115 +133,41 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
         }
         }
         String picUrl = null;
         String picUrl = null;
 
 
-        if (vistitType.equals("0")) {
-            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;
-                }
-            }
-        } else {
-            if (ObjectUtil.isNotEmpty(picture1)) {
-                String pic1 = uploadImage.getVideoCom(picture1);
-                if (pic1.equals("上传失败")) {
-                    TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
-                    return new Result(10001, "车辆视频1上传失败", false);
-                } else {
-                    picUrl = pic1;
-                }
-            }
-            if (ObjectUtil.isNotEmpty(picture2)) {
-                String pic2 = uploadImage.getVideoCom(picture2);
-                if (pic2.equals("上传失败")) {
-                    TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
-                    return new Result(10001, "车辆视频2上传失败", false);
-                } else {
-                    picUrl = picUrl + "," + pic2;
-                }
-            }
-            if (ObjectUtil.isNotEmpty(picture3)) {
-                String pic3 = uploadImage.getVideoCom(picture3);
-                if (pic3.equals("上传失败")) {
-                    TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
-                    return new Result(10001, "车辆视频3上传失败", false);
-                } else {
-                    picUrl = picUrl + "," + pic3;
-                }
-            }
-            if (ObjectUtil.isNotEmpty(picture4)) {
-                String pic4 = uploadImage.getVideoCom(picture4);
-                if (pic4.equals("上传失败")) {
-                    TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
-                    return new Result(10001, "车辆视频4上传失败", false);
-                } else {
-                    picUrl = picUrl + "," + pic4;
-                }
-            }
-            if (ObjectUtil.isNotEmpty(picture5)) {
-                String pic5 = uploadImage.getVideoCom(picture5);
-                if (pic5.equals("上传失败")) {
-                    TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
-                    return new Result(10001, "车辆视频5上传失败", false);
-                } else {
-                    picUrl = picUrl + "," + pic5;
-                }
-            }
-            if (ObjectUtil.isNotEmpty(picture6)) {
-                String pic6 = uploadImage.getVideoCom(picture6);
-                if (pic6.equals("上传失败")) {
-                    TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
-                    return new Result(10001, "车辆视频6上传失败", false);
-                } else {
-                    picUrl = picUrl + "," + pic6;
-                }
+        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(picture7)) {
-                String pic7 = uploadImage.getVideoCom(picture7);
-                if (pic7.equals("上传失败")) {
-                    TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
-                    return new Result(10001, "车辆视频7上传失败", false);
-                } else {
-                    picUrl = picUrl + "," + pic7;
-                }
+        }
+        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(picture8)) {
-                String pic8 = uploadImage.getVideoCom(picture8);
-                if (pic8.equals("上传失败")) {
-                    TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
-                    return new Result(10001, "车辆视频8上传失败", false);
-                } else {
-                    picUrl = picUrl + "," + pic8;
-                }
+        }
+        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;
             }
             }
         }
         }
 
 
 
 
 
 
         SysAccountMultilevel sysAccountMultilevel1 = sysAccountMultilevelMapper.selectById(userId);
         SysAccountMultilevel sysAccountMultilevel1 = sysAccountMultilevelMapper.selectById(userId);
-
+        BaseFarm baseFarm = farmMapper.selectById(farmId);
         DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm");
         DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm");
         BillPersonnelAdmission billPersonnelAdmission = new BillPersonnelAdmission();
         BillPersonnelAdmission billPersonnelAdmission = new BillPersonnelAdmission();
+        billPersonnelAdmission.setFarmName(baseFarm.getFarmName());
         billPersonnelAdmission.setAdmissionType(Integer.parseInt(admissionType));
         billPersonnelAdmission.setAdmissionType(Integer.parseInt(admissionType));
         billPersonnelAdmission.setVistitType(Integer.parseInt(vistitType));
         billPersonnelAdmission.setVistitType(Integer.parseInt(vistitType));
         if (vistitType.equals("0")) {
         if (vistitType.equals("0")) {
@@ -399,9 +331,10 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
             }
             }
         }
         }
         SysAccountMultilevel sysAccountMultilevel1 = sysAccountMultilevelMapper.selectById(userId);
         SysAccountMultilevel sysAccountMultilevel1 = sysAccountMultilevelMapper.selectById(userId);
-
+        BaseFarm baseFarm = farmMapper.selectById(farmId);
         DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm");
         DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm");
         BillPersonnelAdmission billPersonnelAdmission = new BillPersonnelAdmission();
         BillPersonnelAdmission billPersonnelAdmission = new BillPersonnelAdmission();
+        billPersonnelAdmission.setFarmName(baseFarm.getFarmName());
         billPersonnelAdmission.setAdmissionType(Integer.parseInt(admissionType));
         billPersonnelAdmission.setAdmissionType(Integer.parseInt(admissionType));
         billPersonnelAdmission.setVistitType(Integer.parseInt(vistitType));
         billPersonnelAdmission.setVistitType(Integer.parseInt(vistitType));
         billPersonnelAdmission.setDestId(Integer.parseInt(destId));
         billPersonnelAdmission.setDestId(Integer.parseInt(destId));
@@ -550,6 +483,10 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
         String farmId = paramsMap.get("farmId");
         String farmId = paramsMap.get("farmId");
         QueryWrapper<BillPersonnelAdmission> queryWrapper = new QueryWrapper<>();
         QueryWrapper<BillPersonnelAdmission> queryWrapper = new QueryWrapper<>();
         Integer userType = TokenSign.getUserTypeByJwtToken(httpServletRequest);
         Integer userType = TokenSign.getUserTypeByJwtToken(httpServletRequest);
+        Integer id = TokenSign.getMemberIdByJwtToken(httpServletRequest);
+        SysAccountMultilevel accountMultilevel = multilevelMapper.selectById(id);
+        Integer userId = accountMultilevel.getUserId();
+        SysUser sysUser = userMapper.selectById(userId);
         if (userType == 3) {
         if (userType == 3) {
             //生物安全负责人
             //生物安全负责人
             queryWrapper.eq("admission_type", 0);
             queryWrapper.eq("admission_type", 0);
@@ -570,7 +507,12 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
             default:
             default:
                 break;
                 break;
         }
         }
-        queryWrapper.orderByDesc("sub_date").eq("farm_id", farmId);
+        if (sysUser.getIsAllFarm() == 0) {
+            queryWrapper.orderByDesc("sub_date").eq("farm_id", farmId);
+        } else {
+            queryWrapper.orderByDesc("sub_date");
+        }
+
 //        List<BaseLocation> baseLocations = baseLocationMapper.selectList(new QueryWrapper<BaseLocation>().eq("serial_number", 0));
 //        List<BaseLocation> baseLocations = baseLocationMapper.selectList(new QueryWrapper<BaseLocation>().eq("serial_number", 0));
 //        List<Integer> locationIds = new ArrayList<>();
 //        List<Integer> locationIds = new ArrayList<>();
 //        for (BaseLocation baseLocation : baseLocations) {
 //        for (BaseLocation baseLocation : baseLocations) {
@@ -582,7 +524,11 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
         Page<BillPersonnelAdmission> page = new Page<>(Integer.parseInt(pageNo), Integer.parseInt(pageSize));
         Page<BillPersonnelAdmission> page = new Page<>(Integer.parseInt(pageNo), Integer.parseInt(pageSize));
         Page<BillPersonnelAdmission> billPersonnelAdmissionPage = billPersonnelAdmissionMapper.selectPage(page, queryWrapper);
         Page<BillPersonnelAdmission> billPersonnelAdmissionPage = billPersonnelAdmissionMapper.selectPage(page, queryWrapper);
         QueryWrapper<BillPersonnelAdmission> queryWrapper1 = new QueryWrapper<>();
         QueryWrapper<BillPersonnelAdmission> queryWrapper1 = new QueryWrapper<>();
-        queryWrapper1.eq("farm_id", farmId);
+        if (sysUser.getIsAllFarm() == 0) {
+            queryWrapper1.eq("farm_id", farmId);
+        } else {
+        }
+
         if (userType == 3) {
         if (userType == 3) {
             //生物安全负责人
             //生物安全负责人
             queryWrapper1.eq("admission_type", 0);
             queryWrapper1.eq("admission_type", 0);
@@ -1395,8 +1341,7 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
                                    String papersCode, MultipartFile imgUrl, String img, String vistitDate,
                                    String papersCode, MultipartFile imgUrl, String img, String vistitDate,
                                    String vistitReson, String destId, String destName, String farmId, String carNum,
                                    String vistitReson, String destId, String destName, String farmId, String carNum,
                                    String source, String goods, String departureId, String departureName,
                                    String source, String goods, String departureId, String departureName,
-                                   MultipartFile picture1, MultipartFile picture2, MultipartFile picture3,MultipartFile picture4, MultipartFile picture5
-            , MultipartFile picture6, MultipartFile picture7, MultipartFile picture8, Integer midId, String midName) throws IOException {
+                                   MultipartFile picture1, MultipartFile picture2, MultipartFile picture3, Integer midId, String midName) throws IOException {
         if (!PhoneNumberValidator.isValidPhoneNumber(phone)) {
         if (!PhoneNumberValidator.isValidPhoneNumber(phone)) {
             return new Result(10001, "手机号格式错误!", false);
             return new Result(10001, "手机号格式错误!", false);
         }
         }
@@ -1406,109 +1351,36 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
             }
             }
         }
         }
         String picUrl = null;
         String picUrl = null;
-        if (vistitType.equals("0")) {
-            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;
-                }
-            }
-        }else {
-            if (ObjectUtil.isNotEmpty(picture1)) {
-                String pic1 = uploadImage.getVideoCom(picture1);
-                if (pic1.equals("上传失败")) {
-                    TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
-                    return new Result(10001, "车辆视频1上传失败", false);
-                } else {
-                    picUrl = pic1;
-                }
-            }
-            if (ObjectUtil.isNotEmpty(picture2)) {
-                String pic2 = uploadImage.getVideoCom(picture2);
-                if (pic2.equals("上传失败")) {
-                    TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
-                    return new Result(10001, "车辆视频2上传失败", false);
-                } else {
-                    picUrl = picUrl + "," + pic2;
-                }
-            }
-            if (ObjectUtil.isNotEmpty(picture3)) {
-                String pic3 = uploadImage.getVideoCom(picture3);
-                if (pic3.equals("上传失败")) {
-                    TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
-                    return new Result(10001, "车辆视频3上传失败", false);
-                } else {
-                    picUrl = picUrl + "," + pic3;
-                }
-            }
-            if (ObjectUtil.isNotEmpty(picture4)) {
-                String pic4 = uploadImage.getVideoCom(picture4);
-                if (pic4.equals("上传失败")) {
-                    TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
-                    return new Result(10001, "车辆视频4上传失败", false);
-                } else {
-                    picUrl = picUrl + "," + pic4;
-                }
-            }
-            if (ObjectUtil.isNotEmpty(picture5)) {
-                String pic5 = uploadImage.getVideoCom(picture5);
-                if (pic5.equals("上传失败")) {
-                    TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
-                    return new Result(10001, "车辆视频5上传失败", false);
-                } else {
-                    picUrl = picUrl + "," + pic5;
-                }
-            }
-            if (ObjectUtil.isNotEmpty(picture6)) {
-                String pic6 = uploadImage.getVideoCom(picture6);
-                if (pic6.equals("上传失败")) {
-                    TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
-                    return new Result(10001, "车辆视频6上传失败", false);
-                } else {
-                    picUrl = picUrl + "," + pic6;
-                }
+
+        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(picture7)) {
-                String pic7 = uploadImage.getVideoCom(picture7);
-                if (pic7.equals("上传失败")) {
-                    TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
-                    return new Result(10001, "车辆视频7上传失败", false);
-                } else {
-                    picUrl = picUrl + "," + pic7;
-                }
+        }
+        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(picture8)) {
-                String pic8 = uploadImage.getVideoCom(picture8);
-                if (pic8.equals("上传失败")) {
-                    TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
-                    return new Result(10001, "车辆视频8上传失败", false);
-                } else {
-                    picUrl = picUrl + "," + pic8;
-                }
+        }
+        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;
             }
             }
         }
         }
 
 
+
         Integer userId = TokenSign.getMemberIdByJwtToken(httpServletRequest);
         Integer userId = TokenSign.getMemberIdByJwtToken(httpServletRequest);
         SysAccountMultilevel sysAccountMultilevel1;
         SysAccountMultilevel sysAccountMultilevel1;
         //先进行账号注册
         //先进行账号注册
@@ -1557,7 +1429,9 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
         }
         }
 
 
         DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm");
         DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm");
+        BaseFarm baseFarm = farmMapper.selectById(farmId);
         BillPersonnelAdmission billPersonnelAdmission = new BillPersonnelAdmission();
         BillPersonnelAdmission billPersonnelAdmission = new BillPersonnelAdmission();
+        billPersonnelAdmission.setFarmName(baseFarm.getFarmName());
         billPersonnelAdmission.setAdmissionType(Integer.parseInt(admissionType));
         billPersonnelAdmission.setAdmissionType(Integer.parseInt(admissionType));
         billPersonnelAdmission.setVistitType(Integer.parseInt(vistitType));
         billPersonnelAdmission.setVistitType(Integer.parseInt(vistitType));
         billPersonnelAdmission.setDestId(Integer.parseInt(destId));
         billPersonnelAdmission.setDestId(Integer.parseInt(destId));

+ 80 - 47
huimv-receive/src/main/java/com/huimv/receive/service/impl/BillSamplingServiceImpl.java

@@ -74,7 +74,7 @@ public class BillSamplingServiceImpl extends ServiceImpl<BillSamplingMapper, Bil
         }
         }
         Page<BillSampling> page = new Page<>(Integer.parseInt(pageNum), Integer.parseInt(pageSize));
         Page<BillSampling> page = new Page<>(Integer.parseInt(pageNum), Integer.parseInt(pageSize));
         QueryWrapper<BillSampling> queryWrapper = new QueryWrapper<>();
         QueryWrapper<BillSampling> queryWrapper = new QueryWrapper<>();
-        queryWrapper.in("test_location_id", TokenSign.getWorkIdByJwtToken(httpServletRequest)).orderByDesc("sub_date").eq("vistit_type",type);
+        queryWrapper.in("test_location_id", TokenSign.getWorkIdByJwtToken(httpServletRequest)).orderByDesc("sub_date").eq("vistit_type", type);
         if ("0".equals(data)) {
         if ("0".equals(data)) {
             queryWrapper.in("bill_status", 0, 1, 2, 3);
             queryWrapper.in("bill_status", 0, 1, 2, 3);
         }
         }
@@ -99,9 +99,9 @@ public class BillSamplingServiceImpl extends ServiceImpl<BillSamplingMapper, Bil
         String id = paramsMap.get("id");
         String id = paramsMap.get("id");
         BillSampling billSampling = billSamplingMapper.selectById(id);
         BillSampling billSampling = billSamplingMapper.selectById(id);
         BillSamplingVo billSamplingVo = new BillSamplingVo();
         BillSamplingVo billSamplingVo = new BillSamplingVo();
-        BeanUtil.copyProperties(billSampling,billSamplingVo);
+        BeanUtil.copyProperties(billSampling, billSamplingVo);
         BillPcr billPcr = pcrMapper.selectOne(new QueryWrapper<BillPcr>().lambda().eq(BillPcr::getSamplingId, id));
         BillPcr billPcr = pcrMapper.selectOne(new QueryWrapper<BillPcr>().lambda().eq(BillPcr::getSamplingId, id));
-        if (ObjectUtil.isNotEmpty(billPcr)){
+        if (ObjectUtil.isNotEmpty(billPcr)) {
             billSamplingVo.setPcrType(billPcr.getPcrType());
             billSamplingVo.setPcrType(billPcr.getPcrType());
             billSamplingVo.setStatus(billPcr.getBillStatus());
             billSamplingVo.setStatus(billPcr.getBillStatus());
         }
         }
@@ -115,61 +115,79 @@ public class BillSamplingServiceImpl extends ServiceImpl<BillSamplingMapper, Bil
         String pageSize = paramsMap.get("pageSize");
         String pageSize = paramsMap.get("pageSize");
         String vistitType = paramsMap.get("vistitType");
         String vistitType = paramsMap.get("vistitType");
         Integer userId = TokenSign.getMemberIdByJwtToken(httpServletRequest);
         Integer userId = TokenSign.getMemberIdByJwtToken(httpServletRequest);
-        Page<BillSampling> page = new Page<>(Integer.parseInt(pageNo),Integer.parseInt(pageSize));
+        Page<BillSampling> page = new Page<>(Integer.parseInt(pageNo), Integer.parseInt(pageSize));
         LambdaQueryWrapper<BillSampling> queryWrapper = new QueryWrapper<BillSampling>().lambda()
         LambdaQueryWrapper<BillSampling> queryWrapper = new QueryWrapper<BillSampling>().lambda()
-                .eq(BillSampling::getFarmId,farmId)
+                .eq(BillSampling::getFarmId, farmId)
                 .eq(BillSampling::getAdmissionUserId, userId)
                 .eq(BillSampling::getAdmissionUserId, userId)
                 .eq(ObjectUtil.isNotEmpty(vistitType), BillSampling::getVistitType, vistitType)
                 .eq(ObjectUtil.isNotEmpty(vistitType), BillSampling::getVistitType, vistitType)
                 .orderByDesc(BillSampling::getSubDate);
                 .orderByDesc(BillSampling::getSubDate);
-        Page<BillSampling> billSamplingPage = billSamplingMapper.selectPage(page,queryWrapper);
+        Page<BillSampling> billSamplingPage = billSamplingMapper.selectPage(page, queryWrapper);
         Integer count = billSamplingMapper.selectCount(queryWrapper);
         Integer count = billSamplingMapper.selectCount(queryWrapper);
-        return new Result(ResultCode.SUCCESS,billSamplingPage,count);
+        return new Result(ResultCode.SUCCESS, billSamplingPage, count);
     }
     }
 
 
 
 
-
     @Override
     @Override
-    public Result edit(HttpServletRequest httpServletRequest, String farmId, String id, String date, MultipartFile video, MultipartFile picture1, MultipartFile picture2, MultipartFile picture3) throws ParseException, IOException {
+    public Result edit(HttpServletRequest httpServletRequest, String farmId, String id, String date,
+                       String video1, String video2, String video3, String video4, String video5, String video6
+            , String video7, String video8, MultipartFile picture1, MultipartFile picture2, MultipartFile picture3) throws ParseException, IOException {
         String s = "";
         String s = "";
-        System.out.println(video);
-        s = uploadImage.getVideoCom(video);
-        if (s.equals("上传失败")) {
-            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
-            return new Result(10001, "视频上传失败", false);
+        if (ObjectUtil.isNotEmpty(video1)) {
+            s = video1;
+        }
+        if (ObjectUtil.isNotEmpty(video2)) {
+            s = s + "," + video2;
+        }
+        if (ObjectUtil.isNotEmpty(video3)) {
+            s = s + "," + video3;
+        }
+        if (ObjectUtil.isNotEmpty(video4)) {
+            s = s + "," + video4;
+        }
+        if (ObjectUtil.isNotEmpty(video5)) {
+            s = s + "," + video5;
+        }
+        if (ObjectUtil.isNotEmpty(video6)) {
+            s = s + "," + video6;
+        }
+        if (ObjectUtil.isNotEmpty(video7)) {
+            s = s + "," + video7;
+        }
+        if (ObjectUtil.isNotEmpty(video8)) {
+            s = s + "," + video8;
         }
         }
 
 
         String picUrl = null;
         String picUrl = null;
 
 
-        if (ObjectUtil.isNotEmpty(picture1)){
+        if (ObjectUtil.isNotEmpty(picture1)) {
             String pic1 = uploadImage.getImageCom(picture1);
             String pic1 = uploadImage.getImageCom(picture1);
-            if (pic1.equals("上传失败")){
+            if (pic1.equals("上传失败")) {
                 TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
                 TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
                 return new Result(10001, "物品照片1上传失败", false);
                 return new Result(10001, "物品照片1上传失败", false);
-            }else {
+            } else {
                 picUrl = pic1;
                 picUrl = pic1;
             }
             }
         }
         }
-        if (ObjectUtil.isNotEmpty(picture2)){
+        if (ObjectUtil.isNotEmpty(picture2)) {
             String pic2 = uploadImage.getImageCom(picture2);
             String pic2 = uploadImage.getImageCom(picture2);
-            if (pic2.equals("上传失败")){
+            if (pic2.equals("上传失败")) {
                 TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
                 TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
                 return new Result(10001, "物品照片2上传失败", false);
                 return new Result(10001, "物品照片2上传失败", false);
-            }else {
-                picUrl = picUrl + ","+pic2;
+            } else {
+                picUrl = picUrl + "," + pic2;
             }
             }
         }
         }
-        if (ObjectUtil.isNotEmpty(picture3)){
+        if (ObjectUtil.isNotEmpty(picture3)) {
             String pic3 = uploadImage.getImageCom(picture3);
             String pic3 = uploadImage.getImageCom(picture3);
-            if (pic3.equals("上传失败")){
+            if (pic3.equals("上传失败")) {
                 TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
                 TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
                 return new Result(10001, "物品照片3上传失败", false);
                 return new Result(10001, "物品照片3上传失败", false);
-            }else {
-                picUrl = picUrl + ","+pic3;
+            } else {
+                picUrl = picUrl + "," + pic3;
             }
             }
         }
         }
 
 
 
 
-
         DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm");
         DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm");
 
 
         BillSampling sampling = billSamplingMapper.selectById(id);
         BillSampling sampling = billSamplingMapper.selectById(id);
@@ -178,11 +196,11 @@ public class BillSamplingServiceImpl extends ServiceImpl<BillSamplingMapper, Bil
         }
         }
         sampling.setImgUrl(s);
         sampling.setImgUrl(s);
         sampling.setImgStatus(1);
         sampling.setImgStatus(1);
-        if (sampling.getVistitType() == 0){
-            if (ObjectUtil.isNotEmpty(picUrl)){
+        if (sampling.getVistitType() == 0) {
+            if (ObjectUtil.isNotEmpty(picUrl)) {
                 sampling.setIsCarry(1);
                 sampling.setIsCarry(1);
                 sampling.setPicUrl(picUrl);
                 sampling.setPicUrl(picUrl);
-            }else {
+            } else {
                 sampling.setIsCarry(0);
                 sampling.setIsCarry(0);
             }
             }
         }
         }
@@ -215,7 +233,7 @@ public class BillSamplingServiceImpl extends ServiceImpl<BillSamplingMapper, Bil
         Object newObject = BillPcrServiceImpl.getNewObject(nextId, sampling.getDestName(), sampling.getDestId(), sampling.getAdmissionUserName(),
         Object newObject = BillPcrServiceImpl.getNewObject(nextId, sampling.getDestName(), sampling.getDestId(), sampling.getAdmissionUserName(),
                 sampling.getAdmissionUserId(), sampling.getVistitDate(), sampling.getSubDate(),
                 sampling.getAdmissionUserId(), sampling.getVistitDate(), sampling.getSubDate(),
                 sampling.getProcessId(), Integer.parseInt(sampling.getFarmId()), sampling.getTestLocation(), sampling.getTestLocationId(),
                 sampling.getProcessId(), Integer.parseInt(sampling.getFarmId()), sampling.getTestLocation(), sampling.getTestLocationId(),
-                sampling.getVistitType(), sampling.getPhone(),sampling.getDepartureName(),sampling.getDepartureId(),sampling.getMidId(),sampling.getMidName());
+                sampling.getVistitType(), sampling.getPhone(), sampling.getDepartureName(), sampling.getDepartureId(), sampling.getMidId(), sampling.getMidName());
         if (nextId == 0) {
         if (nextId == 0) {
             if (split.length == 1) {
             if (split.length == 1) {
                 baseProcess.setProcessType(1);
                 baseProcess.setProcessType(1);
@@ -245,7 +263,7 @@ public class BillSamplingServiceImpl extends ServiceImpl<BillSamplingMapper, Bil
                 Object entity = flowUtil.getEntity(Integer.parseInt(split[1]), sampling.getVistitType(), sampling.getDestName()
                 Object entity = flowUtil.getEntity(Integer.parseInt(split[1]), sampling.getVistitType(), sampling.getDestName()
                         , sampling.getDestId(), sampling.getAdmissionUserId(), sampling.getAdmissionUserName(), sampling.getPhone(),
                         , sampling.getDestId(), sampling.getAdmissionUserId(), sampling.getAdmissionUserName(), sampling.getPhone(),
                         sampling.getVistitDate(), location.getId(), location.getLocationName(), Integer.parseInt(farmId)
                         sampling.getVistitDate(), location.getId(), location.getLocationName(), Integer.parseInt(farmId)
-                        , baseProcess.getId(), sampling.getDepartureName(), sampling.getDepartureId(),sampling.getMidId(),sampling.getMidName());
+                        , baseProcess.getId(), sampling.getDepartureName(), sampling.getDepartureId(), sampling.getMidId(), sampling.getMidName());
                 if (Integer.parseInt(split[1]) == 1) {
                 if (Integer.parseInt(split[1]) == 1) {
                     //新增采样
                     //新增采样
                     BillSampling billSampling = (BillSampling) entity;
                     BillSampling billSampling = (BillSampling) entity;
@@ -319,7 +337,7 @@ public class BillSamplingServiceImpl extends ServiceImpl<BillSamplingMapper, Bil
                         before.setRemark(sampling.getRemark());
                         before.setRemark(sampling.getRemark());
                     }
                     }
                     billCleanBeforeMapper.insert(before);
                     billCleanBeforeMapper.insert(before);
-                }else if (Integer.parseInt(split[1]) == 7) {
+                } else if (Integer.parseInt(split[1]) == 7) {
                     //新增洗澡前拍照
                     //新增洗澡前拍照
                     BillGoodsInventory before = (BillGoodsInventory) entity;
                     BillGoodsInventory before = (BillGoodsInventory) entity;
                     if (sampling.getVistitType() != 0) {
                     if (sampling.getVistitType() != 0) {
@@ -335,7 +353,7 @@ public class BillSamplingServiceImpl extends ServiceImpl<BillSamplingMapper, Bil
                 baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId + "," + split[1]);
                 baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId + "," + split[1]);
                 Integer locationId = sampling.getTestLocationId();
                 Integer locationId = sampling.getTestLocationId();
                 String[] split2 = allLocationId.split(",");
                 String[] split2 = allLocationId.split(",");
-                int a=0;
+                int a = 0;
                 for (int i = 0; i < split2.length; i++) {
                 for (int i = 0; i < split2.length; i++) {
                     if (locationId.toString().equals(split2[i])) {
                     if (locationId.toString().equals(split2[i])) {
                         a = i + 1;
                         a = i + 1;
@@ -372,7 +390,7 @@ public class BillSamplingServiceImpl extends ServiceImpl<BillSamplingMapper, Bil
             }
             }
             billSamplingMapper.insert(billSampling);
             billSamplingMapper.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;
             if (sampling.getVistitType() != 0) {
             if (sampling.getVistitType() != 0) {
@@ -386,19 +404,20 @@ public class BillSamplingServiceImpl extends ServiceImpl<BillSamplingMapper, Bil
             billClean.setSamplingId(Integer.parseInt(id));
             billClean.setSamplingId(Integer.parseInt(id));
             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 (sampling.getVistitType() != 0) {
             if (sampling.getVistitType() != 0) {
                 billClean.setCarNum(sampling.getCarNum());
                 billClean.setCarNum(sampling.getCarNum());
-            }if (sampling.getVistitType() == 5) {
+            }
+            if (sampling.getVistitType() == 5) {
                 billClean.setResource(sampling.getResource());
                 billClean.setResource(sampling.getResource());
                 billClean.setFeedImgUrl(sampling.getFeedImgUrl());
                 billClean.setFeedImgUrl(sampling.getFeedImgUrl());
                 billClean.setRemark(sampling.getRemark());
                 billClean.setRemark(sampling.getRemark());
             }
             }
             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;
             if (sampling.getVistitType() != 0) {
             if (sampling.getVistitType() != 0) {
@@ -411,7 +430,7 @@ public class BillSamplingServiceImpl extends ServiceImpl<BillSamplingMapper, Bil
             }
             }
             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 (sampling.getVistitType() != 0) {
             if (sampling.getVistitType() != 0) {
                 billClean.setCarNum(sampling.getCarNum());
                 billClean.setCarNum(sampling.getCarNum());
@@ -424,7 +443,7 @@ public class BillSamplingServiceImpl extends ServiceImpl<BillSamplingMapper, Bil
             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 (sampling.getVistitType() != 0) {
             if (sampling.getVistitType() != 0) {
@@ -437,8 +456,7 @@ public class BillSamplingServiceImpl extends ServiceImpl<BillSamplingMapper, Bil
             }
             }
             billCleanBeforeMapper.insert(before);
             billCleanBeforeMapper.insert(before);
             baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
             baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
-        }
-        else if (nextId == 7) {
+        } else if (nextId == 7) {
             //新增洗澡前拍照
             //新增洗澡前拍照
             BillGoodsInventory before = (BillGoodsInventory) newObject;
             BillGoodsInventory before = (BillGoodsInventory) newObject;
             if (sampling.getVistitType() != 0) {
             if (sampling.getVistitType() != 0) {
@@ -473,17 +491,32 @@ public class BillSamplingServiceImpl extends ServiceImpl<BillSamplingMapper, Bil
         String pageSize = paramsMap.get("pageSize");
         String pageSize = paramsMap.get("pageSize");
         Page<BillSampling> page = new Page<>(Integer.parseInt(pageNum), Integer.parseInt(pageSize));
         Page<BillSampling> page = new Page<>(Integer.parseInt(pageNum), Integer.parseInt(pageSize));
         QueryWrapper<BillSampling> queryWrapper = new QueryWrapper<>();
         QueryWrapper<BillSampling> queryWrapper = new QueryWrapper<>();
-        queryWrapper.eq("farm_id", farmId).orderByDesc("sub_date").eq("vistit_type",type);
+        queryWrapper.eq("farm_id", farmId).orderByDesc("sub_date").eq("vistit_type", type);
         if ("0".equals(data)) {
         if ("0".equals(data)) {
             queryWrapper.in("bill_status", 0, 1, 2, 3);
             queryWrapper.in("bill_status", 0, 1, 2, 3);
         }
         }
         if ("1".equals(data)) {
         if ("1".equals(data)) {
-            queryWrapper.in("bill_status", 0,3);
+            queryWrapper.in("bill_status", 0, 3);
         }
         }
         if ("2".equals(data)) {
         if ("2".equals(data)) {
             queryWrapper.eq("bill_status", 1);
             queryWrapper.eq("bill_status", 1);
         }
         }
-        return new Result(ResultCode.SUCCESS,billSamplingMapper.selectPage(page,queryWrapper));
+        return new Result(ResultCode.SUCCESS, billSamplingMapper.selectPage(page, queryWrapper));
+    }
+
+    @Override
+    public Result getVideo(MultipartFile video) throws IOException {
+        String s = "";
+        if (ObjectUtil.isNotEmpty(video)) {
+            String pic1 = uploadImage.getVideoCom(video);
+            if (pic1.equals("上传失败")) {
+                TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+                return new Result(10001, "车辆视频上传失败", false);
+            } else {
+                s = pic1;
+            }
+        }
+        return new Result(ResultCode.SUCCESS, s);
     }
     }
 
 
     public static void main(String[] args) {
     public static void main(String[] args) {
@@ -492,14 +525,14 @@ public class BillSamplingServiceImpl extends ServiceImpl<BillSamplingMapper, Bil
         int a = 0;
         int a = 0;
         for (int i = 0; i < split1.length; i++) {
         for (int i = 0; i < split1.length; i++) {
             if ("36".equals(split1[i])) {
             if ("36".equals(split1[i])) {
-                a = i+1;
+                a = i + 1;
             }
             }
         }
         }
-        int i = 2 *(a - 2);
+        int i = 2 * (a - 2);
         System.out.println(i);
         System.out.println(i);
         String s1 = "2,2,2,1,0,0,0";
         String s1 = "2,2,2,1,0,0,0";
         String s2 = s1.substring(0, i + 3);
         String s2 = s1.substring(0, i + 3);
-        System.out.println("s2:"+s2);
+        System.out.println("s2:" + s2);
         String[] split = s2.split(",");
         String[] split = s2.split(",");
         String sb2 = "";
         String sb2 = "";
         for (int j = 0; j < split.length; j++) {
         for (int j = 0; j < split.length; j++) {