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/java/com/job/zsc/service/impl/FugitiveDustServiceImpl.java |  127 +++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 124 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/job/zsc/service/impl/FugitiveDustServiceImpl.java b/src/main/java/com/job/zsc/service/impl/FugitiveDustServiceImpl.java
index 1fd0a83..4193d73 100644
--- a/src/main/java/com/job/zsc/service/impl/FugitiveDustServiceImpl.java
+++ b/src/main/java/com/job/zsc/service/impl/FugitiveDustServiceImpl.java
@@ -3,14 +3,13 @@
 import com.github.pagehelper.Page;
 import com.github.pagehelper.PageHelper;
 import com.job.zsc.mapper.FugitiveDustMapper;
-import com.job.zsc.pojo.AnalysisDustData;
-import com.job.zsc.pojo.DustSiteData;
-import com.job.zsc.pojo.PageBean;
+import com.job.zsc.pojo.*;
 import com.job.zsc.service.FugitiveDustService;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.time.LocalDateTime;
 import java.util.List;
 
 @Slf4j
@@ -51,4 +50,126 @@
         List<AnalysisDustData> list = fugitiveDustMapper.analysisdata(siteName,beginTime,endTime);
         return list;
     }
+
+    @Override
+    public List<AnalysisDustData> analysisByTime(String siteName, String beginTime, String endTime) {
+        List<AnalysisDustData> list = fugitiveDustMapper.analysisByTime(siteName,beginTime,endTime);
+        return list;
+    }
+
+    @Override
+    public PageBean pageAnalysisTime(Integer page, Integer pageSize, String siteName, String beginTime, String endTime) {
+        //璁剧疆鍒嗛〉鍙傛暟
+        PageHelper.startPage(page,pageSize);
+        //鎵ц鏌ヨ
+        List<AnalysisDustData> infoList=fugitiveDustMapper.analysisByTime(siteName,beginTime,endTime);
+        //鑾峰彇鏌ヨ缁撴灉
+        Page<AnalysisDustData> p=(Page<AnalysisDustData>)infoList;
+
+        //灏佽PageBean瀵硅薄*/
+        PageBean pageBean=new PageBean(p.getTotal(),p.getResult());
+        return  pageBean;
+    }
+
+    @Override
+    public List<DustExceptionType> getExceptionType() {
+        List<DustExceptionType> list = fugitiveDustMapper.getExceptionType();
+        return list;
+    }
+
+    @Override
+    public PageBean getExceptionData(Integer page, Integer pageSize, String siteName, String[] exceptionType, String beginTime, String endTime) {
+        //璁剧疆鍒嗛〉鍙傛暟
+        PageHelper.startPage(page,pageSize);
+
+        List<DustExceptionData> infoList = fugitiveDustMapper.getExceptionData(siteName,exceptionType,beginTime,endTime);
+        //鑾峰彇鏌ヨ缁撴灉
+        Page<DustExceptionData> p=(Page<DustExceptionData>)infoList;
+
+        //灏佽PageBean瀵硅薄*/
+        PageBean pageBean=new PageBean(p.getTotal(),p.getResult());
+
+        return  pageBean;
+    }
+
+    @Override
+    public List<DustExceptionData> getExceptionSitenameAndCode(String exceptionType, String beginTime, String endTime) {
+        List<DustExceptionData> list = fugitiveDustMapper.getExceptionSitenameAndCode(exceptionType,beginTime,endTime);
+        return list;
+    }
+
+    @Override
+    public Integer exceptionNum(String exceptionType, String beginTime, String endTime) {
+        Integer list = fugitiveDustMapper.exceptionNum(exceptionType,beginTime,endTime);
+        return list;
+    }
+
+    @Override
+    public List<DustSiteData> conditonQueryHistoryData(String siteName, String beginTime, String endTime) {
+        List<DustSiteData> list = fugitiveDustMapper.conditonQueryHistoryData(siteName,beginTime,endTime);
+        return list;
+    }
+
+    @Override
+    public List<DustExceptionData> getExceptionAllData(String siteName, String[] exceptionType, String beginTime, String endTime) {
+        List<DustExceptionData> list = fugitiveDustMapper.getExceptionData(siteName,exceptionType,beginTime,endTime);
+        return list;
+    }
+
+    @Override
+    public List<DustExceptionData> exceptionSiteNum() {
+        List<DustExceptionData> list = fugitiveDustMapper.exceptionSiteNum();
+        return list;
+    }
+
+    @Override
+    public List<AnalysisDustData> analysisAll(String siteName, String beginTime, String endTime) {
+        List<AnalysisDustData> list = fugitiveDustMapper.analysisByTime(siteName,beginTime,endTime);
+        return list;
+    }
+
+    @Override
+    public List<DustSiteData> conditonQueryhistoryallData(String siteName, String mnCode, String beginTime, String endTime, String[] scenarioType) {
+        List<DustSiteData> list = fugitiveDustMapper.conditonQueryDustHistoryData(siteName,mnCode,beginTime,endTime,scenarioType);
+        return list;
+    }
+
+    @Override
+    public void addAuditNotes(AuditInfo auditInfo) {
+        if(auditInfo.getAuditStatus()==3){
+            auditInfo.setUpdateTime(LocalDateTime.now());
+            auditInfo.setCreateTime(LocalDateTime.now());
+        }else{
+            auditInfo.setCreateTime(LocalDateTime.now());
+
+        }
+        fugitiveDustMapper.insert(auditInfo);
+    }
+
+    @Override
+    public List<AuditInfo> getAuditAllData() {
+        List<AuditInfo> list = fugitiveDustMapper.getAuditAllData();
+        return list;
+    }
+
+    @Override
+    public void update(AuditInfo auditInfo) {
+        auditInfo.setUpdateTime(LocalDateTime.now());
+        fugitiveDustMapper.update(auditInfo);
+    }
+
+
+    @Override
+    public List<DustExceptionData> getHasAuditedData(String beginTime, String endTime) {
+        List<DustExceptionData> list = fugitiveDustMapper.getHasAuditedData(beginTime,endTime);
+        return list;
+    }
+
+    @Override
+    public void setting(DustDataAccessSetting dustDataAccessSetting) {
+        dustDataAccessSetting.setCreateTime(LocalDateTime.now());
+        fugitiveDustMapper.setting(dustDataAccessSetting);
+    }
+
+
 }

--
Gitblit v1.9.3