From 196bb14112448857a885e32dc4149e308e00b01a Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期四, 15 八月 2024 11:57:15 +0800
Subject: [PATCH] 2024.8.15 各项修正

---
 src/test/kotlin/cn/flightfeather/supervision/bgtask/PushFumeTest.kt |   20 +++++---------------
 1 files changed, 5 insertions(+), 15 deletions(-)

diff --git a/src/test/kotlin/cn/flightfeather/supervision/timingtask/PushFumeTest.kt b/src/test/kotlin/cn/flightfeather/supervision/bgtask/PushFumeTest.kt
similarity index 91%
rename from src/test/kotlin/cn/flightfeather/supervision/timingtask/PushFumeTest.kt
rename to src/test/kotlin/cn/flightfeather/supervision/bgtask/PushFumeTest.kt
index 30aac88..f9a531b 100644
--- a/src/test/kotlin/cn/flightfeather/supervision/timingtask/PushFumeTest.kt
+++ b/src/test/kotlin/cn/flightfeather/supervision/bgtask/PushFumeTest.kt
@@ -1,4 +1,4 @@
-package cn.flightfeather.supervision.timingtask
+package cn.flightfeather.supervision.bgtask
 
 import cn.flightfeather.supervision.SupervisionApplication
 import cn.flightfeather.supervision.domain.entity.AvgFumeMinuteValue
@@ -13,13 +13,9 @@
 import org.springframework.boot.test.context.SpringBootTest
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner
 import tk.mybatis.mapper.entity.Example
-import java.io.BufferedReader
-import java.io.InputStreamReader
 import java.time.LocalDateTime
 import java.time.ZoneId
 import java.util.*
-import java.util.concurrent.Executors
-import java.util.concurrent.TimeUnit
 
 @RunWith(SpringJUnit4ClassRunner::class)
 @SpringBootTest(classes = [SupervisionApplication::class])
@@ -36,17 +32,11 @@
 
     @Test
     fun doTask() {
-        var time = LocalDateTime.of(2021, 4, 16, 10, 0)
+        val end = LocalDateTime.of(2024, 4, 25, 12, 40)
+        var startTime = LocalDateTime.of(2024, 1, 3, 0, 0, 0)
+        var endTime = LocalDateTime.of(2024, 1, 3, 23, 59, 59)
 
-        val shecdule = Executors.newScheduledThreadPool(2)
-        shecdule.scheduleAtFixedRate({
-            pushFume.doTask(time)
-            time = time.plusMinutes(1)
-        }, 0, 60, TimeUnit.SECONDS)
-
-        val input = BufferedReader(InputStreamReader(System.`in`))
-        val reader: String = input.readLine()
-
+        pushFume.doTask(TaskPushFume.ZQ, mutableListOf(), startTime, endTime)
     }
 
     fun getSection(date: Date):String {

--
Gitblit v1.9.3