From b33e6f53dd537abaebad066de12474580fcc33b2 Mon Sep 17 00:00:00 2001 From: yaowanxin <3588231647@qq.com> Date: 星期四, 21 八月 2025 15:03:14 +0800 Subject: [PATCH] Merge branch 'pim_ywx' --- src/main/java/com/ruoyi/warehouse/mapper/DocumentationMapper.java | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 48 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/ruoyi/warehouse/mapper/DocumentationMapper.java b/src/main/java/com/ruoyi/warehouse/mapper/DocumentationMapper.java new file mode 100644 index 0000000..33278bf --- /dev/null +++ b/src/main/java/com/ruoyi/warehouse/mapper/DocumentationMapper.java @@ -0,0 +1,48 @@ +package com.ruoyi.warehouse.mapper; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.ruoyi.procurementrecord.dto.ProcurementRecordOutPageDto; +import com.ruoyi.warehouse.dto.DocumentationDto; +import com.ruoyi.warehouse.pojo.Documentation; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; +import java.util.Map; + +/** +* @author 86151 +* @description 閽堝琛ㄣ�恉ocumentation(鏂囨。淇℃伅琛�)銆戠殑鏁版嵁搴撴搷浣淢apper +* @createDate 2025-08-14 14:05:49 +* @Entity com.ruoyi.warehouse.pojo.Documentation +*/ +@Mapper +public interface DocumentationMapper extends BaseMapper<Documentation> { + + IPage<DocumentationDto> listPage(Page page, @Param("documentation") Documentation documentation); + List<DocumentationDto> list(); + List<DocumentationDto> listByDocumentClassificationId(@Param("documentClassificationId") Long documentClassificationId); + List<DocumentationDto> listBywarehouseGoodsShelvesRowcolId(@Param("warehouseGoodsShelvesRowcolId") Long warehouseGoodsShelvesRowcolId); + @Select("select count(*) from documentation") + Integer countTotalDocs(); + @Select("select count(distinct document_classification_id) from documentation") + Integer countCategoryNum(); + @Select("select count(*) from documentation where doc_status = '鍊熷嚭'") + Integer countBorrowedDocs(); + @Select("select count(*) from documentation where create_time >= date_format(now(), '%Y-%m-01') and create_time < date_format(now(), '%Y-%m-%d')") + Integer countMonthlyAddedDocs(); + + @Select("select dc.category, count(*) as count from documentation doc left join document_classification dc on doc.document_classification_id = dc.id group by dc.category") + List<Map<String, Object>> countCategoryDistribution(); + + @Select("select doc_status as docStatus, count(*) as count from documentation group by doc_status") + List<Map<String, Object>> countStatusDistribution(); + +} + + + + -- Gitblit v1.9.3