From fd2de42e8b0019e660f04c72d0a9d218e032f4e4 Mon Sep 17 00:00:00 2001 From: wuzeyu <1223318623@qq.com> Date: 星期五, 05 七月 2024 13:59:02 +0800 Subject: [PATCH] 添加取水口和更改取水口时判断取水口是否重名 --- pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml | 15 +++++++++++++-- 1 files changed, 13 insertions(+), 2 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 1d5434d..1ce5038 100644 --- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml +++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml @@ -364,7 +364,7 @@ COUNT(*) AS recordCount FROM pr_controller con INNER JOIN pr_intake inta ON con.intakeId = inta.id - INNER JOIN JSON_TABLE( + left JOIN JSON_TABLE( <!--'[{"rtuAddr":"37142501020100215","isOnLine":true},{"rtuAddr":"4000004","isOnLine":true},{"rtuAddr":"dy20240325","isOnLine":false}]',--> #{onLineMap}, '$[*]' COLUMNS( @@ -391,7 +391,7 @@ rtus.isOnLine FROM pr_controller con INNER JOIN pr_intake inta ON con.intakeId = inta.id - INNER JOIN JSON_TABLE( + left JOIN JSON_TABLE( <!--'[{"rtuAddr":"37142501020100215","isOnLine":true},{"rtuAddr":"4000004","isOnLine":true},{"rtuAddr":"dy20240325","isOnLine":false}]',--> #{onLineMap}, '$[*]' COLUMNS( @@ -407,6 +407,7 @@ AND inta.name LIKE CONCAT('%', #{intakeNum}, '%') </if> </where> + order by con.id ASC <if test="pageCurr != null and pageSize != null"> LIMIT ${(pageCurr-1)*pageSize}, ${pageSize} </if> @@ -436,4 +437,14 @@ </if> </where> </select> + + <!--鍙栨按鍙e悕绉版崲鍙栨按鍙D锛屾壂鐮佸紑闃�浣跨敤--> + <select id="getIntakeIdByName" resultType="java.lang.Long"> + SELECT id AS intakeId FROM pr_intake WHERE `name` = #{intakeName} + </select> + + <!--寰楀埌鎵�鏈夌殑鍙栨按鍙e悕绉�--> + <select id="getIntakeName" resultType="java.lang.String"> + SELECT `name` FROM pr_intake WHERE deleted = 0 + </select> </mapper> \ No newline at end of file -- Gitblit v1.8.0