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/mapper/DocumentMaterialsMapper.java |   24 ++++++++++++++++--------
 1 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/archiveManager/src/main/java/com/ruoyi/mapper/DocumentMaterialsMapper.java b/archiveManager/src/main/java/com/ruoyi/mapper/DocumentMaterialsMapper.java
index 6898693..a0fc494 100644
--- a/archiveManager/src/main/java/com/ruoyi/mapper/DocumentMaterialsMapper.java
+++ b/archiveManager/src/main/java/com/ruoyi/mapper/DocumentMaterialsMapper.java
@@ -10,21 +10,29 @@
 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},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}")
-    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);
+    @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(
@@ -42,7 +50,7 @@
             "            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}")
+            "and dm.record_id=#{recordId} and file_style!='鍏跺畠鏉愭枡' ")
     List<DocumentMaterialsVoLarge> getDocumentMaterialsvoLarge(@Param("recordId") int recordId);
 
     @Select("select count(*) as cnt, file_style from document_materials " +

--
Gitblit v1.9.1