From 45fdeee912088efbd07a748a011682c6c6d1ce51 Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期三, 15 十一月 2023 14:55:02 +0800
Subject: [PATCH] 1. 修改风险值的查询逻辑;

---
 src/main/java/com/flightfeather/monitor/domain/ds1/repository/DustStatisticsValueRep.kt |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/src/main/java/com/flightfeather/monitor/domain/ds1/repository/DustStatisticsValueRep.kt b/src/main/java/com/flightfeather/monitor/domain/ds1/repository/DustStatisticsValueRep.kt
index 6af586e..8721324 100644
--- a/src/main/java/com/flightfeather/monitor/domain/ds1/repository/DustStatisticsValueRep.kt
+++ b/src/main/java/com/flightfeather/monitor/domain/ds1/repository/DustStatisticsValueRep.kt
@@ -1,5 +1,6 @@
 package com.flightfeather.monitor.domain.ds1.repository
 
+import com.flightfeather.monitor.domain.ds1.entity.DustExceptionData
 import com.flightfeather.monitor.domain.ds1.entity.DustStatisticsValue
 import com.flightfeather.monitor.domain.ds1.mapper.DustStatisticsValueMapper
 import com.github.pagehelper.PageHelper
@@ -45,10 +46,17 @@
     }
 
     fun monthlyStatics(date: LocalDate) {
-        val s = date.atStartOfDay()
+        val s = date.withDayOfMonth(1).atStartOfDay()
         val e = s.plusMonths(1).minusSeconds(1)
         val d = Duration.between(s, e).toDays() + 1
         val dataCount = d * 96
         dustStatisticsValueMapper.monthlyStatics(s, e, dataCount.toInt())
     }
+
+    fun select(mnCode: String, date: LocalDate): List<DustStatisticsValue?> {
+        return dustStatisticsValueMapper.selectByExample(Example(DustStatisticsValue::class.java).apply {
+            createCriteria().andEqualTo("lst", date)
+                .andEqualTo("mnCode", mnCode)
+        })
+    }
 }
\ No newline at end of file

--
Gitblit v1.9.3