From 6fdacca914ef38e6cc91292ef07c5af32bd92991 Mon Sep 17 00:00:00 2001
From: hcong <1050828145@qq.com>
Date: 星期二, 03 十二月 2024 11:12:40 +0800
Subject: [PATCH] 1. BgTask增加onStatusChange参数,通过外界传递如何发送状态改变的消息 2. BackgroundTaskCtrl.kt 创建了BgTask对象并传递了onStatusChange参数 3. WebSocketMessageUtil 类名修改为 WebSocketMessageDecoder 4. SendWebSocketMessageUtil 类名修改为 WebSocketSendMessageUtil

---
 src/main/kotlin/cn/flightfeather/supervision/business/datafetch/FetchNightConstruction.kt |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/datafetch/FetchNightConstruction.kt b/src/main/kotlin/cn/flightfeather/supervision/business/datafetch/FetchNightConstruction.kt
index 85b4cc8..4f0ed9f 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/business/datafetch/FetchNightConstruction.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/datafetch/FetchNightConstruction.kt
@@ -43,8 +43,6 @@
     @Autowired
     lateinit var userinfoMapper: UserinfoMapper
 
-    private val dateUtil = DateUtil()
-
     @PostConstruct
     fun init() {
         instance = this
@@ -65,7 +63,7 @@
             val timeStr = if (it.isNotEmpty()) {
                 val cal = Calendar.getInstance().apply { time = it[0]?.ncCreateTime }
                 cal.add(Calendar.DAY_OF_MONTH, -1)
-                dateUtil.DateToString(cal.time, DateUtil.DateStyle.YYYY_MM_DD_HH_MM_SS) ?: DEFAULT_TIME
+                DateUtil.DateToString(cal.time, DateUtil.DateStyle.YYYY_MM_DD_HH_MM_SS) ?: DEFAULT_TIME
             } else {
                 DEFAULT_TIME
             }
@@ -83,10 +81,10 @@
                             ncConstructionUnit = vo["constructionUnit"].asString
                             ncPerson = vo["person"].asString
                             ncApplyContent = vo["applyContent"].asString
-                            ncStartDate = dateUtil.StringToDate(vo["startDate"].asString)
-                            ncEndDate = dateUtil.StringToDate(vo["endDate"].asString)
+                            ncStartDate = DateUtil.StringToDate(vo["startDate"].asString)
+                            ncEndDate = DateUtil.StringToDate(vo["endDate"].asString)
                             ncFileName = vo["filename"].asString
-                            ncCreateTime = dateUtil.StringToDate(vo["createtime"].asString)
+                            ncCreateTime = DateUtil.StringToDate(vo["createtime"].asString)
                             ncUrl = vo["url"].asString
 
                             ncProvinceCode = PROVINCE_CODE

--
Gitblit v1.9.3