From 23bd719cebe5feeff4e48fde925b0b39755eea93 Mon Sep 17 00:00:00 2001 From: feiyu02 <risaku@163.com> Date: 星期二, 15 十一月 2022 10:59:50 +0800 Subject: [PATCH] 2022.11.15 --- src/main/kotlin/cn/flightfeather/supervision/common/score/item/ScoreItem_6.kt | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/src/main/kotlin/cn/flightfeather/supervision/common/score/item/ScoreItem_6.kt b/src/main/kotlin/cn/flightfeather/supervision/common/score/item/ScoreItem_6.kt index 02e381c..d4557b5 100644 --- a/src/main/kotlin/cn/flightfeather/supervision/common/score/item/ScoreItem_6.kt +++ b/src/main/kotlin/cn/flightfeather/supervision/common/score/item/ScoreItem_6.kt @@ -6,6 +6,8 @@ import org.springframework.beans.factory.annotation.Autowired import org.springframework.stereotype.Component import tk.mybatis.mapper.entity.Example +import java.time.LocalDate +import java.time.ZoneId import javax.annotation.PostConstruct @Component @@ -32,6 +34,8 @@ override var maxScore: Int = 10 override fun calScore(): Pair<Int, Int> { + val startTime = LocalDate.of(info.year, sMonth, 1).atStartOfDay(ZoneId.systemDefault()) + val lastTime = LocalDate.of(info.year, eMonth, 1).plusMonths(1).atStartOfDay(ZoneId.systemDefault()) // FIXME: 2021/4/26 娑夋墽娉曟剰瑙併�佽矗浠ゆ暣鏀规垨琛屾斂澶勭綒,鎵i櫎鍏ㄩ儴鍒嗘暟 val r5 = scoreItem5.execute(info) if (r5.first != 0) { @@ -40,6 +44,8 @@ val complaints = complaintMapper.selectByExample(Example(Complaint::class.java).apply { createCriteria().andEqualTo("cpSceneid", info.userId) + .andGreaterThanOrEqualTo("cpTime", startTime) + .andLessThan("cpTime", lastTime) }) return if (condition1(complaints)) { -- Gitblit v1.9.3