From 5e1e1b7799f57508521a5cfafc2ef392a3eda87b Mon Sep 17 00:00:00 2001
From: fei <791364011@qq.com>
Date: 星期五, 10 十月 2025 23:16:05 +0800
Subject: [PATCH] 修改了对应的代码
---
archiveManager/src/main/java/com/ruoyi/mapper/DocumentMaterialsMapper.java | 53 +++++++++++++++++++++++++++++++++++++++--------------
1 files changed, 39 insertions(+), 14 deletions(-)
diff --git a/archiveManager/src/main/java/com/ruoyi/mapper/DocumentMaterialsMapper.java b/archiveManager/src/main/java/com/ruoyi/mapper/DocumentMaterialsMapper.java
index ec7c9ba..518b1ff 100644
--- a/archiveManager/src/main/java/com/ruoyi/mapper/DocumentMaterialsMapper.java
+++ b/archiveManager/src/main/java/com/ruoyi/mapper/DocumentMaterialsMapper.java
@@ -2,34 +2,59 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.domain.DocumentMaterials;
+import com.ruoyi.domain.vo.DocumentMaterialFileStyle;
import com.ruoyi.domain.vo.DocumentMaterialsVo;
+import com.ruoyi.domain.vo.DocumentMaterialsVoLarge;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
-
+/**
+ * 銆愭枃浠舵潗鏂欑患鍚堜俊鎭�慚apper鎺ュ彛
+ *
+ * @author ruoyi
+ * @date 2025-07-26
+ */
@Mapper
public interface DocumentMaterialsMapper extends BaseMapper<DocumentMaterials> {
- @Select("update document_materials SET url = #{url},file_number=#{fileNumber},page_order=#{pageOrder},width=#{width},height=#{height},file_size=#{fileSize}, format=#{format} where page_number = #{pageNumber}")
- Long updateInfoByPageNumber(@Param("pageNumber") Long pageNumber,@Param("fileNumber") Long fileNumber,@Param("pageOrder") Long pageOrder,@Param("width") int width, @Param("height") int height, @Param("fileSize") Double fileSize,@Param("url") String url,@Param("format") String format);
+ @Select("update document_materials SET url = #{url},size_type=#{sizeType}, file_number=#{fileNumber},page_order=#{pageOrder},width=#{width},height=#{height},horizontal_resolution=#{horizontalResolution},vertical_resolution=#{verticalResolution},file_size=#{fileSize}, format=#{format} where page_number = #{pageNumber} and record_id=#{recordId}")
+ Long updateInfoByPageNumber(@Param("pageNumber") Long pageNumber,@Param("sizeType") String sizeType, @Param("fileNumber") Long fileNumber,@Param("pageOrder") Long pageOrder,@Param("width") int width, @Param("height") int height, @Param("horizontalResolution") int horizontalResolution, @Param("verticalResolution") int verticalResolution, @Param("fileSize") Double fileSize,@Param("url") String url,@Param("format") String format, @Param("recordId") Long recordId);
//鏍规嵁棰樺悕鎷垮埌鏈�澶х殑pageOrder
- @Select("select count(*) from document_materials where title=#{title} and page_number<#{pageNumber} and stage=#{stage}")
- Long getMaxPageOrder(@Param("title")String title,@Param("pageNumber") Long pageNumber,@Param("stage") String stage);
+ @Select("select count(*) from document_materials where title=#{title} and page_number<#{pageNumber} and stage=#{stage} and record_id=#{recordId}")
+ Long getMaxPageOrder(@Param("title")String title,@Param("pageNumber") Long pageNumber,@Param("stage") String stage, @Param("recordId") Long recordId);
//璁$畻鏂囦欢鐨勫簭鍙�
- @Select("select count(distinct(title))-1 from document_materials where page_number<=#{pageNumber}")
- Long getFileNumber(@Param("pageNumber") Long pageNumber);
+ @Select("select count(distinct(title))-1 from document_materials where page_number<=#{pageNumber} and record_id=#{recordId}")
+ Long getFileNumber(@Param("pageNumber") Long pageNumber, @Param("recordId") Long recordId);
+
+
+
//鏌ヨ鍗峰唴鐩綍
- @Select("select creator,title, date, page_number,remarks from document_materials\n" +
- "WHERE page_number IN (\n" +
- " SELECT MIN(page_number)\n" +
- " FROM document_materials where record_id=#{recordId}\n" +
- " GROUP BY stage, title\n" +
- ") order by page_number ;")
- List<DocumentMaterialsVo> getArchiveMatInfo(@Param("recordId") String recordId);
+ @Select(
+ "select ROW_NUMBER() OVER (ORDER BY page_number) AS num, document_number, creator,title, date, page_number,dm.remarks, ar.record_id, publicity from document_materials as dm, archive_records as ar \n" +
+ " WHERE ar.id = dm.record_id and page_number IN (\n" +
+ " SELECT MIN(page_number)\n" +
+ " FROM document_materials where record_id=#{recordId}\n" +
+ " GROUP BY stage, title) and ar.id =#{recordId} order by page_number ;")
+ List<DocumentMaterialsVo> getArchiveMatInfo(@Param("recordId") int recordId);
+
+
+ @Select( "select ROW_NUMBER() OVER (ORDER BY page_number) AS num,ar.record_id, file_number, \n" +
+ " document_number, creator, title, date, page_number, page_order, \n" +
+ " stage, publicity, is_attachment, dm.retention_period, security_level, is_sensitive,\n" +
+ " is_canceled, format, size_type, horizontal_resolution, vertical_resolution, width,\n" +
+ " height, file_size, attachment_history_numbers,url, dm.remarks\n" +
+ " from document_materials as dm, archive_records as ar WHERE dm.record_id=ar.id \n" +
+ "and dm.record_id=#{recordId}")
+ List<DocumentMaterialsVoLarge> getDocumentMaterialsvoLarge(@Param("recordId") int recordId);
+
+ @Select("select count(*) as cnt, file_style from document_materials " +
+ "where record_id=#{recordId} GROUP BY file_style")
+
+ List<DocumentMaterialFileStyle> getFileStyleInfo(@Param("recordId") int recordId);
}
--
Gitblit v1.9.1