From 1ab6ccf298017e24c137b753d8dc1d94f573df34 Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期一, 20 五月 2024 15:09:00 +0800 Subject: [PATCH] 1、完善协议实现代码 --- pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml index c99a293..5a25cea 100644 --- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml +++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml @@ -219,6 +219,7 @@ LEFT JOIN ba_district country ON ge.countyId = country.id LEFT JOIN ba_district town ON ge.townId = town.id LEFT JOIN ba_district village ON ge.villageId = village.id + LEFT JOIN pr_controller cont ON ge.id = cont.intakeId <where> ge.deleted = 0 AND divi.deleted = 0 @@ -227,11 +228,11 @@ AND ge.name LIKE CONCAT('%', #{intakeName}, '%') </if> - <if test = "divideId != null"> + <if test = "divideId != null and divideId !=''"> AND divi.id = #{divideId} </if> - <if test = "blockId != null"> + <if test = "blockId != null and blockId !=''"> AND blo.id = #{blockId} </if> @@ -259,6 +260,8 @@ divi.`name` AS divideName, CAST(blo.id AS char) AS blockId, blo.`name` AS blockName, + CAST(cont.id AS char) AS controllerId, + cont.rtuAddr AS rtuAddr, ge.lng, ge.lat, ge.remarks, @@ -275,6 +278,7 @@ LEFT JOIN ba_district country ON ge.countyId = country.id LEFT JOIN ba_district town ON ge.townId = town.id LEFT JOIN ba_district village ON ge.villageId = village.id + LEFT JOIN pr_controller cont ON ge.id = cont.intakeId <where> ge.deleted = 0 AND divi.deleted = 0 @@ -283,11 +287,11 @@ AND ge.name LIKE CONCAT('%', #{intakeName}, '%') </if> - <if test = "divideId != null"> + <if test = "divideId != null and divideId !=''"> AND divi.id = #{divideId} </if> - <if test = "blockId != null"> + <if test = "blockId != null and blockId !=''"> AND blo.id = #{blockId} </if> -- Gitblit v1.8.0