| | |
| | | import com.ycl.dto.casePool.IllegalBuildingParam; |
| | | import com.ycl.dto.casePool.ViolationParam; |
| | | import com.ycl.entity.caseHandler.BaseCase; |
| | | import com.ycl.entity.caseHandler.BaseCaseDetail; |
| | | import com.ycl.entity.caseHandler.DisposeRecord; |
| | | import com.ycl.service.caseHandler.IBaseCaseService; |
| | | import com.ycl.service.caseHandler.IDisposeRecordService; |
| | |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.UUID; |
| | | |
| | |
| | | * @since 2022-09-24 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/base_case") |
| | | @RequestMapping("/base-case") |
| | | @Api(tags = "案件池") |
| | | public class BaseCaseController extends BaseController { |
| | | |
| | |
| | | @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()) { |
| | | CommonResult.success(baseCaseService.removeBatchByIds(ids)); |
| | | 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.failed("request parameter is null"); |
| | | } |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "code", value = "事件编号") |
| | | }) |
| | | public CommonResult baseCaseDetail(@PathVariable(value = "code") String code) { |
| | | public CommonResult<BaseCaseDetail> baseCaseDetail(@PathVariable(value = "code") String code) { |
| | | return CommonResult.success(baseCaseService.baseCaseDetail(code)); |
| | | } |
| | | |
| | |
| | | baseCaseService.endCase(caseId, result); |
| | | return CommonResult.success("end case success~!"); |
| | | } |
| | | } |
| | | } |