feiyu02
2025-08-14 b10c22af595bd995e56946bff63b8f2f984b13e8
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
package com.flightfeather.uav.biz.dataprocess
 
import com.flightfeather.uav.common.exception.BizException
import com.flightfeather.uav.domain.entity.Mission
import com.flightfeather.uav.domain.repository.MissionRep
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
 
@RunWith(SpringRunner::class)
@SpringBootTest
class RoadSegmentTest {
 
    @Autowired
    lateinit var roadSegment: RoadSegment
 
    @Autowired
    lateinit var missionRep: MissionRep
 
    @Test
    fun handle() {
        val mission = missionRep.findOne("SH-CN-20240830(jingan)") ?: throw BizException("任务不存在")
        roadSegment.handle(mission)
//        val missionList = missionRep.findList(Mission().apply {
//            districtName = "长宁区"
//        })
//        missionList.forEach {
//            it?.let {
//                if (it.missionCode != "SH-CN-20240514") {
//                    roadSegment.handle(it)
//                }
//            }
//        }
    }
}