From c50cce7ac8e4b0d1cd1d35feedfe479180ac03ae Mon Sep 17 00:00:00 2001
From: linwei <872216696@qq.com>
Date: Sat, 03 Feb 2024 16:49:41 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/main/java/org/springblade/modules/taskPlaceRectification/mapper/TaskPlaceRectificationMapper.xml | 49 +++++++++++++++++++++++++++++--------------------
1 files changed, 29 insertions(+), 20 deletions(-)
diff --git a/src/main/java/org/springblade/modules/taskPlaceRectification/mapper/TaskPlaceRectificationMapper.xml b/src/main/java/org/springblade/modules/taskPlaceRectification/mapper/TaskPlaceRectificationMapper.xml
index 87fcd62..a06ac8a 100644
--- a/src/main/java/org/springblade/modules/taskPlaceRectification/mapper/TaskPlaceRectificationMapper.xml
+++ b/src/main/java/org/springblade/modules/taskPlaceRectification/mapper/TaskPlaceRectificationMapper.xml
@@ -165,7 +165,7 @@
jtpr.signature_path,
jtpr.create_user,
jtpr.image_urls,
- bd.dept_name,
+ jpag.pcs_name deptName,
jp.id jpid,
jp.place_name,
jp.location,
@@ -186,8 +186,8 @@
LEFT JOIN blade_region br ON br.`code` = jg.community_code
LEFT JOIN jczz_place_ext jpe ON jpe.place_id = jp.id
LEFT JOIN blade_user bu ON bu.id = jtpr.create_user
- LEFT JOIN blade_dept bd ON bu.dept_id = bd.id
- LEFT JOIN jczz_doorplate_address jda on jda.address_code=jp.house_code
+ LEFT JOIN jczz_doorplate_address jda on jda.address_code=jtpr.house_code
+ LEFT JOIN jczz_police_affairs_grid jpag on jpag.community_code= jg.community_code
<where>
<if test="taskPalce.id != null ">and id = #{taskPalce.id}</if>
<if test="taskPalce.placeCheckId != null ">and place_check_id = #{taskPalce.placeCheckId}</if>
@@ -256,10 +256,8 @@
</when>
</choose>
</if>
- and jtpr.create_time=(
- SELECT MAX(create_time) FROM jczz_task_place_rectification where jtpr.house_code=house_code
- )
</where>
+ order by jtpr.create_time desc
</select>
@@ -303,12 +301,13 @@
bd.dict_value,
(
SELECT
- IFNULL(sum( jpc.hidden_danger_number ) ,0)
+ count(jpr.id)
FROM
- jczz_place_check jpc
+ jczz_patrol_record jpr
+ LEFT JOIN jczz_place_check jpc ON jpr.place_check_id = jpc.id
LEFT JOIN jczz_place jp ON jpc.house_code = jp.house_code
LEFT JOIN jczz_grid jg ON jg.grid_code = jp.grid_code
- left join blade_region br on br.code = jg.community_code
+ LEFT JOIN blade_region br ON br.CODE = jg.community_code
<where>
<if test="isAdministrator==2">
<choose>
@@ -320,18 +319,15 @@
</when>
</choose>
</if>
+ and jpr.state = '0'
and jp.nine_type = bd.dict_key
and br.town_code =#{code}
- and jpc.create_time=(
- SELECT MAX(create_time) FROM jczz_place_check where jpc.house_code=house_code
-
<if test="taskPlaceRectification.startTime!=null and taskPlaceRectification.startTime!=''">
and create_time>=#{taskPlaceRectification.startTime}
</if>
<if test="taskPlaceRectification.endTime!=null and taskPlaceRectification.endTime!=''">
and create_time<=#{taskPlaceRectification.endTime}
</if>
- )
</where>
) number
FROM
@@ -343,8 +339,23 @@
order by bd.sort asc
</select>
+
+ <resultMap type="org.springblade.modules.taskPlaceRectification.excel.TaskPlaceRectificationExcel"
+ id="TaskPlaceRectificationExcelResult">
+ <result property="placeName" column="place_name"/>
+ <result property="createTime" column="create_time"/>
+ <result property="rectificationNoticeFlag" column="rectification_notice_flag"/>
+ <result property="rectificationEndTime" column="rectification_end_time"/>
+ <result property="rectificationFlag" column="rectification_flag"/>
+
+ <collection property="patrolRecordVOList" column="place_check_id" select="selectPatrolRecordList"
+ javaType="java.util.List" ofType="org.springblade.modules.patrol.vo.PatrolRecordVO"
+ autoMapping="true">
+ </collection>
+ </resultMap>
+
<select id="export"
- resultType="org.springblade.modules.taskPlaceRectification.excel.TaskPlaceRectificationExcel">
+ resultMap="TaskPlaceRectificationExcelResult">
SELECT
jtpr.id,
@@ -366,7 +377,7 @@
jtpr.signature_path,
jtpr.create_user,
jtpr.image_urls,
- bd.dept_name,
+ jpag.pcs_name deptName,
jp.id jpid,
jp.place_name,
jp.location,
@@ -387,8 +398,8 @@
LEFT JOIN blade_region br ON br.`code` = jg.community_code
LEFT JOIN jczz_place_ext jpe ON jpe.place_id = jp.id
LEFT JOIN blade_user bu ON bu.id = jtpr.create_user
- LEFT JOIN blade_dept bd ON bu.dept_id = bd.id
- LEFT JOIN jczz_doorplate_address jda on jda.address_code=jp.house_code
+ LEFT JOIN jczz_doorplate_address jda on jda.address_code=jtpr.house_code
+ LEFT JOIN jczz_police_affairs_grid jpag on jpag.community_code= jg.community_code
<where>
<if test="taskPalce.id != null ">and id = #{taskPalce.id}</if>
<if test="taskPalce.placeCheckId != null ">and place_check_id = #{taskPalce.placeCheckId}</if>
@@ -457,9 +468,7 @@
</when>
</choose>
</if>
- and jtpr.create_time=(
- SELECT MAX(create_time) FROM jczz_task_place_rectification where jtpr.house_code=house_code
- )
+
</where>
--
Gitblit v1.9.3