| | |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.UUID; |
| | | |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "type", value = "1 违规,2 违建", dataType = "Integer") |
| | | }) |
| | | public CommonResult removeCases(@RequestParam Long[] ids, @RequestParam Integer type) { |
| | | public CommonResult removeCases(@RequestParam List<Long> ids, @RequestParam Integer type) { |
| | | Integer violationType = 1; |
| | | Integer illegalBuildingType = 2; |
| | | List<Long> idList = Arrays.asList(ids); |
| | | if (!idList.isEmpty()) { |
| | | if (!ids.isEmpty()) { |
| | | 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.success(baseCaseService.removeBatchByIds(ids)); |
| | | } |
| | | return CommonResult.failed("request parameter is null"); |
| | | } |
| | |
| | | baseCaseService.endCase(caseId, result); |
| | | return CommonResult.success("end case success~!"); |
| | | } |
| | | } |
| | | } |