diff --git a/pav-server/src/main/java/com/palnet/biz/api/bas/laanc/service/BasLaancService.java b/pav-server/src/main/java/com/palnet/biz/api/bas/laanc/service/BasLaancService.java index f189ed4..0631528 100644 --- a/pav-server/src/main/java/com/palnet/biz/api/bas/laanc/service/BasLaancService.java +++ b/pav-server/src/main/java/com/palnet/biz/api/bas/laanc/service/BasLaancService.java @@ -30,6 +30,7 @@ import org.locationtech.jts.geom.Coordinate; import org.locationtech.jts.geom.Geometry; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.StringUtils; import java.time.Instant; import java.util.ArrayList; @@ -129,6 +130,8 @@ public class BasLaancService { // 비행계획서 등록, 약관 등록, 공문 생성 @Transactional public BasLaancLastRs createFlightPlan(BasLaancPlanRq rq) { + if (rq == null || rq.getValidatedRs() == null) throw new CustomException(ErrorCode.NON_VALID_PARAMETER); + BasLaancValidatedRs basLaancValidatedRs = rq.getValidatedRs(); // BasLaancValidatedRs validatedAirspaceRs = this.validationPlanAirspace(rq); @@ -267,8 +270,12 @@ public class BasLaancService { laancPdfModel.setElev(rq.getAreaList().get(0).getFltElev()); } if (rq.getArcrftList() != null && !rq.getArcrftList().isEmpty()) { - laancPdfModel.setArcrftType(rq.getArcrftList().get(0).getArcrftTypeCd().getValue()); - laancPdfModel.setIdntfNum(rq.getArcrftList().get(0).getIdntfNum()); + if (rq.getArcrftList().get(0).getArcrftTypeCd() != null) { + laancPdfModel.setArcrftType(rq.getArcrftList().get(0).getArcrftTypeCd().getValue()); + } + if (StringUtils.hasText(rq.getArcrftList().get(0).getIdntfNum())) { + laancPdfModel.setIdntfNum(rq.getArcrftList().get(0).getIdntfNum()); + } } laancPdfModel.setBirthDate(InstantUtils.toDateString(cstmrInfo.getBrthdyDate())); // laancPdfModel.setSchFltStDt(InstantUtils.toDatetimeString(rq.getSchFltStDt())); diff --git a/pav-server/src/main/java/com/palnet/comn/code/ErrorCode.java b/pav-server/src/main/java/com/palnet/comn/code/ErrorCode.java index 0598b49..2531247 100644 --- a/pav-server/src/main/java/com/palnet/comn/code/ErrorCode.java +++ b/pav-server/src/main/java/com/palnet/comn/code/ErrorCode.java @@ -3,6 +3,7 @@ package com.palnet.comn.code; public enum ErrorCode { SUCCESS("1", "성공"), FAIL("-1" , "실패"), + NON_VALID_PARAMETER("VP001", "파라미터가 유효하지 않습니다."), INTERNAL_SERVER_ERROR("ER500", "내부 시스템 오류"), NOT_REGIST_ERROR_CODE("ER501", "등록되지 않은 오류 코드"), DATA_NOTFIND("DT001","데이터 를 찾을수 없습니다."), diff --git a/pav-server/src/main/resources/templates/laanc/official_document.html b/pav-server/src/main/resources/templates/laanc/official_document.html index e6fedab..23cee55 100644 --- a/pav-server/src/main/resources/templates/laanc/official_document.html +++ b/pav-server/src/main/resources/templates/laanc/official_document.html @@ -115,15 +115,16 @@
비행장치 종류 및 조종자
-
+
가)
-
비행기체종류(신고번호): ()
+
비행기체종류(신고번호): - ()
-
나)
+ +
나)
조종자(생년월일): 님 ()