From aec4636e4fb430055feb66751da0e6c05bb864df Mon Sep 17 00:00:00 2001
From: zuoxiao <470321431@qq.com>
Date: 星期三, 30 四月 2025 16:25:30 +0800
Subject: [PATCH] fix(irrigatePlan): 修复终止灌溉计划时长设置错误- 将终止计划的默认时长从 9999 修改为 0 - 此修改确保在终止灌溉计划时,不会出现时长设置过长的问题

---
 pipIrr-platform/pipIrr-global/src/main/resources/mapper/IrIntakeOperateMapper.xml |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/IrIntakeOperateMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/IrIntakeOperateMapper.xml
index 44de0f1..cf9d2c9 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/IrIntakeOperateMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/IrIntakeOperateMapper.xml
@@ -187,6 +187,14 @@
         io.failure_factors AS result
     FROM ir_intake_operate io
         inner JOIN ir_group_intake gi ON gi.intake_id = io.intake_id
-    WHERE io.plan_id = #{planId} AND gi.group_id = #{groupId};
+    WHERE io.plan_id = #{planId} AND gi.group_id = #{groupId} AND operate_type = 1;
+  </select>
+
+  <!--鏍规嵁璁″垝ID鑾峰彇鍙栨按鍙e懡浠ゅ彂甯冨け璐ユ暟閲忥紝鐏屾簤璁″垝璇︽儏椤典娇鐢�-->
+  <select id="getFailureCount" resultType="java.lang.Integer">
+    SELECT
+      COUNT(1) AS failureCount
+    FROM ir_intake_operate
+    WHERE operate_type = 1 AND command_result != 1 AND plan_id = #{planId}
   </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0