fei
2025-10-14 27f5356ba11e2400aac493502f1c5ba1fb47775b
ruoyi-admin/src/main/java/com/ruoyi/web/controller/archive/ArchiveRecordsController.java
@@ -1,5 +1,6 @@
package com.ruoyi.web.controller.archive;
import java.util.Collections;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
@@ -10,6 +11,9 @@
import com.ruoyi.common.utils.file.FileUtils;
import com.ruoyi.domain.ArchiveRecords;
import com.ruoyi.domain.vo.AnalysisResult;
import com.ruoyi.domain.vo.ArchiveRecordModelExp;
import com.ruoyi.domain.vo.ArchiveRecordModelOther;
import com.ruoyi.domain.vo.DocumentMaterialFileSmallVo;
import com.ruoyi.framework.config.ServerConfig;
import com.ruoyi.service.IArchiveRecordsService;
import org.springframework.security.access.prepost.PreAuthorize;
@@ -174,9 +178,34 @@
    @PreAuthorize("@ss.hasPermi('system:records:edit')")
    @Log(title = "修改状态", businessType = BusinessType.IMPORT)
    @GetMapping(value = "/updateStatusById/{id}")
    public AjaxResult updateStatusById(@PathVariable("id") String id)
    @GetMapping(value = "/updateStatusById/{status}/{id}")
    public AjaxResult updateStatusById(@PathVariable("status") String status,@PathVariable("id") String id)
    {
        return new AjaxResult(200, archiveRecordsService.updateArchiveById(Long.parseLong(id))+"");
        return new AjaxResult(200, archiveRecordsService.updateArchiveById(status, Long.parseLong(id))+"");
    }
    @PostMapping("/model")
    public void getExportModel(HttpServletResponse response){
        List<ArchiveRecordModelExp> list = Collections.singletonList(new ArchiveRecordModelExp());
        ExcelUtil<ArchiveRecordModelExp> util = new ExcelUtil<>(ArchiveRecordModelExp.class);
        util.exportExcel(response,list,"档案信息导入模板");
    }
    @PostMapping("/modelOther")
    public void getExportModelOther(HttpServletResponse response){
        List<ArchiveRecordModelOther> list = Collections.singletonList(new ArchiveRecordModelOther());
        ExcelUtil<ArchiveRecordModelOther> util = new ExcelUtil<>(ArchiveRecordModelOther.class);
        util.exportExcel(response,list,"档案信息导入模板");
    }
    @PreAuthorize("@ss.hasPermi('system:records:list')")
    @Log(title = "是否允许提交", businessType = BusinessType.IMPORT)
    @GetMapping(value = "/whether/{recordId}")
    public AjaxResult whether(@PathVariable("recordId") Long recordId)
    {
        return AjaxResult.success( archiveRecordsService.whether(recordId));
    }
}