From d9765e031e100e1d8eea34e086cb9c81766e1a00 Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期五, 21 二月 2025 09:52:14 +0800 Subject: [PATCH] 针对王江海制定的协议: 1、优化相关注释; 2、优化代码; 3、协议中报警信息有变化:外门报警改为电池电压报警、增加阀门开关状态、增加阀门堵转报警等。 --- pipIrr-platform/pipIrr-global/src/main/resources/mapper/OpeInspectMapper.xml | 29 +++++++++++++++++++++++++++++ 1 files changed, 29 insertions(+), 0 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..38e1d90 100644 --- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/OpeInspectMapper.xml +++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/OpeInspectMapper.xml @@ -161,4 +161,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