| | |
| | | |
| | | |
| | | import com.alibaba.druid.util.StringUtils; |
| | | 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.api.CommonResult; |
| | |
| | | import com.ycl.dto.casePool.IllegalBuildingParam; |
| | | import com.ycl.dto.casePool.ViolationParam; |
| | | import com.ycl.entity.caseHandler.BaseCase; |
| | | import com.ycl.entity.caseHandler.DisposeRecord; |
| | | import com.ycl.service.caseHandler.IBaseCaseService; |
| | | import com.ycl.service.caseHandler.IDisposeRecordService; |
| | | import com.ycl.service.caseHandler.IIllegalBuildingService; |
| | |
| | | * @since 2022-09-24 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/base-case") |
| | | @RequestMapping("/base_case") |
| | | @Api(tags = "案件池") |
| | | public class BaseCaseController extends BaseController { |
| | | |
| | |
| | | return CommonResult.success(baseCaseService.baseCaseDetail(code)); |
| | | } |
| | | |
| | | @ApiOperation("人工路径案件图片展示") |
| | | @ApiOperation(value = "人工路径案件图片展示") |
| | | @GetMapping("/hand_work_case_images") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "type", value = "01 违规,02 违建", dataType = "Integer") |
| | |
| | | return CommonResult.success(baseCaseService.listCaseImages(id, type)); |
| | | } |
| | | |
| | | @ApiOperation("案件暂不处理") |
| | | @PutMapping("/case_leave") |
| | | public CommonResult updateCaseStatus(@RequestParam Integer caseId) { |
| | | Integer leaveType = 8; |
| | | /** |
| | | * @return com.ycl.api.CommonResult |
| | | * @Description case status update |
| | | * @Param [caseId, status] |
| | | **/ |
| | | @ApiOperation(value = "案件状态修改") |
| | | @PutMapping("/case_status_update") |
| | | @ApiImplicitParams({ |
| | | @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 |
| | | .update(new LambdaUpdateWrapper<BaseCase>() |
| | | .eq(BaseCase::getId, caseId) |
| | | .set(BaseCase::getState, leaveType))); |
| | | .set(BaseCase::getState, state))); |
| | | } |
| | | |
| | | /** |
| | | * @return com.ycl.api.CommonResult |
| | | * @Description reset case |
| | | * @Param [caseId] |
| | | **/ |
| | | @ApiOperation(value = "暂不处置重新处置") |
| | | @PutMapping("/reset") |
| | | public CommonResult resetCase(@RequestParam Integer caseId) { |
| | | Integer firstNum = 0; |
| | | Integer state = iDisposeRecordService |
| | | .list(new LambdaQueryWrapper<DisposeRecord>() |
| | | .eq(DisposeRecord::getBaseCaseId, caseId). |
| | | orderByDesc(DisposeRecord::getCreateTime)).get(firstNum).getState(); |
| | | return CommonResult.success(baseCaseService |
| | | .update(new LambdaUpdateWrapper<BaseCase>() |
| | | .eq(BaseCase::getId, caseId) |
| | | .set(BaseCase::getState, state))); |
| | | } |
| | | |
| | | @ApiOperation(value = "结案") |
| | | @PutMapping("/end_case") |
| | | public CommonResult endCase(@RequestParam Integer caseId,@RequestParam String result){ |
| | | baseCaseService.endCase(caseId,result); |
| | | return CommonResult.success("end case success~!"); |
| | | } |
| | | } |