From 38238bbebad273dfb7ea76024addaac8c8be7635 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期四, 21 八月 2025 10:14:40 +0800
Subject: [PATCH] 大屏展示模块,增加查询并显示作物蒸腾量的内容
---
pipIrr-platform/pipIrr-global/src/main/resources/mapper/UgRtuControllerMapper.xml | 24 ++++++++++++++----------
1 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/UgRtuControllerMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/UgRtuControllerMapper.xml
index 8b782c1..37c93e5 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/UgRtuControllerMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/UgRtuControllerMapper.xml
@@ -126,22 +126,24 @@
select
count(*)
from ug_rtu_controller ugCon
- inner join pr_intake inta ON inta.id = ugCon.task_id
+ inner join ug_rtu_task ugTask on ugCon.task_id = ugTask.id
+ inner join pr_controller con on ugCon.controller_id = con.id
+ inner join pr_intake inta on con.intakeId = inta.id
<where>
<if test="taskId != null">
AND ugCon.task_id = #{taskId,jdbcType=BIGINT}
</if>
- <if test="intakeNum != null">
+ <if test="intakeNum != null and intakeNum != ''">
AND inta.name = #{intakeNum,jdbcType=VARCHAR}
</if>
- <if test="rtuAddr != null">
+ <if test="rtuAddr != null and rtuAddr != ''">
AND ugCon.rtu_addr = #{rtuAddr,jdbcType=VARCHAR}
</if>
<if test="state != null and state == 1">
- AND ugCon.ug_state = 1
+ AND ugCon.ug_state = 2
</if>
<if test="state != null and state == 0">
- AND ugCon.ug_state != 1
+ AND ugCon.ug_state != 2
</if>
<if test="fail != null">
AND ugCon.ug_state = #{fail,jdbcType=INTEGER}
@@ -159,22 +161,24 @@
ugCon.ug_state as ugState,
ugCon.over_dt as overDt
from ug_rtu_controller ugCon
- inner join pr_intake inta on ugCon.task_id = inta.id
+ inner join ug_rtu_task ugTask on ugCon.task_id = ugTask.id
+ inner join pr_controller con on ugCon.controller_id = con.id
+ inner join pr_intake inta on con.intakeId = inta.id
<where>
<if test="taskId != null">
AND ugCon.task_id = #{taskId,jdbcType=BIGINT}
</if>
- <if test="intakeNum != null">
+ <if test="intakeNum != null and intakeNum != ''">
AND inta.name = #{intakeNum,jdbcType=VARCHAR}
</if>
- <if test="rtuAddr != null">
+ <if test="rtuAddr != null and rtuAddr != ''">
AND ugCon.rtu_addr = #{rtuAddr,jdbcType=VARCHAR}
</if>
<if test="state != null and state == 1">
- AND ugCon.ug_state = 1
+ AND ugCon.ug_state = 2
</if>
<if test="state != null and state == 0">
- AND ugCon.ug_state != 1
+ AND ugCon.ug_state != 2
</if>
<if test="fail != null">
AND ugCon.ug_state = #{fail,jdbcType=INTEGER}
--
Gitblit v1.8.0