1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
package cn.flightfeather.supervision.business.autooutput
 
import cn.flightfeather.supervision.business.autooutput.score.AopEvaluation
import cn.flightfeather.supervision.business.autooutput.score.construction.JADataAnalysis
import cn.flightfeather.supervision.lightshare.service.SearchService
import cn.flightfeather.supervision.lightshare.vo.ExcelConfigVo
import org.junit.Test
import org.junit.jupiter.api.extension.ExtendWith
import org.junit.runner.RunWith
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.test.context.junit.jupiter.SpringExtension
import org.springframework.test.context.junit4.SpringRunner
 
@RunWith(SpringRunner::class)
@ExtendWith(SpringExtension::class)
@SpringBootTest
class AopEvaluationTest {
 
    @Autowired
    lateinit var aopEvaluation: AopEvaluation
 
    @Autowired
    lateinit var searchService: SearchService
 
    @Autowired
    lateinit var jaDataAnalysis: JADataAnalysis
 
    /**
     * 统计监测数据结果
     */
    @Test
    fun test1() {
        jaDataAnalysis.setResource("VHXHS1dHsykTNUf2", 1, 2023, 8)
        jaDataAnalysis.execute()
    }
 
    /**
     * 自动评估
     */
    @Test
    fun test() {
        aopEvaluation.setResource("VHXHS1dHsykTNUf2", 1)
        aopEvaluation.execute()
    }
 
    /**
     * 导出自动评估结果
     */
    @Test
    fun test2() {
        val mode = 9
        searchService.writeToFile(ExcelConfigVo(
            "VHXHS1dHsykTNUf2",
            districtCode = "310106",
            sceneType = 1), mode)
    }
}