From 6e1095e946997e406926c204ceeb5c820dbd07c1 Mon Sep 17 00:00:00 2001
From: Riku <risaku@163.com>
Date: 星期二, 13 八月 2024 23:51:47 +0800
Subject: [PATCH] 1. 修复文件扩展名获取错误问题 2. 调试完善设备信息相关接口

---
 src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SearchServiceImpl.kt |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SearchServiceImpl.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SearchServiceImpl.kt
index 51c20ef..2a55953 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SearchServiceImpl.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SearchServiceImpl.kt
@@ -68,8 +68,6 @@
     @Value("\${imgPath}") var imgPath: String,
 ) : SearchService {
 
-    private val dateUtil = DateUtil()
-
     override fun writeToFile(config: ExcelConfigVo, mode: Int) {
         val dbMapper = DbMapper(
             scenseMapper,
@@ -258,7 +256,7 @@
         }
 
         //寤虹珛绗竴灞傜洰褰曪紝鍖呭惈鎵�鏈夌殑浠诲姟
-        val time = dateUtil.DateToString(Date(), "yyyy-MM-dd_HH-mm-ss")
+        val time = DateUtil.DateToString(Date(), "yyyy-MM-dd_HH-mm-ss")
         var basePath =
             Constant.DEFAULT_FILE_PATH + File.separator + "images" + File.separator + "temp" + File.separator + time
         var file = File(basePath)
@@ -351,7 +349,7 @@
     override fun downloadPic2(sceneType: Int, topTaskId: String, response: HttpServletResponse): HttpServletResponse {
         //寤虹珛绗竴灞傜洰褰曪紝鍖呭惈鎵�鏈夌殑浠诲姟
         val topTask = taskMapper.selectByPrimaryKey(topTaskId)
-        val time = dateUtil.DateToString(Date(), "yyyy-MM-dd_HH-mm-ss")
+        val time = DateUtil.DateToString(Date(), "yyyy-MM-dd_HH-mm-ss")
         val basePath =
             Constant.DEFAULT_FILE_PATH + File.separator + "images" + File.separator + "temp" + File.separator + topTask.name
         val file = File(basePath)
@@ -372,7 +370,7 @@
 
                 //寤虹珛涓�涓瓙浠诲姟鏂囦欢澶�
                 var subTaskFilePath = "${basePath}${File.separator}(${
-                    dateUtil.DateToString(
+                    DateUtil.DateToString(
                         it.planstarttime,
                         DateUtil.DateStyle.YYYY_MM_DD_CN
                     )

--
Gitblit v1.9.3