From 3543b001e3da2cb801d7dfa27b396db4edbfb740 Mon Sep 17 00:00:00 2001
From: zmc <zmc_li@foxmail.com>
Date: 星期三, 27 九月 2023 17:27:46 +0800
Subject: [PATCH] 添加了风险排名接口

---
 src/main/resources/com/job/zsc/mapper/FugitiveDustMapper.xml |   50 +++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 49 insertions(+), 1 deletions(-)

diff --git a/src/main/resources/com/job/zsc/mapper/FugitiveDustMapper.xml b/src/main/resources/com/job/zsc/mapper/FugitiveDustMapper.xml
index f6b8a7d..0938dff 100644
--- a/src/main/resources/com/job/zsc/mapper/FugitiveDustMapper.xml
+++ b/src/main/resources/com/job/zsc/mapper/FugitiveDustMapper.xml
@@ -96,7 +96,7 @@
         order by lst asc ) as d  on c.mn_code = d.mn_code
     </select>
 
-    <!--鏉′欢鏌ヨ寮傚父鏁版嵁-->
+    <!--鏉′欢鏌ヨ寮傚父鏁版嵁  鍔犱笂浜嗗璁′俊鎭�-->
     <select id="getExceptionData" resultType="com.job.zsc.pojo.DustExceptionData">
         select *
         from (select a.* ,b.name,b.typename,b.address,b.duty_company
@@ -113,6 +113,7 @@
                 </foreach>
             </if>
 
+
             <if test="beginTime != null and endTime != null">
                 and (a.begin_time between #{beginTime} and #{endTime} or a.end_time between #{beginTime} and  #{endTime})
             </if>
@@ -122,10 +123,12 @@
     </select>
 
 
+
     <!--   鏍规嵁鏌愭鏃堕棿鍐呮煇涓紓甯哥被鍨嬫煡璇㈠搴旂殑搴楅摵鍚嶇О鍜岃澶囩紪鍙�-->
     <select id="getExceptionSitenameAndCode" resultType="com.job.zsc.pojo.DustExceptionData">
         select DISTINCT b.name,a.mn_code
         from dust_exception_data as a join ja_t_dust_site_info as b on a.mn_code = b.mn_code
+
         <where>
             <if test="exceptionType !=null and exceptionType != ''">
                 a.exception_type  = #{exceptionType}
@@ -152,6 +155,7 @@
         </where>
         order by a.lst asc
     </select>
+
     <select id="getHasAuditedData" resultType="com.job.zsc.pojo.DustExceptionData">
         select *
         from dust_exception_data as a left join audit_info as b on a.id = b.exception_id
@@ -163,4 +167,48 @@
         </where>
 
     </select>
+    <select id="getSiteNameByTimeAndExceptionType" resultType="com.job.zsc.pojo.DustExceptionData">
+        select DISTINCT b.name
+        from dust_exception_data as a join ja_t_dust_site_info as b on a.mn_code = b.mn_code
+        <where>
+            <if test="exceptionType != null and exceptionType != '' ">
+                a.exception_type in
+                <foreach item="item" collection="exceptionType" separator="," open="("  close=")">
+                    #{item}
+                </foreach>
+            </if>
+
+            <if test="beginTime != null and endTime != null">
+                and (a.begin_time between #{beginTime} and #{endTime} or a.end_time between #{beginTime} and  #{endTime})
+            </if>
+        </where>
+
+    </select>
+    <select id="analysisdataByType" resultType="com.job.zsc.pojo.AnalysisDustData">
+        select a.*,b.name,b.duty_company from dust_statistics_value as a join ja_t_dust_site_info as b on a.mn_code = b. mn_code
+        <where>
+            <if test="month != null and month != null">
+               a.lst  = #{month}
+            </if>
+
+            <if test="type != null and type != ''">
+                and a.type  = #{type}
+            </if>
+        </where>
+
+    </select>
+    <select id="analysisdataByTimeAndType" resultType="com.job.zsc.pojo.AnalysisDustData">
+        select a.*,b.name,b.duty_company from dust_statistics_value as a join ja_t_dust_site_info as b on a.mn_code = b. mn_code
+        <where>
+            <if test="beginTime != null and endTime != null">
+                a.Lst between #{beginTime} and #{endTime}
+            </if>
+
+            <if test="type != null and type != ''">
+                and a.type  = #{type}
+            </if>
+        </where>
+
+
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.3