| | |
| | | import static com.ruoyi.common.core.page.TableSupport.PAGE_SIZE; |
| | | |
| | | /** |
| | | * 【请填写功能名称】Controller |
| | | * 【文件材料综合信息】Controller |
| | | * |
| | | * @author ruoyi |
| | | * @date 2025-07-28 |
| | |
| | | private IDocumentMaterialsService documentMaterialsService; |
| | | |
| | | /** |
| | | * 查询【请填写功能名称】列表 |
| | | * 查询【文件材料综合信息】列表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:materials:list')") |
| | | @GetMapping("/list") |
| | |
| | | } |
| | | |
| | | /** |
| | | * 导出【请填写功能名称】列表 |
| | | * 导出【文件材料综合信息】列表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:materials:export')") |
| | | @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) |
| | | @Log(title = "【文件材料综合信息】", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, DocumentMaterials documentMaterials) |
| | | { |
| | | List<DocumentMaterials> list = documentMaterialsService.selectDocumentMaterialsList(documentMaterials); |
| | | ExcelUtil<DocumentMaterials> util = new ExcelUtil<DocumentMaterials>(DocumentMaterials.class); |
| | | util.exportExcel(response, list, "【请填写功能名称】数据"); |
| | | util.exportExcel(response, list, "【文件材料综合信息】数据"); |
| | | } |
| | | |
| | | /** |
| | | * 获取【请填写功能名称】详细信息 |
| | | * 获取【文件材料综合信息】详细信息 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:materials:query')") |
| | | @GetMapping(value = "/{materialId}") |
| | |
| | | } |
| | | |
| | | /** |
| | | * 新增【请填写功能名称】 |
| | | * 新增【文件材料综合信息】 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:materials:add')") |
| | | @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) |
| | | @Log(title = "【文件材料综合信息】", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody DocumentMaterials documentMaterials) |
| | | { |
| | |
| | | } |
| | | |
| | | /** |
| | | * 修改【请填写功能名称】 |
| | | * 修改【文件材料综合信息】 |
| | | * |
| | | * system:materials:edit |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:materials:edit')") |
| | | @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) |
| | | @Log(title = "【文件材料综合信息】", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody DocumentMaterials documentMaterials) |
| | | { |
| | |
| | | } |
| | | |
| | | /** |
| | | * 删除【请填写功能名称】 |
| | | * 删除【文件材料综合信息】 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:materials:remove')") |
| | | @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) |
| | | @Log(title = "【文件材料综合信息】", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{materialIds}") |
| | | public AjaxResult remove(@PathVariable String[] materialIds) |
| | | { |
| | |
| | | } |
| | | |
| | | @PostMapping("/upload") |
| | | public AjaxResult uploadFile(MultipartFile file) throws Exception |
| | | public AjaxResult uploadFile(MultipartFile file, Long recordId) throws Exception |
| | | { |
| | | // System.out.println("sdfd9999999999999999999999999999999"); |
| | | try |
| | |
| | | //计算sizeType |
| | | String sizeType = getPageSize(wid*hei); |
| | | //插入数据库对应的url当中 |
| | | documentMaterialsService.updateByPageNumber(nam, sizeType, fileNumber,wid, hei,wdpi, hdpi, sz, fileName, pname); |
| | | documentMaterialsService.updateByPageNumber(nam, sizeType, fileNumber,wid, hei,wdpi, hdpi, sz, fileName, pname, recordId); |
| | | // System.out.println(url); |
| | | // System.out.println(fileName); |
| | | ajax.put("fileName", fileName); |