riku
2022-06-17 3a5c011d9509d3bc0367921f463676c81ff2e374
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
package cn.flightfeather.supervision.lightshare.service.impl
 
import cn.flightfeather.supervision.SupervisionApplication
import cn.flightfeather.supervision.lightshare.service.SearchService
import cn.flightfeather.supervision.lightshare.vo.ExcelConfigVo
import org.junit.Test
 
import org.junit.runner.RunWith
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner
import java.time.LocalDateTime
import java.time.ZoneId
import java.util.*
 
@RunWith(SpringJUnit4ClassRunner::class)
@SpringBootTest(classes = [SupervisionApplication::class])
class SearchServiceImplTest {
 
    @Autowired
    lateinit var searchService: SearchService
 
    @Test
    fun getExcel() {
        val localTimeS = LocalDateTime.of(2021, 3, 1, 0, 0, 0)
        val localTimeE = LocalDateTime.of(2021, 3, 31, 23, 59, 59)
        val sD = Date.from(localTimeS.atZone(ZoneId.systemDefault()).toInstant())
        val eD = Date.from(localTimeE.atZone(ZoneId.systemDefault()).toInstant())
        searchService.writeToFile(ExcelConfigVo(
                "EPnTo3hoOWZXAU33",
                sD, eD, "31", "3100", "310104", null, 5, null, null, null
        ))
    }
}