| | |
| | | import io.swagger.annotations.ApiParam; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import lombok.AllArgsConstructor; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | |
| | | import org.springblade.core.excel.util.ExcelUtil; |
| | | 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.utils.BeanUtil; |
| | | import org.springblade.core.tool.utils.DateUtil; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.modules.place.excel.PlaceCheckExcel; |
| | | import org.springblade.modules.place.vo.PlaceCheckVO; |
| | | import org.springblade.modules.taskPlaceSelfCheck.dto.TaskPlaceSelfCheckDTO; |
| | | import org.springblade.modules.taskPlaceSelfCheck.excel.TaskPlaceSelfCheckExcel; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.taskPlaceSelfCheck.entity.TaskPlaceSelfCheckEntity; |
| | |
| | | import org.springblade.modules.taskPlaceSelfCheck.wrapper.TaskPlaceSelfCheckWrapper; |
| | | import org.springblade.modules.taskPlaceSelfCheck.service.ITaskPlaceSelfCheckService; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 消防自查记任务表 控制器 |
| | |
| | | */ |
| | | @ApiOperation("获取消防自查记任务表详细信息") |
| | | @GetMapping(value = "/getInfo") |
| | | public R<TaskPlaceSelfCheckVO> getInfo(@RequestParam("id") Long id){ |
| | | TaskPlaceSelfCheckDTO taskPlaceSelfCheckDTO = taskPlaceSelfCheckService.selectTaskPlaceSelfCheckById(id); |
| | | public R<TaskPlaceSelfCheckVO> getInfo(TaskPlaceSelfCheckEntity taskPlaceSelfCheck){ |
| | | TaskPlaceSelfCheckDTO taskPlaceSelfCheckDTO = taskPlaceSelfCheckService.selectTaskPlaceSelfCheckById(taskPlaceSelfCheck); |
| | | TaskPlaceSelfCheckVO taskPlaceSelfCheckDetailVO = BeanUtil.copy(taskPlaceSelfCheckDTO, TaskPlaceSelfCheckVO.class); |
| | | return R.data(taskPlaceSelfCheckDetailVO); |
| | | } |
| | |
| | | return R.status(taskPlaceSelfCheckService.removeBatchByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | | /** |
| | | * 消防自查记任务表 修改 |
| | | */ |
| | | @PostMapping("/updateTaskPlaceSelfCheck") |
| | | @ApiOperationSupport(order = 8) |
| | | @ApiOperation(value = "更新自查详情接口", notes = "传入taskPlaceSelfCheck") |
| | | public R updateTaskPlaceSelfCheck(@Valid @RequestBody TaskPlaceSelfCheckVO taskPlaceSelfCheck) throws Exception { |
| | | return R.status(taskPlaceSelfCheckService.updateTaskPlaceSelfCheck(taskPlaceSelfCheck)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 导出消防自查信息 |
| | | * @param taskPlaceSelfCheck |
| | | */ |
| | | @GetMapping("export-taskPlaceSelfCheck") |
| | | @ApiOperationSupport(order = 9) |
| | | @ApiOperation(value = "导出消防自查", notes = "传入taskPlaceSelfCheck") |
| | | public void exportTaskPlaceSelfCheck(TaskPlaceSelfCheckVO taskPlaceSelfCheck, HttpServletResponse response) { |
| | | List<TaskPlaceSelfCheckExcel> list = taskPlaceSelfCheckService.exportTaskPlaceSelfCheck(taskPlaceSelfCheck); |
| | | ExcelUtil.export(response, "消防自查" + DateUtil.time(), "消防自查记录表", list, TaskPlaceSelfCheckExcel.class); |
| | | } |
| | | |
| | | |
| | | } |