| | |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.List; |
| | | |
| | | |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "type", value = "1 违规,2 违建", dataType = "Integer") |
| | | }) |
| | | @LogSave(operationType = "事项处置管理",contain = "删除案件") |
| | | @LogSave(operationType = "事项处置管理", contain = "删除案件") |
| | | public CommonResult removeCase(@RequestParam Integer id, @RequestParam Integer type) { |
| | | Integer violationType = 1; |
| | | Integer illegalBuildingType = 2; |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "type", value = "1 违规,2 违建", dataType = "Integer") |
| | | }) |
| | | @LogSave(operationType = "事项处置管理",contain = "批量删除案件") |
| | | @LogSave(operationType = "事项处置管理", contain = "批量删除案件") |
| | | public CommonResult removeCases(@RequestParam List<Long> ids, @RequestParam Integer type) { |
| | | Integer violationType = 1; |
| | | Integer illegalBuildingType = 2; |
| | |
| | | **/ |
| | | @ApiOperation(value = "添加违规案件") |
| | | @PostMapping("/addition_violation") |
| | | @LogSave(operationType = "事项处置管理",contain = "新增违建案件") |
| | | @LogSave(operationType = "事项处置管理", contain = "新增违建案件") |
| | | public CommonResult addViolationCase(@RequestBody @Validated ViolationParam violationParam) { |
| | | Integer violation = 1; |
| | | Integer resource = 2; |
| | |
| | | baseCase.setCategory(violation); |
| | | baseCase.setCode(utilNumber.createCaseCode()); |
| | | baseCase.setState(BaseCaseStatus.PENDING); |
| | | baseCase.setAlarmTime(LocalDateTime.parse(violationParam.getAlarmTime(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); |
| | | baseCaseService.save(baseCase); |
| | | return CommonResult.success(baseCaseService.saveViolationCase(violationParam, baseCase.getId())); |
| | | } |
| | |
| | | **/ |
| | | @ApiOperation(value = "添加违建案件") |
| | | @PostMapping("/addition_illegal_building") |
| | | @LogSave(operationType = "事项处置管理",contain = "新增违规案件") |
| | | @LogSave(operationType = "事项处置管理", contain = "新增违规案件") |
| | | public CommonResult addIllegalBuildingCase(@RequestBody @Validated IllegalBuildingParam illegalBuildingParam) { |
| | | Integer illegalBuilding = 2; |
| | | Integer resource = 2; |
| | |
| | | baseCase.setEventSource(resource); |
| | | baseCase.setCode(utilNumber.createCaseCode()); |
| | | baseCase.setState(BaseCaseStatus.PENDING); |
| | | baseCase.setAlarmTime(LocalDateTime.parse(illegalBuildingParam.getAlarmTime(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); |
| | | baseCaseService.save(baseCase); |
| | | return CommonResult.success(baseCaseService.saveIllegalBuildingCase(illegalBuildingParam, baseCase.getId())); |
| | | } |
| | |
| | | |
| | | @ApiOperation(value = "结案") |
| | | @PutMapping("/end_case") |
| | | @LogSave(operationType = "事项处置管理",contain = "案件结案") |
| | | public CommonResult endCase(@RequestParam Long caseId, @RequestParam String result) { |
| | | baseCaseService.endCase(caseId, result); |
| | | @LogSave(operationType = "事项处置管理", contain = "案件结案") |
| | | public CommonResult endCase(@RequestParam Long caseId, @RequestParam String result, @RequestParam String opinion) { |
| | | baseCaseService.endCase(caseId, result, opinion); |
| | | return CommonResult.success("end case success~!"); |
| | | } |
| | | |