From ebeecf61232967a9c21ca4aa63ccec8e269b8c0e Mon Sep 17 00:00:00 2001
From: fei <791364011@qq.com>
Date: 星期一, 29 九月 2025 09:13:58 +0800
Subject: [PATCH] Merge branch 'master' of http://47.93.189.255:8099/r/archiveSystem

---
 archiveManager/src/main/java/com/ruoyi/service/impl/ArchiveRecordsServiceImpl.java |   66 +++++++++++++++++++++++++++++++--
 1 files changed, 62 insertions(+), 4 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 94c8977..c7c3d40 100644
--- a/archiveManager/src/main/java/com/ruoyi/service/impl/ArchiveRecordsServiceImpl.java
+++ b/archiveManager/src/main/java/com/ruoyi/service/impl/ArchiveRecordsServiceImpl.java
@@ -16,6 +16,7 @@
 import com.ruoyi.domain.Archiverecordstouser;
 import com.ruoyi.domain.vo.AnalysisResult;
 import com.ruoyi.domain.vo.ArchiveInfoVo;
+import com.ruoyi.domain.vo.ArchiveRecordSmall;
 import com.ruoyi.mapper.ArchiveRecordsMapper;
 import com.ruoyi.mapper.ArchiverecordstouserMapper;
 import com.ruoyi.service.IArchiveRecordsService;
@@ -44,10 +45,35 @@
     private LambdaQueryWrapper<ArchiveRecords> buildCondition(ArchiveRecords archiveRecords, Long userId){
         LambdaQueryWrapper<ArchiveRecords> lqw = new LambdaQueryWrapper<>();
 
-        lqw.like(!StringUtils.isEmpty(archiveRecords.getProjectName()), ArchiveRecords::getProjectName, archiveRecords.getProjectName())
+        System.out.println(archiveRecords.getIds());
+
+        lqw.like(!StringUtils.isEmpty(archiveRecords.getRecordId()), ArchiveRecords::getRecordId, archiveRecords.getRecordId())
+                .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.getPreparationUnit()), ArchiveRecords::getPreparationUnit, archiveRecords.getPreparationUnit())
+                .like(!StringUtils.isEmpty(archiveRecords.getRetentionPeriod()), ArchiveRecords::getRetentionPeriod, archiveRecords.getRetentionPeriod())
+                .like(!StringUtils.isEmpty(archiveRecords.getSecurityClassification()), ArchiveRecords::getSecurityClassification, archiveRecords.getSecurityClassification())
                 .like(!StringUtils.isEmpty(archiveRecords.getFilingNumber()), ArchiveRecords::getFilingNumber, archiveRecords.getFilingNumber())
+                .like(!StringUtils.isEmpty(archiveRecords.getConstructionUnit()), ArchiveRecords::getConstructionUnit, archiveRecords.getConstructionUnit())
+                .like(!StringUtils.isEmpty(archiveRecords.getConstructionAddress()), ArchiveRecords::getConstructionAddress, archiveRecords.getConstructionAddress())
+                .like(!StringUtils.isEmpty(archiveRecords.getProjectName()), ArchiveRecords::getProjectName, archiveRecords.getProjectName())
+                .like(!StringUtils.isEmpty(archiveRecords.getProjectNumber()), ArchiveRecords::getProjectNumber, archiveRecords.getProjectNumber())
+                .like(!StringUtils.isEmpty(archiveRecords.getScanningCompany()), ArchiveRecords::getScanningCompany, archiveRecords.getScanningCompany())
                 .like(!StringUtils.isEmpty(archiveRecords.getArchiveRoomNumber()), ArchiveRecords::getArchiveRoomNumber, archiveRecords.getArchiveRoomNumber())
-                        .like(!StringUtils.isEmpty(archiveRecords.getRecordId()), ArchiveRecords::getRecordId, archiveRecords.getRecordId());
+                .like(!StringUtils.isEmpty(archiveRecords.getMicrofilmNumber()), ArchiveRecords::getMicrofilmNumber, archiveRecords.getMicrofilmNumber())
+                .like(!StringUtils.isEmpty(archiveRecords.getHistoricalReferenceNumber()), ArchiveRecords::getHistoricalReferenceNumber, archiveRecords.getHistoricalReferenceNumber())
+                .eq(!StringUtils.isEmpty(archiveRecords.getRecordStatus()), ArchiveRecords::getRecordStatus, archiveRecords.getRecordStatus())
+                .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())));
+
+
+
         //                .like(!StringUtils.isEmpty(zfProperty.getLocation()), ZfProperty::getLocation, zfProperty.getLocation())
 //                .like(!StringUtils.isEmpty(zfProperty.getHolder()), ZfProperty::getHolder, zfProperty.getHolder())
 //                .like(!StringUtils.isEmpty(zfProperty.getAddress()), ZfProperty::getAddress, zfProperty.getAddress())
@@ -170,11 +196,21 @@
 
         Date date = Date.from(time.atZone(ZoneId.systemDefault()).toInstant());
         archiveRecords.setCreateTime(date);
-
-
+        System.out.println(archiveRecords.getRecordId());
+        //鏍规嵁妗e彿鏌ヨ锛屾槸鍚﹀凡缁忔湁妗e彿锛屾湁鐨勮瘽锛屽氨涓嶈鎻掑叆
+        LambdaQueryWrapper<ArchiveRecords> lambdaQueryWrapper = new LambdaQueryWrapper<>();
+        lambdaQueryWrapper.eq(!StringUtils.isEmpty(archiveRecords.getRecordId()), ArchiveRecords::getRecordId,
+                archiveRecords.getRecordId());
+        List<ArchiveRecords> lis = list(lambdaQueryWrapper);
+        if(!lis.isEmpty())
+        {
+            return 0;
+        }
         archiveRecords.setRecordStatus("鏈綍鍏�");
       //  archiveRecords
         boolean res = this.save(archiveRecords);
+
+        //0琛ㄧず澶辫触锛�1琛ㄧず鎴愬姛
         if(res)
             return 1;
         else
@@ -257,6 +293,28 @@
         return this.baseMapper.statisticAyasis();
     }
 
+    @Override
+    public int updateArchiveById(Long id) {
+        this.baseMapper.updateStatusById(id);
+        return 0;
+    }
+
+    @Override
+    public int updateStatusByIds(Long[] ids) {
+        for(Long id : ids)
+            this.baseMapper.updateStatusById(id);
+        return 0;
+    }
+
+    @Override
+    public List<ArchiveRecordSmall> findByIds(ArchiveRecords archiveRecords) {
+
+        LambdaQueryWrapper<ArchiveRecords> lqw = new LambdaQueryWrapper<>();
+        if(archiveRecords.getIds()!=null)
+            lqw.in(ArchiveRecords::getId,new ArrayList<>(Arrays.asList(archiveRecords.getIds())));
+        return this.baseMapper.selectByIds(lqw);
+    }
+
 
     public AjaxResult mySave(ArchiveRecords archiveRecords) {
 

--
Gitblit v1.9.1