From 5796389acd01da9e81469926ca836bb787a60269 Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Thu, 22 Feb 2024 15:29:50 +0800
Subject: [PATCH] 消防自查查询修改
---
src/main/java/org/springblade/modules/taskPlaceSelfCheck/mapper/TaskPlaceSelfCheckMapper.xml | 76 +++++++++++++++++++++++---------------
1 files changed, 46 insertions(+), 30 deletions(-)
diff --git a/src/main/java/org/springblade/modules/taskPlaceSelfCheck/mapper/TaskPlaceSelfCheckMapper.xml b/src/main/java/org/springblade/modules/taskPlaceSelfCheck/mapper/TaskPlaceSelfCheckMapper.xml
index ee56add..47f8555 100644
--- a/src/main/java/org/springblade/modules/taskPlaceSelfCheck/mapper/TaskPlaceSelfCheckMapper.xml
+++ b/src/main/java/org/springblade/modules/taskPlaceSelfCheck/mapper/TaskPlaceSelfCheckMapper.xml
@@ -47,8 +47,8 @@
jp.principal_phone,
jp.nine_type,
jp.is_nine,
- br.town_name,
- br.village_name,
+ br.town_name as streetName,
+ br.village_name as communityName,
bu.`name`,
jpe.legal_tel,
jpe.legal_person
@@ -60,38 +60,54 @@
LEFT JOIN blade_user bu ON bu.id = jpc.create_user and bu.is_deleted = 0
LEFT JOIN jczz_police_affairs_grid jpag on jp.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
<where>
- <if test="palce.id != null ">and jpc.id = #{palce.id}</if>
- <if test="palce.taskId != null ">and jpc.task_id = #{palce.taskId}</if>
- <if test="palce.taskName != null and palce.taskName != ''">and jpc.task_name = #{palce.taskName}</if>
- <if test="palce.placeName != null and palce.placeName != ''">and jpc.place_name = #{palce.placeName}</if>
- <if test="palce.remark != null and palce.remark != ''">and jpc.remark = #{palce.remark}</if>
- <if test="palce.updateTime != null ">and jpc.update_time = #{palce.updateTime}</if>
- <if test="palce.createTime != null ">and jpc.create_time = #{palce.createTime}</if>
- <if test="palce.houseCode != null and palce.houseCode != ''">and jpc.house_code = #{palce.houseCode}</if>
- <if test="palce.rectificationEndTime != null ">and jpc.rectification_end_time =
- #{palce.rectificationEndTime}
+ <if test="place.id != null ">and jpc.id = #{place.id}</if>
+ <if test="place.taskId != null ">and jpc.task_id = #{place.taskId}</if>
+ <if test="place.taskName != null and place.taskName != ''">and jpc.task_name = #{place.taskName}</if>
+ <if test="place.placeName != null and place.placeName != ''">
+ and jp.place_name like concat('%', #{place.placeName},'%')
</if>
- <if test="palce.rectificationCompleteTime != null ">and jpc.rectification_complete_time =
- #{palce.rectificationCompleteTime}
+ <if test="place.principal != null and place.principal != ''">
+ and jp.principal like concat('%', #{place.principal},'%')
</if>
- <if test="palce.rectificationFlag != null ">and jpc.rectification_flag = #{palce.rectificationFlag}</if>
- <if test="palce.policeStation != null and palce.policeStation != ''">and jpc.police_station =
- #{palce.policeStation}
+ <if test="place.remark != null and place.remark != ''">and jpc.remark = #{place.remark}</if>
+ <if test="place.updateTime != null ">and jpc.update_time = #{place.updateTime}</if>
+ <if test="place.createTime != null ">and jpc.create_time = #{place.createTime}</if>
+ <if test="place.houseCode != null and place.houseCode != ''">and jpc.house_code = #{place.houseCode}</if>
+ <if test="place.rectificationEndTime != null ">and jpc.rectification_end_time =
+ #{place.rectificationEndTime}
</if>
- <if test="palce.rectificationNoticeImgUrl != null and palce.rectificationNoticeImgUrl != ''">and
- jpc.rectification_notice_img_url = #{palce.rectificationNoticeImgUrl}
+ <if test="place.rectificationCompleteTime != null ">and jpc.rectification_complete_time =
+ #{place.rectificationCompleteTime}
</if>
- <if test="palce.signaturePath != null and palce.signaturePath != ''">and jpc.signature_path =
- #{palce.signaturePath}
+ <if test="place.rectificationFlag != null ">and jpc.rectification_flag = #{place.rectificationFlag}</if>
+ <if test="place.policeStation != null and place.policeStation != ''">and jpc.police_station =
+ #{place.policeStation}
</if>
- <if test="palce.createUser != null ">and jpc.create_user = #{palce.createUser}</if>
- <if test="palce.imageUrls != null and palce.imageUrls != ''">and jpc.image_urls = #{palce.imageUrls}</if>
- <if test="palce.status != null ">and jpc.status = #{palce.status}</if>
- <if test="palce.deleteFlag != null ">and jpc.delete_flag = #{palce.deleteFlag}</if>
+ <if test="place.rectificationNoticeImgUrl != null and place.rectificationNoticeImgUrl != ''">and
+ jpc.rectification_notice_img_url = #{place.rectificationNoticeImgUrl}
+ </if>
+ <if test="place.signaturePath != null and place.signaturePath != ''">and jpc.signature_path =
+ #{place.signaturePath}
+ </if>
+
+ <if test="place.streetName!=null and place.streetName!=''">
+ and br.town_name like concat('%', #{place.streetName},'%')
+ </if>
+
+ <if test="place.communityName!=null and place.communityName!=''">
+ and br.village_name like concat('%', #{place.communityName},'%')
+ </if>
+ <if test="place.gridName!=null and place.gridName!=''">
+ and jg.grid_name like concat('%', #{place.gridName},'%')
+ </if>
+ <if test="place.createUser != null ">and jpc.create_user = #{place.createUser}</if>
+ <if test="place.imageUrls != null and place.imageUrls != ''">and jpc.image_urls = #{place.imageUrls}</if>
+ <if test="place.status != null ">and jpc.status = #{place.status}</if>
+ <if test="place.deleteFlag != null ">and jpc.delete_flag = #{place.deleteFlag}</if>
<if test="isAdministrator==2">
<choose>
- <when test="palce.roleName != null and palce.roleName != ''">
- <if test="palce.roleName=='wgy'">
+ <when test="place.roleName != null and place.roleName != ''">
+ <if test="place.roleName=='wgy'">
<choose>
<when test="gridCodeList !=null and gridCodeList.size()>0">
and jp.grid_code in
@@ -104,7 +120,7 @@
</otherwise>
</choose>
</if>
- <if test="palce.roleName=='mj'">
+ <if test="place.roleName=='mj'">
<choose>
<when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
and jpag.community_code in
@@ -287,8 +303,8 @@
LEFT JOIN blade_user bu ON bu.id = jtpr.create_user
LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jtpr.house_code
<where>
- <if test="palce.id != null ">and jtpr.id = #{palce.id}</if>
- <if test="palce.taskId != null ">and jtpr.task_id = #{palce.taskId}</if>
+ <if test="place.id != null ">and jtpr.id = #{place.id}</if>
+ <if test="place.taskId != null ">and jtpr.task_id = #{place.taskId}</if>
</where>
</select>
--
Gitblit v1.9.3