From a3cc1d220f8a1de11874bebceba0130d32157ff1 Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期二, 30 九月 2025 09:26:32 +0800
Subject: [PATCH] 2025.9.30 1. 联合前端调试数据产品接口(待完成)

---
 src/test/kotlin/cn/flightfeather/supervision/business/autooutput/AopEvaluationTest.kt |   68 +++++++++++++++++++++++++--------
 1 files changed, 51 insertions(+), 17 deletions(-)

diff --git a/src/test/kotlin/cn/flightfeather/supervision/business/autooutput/AopEvaluationTest.kt b/src/test/kotlin/cn/flightfeather/supervision/business/autooutput/AopEvaluationTest.kt
index 07b51cc..0aa07ff 100644
--- a/src/test/kotlin/cn/flightfeather/supervision/business/autooutput/AopEvaluationTest.kt
+++ b/src/test/kotlin/cn/flightfeather/supervision/business/autooutput/AopEvaluationTest.kt
@@ -9,6 +9,9 @@
 import cn.flightfeather.supervision.business.autooutput.datasource.AopDataConfig
 import cn.flightfeather.supervision.business.autooutput.score.AopCreditCode
 import cn.flightfeather.supervision.common.utils.Constant
+import cn.flightfeather.supervision.domain.ds1.entity.Evaluationrule
+import cn.flightfeather.supervision.domain.ds1.mapper.EvaluationruleMapper
+import cn.flightfeather.supervision.domain.ds1.repository.SubTaskRep
 import cn.flightfeather.supervision.lightshare.service.SearchService
 import cn.flightfeather.supervision.lightshare.vo.ExcelConfigVo
 import org.junit.Test
@@ -18,6 +21,7 @@
 import org.springframework.boot.test.context.SpringBootTest
 import org.springframework.test.context.junit.jupiter.SpringExtension
 import org.springframework.test.context.junit4.SpringRunner
+import tk.mybatis.mapper.entity.Example
 
 @RunWith(SpringRunner::class)
 @ExtendWith(SpringExtension::class)
@@ -48,18 +52,24 @@
     @Autowired
     lateinit var jsWhDataAnalysis: JSWhDataAnalysis
 
+    @Autowired
+    lateinit var subTaskRep: SubTaskRep
+
+    @Autowired
+    lateinit var evaluationruleMapper: EvaluationruleMapper
+
     /**
      * 闈欏畨宸ュ湴鑷瘎
      */
     @Test
     fun test1() {
-        val taskId = "tTbZIUg7nQJ1MRgE"
+        val taskId = "P7hsgDedyN9XLrbt"
         val districtCode = "310106"
-        val year = 2023
-        val month = 12
+        val year = 2024
+        val month = 6
         val sceneType = Constant.SceneType.TYPE1.value.toInt()
         jaCsDataAnalysis.setResource(taskId, sceneType, year, month)
-        jaCsDataAnalysis.execute(0.124)
+        jaCsDataAnalysis.execute()
 
         aopEvaluation.executeByTopTask(taskId, sceneType)
 
@@ -75,22 +85,22 @@
      */
     @Test
     fun test() {
-        val taskId = "88wgq9l5gm9cUMg1"
-        val districtCode = "310104"
+//        val taskId = "88wgq9l5gm9cUMg1"
+//        val districtCode = "310104"
         val districtName = "寰愭眹鍖�"
-        val year = 2023
+        val year = 2024
         val month = 11
         val sceneType = Constant.SceneType.TYPE5.value.toInt()
-        xhFuDataAnalysis.setResource(taskId, sceneType, year, month)
-        xhFuDataAnalysis.execute()
-
-        aopEvaluation.executeByTopTask(taskId, sceneType)
-
-        val mode = 9
-        searchService.writeToFile(ExcelConfigVo(
-            taskId,
-            districtCode = districtCode,
-            sceneType = sceneType), mode)
+//        xhFuDataAnalysis.setResource(taskId, sceneType, year, month)
+//        xhFuDataAnalysis.execute()
+//
+//        aopEvaluation.executeByTopTask(taskId, sceneType)
+//
+//        val mode = 9
+//        searchService.writeToFile(ExcelConfigVo(
+//            taskId,
+//            districtCode = districtCode,
+//            sceneType = sceneType), mode)
         aopCreditCode.execute(AopDataConfig(
             year = year,
             month = month,
@@ -137,4 +147,28 @@
             districtCode = districtCode,
             sceneType = sceneType), mode)
     }
+
+    @Test
+    fun aopSubtask() {
+        val s = subTaskRep.findOne("B6kyaAjJRoGJ2Yur")
+        aopEvaluation.executeBySubTask(s!!)
+    }
+
+    @Test
+    fun test3() {
+        val result = evaluationruleMapper.selectByExample(Example(Evaluationrule::class.java).apply {
+            createCriteria()
+                .andEqualTo("tasktypeid", 99)
+                .andEqualTo("scensetypeid", 1)
+            and(createCriteria().orEqualTo("provincecode", "31").orIsNull("provincecode"))
+            and(createCriteria().orEqualTo("citycode", "3100").orIsNull("citycode"))
+            and(createCriteria().orEqualTo("districtcode", "310104").orIsNull("districtcode"))
+            and(createCriteria().orEqualTo("towncode", "310104014").orIsNull("towncode"))
+            orderBy("towncode").desc()
+                .orderBy("districtcode").desc()
+                .orderBy("citycode").desc()
+                .orderBy("provincecode").desc()
+        })
+        println(result.map { it.rulename })
+    }
 }
\ No newline at end of file

--
Gitblit v1.9.3