From 0392c333ed3d987cb2ab3dac4e1a972cff405f21 Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期四, 25 四月 2024 17:42:08 +0800
Subject: [PATCH] 1. 新增后台任务关联模块 2. 新增自动评分后台任务; 3. 修复部分bug

---
 src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SearchServiceImpl.kt |   30 ++++++------------------------
 1 files changed, 6 insertions(+), 24 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 d8d8315..8b0e284 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
@@ -17,14 +17,13 @@
 import cn.flightfeather.supervision.lightshare.vo.*
 import com.github.pagehelper.PageHelper
 import org.springframework.beans.BeanUtils
+import org.springframework.beans.factory.annotation.Value
 import org.springframework.stereotype.Service
 import tk.mybatis.mapper.entity.Example
 import java.io.File
 import java.io.FileInputStream
 import java.io.FileOutputStream
-import java.io.OutputStream
 import java.net.URLEncoder
-import java.nio.charset.Charset
 import java.nio.charset.StandardCharsets
 import java.util.*
 import javax.servlet.http.HttpServletResponse
@@ -57,7 +56,9 @@
         val ledgerSubTypeMapper: LedgerSubTypeMapper,
         val ledgerRecordMapper: LedgerRecordMapper,
         val userMapMapper: UserMapMapper,
-        val taskService: TaskService
+        val taskService: TaskService,
+        @Value("\${filePath}") var filePath: String,
+        @Value("\${imgPath}") var imgPath: String
 ) : SearchService {
 
     private val dateUtil = DateUtil()
@@ -79,25 +80,6 @@
         )
         val dataSource = DataSource(config, dbMapper)
         val t = when (mode) {
-//            //闂涓庢暣鏀硅窡韪眹鎬昏〃
-//            0 -> ProDetailSummary(dataSource)
-//            //鍒嗚闀囬棶棰樻暣鏀瑰垎鏋愭眹鎬昏〃
-//            1 -> ProAnalysisSummary(dataSource)
-//
-//            //瑙勮寖鎬ц瘎浼拌鎯呰〃
-//            2 -> ScoreDetailSummary(dataSource)
-//            //鍒嗚闀囪鑼冩�у垎鏋愯〃
-//            3 -> ScoreAnalysisSummary(dataSource)
-//
-//            //闂涓庢暣鏀瑰垎绫荤粺璁¤〃
-//            4 -> ProTypeDetailSummary(dataSource)
-//            //闂涓庢暣鏀瑰垎绫绘帓鍚�
-//            5 -> ProTypeRankSummary(dataSource)
-//            //鏈堝害涓昏鎴栧吀鍨嬮棶棰樺垎鏋愯〃
-//            6 -> ProTypeRankMainSummary(dataSource)
-//            //宸ュ湴鏂藉伐闃舵闂鍒嗙被鍒嗘瀽琛�
-//            7 -> ProTypeStatusSummary(dataSource)
-
             8 -> ReportOne(dataSource)
             9 -> ReportTwo(dataSource)
             10 -> ReportThree(dataSource)
@@ -143,7 +125,7 @@
             setDateHeader("Expires", 0)
         }
 
-        val p = Constant.DEFAULT_FILE_PATH + "/files/autoscore/"
+        val p = "$filePath/autoscore/"
         val file = File(p + fileName)
         if (config.forceUpdate || !file.exists()) {
             t.toFile(p)
@@ -538,7 +520,7 @@
         val task = taskService.getByDistrictCode(config.districtCode, config.startTime)?.takeIf { it.isNotEmpty() }?.get(0)
         config.topTaskGuid = task?.tguid ?: ""
         val dataSource = mutableListOf<DataSource>()
-        config.sceneType = Constant.ScenseType.TYPE1.value.toInt()
+        config.sceneType = Constant.SceneType.TYPE1.value.toInt()
         dataSource.add(DataSource(config, dbMapper))
 
 //        val config2 = config.copy(sceneType = Constant.ScenseType.TYPE2.value.toInt())

--
Gitblit v1.9.3