| | |
| | | import com.vincent.rsf.server.common.domain.BaseParam; |
| | | import com.vincent.rsf.server.common.domain.KeyValVo; |
| | | import com.vincent.rsf.server.common.domain.PageParam; |
| | | import com.vincent.rsf.server.common.domain.PageResult; |
| | | import com.vincent.rsf.server.manager.controller.vo.BasStationOptionVo; |
| | | import com.vincent.rsf.server.manager.entity.BasStation; |
| | | import com.vincent.rsf.server.manager.enums.LocStsType; |
| | | import com.vincent.rsf.server.manager.service.BasStationService; |
| | |
| | | public R pagev22(@RequestBody Map<String, Object> map) { |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<BasStation, BaseParam> pageParam = new PageParam<>(baseParam, BasStation.class); |
| | | return R.ok().add(basStationService.page(pageParam, pageParam.buildWrapper(true))); |
| | | PageParam<BasStation, BaseParam> page = basStationService.page( |
| | | pageParam, |
| | | pageParam.buildWrapper(true).select("id", "station_name", "station_id") |
| | | ); |
| | | PageResult<BasStationOptionVo> pageResult = new PageResult<>(); |
| | | pageResult |
| | | .setTotal(page.getTotal()) |
| | | .setRecords(page.getRecords().stream().map(this::buildOptionVo).collect(Collectors.toList())); |
| | | return R.ok().add(pageResult); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:basStation:list')") |
| | |
| | | ExcelUtil.build(ExcelUtil.create(basStationService.list(), BasStation.class), response); |
| | | } |
| | | |
| | | private BasStationOptionVo buildOptionVo(BasStation station) { |
| | | BasStationOptionVo optionVo = new BasStationOptionVo(); |
| | | optionVo.setId(station.getId()); |
| | | optionVo.setStationName(station.getStationName()); |
| | | optionVo.setStationId(station.getStationId()); |
| | | return optionVo; |
| | | } |
| | | |
| | | } |