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
|
))
|
}
|
}
|