| | |
| | | package com.ruoyi.manage.controller; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.read.builder.ExcelReaderBuilder; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | |
| | | |
| | |
| | | import com.deepoove.poi.data.style.*; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | private ManageDocumentListService manageDocumentListService; |
| | | |
| | | @ApiOperation(value = "分页查询文件清单") |
| | | @PostMapping("/pageManageDocumentList") |
| | | @GetMapping("/pageManageDocumentList") |
| | | public Result pageManageDocumentList(Page page,ManageDocumentList manageDocumentList) throws Exception { |
| | | return Result.success(manageDocumentListService.pageManageDocumentList(page, manageDocumentList)); |
| | | } |
| | |
| | | return Result.success(manageDocumentListService.updateById(manageDocumentList)); |
| | | } |
| | | |
| | | @ApiOperation(value = "编辑文件清单") |
| | | @PostMapping("/delManageDocumentList") |
| | | @ApiOperation(value = "删除文件清单") |
| | | @DeleteMapping("/delManageDocumentList") |
| | | public Result delManageDocumentList(Integer id) { |
| | | return Result.success(manageDocumentListService.removeById(id)); |
| | | } |
| | |
| | | @PostMapping("/exportManageDocumentList") |
| | | public Result exportManageDocumentList(MultipartFile file) { |
| | | try { |
| | | // 表头校验模板是否正确 |
| | | EasyExcel.read(file.getInputStream(), ManageDocumentList.class, new ManageDocumentListListener(manageDocumentListService)).sheet().doRead(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |