| | |
| | | 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.secure.BladeUser; |
| | | 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.dto.PlaceCheckDTO; |
| | |
| | | public class PlaceCheckController{ |
| | | |
| | | private final IPlaceCheckService placeCheckService; |
| | | private final BladeLogger bladeLogger; |
| | | |
| | | /** |
| | | * 场所检查表 详情 |
| | |
| | | */ |
| | | @GetMapping("/page") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiLog("场所检查表 自定义分页") |
| | | @ApiOperation(value = "分页", notes = "传入placeCheck") |
| | | public R<IPage<PlaceCheckVO>> page(PlaceCheckVO placeCheck, Query query) { |
| | | bladeLogger.info("场所检查表 自定义分页", JsonUtil.toJson(placeCheck)); |
| | | IPage<PlaceCheckVO> pages = placeCheckService.selectPlaceCheckPage(Condition.getPage(query), placeCheck); |
| | | return R.data(pages); |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/saveTwo") |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiLog("场所检查表 新增") |
| | | @ApiOperation(value = "新增", notes = "传入placeCheck") |
| | | public R saveTwo(@Valid @RequestBody PlaceCheckVO placeCheck) throws Exception { |
| | | bladeLogger.info("场所检查表 新增", JsonUtil.toJson(placeCheck)); |
| | | return R.status(placeCheckService.savePlace(placeCheck)); |
| | | } |
| | | |
| | |
| | | * 场所检查表 删除 |
| | | */ |
| | | @PostMapping("/remove") |
| | | @ApiLog("场所检查表 删除") |
| | | @ApiOperationSupport(order = 7) |
| | | @ApiOperation(value = "逻辑删除", notes = "传入ids") |
| | | public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
| | | bladeLogger.info("场所检查表 删除", JsonUtil.toJson(ids)); |
| | | return R.status(placeCheckService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | |
| | | * @param placeCheck |
| | | */ |
| | | @GetMapping("export-placeCheck") |
| | | @ApiLog("导出场所检查信息") |
| | | @ApiOperationSupport(order = 8) |
| | | @ApiOperation(value = "导出场所检查", notes = "传入placeCheck") |
| | | public void exportPlaceCheck(PlaceCheckVO placeCheck, HttpServletResponse response) { |
| | | bladeLogger.info("导出场所检查信息", JsonUtil.toJson(placeCheck)); |
| | | List<PlaceCheckExcel> list = placeCheckService.exportPlaceCheck(placeCheck); |
| | | ExcelUtil.export(response, "场所检查" + DateUtil.time(), "场所检查记录表", list, PlaceCheckExcel.class); |
| | | } |