From 27f5356ba11e2400aac493502f1c5ba1fb47775b Mon Sep 17 00:00:00 2001
From: fei <791364011@qq.com>
Date: 星期二, 14 十月 2025 16:55:48 +0800
Subject: [PATCH] Merge branch 'master' of http://47.93.189.255:8099/r/archiveSystem
---
archiveManager/src/main/java/com/ruoyi/mapper/ArchiveRecordsMapper.java | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 49 insertions(+), 0 deletions(-)
diff --git a/archiveManager/src/main/java/com/ruoyi/mapper/ArchiveRecordsMapper.java b/archiveManager/src/main/java/com/ruoyi/mapper/ArchiveRecordsMapper.java
index 03e96eb..0f47537 100644
--- a/archiveManager/src/main/java/com/ruoyi/mapper/ArchiveRecordsMapper.java
+++ b/archiveManager/src/main/java/com/ruoyi/mapper/ArchiveRecordsMapper.java
@@ -1,9 +1,58 @@
package com.ruoyi.mapper;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+
import com.ruoyi.domain.ArchiveRecords;
+import com.ruoyi.domain.vo.AnalysisResult;
+import com.ruoyi.domain.vo.ArchiveInfoVo;
+import com.ruoyi.domain.vo.ArchiveRecordSmall;
import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+
+import java.util.List;
@Mapper
public interface ArchiveRecordsMapper extends BaseMapper<ArchiveRecords> {
+
+
+ @Select({
+ "<script>",
+ "SELECT distinct c.*,a.archive_records_id, if(a.user_id=#{userId}, TRUE, FALSE) as tst,b.user_id FROM archiverecordstouser a inner join sys_user b ON a.user_id = b.user_id right join archive_records c on c.id=a.archive_records_id ${ew.customSqlSegment} ",
+ "<if test= \"userId !=1 \">",
+ "order by tst desc",
+ "</if>",
+ "</script>"
+ })
+ Page<ArchiveRecords> selectJoinUserPage(Page<ArchiveRecords> page, @Param("userId") Long userId, @Param("ew") LambdaQueryWrapper<ArchiveRecords> queryWrapper);
+
+ @Select("select max(id) from archive_records")
+ Long findMaxId();
+
+ @Select("UPDATE `archivesys`.`archive_records` SET `inquiry_number` = '', `case_title` = NULL, `public_attribute` = NULL, `preparation_unit` = NULL, `preparation_date` = NULL, `retention_period` = NULL, `security_classification` = NULL, `page_count` = NULL, `filing_number` = NULL, `construction_unit` = NULL, `construction_address` = NULL, `project_name` = '', `project_number` = NULL, `scanning_company` = NULL, `archive_room_number` = NULL, `microfilm_number` = NULL, `remarks` = NULL, `historical_reference_number` = NULL, `record_status` = '寰呬慨鏀�', `every_project_name` = NULL WHERE `id` = #{id}")
+ Long updateAllInfoById(@Param("id") Long id);
+
+ @Select("select record_id,archive_room_number,microfilm_number,inquiry_number,case_title,preparation_date,preparation_unit,retention_period,security_classification from archive_records where id=#{id}")
+ ArchiveInfoVo findByRecordId(@Param("id") Long id);
+
+ @Select("SELECT every_project_name, count(*) as cnt, (select count(*) from archive_records as ac where ac.every_project_name=ar.every_project_name and record_status='鏈綍鍏�') as unfinished,\n" +
+ "(select count(*) from archive_records as ac where ac.every_project_name=ar.every_project_name and record_status='鏈笂浼犻檮浠�') as unwf,\n" +
+ "(select count(*) from archive_records as ac where ac.every_project_name=ar.every_project_name and record_status='寰呬慨鏀�') as dxg,\n" +
+ " (select count(*) from archive_records as ac where ac.every_project_name=ar.every_project_name and record_status='褰曞叆瀹屾垚') as finished\n" +
+ " from archive_records as ar GROUP BY every_project_name\n" +
+ " ")
+ List<AnalysisResult> statisticAyasis();
+
+
+ @Select("update archive_records set record_status=#{status} where id=#{id}")
+ public void updateStatusById(@Param("status") String status, @Param("id")Long id);
+
+ @Select("select ROW_NUMBER() OVER (ORDER BY record_id) AS num, filing_number, concat_ws(\" \", inquiry_number,record_id) as inqrid, case_title, public_attribute, (select count(*) as cnt from document_materials where record_id=ar.id) as cnt, remarks from archive_records as ar \n" +
+ "${ew.customSqlSegment}")
+ public List<ArchiveRecordSmall> selectByIds(@Param("ew") LambdaQueryWrapper<ArchiveRecords> queryWrapper);
+
+ @Select("SELECT COALESCE(SUM(IF(url IS NULL AND file_style != '鏂囧瓧鏉愭枡', 1, 0)), 0) = 0 AS result from document_materials where `record_id` = #{recordId}")
+ boolean whether(@Param("recordId") Long recordId);
}
--
Gitblit v1.9.1