| | |
| | | package com.flightfeather.uav.lightshare.service.impl |
| | | |
| | | import com.flightfeather.uav.biz.FactorFilter |
| | | import com.flightfeather.uav.biz.report.MissionReport |
| | | import com.flightfeather.uav.domain.entity.Mission |
| | | import com.flightfeather.uav.domain.mapper.MissionMapper |
| | | import com.flightfeather.uav.lightshare.service.MissionService |
| | | import org.junit.Test |
| | | |
| | | import org.junit.Assert.* |
| | | 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.SpringRunner |
| | | import javax.servlet.http.HttpServletResponse |
| | | import tk.mybatis.mapper.entity.Example |
| | | |
| | | @RunWith(SpringRunner::class) |
| | | @SpringBootTest |
| | |
| | | lateinit var missionService: MissionService |
| | | |
| | | @Autowired |
| | | lateinit var missionMapper: MissionMapper |
| | | |
| | | @Autowired |
| | | lateinit var missionReport: MissionReport |
| | | |
| | | @Test |
| | | fun getReport() { |
| | | missionReport.execute("SH-CN-20240514") |
| | | missionReport.execute("SH-CN-20240723-01", FactorFilter.default()) |
| | | missionReport.execute("SH-CN-20240723-02", FactorFilter.default()) |
| | | } |
| | | |
| | | @Test |
| | | fun calMissionInfo() { |
| | | missionMapper.selectByExample(Example(Mission::class.java).apply { |
| | | createCriteria().andGreaterThanOrEqualTo("startTime", "2025-08-08 08:30:00") |
| | | }).forEach {mission -> |
| | | mission?.let { missionService.calMissionInfo(it.missionCode) } |
| | | Thread.sleep(1000) |
| | | } |
| | | } |
| | | } |