From b8f2c19b869986efa519f1846b63b11378147861 Mon Sep 17 00:00:00 2001
From: zrj <646384940@qq.com>
Date: Tue, 05 Nov 2024 22:11:27 +0800
Subject: [PATCH] 增加空间数据和基础接口及shp导入导出
---
src/main/java/org/springblade/modules/yw/mapper/EmergencySuppliesMapper.xml | 39 +++++++++++++++++++++++++++++++++------
1 files changed, 33 insertions(+), 6 deletions(-)
diff --git a/src/main/java/org/springblade/modules/yw/mapper/EmergencySuppliesMapper.xml b/src/main/java/org/springblade/modules/yw/mapper/EmergencySuppliesMapper.xml
index 27c5679..78f3fa4 100644
--- a/src/main/java/org/springblade/modules/yw/mapper/EmergencySuppliesMapper.xml
+++ b/src/main/java/org/springblade/modules/yw/mapper/EmergencySuppliesMapper.xml
@@ -6,14 +6,12 @@
<resultMap id="emergencySuppliesResultMap" type="org.springblade.modules.yw.entity.EmergencySuppliesEntity">
<result column="id" property="id"/>
<result column="name" property="name"/>
- <result column="number" property="number"/>
+ <result column="num" property="num"/>
<result column="unit" property="unit"/>
- <result column="address" property="address"/>
+ <result column="sto_loc" property="stoLoc"/>
<result column="supplies_id" property="suppliesId"/>
<result column="remark" property="remark"/>
<result column="firm_id" property="firmId"/>
- <result column="person_in_cha" property="personInCha"/>
- <result column="person_in_cha_phone" property="personInChaPhone"/>
<result column="create_user" property="createUser"/>
<result column="create_time" property="createTime"/>
<result column="update_user" property="updateUser"/>
@@ -22,8 +20,37 @@
</resultMap>
<!--自定义分页查询-->
- <select id="selectEmergencySuppliesPage" resultMap="emergencySuppliesResultMap">
- select * from yw_emergency_supplies where is_deleted = 0
+ <select id="selectEmergencySuppliesPage" resultType="org.springblade.modules.yw.vo.EmergencySuppliesVO">
+ select
+ yes.*,
+ yfi.name as firmName,
+ ys.per_in_cha as personInCha,ys.per_in_cha_pho as personInChaPhone,
+ bdb.dict_value as emeSupType,
+ concat(yes.num,bdb1.dict_value) as numUnit
+ from
+ yw_emergency_supplies yes
+ left join yw_supplies ys on ys.id = yes.supplies_id and ys.is_deleted = 0
+ left join yw_firm_info yfi on yfi.id = yes.firm_id and yfi.is_deleted = 0
+ left join blade_dict_biz bdb on bdb.dict_key = yes.type and bdb.code = 'eme_sup_type'
+ left join blade_dict_biz bdb1 on bdb1.dict_key = yes.unit and bdb1.code = 'unit'
+ where yes.is_deleted = 0
+ <if test="emergencySupplies.name!=null and emergencySupplies.name!=''">
+ and yes.name like concat('%',#{emergencySupplies.name},'%')
+ </if>
+ <if test="emergencySupplies.firmId!=null">
+ and yes.firm_id = #{emergencySupplies.firmId}
+ </if>
+ <if test="emergencySupplies.type!=null">
+ and yes.type = #{emergencySupplies.type}
+ </if>
+ <if test="emergencySupplies.ownership!=null">
+ <if test="emergencySupplies.ownership==1">
+ and yes.firm_id is null
+ </if>
+ <if test="emergencySupplies.ownership==2">
+ and yes.firm_id is not null
+ </if>
+ </if>
</select>
</mapper>
--
Gitblit v1.9.3