From 0fa475dc6f9799544fda73dcbcc0cc699479906c Mon Sep 17 00:00:00 2001
From: yyy <2522236926@qq.com>
Date: 星期一, 13 十月 2025 17:23:01 +0800
Subject: [PATCH] 新增 判断录入人员是否能够提交
---
ruoyi-admin/src/main/java/com/ruoyi/web/controller/archive/ArchiveRecordsController.java | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 52 insertions(+), 5 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/archive/ArchiveRecordsController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/archive/ArchiveRecordsController.java
index 7741b33..f50a90b 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/archive/ArchiveRecordsController.java
+++ b/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;
@@ -121,7 +125,17 @@
@PostMapping
public AjaxResult add(@RequestBody ArchiveRecords archiveRecords)
{
- return toAjax(archiveRecordsService.insertArchiveRecords(archiveRecords));
+ int res = archiveRecordsService.insertArchiveRecords(archiveRecords);
+ System.out.println(res);
+ if(res==0) {
+ System.out.println(res);
+
+ return new AjaxResult(0, "妗f鍙峰凡缁忓瓨鍦ㄤ簡锛�");
+ }
+ else
+ return new AjaxResult(200, "娣诲姞鎴愬姛浜嗭紒");
+
+
}
/**
@@ -134,7 +148,15 @@
{
return toAjax(archiveRecordsService.updateArchiveRecords(archiveRecords));
}
-
+ @PreAuthorize("@ss.hasPermi('system:records:edit')")
+ @Log(title = "妗f璁板綍", businessType = BusinessType.UPDATE)
+ @PostMapping(value = "/updateSByIds")
+ public AjaxResult updateStatusByIds(@RequestBody Long[] ids)
+ {
+ System.out.println(ids);
+ System.out.println("090sdfsdf");
+ return new AjaxResult(0, archiveRecordsService.updateStatusByIds(ids)+"");
+ }
/**
* 鍒犻櫎妗f璁板綍
*/
@@ -156,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,"妗f淇℃伅瀵煎叆妯℃澘");
+ }
+
+
+ @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,"妗f淇℃伅瀵煎叆妯℃澘");
+ }
+
+ @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));
}
}
--
Gitblit v1.9.1