From bcecd69be3fb0d64e0a692ce328ca7b1f44dedf3 Mon Sep 17 00:00:00 2001
From: liusuyi <13324259@qq.com>
Date: 星期五, 02 六月 2023 19:08:34 +0800
Subject: [PATCH] 优化

---
 ard-work/src/main/resources/mapper/inspect/ArdVideoInspectRecordMapper.xml |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/ard-work/src/main/resources/mapper/inspect/ArdVideoInspectRecordMapper.xml b/ard-work/src/main/resources/mapper/inspect/ArdVideoInspectRecordMapper.xml
index c08b4cc..fa00cca 100644
--- a/ard-work/src/main/resources/mapper/inspect/ArdVideoInspectRecordMapper.xml
+++ b/ard-work/src/main/resources/mapper/inspect/ArdVideoInspectRecordMapper.xml
@@ -20,7 +20,7 @@
 
     <select id="selectArdVideoInspectRecordList" parameterType="ArdVideoInspectRecord" resultMap="ArdVideoInspectRecordResult">
         <include refid="selectArdVideoInspectRecordVo"/>
-        <where>  
+        <where>
             <if test="startTime != null  and startTime != ''"> and start_time = #{startTime}</if>
             <if test="endTime != null  and endTime != ''"> and end_time = #{endTime}</if>
             <if test="recordFilePath != null  and recordFilePath != ''"> and record_file_path = #{recordFilePath}</if>
@@ -29,7 +29,19 @@
             <if test="userId != null  and userId != ''"> and user_id = #{userId}</if>
         </where>
     </select>
-    
+    <!--鎸夋棩鏈熸煡璇�-->
+    <select id="selectArdVideoInspectRecordListByStartTime" parameterType="ArdVideoInspectRecord" resultType="java.util.HashMap">
+        select r.*,s.well_id,w.well_id as well_name from ard_video_inspect_record r ,ard_video_inspect_task_step
+        s,ard_alarmpoints_well w where start_time like ('${startTime}%') and r.step_id = s.id and s.well_id = w.id
+    </select>
+    <!--鎸夋湀浠界粺璁℃枃浠舵暟閲�-->
+    <select id="selectArdVideoInspectRecordCountByStartMonth" parameterType="String" resultType="java.util.HashMap">
+        select f.start_date,count(*) from
+        (select substring(r.start_time,0,11)as start_date,* from ard_video_inspect_record r
+        where r.start_time like '${startMonth}%') as f
+        group by f.start_date
+    </select>
+
     <select id="selectArdVideoInspectRecordById" parameterType="String" resultMap="ArdVideoInspectRecordResult">
         <include refid="selectArdVideoInspectRecordVo"/>
         where id = #{id}

--
Gitblit v1.9.3