| | |
| | | |
| | | |
| | | import com.alibaba.druid.util.StringUtils; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ycl.api.CommonResult; |
| | | import com.ycl.controller.BaseController; |
| | |
| | | import com.ycl.dto.casePool.ViolationParam; |
| | | import com.ycl.entity.caseHandler.BaseCase; |
| | | import com.ycl.service.caseHandler.IBaseCaseService; |
| | | import com.ycl.service.caseHandler.IDisposeRecordService; |
| | | import com.ycl.service.caseHandler.IIllegalBuildingService; |
| | | import com.ycl.service.caseHandler.IViolationsService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import com.ycl.vo.casePool.CasePoolIllegalBuildingVO; |
| | | import com.ycl.vo.casePool.CasePoolViolationVO; |
| | | import io.swagger.annotations.*; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | |
| | | |
| | | @Autowired |
| | | IIllegalBuildingService illegalBuildingService; |
| | | |
| | | @Autowired |
| | | IDisposeRecordService iDisposeRecordService; |
| | | |
| | | |
| | | @Autowired |
| | | public void setBaseCaseService(IBaseCaseService baseCaseService) { |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "type", value = "01 违规,02 违建", dataType = "Integer") |
| | | }) |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "成功", response = CasePoolViolationVO.class), |
| | | @ApiResponse(code = 200, message = "成功", response = CasePoolIllegalBuildingVO.class), |
| | | }) |
| | | public CommonResult removeCase(@RequestParam Integer id, @RequestParam Integer type) { |
| | | Integer violationType = 01; |
| | | Integer illegalBuildingType = 02; |
| | |
| | | * @Param [violationParam] |
| | | **/ |
| | | @ApiOperation(value = "添加违建案件") |
| | | @PostMapping("/addition_violation") |
| | | @PostMapping("/addition_illegal_building") |
| | | public CommonResult addIllegalBuildingCase(@RequestBody @Validated IllegalBuildingParam illegalBuildingParam) { |
| | | BaseCase baseCase = new BaseCase(); |
| | | BeanUtils.copyProperties(illegalBuildingParam, baseCase); |
| | | baseCaseService.save(baseCase); |
| | | return CommonResult.success(baseCaseService.saveIllegalBuildingCase(illegalBuildingParam, baseCase.getId())); |
| | | } |
| | | |
| | | @ApiOperation(value = "案件详情") |
| | | @GetMapping("/baseCaseDetail/{code}") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "code", value = "事件编号") |
| | | }) |
| | | public CommonResult baseCaseDetail(@PathVariable(value = "code") String code) { |
| | | return CommonResult.success(baseCaseService.baseCaseDetail(code)); |
| | | } |
| | | |
| | | @ApiOperation("人工路径案件图片展示") |
| | | @GetMapping("/hand_work_case_images") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "type", value = "01 违规,02 违建", dataType = "Integer") |
| | | }) |
| | | public CommonResult queryCaseImages(@RequestParam Integer id, @RequestParam Integer type) { |
| | | return CommonResult.success(baseCaseService.listCaseImages(id, type)); |
| | | } |
| | | |
| | | @ApiOperation("案件暂不处理") |
| | | @PutMapping("/case_leave") |
| | | public CommonResult updateCaseStatus(@RequestParam Integer caseId) { |
| | | Integer leaveType = 8; |
| | | return CommonResult.success(baseCaseService |
| | | .update(new LambdaUpdateWrapper<BaseCase>() |
| | | .eq(BaseCase::getId, caseId) |
| | | .set(BaseCase::getState, leaveType))); |
| | | } |
| | | } |