From 3c00fb91eb2f617922730e7d0c56ea0e1ad373e0 Mon Sep 17 00:00:00 2001
From: zmc <zmc_li@foxmail.com>
Date: 星期二, 05 九月 2023 18:23:29 +0800
Subject: [PATCH] 新增数据接入接口

---
 src/main/resources/com/job/zsc/mapper/FugitiveDustMapper.xml |   42 +++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 41 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 04cc427..f6b8a7d 100644
--- a/src/main/resources/com/job/zsc/mapper/FugitiveDustMapper.xml
+++ b/src/main/resources/com/job/zsc/mapper/FugitiveDustMapper.xml
@@ -3,6 +3,32 @@
         PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         "https://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.job.zsc.mapper.FugitiveDustMapper">
+    <update id="update">
+        update audit_info
+        <set>
+            <if test="exceptionId != null and exceptionId!=''" >
+                exception_id = #{exceptionId},
+            </if>
+            <if test="checker != null and checker!=''" >
+                checker = #{checker},
+            </if>
+
+            <if test="checkerContent != null and checkerContent!=''" >
+                checker_content = #{checkerContent} ,
+            </if>
+            <if test="enterpriseContent != null and enterpriseContent!=''" >
+                enterprise_content = #{enterpriseContent},
+            </if>
+            <if test="auditStatus != null and auditStatus!=''" >
+                audit_status = #{auditStatus},
+            </if>
+            <if test="updateTime != null" >
+                update_time = #{updateTime}
+        </if>
+
+        </set>
+        where exception_id = #{exceptionId}
+    </update>
 
     <select id="conditonQueryDustHistoryData" resultType="com.job.zsc.pojo.DustSiteData">
         select a.*,b.*
@@ -72,7 +98,8 @@
 
     <!--鏉′欢鏌ヨ寮傚父鏁版嵁-->
     <select id="getExceptionData" resultType="com.job.zsc.pojo.DustExceptionData">
-        select b.name,b.typename,b.address,b.duty_company,a.*
+        select *
+        from (select a.* ,b.name,b.typename,b.address,b.duty_company
         from dust_exception_data as a join ja_t_dust_site_info as b on a.mn_code = b.mn_code
         <where>
             <if test="siteName !=null and siteName != ''">
@@ -90,6 +117,8 @@
                 and (a.begin_time between #{beginTime} and #{endTime} or a.end_time between #{beginTime} and  #{endTime})
             </if>
         </where>
+        )
+        as c left join audit_info as d  on c.id = d.exception_id
     </select>
 
 
@@ -123,4 +152,15 @@
         </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
+        <where>
+            <if test="beginTime != null and endTime != null">
+                (a.begin_time between #{beginTime} and #{endTime} or a.end_time between #{beginTime} and  #{endTime}) and b.audit_status != 0
+
+            </if>
+        </where>
+
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.3