From 98222128889b7943d02bfa6a9bd09782cb2bfbcb Mon Sep 17 00:00:00 2001
From: lin <sbla5888@163.com>
Date: Thu, 21 Mar 2024 11:24:32 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/main/java/org/springblade/modules/task/mapper/TaskLabelReportingEventMapper.java            |    7 +
 src/main/java/org/springblade/modules/task/service/impl/TaskLabelReportingEventServiceImpl.java |   10 ++
 src/main/java/org/springblade/modules/task/controller/TaskLabelReportingEventController.java    |   16 ++
 src/main/java/org/springblade/modules/task/mapper/TaskLabelReportingEventMapper.xml             |   22 ++++
 src/main/java/org/springblade/modules/task/mapper/TaskMapper.xml                                |  184 ++++++++++++++++++------------------
 src/main/java/org/springblade/modules/task/service/ITaskLabelReportingEventService.java         |    7 +
 6 files changed, 153 insertions(+), 93 deletions(-)

diff --git a/src/main/java/org/springblade/modules/task/controller/TaskLabelReportingEventController.java b/src/main/java/org/springblade/modules/task/controller/TaskLabelReportingEventController.java
index e75b3bd..7fc3e08 100644
--- a/src/main/java/org/springblade/modules/task/controller/TaskLabelReportingEventController.java
+++ b/src/main/java/org/springblade/modules/task/controller/TaskLabelReportingEventController.java
@@ -63,9 +63,9 @@
 	@GetMapping("/detail")
 	@ApiOperationSupport(order = 1)
 	@ApiOperation(value = "详情", notes = "传入taskLabelReportingEvent")
-	public R<TaskLabelReportingEventVO> detail(TaskLabelReportingEventEntity taskLabelReportingEvent) {
+	public R detail(TaskLabelReportingEventEntity taskLabelReportingEvent) {
 		TaskLabelReportingEventEntity detail = taskLabelReportingEventService.getOne(Condition.getQueryWrapper(taskLabelReportingEvent));
-		return R.data(TaskLabelReportingEventWrapper.build(). entityVO(detail));
+		return R.data(detail);
 	}
 	/**
 	 * 打金店报事 分页
@@ -141,4 +141,16 @@
 		ExcelUtil.export(response, "交易登记" + DateUtil.time(), "交易登记表", list, TaskLabelReportingEventExcel.class);
 	}
 
+
+	/**
+	 * 二手交易报事 详情
+	 */
+	@GetMapping("/getDetail")
+	@ApiOperationSupport(order = 9)
+	@ApiOperation(value = "详情", notes = "传入taskLabelReportingEvent")
+	public R getDetail(TaskLabelReportingEventVO taskLabelReportingEvent) {
+		TaskLabelReportingEventVO detail = taskLabelReportingEventService.getDetail(taskLabelReportingEvent);
+		return R.data(detail);
+	}
+
 }
diff --git a/src/main/java/org/springblade/modules/task/mapper/TaskLabelReportingEventMapper.java b/src/main/java/org/springblade/modules/task/mapper/TaskLabelReportingEventMapper.java
index 4fef9e4..feb1566 100644
--- a/src/main/java/org/springblade/modules/task/mapper/TaskLabelReportingEventMapper.java
+++ b/src/main/java/org/springblade/modules/task/mapper/TaskLabelReportingEventMapper.java
@@ -76,4 +76,11 @@
 																		 @Param("regionChildCodesList") List<String> regionChildCodesList,
 																		 @Param("isAdministrator") Integer isAdministrator,
 																		 @Param("gridCodeList") List<String> gridCodeList);
+
+	/**
+	 * 二手交易报事 自定义详情
+	 * @param taskLabelReportingEvent
+	 * @return
+	 */
+    TaskLabelReportingEventVO getDetail(@Param("taskLabelReportingEvent") TaskLabelReportingEventVO taskLabelReportingEvent);
 }
diff --git a/src/main/java/org/springblade/modules/task/mapper/TaskLabelReportingEventMapper.xml b/src/main/java/org/springblade/modules/task/mapper/TaskLabelReportingEventMapper.xml
index b18aad5..57dd84f 100644
--- a/src/main/java/org/springblade/modules/task/mapper/TaskLabelReportingEventMapper.xml
+++ b/src/main/java/org/springblade/modules/task/mapper/TaskLabelReportingEventMapper.xml
@@ -370,5 +370,27 @@
         order by jtlre.create_time desc,jtlre.id desc
     </select>
 
+    <!--二手交易自定义分页查询-->
+    <select id="getDetail" resultType="org.springblade.modules.task.vo.TaskLabelReportingEventVO">
+        select
+        jtlre.*,
+        jp.place_name,
+        jp.principal,
+        jp.principal_phone,
+        jp.nine_type ,
+        jp.front_type ,
+        jp.location
+        from
+        jczz_task_label_reporting_event jtlre
+        LEFT JOIN jczz_place jp ON jtlre.place_id=jp.id and jp.is_deleted = 0
+        where jtlre.is_deleted = 0
+        <if test="taskLabelReportingEvent.id != null">
+            AND jtlre.id = #{taskLabelReportingEvent.id}
+        </if>
+        <if test="taskLabelReportingEvent.taskId != null">
+            AND jtlre.task_id = #{taskLabelReportingEvent.taskId}
+        </if>
+    </select>
+
 
 </mapper>
diff --git a/src/main/java/org/springblade/modules/task/mapper/TaskMapper.xml b/src/main/java/org/springblade/modules/task/mapper/TaskMapper.xml
index 7ff58ae..ebd4d81 100644
--- a/src/main/java/org/springblade/modules/task/mapper/TaskMapper.xml
+++ b/src/main/java/org/springblade/modules/task/mapper/TaskMapper.xml
@@ -53,59 +53,59 @@
         LEFT JOIN blade_region br on br.code = jg.community_code
         LEFT JOIN jczz_police_affairs_grid jpag on jp.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
         <where>
-            <if test="task.roleName != null and task.roleName != ''">
-                <if test="task.roleName=='wgy'">
-                    <if test="isAdministrator==2">
-                        <choose>
-                            <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
-                                and jp.grid_code in
-                                <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
-                                    #{code}
-                                </foreach>
-                            </when>
-                            <otherwise>
-                                and jp.grid_code in ('')
-                            </otherwise>
-                        </choose>
-                    </if>
-                </if>
-                <if test="task.roleName=='mj'">
-                    <if test="isAdministrator==2">
-                        <choose>
-                            <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
-                                and jpag.community_code in
-                                <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
-                                    #{code}
-                                </foreach>
-                            </when>
-                            <otherwise>
-                                and jpag.community_code in ('')
-                            </otherwise>
-                        </choose>
-                    </if>
-                </if>
-            </if>
             <if test="isAdministrator==2">
                 <choose>
-                    <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
-                        and
-                        (
-                        jg.grid_code in
-                        <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
-                            #{code}
-                        </foreach>
-                        or
-                        br.village_code in
-                        <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
-                            #{code}
-                        </foreach>
-                        )
+                    <when test="task.roleName != null and task.roleName != ''">
+                        <if test="task.roleName=='wgy'">
+                            <choose>
+                                <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
+                                    and jh.grid_code in
+                                    <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
+                                        #{code}
+                                    </foreach>
+                                </when>
+                                <otherwise>
+                                    and jh.grid_code in ('')
+                                </otherwise>
+                            </choose>
+                        </if>
+                        <if test="task.roleName=='mj' and isAdministrator==2">
+                            <choose>
+                                <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
+                                    and br.village_code in
+                                    <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
+                                        #{code}
+                                    </foreach>
+                                </when>
+                                <otherwise>
+                                    and br.village_code in ('')
+                                </otherwise>
+                            </choose>
+                        </if>
                     </when>
                     <otherwise>
-                        and
-                        (
-                        jg.grid_code in ('') or br.village_code in ('')
-                        )
+                        <choose>
+                            <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
+                                and
+                                (
+                                jg.grid_code in
+                                <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
+                                    #{code}
+                                </foreach>
+                                or
+                                br.village_code in
+                                <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
+                                    #{code}
+                                </foreach>
+                                )
+                            </when>
+                            <otherwise>
+                                and
+                                (
+                                jg.grid_code in ('') or br.village_code in ('')
+                                )
+                            </otherwise>
+                        </choose>
                     </otherwise>
                 </choose>
             </if>
@@ -194,57 +194,59 @@
         LEFT JOIN blade_region br on br.code = jg.community_code
         LEFT JOIN jczz_task_bail_reporting_event jtbre on jtbre.task_id = jt.id
         <where>
-            <if test="task.roleName != null and task.roleName != ''">
-                <if test="task.roleName=='wgy'">
-                    <if test="isAdministrator==2">
+            <if test="isAdministrator==2">
+                <choose>
+                    <when test="task.roleName != null and task.roleName != ''">
+                        <if test="task.roleName=='wgy'">
+                            <choose>
+                                <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
+                                    and jh.grid_code in
+                                    <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
+                                        #{code}
+                                    </foreach>
+                                </when>
+                                <otherwise>
+                                    and jh.grid_code in ('')
+                                </otherwise>
+                            </choose>
+                        </if>
+                        <if test="task.roleName=='mj' and isAdministrator==2">
+                            <choose>
+                                <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
+                                    and br.village_code in
+                                    <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
+                                        #{code}
+                                    </foreach>
+                                </when>
+                                <otherwise>
+                                    and br.village_code in ('')
+                                </otherwise>
+                            </choose>
+                        </if>
+                    </when>
+                    <otherwise>
                         <choose>
                             <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
-                                and jh.grid_code in
+                                and
+                                (
+                                jg.grid_code in
                                 <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
                                     #{code}
                                 </foreach>
+                                or
+                                br.village_code in
+                                <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
+                                    #{code}
+                                </foreach>
+                                )
                             </when>
                             <otherwise>
-                                and jh.grid_code in ('')
+                                and
+                                (
+                                jg.grid_code in ('') or br.village_code in ('')
+                                )
                             </otherwise>
                         </choose>
-                    </if>
-                </if>
-                <if test="task.roleName=='mj' and isAdministrator==2">
-                    <choose>
-                        <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
-                            and br.village_code in
-                            <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
-                                #{code}
-                            </foreach>
-                        </when>
-                        <otherwise>
-                            and br.village_code in ('')
-                        </otherwise>
-                    </choose>
-                </if>
-            </if>
-            <if test="isAdministrator==2">
-                <choose>
-                    <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
-                        and
-                        (
-                        jg.grid_code in
-                        <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
-                            #{code}
-                        </foreach>
-                        or
-                        br.village_code in
-                        <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
-                            #{code}
-                        </foreach>
-                        )
-                    </when>
-                    <otherwise>
-                        and
-                        (
-                        jg.grid_code in ('') or br.village_code in ('')
-                        )
                     </otherwise>
                 </choose>
             </if>
diff --git a/src/main/java/org/springblade/modules/task/service/ITaskLabelReportingEventService.java b/src/main/java/org/springblade/modules/task/service/ITaskLabelReportingEventService.java
index f8dd112..2030f27 100644
--- a/src/main/java/org/springblade/modules/task/service/ITaskLabelReportingEventService.java
+++ b/src/main/java/org/springblade/modules/task/service/ITaskLabelReportingEventService.java
@@ -76,4 +76,11 @@
 	 * @return
 	 */
     boolean removeTaskByIds(List<Long> toLongList);
+
+	/**
+	 * 二手交易报事 自定义详情
+	 * @param taskLabelReportingEvent
+	 * @return
+	 */
+	TaskLabelReportingEventVO getDetail(TaskLabelReportingEventVO taskLabelReportingEvent);
 }
diff --git a/src/main/java/org/springblade/modules/task/service/impl/TaskLabelReportingEventServiceImpl.java b/src/main/java/org/springblade/modules/task/service/impl/TaskLabelReportingEventServiceImpl.java
index 7c76119..bbb1633 100644
--- a/src/main/java/org/springblade/modules/task/service/impl/TaskLabelReportingEventServiceImpl.java
+++ b/src/main/java/org/springblade/modules/task/service/impl/TaskLabelReportingEventServiceImpl.java
@@ -172,4 +172,14 @@
 		// 返回
 		return flag;
 	}
+
+	/**
+	 * 二手交易报事 自定义详情
+	 * @param taskLabelReportingEvent
+	 * @return
+	 */
+	@Override
+	public TaskLabelReportingEventVO getDetail(TaskLabelReportingEventVO taskLabelReportingEvent) {
+		return baseMapper.getDetail(taskLabelReportingEvent);
+	}
 }

--
Gitblit v1.9.3