From cb703ae5b5afdd4a7d614a948ee4d4c457b77185 Mon Sep 17 00:00:00 2001
From: fei <791364011@qq.com>
Date: 星期三, 21 一月 2026 09:07:42 +0800
Subject: [PATCH] 增加了签名和注解接口
---
ruoyi-admin/src/main/java/com/ruoyi/web/controller/archive/ArchiveAnnotationController.java | 56 ++++++++++++++++++++++++++++++++++++++++----------------
1 files changed, 40 insertions(+), 16 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/archive/ArchiveAnnotationController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/archive/ArchiveAnnotationController.java
index 21fca5f..02c90a7 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/archive/ArchiveAnnotationController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/archive/ArchiveAnnotationController.java
@@ -1,21 +1,18 @@
package com.ruoyi.web.controller.archive;
+import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
+import com.ruoyi.common.core.text.Convert;
+import com.ruoyi.common.utils.ServletUtils;
import com.ruoyi.domain.ArchiveAnnotation;
+import com.ruoyi.domain.ArchiveSignature;
import com.ruoyi.service.IArchiveAnnotationService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-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 com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
@@ -23,9 +20,13 @@
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
+import org.springframework.web.multipart.MultipartFile;
+
+import static com.ruoyi.common.core.page.TableSupport.PAGE_NUM;
+import static com.ruoyi.common.core.page.TableSupport.PAGE_SIZE;
/**
- * 銆愯濉啓鍔熻兘鍚嶇О銆慍ontroller
+ * 銆愭敞閲婄殑鎺ュ彛銆慍ontroller
*
* @author ruoyi
* @date 2026-01-19
@@ -42,11 +43,12 @@
*/
@PreAuthorize("@ss.hasPermi('system:annotation:list')")
@GetMapping("/list")
- public TableDataInfo list(ArchiveAnnotation archiveAnnotation)
+ public AjaxResult list(ArchiveAnnotation archiveAnnotation)
{
- startPage();
- List<ArchiveAnnotation> list = archiveAnnotationService.selectArchiveAnnotationList(archiveAnnotation);
- return getDataTable(list);
+ Integer pageNum = Convert.toInt(ServletUtils.getParameter(PAGE_NUM), 1);
+ Integer pageSize = Convert.toInt(ServletUtils.getParameter(PAGE_SIZE), 10);
+ AjaxResult list = archiveAnnotationService.selectArchiveAnnotationList(archiveAnnotation, pageNum, pageSize);
+ return list;
}
/**
@@ -55,13 +57,35 @@
@PreAuthorize("@ss.hasPermi('system:annotation:export')")
@Log(title = "銆愯濉啓鍔熻兘鍚嶇О銆�", businessType = BusinessType.EXPORT)
@PostMapping("/export")
- public void export(HttpServletResponse response, ArchiveAnnotation archiveAnnotation)
+ public void export(HttpServletResponse response, ArchiveAnnotation archiveAnnotation, @RequestParam(value = "ids", required = false) Long[] ids)
{
- List<ArchiveAnnotation> list = archiveAnnotationService.selectArchiveAnnotationList(archiveAnnotation);
+
+
+ List<ArchiveAnnotation> list = new ArrayList<>();
+ // 濡傛灉鎻愪緵浜唅ds鍙傛暟锛屽垯鏍规嵁ids瀵煎嚭鎸囧畾璁板綍
+ if (ids != null && ids.length > 0) {
+ list = archiveAnnotationService.selectArchiveRecordsByIds(ids);
+ } else {
+ // 鍚﹀垯鏍规嵁鏌ヨ鏉′欢瀵煎嚭
+ list = archiveAnnotationService.selectArchiveAnnoList(archiveAnnotation);
+ }
+
ExcelUtil<ArchiveAnnotation> util = new ExcelUtil<ArchiveAnnotation>(ArchiveAnnotation.class);
util.exportExcel(response, list, "銆愯濉啓鍔熻兘鍚嶇О銆戞暟鎹�");
}
-
+ @PreAuthorize("@ss.hasPermi('system:annotation:list')")
+ @GetMapping("/listAll")
+ public AjaxResult selectAllAnnotation(ArchiveAnnotation archiveAnnotation )
+ {
+ List<ArchiveAnnotation> list = archiveAnnotationService.selectArchiveAnnoList(archiveAnnotation);
+ return new AjaxResult(200, "",list);
+ }
+ @PreAuthorize("@ss.hasPermi('system:annotation:edit')")
+ @Log(title = "娉ㄩ噴璁板綍瀵煎叆", businessType = BusinessType.IMPORT)
+ @PostMapping("/importData")
+ public AjaxResult importData(@RequestParam("excelImport") MultipartFile file) throws Exception {
+ return archiveAnnotationService.importExcel(file);
+ }
/**
* 鑾峰彇銆愯濉啓鍔熻兘鍚嶇О銆戣缁嗕俊鎭�
*/
--
Gitblit v1.9.1