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/resources/mapper/warehouse/DocumentationMapper.xml | 87 +++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 87 insertions(+), 0 deletions(-) diff --git a/src/main/resources/mapper/warehouse/DocumentationMapper.xml b/src/main/resources/mapper/warehouse/DocumentationMapper.xml new file mode 100644 index 0000000..91f17a9 --- /dev/null +++ b/src/main/resources/mapper/warehouse/DocumentationMapper.xml @@ -0,0 +1,87 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE mapper + PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> +<mapper namespace="com.ruoyi.warehouse.mapper.DocumentationMapper"> + + <select id="listPage" resultType="com.ruoyi.warehouse.dto.DocumentationDto"> + SELECT + doc.*, + dc.category, + CONCAT( + w.warehouse_name, '-', + wgs.name, '-', + wgsr.row, '灞�-', + wgsr.col, '鍒�' + ) AS location_info -- 鍚堝苟鍚庣殑瀛楁鍚� + FROM documentation doc + LEFT JOIN document_classification dc ON doc.document_classification_id = dc.id + LEFT JOIN warehouse_goods_shelves_rowcol wgsr ON wgsr.id = doc.warehouse_goods_shelves_rowcol_id + LEFT JOIN warehouse_goods_shelves wgs ON wgs.id = wgsr.warehouse_goods_shelves_id + LEFT JOIN warehouse w ON w.id = wgs.warehouse_id + where 1=1 + <if test="documentation.documentClassificationId != null"> + and doc.document_classification_id = #{documentation.documentClassificationId} + </if> + <if test="documentation.docName != null"> + and doc.doc_name = #{documentation.docName} + </if> + <if test="documentation.docNumber != null"> + and doc.doc_number = #{documentation.docNumber} + </if> + <if test="documentation.id != null"> + and doc.id = #{documentation.id} + </if> + </select> + <select id="listByDocumentClassificationId" resultType="com.ruoyi.warehouse.dto.DocumentationDto"> + SELECT + doc.*, + dc.category, + CONCAT( + w.warehouse_name, '-', + wgs.name, '-', + wgsr.row, '灞�-', + wgsr.col, '鍒�' + ) AS location_info -- 鍚堝苟鍚庣殑瀛楁鍚� + FROM documentation doc + LEFT JOIN document_classification dc ON doc.document_classification_id = dc.id + LEFT JOIN warehouse_goods_shelves_rowcol wgsr ON wgsr.id = doc.warehouse_goods_shelves_rowcol_id + LEFT JOIN warehouse_goods_shelves wgs ON wgs.id = wgsr.warehouse_goods_shelves_id + LEFT JOIN warehouse w ON w.id = wgs.warehouse_id + where doc.document_classification_id = #{documentClassificationId} + </select> + <select id="list" resultType="com.ruoyi.warehouse.dto.DocumentationDto"> + SELECT + doc.*, + dc.category, + CONCAT( + w.warehouse_name, '-', + wgs.name, '-', + wgsr.row, '灞�-', + wgsr.col, '鍒�' + ) AS location_info -- 鍚堝苟鍚庣殑瀛楁鍚� + FROM documentation doc + LEFT JOIN document_classification dc ON doc.document_classification_id = dc.id + LEFT JOIN warehouse_goods_shelves_rowcol wgsr ON wgsr.id = doc.warehouse_goods_shelves_rowcol_id + LEFT JOIN warehouse_goods_shelves wgs ON wgs.id = wgsr.warehouse_goods_shelves_id + LEFT JOIN warehouse w ON w.id = wgs.warehouse_id + </select> + <select id="listBywarehouseGoodsShelvesRowcolId" resultType="com.ruoyi.warehouse.dto.DocumentationDto"> + SELECT + doc.*, + dc.category, + CONCAT( + w.warehouse_name, '-', + wgs.name, '-', + wgsr.row, '灞�-', + wgsr.col, '鍒�' + ) AS location_info -- 鍚堝苟鍚庣殑瀛楁鍚� + FROM documentation doc + LEFT JOIN document_classification dc ON doc.document_classification_id = dc.id + LEFT JOIN warehouse_goods_shelves_rowcol wgsr ON wgsr.id = doc.warehouse_goods_shelves_rowcol_id + LEFT JOIN warehouse_goods_shelves wgs ON wgs.id = wgsr.warehouse_goods_shelves_id + LEFT JOIN warehouse w ON w.id = wgs.warehouse_id + where doc.warehouse_goods_shelves_rowcol_id = #{warehouseGoodsShelvesRowcolId} + </select> + +</mapper> -- Gitblit v1.9.3