From 4a2deb11b819dd78a8c75e244ef67ec2e48cf5f5 Mon Sep 17 00:00:00 2001
From: zhubaomin <zhubaomin>
Date: 星期一, 14 四月 2025 21:03:28 +0800
Subject: [PATCH] 重构轮灌组修改接口

---
 pipIrr-platform/pipIrr-global/src/main/resources/mapper/OpeInspectMapper.xml |   32 +++++++++++++++++++++++++++++++-
 1 files changed, 31 insertions(+), 1 deletions(-)

diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/OpeInspectMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/OpeInspectMapper.xml
index 088784e..c11b0d3 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/OpeInspectMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/OpeInspectMapper.xml
@@ -130,7 +130,8 @@
     ba_user.`name` AS inspectorName,
     oi.id AS inspectId,
     oi.start_time AS startTime,
-    oi.stop_time AS stopTime
+    oi.stop_time AS stopTime,
+    oi.inspect_distance AS inspectDistance
     FROM	`ope_inspect` oi
     INNER JOIN `ba_user` ON oi.inspector_id = ba_user.id
     <where>
@@ -161,4 +162,33 @@
     SET inspect_distance = #{distance}
     WHERE id = #{inspectId}
   </update>
+
+  <!--鏍规嵁宸℃鍛業D鑾峰彇宸℃璁板綍鏁伴噺-->
+  <select id="getInstectsCountByInspectorId" resultType="java.lang.Long">
+    SELECT
+        count(*)
+    FROM ope_inspect ins
+    LEFT JOIN ba_user user ON user.id = ins.inspector_id
+    WHERE ins.inspector_id = #{inspectorId}
+  </select>
+
+  <!--鏍规嵁宸℃鍛業D鑾峰彇宸℃鍒楄〃-->
+  <select id="getInstectsByInspectorId" resultType="com.dy.pipIrrGlobal.voOp.VoInspect">
+    SELECT
+        user.id AS inspectorId,
+        user.name AS inspectorName,
+        ins.id AS inspectId,
+        ins.start_time AS startTime,
+        ins.stop_time AS stopTime,
+        ins.inspect_distance AS inspectDistance
+    FROM ope_inspect ins
+        LEFT JOIN ba_user user ON user.id = ins.inspector_id
+    WHERE ins.inspector_id = #{inspectorId}
+    ORDER BY ins.start_time DESC
+    <trim prefix="limit " >
+      <if test="start != null and count != null">
+        #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER}
+      </if>
+    </trim>
+  </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0