wl
2022-10-13 0041b415eaf904ec70aeb7c4e44ea4f292e6dd20
ycl-platform/src/main/java/com/ycl/controller/caseHandler/BaseCaseController.java
@@ -5,8 +5,10 @@
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ycl.annotation.LogSave;
import com.ycl.api.CommonResult;
import com.ycl.common.constant.BaseCaseStatus;
import com.ycl.common.util.UtilNumber;
import com.ycl.controller.BaseController;
import com.ycl.dto.casePool.IllegalBuildingParam;
import com.ycl.dto.casePool.ViolationParam;
@@ -27,7 +29,6 @@
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.UUID;
/**
@@ -53,6 +54,9 @@
    @Autowired
    IDisposeRecordService iDisposeRecordService;
    @Autowired
    UtilNumber utilNumber;
    @Autowired
@@ -117,6 +121,7 @@
    @ApiImplicitParams({
            @ApiImplicitParam(name = "type", value = "1 违规,2 违建", dataType = "Integer")
    })
    @LogSave(operationType = "事项处置管理",contain = "删除案件")
    public CommonResult removeCase(@RequestParam Integer id, @RequestParam Integer type) {
        Integer violationType = 1;
        Integer illegalBuildingType = 2;
@@ -141,6 +146,7 @@
    @ApiImplicitParams({
            @ApiImplicitParam(name = "type", value = "1 违规,2 违建", dataType = "Integer")
    })
    @LogSave(operationType = "事项处置管理",contain = "批量删除案件")
    public CommonResult removeCases(@RequestParam List<Long> ids, @RequestParam Integer type) {
        Integer violationType = 1;
        Integer illegalBuildingType = 2;
@@ -162,6 +168,7 @@
     **/
    @ApiOperation(value = "添加违规案件")
    @PostMapping("/addition_violation")
    @LogSave(operationType = "事项处置管理",contain = "新增违建案件")
    public CommonResult addViolationCase(@RequestBody @Validated ViolationParam violationParam) {
        Integer violation = 1;
        Integer resource = 2;
@@ -169,7 +176,7 @@
        BeanUtils.copyProperties(violationParam, baseCase);
        baseCase.setEventSource(resource);
        baseCase.setCategory(violation);
        baseCase.setCode(UUID.randomUUID().toString());
        baseCase.setCode(utilNumber.createCaseCode());
        baseCase.setState(BaseCaseStatus.PENDING);
        baseCaseService.save(baseCase);
        return CommonResult.success(baseCaseService.saveViolationCase(violationParam, baseCase.getId()));
@@ -182,6 +189,7 @@
     **/
    @ApiOperation(value = "添加违建案件")
    @PostMapping("/addition_illegal_building")
    @LogSave(operationType = "事项处置管理",contain = "新增违规案件")
    public CommonResult addIllegalBuildingCase(@RequestBody @Validated IllegalBuildingParam illegalBuildingParam) {
        Integer illegalBuilding = 2;
        Integer resource = 2;
@@ -189,7 +197,7 @@
        BeanUtils.copyProperties(illegalBuildingParam, baseCase);
        baseCase.setCategory(illegalBuilding);
        baseCase.setEventSource(resource);
        baseCase.setCode(UUID.randomUUID().toString());
        baseCase.setCode(utilNumber.createCaseCode());
        baseCase.setState(BaseCaseStatus.PENDING);
        baseCaseService.save(baseCase);
        return CommonResult.success(baseCaseService.saveIllegalBuildingCase(illegalBuildingParam, baseCase.getId()));
@@ -238,7 +246,7 @@
    @ApiOperation(value = "暂不处置重新处置")
    @PutMapping("/reset")
    public CommonResult resetCase(@RequestParam Integer caseId) {
        Integer firstNum = 0;
        Integer firstNum = 1;
        Integer state = iDisposeRecordService
                .list(new LambdaQueryWrapper<DisposeRecord>()
                        .eq(DisposeRecord::getBaseCaseId, caseId).
@@ -251,8 +259,11 @@
    @ApiOperation(value = "结案")
    @PutMapping("/end_case")
    public CommonResult endCase(@RequestParam Integer caseId, @RequestParam String result) {
    @LogSave(operationType = "事项处置管理",contain = "案件结案")
    public CommonResult endCase(@RequestParam Long caseId, @RequestParam String result) {
        baseCaseService.endCase(caseId, result);
        return CommonResult.success("end case success~!");
    }
}