wl
2022-10-01 4cdb5cec4d5c79aa662d73a86bb1dfcc9d73f1e2
ycl-platform/src/main/java/com/ycl/controller/caseHandler/BaseCaseController.java
@@ -24,7 +24,6 @@
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.Arrays;
import java.util.List;
import java.util.UUID;
@@ -135,22 +134,21 @@
     * @Description delete illegal buildings or violations
     * @Param [ids, type]
     **/
    @ApiOperation(value = "删除违规/违建案件")
    @ApiOperation(value = "批处理-删除违规/违建案件")
    @DeleteMapping("/batch_deletion")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "type", value = "1 违规,2 违建", dataType = "Integer")
    })
    public CommonResult removeCases(@RequestParam String[] ids, @RequestParam Integer type) {
    public CommonResult removeCases(@RequestParam List<Long> ids, @RequestParam Integer type) {
        Integer violationType = 1;
        Integer illegalBuildingType = 2;
        List<String> idList = Arrays.asList(ids);
        if (!idList.isEmpty()) {
        if (!ids.isEmpty()) {
            CommonResult.success(baseCaseService.removeBatchByIds(ids));
            if (type == violationType) {
                return CommonResult.success(violationsService.removeBatchByIds(idList));
                return CommonResult.success(violationsService.removeBatchByIds(ids));
            } else if (type == illegalBuildingType) {
                return CommonResult.success(illegalBuildingService.removeBatchByIds(idList));
                return CommonResult.success(illegalBuildingService.removeBatchByIds(ids));
            }
            return CommonResult.success(baseCaseService.removeBatchByIds(idList));
        }
        return CommonResult.failed("request parameter is null");
    }
@@ -223,7 +221,7 @@
    @ApiOperation(value = "案件状态修改")
    @PutMapping("/case_status_update")
    @ApiImplicitParams({
            @ApiImplicitParam(value = "处理状态(0误报 1上报 2立案 3派遣 4处置 5核查 6结案7处理中8暂不处理)",name = "state")
            @ApiImplicitParam(value = "处理状态(0误报 1上报 2立案 3派遣 4处置 5核查 6结案7处理中8暂不处理)", name = "state")
    })
    public CommonResult updateCaseStatus(@RequestParam Integer caseId, @RequestParam Integer state) {
        return CommonResult.success(baseCaseService
@@ -253,8 +251,8 @@
    @ApiOperation(value = "结案")
    @PutMapping("/end_case")
    public  CommonResult endCase(@RequestParam Integer caseId,@RequestParam String result){
        baseCaseService.endCase(caseId,result);
    public CommonResult endCase(@RequestParam Integer caseId, @RequestParam String result) {
        baseCaseService.endCase(caseId, result);
        return CommonResult.success("end case success~!");
    }
}
}