| | |
| | | import com.ruoyi.common.utils.file.FileUploadUtils; |
| | | import com.ruoyi.common.utils.file.FileUtils; |
| | | import com.ruoyi.domain.ArchiveCategory; |
| | | import com.ruoyi.domain.ArchiveRecords; |
| | | import com.ruoyi.domain.DocumentMaterials; |
| | | import com.ruoyi.domain.vo.DocumentMaterialFileSmallVo; |
| | | import com.ruoyi.framework.config.ServerConfig; |
| | |
| | | @Autowired |
| | | private IDocumentMaterialsService documentMaterialsService; |
| | | |
| | | |
| | | /** |
| | | * 判断PageNumber是否连续 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:materials:list')") |
| | | @GetMapping("/isPageNubLegal/{recordId}") |
| | | public AjaxResult judgePageLegal(@PathVariable("recordId") Integer recordId) |
| | | { |
| | | |
| | | boolean res = documentMaterialsService.isPageNumberIslegal(recordId); |
| | | return AjaxResult.success(res); |
| | | } |
| | | /** |
| | | * 查询【文件材料综合信息】列表 |
| | | */ |
| | |
| | | @GetMapping("/list") |
| | | public AjaxResult list(DocumentMaterials documentMaterials) |
| | | { |
| | | |
| | | Integer pageNum = Convert.toInt(ServletUtils.getParameter(PAGE_NUM), 1); |
| | | Integer pageSize = Convert.toInt(ServletUtils.getParameter(PAGE_SIZE), 10); |
| | | return documentMaterialsService.selectDataList(documentMaterials, pageNum, pageSize); |
| | |
| | | @PreAuthorize("@ss.hasPermi('system:materials:export')") |
| | | @Log(title = "【文件材料综合信息】", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, DocumentMaterials documentMaterials) |
| | | public void export(HttpServletResponse response, DocumentMaterials documentMaterials, @RequestParam(value = "ids", required = false) Long[] ids) |
| | | { |
| | | List<DocumentMaterials> list = documentMaterialsService.selectDocumentMaterialsList(documentMaterials); |
| | | List<DocumentMaterials> list; |
| | | System.out.println(ids); |
| | | // 如果提供了ids参数,则根据ids导出指定记录 |
| | | if (ids != null && ids.length > 0) { |
| | | list = documentMaterialsService.selectDocumentMaterialsByIds(ids); |
| | | } else { |
| | | list = documentMaterialsService.selectDocumentMaterialsList(documentMaterials); |
| | | |
| | | } |
| | | ExcelUtil<DocumentMaterials> util = new ExcelUtil<DocumentMaterials>(DocumentMaterials.class); |
| | | util.exportExcel(response, list, "【文件材料综合信息】数据"); |
| | | } |