From 98c1eca55c66749ee91bd35f3301bf3ff76bee08 Mon Sep 17 00:00:00 2001 From: heheng <475597332@qq.com> Date: 星期四, 06 三月 2025 08:36:02 +0800 Subject: [PATCH] 表格结构 --- hazmat-system/src/main/resources/mapper/system/HzWarehouseRecordMapper.xml | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/hazmat-system/src/main/resources/mapper/system/HzWarehouseRecordMapper.xml b/hazmat-system/src/main/resources/mapper/system/HzWarehouseRecordMapper.xml index 1d375c5..03788da 100644 --- a/hazmat-system/src/main/resources/mapper/system/HzWarehouseRecordMapper.xml +++ b/hazmat-system/src/main/resources/mapper/system/HzWarehouseRecordMapper.xml @@ -5,6 +5,7 @@ <result property="id" column="id" /> <result property="basicId" column="basic_id" /> <result property="warehouseId" column="warehouse_id" /> + <result property="cupboardId" column="cupboard_id" /> <result property="remaining" column="remaining" /> <result property="num" column="num" /> <result property="state" column="state" /> @@ -19,6 +20,7 @@ <result property="createName" column="create_name" /> <association property="hazmatBasic" javaType="com.gkhy.hazmat.system.domain.HzHazmatBasic" resultMap="hazmatBasicResult" /> <association property="warehouse" javaType="com.gkhy.hazmat.system.domain.HzWarehouse" resultMap="wareResult" /> + <association property="cupboard" javaType="com.gkhy.hazmat.system.domain.HzWarehouseCupboard" resultMap="cupboardResult"/> </resultMap> <resultMap id="hazmatBasicResult" type="com.gkhy.hazmat.system.domain.HzHazmatBasic"> @@ -40,14 +42,20 @@ <result property="name" column="warehouse_name" /> </resultMap> + <resultMap id="cupboardResult" type="com.gkhy.hazmat.system.domain.HzWarehouseCupboard"> + <id property="id" column="cupboard_id"/> + <result property="cupboardName" column="cupboard_name"/> + </resultMap> + <sql id="selectWarehouseRecordVo"> select a.id, a.basic_id, a.warehouse_id,a.remaining,a.num,a.state,a.company_id,a.create_id,a.version, a.create_by, a.create_time, a.update_by, a.update_time, a.remark, b.id as hazmat_id,b.name as hazmat_name,b.cas as hazmat_cas,b.hazmat_type ,b.hazmat_character,b.supplier as hazmat_supplier,b.manufacturer as hazmat_manufacturer, b.hazmat_format,b.metering as hazmat_metering,b.unit as hazmat_unit,b.product_sn as hazmat_product_sn, - c.id as warehouse_id,c.name as warehouse_name,d.name as create_name + c.id as warehouse_id,c.name as warehouse_name,e.id as cupboard_id,e.cupboard_name,d.name as create_name from hz_warehouse_record a left join hz_hazmat_basic b on b.id=a.basic_id left join hz_warehouse c on c.id=a.warehouse_id + left join hz_warehouse_cupboard e on e.id = a.cupboard_id left join sys_user d on d.id =a.create_id </sql> -- Gitblit v1.9.2