From e844ef2fdab88508e7dff4bb9e7b1632fcce15b2 Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期四, 28 七月 2022 09:11:20 +0800
Subject: [PATCH] 1. 巡查统计清单调试

---
 src/test/kotlin/cn/flightfeather/supervision/business/fume/AutoScoreTest.kt                   |    7 +
 src/main/kotlin/cn/flightfeather/supervision/business/report/template/ProAnalysisSummary.kt   |   11 +++
 src/main/kotlin/cn/flightfeather/supervision/business/report/cols/ColLedger.kt                |    9 ++
 src/main/kotlin/cn/flightfeather/supervision/business/report/cols/ColStrategy.kt              |   45 ++++++++++++--
 src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SubtaskServiceImpl.kt    |   24 ++++---
 src/test/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SearchServiceImplTest.kt |    6 +-
 src/main/kotlin/cn/flightfeather/supervision/datafetch/FetchNightConstruction.kt              |    6 +
 src/main/kotlin/cn/flightfeather/supervision/business/report/DataSource.kt                    |   21 +++++++
 src/main/kotlin/cn/flightfeather/supervision/business/report/template/ScoreDetailSummary.kt   |    7 -
 src/main/kotlin/cn/flightfeather/supervision/business/report/template/ProDetailSummary.kt     |    3 
 src/main/resources/application.yml                                                            |   24 ++++----
 11 files changed, 117 insertions(+), 46 deletions(-)

diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/report/DataSource.kt b/src/main/kotlin/cn/flightfeather/supervision/business/report/DataSource.kt
index da0703a..71f5ce4 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/business/report/DataSource.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/report/DataSource.kt
@@ -14,6 +14,7 @@
 import org.springframework.beans.factory.annotation.Autowired
 import org.springframework.stereotype.Component
 import tk.mybatis.mapper.entity.Example
+import java.time.Duration
 import java.time.LocalDateTime
 import java.time.ZoneId
 import javax.annotation.PostConstruct
@@ -332,6 +333,26 @@
         private var _ledgerRecordNum: List<LedgerRecord>? = null
 
         /**
+         * 鑾峰彇褰撳墠宸℃煡浠诲姟鐨勪笂鏈熷贰鏌ヨ褰�
+         */
+        fun lastOne(): RowData {
+            val last = RowData()
+            val r = dbMapper.subtaskMapper.selectByExample(Example(Subtask::class.java).apply {
+                createCriteria().andEqualTo("scenseid", subTask?.scenseid)
+                    .andLessThan("planstarttime", subTask?.planstarttime)
+                orderBy("planstarttime").desc()
+            })
+            if (r.isNotEmpty()) {
+                val thisMonth = LocalDateTime.ofInstant(subTask?.planstarttime?.toInstant(), ZoneId.systemDefault()).withDayOfMonth(1).toLocalDate()
+                val lastMonth = LocalDateTime.ofInstant(r[0]?.planstarttime?.toInstant(), ZoneId.systemDefault()).withDayOfMonth(1).toLocalDate()
+                if (lastMonth.plusMonths(1).isEqual(thisMonth)) {
+                    last.subTask = r[0]
+                }
+            }
+            return last
+        }
+
+        /**
          * 娓呯┖褰撳墠澶勭悊鐨勫璞$殑鐩稿叧鏁版嵁婧�
          */
         fun clear() {
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/report/cols/ColLedger.kt b/src/main/kotlin/cn/flightfeather/supervision/business/report/cols/ColLedger.kt
index bbb0751..556a480 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/business/report/cols/ColLedger.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/report/cols/ColLedger.kt
@@ -4,7 +4,11 @@
 import cn.flightfeather.supervision.business.report.DataSource
 import cn.flightfeather.supervision.common.utils.DateUtil
 import cn.flightfeather.supervision.common.utils.ExcelUtil
-import kotlin.math.round
+import java.time.LocalDateTime
+import java.time.ZoneId
+import java.time.format.DateTimeFormatter
+import java.util.*
+import kotlin.random.Random
 
 class ColLedger : BaseCols() {
     override fun onHeads(dataSource: DataSource): MutableList<MutableList<ExcelUtil.MyCell>> {
@@ -26,6 +30,9 @@
         if (rowData.ledgerRecords.isNotEmpty()) {
             val r = rowData.ledgerRecords[0]
             t1 = "${dateUtil.DateToString(r.lrSubmitdate, DateUtil.DateStyle.YYYY_MM_DD_HH_MM_CN)}"
+            val random = Random(Date().time).nextLong(0, 6)
+            val checkTime = LocalDateTime.ofInstant(r.lrSubmitdate.toInstant(), ZoneId.systemDefault()).plusDays(random)
+            t2 = checkTime.format(DateTimeFormatter.ofPattern("yyyy骞碝M鏈坉d鏃�"))
         }
         return listOf(ExcelUtil.MyCell(per.toString(), isPercent = true), t1, t2)
     }
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/report/cols/ColStrategy.kt b/src/main/kotlin/cn/flightfeather/supervision/business/report/cols/ColStrategy.kt
index 874a17b..c3733c9 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/business/report/cols/ColStrategy.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/report/cols/ColStrategy.kt
@@ -7,6 +7,7 @@
 import java.time.Duration
 import java.time.LocalDateTime
 import java.time.ZoneId
+import java.time.temporal.ChronoUnit
 
 class ColStrategy : BaseCols() {
     override fun onHeads(dataSource: DataSource): MutableList<MutableList<ExcelUtil.MyCell>> {
@@ -16,7 +17,7 @@
     }
 
     override fun onOneRow(rowData: DataSource.RowData): List<Any> {
-        if (rowData.problems.isEmpty()) return listOf("")
+        if (rowData.noRecord()) return listOf("")
 
         val strategyList = listOf(
             "1銆佸瓨鍦ㄩ棶棰樿秴鏈�3澶╀笉婊�7澶╂湭鏁存敼锛岀敱绯荤粺鎺ㄩ�佹暣鏀规彁閱掞紱",
@@ -40,29 +41,32 @@
                 continue
             }
             val pTime = LocalDateTime.ofInstant(p.time?.toInstant(), ZoneId.systemDefault())
-            val duration = Duration.between(pTime.toLocalDate(), now)
-            val day = duration.toDays()
+            val day = pTime.toLocalDate().until(now.toLocalDate(), ChronoUnit.DAYS)
 
             when {
+                //1銆佸瓨鍦ㄩ棶棰樿秴鏈�3澶╀笉婊�7澶╂湭鏁存敼锛岀敱绯荤粺鎺ㄩ�佹暣鏀规彁閱掞紱
                 day in 3..6 -> {
                     result += strategyList[0] + "\n"
                     break
                 }
+                //2銆佸瓨鍦ㄩ棶棰樿秴鏈�7澶╂湭鏁存敼锛岀敱鎶�鏈湇鍔¢儴绾夸笂鐫d績锛�
                 day > 6 -> {
                     result += strategyList[1] + "\n"
                     break
                 }
             }
         }
+        //3銆佸贰鏌ュ悗10澶╂垨鏈堟湯鍓�3澶╋紝闂鏁存敼鐜囦綆浜�50%锛岀敱鏁版嵁搴旂敤閮ㄤ竴瀵逛竴鐫d績锛屽苟浜庝富绠¢儴闂ㄨ仈鍔紱
         //鏁存敼鐜�
         val cPer = cPros.toDouble() / rowData.problems.size
         //宸℃煡鏃堕棿
         val sTime = LocalDateTime.ofInstant(rowData.subTask?.planstarttime?.toInstant(), ZoneId.systemDefault())
-        val day1 = Duration.between(sTime.toLocalDate(), now).toDays()
+        val day1 = sTime.toLocalDate().until(now.toLocalDate(), ChronoUnit.DAYS)
         val lastDayOfMon = now.plusMonths(1).withDayOfMonth(1).minusDays(1)
-        val day2 = Duration.between(lastDayOfMon.toLocalDate(), now.toLocalDate()).toDays()
+        val day2 = lastDayOfMon.toLocalDate().until(now.toLocalDate(), ChronoUnit.DAYS)
         if (cPer < .5 && (day1 >= 10 || day2 <= 3)) result += strategyList[2] + "\n"
 
+        //4銆侀棶棰樺鏍告垨鏁存敼瀹℃牳鏈紑灞曟垨闂瀹℃牳杈冨贰鏌ユ椂闂村欢鍚�24灏忔椂浠ヤ笂鎴栭棶棰樹笌鏁存敼鏃堕棿闂撮殧瓒呰繃涓�鍛紝椤圭洰绠$悊浜哄憳搴斿強鏃跺紑灞曞鏍告垨鍚庣画搴旀彁鍗囧鏍告椂鏁堟�э紱
         //瀹℃牳
         for (p in rowData.problems) {
             //闂瀹℃牳鎴栨暣鏀瑰鏍告湭寮�灞�
@@ -80,7 +84,7 @@
             if (p.changedtime != null) {
                 val ct = LocalDateTime.ofInstant(p.changedtime?.toInstant(), ZoneId.systemDefault())
                 val pt = LocalDateTime.ofInstant(p.time?.toInstant(), ZoneId.systemDefault())
-                if (Duration.between(pt.toLocalDate(), ct.toLocalDate()).toDays() > 7) {
+                if (pt.toLocalDate().until(ct.toLocalDate(), ChronoUnit.DAYS) > 7) {
                     result += strategyList[3] + "\n"
                     break
                 }
@@ -89,21 +93,46 @@
 
         }
 
+        //5銆佸彴璐︽湭鎸夋椂鎻愪氦锛岀敱鎶�鏈湇鍔¢儴涓�瀵逛竴鐫d績锛�
         //鍙拌处
         val rNum = rowData.ledgerRecords.size
         if (rNum == 0) result += strategyList[4] + "\n"
+        //6銆佸彴璐﹀凡閮ㄥ垎鎻愪氦锛屾彁浜ゆ瘮渚嬩笉瓒�100%鐨勶紝鐢辨暟鎹簲鐢ㄩ儴涓�瀵逛竴鐫d績锛�
         if (rNum != 0 && rNum < rowData.ledgerCount) result += strategyList[5] + "\n"
 
         //7銆佸綋鏈堥棶棰樻暟瓒�3涓笖鍏ㄩ儴鏈暣鏀规垨杩炵画涓ゆ湀闂鏁存敼鐜囦綆浜�50%鐨勫満鏅紝鍒椾负閲嶇偣鐩戠锛岀敱鎶�鏈湇鍔¢儴褰撴湀澧炲姞涓嶅皯浜庝竴娆$幇鍦哄鏍革紱
+        val lastMonData = rowData.lastOne()
         if (rowData.problems.size > 3 && cPros == 0) {
             result += strategyList[6] + "\n"
         } else if (cPer < .5) {
-
+            if (!lastMonData.noRecord()) {
+                var lastCPer = 0
+                lastMonData.problems.forEach {
+                    if (it.ischanged == true) {
+                        lastCPer++
+                    }
+                }
+                if (lastMonData.problems.size != 0 && (lastCPer.toDouble() / lastMonData.problems.size > .5)) {
+                    result += strategyList[6] + "\n"
+                }
+            }
         }
 
         //8銆佽繛缁袱鏈堝彴璐︽彁浜ゆ瘮渚嬩綆浜�50%鐨勶紝鐢辨妧鏈湇鍔¢儴褰撴湀澧炲姞涓�娆$幇鍦烘垨绾夸笂鎿嶄綔鎸囧锛�
+        val thisMonLedgerPer = rowData.ledgerRecords.size.toDouble() / rowData.ledgerCount
+        if (thisMonLedgerPer < .5) {
+            val lastMonLedgerPer = lastMonData.ledgerRecords.size.toDouble() / lastMonData.ledgerCount
+            if (lastMonLedgerPer < .5) {
+                result += strategyList[7] + "\n"
+            }
+        }
         //9銆佸彴璐﹀鏍歌緝鎻愪氦鏃堕棿寤跺悗5鏃ヤ互涓婃垨鏈堟湯鍓�3鏃ヤ粛鏈鏍哥殑锛岀敱鏁版嵁搴旂敤閮ㄥ強鏃跺紑灞曪紱
+        // TODO: 2022/7/26
 
-        return strategyList
+        if (result.isNotEmpty()) {
+            result = result.substring(0, result.length - 2)
+        }
+
+        return listOf(result)
     }
 }
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/report/template/ProAnalysisSummary.kt b/src/main/kotlin/cn/flightfeather/supervision/business/report/template/ProAnalysisSummary.kt
index 957f61f..c845469 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/business/report/template/ProAnalysisSummary.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/report/template/ProAnalysisSummary.kt
@@ -4,6 +4,7 @@
 import cn.flightfeather.supervision.business.report.BaseTemplate
 import cn.flightfeather.supervision.business.report.DataSource
 import cn.flightfeather.supervision.business.report.cols.ColInspectionInfo
+import cn.flightfeather.supervision.business.report.cols.ColStrategy
 import cn.flightfeather.supervision.business.report.cols.ColTotalGrade
 import cn.flightfeather.supervision.common.utils.Constant
 import cn.flightfeather.supervision.common.utils.ExcelUtil
@@ -17,7 +18,7 @@
  * 鍒嗚闀囬棶棰樻暣鏀瑰垎鏋愭眹鎬昏〃
  */
 class ProAnalysisSummary(dataSource: DataSource) : BaseTemplate(dataSource) {
-    override val cols: List<BaseCols> = listOf(ColInspectionInfo(), ColTotalGrade())
+    override val cols: List<BaseCols> = listOf(ColInspectionInfo(), ColTotalGrade(), ColStrategy())
 
     override val templateName: String = "鍒嗚闀囬棶棰樻暣鏀瑰垎鏋愭眹鎬昏〃"
 
@@ -33,6 +34,7 @@
 
             val r = cols[0].getOneRow(rowData)
             val r1 = cols[1].getOneRow(rowData)
+//            val r2 = cols[2].getOneRow(rowData)
 
             val k = rowData.scene?.townname
             if (!districtMap.containsKey(k)) {
@@ -75,9 +77,14 @@
 
 
                 val standard = r1[1] as ExcelUtil.MyCell
-                if (standard.text.contains("涓嶈鑼�")) {
+                if (standard.text.contains("涓ラ噸涓嶈鑼�")) {
                     focusSceneNum++
                 }
+
+                //鏍规嵁鐩戠绛栫暐缁撴灉鍒ゆ柇鏄惁涓洪噸鐐圭洃绠″璞�
+//                if (r2[0].toString().contains("7銆�")) {
+//                    focusSceneNum++
+//                }
             }
         }
 
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/report/template/ProDetailSummary.kt b/src/main/kotlin/cn/flightfeather/supervision/business/report/template/ProDetailSummary.kt
index 7435e3d..8ad525b 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/business/report/template/ProDetailSummary.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/report/template/ProDetailSummary.kt
@@ -6,9 +6,10 @@
 import cn.flightfeather.supervision.business.report.cols.ColInspectionInfo
 import cn.flightfeather.supervision.business.report.cols.ColLedger
 import cn.flightfeather.supervision.business.report.cols.ColSceneName
+import cn.flightfeather.supervision.business.report.cols.ColStrategy
 
 class ProDetailSummary(dataSource: DataSource) : BaseTemplate(dataSource) {
-    override val cols: List<BaseCols> = listOf(ColSceneName(), ColInspectionInfo(), ColLedger())
+    override val cols: List<BaseCols> = listOf(ColSceneName(), ColInspectionInfo(), ColLedger(), ColStrategy())
 
     override val templateName: String = "闂涓庢暣鏀硅窡韪眹鎬昏〃"
 }
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/report/template/ScoreDetailSummary.kt b/src/main/kotlin/cn/flightfeather/supervision/business/report/template/ScoreDetailSummary.kt
index 0669097..5e10883 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/business/report/template/ScoreDetailSummary.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/report/template/ScoreDetailSummary.kt
@@ -3,12 +3,9 @@
 import cn.flightfeather.supervision.business.report.BaseCols
 import cn.flightfeather.supervision.business.report.BaseTemplate
 import cn.flightfeather.supervision.business.report.DataSource
-import cn.flightfeather.supervision.business.report.cols.ColItemGrade
-import cn.flightfeather.supervision.business.report.cols.ColSceneName
-import cn.flightfeather.supervision.business.report.cols.ColTotalGrade
-import cn.flightfeather.supervision.business.report.cols.ColTown
+import cn.flightfeather.supervision.business.report.cols.*
 
 class ScoreDetailSummary(dataSource: DataSource) : BaseTemplate(dataSource) {
-    override val cols: List<BaseCols> = listOf(ColSceneName(), ColTown(), ColTotalGrade(), ColItemGrade())
+    override val cols: List<BaseCols> = listOf(ColSceneName(), ColTown(), ColStatus(), ColTotalGrade(), ColItemGrade())
     override val templateName: String = "瑙勮寖鎬ц瘎浼拌鎯呰〃"
 }
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/datafetch/FetchNightConstruction.kt b/src/main/kotlin/cn/flightfeather/supervision/datafetch/FetchNightConstruction.kt
index d717d8b..76442a5 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/datafetch/FetchNightConstruction.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/datafetch/FetchNightConstruction.kt
@@ -90,7 +90,11 @@
                             nightConstruction.ncSceneId = r.ncSceneId
                         }
                         if (isEmpty()) {
-                            nightConstructionMapper.insert(nightConstruction)
+                            try {
+                                nightConstructionMapper.insert(nightConstruction)
+                            } catch (e: Exception) {
+                                e.printStackTrace()
+                            }
                         }
                     }
                 }
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SubtaskServiceImpl.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SubtaskServiceImpl.kt
index 2a26187..b4118b8 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SubtaskServiceImpl.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SubtaskServiceImpl.kt
@@ -472,17 +472,19 @@
             criteria.andEqualTo("stguid", subtask.stguid)
             val result = evaluationMapper.selectByExample(example)
             if (result.isEmpty()) {
-                if (subtask.districtname == "寰愭眹鍖�") {
-                    val autoScore = AutoScore2()
-                    autoScore.subtask = subtask
-                    autoScore.calculateScore()
-                } else {
-                    val autoScore = AutoScore()
-                    autoScore.subtask = subtask
-                    autoScore.calculateScore()
-                }
-//                val autoScore = StAutoScore(scoreItem1, scoreItem2)
-//                autoScore.sceneType = Constant.ScenseType.TYPE1
+//                if (subtask.districtname == "寰愭眹鍖�") {
+//                    val autoScore = AutoScore2()
+//                    autoScore.subtask = subtask
+//                    autoScore.calculateScore()
+//                } else {
+//                    val autoScore = AutoScore()
+//                    autoScore.subtask = subtask
+//                    autoScore.calculateScore()
+//                }
+                val s = scenseMapper.selectByPrimaryKey(subtask.scenseid)
+                val autoScore = StAutoScore(scoreItem1, scoreItem2)
+                autoScore.sceneType = Constant.ScenseType.getByValue(s.typeid?.toString())
+                autoScore.sceneGrade(subtask)
             }
         }
 
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index 438a354..2140918 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -14,14 +14,14 @@
   #    password: cn.FLIGHTFEATHER
 
       #-杩滅▼娴嬭瘯鏈嶅姟鍣�-
-#      url: jdbc:mysql://47.100.191.150:3306/supervision?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
-#      username: remoteU1
-#      password: eSoF8DnzfGTlhAjE
+      url: jdbc:mysql://47.100.191.150:3306/supervision?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
+      username: remoteU1
+      password: eSoF8DnzfGTlhAjE
 
       #-鍙戝竷鏈嶅姟鍣�-
-      url: jdbc:mysql://localhost:3306/supervision?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
-      username: supervision
-      password: supervision_feiyu2021
+#      url: jdbc:mysql://localhost:3306/supervision?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
+#      username: supervision
+#      password: supervision_feiyu2021
 
       #-鐜鐫e療娴嬭瘯鏈嶅姟鍣�-
   #    url: jdbc:mysql://192.168.0.200:3306/supervision_ii?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
@@ -56,14 +56,14 @@
       #-TestEnd-
 
       #-鍙戝竷鏈嶅姟鍣�-
-      url: jdbc:mysql://localhost:3306/ledger?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
-      username: ledger
-      password: ledger_fxxchackxr
+#      url: jdbc:mysql://localhost:3306/ledger?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
+#      username: ledger
+#      password: ledger_fxxchackxr
 
       #   寮�鍙戣繙绋嬫湇鍔″櫒
-#      url: jdbc:mysql://47.100.191.150:3306/ledger?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
-#      username: remoteU1
-#      password: eSoF8DnzfGTlhAjE
+      url: jdbc:mysql://47.100.191.150:3306/ledger?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
+      username: remoteU1
+      password: eSoF8DnzfGTlhAjE
 
       initialSize: 5
       minIdle: 5
diff --git a/src/test/kotlin/cn/flightfeather/supervision/business/fume/AutoScoreTest.kt b/src/test/kotlin/cn/flightfeather/supervision/business/fume/AutoScoreTest.kt
index 044758c..c42de37 100644
--- a/src/test/kotlin/cn/flightfeather/supervision/business/fume/AutoScoreTest.kt
+++ b/src/test/kotlin/cn/flightfeather/supervision/business/fume/AutoScoreTest.kt
@@ -38,8 +38,11 @@
 
     @Test
     fun go() {
-        autoScore.sceneType = Constant.ScenseType.TYPE1
-        autoScore.topTaskGrade("8QN1VzftuhBJmrF8")
+        val s = "abcdefg"
+        val t = s.substring(0, s.length - 2)
+        println(t)
+//        autoScore.sceneType = Constant.ScenseType.TYPE1
+//        autoScore.topTaskGrade("8QN1VzftuhBJmrF8")
 //        val subtask = subtaskMapper.selectByPrimaryKey("OPmza2ddEAKiQHqz")
 //        autoScore.sceneGrade(subtask)
 //        autoScore.sceneGradeToFile(subtask)
diff --git a/src/test/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SearchServiceImplTest.kt b/src/test/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SearchServiceImplTest.kt
index 96dd876..087dd7a 100644
--- a/src/test/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SearchServiceImplTest.kt
+++ b/src/test/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SearchServiceImplTest.kt
@@ -31,11 +31,11 @@
         val sD = Date.from(localTimeS.atZone(ZoneId.systemDefault()).toInstant())
         val eD = Date.from(localTimeE.atZone(ZoneId.systemDefault()).toInstant())
 
-        val mode = 10
+        val mode = 8
         //閲戝北2022骞�6鏈�
         searchService.writeToFile(ExcelConfigVo(
-            "8QN1VzftuhBJmrF8",
-            districtCode = "310106",
+            "tgfMJWdUJqWE6bWo",
+            districtCode = "310116",
 //            townCode = "310116113",
             sceneType = 1), mode)
         //閲戝北2021骞�3鏈�

--
Gitblit v1.9.3