fei
2025-09-29 ebeecf61232967a9c21ca4aa63ccec8e269b8c0e
ruoyi-admin/src/main/java/com/ruoyi/web/controller/archive/DocumentMaterialsController.java
@@ -41,7 +41,7 @@
import static com.ruoyi.common.core.page.TableSupport.PAGE_SIZE;
/**
 * 【请填写功能名称】Controller
 * 【文件材料综合信息】Controller
 *
 * @author ruoyi
 * @date 2025-07-28
@@ -57,7 +57,7 @@
    private IDocumentMaterialsService documentMaterialsService;
    /**
     * 查询【请填写功能名称】列表
     * 查询【文件材料综合信息】列表
     */
    @PreAuthorize("@ss.hasPermi('system:materials:list')")
    @GetMapping("/list")
@@ -70,20 +70,20 @@
    }
    /**
     * 导出【请填写功能名称】列表
     * 导出【文件材料综合信息】列表
     */
    @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}")
@@ -93,10 +93,10 @@
    }
    /**
     * 新增【请填写功能名称】
     * 新增【文件材料综合信息】
     */
    @PreAuthorize("@ss.hasPermi('system:materials:add')")
    @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
    @Log(title = "【文件材料综合信息】", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody DocumentMaterials documentMaterials)
    {
@@ -106,12 +106,12 @@
    }
    /**
     * 修改【请填写功能名称】
     * 修改【文件材料综合信息】
     *
     * 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)
    {
@@ -119,10 +119,10 @@
    }
    /**
     * 删除【请填写功能名称】
     * 删除【文件材料综合信息】
     */
    @PreAuthorize("@ss.hasPermi('system:materials:remove')")
    @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
    @Log(title = "【文件材料综合信息】", businessType = BusinessType.DELETE)
    @DeleteMapping("/{materialIds}")
    public AjaxResult remove(@PathVariable String[] materialIds)
    {
@@ -144,7 +144,7 @@
    }
    @PostMapping("/upload")
    public AjaxResult uploadFile(MultipartFile file) throws Exception
    public AjaxResult uploadFile(MultipartFile file, Long recordId) throws Exception
    {
        // System.out.println("sdfd9999999999999999999999999999999");
        try
@@ -185,7 +185,7 @@
            //计算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);