| | |
| | | import javax.validation.Valid; |
| | | |
| | | import org.springblade.core.excel.util.ExcelUtil; |
| | | import org.springblade.core.log.annotation.ApiLog; |
| | | import org.springblade.core.log.logger.BladeLogger; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.jackson.JsonUtil; |
| | | import org.springblade.core.tool.utils.DateUtil; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.modules.place.excel.*; |
| | |
| | | public class PlaceController extends BladeController{ |
| | | |
| | | private final IPlaceService placeService; |
| | | private final BladeLogger bladeLogger; |
| | | |
| | | /** |
| | | * 场所表 详情 |
| | |
| | | /** |
| | | * 场所表 自定义分页 |
| | | */ |
| | | @ApiLog("场所列表查询") |
| | | @GetMapping("/page") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "分页page", notes = "传入place") |
| | | public R<IPage<PlaceVO>> page(PlaceVO place, Query query) { |
| | | bladeLogger.info("blade-place_page", JsonUtil.toJson(place)); |
| | | IPage<PlaceVO> pages = placeService.selectPlacePage(Condition.getPage(query), place); |
| | | return R.data(pages); |
| | | } |
| | |
| | | /** |
| | | * 九小场所档案 |
| | | */ |
| | | @ApiLog("九小场所档案列表查询") |
| | | @GetMapping("/ninePage") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "九小场所档案", notes = "传入place") |
| | | public R<IPage<PlaceVO>> ninePage(PlaceVO place, Query query) { |
| | | bladeLogger.info("blade-place_ninePage", JsonUtil.toJson(place)); |
| | | IPage<PlaceVO> pages = placeService.selectNinePlacePage(Condition.getPage(query), place); |
| | | return R.data(pages); |
| | | } |
| | |
| | | /** |
| | | * 企业商超列表查询 |
| | | */ |
| | | @ApiLog("企业商超列表查询") |
| | | @GetMapping("/mallPage") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "企业商超列表查询", notes = "传入place") |
| | | public R<IPage<PlaceVO>> mallPage(PlaceVO place, Query query) { |
| | | bladeLogger.info("blade-place_mallPage", JsonUtil.toJson(place)); |
| | | IPage<PlaceVO> pages = placeService.selectMallPage(Condition.getPage(query), place); |
| | | return R.data(pages); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | @PostMapping("/add") |
| | | @ApiLog("场所自定义新增") |
| | | @ApiOperation(value = "自定义新增", notes = "传入place") |
| | | public R add(@RequestBody PlaceVO placeVO){ |
| | | bladeLogger.info("场所自定义新增", JsonUtil.toJson(placeVO)); |
| | | return R.status(placeService.addOrUpdate(placeVO)); |
| | | } |
| | | |
| | |
| | | * @return |
| | | */ |
| | | @PostMapping("/addOrUpdate") |
| | | @ApiLog("场所自定义新增/修改") |
| | | @ApiOperation(value = "自定义新增/修改", notes = "传入place") |
| | | public R addOrUpdate(@RequestBody PlaceVO placeVO){ |
| | | bladeLogger.info("场所自定义新增/修改", JsonUtil.toJson(placeVO)); |
| | | return R.status(placeService.addOrUpdate(placeVO)); |
| | | } |
| | | |
| | |
| | | */ |
| | | @PostMapping("/remove") |
| | | @ApiOperationSupport(order = 7) |
| | | @ApiLog("场所数据删除") |
| | | @ApiOperation(value = "逻辑删除", notes = "传入ids") |
| | | public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
| | | bladeLogger.info("场所数据删除", JsonUtil.toJson(ids)); |
| | | List<Long> longs = Func.toLongList(ids); |
| | | // 返回 |
| | | return R.status(placeService.removePlace(longs)); |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/getDetail") |
| | | @ApiLog("场所表 自定义详情查询") |
| | | @ApiOperation(value = "场所表 自定义详情查询", notes = "传入ids") |
| | | public R<PlaceVO> getDetail(PlaceVO place) { |
| | | bladeLogger.info("场所表 自定义详情查询", JsonUtil.toJson(place)); |
| | | return R.data(placeService.getDetail(place)); |
| | | } |
| | | |
| | |
| | | */ |
| | | @GetMapping("exportNineType") |
| | | @ApiOperationSupport(order = 13) |
| | | @ApiLog("导出九小统计") |
| | | @ApiOperation(value = "导出九小统计", notes = "传入place") |
| | | public void exportNineType(PlaceVO place, HttpServletResponse response) { |
| | | List<NinePlaceExcel> list = placeService.export(place); |