| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.sxkj.fw.area.dto.FwAreaDivideDTO; |
| | | import org.sxkj.fw.area.dto.FwAreaDivideStatisticsDTO; |
| | | import org.sxkj.fw.area.entity.FwAreaDivideEntity; |
| | | import org.sxkj.fw.area.vo.FwAreaDivideVO; |
| | | import org.sxkj.fw.area.vo.FwAreaDivideStatisticsVO; |
| | | import org.sxkj.fw.area.excel.FwAreaDivideExcel; |
| | | import org.sxkj.fw.area.service.IFwAreaDivideService; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | |
| | | return R.data(detail); |
| | | } |
| | | /** |
| | | * 区域划分表 分页 |
| | | * 区域划分表 列表 |
| | | */ |
| | | // @GetMapping("/list") |
| | | // @ApiOperationSupport(order = 2) |
| | | // @ApiOperation(value = "分页", notes = "传入fwAreaDivide") |
| | | // public R<IPage<FwAreaDivideVO>> list(@ApiIgnore @RequestParam Map<String, Object> fwAreaDivide, Query query) { |
| | | // IPage<FwAreaDivideEntity> pages = fwAreaDivideService.page(Condition.getPage(query), Condition.getQueryWrapper(fwAreaDivide, FwAreaDivideEntity.class)); |
| | | // return R.data(FwAreaDivideWrapper.build().pageVO(pages)); |
| | | // } |
| | | @GetMapping("/list") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "列表", notes = "传入filterSelected或id") |
| | | public R<List<FwAreaDivideVO>> list( |
| | | @ApiParam(value = "是否过滤已被选择的数据(1过滤 0不过滤)") @RequestParam(required = false) Integer filterSelected, |
| | | @ApiParam(value = "场景id") @RequestParam(required = false) Long id) { |
| | | List<FwAreaDivideVO> list = fwAreaDivideService.selectFwAreaDivideList(filterSelected, id); |
| | | return R.data(list); |
| | | } |
| | | |
| | | /** |
| | | * 区域划分表 自定义分页 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 区域划分统计 分页 |
| | | */ |
| | | @GetMapping("/divideStatisticsPage") |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "统计分页", notes = "传入统计条件") |
| | | public R<IPage<FwAreaDivideStatisticsVO>> divideStatisticsPage(FwAreaDivideStatisticsDTO fwAreaDivideStatistics, Query query) { |
| | | IPage<FwAreaDivideStatisticsVO> pages = fwAreaDivideService.selectFwAreaDivideStatisticsPage(Condition.getPage(query), fwAreaDivideStatistics); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 区域划分统计 详情 |
| | | */ |
| | | @GetMapping("/statisticsDetail") |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "统计详情", notes = "传入id") |
| | | public R<FwAreaDivideStatisticsVO> statisticsDetail(FwAreaDivideStatisticsDTO fwAreaDivideStatistics) { |
| | | if (fwAreaDivideStatistics == null || fwAreaDivideStatistics.getId() == null) { |
| | | return R.fail("主键不能为空"); |
| | | } |
| | | FwAreaDivideStatisticsVO detail = fwAreaDivideService.selectFwAreaDivideStatisticsDetail(fwAreaDivideStatistics); |
| | | if (detail == null) { |
| | | return R.fail("数据不存在"); |
| | | } |
| | | return R.data(detail); |
| | | } |
| | | |
| | | /** |
| | | * 区域划分表 新增 |
| | | */ |
| | | // @PostMapping("/save") |