From 0fa475dc6f9799544fda73dcbcc0cc699479906c Mon Sep 17 00:00:00 2001
From: yyy <2522236926@qq.com>
Date: 星期一, 13 十月 2025 17:23:01 +0800
Subject: [PATCH] 新增 判断录入人员是否能够提交

---
 archiveManager/src/main/java/com/ruoyi/service/impl/ArchiveRecordsServiceImpl.java |   29 ++++++++++++++++++++++++-----
 1 files changed, 24 insertions(+), 5 deletions(-)

diff --git a/archiveManager/src/main/java/com/ruoyi/service/impl/ArchiveRecordsServiceImpl.java b/archiveManager/src/main/java/com/ruoyi/service/impl/ArchiveRecordsServiceImpl.java
index c7c3d40..b7a0777 100644
--- a/archiveManager/src/main/java/com/ruoyi/service/impl/ArchiveRecordsServiceImpl.java
+++ b/archiveManager/src/main/java/com/ruoyi/service/impl/ArchiveRecordsServiceImpl.java
@@ -20,6 +20,7 @@
 import com.ruoyi.mapper.ArchiveRecordsMapper;
 import com.ruoyi.mapper.ArchiverecordstouserMapper;
 import com.ruoyi.service.IArchiveRecordsService;
+import org.apache.ibatis.annotations.Param;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.web.multipart.MultipartFile;
@@ -282,6 +283,11 @@
 
         for (ArchiveRecords archiveRecords : dataList) {
            // physcialService.mySave(physcial);
+            archiveRecords.setRecordStatus("鏈綍鍏�");
+            LocalDateTime time = LocalDateTime.now();
+
+            Date date = Date.from(time.atZone(ZoneId.systemDefault()).toInstant());
+            archiveRecords.setCreateTime(date);
             this.mySave(archiveRecords);
         }
 
@@ -294,15 +300,15 @@
     }
 
     @Override
-    public int updateArchiveById(Long id) {
-        this.baseMapper.updateStatusById(id);
+    public int updateArchiveById(String status, Long id) {
+        this.baseMapper.updateStatusById(status, id);
         return 0;
     }
 
     @Override
     public int updateStatusByIds(Long[] ids) {
         for(Long id : ids)
-            this.baseMapper.updateStatusById(id);
+            this.baseMapper.updateStatusById("褰曞叆瀹屾垚",id);
         return 0;
     }
 
@@ -326,16 +332,29 @@
         if (list.size() > 0) {
           //  throw new RuntimeException("璇峰嬁鏂板閲嶅鏁版嵁");
             //濡傛灉鏈夐噸澶嶆暟鎹紝鍒欐牴鎹畆ecordId杩涜鏁版嵁淇敼
-            this.baseMapper.update(archiveRecords, lqw);
-            return AjaxResult.success();
+         //   if()
+
+                this.baseMapper.update(archiveRecords, lqw);
+                return AjaxResult.success();
+
+
         }
         else {
+        Long userid = SecurityUtils.getUserId();
+        if(userid==1) {
             if (save(archiveRecords)) {
                 return AjaxResult.success();
             } else {
                 return AjaxResult.error();
             }
         }
+             else
+            return AjaxResult.error("妗f鍙蜂笉瀛樺湪锛�");
+        }
 
     }
+    @Override
+    public boolean whether(@Param("recordId") Long recordId){
+        return this.baseMapper.whether(recordId);
+    }
 }

--
Gitblit v1.9.1