|
|
@ -7,7 +7,9 @@ import com.palnet.biz.api.comn.response.ErrorResponse; |
|
|
|
import com.palnet.biz.api.comn.response.SuccessResponse; |
|
|
|
import com.palnet.biz.api.comn.response.SuccessResponse; |
|
|
|
import com.palnet.comn.code.RSErrorCode; |
|
|
|
import com.palnet.comn.code.RSErrorCode; |
|
|
|
import com.palnet.comn.exception.CustomException; |
|
|
|
import com.palnet.comn.exception.CustomException; |
|
|
|
|
|
|
|
import io.swagger.annotations.ApiImplicitParam; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
|
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.json.simple.JSONObject; |
|
|
|
import org.json.simple.JSONObject; |
|
|
@ -33,6 +35,7 @@ import java.util.Map; |
|
|
|
@Slf4j |
|
|
|
@Slf4j |
|
|
|
@RestController |
|
|
|
@RestController |
|
|
|
@RequestMapping(value = "/api/bas/flight", produces = {MediaType.APPLICATION_JSON_VALUE}) |
|
|
|
@RequestMapping(value = "/api/bas/flight", produces = {MediaType.APPLICATION_JSON_VALUE}) |
|
|
|
|
|
|
|
@Tag(name = "비행계획서", description = "비행계획서 관련 API") |
|
|
|
public class BasFlightController { |
|
|
|
public class BasFlightController { |
|
|
|
|
|
|
|
|
|
|
|
private final BasFlightService basFlightService; |
|
|
|
private final BasFlightService basFlightService; |
|
|
@ -44,6 +47,7 @@ public class BasFlightController { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/area") |
|
|
|
@GetMapping("/area") |
|
|
|
|
|
|
|
@Tag(name = "비행계획서", description = "비행계획서 관련 API") |
|
|
|
public ResponseEntity<Object> findAirSpace() throws IOException, ParseException { |
|
|
|
public ResponseEntity<Object> findAirSpace() throws IOException, ParseException { |
|
|
|
// 1. file read
|
|
|
|
// 1. file read
|
|
|
|
Resource resource = new ClassPathResource("air/airgeo.json"); |
|
|
|
Resource resource = new ClassPathResource("air/airgeo.json"); |
|
|
@ -69,6 +73,7 @@ public class BasFlightController { |
|
|
|
// 비행계획서 조회
|
|
|
|
// 비행계획서 조회
|
|
|
|
@GetMapping(value = "/plan/list") |
|
|
|
@GetMapping(value = "/plan/list") |
|
|
|
@ApiOperation(value = "비행계획서 조회") |
|
|
|
@ApiOperation(value = "비행계획서 조회") |
|
|
|
|
|
|
|
@Tag(name = "비행계획서", description = "비행계획서 관련 API") |
|
|
|
public ResponseEntity<? extends BasicResponse> findPlanList(BasFlightPlanListRq rq) { |
|
|
|
public ResponseEntity<? extends BasicResponse> findPlanList(BasFlightPlanListRq rq) { |
|
|
|
List<BasFlightPlanModel> result = null; |
|
|
|
List<BasFlightPlanModel> result = null; |
|
|
|
// System.out.println(rq);
|
|
|
|
// System.out.println(rq);
|
|
|
@ -86,6 +91,8 @@ public class BasFlightController { |
|
|
|
// 비행계획서 상세 조회
|
|
|
|
// 비행계획서 상세 조회
|
|
|
|
@GetMapping(value = "/plan/detail/{planSno}") |
|
|
|
@GetMapping(value = "/plan/detail/{planSno}") |
|
|
|
@ApiOperation(value = "비행계획서 상세 조회") |
|
|
|
@ApiOperation(value = "비행계획서 상세 조회") |
|
|
|
|
|
|
|
@Tag(name = "비행계획서", description = "비행계획서 관련 API") |
|
|
|
|
|
|
|
@ApiImplicitParam(name = "planSno",value = "비행계획서일련번호") |
|
|
|
public ResponseEntity<? extends BasicResponse> detailPlan(@PathVariable("planSno") Integer planSno) { |
|
|
|
public ResponseEntity<? extends BasicResponse> detailPlan(@PathVariable("planSno") Integer planSno) { |
|
|
|
BasFlightPlanModel result = null; |
|
|
|
BasFlightPlanModel result = null; |
|
|
|
try { |
|
|
|
try { |
|
|
@ -102,6 +109,7 @@ public class BasFlightController { |
|
|
|
// 비행계획서 등록
|
|
|
|
// 비행계획서 등록
|
|
|
|
@PostMapping(value = "/plan/create") |
|
|
|
@PostMapping(value = "/plan/create") |
|
|
|
@ApiOperation(value = "비행계획서 등록") |
|
|
|
@ApiOperation(value = "비행계획서 등록") |
|
|
|
|
|
|
|
@Tag(name = "비행계획서", description = "비행계획서 관련 API") |
|
|
|
public ResponseEntity<? extends BasicResponse> createPlan(@RequestBody BasFlightPlanModel rq) { |
|
|
|
public ResponseEntity<? extends BasicResponse> createPlan(@RequestBody BasFlightPlanModel rq) { |
|
|
|
Map<String, Object> resultMap = new HashMap<String, Object>(); |
|
|
|
Map<String, Object> resultMap = new HashMap<String, Object>(); |
|
|
|
try { |
|
|
|
try { |
|
|
@ -128,6 +136,7 @@ public class BasFlightController { |
|
|
|
// 비행계획서 수정
|
|
|
|
// 비행계획서 수정
|
|
|
|
@PutMapping(value = "/plan/update") |
|
|
|
@PutMapping(value = "/plan/update") |
|
|
|
@ApiOperation(value = "비행계획서 수정") |
|
|
|
@ApiOperation(value = "비행계획서 수정") |
|
|
|
|
|
|
|
@Tag(name = "비행계획서", description = "비행계획서 관련 API") |
|
|
|
public ResponseEntity<? extends BasicResponse> updatePlan(@RequestBody BasFlightPlanModel rq) { |
|
|
|
public ResponseEntity<? extends BasicResponse> updatePlan(@RequestBody BasFlightPlanModel rq) { |
|
|
|
Map<String, Object> resultMap = new HashMap<String, Object>(); |
|
|
|
Map<String, Object> resultMap = new HashMap<String, Object>(); |
|
|
|
try { |
|
|
|
try { |
|
|
@ -152,6 +161,8 @@ public class BasFlightController { |
|
|
|
// 비행계획서 삭제
|
|
|
|
// 비행계획서 삭제
|
|
|
|
@DeleteMapping(value = "/plan/delete/{planSno}") |
|
|
|
@DeleteMapping(value = "/plan/delete/{planSno}") |
|
|
|
@ApiOperation(value = "비행계획서 삭제") |
|
|
|
@ApiOperation(value = "비행계획서 삭제") |
|
|
|
|
|
|
|
@Tag(name = "비행계획서", description = "비행계획서 관련 API") |
|
|
|
|
|
|
|
@ApiImplicitParam(name = "planSno",value = "비행계획서일련번호") |
|
|
|
public ResponseEntity<? extends BasicResponse> deletePlan(@PathVariable("planSno") Integer planSno) { |
|
|
|
public ResponseEntity<? extends BasicResponse> deletePlan(@PathVariable("planSno") Integer planSno) { |
|
|
|
Map<String, Object> resultMap = new HashMap<String, Object>(); |
|
|
|
Map<String, Object> resultMap = new HashMap<String, Object>(); |
|
|
|
try { |
|
|
|
try { |
|
|
@ -175,6 +186,8 @@ public class BasFlightController { |
|
|
|
// 그룹 조종사 조회
|
|
|
|
// 그룹 조종사 조회
|
|
|
|
@GetMapping(value = "/plan/pilot/{groupId}") |
|
|
|
@GetMapping(value = "/plan/pilot/{groupId}") |
|
|
|
@ApiOperation(value = "그룹의 조종사 조회") |
|
|
|
@ApiOperation(value = "그룹의 조종사 조회") |
|
|
|
|
|
|
|
@Tag(name = "비행계획서", description = "비행계획서 관련 API") |
|
|
|
|
|
|
|
@ApiImplicitParam(name = "groupId",value = "그룹ID") |
|
|
|
public ResponseEntity<? extends BasicResponse> findPilot(@PathVariable("groupId") String groupId) { |
|
|
|
public ResponseEntity<? extends BasicResponse> findPilot(@PathVariable("groupId") String groupId) { |
|
|
|
List<BasFlightPlanPilotModel> result = null; |
|
|
|
List<BasFlightPlanPilotModel> result = null; |
|
|
|
try { |
|
|
|
try { |
|
|
@ -192,6 +205,8 @@ public class BasFlightController { |
|
|
|
// 그룹 기체 조회
|
|
|
|
// 그룹 기체 조회
|
|
|
|
@GetMapping(value = "/plan/arcrft/{groupId}") |
|
|
|
@GetMapping(value = "/plan/arcrft/{groupId}") |
|
|
|
@ApiOperation(value = "그룹의 기체 조회") |
|
|
|
@ApiOperation(value = "그룹의 기체 조회") |
|
|
|
|
|
|
|
@Tag(name = "비행계획서", description = "비행계획서 관련 API") |
|
|
|
|
|
|
|
@ApiImplicitParam(name = "groupId",value = "그룹ID") |
|
|
|
public ResponseEntity<? extends BasicResponse> findArcrft(@PathVariable("groupId") String groupId) { |
|
|
|
public ResponseEntity<? extends BasicResponse> findArcrft(@PathVariable("groupId") String groupId) { |
|
|
|
List<BasFlightPlanArcrftModel> result = null; |
|
|
|
List<BasFlightPlanArcrftModel> result = null; |
|
|
|
try { |
|
|
|
try { |
|
|
@ -209,6 +224,7 @@ public class BasFlightController { |
|
|
|
// 비행 구역 버퍼 존 생성
|
|
|
|
// 비행 구역 버퍼 존 생성
|
|
|
|
@PostMapping("/plan/area/buffer") |
|
|
|
@PostMapping("/plan/area/buffer") |
|
|
|
@ApiOperation(value = "비행 구역 버퍼 존 생성") |
|
|
|
@ApiOperation(value = "비행 구역 버퍼 존 생성") |
|
|
|
|
|
|
|
@Tag(name = "비행계획서", description = "비행계획서 관련 API") |
|
|
|
public ResponseEntity<? extends BasicResponse> findBuffer(@RequestBody List<BasFlightPlanAreaModel> rq) { |
|
|
|
public ResponseEntity<? extends BasicResponse> findBuffer(@RequestBody List<BasFlightPlanAreaModel> rq) { |
|
|
|
List<BasFlightPlanAreaModel> rs = null; |
|
|
|
List<BasFlightPlanAreaModel> rs = null; |
|
|
|
try { |
|
|
|
try { |
|
|
@ -226,6 +242,7 @@ public class BasFlightController { |
|
|
|
// 비행계획서 리스트(승인)
|
|
|
|
// 비행계획서 리스트(승인)
|
|
|
|
@GetMapping(value = "/aprv/list") |
|
|
|
@GetMapping(value = "/aprv/list") |
|
|
|
@ApiOperation(value = "비행계획서 리스트(승인)") |
|
|
|
@ApiOperation(value = "비행계획서 리스트(승인)") |
|
|
|
|
|
|
|
@Tag(name = "비행계획서", description = "비행계획서 관련 API") |
|
|
|
public ResponseEntity<? extends BasicResponse> findAprvList(BasFlightPlanListRq rq) { |
|
|
|
public ResponseEntity<? extends BasicResponse> findAprvList(BasFlightPlanListRq rq) { |
|
|
|
List<BasFlightPlanModel> result = null; |
|
|
|
List<BasFlightPlanModel> result = null; |
|
|
|
try { |
|
|
|
try { |
|
|
@ -241,6 +258,7 @@ public class BasFlightController { |
|
|
|
// 비행계획서 승인/미승인
|
|
|
|
// 비행계획서 승인/미승인
|
|
|
|
@PutMapping(value = "/aprv/proc") |
|
|
|
@PutMapping(value = "/aprv/proc") |
|
|
|
@ApiOperation(value = "비행 계획서 승인/미승인") |
|
|
|
@ApiOperation(value = "비행 계획서 승인/미승인") |
|
|
|
|
|
|
|
@Tag(name = "비행계획서", description = "비행계획서 관련 API") |
|
|
|
public ResponseEntity<? extends BasicResponse> updateAprvProc(@RequestBody BasFlightAprovRq rq) { |
|
|
|
public ResponseEntity<? extends BasicResponse> updateAprvProc(@RequestBody BasFlightAprovRq rq) { |
|
|
|
Map<String, Object> resultMap = new HashMap<String, Object>(); |
|
|
|
Map<String, Object> resultMap = new HashMap<String, Object>(); |
|
|
|
try { |
|
|
|
try { |
|
|
@ -263,6 +281,7 @@ public class BasFlightController { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/airspace/contains") |
|
|
|
@PostMapping("/airspace/contains") |
|
|
|
|
|
|
|
@Tag(name = "비행계획서", description = "비행계획서 관련 API") |
|
|
|
public ResponseEntity<? extends BasicResponse> checkAirspaceContains(@RequestBody List<BasFlightPlanAreaModel> rq) { |
|
|
|
public ResponseEntity<? extends BasicResponse> checkAirspaceContains(@RequestBody List<BasFlightPlanAreaModel> rq) { |
|
|
|
Map<String, Object> resultMap = new HashMap<String, Object>(); |
|
|
|
Map<String, Object> resultMap = new HashMap<String, Object>(); |
|
|
|
try { |
|
|
|
try { |
|
|
@ -282,6 +301,7 @@ public class BasFlightController { |
|
|
|
//지역 검색
|
|
|
|
//지역 검색
|
|
|
|
@GetMapping("/plan/area/search") |
|
|
|
@GetMapping("/plan/area/search") |
|
|
|
@ApiOperation(value = "지역 검색") |
|
|
|
@ApiOperation(value = "지역 검색") |
|
|
|
|
|
|
|
@Tag(name = "비행계획서", description = "비행계획서 관련 API") |
|
|
|
public ResponseEntity<? extends BasicResponse> searchArea(String query) throws ParseException { |
|
|
|
public ResponseEntity<? extends BasicResponse> searchArea(String query) throws ParseException { |
|
|
|
String text = null; |
|
|
|
String text = null; |
|
|
|
try { |
|
|
|
try { |
|
|
@ -303,6 +323,7 @@ public class BasFlightController { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/schedule") |
|
|
|
@GetMapping("/schedule") |
|
|
|
|
|
|
|
@Tag(name = "비행계획서", description = "비행계획서 관련 API") |
|
|
|
public ResponseEntity<? extends BasicResponse> findSchedule(@RequestParam("searchDate") String searchDate) { |
|
|
|
public ResponseEntity<? extends BasicResponse> findSchedule(@RequestParam("searchDate") String searchDate) { |
|
|
|
List<BasFlightScheduleRs> response; |
|
|
|
List<BasFlightScheduleRs> response; |
|
|
|
|
|
|
|
|
|
|
|