From 5d91a329768a2a86e01e4b9b6bc6a2b939b87adb Mon Sep 17 00:00:00 2001
From: fei <791364011@qq.com>
Date: 星期五, 16 一月 2026 22:48:51 +0800
Subject: [PATCH] 修改了对应代码

---
 archiveManager/src/main/java/com/ruoyi/service/impl/ArchiveRecordsServiceImpl.java |   53 +++++++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 43 insertions(+), 10 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 b423bbc..62fdbef 100644
--- a/archiveManager/src/main/java/com/ruoyi/service/impl/ArchiveRecordsServiceImpl.java
+++ b/archiveManager/src/main/java/com/ruoyi/service/impl/ArchiveRecordsServiceImpl.java
@@ -96,11 +96,12 @@
         if (StringUtils.isEmpty(categoryNumberStart) || StringUtils.isEmpty(categoryNumberEnd)) {
             lqw.like(!StringUtils.isEmpty(archiveRecords.getRecordId()), ArchiveRecords::getRecordId, archiveRecords.getRecordId());
         }
-        else {
+     //  else {
                 lqw.
             like(!StringUtils.isEmpty(archiveRecords.getInquiryNumber()), ArchiveRecords::getInquiryNumber, archiveRecords.getInquiryNumber())
                     .like(!StringUtils.isEmpty(archiveRecords.getCaseTitle()), ArchiveRecords::getCaseTitle, archiveRecords.getCaseTitle())
-                    .like(!StringUtils.isEmpty(archiveRecords.getPublicAttribute()), ArchiveRecords::getPublicAttribute, archiveRecords.getPublicAttribute())
+
+                        .like(!StringUtils.isEmpty(archiveRecords.getPublicAttribute()), ArchiveRecords::getPublicAttribute, archiveRecords.getPublicAttribute())
                     .like(!StringUtils.isEmpty(archiveRecords.getPreparationUnit()), ArchiveRecords::getPreparationUnit, archiveRecords.getPreparationUnit())
                     .like(!StringUtils.isEmpty(archiveRecords.getRetentionPeriod()), ArchiveRecords::getRetentionPeriod, archiveRecords.getRetentionPeriod())
                     .like(!StringUtils.isEmpty(archiveRecords.getSecurityClassification()), ArchiveRecords::getSecurityClassification, archiveRecords.getSecurityClassification())
@@ -117,7 +118,7 @@
                     .like(!StringUtils.isEmpty(archiveRecords.getEveryProjectName()), ArchiveRecords::getEveryProjectName, archiveRecords.getEveryProjectName())
                     .like(!StringUtils.isEmpty(archiveRecords.getRemarks()), ArchiveRecords::getRemarks, archiveRecords.getRemarks());
 
-        }
+      //  }
 
         if(archiveRecords.getIds()!=null)
                 lqw.in(ArchiveRecords::getId,new ArrayList<>(Arrays.asList(archiveRecords.getIds())));
@@ -133,9 +134,27 @@
 //                .eq(zfProperty.getHappenTime()!=null,ZfProperty::getHappenTime,zfProperty.getHappenTime())
 //                .between(zfProperty.getHappenStartTime() != null && zfProperty.getHappenEndTime() != null, ZfProperty::getHappenTime, zfProperty.getHappenStartTime(), zfProperty.getHappenEndTime());
 //        lqw.orderByDesc(ZfProperty::getCreateTime);
-        if(userId==1)
+        if(archiveRecords.getOrderByColumn()==null) {
+            if (userId == 1)
 
-            lqw.orderByDesc(ArchiveRecords::getCreateTime);
+                lqw.orderByDesc(ArchiveRecords::getCreateTime);
+        }else
+        {
+            System.out.println(archiveRecords.getOrderByColumn());
+            if("recordId".equals(archiveRecords.getOrderByColumn())) {
+                if (archiveRecords.getIsAsc().equals("asc"))
+                    lqw.orderByAsc(ArchiveRecords::getRecordId);
+                else
+                    lqw.orderByDesc(ArchiveRecords::getRecordId);
+            }
+            if("recordStatus".equals(archiveRecords.getOrderByColumn()))
+            {
+                if (archiveRecords.getIsAsc().equals("asc"))
+                    lqw.orderByAsc(ArchiveRecords::getRecordStatus);
+                else
+                    lqw.orderByDesc(ArchiveRecords::getRecordStatus);
+            }
+        }
        // else
        //     lqw.eq(userId!=null, ArchiveRecords::getUserId, userId);
         System.out.println("ssssssssssssddd0000000000000000");
@@ -369,8 +388,16 @@
         for (ArchiveRecords archiveRecords : dataList) {
            // physcialService.mySave(physcial);
             archiveRecords.setRecordStatus("鏈綍鍏�");
+            System.out.println(archiveRecords.getProjectName());
             LocalDateTime time = LocalDateTime.now();
-
+            String title = "";
+            if(archiveRecords.getConstructionUnit()!=null)
+                title = title +archiveRecords.getConstructionUnit();
+            if(archiveRecords.getConstructionAddress()!=null)
+                title = title + archiveRecords.getConstructionAddress();
+            if(archiveRecords.getProjectName()!=null)
+                title = title + archiveRecords.getProjectName();
+            archiveRecords.setCaseTitle(title);
             Date date = Date.from(time.atZone(ZoneId.systemDefault()).toInstant());
             archiveRecords.setCreateTime(date);
             this.mySave(archiveRecords);
@@ -385,20 +412,26 @@
     }
 
     @Override
-    public int updateArchiveById(String status, Long id) {
+    public int updateArchiveById(String status, Long id, String operator) {
+        LocalDateTime time = LocalDateTime.now();
 
+        Date date = Date.from(time.atZone(ZoneId.systemDefault()).toInstant());
         // 鑾峰彇褰撳墠鐢ㄦ埛ID
         Long userId = SecurityUtils.getUserId();
         // 鍙互鍦ㄨ繖閲屼娇鐢╱serId杩涜鎺堟潈鎿嶄綔
-        archiverecordstouserService.deleteArchiverecordstouserByRecordId(id, userId);
-        this.baseMapper.updateStatusById(status, id);
+        if(operator.equals("閫�鍥炵鐞嗗憳")||status.equals("褰曞叆瀹屾垚"))
+            archiverecordstouserService.deleteArchiverecordstouserByRecordId(id, userId);
+        this.baseMapper.updateStatusById(status, id, date);
         return 0;
     }
 
     @Override
     public int updateStatusByIds(Long[] ids) {
+        LocalDateTime time = LocalDateTime.now();
+
+        Date date = Date.from(time.atZone(ZoneId.systemDefault()).toInstant());
         for(Long id : ids)
-            this.baseMapper.updateStatusById("褰曞叆瀹屾垚",id);
+            this.baseMapper.updateStatusById("褰曞叆瀹屾垚",id, date);
         return 0;
     }
 

--
Gitblit v1.9.1