zhanghua
2025-04-14 1cad14bca191807e18705c3a5526eda8151be439
批量审核和图片保存bug
13个文件已修改
1个文件已添加
1 文件已重命名
192 ■■■■ 已修改文件
document/副本丽水市遂昌县智慧执法应用-资源开通表 -0228.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
document/遂昌服务迁移报价.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
ycl-common/src/main/java/com/ycl/service/oss/impl/OssServiceImpl.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/controller/caseHandler/BaseCaseController.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/controller/caseHandler/CheckHandleController.java 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/dto/caseHandler/CheckParam.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/service/caseHandler/ICheckHandleService.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/CheckHandleServiceImpl.java 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/DisposeRecordServiceImpl.java 38 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/IDispatchHandleServiceImpl.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/service/resources/IImageResourcesService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/service/resources/impl/ImageResourcesServiceImpl.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/task/SynchronizeDHAlarm.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/resources/mapper/caseHandler/BaseCaseMapper.xml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/test/java/com/ycl/sccgplatform/Test1.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
document/¸±±¾ÀöË®ÊÐËì²ýÏØÖÇ»ÛÖ´·¨Ó¦ÓÃ-×ÊÔ´¿ªÍ¨±í -0228.xlsx
Binary files differ
document/Ëì²ý·þÎñÇ¨ÒÆ±¨¼Û.xlsx
Binary files differ
ycl-common/src/main/java/com/ycl/service/oss/impl/OssServiceImpl.java
@@ -169,18 +169,14 @@
            if (imgFile.contains("?")) {
                fileName = imgFile.substring(0, imgFile.indexOf("?"));
            }
            try {
                fileName = URLDecoder.decode(fileName, "UTF-8");
            } catch (UnsupportedEncodingException ex) {
//                throw new RuntimeException(ex);
            }
            // æ ¹æ®BucketName,objectName删除文件
            boolean b = ossClient.doesObjectExist(bucketName, fileName);
            if (b) {
                VoidResult voidResult = ossClient.deleteObject(bucketName, fileName);
                System.out.println(voidResult.toString());
//                System.out.println(voidResult.toString());
            }
            ossClient.shutdown();
            return true;
ycl-platform/src/main/java/com/ycl/controller/caseHandler/BaseCaseController.java
@@ -13,6 +13,7 @@
import com.ycl.controller.BaseController;
import com.ycl.common.constant.BaseCaseStatus;
import com.ycl.common.util.UtilNumber;
import com.ycl.dto.caseHandler.CheckParam;
import com.ycl.dto.caseHandler.QueryForViolationParam;
import com.ycl.dto.casePool.IllegalBuildingParam;
import com.ycl.dto.casePool.VideoInspectParam;
@@ -181,6 +182,8 @@
                stateList.add(3);
                stateList.add(4);
                stateList.add(9);
                break;
            case "-1":
                break;
            default:
                stateList.add(Integer.valueOf(state));
@@ -353,7 +356,7 @@
                ImageResources imageResources = new ImageResources();
                imageResources.setType("01");
                imageResources.setBelongToId(baseCase.getId());
                imageResources.setUrl(illegalBuildingParam.getImageUrls().toString());
                imageResources.setUrl(String.join(",", illegalBuildingParam.getImageUrls()));
                imageResources.setCreateTime(LocalDateTime.now());
                imageResources.setCreateUser(user.getUserId());
                iImageResourcesService.save(imageResources);
@@ -483,6 +486,19 @@
        return CommonResult.success("end case success~!");
    }
    @ApiOperation(value = "批量结案")
    @RequestMapping(value = "/end_case_batch", method = RequestMethod.POST)
    @ResponseBody
    @LogSave(operationType = "批量结案", contain = "批量结案")
    public CommonResult endCaseBatch(@RequestBody CheckParam checkParam) {
        checkParam.getIds().forEach(o -> {
            String result = "结案";
            String opinion = "同意结案";
            baseCaseService.endCase(o, result, opinion);
        });
        return CommonResult.success("end case success~!");
    }
    @ApiOperation(value = "查询案卷")
    @GetMapping("/query_case")
    public CommonResult<Page<BaseCase>> queryCase(@RequestParam Integer pageSize,
ycl-platform/src/main/java/com/ycl/controller/caseHandler/CheckHandleController.java
@@ -3,7 +3,7 @@
import com.ycl.annotation.LogSave;
import com.ycl.api.CommonResult;
import com.ycl.bo.AdminUserDetails;
import com.ycl.dto.caseHandler.ChechParam;
import com.ycl.dto.caseHandler.CheckParam;
import com.ycl.service.caseHandler.ICheckHandleService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -11,6 +11,9 @@
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.List;
/**
 * <p>
@@ -33,9 +36,18 @@
    @RequestMapping(value = "/check", method = RequestMethod.POST)
    @ResponseBody
    @LogSave(operationType = "审核管理",contain = "案件审核")
    public CommonResult check(@Validated @RequestBody ChechParam chechParam) {
    public CommonResult check(@Validated @RequestBody CheckParam checkParam) {
        AdminUserDetails user = (AdminUserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
        chechParam.setCurrentUser(user.getUserId());
        return CommonResult.success(iCheckHandleService.check(chechParam));
        checkParam.setCurrentUser(user.getUserId());
        return CommonResult.success(iCheckHandleService.check(checkParam));
    }
    @ApiOperation(value = "审核")
    @RequestMapping(value = "/check_batch", method = RequestMethod.POST)
    @ResponseBody
    @LogSave(operationType = "审核管理", contain = "案件审核")
    public CommonResult checkBatch(@RequestBody CheckParam checkParam) {
        AdminUserDetails user = (AdminUserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
        return CommonResult.success(iCheckHandleService.checkBatch(checkParam.getIds(), user.getUserId()));
    }
}
ycl-platform/src/main/java/com/ycl/dto/caseHandler/CheckParam.java
File was renamed from ycl-platform/src/main/java/com/ycl/dto/caseHandler/ChechParam.java
@@ -4,6 +4,8 @@
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
 * <p>
 * å®¡æ ¸å‚æ•°ç±»
@@ -13,8 +15,8 @@
 * @since 2022-10-02
 */
@Data
@ApiModel("ChechParam")
public class ChechParam {
@ApiModel("CheckParam")
public class CheckParam {
    /**
     * æ¡ˆä»¶id
     */
@@ -41,4 +43,5 @@
    @ApiModelProperty(value = "审核结果")
    private String result;
    private List<Long> ids;
}
ycl-platform/src/main/java/com/ycl/service/caseHandler/ICheckHandleService.java
@@ -1,6 +1,8 @@
package com.ycl.service.caseHandler;
import com.ycl.dto.caseHandler.ChechParam;
import com.ycl.dto.caseHandler.CheckParam;
import java.util.List;
/**
 * <p>
@@ -11,5 +13,7 @@
 * @since 2022-10-02
 */
public interface ICheckHandleService {
    Boolean check(ChechParam chechParam);
    Boolean check(CheckParam checkParam);
    Boolean checkBatch(List<Long> ids, Long userId);
}
ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/CheckHandleServiceImpl.java
@@ -6,7 +6,7 @@
import com.ycl.common.constant.BaseCaseStatus;
import com.ycl.common.constant.CheckResult;
import com.ycl.common.constant.StepName;
import com.ycl.dto.caseHandler.ChechParam;
import com.ycl.dto.caseHandler.CheckParam;
import com.ycl.entity.caseHandler.BaseCase;
import com.ycl.entity.caseHandler.DisposeRecord;
import com.ycl.entity.caseHandler.WorkflowConfigStep;
@@ -20,6 +20,7 @@
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.List;
/**
 * <p>
@@ -42,27 +43,26 @@
    WorkflowConfigStepMapper workflowConfigStepMapper;
    @Override
    public Boolean check(ChechParam chechParam) {
    public Boolean check(CheckParam checkParam) {
        QueryWrapper<WorkflowConfigStep> stepQurey = new QueryWrapper<>();
        stepQurey.eq("name", StepName.CHECK.getName());
        WorkflowConfigStep workflowConfigStep = workflowConfigStepMapper.selectOne(stepQurey);
        //修改案件状态为审核
        BaseCase baseCase = new BaseCase();
        baseCase.setId(chechParam.getBaseCaseId());
        baseCase.setAuditOpinion(chechParam.getCheckOpinion());
        baseCase.setId(checkParam.getBaseCaseId());
        baseCase.setAuditOpinion(checkParam.getCheckOpinion());
        //修改核查记录
        DisposeRecord disposeRecord = new DisposeRecord();
        //驳回处理
        if (CheckResult.REJECT.getName().equals(chechParam.getResult())) {
        if (CheckResult.REJECT.getName().equals(checkParam.getResult())) {
            QueryWrapper<WorkflowConfigStep> lastNextqurey = new QueryWrapper<>();
            lastNextqurey.eq("workflow_config_id", workflowConfigStep.getWorkflowConfigId());
            lastNextqurey.eq("seq", workflowConfigStep.getSeq());
            WorkflowConfigStep lastStep = workflowConfigStepMapper.selectOne(lastNextqurey);
            //删除当前数据
            UpdateWrapper<DisposeRecord> deleteWrapper = new UpdateWrapper<>();
            deleteWrapper.eq("base_case_id", chechParam.getBaseCaseId()).eq("workflow_config_step_id", lastStep.getId());
            deleteWrapper.eq("base_case_id", checkParam.getBaseCaseId()).eq("workflow_config_step_id", lastStep.getId());
            disposeRecordMapper.delete(deleteWrapper);
            //修改状态为上一步状态
            QueryWrapper<WorkflowConfigStep> lastLastNextqurey = new QueryWrapper<>();
@@ -71,7 +71,7 @@
            WorkflowConfigStep lastLastStep = workflowConfigStepMapper.selectOne(lastLastNextqurey);
            UpdateWrapper<DisposeRecord> updateWrapper = new UpdateWrapper<>();
            updateWrapper.eq("base_case_id", chechParam.getBaseCaseId()).eq("workflow_config_step_id", lastLastStep.getId());
            updateWrapper.eq("base_case_id", checkParam.getBaseCaseId()).eq("workflow_config_step_id", lastLastStep.getId());
            //处理未开始
            disposeRecord.setState(0);
@@ -93,10 +93,10 @@
        UpdateWrapper<DisposeRecord> updateWrapper = new UpdateWrapper<>();
        updateWrapper.eq("base_case_id", baseCase.getId()).eq("workflow_config_step_id", workflowConfigStep.getId());
        disposeRecord.setHandlerId(chechParam.getCurrentUser());
        disposeRecord.setHandlerId(checkParam.getCurrentUser());
        //核查已结束
        disposeRecord.setState(1);
        disposeRecord.setResult(chechParam.getResult());
        disposeRecord.setResult(checkParam.getResult());
        disposeRecord.setEndTime(LocalDateTime.now());
        disposeRecordMapper.update(disposeRecord, updateWrapper);
@@ -114,10 +114,23 @@
        //上传处置未结束
        stepNextRecord.setState(0);
        stepNextRecord.setStartTime(LocalDateTime.now());
        stepNextRecord.setCreateUser(chechParam.getCurrentUser());
        stepNextRecord.setCreateUser(checkParam.getCurrentUser());
        stepNextRecord.setCreateTime(LocalDateTime.now());
        disposeRecordMapper.insert(stepNextRecord);
        return true;
    }
    @Override
    public Boolean checkBatch(List<Long> ids, Long userId) {
        ids.forEach(id -> {
            CheckParam checkParam = new CheckParam();
            checkParam.setCurrentUser(userId);
            checkParam.setBaseCaseId(id);
            checkParam.setResult(CheckResult.PASS.getName());
            checkParam.setCheckOpinion("同意");
            this.check(checkParam);
        });
        return null;
    }
}
ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/DisposeRecordServiceImpl.java
@@ -33,6 +33,7 @@
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
@@ -129,6 +130,18 @@
            uploadDisposingResultParam.setInvestigationTime(uploadDisposingResultParam.getInvestigationTime().replace("/", "-"));
        }
        List<String> pics = new ArrayList<>();
        uploadDisposingResultParam.getPic().forEach(o -> {
            pics.add(o.replace("/sccg/API/img?fileUrl=", ""));
        });
        uploadDisposingResultParam.setPic(pics);
        List<String> situationPics = new ArrayList<>();
        uploadDisposingResultParam.getSituationPic().forEach(o -> {
            situationPics.add(o.replace("/sccg/API/img?fileUrl=", ""));
        });
        uploadDisposingResultParam.setSituationPic(situationPics);
        AdminUserDetails user = (AdminUserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
        List<ArrivalSituation> list = iArrivalSituationService.list(new LambdaQueryWrapper<ArrivalSituation>().eq(ArrivalSituation::getBaseCaseId, uploadDisposingResultParam.getCaseId()));
        if (!list.isEmpty()) {
@@ -147,7 +160,7 @@
                investigation.setBaseCaseId(uploadDisposingResultParam.getCaseId());
                investigation.setPartyId(partyInfo.getId());
                //TODO:改为集合的字符串形式
                investigation.setPic(uploadDisposingResultParam.getPic().toString());
                investigation.setPic(String.join(",", uploadDisposingResultParam.getPic()));
                //TODO:小程序前端页面没有调查时间,暂时不填
                //investigation.setInvestigationTime(LocalDateTime.parse(uploadDisposingResultParam.getInvestigationTime(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
                investigation.setId(uploadDisposingResultParam.getInvestigationId());
@@ -160,16 +173,18 @@
            arrivalSituation.setArrivalTime(LocalDateTime.parse(uploadDisposingResultParam.getArrivalTime(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
            arrivalSituation.setId(uploadDisposingResultParam.getArrivalSituationId());
            //TODO:改为集合的字符串形式
            arrivalSituation.setSituationPic(uploadDisposingResultParam.getSituationPic().toString());
            arrivalSituation.setSituationPic(String.join(",", uploadDisposingResultParam.getSituationPic()));
            iArrivalSituationService.updateById(arrivalSituation);
            //文书
            String handType = "02";
            iImageResourcesService.deleteByCaseId(uploadDisposingResultParam.getCaseId(), handType);
            ImageResources imageResources = new ImageResources();
            imageResources.setType(handType);
            imageResources.setBelongToId(uploadDisposingResultParam.getCaseId());
            imageResources.setUrl(StringUtils.joinWith(",", uploadDisposingResultParam.getPic().toString(), uploadDisposingResultParam.getSituationPic().toString()));
            imageResources.setId(uploadDisposingResultParam.getImageResourcesId());
            iImageResourcesService.updateById(imageResources);
            imageResources.setUrl(StringUtils.joinWith(",",
                    String.join(",", uploadDisposingResultParam.getPic()),
                    String.join(",", uploadDisposingResultParam.getSituationPic())));
            iImageResourcesService.save(imageResources);
            if (uploadDisposingResultParam.getWritCode() != null && uploadDisposingResultParam.getWritType() != null) {
                Writ writ = new Writ();
                BeanUtils.copyProperties(uploadDisposingResultParam, writ);
@@ -202,7 +217,7 @@
            investigation.setBaseCaseId(uploadDisposingResultParam.getCaseId());
            investigation.setCreateTime(LocalDateTime.now());
            //TODO:改为集合的字符串形式
            investigation.setPic(uploadDisposingResultParam.getPic().toString());
            investigation.setPic(String.join(",", uploadDisposingResultParam.getPic()));
            investigation.setCreateUser(user.getUserId());
            investigation.setPartyId(partyInfo.getId());
@@ -216,7 +231,7 @@
            arrivalSituation.setCreateTime(LocalDateTime.now());
            arrivalSituation.setCreateUser(user.getUserId());
            //TODO:改为集合的字符串形式
            arrivalSituation.setSituationPic(uploadDisposingResultParam.getSituationPic().toString());
            arrivalSituation.setSituationPic(String.join(",", uploadDisposingResultParam.getSituationPic()));
            arrivalSituation.setArrivalTime(LocalDateTime.parse(uploadDisposingResultParam.getArrivalTime(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
            iArrivalSituationService.save(arrivalSituation);
            //文书
@@ -226,7 +241,9 @@
            imageResources.setBelongToId(uploadDisposingResultParam.getCaseId());
            imageResources.setCreateTime(LocalDateTime.now());
            imageResources.setCreateUser(user.getUserId());
            imageResources.setUrl(StringUtils.joinWith(",", uploadDisposingResultParam.getPic().toString(), uploadDisposingResultParam.getSituationPic().toString()));
            imageResources.setUrl(StringUtils.joinWith(",",
                    String.join(",", uploadDisposingResultParam.getPic()),
                    String.join(",", uploadDisposingResultParam.getSituationPic())));
            iImageResourcesService.save(imageResources);
            if (uploadDisposingResultParam.getWritCode() != null && uploadDisposingResultParam.getWritType() != null) {
                Writ writ = new Writ();
@@ -240,8 +257,9 @@
                writ.setSendTime(LocalDateTime.parse(uploadDisposingResultParam.getSendTime(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
                iWritService.save(writ);
                imageResources.setUrl(StringUtils
                        .joinWith(",", uploadDisposingResultParam.getPic().toString()
                                , uploadDisposingResultParam.getSituationPic().toString()
                        .joinWith(","
                                , String.join(",", uploadDisposingResultParam.getPic())
                                , String.join(",", uploadDisposingResultParam.getSituationPic())
                                , uploadDisposingResultParam.getOriginalPic()
                                , uploadDisposingResultParam.getOtherPic()
                                , uploadDisposingResultParam.getRectifiedPic()
ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/IDispatchHandleServiceImpl.java
@@ -60,6 +60,7 @@
    UmsAdminService umsAdminService;
    @Autowired
    DingMessageMapper dingMessageMapper;
    @Override
    @Transactional
    public DispatchInfo dispatch(DispatchInfoParam dispatchInfoParam) {
@@ -119,12 +120,13 @@
        String baseCaseCode = baseCaseForCode.getCode();
        Long lawEnforcer = dispatchInfoParam.getLawEnforcer();
        Long accountId = umsAdminService.getById(lawEnforcer).getAccountId();
        if (accountId != null) {
        DingMessage dingMessage = DingMessage.builder()
                .accountId(accountId)
                .baseCaseCode(baseCaseCode)
                .createTime(new Date()).build();
        dingMessageMapper.insert(dingMessage);
        }
        return dispatchInfo;
    }
ycl-platform/src/main/java/com/ycl/service/resources/IImageResourcesService.java
@@ -23,4 +23,6 @@
    Map<Long, String> getUrlMap(Collection<Long> ids, String type);
    void deleteByCaseId(Long caseId, String handType);
}
ycl-platform/src/main/java/com/ycl/service/resources/impl/ImageResourcesServiceImpl.java
@@ -51,4 +51,11 @@
        return list.stream().collect(Collectors.toMap(ImageResources::getBelongToId, ImageResources::getUrl, (v1, v2) -> v1));
    }
    @Override
    public void deleteByCaseId(Long caseId, String handType) {
        LambdaQueryWrapper<ImageResources> wrapper = new QueryWrapper<ImageResources>().lambda().eq(ImageResources::getBelongToId, caseId).eq(ImageResources::getType, handType);
        imageResourcesMapper.delete(wrapper);
    }
}
ycl-platform/src/main/java/com/ycl/task/SynchronizeDHAlarm.java
@@ -83,8 +83,8 @@
    }
    @Scheduled(cron = "0 0 16 * * ?")
    @Transactional(rollbackFor = Exception.class)
    @Scheduled(cron = "0 0 0 * * ?")
//    @Transactional(rollbackFor = Exception.class)
    public void deleteAlarmTask() {
        System.out.println("----------------执行清除数据任务:");
        int i = 1;
@@ -101,7 +101,10 @@
                    for (String url : urls) {
                        ossService.deleteImages(url);
                    }
                    baseCaseService.removeById(baseCaseVO.getBaseId());
                    violationsService.removeById(baseCaseVO.getBaseId());
                    imageService.removeById(baseCaseVO.getImageId());
                    System.out.println("----------------清除数据数据成功,id:" + baseCaseVO.getBaseId());
ycl-platform/src/main/resources/mapper/caseHandler/BaseCaseMapper.xml
@@ -76,13 +76,13 @@
            <if test="type!=null">
                and ubc.category=#{type}
            </if>
            <if test="code!=null">
            <if test="code!=null and code!=''">
                and ubc.code=#{code}
            </if>
            <if test="categoryBig != null">
            <if test="categoryBig != null and categoryBig!=''">
                and t3.name like concat('%', #{categoryBig},'%')
            </if>
            <if test="categorySmall != null">
            <if test="categorySmall != null and categoryBig!=''">
                and t4.name like concat('%', #{categorySmall},'%')
            </if>
            <if test="street != null">
ycl-platform/src/test/java/com/ycl/sccgplatform/Test1.java
@@ -17,6 +17,7 @@
import com.ycl.service.caseHandler.IBaseCaseService;
import com.ycl.service.caseHandler.IViolationsService;
import com.ycl.service.oss.OssService;
import com.ycl.service.resources.IImageResourcesService;
import com.ycl.utils.ConstantPropertiesUtils;
import com.ycl.vo.casePool.BaseCaseVO;
import net.coobird.thumbnailator.Thumbnails;
@@ -47,6 +48,8 @@
    @Autowired
    private IViolationsService violationsService;
    @Autowired
    private IImageResourcesService imageService;
    @Resource
    private UnlawfulMapper unlawfuldao;
    @Autowired
@@ -235,27 +238,28 @@
//        ossService.deleteImages("https://xshlivelesson.oss-cn-shenzhen.aliyuncs.com/sczf/2025022845414037.JPG?Expires=2686811218&OSSAccessKeyId=LTAIDlTWjHW0IVyW&Signature=5SQ7PInLkbd62zJ1aurljeO0c%2Bw%3D");
//
//        int i = 1;
//        while (true) {
//            String beginTime = "2025-01-01 00:00:00";
//            String endTime = LocalDateTime.now().plusDays(-4).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
//            Page<BaseCaseVO> page = baseCaseService.selectVideoInspection(i, 10, null, null, beginTime, endTime, null);
//            if (page.getRecords().size() > 0) {
//                page.getRecords().forEach(baseCaseVO -> {
        int i = 1;
        while (true) {
            String beginTime = "2025-01-01 00:00:00";
            String endTime = LocalDateTime.now().plusDays(-4).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
            Page<BaseCaseVO> page = baseCaseService.selectVideoInspection(i, 10, null, null, beginTime, endTime, null);
            if (page.getRecords().size() > 0) {
                page.getRecords().forEach(baseCaseVO -> {
//                    String picData = baseCaseVO.getPicData();
//                    String[] urls = picData.split(",");
//                    for (String url : urls) {
//                        ossService.deleteImages(url);
//
//                    }
//                    baseCaseService.removeById(baseCaseVO.getBaseId());
//                    violationsService.removeById(baseCaseVO.getBaseId());
//                });
//            } else {
//                break;
//            }
//            i++;
//        }
                    baseCaseService.removeById(baseCaseVO.getBaseId());
                    violationsService.removeById(baseCaseVO.getBaseId());
                    imageService.removeById(baseCaseVO.getImageId());
                });
            } else {
                break;
            }
            i++;
        }
    }