From 05683f2b2bdbdbe21cf17ad523c21ab338bd1c54 Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: 星期二, 19 七月 2022 21:49:55 +0800
Subject: [PATCH] 优化添加设备 功能
---
java110-db/src/main/resources/mapper/community/ParkingSpaceServiceDaoImplMapper.xml | 31 +++++++++++++++++++++++--------
1 files changed, 23 insertions(+), 8 deletions(-)
diff --git a/java110-db/src/main/resources/mapper/community/ParkingSpaceServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/community/ParkingSpaceServiceDaoImplMapper.xml
old mode 100644
new mode 100755
index a96bea4..05c3467
--- a/java110-db/src/main/resources/mapper/community/ParkingSpaceServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/community/ParkingSpaceServiceDaoImplMapper.xml
@@ -7,9 +7,9 @@
<!-- 淇濆瓨鍋滆溅浣嶄俊鎭� add by wuxw 2018-07-03 -->
<insert id="saveBusinessParkingSpaceInfo" parameterType="Map">
insert into business_parking_space(
- area,operate,num,ps_id,pa_id, remark,state,community_id,b_id
+ area,operate,num,ps_id,pa_id, remark,state,community_id,b_id,parking_type
) values (
- #{area},#{operate},#{num},#{psId},#{paId},#{remark},#{state},#{communityId},#{bId}
+ #{area},#{operate},#{num},#{psId},#{paId},#{remark},#{state},#{communityId},#{bId},#{parkingType}
)
</insert>
@@ -26,7 +26,7 @@
<select id="getBusinessParkingSpaceInfo" parameterType="Map" resultType="Map">
select t.area,t.operate,t.num,t.ps_id,t.ps_id
psId,t.pa_id,t.pa_id
- paId,t.remark,t.state,t.community_id,t.community_id communityId,t.b_id,t.b_id bId
+ paId,t.remark,t.state,t.community_id,t.community_id communityId,t.b_id,t.b_id bId,t.parking_type,t.parking_type parkingType
from business_parking_space t
where 1 =1
<if test="area !=null and area != ''">
@@ -58,14 +58,18 @@
<if test="bId !=null and bId != ''">
and t.b_id= #{bId}
</if>
+ <if test="parkingType !=null and parkingType != ''">
+ and t.parking_type= #{parkingType}
+ </if>
</select>
<!-- 淇濆瓨鍋滆溅浣嶄俊鎭嚦 instance琛ㄤ腑 add by wuxw 2018-07-03 -->
<insert id="saveParkingSpaceInfoInstance" parameterType="Map">
insert into parking_space(
- area,num,ps_id,pa_id,remark,status_cd,state,community_id,b_id
- ) select t.area,t.num,t.ps_id,t.pa_id,t.remark,'0',t.state,t.community_id,t.b_id from
+ area,num,ps_id,pa_id,remark,status_cd,state,community_id,b_id,parking_type
+ ) select t.area,t.num,t.ps_id,t.pa_id,t.remark,'0',t.state,t.community_id,t.b_id,t.parking_type
+ from
business_parking_space t where 1=1
<if test="area !=null and area != ''">
and t.area= #{area}
@@ -92,6 +96,9 @@
<if test="bId !=null and bId != ''">
and t.b_id= #{bId}
</if>
+ <if test="parkingType !=null and parkingType != ''">
+ and t.parking_type= #{parkingType}
+ </if>
</insert>
@@ -112,11 +119,13 @@
t.community_id communityId,
t.b_id,
t.b_id bId,
+ t.parking_type,
t.parking_type parkingType,
- td2. NAME parkingTypeName,
- td1. NAME stateName,
+ td2.NAME parkingTypeName,
+ td1.NAME stateName,
pa.num areaNum,
- pa.type_cd typeCd
+ pa.type_cd typeCd,
+ t.create_time createTime
FROM
parking_space t
LEFT JOIN t_dict td1 ON t.state = td1.status_cd
@@ -167,6 +176,12 @@
#{item}
</foreach>
</if>
+ <if test="paIds != null ">
+ and t.pa_id in
+ <foreach collection="paIds" item="item" open="(" close=")" separator=",">
+ #{item}
+ </foreach>
+ </if>
<if test="communityId !=null and communityId != ''">
and t.community_id= #{communityId}
</if>
--
Gitblit v1.8.0