From 53ce8de426561e7a43847afda23b5e24e6f76c4e Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期一, 19 一月 2026 17:29:55 +0800
Subject: [PATCH] 2026.1.19 1. 新增可配置的台账提交期限 2. 新增可配置的自巡查承诺
---
src/test/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/EvaluationServiceImplTest.kt | 38 ++++++++++++++++++++++++++++++++++++++
1 files changed, 38 insertions(+), 0 deletions(-)
diff --git a/src/test/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/EvaluationServiceImplTest.kt b/src/test/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/EvaluationServiceImplTest.kt
index bcd3d20..4b056e6 100644
--- a/src/test/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/EvaluationServiceImplTest.kt
+++ b/src/test/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/EvaluationServiceImplTest.kt
@@ -1,5 +1,6 @@
package cn.flightfeather.supervision.lightshare.service.Impl
+import cn.flightfeather.supervision.domain.mapper.OverallEvaluationMapper
import cn.flightfeather.supervision.lightshare.service.EvaluationService
import org.junit.Test
@@ -10,6 +11,11 @@
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.test.context.junit.jupiter.SpringExtension
import org.springframework.test.context.junit4.SpringRunner
+import java.time.Instant
+import java.time.LocalDate
+import java.time.LocalDateTime
+import java.time.ZoneId
+import java.util.*
@RunWith(SpringRunner::class)
@ExtendWith(SpringExtension::class)
@@ -19,9 +25,41 @@
@Autowired
lateinit var evaluationService: EvaluationService
+ @Autowired
+ lateinit var overallEvaluationMapper: OverallEvaluationMapper
+
@Test
fun getTotalPoints() {
val r = evaluationService.getTotalPoints("xB32EtpuxU5bOzq5", 2, "2021-01-01", "2021-04-01",7,"3mbioCjN6XAAHveR",null)
println(r)
}
+
+ @Test
+ fun getCreditInfo() {
+ val r = evaluationService.getCreditInfo("UwTaWXneBoTby6bH", "2022/10-12")
+ println(r)
+ }
+
+ @Test
+ fun refreshCreditCodeTime() {
+ overallEvaluationMapper.selectAll().forEach {
+ val period = it.oePeriod
+ if (period != null && period.isNotBlank()) {
+ val list1 = period.split("/")
+ val year = list1[0].toInt()
+ val list2 = list1[1].split("-")
+ val sMonth = list2[0].toInt()
+ val eMonth = list2[1].toInt()
+
+ val sTime = LocalDate.of(year, sMonth, 1)
+ val eTime = LocalDate.of(year, eMonth, 1).plusMonths(1).minusDays(1)
+
+ if (it.oeStartTime == null && it.oeEndTime == null) {
+ it.oeStartTime = Date.from(sTime.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant())
+ it.oeEndTime = Date.from(eTime.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant())
+ overallEvaluationMapper.updateByPrimaryKeySelective(it)
+ }
+ }
+ }
+ }
}
\ No newline at end of file
--
Gitblit v1.9.3