From 9d5128803ebebb5788f13924a5775ac16494dfef Mon Sep 17 00:00:00 2001 From: yaowanxin <3588231647@qq.com> Date: 星期一, 18 八月 2025 10:05:05 +0800 Subject: [PATCH] 仓库,树,文档,借出修改 --- src/main/resources/mapper/warehouse/WarehouseMapper.xml | 83 +++++++++++++++++++++++++++++++++++++++++ 1 files changed, 82 insertions(+), 1 deletions(-) diff --git a/src/main/resources/mapper/warehouse/WarehouseMapper.xml b/src/main/resources/mapper/warehouse/WarehouseMapper.xml index 0ac5918..8f7affe 100644 --- a/src/main/resources/mapper/warehouse/WarehouseMapper.xml +++ b/src/main/resources/mapper/warehouse/WarehouseMapper.xml @@ -4,8 +4,89 @@ "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.ruoyi.warehouse.mapper.WarehouseMapper"> +<!-- <!– 瀹氫箟 WarehouseDto 鐨� resultMap锛堜紭鍖栧悗锛� –>--> +<!-- <resultMap id="WarehouseDtoResultMap" type="com.ruoyi.warehouse.dto.WarehouseDto">--> +<!-- <!– 鏄犲皠 Warehouse 鐖剁被鐨勫瓧娈碉紙浠撳簱涓昏〃淇℃伅锛� –>--> +<!-- <id property="id" column="w_id"/> <!– 鏄庣‘鍒悕锛岄伩鍏嶄笌瀛愯〃id鍐茬獊 –>--> +<!-- <result property="warehouseName" column="warehouse_name"/>--> +<!-- <!– 鍏朵粬鐖剁被瀛楁鎸夐渶娣诲姞锛屽缓璁粺涓�鍔犺〃鍒悕鍓嶇紑 –>--> - <select id="listPage" resultType="com.ruoyi.warehouse.pojo.Warehouse"> +<!-- <!– 绉婚櫎 WarehouseDto 涓殑 goodsShelvesName 瀛楁鏄犲皠--> +<!-- 鍘熷洜锛氳瀛楁灞炰簬瀛愯〃 warehouse_goods_shelves锛屽簲閫氳繃宓屽闆嗗悎鑾峰彇锛岄伩鍏嶆暟鎹涔� –>--> + +<!-- <!– 鏄犲皠 WarehouseDto 鑷韩鐨勫垎绫诲瓧娈碉紙鑻ヤ笟鍔¢渶瑕佸叧鑱旀枃妗e垎绫伙級 –>--> +<!-- <result property="category" column="category"/>--> + +<!-- <!– 鏄犲皠宓屽闆嗗悎锛氫粨搴�-璐ф灦锛堜竴瀵瑰锛� –>--> +<!-- <collection property="warehouseGoodsShelvesList" ofType="com.ruoyi.warehouse.dto.WarehouseGoodsShelvesDto">--> +<!-- <id property="id" column="wgs_id"/> <!– 璐ф灦琛ㄤ富閿紝鍞竴鏍囪瘑 –>--> +<!-- <result property="goodsShelvesName" column="goods_shelves_name"/>--> +<!-- <result property="warehouseId" column="w_id"/> <!– 鍏宠仈浠撳簱鐨勫閿紝渚夸簬鍙嶅悜杩芥函 –>--> +<!-- <!– 鍏朵粬璐ф灦瀛楁鎸夐渶娣诲姞锛堝鍒涘缓鏃堕棿銆佺姸鎬佺瓑锛� –>--> + +<!-- <!– 鏄犲皠宓屽闆嗗悎锛氳揣鏋�-琛屽垪锛堜竴瀵瑰锛� –>--> +<!-- <collection property="warehouseGoodsShelvesRowcolList" ofType="com.ruoyi.warehouse.dto.WarehouseGoodsShelvesRowcolDto">--> +<!-- <id property="id" column="wgsr_id"/> <!– 琛屽垪琛ㄨ嚜韬富閿紝淇鍘熷閿埆鍚嶅鑷寸殑姝т箟 –>--> +<!-- <result property="storey" column="storey"/>--> +<!-- <result property="arrange" column="arrange"/>--> +<!-- <result property="warehouseGoodsShelvesId" column="wgs_id"/> <!– 鍏宠仈璐ф灦鐨勫閿� –>--> +<!-- <!– 鍏朵粬琛屽垪瀛楁鎸夐渶娣诲姞锛堝瀹归噺銆佺姸鎬佺瓑锛� –>--> +<!-- </collection>--> +<!-- </collection>--> +<!-- </resultMap>--> + +<!-- <select id="findList" resultMap="WarehouseDtoResultMap">--> +<!-- SELECT--> +<!-- w.id AS w_id, -- 浠撳簱琛╥d鍔犲埆鍚嶏紝閬垮厤涓庡瓙琛╥d鍐茬獊--> +<!-- w.warehouse_name,--> +<!-- wgs.id AS wgs_id, -- 璐ф灦琛╥d鍔犲埆鍚�--> +<!-- wgs.goods_shelves_name,--> +<!-- wgsr.id AS wgsr_id, -- 琛屽垪琛╥d鍔犲埆鍚嶏紙淇鍘熷閿埆鍚嶏紝鏄庣‘涓轰富閿級--> +<!-- wgsr.storey,--> +<!-- wgsr.arrange,--> +<!-- dc.category--> +<!-- FROM warehouse_goods_shelves_rowcol wgsr--> +<!-- LEFT JOIN warehouse_goods_shelves wgs ON wgs.id = wgsr.warehouse_goods_shelves_id--> +<!-- LEFT JOIN warehouse w ON w.id = wgs.warehouse_id--> +<!-- -- 鍏宠仈鏂囨。琛ㄥ拰鍒嗙被琛ㄦ椂锛岃嫢鏃犻渶鏂囨。璇︽儏锛屽缓璁敤 EXISTS 浼樺寲锛岄伩鍏嶉噸澶嶆暟鎹�--> +<!-- LEFT JOIN documentation doc ON doc.warehouse_goods_shelves_rowcol_id = wgsr.id--> +<!-- LEFT JOIN document_classification dc ON doc.document_classification_id = dc.id--> +<!-- <where>--> +<!-- <!– 绉婚櫎 1=1锛孧yBatis鐨剋here鏍囩浼氳嚜鍔ㄥ鐞嗛涓狝ND –>--> +<!-- <if test="warehouse.warehouseName != null and warehouse.warehouseName != ''">--> +<!-- AND w.warehouse_name LIKE CONCAT('%', #{warehouse.warehouseName}, '%')--> +<!-- </if>--> +<!-- <if test="warehouse.id != null">--> +<!-- AND w.id = #{warehouse.id}--> +<!-- </if>--> +<!-- </where>--> +<!-- -- 鍒嗙粍鍘婚噸锛氶伩鍏嶅洜澶氳〃杩炴帴瀵艰嚧鐨勯噸澶嶆暟鎹紙鏍稿績浼樺寲鐐癸級--> +<!-- GROUP BY w.id, wgs.id, wgsr.id--> +<!-- </select>--> + + <select id="findList" resultType="com.ruoyi.warehouse.dto.WarehouseDto"> + SELECT + wgsr.*, + w.warehouse_name, + wgs.goods_shelves_name, + doc.doc_name, + dc.category + FROM warehouse_goods_shelves_rowcol wgsr + LEFT JOIN warehouse_goods_shelves wgs ON wgs.id = wgsr.warehouse_goods_shelves_id + LEFT JOIN warehouse w ON w.id = wgs.warehouse_id + LEFT JOIN documentation doc ON doc.warehouse_goods_shelves_rowcol_id = wgsr.id + LEFT JOIN document_classification dc ON doc.document_classification_id = dc.id + <where> + 1=1 + <if test="warehouse.warehouseName != null"> + and w.warehouse_name like concat('%',#{warehouse.warehouseName},'%') + </if> + <if test="warehouse.id != null"> + and w.id = #{warehouse.id} + </if> + </where> + </select> + <select id="listAll" resultType="com.ruoyi.warehouse.pojo.Warehouse"> select * from warehouse <where> 1=1 -- Gitblit v1.9.3