zqy
17 小时以前 cd9dfa81440b1e39aa1ae8411d1d284ee41ed9f5
archiveManager/src/main/java/com/ruoyi/mapper/DocumentMaterialsMapper.java
@@ -10,21 +10,26 @@
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
 * 【文件材料综合信息】Mapper接口
 *
 * @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(