Browse Source

swagger document update2

pull/18/head
지대한 9 months ago
parent
commit
8fdd882889
  1. 4
      pav-server/build.gradle
  2. 78
      pav-server/src/main/java/com/palnet/biz/api/acnt/crtfyhp/controller/AcntCrtfyhpController.java
  3. 69
      pav-server/src/main/java/com/palnet/biz/api/acnt/cstmr/controller/AcntCstmrController.java
  4. 10
      pav-server/src/main/java/com/palnet/biz/api/acnt/cstmr/model/AcntCstmrEmModel.java
  5. 9
      pav-server/src/main/java/com/palnet/biz/api/acnt/cstmr/model/AcntCstmrPwModel.java
  6. 25
      pav-server/src/main/java/com/palnet/biz/api/acnt/cstmr/model/AcntCstmrRqModel.java
  7. 9
      pav-server/src/main/java/com/palnet/biz/api/acnt/cstmr/model/AnctCstmrPswdModel.java
  8. 3
      pav-server/src/main/java/com/palnet/biz/api/acnt/cstmr/model/AnctCstmrTermsModel.java
  9. 3
      pav-server/src/main/java/com/palnet/biz/api/acnt/cstmr/service/AcntCstmrService.java
  10. 74
      pav-server/src/main/java/com/palnet/biz/api/acnt/jwt/controller/JwtAuthenticationController.java
  11. 5
      pav-server/src/main/java/com/palnet/biz/api/acnt/jwt/model/JwtRqModel.java
  12. 4
      pav-server/src/main/java/com/palnet/biz/api/acnt/jwt/utils/JwtTokenUtil.java
  13. 5
      pav-server/src/main/java/com/palnet/biz/api/acnt/terms/controller/AcntTermsController.java
  14. 7
      pav-server/src/main/java/com/palnet/biz/api/acnt/terms/model/AcntTermsRqModel.java
  15. 31
      pav-server/src/main/java/com/palnet/biz/api/anls/hstry/controller/AnlsHstryController.java
  16. 7
      pav-server/src/main/java/com/palnet/biz/api/anls/hstry/model/AnlsHstryGroupModel.java
  17. 3
      pav-server/src/main/java/com/palnet/biz/api/anls/hstry/model/AnlsHstryRqModel.java
  18. 41
      pav-server/src/main/java/com/palnet/biz/api/anls/hstry/service/AnlsHstryService.java
  19. 59
      pav-server/src/main/java/com/palnet/biz/api/anls/smlt/controller/AnlsSmltController.java
  20. 67
      pav-server/src/main/java/com/palnet/biz/api/bas/dron/controller/BasDronController.java
  21. 46
      pav-server/src/main/java/com/palnet/biz/api/bas/dron/model/BasDronInsertModel.java
  22. 3
      pav-server/src/main/java/com/palnet/biz/api/bas/dron/model/BasDronModel.java
  23. 9
      pav-server/src/main/java/com/palnet/biz/api/bas/dron/model/BasDronRqModel.java
  24. 45
      pav-server/src/main/java/com/palnet/biz/api/bas/dron/model/BasDronUpdateModel.java
  25. 15
      pav-server/src/main/java/com/palnet/biz/api/bas/dron/model/BasIdntfModel.java
  26. 4
      pav-server/src/main/java/com/palnet/biz/api/bas/dron/model/BasIdntfRqModel.java
  27. 132
      pav-server/src/main/java/com/palnet/biz/api/bas/flight/controller/BasFlightController.java
  28. 53
      pav-server/src/main/java/com/palnet/biz/api/bas/group/controller/BasGroupAprvController.java
  29. 102
      pav-server/src/main/java/com/palnet/biz/api/bas/group/controller/BasGroupController.java
  30. 66
      pav-server/src/main/java/com/palnet/biz/api/bas/group/controller/BasGroupJoinController.java
  31. 63
      pav-server/src/main/java/com/palnet/biz/api/bas/group/controller/BasGroupUserController.java
  32. 6
      pav-server/src/main/java/com/palnet/biz/api/bas/group/model/BasGroupAprvRqModel.java
  33. 24
      pav-server/src/main/java/com/palnet/biz/api/bas/group/model/BasGroupAprvlUpdateRQ.java
  34. 21
      pav-server/src/main/java/com/palnet/biz/api/bas/group/model/BasGroupInsertRQ.java
  35. 17
      pav-server/src/main/java/com/palnet/biz/api/bas/group/model/BasGroupJoinInsertRQ.java
  36. 4
      pav-server/src/main/java/com/palnet/biz/api/bas/group/model/BasGroupJoinRqModel.java
  37. 14
      pav-server/src/main/java/com/palnet/biz/api/bas/group/model/BasGroupJoinUpdateRQ.java
  38. 3
      pav-server/src/main/java/com/palnet/biz/api/bas/group/model/BasGroupRqModel.java
  39. 19
      pav-server/src/main/java/com/palnet/biz/api/bas/group/model/BasGroupUpdateRQ.java
  40. 6
      pav-server/src/main/java/com/palnet/biz/api/bas/group/model/BasGroupUserListModel.java
  41. 17
      pav-server/src/main/java/com/palnet/biz/api/bas/group/model/BasGroupUserUpdateRQ.java
  42. 43
      pav-server/src/main/java/com/palnet/biz/api/bas/laanc/controller/BasLaancAprvController.java
  43. 90
      pav-server/src/main/java/com/palnet/biz/api/bas/laanc/controller/BasLaancController.java
  44. 16
      pav-server/src/main/java/com/palnet/biz/api/bas/laanc/model/BasLaancAprvListRq.java
  45. 62
      pav-server/src/main/java/com/palnet/biz/api/bas/laanc/model/BasLaancAprvRs.java
  46. 62
      pav-server/src/main/java/com/palnet/biz/api/bas/laanc/model/BasLaancArcrftModel.java
  47. 22
      pav-server/src/main/java/com/palnet/biz/api/bas/laanc/model/BasLaancAreaByAirspaceModel.java
  48. 20
      pav-server/src/main/java/com/palnet/biz/api/bas/laanc/model/BasLaancAreaByElevModel.java
  49. 16
      pav-server/src/main/java/com/palnet/biz/api/bas/laanc/model/BasLaancAreaCoordByAirspaceModel.java
  50. 16
      pav-server/src/main/java/com/palnet/biz/api/bas/laanc/model/BasLaancAreaCoordByElevModel.java
  51. 14
      pav-server/src/main/java/com/palnet/biz/api/bas/laanc/model/BasLaancAreaCoordModel.java
  52. 30
      pav-server/src/main/java/com/palnet/biz/api/bas/laanc/model/BasLaancAreaModel.java
  53. 2
      pav-server/src/main/java/com/palnet/biz/api/bas/laanc/model/BasLaancDuplicatedAirspaceRs.java
  54. 22
      pav-server/src/main/java/com/palnet/biz/api/bas/laanc/model/BasLaancPlanRq.java
  55. 3
      pav-server/src/main/java/com/palnet/biz/api/bas/laanc/model/BasLaancQrcodeRq.java
  56. 4
      pav-server/src/main/java/com/palnet/biz/api/bas/laanc/model/BasLaancTsRq.java
  57. 28
      pav-server/src/main/java/com/palnet/biz/api/bas/laanc/service/BasLaancAprvService.java
  58. 107
      pav-server/src/main/java/com/palnet/biz/api/bas/laanc/service/BasLaancService.java
  59. 84
      pav-server/src/main/java/com/palnet/biz/api/cns/faq/controller/CnsFaqController.java
  60. 14
      pav-server/src/main/java/com/palnet/biz/api/cns/faq/model/FaqListModel.java
  61. 3
      pav-server/src/main/java/com/palnet/biz/api/cns/faq/model/FaqListRQModel.java
  62. 32
      pav-server/src/main/java/com/palnet/biz/api/cns/faq/model/FaqListRSModel.java
  63. 46
      pav-server/src/main/java/com/palnet/biz/api/cns/faq/model/FaqUpdateModel.java
  64. 12
      pav-server/src/main/java/com/palnet/biz/api/cns/faq/service/CnsFaqService.java
  65. 107
      pav-server/src/main/java/com/palnet/biz/api/cns/qna/controller/CnsQnaController.java
  66. 4
      pav-server/src/main/java/com/palnet/biz/api/cns/qna/model/QnaInsertAnserRQModel.java
  67. 4
      pav-server/src/main/java/com/palnet/biz/api/cns/qna/model/QnaListAdminRQ.java
  68. 6
      pav-server/src/main/java/com/palnet/biz/api/cns/qna/model/QnaSelectListRQ.java
  69. 2
      pav-server/src/main/java/com/palnet/biz/api/cns/qna/service/CnsQnaService.java
  70. 12
      pav-server/src/main/java/com/palnet/biz/api/comn/elev/controller/ComnElevController.java
  71. 7
      pav-server/src/main/java/com/palnet/biz/api/comn/elev/model/ComnElevRq.java
  72. 5
      pav-server/src/main/java/com/palnet/biz/api/comn/elev/model/ComnGroundElevRq.java
  73. 13
      pav-server/src/main/java/com/palnet/biz/api/comn/file/controller/ComnFileController.java
  74. 8
      pav-server/src/main/java/com/palnet/biz/api/comn/model/ComnPagingModel.java
  75. 6
      pav-server/src/main/java/com/palnet/biz/api/comn/model/ComnRqModel.java
  76. 9
      pav-server/src/main/java/com/palnet/biz/api/comn/response/SuccessResponse.java
  77. 20
      pav-server/src/main/java/com/palnet/biz/api/comn/sunriseset/controller/ComnSunrisesetController.java
  78. 15
      pav-server/src/main/java/com/palnet/biz/api/comn/sunriseset/model/ComnSunrisesetCoordRq.java
  79. 12
      pav-server/src/main/java/com/palnet/biz/api/comn/sunriseset/model/ComnSunrisesetRq.java
  80. 16
      pav-server/src/main/java/com/palnet/biz/api/comn/sunriseset/model/ComnSunrisesetRs.java
  81. 92
      pav-server/src/main/java/com/palnet/biz/api/ctr/cntrl/controller/CtrCntrlController.java
  82. 16
      pav-server/src/main/java/com/palnet/biz/api/ctr/cntrl/controller/SocketReceiverController.java
  83. 2
      pav-server/src/main/java/com/palnet/biz/api/ctr/cntrl/model/CtrCntrlArcrftWarnRqModel.java
  84. 7
      pav-server/src/main/java/com/palnet/biz/api/ctr/cntrl/model/CtrCntrlPlanContainsRq.java
  85. 29
      pav-server/src/main/java/com/palnet/biz/api/ctr/cntrl/model/CtrCntrlWeatherModel.java
  86. 3
      pav-server/src/main/java/com/palnet/biz/api/ctr/cntrl/service/CtrCntrlService.java
  87. 18
      pav-server/src/main/java/com/palnet/biz/api/external/controller/ExternalLaancController.java
  88. 7
      pav-server/src/main/java/com/palnet/biz/api/external/model/PilotValidRq.java
  89. 20
      pav-server/src/main/java/com/palnet/biz/api/external/model/PilotValidRs.java
  90. 48
      pav-server/src/main/java/com/palnet/biz/api/external/model/TsPlanRq.java
  91. 35
      pav-server/src/main/java/com/palnet/biz/api/external/model/TsQrcodeRs.java
  92. 272
      pav-server/src/main/java/com/palnet/biz/api/main/dash/controller/MainDashController.java
  93. 11
      pav-server/src/main/java/com/palnet/biz/api/main/dash/model/MainDashFlightNumStcsModel.java
  94. 11
      pav-server/src/main/java/com/palnet/biz/api/main/dash/model/MainDashPlanNumStcsModel.java
  95. 13
      pav-server/src/main/java/com/palnet/biz/api/main/dash/model/MainDashWarnNumStcsModel.java
  96. 171
      pav-server/src/main/java/com/palnet/biz/api/main/statistics/controller/MainStatisticsController.java
  97. 18
      pav-server/src/main/java/com/palnet/biz/api/main/statistics/model/FlightStcsByFlightRQ.java
  98. 18
      pav-server/src/main/java/com/palnet/biz/api/main/statistics/model/FlightStcsByResultRQ.java
  99. 18
      pav-server/src/main/java/com/palnet/biz/api/main/statistics/model/FlightStcsByWarnRQ.java
  100. 14
      pav-server/src/main/java/com/palnet/biz/api/main/statistics/model/FlightStcsRQ.java
  101. Some files were not shown because too many files have changed in this diff Show More

4
pav-server/build.gradle

@ -46,6 +46,9 @@ dependencies {
developmentOnly 'org.springframework.boot:spring-boot-devtools'
implementation 'org.springframework.boot:spring-boot-starter-webflux'
// implementation 'io.springfox:springfox-boot-starter:3.0.0'
implementation 'org.springdoc:springdoc-openapi-ui:1.6.15'
// thymeleaf
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
@ -86,7 +89,6 @@ dependencies {
implementation 'org.apache.commons:commons-io:1.3.2'
implementation 'commons-httpclient:commons-httpclient:3.1'
implementation 'com.googlecode.json-simple:json-simple:1.1.1'
implementation 'io.springfox:springfox-boot-starter:3.0.0'
implementation 'org.json:json:20220320'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr353:2.15.2'

78
pav-server/src/main/java/com/palnet/biz/api/acnt/crtfyhp/controller/AcntCrtfyhpController.java

@ -3,22 +3,13 @@ package com.palnet.biz.api.acnt.crtfyhp.controller;
import java.util.HashMap;
import java.util.Map;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.palnet.biz.api.acnt.crtfyhp.model.AcntCrtfyhpRsModel;
import com.palnet.biz.api.acnt.crtfyhp.service.AcntCrtfyhpService;
import com.palnet.biz.api.comn.response.BasicResponse;
import com.palnet.biz.api.comn.response.ErrorResponse;
@ -27,21 +18,22 @@ import com.palnet.biz.jpa.repository.pty.PtyCstmrQueryRepository;
import com.palnet.comn.code.RSErrorCode;
import com.palnet.comn.utils.EncryptUtils;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import lombok.extern.slf4j.Slf4j;
@Log4j2
@Slf4j
@RestController
@RequiredArgsConstructor
@RequestMapping(value = "/api/acnt/crtfyhp", produces = {MediaType.APPLICATION_JSON_VALUE})
@Tag(name = "휴대폰 인증 관리", description = "회원 휴대폰 인증 관련 API")
public class AcntCrtfyhpController {
@Autowired
private final AcntCrtfyhpService service;
@Autowired
private PtyCstmrQueryRepository ptyCstmrQueryRepository;
private final PtyCstmrQueryRepository ptyCstmrQueryRepository;
/**
* 인증번호를 발송하는 기능,
@ -50,9 +42,8 @@ public class AcntCrtfyhpController {
* @return
*/
@GetMapping(value = "/register/send")
@Tag(name = "휴대폰 인증 관리", description = "회원 휴대폰 인증 관련 API")
@ApiImplicitParam(name = "hnpo",value = "휴대폰번호", dataTypeClass = String.class)
public ResponseEntity<? extends BasicResponse> send(String hpno) {
@Operation(summary = "휴대폰 인증번호 전송", description = "입력한 휴대폰번호로 회원정보에 동일한 휴대폰 번호가 있는지 확인하고, 없다면 인증번호를 전송하는 API 입니다.")
public ResponseEntity<? extends BasicResponse> send(@Parameter(name="hpno", description = "회원 핸드폰번호", in = ParameterIn.QUERY, example = "01012345678") String hpno) {
Map<String , Object> resultMap = new HashMap<String,Object>(); // 결과 반환을 위한 객체선언
@ -103,12 +94,9 @@ public class AcntCrtfyhpController {
* @return
*/
@GetMapping(value = "/register/confirm")
@Tag(name = "휴대폰 인증 관리", description = "회원 휴대폰 인증 관련 API")
@ApiImplicitParams({
@ApiImplicitParam(name = "hpno",value = "휴대폰번호", dataTypeClass = String.class),
@ApiImplicitParam(name = "crtfyNo",value = "인증일련번호", dataTypeClass = String.class)
})
public ResponseEntity<? extends BasicResponse> confirm(String hpno , String crtfyNo) {
@Operation(summary = "휴대폰 인증번호 검증", description = "입력한 핸드폰번호로 받은 인증번호를 입력해 검증하는 API 입니다.")
public ResponseEntity<? extends BasicResponse> confirm(@Parameter(name="hpno", description = "회원 핸드폰번호", in = ParameterIn.QUERY, example = "01012345678") String hpno ,
@Parameter(name="crtfyNo", description = "회원 핸드폰번호", in = ParameterIn.QUERY, example = "123456") String crtfyNo) {
Map<String , Boolean> resultMap = new HashMap<String,Boolean>(); // 결과 반환을 위한 객체선언
@ -146,13 +134,9 @@ public class AcntCrtfyhpController {
* @return
*/
@GetMapping(value = "/find/sendForId")
@ApiOperation(value = "아이디 찾기 시 인증번호 발송")
@Tag(name = "휴대폰 인증 관리", description = "회원 휴대폰 인증 관련 API")
@ApiImplicitParams({
@ApiImplicitParam(name = "memberName", value = "회원 이름", dataTypeClass = String.class),
@ApiImplicitParam(name = "hpno", value = "휴대폰 번호", dataTypeClass = String.class)
})
public ResponseEntity<? extends BasicResponse> sendForId(String memberName, String hpno) {
@Operation(summary = "ID 찾기 시 사용되는 인증번호 발송 로직", description = "ID찾기 시 입력한 핸드폰번호로 인증번호를 발송하는 API 입니다.")
public ResponseEntity<? extends BasicResponse> sendForId(@Parameter(name="memberName", description = "회원 이름", in = ParameterIn.QUERY, example = "팔네트웍스") String memberName,
@Parameter(name="hpno", description = "회원 핸드폰번호", in = ParameterIn.QUERY, example = "01012345678") String hpno) {
Map<String, Object> resultMap = new HashMap<String, Object>(); // 결과 반환을 위한 객체선언
if(memberName == null || hpno == null) { // hpno[휴대폰번호]와 memberName[회원이름]이 없을시 서버에서 파라미터가 없다는 "의도적인" 에러 반환
@ -190,13 +174,9 @@ public class AcntCrtfyhpController {
* @return
*/
@GetMapping(value = "/find/findUserId")
@ApiOperation(value = "회원 아이디 찾기")
@Tag(name = "휴대폰 인증 관리", description = "회원 휴대폰 인증 관련 API")
@ApiImplicitParams({
@ApiImplicitParam(name = "memberName",value = "회원이름", dataTypeClass = String.class),
@ApiImplicitParam(name = "hpno",value = "휴대폰번호", dataTypeClass = String.class)
})
public ResponseEntity<? extends BasicResponse> findUserId(String memberName, String hpno) {
@Operation(summary = "ID 찾기", description = "멤버의 이름과 핸드폰번호를 입력받아 회원가입 당시에 입력한 ID를 찾아주는 API 입니다.")
public ResponseEntity<? extends BasicResponse> findUserId(@Parameter(name="memberName", description = "회원 이름", in = ParameterIn.QUERY, example = "팔네트웍스") String memberName,
@Parameter(name="hpno", description = "회원 핸드폰번호", in = ParameterIn.QUERY, example = "01012345678") String hpno) {
Map<String, Object> resultMap = new HashMap<String, Object>(); // 결과 반환을 위한 객체선언
if(memberName == null || hpno == null) { // hpno[휴대폰번호]와 memberName[회원이름]이 없을시 서버에서 파라미터가 없다는 "의도적인" 에러 반환
@ -229,13 +209,9 @@ public class AcntCrtfyhpController {
* @return
*/
@GetMapping(value = "/find/sendForPw")
@ApiOperation(value = "비밀번호 찾기 시 인증번호 발송")
@Tag(name = "휴대폰 인증 관리", description = "회원 휴대폰 인증 관련 API")
@ApiImplicitParams({
@ApiImplicitParam(name = "userId",value = "사용자ID", dataTypeClass = String.class),
@ApiImplicitParam(name = "hpno",value = "휴대폰번호", dataTypeClass = String.class)
})
public ResponseEntity<? extends BasicResponse> sendForPw(String userId, String hpno) {
@Operation(summary = "비밀번호 찾기 시 인증번호 발송", description = "비밀번호 찾기 시도 시 멤버의 ID과 핸드폰번호를 입력받아 인증번호를 발송하는 API 입니다.")
public ResponseEntity<? extends BasicResponse> sendForPw(@Parameter(name="userId", description = "회원 아이디", in = ParameterIn.QUERY, example = "palnet") String userId,
@Parameter(name="hpno", description = "회원 핸드폰번호", in = ParameterIn.QUERY, example = "01012345678") String hpno) {
Map<String, Object> resultMap = new HashMap<String, Object>();
if(userId == null || hpno == null) { // userId[회원아이디]와 memberName[회원이름]이 없을시 서버에서 파라미터가 없다는 "의도적인" 에러 반환
@ -276,14 +252,10 @@ public class AcntCrtfyhpController {
* @throws Exception
*/
@GetMapping(value = "/find/updatePw")
@ApiOperation(value = "비밀번호 찾기 및 업데이트")
@Tag(name = "휴대폰 인증 관리", description = "회원 휴대폰 인증 관련 API")
@ApiImplicitParams({
@ApiImplicitParam(name = "userID",value = "사용자ID", dataTypeClass = String.class),
@ApiImplicitParam(name = "hpno",value = "휴대폰번호", dataTypeClass = String.class),
@ApiImplicitParam(name = "newPw",value = "새로운 비밀번호", dataTypeClass = String.class)
})
public ResponseEntity<? extends BasicResponse> updatePw(String userId, String hpno, String newPw) throws Exception {
@Operation(summary = "새로운 비밀번호로 업데이트", description = "비밀번호 찾기 -> 인증번호 검증이 성공했을 경우, userId와 hpno가 일치하는 회원정보를 새로운 비밀번호로 업데이트 하는 API 입니다.")
public ResponseEntity<? extends BasicResponse> updatePw(@Parameter(name="userId", description = "회원 아이디", in = ParameterIn.QUERY, example = "palnet") String userId,
@Parameter(name="hpno", description = "회원 핸드폰번호", in = ParameterIn.QUERY, example = "01012345678") String hpno,
@Parameter(name="hpno", description = "회원 핸드폰번호", in = ParameterIn.QUERY, example = "newPassword1234") String newPw) throws Exception {
Map<String, Object> resultMap = new HashMap<String, Object>();
if(hpno == null || newPw == null) { // hpno[휴대폰번호]와 newPw[새로운 비밀번호]가 없을시 서버에서 파라미터가 없다는 "의도적인" 에러 반환

69
pav-server/src/main/java/com/palnet/biz/api/acnt/cstmr/controller/AcntCstmrController.java

@ -1,6 +1,26 @@
package com.palnet.biz.api.acnt.cstmr.controller;
import com.palnet.biz.api.acnt.cstmr.model.*;
import java.time.ZoneId;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.palnet.biz.api.acnt.cstmr.model.AcntCstmrEmModel;
import com.palnet.biz.api.acnt.cstmr.model.AcntCstmrPwModel;
import com.palnet.biz.api.acnt.cstmr.model.AcntCstmrRqModel;
import com.palnet.biz.api.acnt.cstmr.model.AcntCstmrRsModel;
import com.palnet.biz.api.acnt.cstmr.model.AnctCstmerRlModel;
import com.palnet.biz.api.acnt.cstmr.service.AcntCstmrService;
import com.palnet.biz.api.comn.response.BasicResponse;
import com.palnet.biz.api.comn.response.ErrorResponse;
@ -8,22 +28,15 @@ import com.palnet.biz.api.comn.response.SuccessResponse;
import com.palnet.biz.jpa.entity.PtyCstmrBas;
import com.palnet.biz.jpa.entity.PtyCstmrDtl;
import com.palnet.comn.exception.CustomException;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import lombok.extern.slf4j.Slf4j;
import java.time.ZoneId;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Log4j2
@Slf4j
@RestController
@RequiredArgsConstructor
@RequestMapping(value = "/api/acnt/cstmr", produces = {MediaType.APPLICATION_JSON_VALUE})
@ -38,8 +51,7 @@ public class AcntCstmrController {
* @return
*/
@PostMapping(value = "/register")
@ApiOperation(value = "회원 가입")
@Tag(name = "회원관리", description = "회원 관련 API")
@Operation(summary = "회원가입", description = "회원가입 API 입니다.")
public ResponseEntity<? extends BasicResponse> register(@RequestBody AcntCstmrRqModel rq) {
AcntCstmrRsModel result;
@ -76,10 +88,8 @@ public class AcntCstmrController {
* @return
*/
@GetMapping(value = "/profile/{cstmrSno}")
@ApiOperation(value = "회원 정보")
@Tag(name = "회원관리", description = "회원 관련 API")
@ApiImplicitParam(name = "cstmrSno",value = "고객일련번호", dataTypeClass = Integer.class)
public ResponseEntity<? extends BasicResponse> mypage(@PathVariable Integer cstmrSno){
@Operation(summary = "회원 정보 조회", description = "회원 고유 넘버로 회원 정보를 조회합니다. cstmrSno 예시 : 1, 2, 3 ....")
public ResponseEntity<? extends BasicResponse> mypage(@Parameter(name="cstmrSno", description = "회원번호", in = ParameterIn.PATH, example = "3") @PathVariable Integer cstmrSno){
List<AnctCstmerRlModel> result = null;
try {
@ -110,8 +120,7 @@ public class AcntCstmrController {
* @return
*/
@PostMapping(value = "/profile/pswdupdate")
@ApiOperation(value = "회원 패스워드 변경")
@Tag(name = "회원관리", description = "회원 관련 API")
@Operation(summary = "회원 패스워드 변경", description = "회원의 비밀번호를 변경합니다.")
public ResponseEntity<? extends BasicResponse> passwordupdate(@RequestBody AcntCstmrPwModel rq){
Map<String, Object> resultMap = new HashMap<String, Object>();
try {
@ -154,12 +163,11 @@ public class AcntCstmrController {
* @return
*/
@PostMapping(value = "/profile/pwcheck")
@ApiOperation(value = "회원 기존 패스워드 확인")
@Tag(name = "회원관리", description = "회원 관련 API")
public ResponseEntity<? extends BasicResponse> extendpsw(@RequestBody Map<String,String> userPswdMap){
@Operation(summary = "기존 회원의 패스워드 확인", description = " jwt토큰에 등록된 유저정보와 패스워드가 일치하는지 확인합니다. 입력 예시 -> userPswd : test1234 ")
public ResponseEntity<? extends BasicResponse> extendpsw(@Parameter(name="userPswd", description = "유저 비밀번호", in = ParameterIn.QUERY, example = "test1234") String userPswd){
Map<String, Object> resultMap = new HashMap<String, Object>();
try {
boolean result = service.extendpsw(userPswdMap.get("userPswd")); // 기존 암호가 맞는지 확인하는 기능.
boolean result = service.extendpsw(userPswd); // 기존 암호가 맞는지 확인하는 기능.
resultMap.put("result", result);
} catch (CustomException e) {
@ -198,8 +206,7 @@ public class AcntCstmrController {
* @return
*/
@PutMapping(value = "/profile/update")
@ApiOperation(value = "회원 정보 변경 (이메일,핸드폰)")
@Tag(name = "회원관리", description = "회원 관련 API")
@Operation(summary = "회원정보 수정", description = "토큰을 발급한 ID의 회원정보(이메일, 휴대폰번호)를 업데이트 하는 API 입니다.")
public ResponseEntity<? extends BasicResponse> updateEmail(@RequestBody AcntCstmrEmModel rq){
Map<String, Object> resultMap = new HashMap<String, Object>();
try {
@ -244,10 +251,8 @@ public class AcntCstmrController {
* @return
*/
@PostMapping(value = "/profile/delete/{cstmrSno}")
@ApiOperation(value = "회원 탈퇴")
@Tag(name = "회원관리", description = "회원 관련 API")
@ApiImplicitParam(name = "cstmrSno",value = "고객일련번호", dataTypeClass = Integer.class)
public ResponseEntity<? extends BasicResponse> userDelete(@PathVariable Integer cstmrSno){
@Operation(summary = "회원 탈퇴", description = "cstmrSno를 받아 회원탈퇴 처리하는 API 입니다.")
public ResponseEntity<? extends BasicResponse> userDelete(@Parameter(name="cstmrSno", description = "회원 일련번호", in = ParameterIn.PATH, example = "27")@PathVariable Integer cstmrSno){
Map<String, Object> resultMap = new HashMap<String, Object>();
try {

10
pav-server/src/main/java/com/palnet/biz/api/acnt/cstmr/model/AcntCstmrEmModel.java

@ -1,20 +1,26 @@
package com.palnet.biz.api.acnt.cstmr.model;
import lombok.Data;
import java.time.Instant;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Data
public class AcntCstmrEmModel {
@Schema(description = "유저 이메일" , example = "updateEmail@test.co.kr")
private String email;
@Schema(description = "업데이트 일자", example = "2023-12-12", implementation = String.class)
private Instant updateDt;
@Schema(hidden = true)
private String updateUserId;
@Schema(hidden = true)
private int cstmrSno;
@Schema(description = "업데이트할 핸드폰 번호", example = "01023457777")
private String hpno;

9
pav-server/src/main/java/com/palnet/biz/api/acnt/cstmr/model/AcntCstmrPwModel.java

@ -1,17 +1,22 @@
package com.palnet.biz.api.acnt.cstmr.model;
import lombok.Data;
import java.time.Instant;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Data
public class AcntCstmrPwModel {
@Schema(hidden = true)
private Instant pswdupdtDt;
@Schema(description = "유저의 기존 비밀번호", example = "test1234")
private String userPswd;
@Schema(description = "유저의 새로운 비밀번호", example = "test12345")
private String newPswd;
@Schema(description = "유저의 새로운 비밀번호(확인)", example = "test12345")
private String newPswdConfirm;
}

25
pav-server/src/main/java/com/palnet/biz/api/acnt/cstmr/model/AcntCstmrRqModel.java

@ -1,53 +1,74 @@
package com.palnet.biz.api.acnt.cstmr.model;
import java.time.Instant;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.palnet.biz.config.convert.InstantDateStrSerializer;
import lombok.Data;
import java.time.Instant;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Data
public class AcntCstmrRqModel{
@Schema(description = "고객구분코드" , example = "MEMBER")
private String cstrmDivCd;
@Schema(description = "고객상태코드" , example = "A")
private String cstrmStatusCd;
@Schema(description = "유저 아이디(중복인 경우 숫자 변경)" , example = "tester01")
private String userId;
@Schema(description = "유저 권한" , example = "USER")
private String authId;
@Schema(description = "사이트 코드" , example = "DRON")
private String siteCode;
@Schema(hidden = true)
private String memberDivCd;
@Schema(description = "유저 비밀번호" , example = "test1234")
private String userPswd;
@Schema(hidden = true)
private String ipinDi;
@Schema(hidden = true)
private String ipinCi;
@Schema(description = "가입인증 수단 코드" , example = "HP_CRTFD")
private String joinCrtfyCd;
@Schema(description = "국가코드" , example = "KOR")
private String cntryCd;
@Schema(description = "성별코드" , example = "M")
private String genderCd;
@Schema(description = "멤버 이름" , example = "TESTER")
private String memberName;
@JsonSerialize(using = InstantDateStrSerializer.class)
@Schema(description = "생년월일", example = "1997-05-05", implementation = String.class)
private Instant brthdyDate;
@Schema(hidden = true)
private Instant testDt;
@Schema(description = "이메일" , example = "tester@test.co.kr")
private String email;
@Schema(description = "멤버 이름" , example = "01012345678")
private String hpno;
@Schema(description = "국가 코드" , example = "+82")
private String clncd;
private AnctCstmrTermsModel[] terms;
@Schema(hidden = true)
private String trmnlId;

9
pav-server/src/main/java/com/palnet/biz/api/acnt/cstmr/model/AnctCstmrPswdModel.java

@ -0,0 +1,9 @@
package com.palnet.biz.api.acnt.cstmr.model;
import lombok.Data;
@Data
public class AnctCstmrPswdModel {
private String userPswd;
}

3
pav-server/src/main/java/com/palnet/biz/api/acnt/cstmr/model/AnctCstmrTermsModel.java

@ -1,9 +1,12 @@
package com.palnet.biz.api.acnt.cstmr.model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Data
public class AnctCstmrTermsModel {
@Schema(description = "약관 일련번호", example = "1")
private int termsSno;
@Schema(description = "동의여부", example = "Y")
private String agreeYn;
}

3
pav-server/src/main/java/com/palnet/biz/api/acnt/cstmr/service/AcntCstmrService.java

@ -324,6 +324,7 @@ public class AcntCstmrService {
List<JwtGroupModel> groupInfo = jwtTokenUtil.getGroupAuthByToken(); // 회원의 속한 그룹을 조회
if(groupInfo != null) {
for(JwtGroupModel group : groupInfo) {
// if(group.getGroupAuthCd().equals("CREATER")) {
@ -368,7 +369,7 @@ public class AcntCstmrService {
}
}
}
}
// 데이터베이스에 있는 회원 정보를 탈퇴처리 후 저장함
PtyCstmrBas userEntity = ptyCstmrBasRepository.findByUserGroupId(cstmrSno);
userEntity.setCstmrStatusCd("W");

74
pav-server/src/main/java/com/palnet/biz/api/acnt/jwt/controller/JwtAuthenticationController.java

@ -1,5 +1,18 @@
package com.palnet.biz.api.acnt.jwt.controller;
import java.util.Map;
import io.swagger.v3.oas.annotations.media.Schema;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.palnet.biz.api.acnt.jwt.model.JwtProfileRsModel;
import com.palnet.biz.api.acnt.jwt.model.JwtRqModel;
import com.palnet.biz.api.acnt.jwt.model.JwtRsModel;
@ -11,35 +24,24 @@ import com.palnet.biz.api.comn.response.ErrorResponse;
import com.palnet.biz.api.comn.response.SuccessResponse;
import com.palnet.biz.jpa.entity.PtyCstmrBas;
import com.palnet.comn.code.RSErrorCode;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
import lombok.extern.slf4j.Slf4j;
@Slf4j
@RestController
@RequiredArgsConstructor
@Log4j2
@RequestMapping(value = "/api/acnt/jwt", produces = {MediaType.APPLICATION_JSON_VALUE})
@Tag(name = "JWT 토큰 이용", description = "JWT 토큰 관련 API")
public class JwtAuthenticationController {
@Autowired
private JwtTokenUtil jwtTokenUtil;
@Autowired
private JwtUserDetailsService userDetailsService;
@Autowired
private JwtService service;
private final JwtTokenUtil jwtTokenUtil;
private final JwtUserDetailsService userDetailsService;
private final JwtService service;
/**
* 로그인 기능,
@ -49,8 +51,7 @@ public class JwtAuthenticationController {
* @throws Exception
*/
@PostMapping(value = "/login")
@ApiOperation(value = "로그인")
@Tag(name = "JWT 토큰 이용", description = "JWT 토큰 관련 API")
@Operation(summary = "로그인", description = "ID와 PASSWORD를 입력받아 로그인 처리하는 API 입니다.")
public ResponseEntity<? extends BasicResponse> createAuthenticationToken(@RequestBody JwtRqModel authenticationRequest) throws Exception {
// 로그인 프로세스
@ -83,10 +84,9 @@ public class JwtAuthenticationController {
* @throws Exception
*/
@GetMapping(value = "/profile/{cstmrSno}")
@ApiOperation(value = "로그인한 회원의 정보")
@Tag(name = "JWT 토큰 이용", description = "JWT 토큰 관련 API")
@ApiImplicitParam(name = "cstmrSno",value = "고객일련번호", dataTypeClass = Integer.class)
public ResponseEntity<? extends BasicResponse> proflie(@PathVariable Integer cstmrSno) throws Exception{
@Operation(summary = "로그인한 회원의 정보", description = "로그인 된 유저의 정보를 가져오는 API 입니다.")
public ResponseEntity<? extends BasicResponse> proflie(
@Parameter(name="cstmrSno", description = "회원번호", in = ParameterIn.PATH, example = "3")@PathVariable Integer cstmrSno) throws Exception{
JwtProfileRsModel result = service.profile(cstmrSno); // 회원고유번호로 회원정보를 가져오는 기능.
if(result == null) {
@ -105,10 +105,15 @@ public class JwtAuthenticationController {
* @throws Exception
*/
@PostMapping(value = "/refresh")
@Tag(name = "JWT 토큰 이용", description = "JWT 토큰 관련 API")
// public ResponseEntity<? extends BasicResponse> refresh(@RequestParam("cstmrSno") int cstmrSno , @RequestParam("refreshToken") String refreshToken) throws Exception{
public ResponseEntity<? extends BasicResponse> refresh(@RequestBody Map body) throws Exception{
@Operation(summary = "JWT 재인가토큰 발급", description = "JWT 토큰을 재발급하는 API 입니다. <br> { <br> \"cstmrSno\" : 2, <br> \"refreshToken\" : \"palnet을 제외한 token 전체를 입력\" <br> } <br> 위의 예시와 같이 값을 입력하시면 됩니다. cstmrSno는 토큰의 ID와 매핑되는 값이어야 합니다.")
public ResponseEntity<? extends BasicResponse> refresh(
@RequestBody
@Schema(example = "{\n" +
"\"cstmrSno\" : 2,\n" +
"\"refreshToken\" : \"palnet을 제외한 token 전체를 입력\"\n" +
"}")
Map body
) throws Exception {
// 회원고유번호[cstmrSno], 회원고유번호[cstmrSno]가 Integer타입인지, 인가정보를 다시받을 토큰값 [refreshToken] 입력값에 대한 검증처리
if(body.get("cstmrSno") == null || body.get("refreshToken") == null || !(body.get("cstmrSno") instanceof Integer)) {
@ -130,7 +135,7 @@ public class JwtAuthenticationController {
return ResponseEntity.status(HttpStatus.OK)
.body(new ErrorResponse(RSErrorCode.DATA_NOTFOUNT));
}
return ResponseEntity.ok().body(new SuccessResponse<JwtRsModel>(result));
return ResponseEntity.ok().body(new SuccessResponse<>(result));
}
/**
@ -140,10 +145,9 @@ public class JwtAuthenticationController {
* @throws Exception
*/
@GetMapping(value = "/logout/{cstmrSno}")
@ApiOperation(value = "로그아웃 한 회원의 정보")
@Tag(name = "JWT 토큰 이용", description = "JWT 토큰 관련 API")
@ApiImplicitParam(name = "cstmrSno",value = "고객일련번호", dataTypeClass = Integer.class)
public ResponseEntity<? extends BasicResponse> logout(@PathVariable Integer cstmrSno) throws Exception{
@Operation(summary = "회원 로그아웃", description = "회원을 로그아웃 시키는 API 입니다.")
public ResponseEntity<? extends BasicResponse> logout(
@Parameter(name="cstmrSno", description = "회원번호", in = ParameterIn.PATH, example = "3")@PathVariable Integer cstmrSno) throws Exception{
// if(cstmrSno == null || !(body.get("cstmrSno") instanceof Integer)) {
// return ResponseEntity.status(HttpStatus.OK)

5
pav-server/src/main/java/com/palnet/biz/api/acnt/jwt/model/JwtRqModel.java

@ -6,6 +6,8 @@ import lombok.NoArgsConstructor;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
@NoArgsConstructor
@AllArgsConstructor
@ -14,6 +16,9 @@ public class JwtRqModel implements Serializable {
private static final long serialVersionUID = 5926468583005150707L;
@Schema(description = "로그인 ID" , example = "loginSample01")
private String userId;
@Schema(description = "FAQ 카테고리" , example = "sample1234")
private String userPswd;
}

4
pav-server/src/main/java/com/palnet/biz/api/acnt/jwt/utils/JwtTokenUtil.java

@ -5,7 +5,7 @@ import com.palnet.biz.api.acnt.jwt.model.JwtUserModel;
import io.jsonwebtoken.Claims;
import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.SignatureAlgorithm;
import lombok.extern.log4j.Log4j2;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.stereotype.Component;
@ -17,8 +17,8 @@ import java.io.Serializable;
import java.util.*;
import java.util.function.Function;
@Slf4j
@Component
@Log4j2
public class JwtTokenUtil implements Serializable {
private static final long serialVersionUID = -2550185165626007488L;

5
pav-server/src/main/java/com/palnet/biz/api/acnt/terms/controller/AcntTermsController.java

@ -6,7 +6,7 @@ import com.palnet.biz.api.acnt.terms.service.AcntTermsService;
import com.palnet.biz.api.comn.response.BasicResponse;
import com.palnet.biz.api.comn.response.ErrorResponse;
import com.palnet.biz.api.comn.response.SuccessResponse;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
@ -34,9 +34,8 @@ public class AcntTermsController {
* @param rq
* @return
*/
@Operation(summary = "약관 조회", description = "약관 정보를 조회하는 API 입니다.")
@GetMapping(value = "/list")
@Tag(name = "약관 기본", description = "약관 관련 API")
@ApiOperation(value = "약관 기본 정보")
public ResponseEntity<? extends BasicResponse> list(AcntTermsRqModel rq) {
List<AcntTermsRsModel> result = null;

7
pav-server/src/main/java/com/palnet/biz/api/acnt/terms/model/AcntTermsRqModel.java

@ -1,5 +1,6 @@
package com.palnet.biz.api.acnt.terms.model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@ -10,7 +11,13 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor
@AllArgsConstructor
public class AcntTermsRqModel {
@Schema(description = "사이트 코드" , example = "SANDBOX")
private String siteCd;
@Schema(description = "약관 카테고리 코드" , example = "SITE_JOIN")
private String termsCtgryCd;
@Schema(description = "언어 코드" , example = "KOR")
private String langDivCd;
}

31
pav-server/src/main/java/com/palnet/biz/api/anls/hstry/controller/AnlsHstryController.java

@ -9,11 +9,13 @@ import com.palnet.biz.api.comn.response.BasicResponse;
import com.palnet.biz.api.comn.response.ErrorResponse;
import com.palnet.biz.api.comn.response.SuccessResponse;
import com.palnet.comn.code.RSErrorCode;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
@ -24,7 +26,7 @@ import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@Log4j2
@Slf4j
@RestController
@RequiredArgsConstructor
@RequestMapping(value = "/api/anls/hstry", produces = {MediaType.APPLICATION_JSON_VALUE})
@ -40,8 +42,7 @@ public class AnlsHstryController {
* @return
*/
@GetMapping(value = "/list")
@ApiOperation(value = "비행 현황 목록 출력")
@Tag(name = "비행 이력 현황", description = "비행 이력 현황 관련 API")
@Operation(summary = "비행 현황 목록 출력", description = "비행 현황 목록을 출력하는 API 입니다.")
public ResponseEntity<? extends BasicResponse> list(AnlsHstryGroupModel rq) {
List<AnlsHstryModel> rs = null;
ComnPagingRs<AnlsHstryModel> response;
@ -80,10 +81,10 @@ public class AnlsHstryController {
* @return
*/
@GetMapping(value = "/detail/{id}")
@ApiOperation(value = "비행 현황 상세")
@Tag(name = "비행 이력 현황", description = "비행 이력 현황 관련 API")
@ApiImplicitParam(name = "id",value = "관제ID", dataTypeClass = String.class)
public ResponseEntity<? extends BasicResponse> detail(@PathVariable String id) {
@Operation(summary = "비행 현황 상세 정보 출력", description = "비행 현황 상세 정보를 출력하는 API 입니다.")
public ResponseEntity<? extends BasicResponse> detail(
@Parameter(name="id", description = "개체 비행 ID", in = ParameterIn.PATH, example = "061fbd9d-25c5-4801-bb11-2307a8eb8d8f") @PathVariable String id) {
AnlsHstryModel result = null;
try {
@ -114,10 +115,12 @@ public class AnlsHstryController {
* @return
*/
@GetMapping(value = "/log/{id}")
@ApiOperation(value = "비행 이력 데이터")
@Tag(name = "비행 이력 현황", description = "비행 이력 현황 관련 API")
@ApiImplicitParam(name = "id",value = "관제ID", dataTypeClass = String.class)
public ResponseEntity<? extends BasicResponse> log(@PathVariable String id) {
// @ApiOperation(value = "비행 이력 데이터")
// @Tag(name = "비행 이력 현황", description = "비행 이력 현황 관련 API")
// @ApiImplicitParam(name = "id",value = "관제ID", dataTypeClass = String.class)
@Operation(summary = "비행 현황 이력 출력", description = "비행 현황의 이력을 출력하는 API 입니다.")
public ResponseEntity<? extends BasicResponse> log(
@Parameter(name="id", description = "개체 비행 ID", in = ParameterIn.PATH, example = "061fbd9d-25c5-4801-bb11-2307a8eb8d8f") @PathVariable String id) {
List<AnlsHstryDetailModel> result = null;
try {

7
pav-server/src/main/java/com/palnet/biz/api/anls/hstry/model/AnlsHstryGroupModel.java

@ -1,6 +1,8 @@
package com.palnet.biz.api.anls.hstry.model;
import com.palnet.biz.api.comn.model.ComnPagingModel;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
@ -8,14 +10,19 @@ import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper=false)
public class AnlsHstryGroupModel extends ComnPagingModel {
@Schema(description = "검색 시작날짜" , example = "2023-11-01", implementation = String.class)
private String stDate;
@Schema(description = "검색 종료날짜" , example = "2023-11-30", implementation = String.class)
private String endDate;
@Schema(hidden = true)
private String search1;
@Schema(hidden = true)
private String searchType1;
@Schema(description = "그룹 아이디", example = "C807F9")
private String groupId;
}

3
pav-server/src/main/java/com/palnet/biz/api/anls/hstry/model/AnlsHstryRqModel.java

@ -2,11 +2,14 @@ package com.palnet.biz.api.anls.hstry.model;
import com.palnet.biz.api.comn.model.ComnRqModel;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper=false)
public class AnlsHstryRqModel extends ComnRqModel {
@Schema(description = "개체 비행 ID" , example = "061fbd9d-25c5-4801-bb11-2307a8eb8d8f")
private String cntrlId;
}

41
pav-server/src/main/java/com/palnet/biz/api/anls/hstry/service/AnlsHstryService.java

@ -5,6 +5,8 @@ import java.util.List;
import java.util.Optional;
import com.palnet.biz.api.comn.model.ComnPagingRs;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
@ -35,37 +37,20 @@ import com.palnet.biz.jpa.repository.pty.PtyCstmrGroupRepository;
import com.palnet.comn.code.ErrorCode;
import com.palnet.comn.exception.CustomException;
@Slf4j
@RequiredArgsConstructor
@Service
public class AnlsHstryService {
private Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private CtrCntrlBasRepository ctrCntrlBasRepository;
@Autowired
private PtyCstmrGroupRepository ptyCstmrGroupRepository;
@Autowired
private ComArcrftBasRepository comArcrftBasRepository;
@Autowired
private ComIdntBasRepository comIdntBasRepository;
@Autowired
private CtrCntrlHstryAreaRepository ctrCntrlHstryAreaRepository;
@Autowired
private FltPlanBasRepository fltPlanBasRepository;
@Autowired
private FltPlanPilotRepository fltPlanPilotRepository;
@Autowired
private CtrCntrlQueryRepository query;
@Autowired
private JwtTokenUtil jwtTokenUtil;
private final CtrCntrlBasRepository ctrCntrlBasRepository;
private final PtyCstmrGroupRepository ptyCstmrGroupRepository;
private final ComArcrftBasRepository comArcrftBasRepository;
private final ComIdntBasRepository comIdntBasRepository;
private final CtrCntrlHstryAreaRepository ctrCntrlHstryAreaRepository;
private final FltPlanBasRepository fltPlanBasRepository;
private final FltPlanPilotRepository fltPlanPilotRepository;
private final CtrCntrlQueryRepository query;
private final JwtTokenUtil jwtTokenUtil;
/**
* 비행현황 목록 조회하는 기능.

59
pav-server/src/main/java/com/palnet/biz/api/anls/smlt/controller/AnlsSmltController.java

@ -1,20 +1,5 @@
package com.palnet.biz.api.anls.smlt.controller;
import java.util.List;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.palnet.biz.api.anls.hstry.model.AnlsHstryDetailModel;
import com.palnet.biz.api.anls.hstry.model.AnlsHstryModel;
import com.palnet.biz.api.anls.hstry.model.AnlsHstryRqModel;
@ -28,8 +13,22 @@ import com.palnet.biz.api.comn.response.SuccessResponse;
import com.palnet.comn.code.RSErrorCode;
import com.palnet.comn.utils.JsonUtils;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@Log4j2
@RestController
@ -48,8 +47,7 @@ public class AnlsSmltController {
* @return
*/
@GetMapping(value = "/list")
@ApiOperation(value = "비행 현황 목록")
@Tag(name = "비행 시뮬레이션", description = "비행 이력 시뮬레이션 관련 API")
@Operation(summary = "비행 시뮬레이션 - 비행 현황 목록", description = "비행 시뮬레이션에서 비행 현황 목록을 조회하는 API 입니다.")
public ResponseEntity<? extends BasicResponse> list(AnlsHstryRqModel rq) {
ComnPagingRs<AnlsHstryModel> result = null;
@ -86,16 +84,15 @@ public class AnlsSmltController {
/**
* 비행 이력 데이터 조회하는 기능,
* 비행 이력 데이터 조회하는 기능,061fbd9d-25c5-4801-bb11-2307a8eb8d8f
* 비행ID[CNTRL_ID] 조회함
* @param rq
* @return
*/
@GetMapping(value = "/hist/{id}")
@ApiOperation(value = "비행 이력 데이터 조회")
@Tag(name = "비행 시뮬레이션", description = "비행 이력 시뮬레이션 관련 API")
@ApiImplicitParam(name = "id",value = "관제ID", dataTypeClass = String.class)
public ResponseEntity<? extends BasicResponse> histList(@PathVariable String id) {
@Operation(summary = "비행 시뮬레이션 - 비행 이력 데이터 조회", description = "비행 시뮬레이션에서 비행 이력 데이터를 조회하는 API 입니다.")
public ResponseEntity<? extends BasicResponse> histList(
@Parameter(name="id", description = "개체 비행 ID", in = ParameterIn.PATH, example = "061fbd9d-25c5-4801-bb11-2307a8eb8d8f") @PathVariable String id) {
List<AnlsHstryDetailModel> result = null;
try {
@ -127,10 +124,10 @@ public class AnlsSmltController {
* @return
*/
@GetMapping(value = "/stcs/{id}")
@ApiOperation(value = "통계 데이터 조회")
@Tag(name = "비행 시뮬레이션", description = "비행 이력 시뮬레이션 관련 API")
@ApiImplicitParam(name = "id",value = "관제ID", dataTypeClass = String.class)
public ResponseEntity<? extends BasicResponse> stcsList(@PathVariable String id) {
@Operation(summary = "비행 시뮬레이션 - 비행 이력 통계 데이터 조회", description = "비행 시뮬레이션에서 비행 이력 통계 데이터 조회하는 API 입니다.")
public ResponseEntity<? extends BasicResponse> stcsList(
@Parameter(name="id", description = "개체 비행 ID", in = ParameterIn.PATH, example = "061fbd9d-25c5-4801-bb11-2307a8eb8d8f") @PathVariable String id) {
List<AnlsSmltStcsModel> result = null;
@ -161,10 +158,12 @@ public class AnlsSmltController {
* @return
*/
@GetMapping(value = "/detail/{id}")
@ApiOperation(value = "비행 상세정보 조회")
@Tag(name = "비행 시뮬레이션", description = "비행 이력 시뮬레이션 관련 API")
@ApiImplicitParam(name = "id",value = "관제ID", dataTypeClass = String.class)
public ResponseEntity<? extends BasicResponse> detail(@PathVariable String id) {
// @ApiOperation(value = "비행 상세정보 조회")
// @Tag(name = "비행 시뮬레이션", description = "비행 이력 시뮬레이션 관련 API")
// @ApiImplicitParam(name = "id",value = "관제ID", dataTypeClass = String.class)
@Operation(summary = "비행 시뮬레이션 - 비행 상세 정보 조회", description = "비행 시뮬레이션에서 비행 상세 정보 데이터를 조회하는 API 입니다.")
public ResponseEntity<? extends BasicResponse> detail(
@Parameter(name="id", description = "개체 비행 ID", in = ParameterIn.PATH, example = "061fbd9d-25c5-4801-bb11-2307a8eb8d8f")@PathVariable String id) {
AnlsSmltDetailModel result = null;
try {

67
pav-server/src/main/java/com/palnet/biz/api/bas/dron/controller/BasDronController.java

@ -1,9 +1,6 @@
package com.palnet.biz.api.bas.dron.controller;
import com.palnet.biz.api.bas.dron.model.BasDronModel;
import com.palnet.biz.api.bas.dron.model.BasDronRqModel;
import com.palnet.biz.api.bas.dron.model.BasIdntfModel;
import com.palnet.biz.api.bas.dron.model.BasIdntfRqModel;
import com.palnet.biz.api.bas.dron.model.*;
import com.palnet.biz.api.bas.dron.service.BasDronService;
import com.palnet.biz.api.comn.model.ComnPagingRs;
import com.palnet.biz.api.comn.response.BasicResponse;
@ -11,11 +8,13 @@ import com.palnet.biz.api.comn.response.ErrorResponse;
import com.palnet.biz.api.comn.response.SuccessResponse;
import com.palnet.comn.code.RSErrorCode;
import com.palnet.comn.exception.CustomException;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
@ -45,8 +44,7 @@ public class BasDronController {
* @return
*/
@GetMapping(value = "/list")
@ApiOperation(value = "드론 목록 조회")
@Tag(name = "드론 컨트롤러", description = "드론 관련 API")
@Operation(summary = "드론목록 조회", description = "검색조건에 맞춰 드론목록을 조회합니다.")
public ResponseEntity<? extends BasicResponse> list(BasDronRqModel rq) {
ComnPagingRs<BasDronModel> result = null;
@ -75,7 +73,6 @@ public class BasDronController {
}
return ResponseEntity.ok().body(new SuccessResponse<>(result));
}
@ -86,10 +83,8 @@ public class BasDronController {
* @return
*/
@GetMapping(value = "/idntf/list/{id}")
@ApiOperation(value = "식별정보 조회")
@Tag(name = "드론 컨트롤러", description = "드론 관련 API")
@ApiImplicitParam(name = "id",value = "기체일련번호", dataTypeClass = Integer.class)
public ResponseEntity<? extends BasicResponse> mylist(@PathVariable Integer id) {
@Operation(summary = "드론정보 조회", description = "드론[기체]일련번호로 식별장치를 조회합니다.")
public ResponseEntity<? extends BasicResponse> mylist(@Parameter(name="id", description = "기체일련번호", in = ParameterIn.PATH, example = "6") @PathVariable Integer id) {
List<BasIdntfModel> result = null;
// 기체일련번호확인[id] 입력값 검증처리
@ -128,10 +123,8 @@ public class BasDronController {
* @return
*/
@GetMapping(value = "/detail/{id}")
@ApiOperation(value = "드론 상세 조회")
@Tag(name = "드론 컨트롤러", description = "드론 관련 API")
@ApiImplicitParam(name = "id",value = "기체일련번호", dataTypeClass = Integer.class)
public ResponseEntity<? extends BasicResponse> detail(@PathVariable Integer id) {
@Operation(summary = "드론정보 상세조회", description = "기체일련번호로 드론상세 조회합니다.")
public ResponseEntity<? extends BasicResponse> detail(@Parameter(name="id", description = "기체일련번호", in = ParameterIn.PATH, example = "1") @PathVariable Integer id) {
BasDronModel result = null;
try {
@ -169,13 +162,19 @@ public class BasDronController {
* @return
*/
@PostMapping(value = "/create")
@ApiOperation(value = "드론정보 생성")
@Tag(name = "드론 컨트롤러", description = "드론 관련 API")
public ResponseEntity<? extends BasicResponse> create(@RequestBody BasDronModel rq) {
@Operation(summary = "드론정보 추가", description = "드론[기체] 정보를 추가합니다, 예시를 바꿔 추가할 수 있습니다.")
// @ApiOperation(value = "드론정보 생성")
// @Tag(name = "드론 컨트롤러", description = "드론 관련 API")
public ResponseEntity<? extends BasicResponse> create(@RequestBody BasDronInsertModel rq) {
Map<String , Object> resultMap = new HashMap<String,Object>();
BasDronModel basDronModel = new BasDronModel();
BeanUtils.copyProperties(rq, basDronModel);
log.warn("basDronModel => {}", basDronModel);
try {
boolean result = service.create(rq); // 드론 정보 생성하는 기능.
boolean result = service.create(basDronModel); // 드론 정보 생성하는 기능.
resultMap.put("result", result);
@ -215,8 +214,7 @@ public class BasDronController {
* @return
*/
@PostMapping(value = "/idntf/create")
@ApiOperation(value = "식별장치 생성")
@Tag(name = "드론 컨트롤러", description = "드론 관련 API")
@Operation(summary = "드론식별장치정보 추가", description = "드론의 식별장치정보를 추가합니다, 예시를 바꿔 추가할 수 있습니다.")
public ResponseEntity<? extends BasicResponse> createIdntf(@RequestBody BasIdntfRqModel rq) {
Map<String , Object> resultMap = new HashMap<String,Object>();
@ -263,13 +261,15 @@ public class BasDronController {
* @return
*/
@PutMapping(value = "/update")
@ApiOperation(value = "드론정보 수정")
@Tag(name = "드론 컨트롤러", description = "드론 관련 API")
public ResponseEntity<? extends BasicResponse> update(@RequestBody BasDronModel rq) {
@Operation(summary = "드론정보 수정", description = "드론[기체] 정보를 수정합니다, 예시를 바꿔 추가할 수 있습니다.")
public ResponseEntity<? extends BasicResponse> update(@RequestBody BasDronUpdateModel rq) {
Map<String , Object> resultMap = new HashMap<String,Object>();
BasDronModel basDronModel = new BasDronModel();
BeanUtils.copyProperties(rq, basDronModel);
try {
boolean result = service.update(rq); // 드론정보 수정하는 기능.
boolean result = service.update(basDronModel); // 드론정보 수정하는 기능.
resultMap.put("result", result);
@ -311,10 +311,8 @@ public class BasDronController {
* @return
*/
@DeleteMapping(value = "/delete/{id}")
@ApiOperation(value = "드론정보 삭제")
@Tag(name = "드론 컨트롤러", description = "드론 관련 API")
@ApiImplicitParam(name = "id",value = "기체일련번호", dataTypeClass = Integer.class)
public ResponseEntity<? extends BasicResponse> delete(@PathVariable Integer id) {
@Operation(summary = "드론정보 삭제", description = "드론[기체] 정보를 삭제합니다. [예제값은 이미 삭제되어있을 수도 있으니 드론기체를 추가해서 삭제 테스트 진행해주세요.]")
public ResponseEntity<? extends BasicResponse> delete(@Parameter(name="id", description = "기체일련번호", in = ParameterIn.PATH, example = "6") @PathVariable Integer id) {
Map<String , Object> resultMap = new HashMap<String,Object>();
try {
@ -345,14 +343,11 @@ public class BasDronController {
* @return
*/
@DeleteMapping(value = "/idntf/delete/{id}")
@ApiOperation(value = "식별장치 삭제")
@Tag(name = "드론 컨트롤러", description = "드론 관련 API")
@ApiImplicitParam(name = "id",value = "식별번호", dataTypeClass = String.class)
public ResponseEntity<? extends BasicResponse> deleteIdntf(@PathVariable String id) {
@Operation(summary = "드론식별장치 삭제", description = "드론[기체]식별장치 정보를 삭제합니다. [예제값은 이미 삭제되어있을 수도 있으니 식별장치를 추가해서 삭제 테스트 진행해주세요.]")
public ResponseEntity<? extends BasicResponse> deleteIdntf(@Parameter(name="id", description = "기체식별장치 일련번호", in = ParameterIn.PATH, example = "PA0003")@PathVariable String id) {
Map<String , Object> resultMap = new HashMap<String,Object>();
try {
// 기체일련번호확인[id] 입력값 검증처리
if(StringUtils.isEmpty(id)) {
// 검증통과하지 못할 시 서버에서 "의도적인" 에러 반환

46
pav-server/src/main/java/com/palnet/biz/api/bas/dron/model/BasDronInsertModel.java

@ -0,0 +1,46 @@
package com.palnet.biz.api.bas.dron.model;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
import lombok.Data;
@Data
public class BasDronInsertModel {
@Schema(description = "그룹명", example = "KAC")
private String groupNm;
@Schema(description = "그룹아이디", example = "C807F9")
private String groupId;
@Schema(description = "제작번호", example = "PAV_KAC")
private String prdctNum;
@Schema(description = "기체모델명", example = "PAV_001")
private String arcrftModelNm;
@Schema(description = "기체종류코드 [01: 무인비행기, 02: 무인헬리콥터, 03: 멀티콥터, 04: 비행선]", example = "01")
private String arcrftTypeCd;
@Schema(description = "중량구분코드[-250G, 250G+2KG-, 2KG+7KG-, 25KG+]", example = "2KG+7KG-")
private String wghtTypeCd;
@Schema(description = "카메라 탑재 여부", example = "N")
private String cameraYn;
@Schema(description = "보험가입여부", example = "Y")
private String insrncYn;
@Schema(description = "제작자", example = "팔네트웍스")
private String prdctCmpnNm;
@Schema(description = "이미지 URL [업로드하는 이미지]", example = "PAV_KAC")
private String imageUrl;
@Schema(description = "등록사용자", example = "palnet")
private String createUserId;
@Schema(description = "수정한 사용자", example = "palnet")
private String updateUserId;
}

3
pav-server/src/main/java/com/palnet/biz/api/bas/dron/model/BasDronModel.java

@ -2,6 +2,9 @@ package com.palnet.biz.api.bas.dron.model;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.palnet.biz.config.convert.InstantDateStrSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
import lombok.Data;
import java.time.Instant;

9
pav-server/src/main/java/com/palnet/biz/api/bas/dron/model/BasDronRqModel.java

@ -2,6 +2,8 @@ package com.palnet.biz.api.bas.dron.model;
import com.palnet.biz.api.comn.model.ComnPagingModel;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
import lombok.Data;
import lombok.EqualsAndHashCode;
@ -9,15 +11,18 @@ import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper=false)
public class BasDronRqModel extends ComnPagingModel {
@Schema(description = "그룹아이디" , example = "C807F9", requiredMode = RequiredMode.REQUIRED)
private String groupId;
@Schema(description = "기체모델명" , example = "PAV_001", requiredMode = RequiredMode.NOT_REQUIRED)
private String arcrftModelNm;
@Schema(description = "기체종류코드" , example = "01", requiredMode = RequiredMode.NOT_REQUIRED)
private String arcrftTypeCd;
@Schema(description = "기체식별번호" , example = "PA0001", hidden = true)
private String idntfNum;
@Schema(description = "소유자 명" , example = "팔네트웍스", hidden = true)
private String ownerNm;
}

45
pav-server/src/main/java/com/palnet/biz/api/bas/dron/model/BasDronUpdateModel.java

@ -0,0 +1,45 @@
package com.palnet.biz.api.bas.dron.model;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
import lombok.Data;
@Data
public class BasDronUpdateModel {
@Schema(description = "그룹명", example = "KAC", implementation = String.class)
private String groupNm;
@Schema(description = "그룹아이디", example = "C807F9", implementation = String.class)
private String groupId;
@Schema(description = "제작번호", example = "PAV_KAC", implementation = String.class)
private String prdctNum;
@Schema(description = "기체모델명", example = "PAV_001", implementation = String.class)
private String arcrftModelNm;
@Schema(description = "기체종류코드 [01: 무인비행기, 02: 무인헬리콥터, 03: 멀티콥터, 04: 비행선]", example = "01", implementation = String.class)
private String arcrftTypeCd;
@Schema(description = "중량구분코드[-250G, 250G+2KG-, 2KG+7KG-, 25KG+]", example = "2KG+7KG-")
private String wghtTypeCd;
@Schema(description = "카메라 탑재 여부", example = "N", implementation = String.class)
private String cameraYn;
@Schema(description = "보험가입여부", example = "Y", implementation = String.class)
private String insrncYn;
@Schema(description = "제작자", example = "팔네트웍스", implementation = String.class)
private String prdctCmpnNm;
@Schema(description = "이미지 URL [업로드하는 이미지]", example = "PAV_KAC", implementation = String.class)
private String imageUrl;
@Schema(description = "기체일련번호", example = "6", requiredMode = RequiredMode.REQUIRED, implementation = Integer.class)
private Integer arcrftSno;
@Schema(description = "수정한 사용자", example = "palnet", implementation = String.class)
private String updateUserId;
}

15
pav-server/src/main/java/com/palnet/biz/api/bas/dron/model/BasIdntfModel.java

@ -4,28 +4,43 @@ import lombok.Data;
import java.time.Instant;
import io.swagger.v3.oas.annotations.media.Schema;
@Data
public class BasIdntfModel {
//식별 번호 정보
@Schema(hidden = true)
private String id;
@Schema(description = "식별장치 고유명", example = "PA0003")
private String idntfNum;
@Schema(hidden = true)
private String isSave;
@Schema(hidden = true)
private int arcrftSno;
@Schema(description = "식별장치종류코드", example = "DRON")
private String idntfTypeCd;
@Schema(description = "소유자명", example = "팔네트웍스")
private String ownerNm;
@Schema(description = "소유자 휴대폰번호", example = "01044322231")
private String hpno;
@Schema(hidden = true)
private Instant updateDt;
@Schema(hidden = true)
private Instant createDt;
@Schema(hidden = true)
private int cstmrSno;
@Schema(hidden = true)
private String groupId;
}

4
pav-server/src/main/java/com/palnet/biz/api/bas/dron/model/BasIdntfRqModel.java

@ -1,14 +1,18 @@
package com.palnet.biz.api.bas.dron.model;
import java.util.ArrayList;
import java.util.List;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Data
public class BasIdntfRqModel {
@Schema(description = "기체 식별정보들", implementation = BasIdntfModel.class)
private List<BasIdntfModel> data;
@Schema(description = "기체일련번호", example = "6")
private int arcrftSno;
}

132
pav-server/src/main/java/com/palnet/biz/api/bas/flight/controller/BasFlightController.java

@ -1,52 +1,6 @@
package com.palnet.biz.api.bas.flight.controller;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
import org.locationtech.jts.geom.Coordinate;
import org.locationtech.jts.geom.GeometryFactory;
import org.locationtech.jts.geom.MultiPoint;
import org.locationtech.jts.geom.Point;
import org.locationtech.jts.geom.Polygon;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.env.Environment;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.palnet.biz.api.bas.flight.model.BasFlightAprovRq;
import com.palnet.biz.api.bas.flight.model.BasFlightCoordModel;
import com.palnet.biz.api.bas.flight.model.BasFlightPlanArcrftModel;
import com.palnet.biz.api.bas.flight.model.BasFlightPlanAreaModel;
import com.palnet.biz.api.bas.flight.model.BasFlightPlanListRq;
import com.palnet.biz.api.bas.flight.model.BasFlightPlanModel;
import com.palnet.biz.api.bas.flight.model.BasFlightPlanPilotModel;
import com.palnet.biz.api.bas.flight.model.BasFlightScheduleRs;
import com.palnet.biz.api.bas.flight.model.BasFlightWeatherModel;
import com.palnet.biz.api.bas.flight.model.*;
import com.palnet.biz.api.bas.flight.service.BasFlightService;
import com.palnet.biz.api.comn.file.service.ComnFileService;
import com.palnet.biz.api.comn.model.ComnPagingRs;
@ -56,20 +10,33 @@ import com.palnet.biz.api.comn.response.SuccessResponse;
import com.palnet.biz.scheduler.ctr.service.CtrTrnsLctnService;
import com.palnet.comn.exception.CustomException;
import com.palnet.comn.utils.AreaUtils;
import com.palnet.comn.utils.FlightUtils;
import com.palnet.comn.utils.PdfUtils;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
import org.locationtech.jts.geom.Coordinate;
import org.springframework.core.env.Environment;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import java.io.*;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Slf4j
@Tag(name = "비행계획서", description = "비행계획서 관련 API")
@RequiredArgsConstructor
@RestController
@RequestMapping(value = "/api/bas/flight", produces = {MediaType.APPLICATION_JSON_VALUE})
@Tag(name = "비행계획서", description = "비행계획서 관련 API")
public class BasFlightController {
private final BasFlightService basFlightService;
@ -86,7 +53,6 @@ public class BasFlightController {
* @throws ParseException
*/
@GetMapping("/area")
@Tag(name = "비행계획서", description = "비행계획서 관련 API")
public ResponseEntity<Object> findAirSpace() throws IOException, ParseException {
// 1. file read
@ -117,8 +83,8 @@ public class BasFlightController {
* @return
*/
@GetMapping(value = "/plan/list")
@ApiOperation(value = "비행계획서 조회")
@Tag(name = "비행계획서", description = "비행계획서 관련 API")
// @ApiOperation(value = "비행계획서 조회")
// @Tag(name = "비행계획서", description = "비행계획서 관련 API")
public ResponseEntity<? extends BasicResponse> findPlanList(BasFlightPlanListRq rq) {
ComnPagingRs<BasFlightPlanModel> result = null;
log.debug(">>> rq : {}", rq);
@ -147,9 +113,9 @@ public class BasFlightController {
* @return
*/
@GetMapping(value = "/plan/detail/{planSno}")
@ApiOperation(value = "비행계획서 상세 조회")
@Tag(name = "비행계획서", description = "비행계획서 관련 API")
@ApiImplicitParam(name = "planSno", value = "비행계획서일련번호", dataTypeClass = Integer.class)
// @ApiOperation(value = "비행계획서 상세 조회")
// @Tag(name = "비행계획서", description = "비행계획서 관련 API")
// @ApiImplicitParam(name = "planSno", value = "비행계획서일련번호", dataTypeClass = Integer.class)
public ResponseEntity<? extends BasicResponse> detailPlan(@PathVariable("planSno") Integer planSno) {
BasFlightPlanModel result = null;
try {
@ -177,8 +143,8 @@ public class BasFlightController {
* @return
*/
@PostMapping(value = "/plan/create")
@ApiOperation(value = "비행계획서 등록")
@Tag(name = "비행계획서", description = "비행계획서 관련 API")
// @ApiOperation(value = "비행계획서 등록")
// @Tag(name = "비행계획서", description = "비행계획서 관련 API")
public ResponseEntity<? extends BasicResponse> createPlan(@RequestBody BasFlightPlanModel rq) {
Map<String, Object> resultMap = new HashMap<String, Object>();
@ -225,8 +191,8 @@ public class BasFlightController {
* @return
*/
@PutMapping(value = "/plan/update")
@ApiOperation(value = "비행계획서 수정")
@Tag(name = "비행계획서", description = "비행계획서 관련 API")
// @ApiOperation(value = "비행계획서 수정")
// @Tag(name = "비행계획서", description = "비행계획서 관련 API")
public ResponseEntity<? extends BasicResponse> updatePlan(@RequestBody BasFlightPlanModel rq) {
Map<String, Object> resultMap = new HashMap<String, Object>();
try {
@ -270,9 +236,9 @@ public class BasFlightController {
* @return
*/
@DeleteMapping(value = "/plan/delete/{planSno}")
@ApiOperation(value = "비행계획서 삭제")
@Tag(name = "비행계획서", description = "비행계획서 관련 API")
@ApiImplicitParam(name = "planSno", value = "비행계획서일련번호", dataTypeClass = Integer.class)
// @ApiOperation(value = "비행계획서 삭제")
// @Tag(name = "비행계획서", description = "비행계획서 관련 API")
// @ApiImplicitParam(name = "planSno", value = "비행계획서일련번호", dataTypeClass = Integer.class)
public ResponseEntity<? extends BasicResponse> deletePlan(@PathVariable("planSno") Integer planSno) {
Map<String, Object> resultMap = new HashMap<String, Object>();
try {
@ -315,9 +281,9 @@ public class BasFlightController {
* @return
*/
@GetMapping(value = "/plan/pilot/{groupId}")
@ApiOperation(value = "그룹의 조종사 조회")
@Tag(name = "비행계획서", description = "비행계획서 관련 API")
@ApiImplicitParam(name = "groupId", value = "그룹ID", dataTypeClass = String.class)
// @ApiOperation(value = "그룹의 조종사 조회")
// @Tag(name = "비행계획서", description = "비행계획서 관련 API")
// @ApiImplicitParam(name = "groupId", value = "그룹ID", dataTypeClass = String.class)
public ResponseEntity<? extends BasicResponse> findPilot(@PathVariable("groupId") String groupId) {
List<BasFlightPlanPilotModel> result = null;
try {
@ -347,9 +313,9 @@ public class BasFlightController {
* @return
*/
@GetMapping(value = "/plan/arcrft/{groupId}")
@ApiOperation(value = "그룹의 기체 조회")
@Tag(name = "비행계획서", description = "비행계획서 관련 API")
@ApiImplicitParam(name = "groupId", value = "그룹ID", dataTypeClass = String.class)
// @ApiOperation(value = "그룹의 기체 조회")
// @Tag(name = "비행계획서", description = "비행계획서 관련 API")
// @ApiImplicitParam(name = "groupId", value = "그룹ID", dataTypeClass = String.class)
public ResponseEntity<? extends BasicResponse> findArcrft(@PathVariable("groupId") String groupId) {
List<BasFlightPlanArcrftModel> result = null;
try {
@ -377,8 +343,8 @@ public class BasFlightController {
* @return
*/
@PostMapping("/plan/area/buffer")
@ApiOperation(value = "비행 구역 버퍼 존 생성")
@Tag(name = "비행계획서", description = "비행계획서 관련 API")
// @ApiOperation(value = "비행 구역 버퍼 존 생성")
// @Tag(name = "비행계획서", description = "비행계획서 관련 API")
public ResponseEntity<? extends BasicResponse> findBuffer(@RequestBody List<BasFlightPlanAreaModel> rq) {
List<BasFlightPlanAreaModel> rs = null;
try {
@ -405,8 +371,8 @@ public class BasFlightController {
* @return
*/
@GetMapping("/plan/api/weather")
@ApiOperation(value = "비행계획서 날씨")
@Tag(name = "비행계획서", description = "비행계획서 관련 API")
// @ApiOperation(value = "비행계획서 날씨")
// @Tag(name = "비행계획서", description = "비행계획서 관련 API")
public ResponseEntity<? extends BasicResponse> restApiGetWeather(BasFlightWeatherModel rq) {
JSONObject jsonObject = null;
@ -436,8 +402,8 @@ public class BasFlightController {
* @return
*/
@GetMapping(value = "/aprv/list")
@ApiOperation(value = "비행계획서 리스트(승인)")
@Tag(name = "비행계획서", description = "비행계획서 관련 API")
// @ApiOperation(value = "비행계획서 리스트(승인)")
// @Tag(name = "비행계획서", description = "비행계획서 관련 API")
public ResponseEntity<? extends BasicResponse> findAprvList(BasFlightPlanListRq rq) {
ComnPagingRs<BasFlightPlanModel> result = null;
try {
@ -465,8 +431,8 @@ public class BasFlightController {
* @return
*/
@PutMapping(value = "/aprv/proc")
@ApiOperation(value = "비행 계획서 승인/미승인")
@Tag(name = "비행계획서", description = "비행계획서 관련 API")
// @ApiOperation(value = "비행 계획서 승인/미승인")
// @Tag(name = "비행계획서", description = "비행계획서 관련 API")
public ResponseEntity<? extends BasicResponse> updateAprvProc(@RequestBody BasFlightAprovRq rq) {
Map<String, Object> resultMap = new HashMap<String, Object>();
try {
@ -509,7 +475,7 @@ public class BasFlightController {
* @return
*/
@PostMapping("/airspace/contains")
@Tag(name = "비행계획서", description = "비행계획서 관련 API")
// @Tag(name = "비행계획서", description = "비행계획서 관련 API")
public ResponseEntity<? extends BasicResponse> checkAirspaceContains(@RequestBody List<BasFlightPlanAreaModel> rq) {
Map<String, Object> resultMap = new HashMap<String, Object>();
try {
@ -540,8 +506,8 @@ public class BasFlightController {
* @throws ParseException
*/
@GetMapping("/plan/area/search")
@ApiOperation(value = "지역 검색")
@Tag(name = "비행계획서", description = "비행계획서 관련 API")
// @ApiOperation(value = "지역 검색")
// @Tag(name = "비행계획서", description = "비행계획서 관련 API")
public ResponseEntity<? extends BasicResponse> searchArea(String query) throws ParseException {
String text = null;
try {
@ -570,7 +536,7 @@ public class BasFlightController {
* @return
*/
@GetMapping("/schedule")
@Tag(name = "비행계획서", description = "비행계획서 관련 API")
// @Tag(name = "비행계획서", description = "비행계획서 관련 API")
public ResponseEntity<? extends BasicResponse> findSchedule(@RequestParam("searchDate") String searchDate) {
List<BasFlightScheduleRs> response;

53
pav-server/src/main/java/com/palnet/biz/api/bas/group/controller/BasGroupAprvController.java

@ -1,22 +1,8 @@
package com.palnet.biz.api.bas.group.controller;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.palnet.biz.api.bas.group.model.BasGroupAprvModel;
import com.palnet.biz.api.bas.group.model.BasGroupAprvRqModel;
import com.palnet.biz.api.bas.group.model.BasGroupAprvlUpdateRQ;
import com.palnet.biz.api.bas.group.service.BasGroupAprvService;
import com.palnet.biz.api.comn.model.ComnPagingRs;
import com.palnet.biz.api.comn.response.BasicResponse;
@ -24,16 +10,27 @@ import com.palnet.biz.api.comn.response.ErrorResponse;
import com.palnet.biz.api.comn.response.SuccessResponse;
import com.palnet.comn.code.RSErrorCode;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import lombok.extern.slf4j.Slf4j;
@Log4j2
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
import java.util.Map;
@Slf4j
@RestController
@RequiredArgsConstructor
@RequestMapping(value = "/api/bas/group/aprv", produces = {MediaType.APPLICATION_JSON_VALUE})
@Tag(name = "그룹 승인 컨트롤러", description = "그룹 가입 승인 관련 API")
@Tag(name = "그룹 승인", description = "그룹 가입 승인 관련 API")
public class BasGroupAprvController {
@Autowired
@ -45,8 +42,7 @@ public class BasGroupAprvController {
* @return
*/
@GetMapping(value = "/list")
@ApiOperation(value = "승인요청 조회")
@Tag(name = "그룹 승인 컨트롤러", description = "그룹 가입 승인 관련 API")
@Operation(summary = "승인요청 조회", description = "그룹내에 그룹회원들의 승인항목들을 조회합니다.")
public ResponseEntity<? extends BasicResponse> list(BasGroupAprvRqModel rq) {
ComnPagingRs<BasGroupAprvModel> result = null;
// log.debug(">>>>" + rq.toString());
@ -76,18 +72,25 @@ public class BasGroupAprvController {
* @return
*/
@PutMapping(value = "/update")
@ApiOperation(value = "승인처리 / 승인취소 처리")
@Tag(name = "그룹 승인 컨트롤러", description = "그룹 가입 승인 관련 API")
public ResponseEntity<? extends BasicResponse> update(@RequestBody BasGroupAprvModel rq) {
@Operation(summary = "승인처리", description = "그룹내에 그룹회원들의 승인처리를 진행합니다. [승인/미승인 처리]")
// @ApiOperation(value = "승인처리 / 승인취소 처리")
// @Tag(name = "그룹 승인 컨트롤러", description = "그룹 가입 승인 관련 API")
public ResponseEntity<? extends BasicResponse> update(@RequestBody BasGroupAprvlUpdateRQ rq) {
Map<String , Object> resultMap = new HashMap<String,Object>();
BasGroupAprvModel model = new BasGroupAprvModel();
BeanUtils.copyProperties(rq, model);
log.warn("model => {}", model);
if(StringUtils.isEmpty(rq.getCstmrGroupSno())) {
return ResponseEntity.status(HttpStatus.OK)
.body(new ErrorResponse(RSErrorCode.ER_PARAM));
}
try {
boolean result = service.update(rq);
boolean result = service.update(model);
resultMap.put("result", result);

102
pav-server/src/main/java/com/palnet/biz/api/bas/group/controller/BasGroupController.java

@ -1,44 +1,35 @@
package com.palnet.biz.api.bas.group.controller;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.palnet.biz.api.bas.group.model.BasGroupJoinModel;
import com.palnet.biz.api.bas.group.model.BasGroupModel;
import com.palnet.biz.api.bas.group.model.BasGroupRqModel;
import com.palnet.biz.api.bas.group.model.*;
import com.palnet.biz.api.bas.group.service.BasGroupService;
import com.palnet.biz.api.comn.response.BasicResponse;
import com.palnet.biz.api.comn.response.ErrorResponse;
import com.palnet.biz.api.comn.response.SuccessResponse;
import com.palnet.comn.code.RSErrorCode;
import com.palnet.comn.exception.CustomException;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Log4j2
@RestController
@RequiredArgsConstructor
@RequestMapping(value = "/api/bas/group", produces = {MediaType.APPLICATION_JSON_VALUE})
@Tag(name = "그룹 컨트롤러", description = "그룹 관련 API")
@Tag(name = "그룹", description = "그룹 관련 API")
public class BasGroupController {
@Autowired
@ -49,8 +40,7 @@ public class BasGroupController {
* @return
*/
@GetMapping(value = "/createid")
@ApiOperation(value = "그룹코드 생성")
@Tag(name = "그룹 컨트롤러", description = "그룹 관련 API")
@Operation(summary = "그룹코드 생성", description = "그룹코드를 랜덤으로 생성하는 기능입니다.")
public ResponseEntity<? extends BasicResponse> createid() {
Map<String , Object> resultMap = new HashMap<String,Object>();
@ -83,10 +73,8 @@ public class BasGroupController {
* @return
*/
@GetMapping(value = "/mylist")
@ApiOperation(value = "나의 그룹 목록 조회")
@Tag(name = "그룹 컨트롤러", description = "그룹 관련 API")
@ApiImplicitParam(name = "cstmrSno",value = "고객일련번호", dataTypeClass = Integer.class)
public ResponseEntity<? extends BasicResponse> mylist(Integer cstmrSno) {
@Operation(summary = "내가 생성한 그룹조회", description = "내가 생성한 그룹을 조회하는 기능입니다.")
public ResponseEntity<? extends BasicResponse> mylist(@Parameter(name="cstmrSno", description = "회원일련번호", in = ParameterIn.QUERY, example = "2") Integer cstmrSno) {
List<BasGroupModel> result = null;
log.debug("Param : {}", cstmrSno);
@ -126,10 +114,8 @@ public class BasGroupController {
* @return
*/
@GetMapping(value = "/joinlist")
@ApiOperation(value = "나의 그룹 - 참여 그룹 목록 조회")
@Tag(name = "그룹 컨트롤러", description = "그룹 관련 API")
@ApiImplicitParam(name = "cstmrSno",value = "고객일련번호", dataTypeClass = Integer.class)
public ResponseEntity<? extends BasicResponse> joinList(Integer cstmrSno) {
@Operation(summary = "내가 참여한 그룹조회", description = "내가 참여한 그룹을 조회하는 기능입니다.")
public ResponseEntity<? extends BasicResponse> joinList(@Parameter(name="cstmrSno", description = "회원일련번호", in = ParameterIn.QUERY, example = "2") Integer cstmrSno) {
List<BasGroupJoinModel> result = null;
@ -167,10 +153,8 @@ public class BasGroupController {
* @return
*/
@GetMapping(value = "/grouplist")
@ApiOperation(value = "그룹 목록 조회")
@Tag(name = "그룹 컨트롤러", description = "그룹 관련 API")
@ApiImplicitParam(name = "cstmrSno",value = "고객일련번호", dataTypeClass = Integer.class)
public ResponseEntity<? extends BasicResponse> grouplist(Integer cstmrSno) {
@Operation(summary = "그룹조회", description = "나와 관련된 모든 그룹을 조회하는 기능입니다.")
public ResponseEntity<? extends BasicResponse> grouplist(@Parameter(name="cstmrSno", description = "회원일련번호", in = ParameterIn.QUERY, example = "2") Integer cstmrSno) {
List<BasGroupJoinModel> result = null;
@ -209,8 +193,7 @@ public class BasGroupController {
* @return
*/
@GetMapping(value = "/list")
@ApiOperation(value = "전체 그룹 목록 조회")
@Tag(name = "그룹 컨트롤러", description = "그룹 관련 API")
@Operation(summary = "전체그룹 검색 조회", description = "검색조건에 맞춰 모든 그룹을 조회하는 기능입니다.")
public ResponseEntity<? extends BasicResponse> list(BasGroupRqModel rq) {
List<BasGroupModel> result = null;
@ -242,10 +225,8 @@ public class BasGroupController {
* @return
*/
@GetMapping(value = "/detail/{id}")
@ApiOperation(value = "그룹 상세 조회")
@Tag(name = "그룹 컨트롤러", description = "그룹 관련 API")
@ApiImplicitParam(name = "id",value = "그룹ID", dataTypeClass = String.class)
public ResponseEntity<? extends BasicResponse> detail(@PathVariable String id) {
@Operation(summary = "그룹 상세조회", description = "그룹코드로 그룹에 대해 상세히 조회합니다.")
public ResponseEntity<? extends BasicResponse> detail(@Parameter(name="id", description = "그룹코드", in = ParameterIn.PATH, example = "C807F9") @PathVariable String id) {
BasGroupModel result = null;
try {
@ -276,13 +257,15 @@ public class BasGroupController {
* @throws Exception
*/
@PostMapping(value = "/create")
@ApiOperation(value = "그룹 생성")
@Tag(name = "그룹 컨트롤러", description = "그룹 관련 API")
public ResponseEntity<? extends BasicResponse> create(@RequestBody BasGroupModel rq) throws Exception {
@Operation(summary = "그룹 생성", description = "그룹을 생성합니다.")
public ResponseEntity<? extends BasicResponse> create(@RequestBody BasGroupInsertRQ rq) throws Exception {
Map<String , Object> resultMap = new HashMap<String,Object>();
BasGroupModel model = new BasGroupModel();
BeanUtils.copyProperties(rq, model);
try {
boolean result = service.create(rq); // 그룹 생성하는 기능
boolean result = service.create(model); // 그룹 생성하는 기능
resultMap.put("result", result);
@ -312,13 +295,15 @@ public class BasGroupController {
* @throws Exception
*/
@PutMapping(value = "/update")
@ApiOperation(value = "그룹 수정")
@Tag(name = "그룹 컨트롤러", description = "그룹 관련 API")
public ResponseEntity<? extends BasicResponse> update(@RequestBody BasGroupModel rq) throws Exception {
@Operation(summary = "그룹 수정", description = "그룹의 내용을 수정합니다.")
public ResponseEntity<? extends BasicResponse> update(@RequestBody BasGroupUpdateRQ rq) throws Exception {
Map<String , Object> resultMap = new HashMap<String,Object>();
BasGroupModel model = new BasGroupModel();
BeanUtils.copyProperties(rq, model);
try {
boolean result = service.update(rq); // 그룹 수정하는 기능
boolean result = service.update(model); // 그룹 수정하는 기능
resultMap.put("result", result);
@ -354,10 +339,11 @@ public class BasGroupController {
* @return
*/
@DeleteMapping(value = "/delete/{id}")
@ApiOperation(value = "그룹 삭제")
@Tag(name = "그룹 컨트롤러", description = "그룹 관련 API")
@ApiImplicitParam(name = "id",value = "그룹ID", dataTypeClass = String.class)
public ResponseEntity<? extends BasicResponse> delete(@PathVariable String id) {
@Operation(summary = "그룹 삭제", description = "그룹의 내용을 삭제합니다.")
// @ApiOperation(value = "그룹 삭제")
// @Tag(name = "그룹 컨트롤러", description = "그룹 관련 API")
// @ApiImplicitParam(name = "id",value = "그룹ID", dataTypeClass = String.class)
public ResponseEntity<? extends BasicResponse> delete(@Parameter(name="id", description = "그룹코드", in = ParameterIn.PATH, example = "HDU123") @PathVariable String id) {
Map<String , Object> resultMap = new HashMap<String,Object>();
try {

66
pav-server/src/main/java/com/palnet/biz/api/bas/group/controller/BasGroupJoinController.java

@ -1,39 +1,37 @@
package com.palnet.biz.api.bas.group.controller;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.palnet.biz.api.bas.group.model.BasGroupJoinInsertRQ;
import com.palnet.biz.api.bas.group.model.BasGroupJoinModel;
import com.palnet.biz.api.bas.group.model.BasGroupJoinRqModel;
import com.palnet.biz.api.bas.group.model.BasGroupJoinUpdateRQ;
import com.palnet.biz.api.bas.group.service.BasGroupJoinService;
import com.palnet.biz.api.comn.response.BasicResponse;
import com.palnet.biz.api.comn.response.ErrorResponse;
import com.palnet.biz.api.comn.response.SuccessResponse;
import com.palnet.comn.code.RSErrorCode;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import lombok.extern.slf4j.Slf4j;
@Log4j2
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Slf4j
@RestController
@RequiredArgsConstructor
@RequestMapping(value = "/api/bas/group/join", produces = {MediaType.APPLICATION_JSON_VALUE})
@Tag(name = "그룹 참여 컨트롤러", description = "그룹 참여 관련 API")
@Tag(name = "그룹 참여", description = "그룹 참여 관련 API")
public class BasGroupJoinController {
@Autowired
@ -41,8 +39,7 @@ public class BasGroupJoinController {
@GetMapping(value = "/list")
@ApiOperation(value = "참여한 그룹 목록 조회")
@Tag(name = "그룹 참여 컨트롤러", description = "그룹 참여 관련 API")
@Operation(summary = "내가 가입할 그룹목록 조회", description = "조건에 맞춰 참여할 그룹목록을 조회할 수 있습니다.")
public ResponseEntity<? extends BasicResponse> list(BasGroupJoinRqModel rq) {
List<BasGroupJoinModel> result = null;
@ -67,13 +64,16 @@ public class BasGroupJoinController {
@PostMapping(value = "/create")
@ApiOperation(value = "그룹 가입 요청")
@Tag(name = "그룹 참여 컨트롤러", description = "그룹 참여 관련 API")
public ResponseEntity<? extends BasicResponse> create(@RequestBody BasGroupJoinModel rq) {
@Operation(summary = "그룹 가입요청", description = "다른 그룹에 가입요청을 할 수 있습니다. [예제값은 이미 가입요청 되어있을 수도 있으니 다른 값으로 가입요청해주세요.]")
public ResponseEntity<? extends BasicResponse> create(@RequestBody BasGroupJoinInsertRQ rq) {
Map<String , Object> resultMap = new HashMap<String,Object>();
BasGroupJoinModel model = new BasGroupJoinModel();
BeanUtils.copyProperties(rq, model);
try {
boolean result = service.create(rq);
boolean result = service.create(model);
resultMap.put("result", result);
@ -88,18 +88,22 @@ public class BasGroupJoinController {
}
@PutMapping(value = "/update")
@ApiOperation(value = "그룹 가입 승인/미승인")
@Tag(name = "그룹 참여 컨트롤러", description = "그룹 참여 관련 API")
public ResponseEntity<? extends BasicResponse> update(@RequestBody BasGroupJoinModel rq) {
@Operation(summary = "가입한 그룹 상태값 변경", description = "가입한 그룹에서 상태값을 변경할 수 있습니다. [Y : 가입 , N : 탈퇴 ]")
// @ApiOperation(value = "그룹 가입 승인/미승인")
// @Tag(name = "그룹 참여 컨트롤러", description = "그룹 참여 관련 API")
public ResponseEntity<? extends BasicResponse> update(@RequestBody BasGroupJoinUpdateRQ rq) {
Map<String , Object> resultMap = new HashMap<String,Object>();
BasGroupJoinModel model = new BasGroupJoinModel();
BeanUtils.copyProperties(rq, model);
if(StringUtils.isEmpty(rq.getCstmrGroupSno())) {
return ResponseEntity.status(HttpStatus.OK)
.body(new ErrorResponse(RSErrorCode.ER_PARAM));
}
try {
boolean result = service.update(rq);
boolean result = service.update(model);
resultMap.put("result", result);

63
pav-server/src/main/java/com/palnet/biz/api/bas/group/controller/BasGroupUserController.java

@ -1,22 +1,8 @@
package com.palnet.biz.api.bas.group.controller;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.palnet.biz.api.bas.group.model.BasGroupUserListModel;
import com.palnet.biz.api.bas.group.model.BasGroupUserModel;
import com.palnet.biz.api.bas.group.model.BasGroupUserUpdateRQ;
import com.palnet.biz.api.bas.group.service.BasGroupUserService;
import com.palnet.biz.api.comn.model.ComnPagingRs;
import com.palnet.biz.api.comn.response.BasicResponse;
@ -25,25 +11,34 @@ import com.palnet.biz.api.comn.response.SuccessResponse;
import com.palnet.comn.code.RSErrorCode;
import com.palnet.comn.exception.CustomException;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import lombok.extern.slf4j.Slf4j;
@Log4j2
import org.springframework.beans.BeanUtils;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Slf4j
@RestController
@RequiredArgsConstructor
@RequestMapping(value = "/api/bas/group/user", produces = {MediaType.APPLICATION_JSON_VALUE})
@Tag(name = "그룹 사용자 컨트롤러", description = "그룹 사용자 관련 API")
@Tag(name = "그룹 사용자", description = "그룹 사용자 관련 API")
public class BasGroupUserController {
@Autowired
private final BasGroupUserService service;
@GetMapping(value = "/list")
@ApiOperation(value = "그룹 사용자 조회")
@Tag(name = "그룹 사용자 컨트롤러", description = "그룹 사용자 관련 API")
@Operation(summary = "그룹 참여자 조회", description = "검색조건에 맞춰 그룹 참여자를 조회합니다.")
public ResponseEntity<? extends BasicResponse> list(BasGroupUserListModel rq) {
ComnPagingRs<BasGroupUserModel> result = null;
@ -68,13 +63,15 @@ public class BasGroupUserController {
@PutMapping(value = "/update")
@ApiOperation(value = "그룹 사용자 권한 수정")
@Tag(name = "그룹 사용자 컨트롤러", description = "그룹 사용자 관련 API")
public ResponseEntity<? extends BasicResponse> update(@RequestBody BasGroupUserModel rq) {
@Operation(summary = "그룹 참여자 권한 수정", description = "그룹 참여자 권한을 수정합니다.")
public ResponseEntity<? extends BasicResponse> update(@RequestBody BasGroupUserUpdateRQ rq) {
Map<String , Object> resultMap = new HashMap<String,Object>();
BasGroupUserModel model = new BasGroupUserModel();
BeanUtils.copyProperties(rq, model);
try {
boolean result = service.update(rq);
boolean result = service.update(model);
resultMap.put("result", result);
@ -89,13 +86,17 @@ public class BasGroupUserController {
}
@PutMapping(value = "/delegate")
@ApiOperation(value = "MASTER 권한 위임")
@Tag(name = "그룹 사용자 컨트롤러", description = "그룹 사용자 관련 API")
public ResponseEntity<? extends BasicResponse> delegate(@RequestBody List<BasGroupUserModel> rq) {
@Operation(summary = "MASTER 권한 위임", description = "Master 권한을 위임합니다.")
// @ApiOperation(value = "MASTER 권한 위임")
// @Tag(name = "그룹 사용자 컨트롤러", description = "그룹 사용자 관련 API")
public ResponseEntity<? extends BasicResponse> delegate(@RequestBody List<BasGroupUserUpdateRQ> rq) {
Map<String, Object> resultMap = new HashMap<String, Object>();
List<BasGroupUserModel> model = new ArrayList<>();
BeanUtils.copyProperties(rq, model);
try {
boolean result = service.delegate(rq);
boolean result = service.delegate(model);
resultMap.put("result", result);
} catch (CustomException e) {
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR)

6
pav-server/src/main/java/com/palnet/biz/api/bas/group/model/BasGroupAprvRqModel.java

@ -2,6 +2,7 @@ package com.palnet.biz.api.bas.group.model;
import com.palnet.biz.api.comn.model.ComnRqModel;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
@ -9,14 +10,19 @@ import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper=false)
public class BasGroupAprvRqModel extends ComnRqModel {
@Schema(description = "그룹명" , example = "KAC" , implementation = String.class)
private String groupNm;
@Schema(description = "회원이름[그룹내 회원명으로 검색해야합니다.]" , example = "한국공항공사" , implementation = String.class)
private String memberName;
@Schema(description = "승인여부" , example = "Y" , implementation = String.class)
private String aprvYn;
@Schema(description = "회원일련번호" , example = "2" , implementation = Integer.class)
private Integer cstmrSno;
@Schema(description = "그룹코드" , example = "C807F9" , implementation = String.class)
private String groupId;
}

24
pav-server/src/main/java/com/palnet/biz/api/bas/group/model/BasGroupAprvlUpdateRQ.java

@ -0,0 +1,24 @@
package com.palnet.biz.api.bas.group.model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Data
public class BasGroupAprvlUpdateRQ {
@Schema(description = "고객과 그룹 매핑한 일련번호" , example = "5" , implementation = String.class)
private Integer cstmrGroupSno;
@Schema(description = "현재 승인상태 여부[테스트시 해당유저가 승인되어있으면 Y 값으로 넣어주세요.]" , example = "Y" , implementation = String.class)
private String aprvlYn;
@Schema(description = "그룹내 권한코드" , example = "NORMAL" , implementation = String.class)
private String groupAuthCd;
@Schema(description = "승인자" , example = "palnet" , implementation = String.class)
private String aprvlUserId;
@Schema(description = "터미널ID" , example = "" , implementation = String.class)
private String trmnlId;
}

21
pav-server/src/main/java/com/palnet/biz/api/bas/group/model/BasGroupInsertRQ.java

@ -0,0 +1,21 @@
package com.palnet.biz.api.bas.group.model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Data
public class BasGroupInsertRQ {
@Schema(description = "그룹아이디[그룹생성시 랜덤으로 받는 아이디, 중복되면 생성이 되지 않음]", example = "HDU123", implementation = String.class)
private String groupId;
@Schema(description = "그룹명[중복되면 생성이 되지 않음]", example = "PAL_KAC_GROUP", implementation = String.class)
private String groupNm;
@Schema(description = "그룹구분코드", example = "02", implementation = String.class)
private String groupTypeCd;
@Schema(description = "회원고유번호", example = "2", implementation = String.class)
private int cstmrSno;
}

17
pav-server/src/main/java/com/palnet/biz/api/bas/group/model/BasGroupJoinInsertRQ.java

@ -0,0 +1,17 @@
package com.palnet.biz.api.bas.group.model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Data
public class BasGroupJoinInsertRQ {
@Schema(description = "그룹코드", example = "HDU123", implementation = String.class)
private String groupId;
@Schema(description = "회원일련번호", example = "2", implementation = Integer.class)
private Integer cstmrSno;
@Schema(description = "그룹 내 권한코드", example = "", implementation = String.class)
private String groupAuthCd;
}

4
pav-server/src/main/java/com/palnet/biz/api/bas/group/model/BasGroupJoinRqModel.java

@ -2,6 +2,7 @@ package com.palnet.biz.api.bas.group.model;
import com.palnet.biz.api.comn.model.ComnRqModel;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
@ -9,10 +10,13 @@ import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper=false)
public class BasGroupJoinRqModel extends ComnRqModel{
@Schema(description = "그룹명", example = "PAL_KAC", implementation = String.class)
private String groupNm;
@Schema(description = "그룹코드", example = "HDU123", implementation = String.class)
private String groupId;
@Schema(description = "회원일련번호", example = "2", implementation = Integer.class)
private Integer cstmrSno;
}

14
pav-server/src/main/java/com/palnet/biz/api/bas/group/model/BasGroupJoinUpdateRQ.java

@ -0,0 +1,14 @@
package com.palnet.biz.api.bas.group.model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Data
public class BasGroupJoinUpdateRQ {
@Schema(description = "회원 그룹 매핑 일련번호", example = "14", implementation = String.class)
private Integer cstmrGroupSno;
@Schema(description = "그룹내 참여여부 상태값", example = "N", implementation = String.class)
private String joinYn;
}

3
pav-server/src/main/java/com/palnet/biz/api/bas/group/model/BasGroupRqModel.java

@ -2,6 +2,7 @@ package com.palnet.biz.api.bas.group.model;
import com.palnet.biz.api.comn.model.ComnRqModel;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
@ -9,8 +10,10 @@ import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper=false)
public class BasGroupRqModel extends ComnRqModel{
@Schema(description = "그룹명", example = "KAC", implementation = String.class)
private String groupNm;
@Schema(description = "그룹아이디", example = "C807F9", implementation = String.class)
private String groupId;
}

19
pav-server/src/main/java/com/palnet/biz/api/bas/group/model/BasGroupUpdateRQ.java

@ -0,0 +1,19 @@
package com.palnet.biz.api.bas.group.model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Data
public class BasGroupUpdateRQ {
@Schema(description = "그룹아이디[그룹생성시 랜덤으로 받는 아이디, 중복되면 생성이 되지 않음]", example = "HDU123", implementation = String.class)
private String groupId;
@Schema(description = "그룹명[중복되면 생성이 되지 않음]", example = "PAL_KAC_GROUP", implementation = String.class)
private String groupNm;
@Schema(description = "그룹구분코드", example = "02", implementation = String.class)
private String groupTypeCd;
}

6
pav-server/src/main/java/com/palnet/biz/api/bas/group/model/BasGroupUserListModel.java

@ -2,6 +2,7 @@ package com.palnet.biz.api.bas.group.model;
import com.palnet.biz.api.comn.model.ComnPagingModel;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
@ -9,9 +10,12 @@ import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper=false)
public class BasGroupUserListModel extends ComnPagingModel{
@Schema(description = "그룹에 참여한 회원 명", example = "팔네트웍스", implementation = String.class)
private String memberName;
@Schema(description = "그룹아이디", example = "C807F9", implementation = String.class)
private String groupId;
private int cstmrSno;
@Schema(description = "회원고유번호", example = "2", implementation = String.class)
private Integer cstmrSno;
}

17
pav-server/src/main/java/com/palnet/biz/api/bas/group/model/BasGroupUserUpdateRQ.java

@ -0,0 +1,17 @@
package com.palnet.biz.api.bas.group.model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Data
public class BasGroupUserUpdateRQ {
@Schema(description = "회원 그룹 매핑 일련번호", example = "13", implementation = String.class)
private Integer cstmrGroupSno;
@Schema(description = "그룹 참여 여부", example = "Y", implementation = String.class)
private String joinYn;
@Schema(description = "그룹 내 권한코드", example = "LEADER", implementation = String.class)
private String groupAuthCd;
}

43
pav-server/src/main/java/com/palnet/biz/api/bas/laanc/controller/BasLaancAprvController.java

@ -3,11 +3,19 @@ package com.palnet.biz.api.bas.laanc.controller;
import com.palnet.biz.api.bas.laanc.model.BasLaancAprvListRq;
import com.palnet.biz.api.bas.laanc.model.BasLaancAprvRs;
import com.palnet.biz.api.bas.laanc.service.BasLaancAprvService;
import com.palnet.biz.api.cns.qna.model.QnaBasModel;
import com.palnet.biz.api.comn.response.BasicResponse;
import com.palnet.biz.api.comn.response.ErrorResponse;
import com.palnet.biz.api.comn.response.SuccessResponse;
import com.palnet.comn.exception.CustomException;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import io.swagger.v3.oas.annotations.media.ArraySchema;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@ -46,12 +54,13 @@ public class BasLaancAprvController {
/**
* laanc 승인 목록
*
* @param rq
* @param pageable
* @return
*/
@ApiOperation(value = "LAANC 승인 목록")
@Tag(name = "LAANC 승인", description = "LAANC 승인 관련 API")
@Deprecated
@Operation(summary = "LAANC 승인 목록", description = "LAANC 승인 목록")
@GetMapping("/list")
public ResponseEntity<? extends BasicResponse> getLaancAprvList(BasLaancAprvListRq rq, Pageable pageable) {
Page<BasLaancAprvRs> rs = null;
@ -79,8 +88,20 @@ public class BasLaancAprvController {
return ResponseEntity.ok().body(new SuccessResponse<>(rs));
}
@ApiOperation(value = "LAANC 승인 목록")
@Tag(name = "LAANC 승인", description = "LAANC 승인 관련 API")
/**
* laanc 승인 목록
*
* @param rq
* @return
*/
@Operation(summary = "LAANC 승인 목록", description = "LAANC 승인 목록")
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "성공",
content = {
@Content(mediaType = "application/json",
schema = @Schema(implementation = SuccessResponse.class))
})
})
@GetMapping("/list2")
public ResponseEntity<? extends BasicResponse> getLaancAprvList2(BasLaancAprvListRq rq) {
List<BasLaancAprvRs> rs = null;
@ -107,11 +128,19 @@ public class BasLaancAprvController {
/**
* laanc 승인 상세
*
* @param planSno
* @return
*/
@ApiOperation(value = "LAANC 승인 상세 조회")
@Tag(name = "LAANC 승인", description = "LAANC 승인 관련 API")
@Operation(summary = "LAANC 승인 상세 조회", description = "LAANC 승인 상세 조회")
@Parameter(name = "planSno", description = "LAANC 승인 번호", required = true, example = "200")
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "성공",
content = {
@Content(mediaType = "application/json",
schema = @Schema(implementation = SuccessResponse.class))
})
})
@GetMapping("/detail/{planSno}")
public ResponseEntity<? extends BasicResponse> getLaancAprvDetail(@PathVariable("planSno") String planSno) {
BasLaancAprvRs rs = null;

90
pav-server/src/main/java/com/palnet/biz/api/bas/laanc/controller/BasLaancController.java

@ -7,7 +7,10 @@ import com.palnet.biz.api.comn.response.ErrorResponse;
import com.palnet.biz.api.comn.response.SuccessResponse;
import com.palnet.biz.api.external.model.PilotValidRs;
import com.palnet.comn.exception.CustomException;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@ -40,10 +43,18 @@ public class BasLaancController {
private final BasLaancService basLaancService;
// LAANC 검증
/**
* LAANC 검증
* 로직(스텝) 변경으로 인하여 사용하지 않음.
* 해당 로직은 등록시 사용되는 service에서 사용함.
*
* @param rq
* @return
*/
@Deprecated
@Operation(summary = "LAANC 검증", description = "LAANC 검증", hidden = true)
@ApiResponse(responseCode = "200", description = "성공")
@PostMapping(value = "/plan/valid")
@ApiOperation(value = "LAANC 검증")
@Tag(name = "LAANC", description = "LAANC 관련 API")
public ResponseEntity<? extends BasicResponse> validationLaanc(@RequestBody BasLaancPlanRq rq) {
BasLaancValidatedRs rs = null;
@ -69,10 +80,15 @@ public class BasLaancController {
return ResponseEntity.ok().body(new SuccessResponse<>(rs));
}
// 비행계획서 등록, 약관 등록, 공문 생성
/**
* LAANC 신청(비행계획서 등록, 약관 등록, 공문 생성)
*
* @param rq
* @return
*/
@Operation(summary = "LAANC 신청", description = "LAANC 신청(비행계획서 등록, 약관 등록, 공문 생성)")
@ApiResponse(responseCode = "200", description = "성공")
@PostMapping(value = "/plan/create")
@ApiOperation(value = "비행계획서 등록")
@Tag(name = "LAANC", description = "LAANC 관련 API")
public ResponseEntity<? extends BasicResponse> createPlan(@RequestBody BasLaancPlanRq rq) {
BasLaancLastRs rs = null;
try {
@ -93,11 +109,17 @@ public class BasLaancController {
return ResponseEntity.ok().body(new SuccessResponse<>(rs));
}
// 허용고도 조회
/**
* 허용고도 조회
*
* @param rq
* @return
*/
@Operation(summary = "비행구역 허용고도 조회", description = "좌표에 해당하는 허용고도 조회")
@ApiResponse(responseCode = "200", description = "성공")
@PostMapping(value = "/valid/elev")
@ApiOperation(value = "비행구역 허용고도 조회")
@Tag(name = "LAANC", description = "LAANC 관련 API")
public ResponseEntity<? extends BasicResponse> getAllowableElevation(@RequestBody List<BasLaancAreaModel> rq) {
public ResponseEntity<? extends BasicResponse> getAllowableElevation(@RequestBody List<BasLaancAreaByElevModel> rq
) {
List<Integer> rs = null;
try {
rs = basLaancService.getAllowableElevation(rq);
@ -118,10 +140,16 @@ public class BasLaancController {
}
// TS 연동
/**
* TS 연동 - 자겨정보 조회
*
* @param idntfNumList
* @return
*/
@Deprecated
@Operation(summary = "TS 연동 - 비행자격 조회", description = "비행자격 조회(조종사 자격증명, 기체보험 여부)")
@ApiResponse(responseCode = "200", description = "성공")
@PostMapping(value = "/valid/ts/pilot")
@ApiOperation(value = "TS 연동 - 비행자격 조회(조종사 자격증명, 기체보험 여부)")
@Tag(name = "LAANC", description = "LAANC 관련 API")
public ResponseEntity<? extends BasicResponse> getTsValid(@RequestBody List<String> idntfNumList) {
BasLaancTsRs rs = null;
try {
@ -142,11 +170,16 @@ public class BasLaancController {
return ResponseEntity.ok().body(new SuccessResponse<>(rs));
}
// 허용고도 조회
/**
* 공역(금지구역) 포함 여부
*
* @param rq
* @return
*/
@Operation(summary = "공역(금지구역) 포함 여부", description = "공역(금지구역) 포함 여부")
@ApiResponse(responseCode = "200", description = "성공")
@PostMapping(value = "/valid/duplicated/airspace")
@ApiOperation(value = "공역(금지구역) 포함 여부")
@Tag(name = "LAANC", description = "LAANC 관련 API")
public ResponseEntity<? extends BasicResponse> getDuplicatedAirspace(@RequestBody List<BasLaancAreaModel> rq) {
public ResponseEntity<? extends BasicResponse> getDuplicatedAirspace(@RequestBody List<BasLaancAreaByAirspaceModel> rq) {
List<BasLaancDuplicatedAirspaceRs> rs = null;
try {
rs = basLaancService.getDuplicatedAirspace(rq);
@ -166,9 +199,15 @@ public class BasLaancController {
return ResponseEntity.ok().body(new SuccessResponse<>(rs));
}
/**
* TS QR 코드 생성
*
* @param rq
* @return
*/
@Operation(summary = "TS QR 코드 생성", description = "조종사 자격증명 및 기체 보험 여부 등 조회하기 위한 QR 코드 생성")
@ApiResponse(responseCode = "200", description = "성공")
@GetMapping(value = "/ts/qr")
@ApiOperation(value = "TS QR 코드 생성")
@Tag(name = "LAANC", description = "LAANC 관련 API")
public ResponseEntity<? extends BasicResponse> getQrCode(BasLaancQrcodeRq rq) {
BasLaancQrcodeRs rs = null;
try {
@ -189,9 +228,16 @@ public class BasLaancController {
return new ResponseEntity<>(new SuccessResponse<>(rs), HttpStatus.OK);
}
/**
* TS QR 코드 확인
*
* @param confirmKey
* @return
*/
@Operation(summary = "TS QR 코드 확인", description = "조종사 자격증명 및 기체 보험 여부 등 데이터를 받고 검증된 데이터인지 확인")
@ApiResponse(responseCode = "200", description = "성공")
@Parameter(name = "confirmKey", description = "QR 코드 확인 키", required = true, in = ParameterIn.PATH, example = "251dd7ec-ec94-4b23-b8ff-bd7b53489448")
@GetMapping(value = "/ts/qr/{confirmKey}")
@ApiOperation(value = "TS QR 코드 확인 - RS왔는지 확인")
@Tag(name = "LAANC", description = "LAANC 관련 API")
public ResponseEntity<? extends BasicResponse> checkRqcodeRs(@PathVariable("confirmKey") String confirmKey) {
PilotValidRs rs = null;
try {

16
pav-server/src/main/java/com/palnet/biz/api/bas/laanc/model/BasLaancAprvListRq.java

@ -2,7 +2,7 @@ package com.palnet.biz.api.bas.laanc.model;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.palnet.biz.config.convert.InstantDateStrSerializer;
import io.swagger.annotations.ApiParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@ -27,18 +27,22 @@ import java.time.Instant;
@AllArgsConstructor
public class BasLaancAprvListRq {
@ApiParam(name = "작성자 이름", example = "팔")
@Schema(description = "작성자 이름", example = "팔")
private String memberName;
@ApiParam(name = "신청(등록)시작일자", example = "2023-12-12")
@Schema(description = "신청(등록)시작일자", example = "2023-12-12", implementation = String.class)
@JsonSerialize(using = InstantDateStrSerializer.class)
private Instant createStDate;
@ApiParam(name = "신청(등록)종료일자", example = "2023-12-12")
@Schema(description = "신청(등록)종료일자", example = "2023-12-12", implementation = String.class)
@JsonSerialize(using = InstantDateStrSerializer.class)
private Instant createEndDate;
@ApiParam(name = "비행시작일자", example = "2023-12-12")
@Schema(description = "비행시작일자", example = "2023-12-12", implementation = String.class)
@JsonSerialize(using = InstantDateStrSerializer.class)
private Instant schFltStDate;
@ApiParam(name = "비행종료일자", example = "2023-12-12")
@Schema(description = "비행종료일자", example = "2023-12-12", implementation = String.class)
@JsonSerialize(using = InstantDateStrSerializer.class)
private Instant schFltEndDate;

62
pav-server/src/main/java/com/palnet/biz/api/bas/laanc/model/BasLaancAprvRs.java

@ -1,14 +1,8 @@
package com.palnet.biz.api.bas.laanc.model;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.palnet.biz.api.comn.file.model.ComnFileModel;
import com.palnet.biz.jpa.entity.type.ArcrftTypeCd;
import com.palnet.biz.jpa.entity.type.ArcrftWghtCd;
import com.palnet.biz.jpa.entity.type.FltPurpose;
import com.palnet.biz.jpa.entity.type.FltType;
import io.swagger.annotations.ApiParam;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@ -35,59 +29,59 @@ import java.util.stream.Collectors;
@NoArgsConstructor
@AllArgsConstructor
public class BasLaancAprvRs {
@ApiParam(name = "비행계획서 일려번호")
//비행계획서 일려번호
private Integer planSno;
@ApiParam(name = "그룹 아이디", hidden = true)
//그룹 아이디
private String groupId;
@ApiParam(name = "작성자 일련번호")
//작성자 일련번호
private Integer cstmrSno;
@ApiParam(name = "작성자 이름")
//작성자 이름
private String memberName;
@ApiParam(name = "작성자 이메일")
//작성자 이메일
private String email;
@ApiParam(name = "작성자 연락처")
//작성자 연락처
private String hpno;
@ApiParam(name = "작성자 국가번호(연락처)", hidden = true)
//작성자 국가번호(연락처)
private String clncd;
@ApiParam(name = "작성자 주소", hidden = true)
//작성자 주소
private String addr;
@ApiParam(name = "작성자 상세주소", hidden = true)
//작성자 상세주소
private String addrDtlCn;
@ApiParam(name = "작성자 우편번호", hidden = true)
//작성자 우편번호
private String zip;
@ApiParam(name = "비행시작일시")
//비행시작일시
private Instant schFltStDt;
@ApiParam(name = "비행종료일시")
//비행종료일시
private Instant schFltEndDt;
@ApiParam(name = "비행목적")
//비행목적
private FltPurpose fltPurpose;
@ApiParam(name = "상업/비사업 구분")
//상업/비사업 구분
private FltType fltType;
@ApiParam(name = "상업/비사업 구분 코드")
//상업/비사업 구분 코드
private String fltTypeNm;
@ApiParam(name = "승인여부")
//승인여부
private String aprvlYn;
@ApiParam(name = "승인일자")
//승인일자
private Instant aprvlDt;
// @ApiParam(name = "삭제여부")
//삭제여부
// private String delYn;
@ApiParam(name = "등록자ID")
//등록자ID
private String createUserId;
@ApiParam(name = "등록일시")
//등록일시
private Instant createDt;
@ApiParam(name = "수정자ID")
//수정자ID
private String updateUserId;
@ApiParam(name = "수정일시")
//수정일시
private Instant updateDt;
@ApiParam(name = "서비스유형")
//서비스유형
private String serviceType;
@ApiParam(name = "기업여부")
//기업여부
private String corpRegYn;
@ApiParam(name = "공문URL")
//공문URL
private String pdfUrl;
// 하나의 필드로 묶어서 처리
@ApiParam(name = "기체 무게")
//기체 무게
public String getArcrftWght() {
if (arcrftList == null || arcrftList.isEmpty()) return null;
List<ArcrftWghtCd> arcrftWghtCdList = arcrftList.stream().map(BasLaancArcrftModel::getArcrftWghtCd).distinct().filter(Objects::nonNull).collect(Collectors.toList());
@ -95,7 +89,7 @@ public class BasLaancAprvRs {
return ArcrftWghtType;
}
@ApiParam(name = "고도")
//고도
public String getElev() {
if (areaList == null || areaList.isEmpty()) return null;
List<String> elevList = areaList.stream().map(BasLaancAreaModel::getFltElev).distinct().filter(Objects::nonNull).collect(Collectors.toList());
@ -103,7 +97,7 @@ public class BasLaancAprvRs {
return elev;
}
// @ApiParam(name = "조종사 성명")
//조종사 성명
// public String getPilotName() {
// if (pilotList == null || pilotList.isEmpty()) return null;
// List<String> pilotNameList = pilotList.stream().map(BasLaancPilotModel::getMemberName).distinct().filter(Objects::nonNull).collect(Collectors.toList());

62
pav-server/src/main/java/com/palnet/biz/api/bas/laanc/model/BasLaancArcrftModel.java

@ -4,44 +4,106 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.palnet.biz.config.convert.InstantDateStrSerializer;
import com.palnet.biz.jpa.entity.type.ArcrftTypeCd;
import com.palnet.biz.jpa.entity.type.ArcrftWghtCd;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.Instant;
@Data
public class BasLaancArcrftModel {
@Schema(description = "계획서 기체 일련번호", example = "1", hidden = true)
private Integer planArcrftSno;
@Schema(description = "비행계획서 일련번호", example = "1", hidden = true)
private Integer planSno;
@Schema(description = "기체 일련번호", example = "1", hidden = true)
private Integer arcrftSno;
@Schema(description = "식별번호(기체번호)", example = "PA0001")
private String idntfNum;
@Schema(description = "그룹명", example = "한국공항공사", hidden = true)
private String groupNm;
@Schema(description = "제작번호", example = "123101-13", hidden = true)
private String prdctNum;
@Schema(description = "기체종류코드", example = "01", hidden = true)
private ArcrftTypeCd arcrftTypeCd;
@Schema(description = "기체모델명", example = "M-01", hidden = true)
private String arcrftModelNm;
@Schema(description = "제작자", example = "DJI", hidden = true)
private String prdctCmpnNm;
@Schema(description = "제작일자", example = "2022-01-01", hidden = true)
@JsonSerialize(using = InstantDateStrSerializer.class)
private Instant prdctDate;
@Schema(description = "기체길이", example = "1.0", hidden = true)
private double arcrftLngth;
@Schema(description = "길체폭", example = "1.1", hidden = true)
private double arcrftWdth;
@Schema(description = "기체높이", example = "1.0", hidden = true)
private double arcrftHght;
@Schema(description = "기체중량", example = "1.5", hidden = true)
private double arcrftWght;
@Schema(description = "중량구분코드", hidden = true)
private String wghtTypeCd;
@Schema(description = "이미지URL", example = "http://www.imageurl.co.kr/image/url", hidden = true)
private String imageUrl;
@Schema(description = "최대이륙중량", example = "10", hidden = true)
private double takeoffWght;
@Schema(description = "사용여부", hidden = true)
private String useYn;
@Schema(description = "카메라탑재여부", example = "N")
private String cameraYn;
@Schema(description = "보험가입여부", example = "Y")
private String insrncYn;
@Schema(description = "소유자명(법인명)", example = "팔네트웍스")
private String ownerNm;
@Schema(description = "생성자ID", hidden = true)
private String createUserId;
@Schema(description = "생성일시", hidden = true)
private Instant createDt;
@Schema(description = "수정자ID", hidden = true)
private String updateUserId;
@Schema(description = "수정일시", hidden = true)
private Instant updateDt;
@Schema(hidden = true)
private String docState = "R";
@Schema(description = "식별장치종류코드", example = "DRON", hidden = true)
private String idntfTypeCd;
// kac 추가 필드
@Schema(description = "기체보험유무", example = "Y")
private String acrftInsuranceYn;
@Schema(description = "보험유효기간", hidden = true)
@JsonSerialize(using = InstantDateStrSerializer.class)
private Instant insuranceExperiod;
@Schema(description = "법인명", hidden = true)
private String corporationNm;
@Schema(description = "자체중량코드", example = "10")
private ArcrftWghtCd arcrftWghtCd; // 기체 무게 코드 ----
}

22
pav-server/src/main/java/com/palnet/biz/api/bas/laanc/model/BasLaancAreaByAirspaceModel.java

@ -0,0 +1,22 @@
package com.palnet.biz.api.bas.laanc.model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.util.List;
@Data
public class BasLaancAreaByAirspaceModel {
@Schema(description = "구역종류", example = "CIRCLE")
private String areaType;
@Schema(description = "버퍼존", example = "100")
private Integer bufferZone;
@Schema(description = "고도", example = "110")
private String fltElev;
private List<BasLaancAreaCoordByAirspaceModel> coordList;
}

20
pav-server/src/main/java/com/palnet/biz/api/bas/laanc/model/BasLaancAreaByElevModel.java

@ -0,0 +1,20 @@
package com.palnet.biz.api.bas.laanc.model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.util.List;
@Data
public class BasLaancAreaByElevModel {
@Schema(description = "구역종류", example = "CIRCLE")
private String areaType;
@Schema(description = "버퍼존", example = "100")
private Integer bufferZone;
private List<BasLaancAreaCoordByElevModel> coordList;
}

16
pav-server/src/main/java/com/palnet/biz/api/bas/laanc/model/BasLaancAreaCoordByAirspaceModel.java

@ -0,0 +1,16 @@
package com.palnet.biz.api.bas.laanc.model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Data
public class BasLaancAreaCoordByAirspaceModel {
@Schema(description = "위도", example = "127.33")
private double lat;
@Schema(description = "경도", example = "37.99")
private double lon;
}

16
pav-server/src/main/java/com/palnet/biz/api/bas/laanc/model/BasLaancAreaCoordByElevModel.java

@ -0,0 +1,16 @@
package com.palnet.biz.api.bas.laanc.model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Data
public class BasLaancAreaCoordByElevModel {
@Schema(description = "위도", example = "127.33")
private double lat;
@Schema(description = "경도", example = "37.99")
private double lon;
}

14
pav-server/src/main/java/com/palnet/biz/api/bas/laanc/model/BasLaancAreaCoordModel.java

@ -1,16 +1,30 @@
package com.palnet.biz.api.bas.laanc.model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.Instant;
@Data
public class BasLaancAreaCoordModel {
@Schema(description = "비행구역좌표 일련번호", example = "1")
private Integer planAreaCoordSno;
@Schema(description = "비행계획비행구역 일련번호", example = "1")
private Integer planAreaSno;
@Schema(description = "위도", example = "127.33")
private double lat;
@Schema(description = "경도", example = "37.99")
private double lon;
@Schema(description = "생성자ID", hidden = true)
private String createUserId;
@Schema(description = "생성일시", hidden = true)
private Instant createDt;
@Schema(hidden = true)
private String docState = "R";
}

30
pav-server/src/main/java/com/palnet/biz/api/bas/laanc/model/BasLaancAreaModel.java

@ -1,6 +1,7 @@
package com.palnet.biz.api.bas.laanc.model;
import com.palnet.biz.jpa.entity.type.FltMethod;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.Instant;
@ -8,20 +9,49 @@ import java.util.List;
@Data
public class BasLaancAreaModel {
@Schema(description = "비행구역 일련번호", example = "1", hidden = true)
private Integer planAreaSno;
@Schema(description = "비행계획서 일련번호", example = "1", hidden = true)
private Integer planSno;
@Schema(description = "구역종류", example = "CIRCLE")
private String areaType;
@Schema(description = "비행방식", example = "01")
private FltMethod fltMethod;
@Schema(description = "비행구역주소", example = "인천광역시 부평구 청천2동")
private String fltAreaAddr;
@Schema(description = "버퍼존", example = "100")
private Integer bufferZone;
@Schema(description = "고도", example = "110")
private String fltElev;
@Schema(description = "생성자ID", hidden = true)
private String createUserId;
@Schema(description = "생성일시", hidden = true)
private Instant createDt;
@Schema(description = "수정자ID", hidden = true)
private String updateUserId;
@Schema(description = "수정일시", hidden = true)
private Instant updateDt;
private String docState = "R";
private List<BasLaancAreaCoordModel> coordList;
@Schema(hidden = true)
private List<BasLaancAreaCoordModel> bufferCoordList;
// kac 추가 필드
@Schema(description = "비행방식(기타)")
private String fltMothoeRm;
}

2
pav-server/src/main/java/com/palnet/biz/api/bas/laanc/model/BasLaancDuplicatedAirspaceRs.java

@ -22,5 +22,5 @@ import lombok.NoArgsConstructor;
@Builder
public class BasLaancDuplicatedAirspaceRs {
private boolean isDuplicated;
private BasLaancAreaModel rq;
private BasLaancAreaByAirspaceModel rq;
}

22
pav-server/src/main/java/com/palnet/biz/api/bas/laanc/model/BasLaancPlanRq.java

@ -1,9 +1,12 @@
package com.palnet.biz.api.bas.laanc.model;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.palnet.biz.api.acnt.cstmr.model.AnctCstmrTermsModel;
import com.palnet.biz.api.external.model.PilotValidRs;
import com.palnet.biz.config.convert.InstantDatetimeStrSerializer;
import com.palnet.biz.jpa.entity.type.FltPurpose;
import com.palnet.biz.jpa.entity.type.FltType;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.Instant;
@ -11,18 +14,37 @@ import java.util.List;
@Data
public class BasLaancPlanRq {
@Schema(description = "비행계획서 일련번호", example = "1", hidden = true)
private Integer planSno;
@Schema(description = "사용자 일련번호", example = "1", hidden = true)
private Integer cstmrSno;
@Schema(description = "이름", example = "조종사")
private String memberName;
@Schema(description = "비행유형", example = "COMMERCIAL")
private FltType fltType; // 비행유형 - 상업/비상업 ----
@Schema(description = "비행시작일시", example = "2024-02-12 09:00:00", implementation = String.class)
@JsonSerialize(using = InstantDatetimeStrSerializer.class)
private Instant schFltStDt; // 시작일시
@Schema(description = "비행종료일시", example = "2024-02-12 10:00:00", implementation = String.class)
@JsonSerialize(using = InstantDatetimeStrSerializer.class)
private Instant schFltEndDt; // 종료일시
@Schema(description = "비행목적", example = "17")
private FltPurpose fltPurpose; // 비행목적 -----
@Schema(description = "서비스구분", example = "KAC")
private String serviceType; // 고정
@Schema(hidden = true)
private String docState = "R";
private List<BasLaancAreaModel> areaList;
// private List<BasFlightPlanPilotModel> pilotList;
private List<BasLaancArcrftModel> arcrftList;

3
pav-server/src/main/java/com/palnet/biz/api/bas/laanc/model/BasLaancQrcodeRq.java

@ -1,5 +1,6 @@
package com.palnet.biz.api.bas.laanc.model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@ -10,6 +11,6 @@ import lombok.NoArgsConstructor;
@AllArgsConstructor
@Builder
public class BasLaancQrcodeRq {
// private String fltPurpose; // 비행목적
@Schema(description = "기체신고번호", example = "C1CM0231251")
private String idntfNum; // 기체신고번호
}

4
pav-server/src/main/java/com/palnet/biz/api/bas/laanc/model/BasLaancTsRq.java

@ -1,7 +1,5 @@
package com.palnet.biz.api.bas.laanc.model;
import io.swagger.annotations.ApiParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@ -25,6 +23,6 @@ import java.util.List;
@AllArgsConstructor
@Builder
public class BasLaancTsRq {
@ApiParam(name = "기체신고번호", collectionFormat = ",")
// @ApiParam(name = "기체신고번호", collectionFormat = ",")
private List<String> IdntfNumList;
}

28
pav-server/src/main/java/com/palnet/biz/api/bas/laanc/service/BasLaancAprvService.java

@ -46,18 +46,32 @@ public class BasLaancAprvService {
* @param pageable
* @return
*/
@Deprecated
public Page<BasLaancAprvRs> getLaancAprvList(BasLaancAprvListRq rq, Pageable pageable) {
LaancAprvSearchDto searchDto = BasLaancAprvMapper.MAPPER.toDto(rq);
Page<LaancPlanDto> result = fltPlanQueryRepository.findAllAprvListBySearch(searchDto, pageable);
Page<BasLaancAprvRs> rs = PageUtils.convert(result, BasLaancAprvMapper.MAPPER.toRsList(result.getContent()));
return rs;
return PageUtils.convert(result, BasLaancAprvMapper.MAPPER.toRsList(result.getContent()));
}
/**
* laanc 승인 목록
*
* @param rq
* @return
*/
public List<BasLaancAprvRs> getLaancAprvList2(BasLaancAprvListRq rq) {
LaancAprvSearchDto searchDto = BasLaancAprvMapper.MAPPER.toDto(rq);
// 검색조건에 해당하는 비행계획서 조회
List<LaancPlanDto> result = fltPlanQueryRepository.findAllAprvListBySearch2(searchDto);
// 비행계획서에 해당하는 파일의 그룹NO 추출 - PDF URL을 가져오기 위함
List<Integer> fileGroupNoList = result.stream().map(LaancPlanDto::getFileGroupNo).filter(Objects::nonNull).collect(Collectors.toList());
// 파일 정보 조회
List<ComnFileModel> fileListByGroupNoList = comnFileService.getFileListByGroupNoList(fileGroupNoList);
// 파일 정보(PDF)를 비행계획서에 추가
result.forEach(dto -> {
if (dto.getFileGroupNo() != null) {
fileListByGroupNoList.stream()
@ -66,9 +80,8 @@ public class BasLaancAprvService {
.ifPresent(file -> dto.setPdfUrl(file.getDownloadUrl()));
}
});
List<BasLaancAprvRs> rs = BasLaancAprvMapper.MAPPER.toRsList(result);
return rs;
return BasLaancAprvMapper.MAPPER.toRsList(result);
}
/**
@ -79,13 +92,16 @@ public class BasLaancAprvService {
*/
public BasLaancAprvRs getLaancAprvDetail(String planSno) {
if (planSno == null) throw new CustomException(ErrorCode.NON_VALID_PARAMETER);
LaancPlanDto result = fltPlanQueryRepository.findAprvById(Integer.parseInt(planSno));
// PDF URL 추출
if (result != null && result.getFileGroupNo() != null) {
ComnFileModel comnFileModel = comnFileService.getOfficialDocumentFileListByGroupNo(result.getFileGroupNo());
if (comnFileModel != null) result.setPdfUrl(comnFileModel.getDownloadUrl());
}
BasLaancAprvRs rs = BasLaancAprvMapper.MAPPER.toRs(result);
return rs;
return BasLaancAprvMapper.MAPPER.toRs(result);
}
}

107
pav-server/src/main/java/com/palnet/biz/api/bas/laanc/service/BasLaancService.java

@ -92,7 +92,12 @@ public class BasLaancService {
private String TS_RETURN_URI;
// LAANC 검증
/**
* LAANC 검증
*
* @param rq
* @return
*/
public BasLaancValidatedRs validationLaanc(BasLaancPlanRq rq) {
if (!this.laancParamValid(rq)) throw new CustomException(ErrorCode.NON_VALID_PARAMETER);
@ -163,7 +168,12 @@ public class BasLaancService {
}
// 비행계획서 등록, 약관 등록, 공문 생성
/**
* 비행계획서 등록, 약관 등록, 공문 생성
*
* @param rq
* @return
*/
@Transactional
public BasLaancLastRs createFlightPlan(BasLaancPlanRq rq) {
// if (rq == null || rq.getValidatedRs() == null) throw new CustomException(ErrorCode.NON_VALID_PARAMETER);
@ -187,6 +197,7 @@ public class BasLaancService {
// 비행계획서
String userId = jwtTokenUtil.getUserIdByToken();
Integer cstmrSno = jwtTokenUtil.getCstmrSnoByToken();
// 개인정보 가져오기 - 비행계획서 작성자 정보, 조종사 정보
AnctCstmrModel cstmrInfo = ptyCstmrQueryRepository.findByCstmrSno(cstmrSno);
FltPlanBas fltPlanBas = BasLaancMapper.MAPPER.modelToPlanEntity(cstmrInfo);
@ -219,6 +230,7 @@ public class BasLaancService {
FltPlanBas rBasEntity = fltPlanBasRepository.save(fltPlanBas);
Integer planSno = rBasEntity.getPlanSno();
// 비행구역
List<BasLaancAreaModel> basLaancAreaModelList = rq.getAreaList();
if (basLaancAreaModelList != null && !basLaancAreaModelList.isEmpty()) {
@ -377,6 +389,12 @@ public class BasLaancService {
}
/**
* 비행신청 - 공역관련 검증
*
* @param rq
* @return
*/
private BasLaancValidatedRs validationPlanAirspace(BasLaancPlanRq rq) {
// 초기화
@ -423,10 +441,9 @@ public class BasLaancService {
}
/**
* 야간 특별비행 유무 확인
* 비행계획서 검증 - 시작, 종료 일자
* 1. 비행시작 일자 금일 ~ 90일 이내
* 2. 비행 종료일자 금일 ~ 6개월까지 -- validtion 통과후 일몰
* 3. 일몰, 일출 시간[해떠있는 시간] 체크
*
* @param rq
* @return
@ -450,26 +467,14 @@ public class BasLaancService {
// 시간 파라미터가 맞지 않을경우
if (!(isSchFltStDtValid && isSchFltEndDtValid)) return false;
// String[] stringStDt = InstantUtils.toDatetimeString(rq.getSchFltStDt()).split(" ");
// String[] stringEndDt = InstantUtils.toDatetimeString(rq.getSchFltEndDt()).split(" ");
//
// ComnSunrisesetCoordRq comnSunrisesetCoordRq = new ComnSunrisesetCoordRq(stringStDt[0].replace("-", ""), stringEndDt[0].replace("-", ""), null, null);
//
// ComnSunrisesetRs comnSunrisesetRs = comRiseSetQueryRepository.findBySearchCoordDateTransform(comnSunrisesetCoordRq);
//
// LocalTime sunUp = this.convertStringToTime(comnSunrisesetRs.getCivilm(), "HHmmss");
// LocalTime sunDown = this.convertStringToTime(comnSunrisesetRs.getCivile(), "HHmmss");
//
// LocalTime stringStTm = this.convertStringToTime(stringStDt[1].replace(":", ""), "HHmmss");
// LocalTime stringEndTm = this.convertStringToTime(stringEndDt[1].replace(":", ""), "HHmmss");
//
// boolean stTmValid = this.isBetweenSunriseAndSunset(sunUp, sunDown, stringStTm);
// boolean endTmValid = this.isBetweenSunriseAndSunset(sunUp, sunDown, stringEndTm);
// if (!stTmValid || !endTmValid) return false;
return true;
}
/**
* 비행계획서 검증 - 특별 비행
* @param rq
* @return
*/
private boolean validationPlanSpecialFlight(BasLaancPlanRq rq) {
String[] stringStDt = InstantUtils.toDatetimeString(rq.getSchFltStDt()).split(" ");
@ -518,18 +523,23 @@ public class BasLaancService {
timeToCheck.isBefore(sunset);
}
// 허용고도 조회
public List<Integer> getAllowableElevation(List<BasLaancAreaModel> rq) {
/**
* 허용고도 조회
*
* @param rq
* @return
*/
public List<Integer> getAllowableElevation(List<BasLaancAreaByElevModel> rq) {
AirspaceUtils airspaceUtils = AirspaceUtils.getInstance();
List<Integer> allowElevationList = new ArrayList<>();
for (BasLaancAreaModel area : rq) {
for (BasLaancAreaByElevModel area : rq) {
//rq로 들어온 좌표로 버퍼좌표 생성
List<Coordinate> targetCoord = new ArrayList<>();
List<Coordinate> targetCoordBufferList = new ArrayList<>();
for (BasLaancAreaCoordModel basLaancAreaCoordModel : area.getCoordList()) {
Coordinate coords = new Coordinate(basLaancAreaCoordModel.getLon(), basLaancAreaCoordModel.getLat());
for (BasLaancAreaCoordByElevModel coord : area.getCoordList()) {
Coordinate coords = new Coordinate(coord.getLon(), coord.getLat());
targetCoord.add(coords);
}
@ -553,7 +563,13 @@ public class BasLaancService {
return allowElevationList;
}
// TS 연동
/**
* TS 연동 - 장격증명 API
*
* @param idntfNumList
* @return
*/
@Deprecated
public BasLaancTsRs getTsValid(List<String> idntfNumList) {
Integer cstmrSno = jwtTokenUtil.getCstmrSnoByToken();
AnctCstmrModel cstmrInfo = ptyCstmrQueryRepository.findByCstmrSno(cstmrSno);
@ -573,17 +589,22 @@ public class BasLaancService {
.build();
}
// 관제권 포함 여부
public List<BasLaancDuplicatedAirspaceRs> getDuplicatedAirspace(List<BasLaancAreaModel> rq) {
/**
* 구역좌표 - 관제권 포함 여부
*
* @param rq
* @return
*/
public List<BasLaancDuplicatedAirspaceRs> getDuplicatedAirspace(List<BasLaancAreaByAirspaceModel> rq) {
AirspaceUtils airspaceUtils = AirspaceUtils.getInstance();
List<BasLaancDuplicatedAirspaceRs> rs = new ArrayList<>();
for (BasLaancAreaModel area : rq) {
for (BasLaancAreaByAirspaceModel area : rq) {
//rq로 들어온 좌표로 버퍼좌표 생성
List<Coordinate> targetCoord = new ArrayList<>();
List<Coordinate> targetCoordBufferList = new ArrayList<>();
for (BasLaancAreaCoordModel basLaancAreaCoordModel : area.getCoordList()) {
for (BasLaancAreaCoordByAirspaceModel basLaancAreaCoordModel : area.getCoordList()) {
Coordinate coords = new Coordinate(basLaancAreaCoordModel.getLon(), basLaancAreaCoordModel.getLat());
targetCoord.add(coords);
}
@ -612,7 +633,13 @@ public class BasLaancService {
return rs;
}
// QR code 생성
/**
* QR code 생성 - 자격증명을 위한
* QR code 생성(PAV-KAC)* > qr code 스캔(사용자) > 자격정보 전송(TS) > return url 자격정보 받음(PAV-KAC) > 확인(자격정보 확인)
*
* @param rq
* @return
*/
public BasLaancQrcodeRs createQrcode(BasLaancQrcodeRq rq) {
Integer cstmrSno = jwtTokenUtil.getCstmrSnoByToken();
@ -684,7 +711,14 @@ public class BasLaancService {
}
// QR code 확인
/**
* QR code 확인
* QR code 촬영후 return url로 데이터 받은 이후 확인 프로세스
* QR code 생성(PAV-KAC) > qr code 스캔(사용자) > 자격정보 전송(TS) > return url 자격정보 받음(PAV-KAC) > 확인(자격정보 확인)*
*
* @param confirmKey
* @return
*/
public PilotValidRs checkQrcode(String confirmKey) {
log.info(">>> confirmKey : {}", confirmKey);
String userIdByToken = jwtTokenUtil.getUserIdByToken();
@ -716,7 +750,12 @@ public class BasLaancService {
return rs;
}
// TS 비행계획서
/**
* TS 비행계획서
* 드론원스탑에서 받은 데이터 받기
*
* @param tsPlanRq
*/
public void createPlanDos(TsPlanRq tsPlanRq) {
// convert
BasLaancPlanRq rq = tsPlanRq.toBasLaancPlanRq();

84
pav-server/src/main/java/com/palnet/biz/api/cns/faq/controller/CnsFaqController.java

@ -1,32 +1,35 @@
package com.palnet.biz.api.cns.faq.controller;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.palnet.biz.api.bas.laanc.model.BasLaancAprvRs;
import com.palnet.biz.api.cns.faq.model.FaqListModel;
import com.palnet.biz.api.cns.faq.model.FaqListRQModel;
import com.palnet.biz.api.cns.faq.model.FaqListRSModel;
import com.palnet.biz.api.cns.faq.model.FaqUpdateModel;
import com.palnet.biz.api.cns.faq.service.CnsFaqService;
import com.palnet.biz.api.comn.response.BasicResponse;
import com.palnet.biz.api.comn.response.ErrorResponse;
import com.palnet.biz.api.comn.response.SuccessResponse;
import com.palnet.comn.exception.CustomException;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.data.domain.Page;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import com.palnet.biz.api.cns.faq.model.FaqListRQModel;
import com.palnet.biz.api.cns.faq.model.FaqListModel;
import com.palnet.biz.api.cns.faq.service.CnsFaqService;
import com.palnet.biz.api.comn.response.BasicResponse;
import com.palnet.biz.api.comn.response.SuccessResponse;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@RestController
@Slf4j
@Tag(name = "FAQ API", description = "FAQ 관련 API")
@RequiredArgsConstructor
@RequestMapping(value = "/api/bas/cns/faq")
@Tag(name = "FAQ", description = "FAQ 관련 API")
public class CnsFaqController {
private final CnsFaqService service;
@ -37,10 +40,18 @@ public class CnsFaqController {
* @param model
* @return
*/
@Tag(name = "FAQ API", description = "FAQ 관련 API")
@GetMapping
@Operation(summary = "FAQ 조회", description = "FAQ를 조회하는 API 입니다.")
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "성공",
content = {
@io.swagger.v3.oas.annotations.media.Content(mediaType = "application/json",
array = @io.swagger.v3.oas.annotations.media.ArraySchema(
schema = @io.swagger.v3.oas.annotations.media.Schema(implementation = FaqListModel.class)))
})
})
public ResponseEntity<? extends BasicResponse> getFaqList(FaqListRQModel model) {
List<FaqListModel> result = null;
List<FaqListRSModel> result = null;
try {
result = service.getFaqList(model); // FaQ 항목들 조회하는 기능
} catch (CustomException e) {
@ -80,10 +91,19 @@ public class CnsFaqController {
* @param sno
* @return
*/
@Tag(name = "FAQ API", description = "FAQ 관련 API")
@GetMapping("/{sno}")
public ResponseEntity<? extends BasicResponse> getFaqDetail(@PathVariable("sno") int sno) {
FaqListModel result = null;
@Operation(summary = "FAQ 상세 조회", description = "특정 FAQ만 조회하는 API 입니다. sno 값 : 1, 2, 등 ....")
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "성공",
content = {
@io.swagger.v3.oas.annotations.media.Content(mediaType = "application/json",
array = @io.swagger.v3.oas.annotations.media.ArraySchema(
schema = @io.swagger.v3.oas.annotations.media.Schema(implementation = FaqListModel.class)))
})
})
public ResponseEntity<? extends BasicResponse> getFaqDetail(
@Parameter(name="sno", description = "FAQ 시리얼 넘버", in = ParameterIn.PATH, example = "17")@PathVariable int sno) {
FaqListRSModel result = null;
try {
result = service.getFaqDetail(sno); // 일련번호[sno]로 상세정보를 조회하는 기능
} catch (CustomException e) {
@ -123,8 +143,16 @@ public class CnsFaqController {
* @param model
* @return
*/
@Tag(name = "FAQ API", description = "FAQ 관련 API")
@PostMapping
@Operation(summary = "FAQ 작성", description = "FAQ를 작성하는 API 입니다.")
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "성공",
content = {
@io.swagger.v3.oas.annotations.media.Content(mediaType = "application/json",
array = @io.swagger.v3.oas.annotations.media.ArraySchema(
schema = @io.swagger.v3.oas.annotations.media.Schema(implementation = SuccessResponse.class)))
})
})
public ResponseEntity<? extends BasicResponse> insertFaq(@RequestBody FaqListModel model) {
boolean result = false;
try {
@ -168,9 +196,17 @@ public class CnsFaqController {
* @param model
* @return
*/
@Tag(name = "FAQ API", description = "FAQ 관련 API")
@PutMapping
public ResponseEntity<? extends BasicResponse> updateFaq(@RequestBody FaqListModel model) {
@Operation(summary = "FAQ 수정", description = "FAQ를 수정하는 API 입니다.")
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "성공",
content = {
@io.swagger.v3.oas.annotations.media.Content(mediaType = "application/json",
array = @io.swagger.v3.oas.annotations.media.ArraySchema(
schema = @io.swagger.v3.oas.annotations.media.Schema(implementation = SuccessResponse.class)))
})
})
public ResponseEntity<? extends BasicResponse> updateFaq(@RequestBody FaqUpdateModel model) {
boolean result = false;
try {
result = service.updateFaq(model); // FaQ 수정하는 기능
@ -212,8 +248,8 @@ public class CnsFaqController {
* @param sno
* @return
*/
@Tag(name = "FAQ API", description = "FAQ 관련 API")
@DeleteMapping("/{sno}")
@Operation(summary = "FAQ 삭제", description = "특정 FAQ를 논리 삭제하는 API 입니다. sno 예시 : 1, 2, 등 ...")
public ResponseEntity<? extends BasicResponse> deleteFaq(@PathVariable("sno") int sno) {
// TODO 성공/실패 상태값 전송
try {

14
pav-server/src/main/java/com/palnet/biz/api/cns/faq/model/FaqListModel.java

@ -2,31 +2,43 @@ package com.palnet.biz.api.cns.faq.model;
import java.time.Instant;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Data
public class FaqListModel {
@Schema(hidden = true)
private int faqSno;
@Schema(description = "FAQ 분류" , example = "장치신고")
private String category;
@Schema(description = "작성할 글의 제목" , example = "제목 샘플")
private String title;
@Schema(description = "작성할 글의 내용" , example = "내용 샘플")
private String content;
@Schema(hidden = true)
private int viewCnt;
@Schema(description = "표출 여부" , example = "Y")
private String expsrYn;
// private String delYn;
@Schema(hidden = true)
private String delYn;
@Schema(hidden = true)
private String createUserId;
@Schema(description = "생성일자", example = "2023-12-12", implementation = String.class)
private Instant createDt;
@Schema(hidden = true)
private String updateUserId;
@Schema(description = "업데이트 일자", example = "2023-12-12", implementation = String.class)
private Instant updateDt;
}

3
pav-server/src/main/java/com/palnet/biz/api/cns/faq/model/FaqListRQModel.java

@ -1,12 +1,15 @@
package com.palnet.biz.api.cns.faq.model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Data
public class FaqListRQModel {
@Schema(description = "FAQ 카테고리" , example = "비행승인")
private String category;
@Schema(description = "해당 단어가 포함된 제목 검색" , example = "비행")
private String word;
}

32
pav-server/src/main/java/com/palnet/biz/api/cns/faq/model/FaqListRSModel.java

@ -0,0 +1,32 @@
package com.palnet.biz.api.cns.faq.model;
import java.time.Instant;
import lombok.Data;
@Data
public class FaqListRSModel {
private int faqSno;
private String category;
private String title;
private String content;
private int viewCnt;
private String expsrYn;
private String delYn;
private String createUserId;
private Instant createDt;
private String updateUserId;
private Instant updateDt;
}

46
pav-server/src/main/java/com/palnet/biz/api/cns/faq/model/FaqUpdateModel.java

@ -0,0 +1,46 @@
package com.palnet.biz.api.cns.faq.model;
import java.time.Instant;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Data
public class FaqUpdateModel {
@Schema(description = "수정할 글의 번호" , example = "17")
private int faqSno;
@Schema(description = "FAQ 분류" , example = "장치신고")
private String category;
@Schema(description = "수정할 글의 제목" , example = "제목 수정 샘플")
private String title;
@Schema(description = "수정할 글의 내용" , example = "내용 수정 샘플")
private String content;
@Schema(hidden = true)
private int viewCnt;
@Schema(description = "표출 여부" , example = "Y")
private String expsrYn;
@Schema(hidden = true)
private String delYn;
@Schema(hidden = true)
private String createUserId;
@Schema(hidden = true)
private Instant createDt;
@Schema(description = "수정한 사람" , example = "palnet")
private String updateUserId;
@Schema(description = "업데이트 일자")
private Instant updateDt;
}

12
pav-server/src/main/java/com/palnet/biz/api/cns/faq/service/CnsFaqService.java

@ -3,6 +3,8 @@ package com.palnet.biz.api.cns.faq.service;
import com.palnet.biz.api.acnt.jwt.utils.JwtTokenUtil;
import com.palnet.biz.api.cns.faq.model.FaqListModel;
import com.palnet.biz.api.cns.faq.model.FaqListRQModel;
import com.palnet.biz.api.cns.faq.model.FaqListRSModel;
import com.palnet.biz.api.cns.faq.model.FaqUpdateModel;
import com.palnet.biz.jpa.entity.CnsFaqBas;
import com.palnet.biz.jpa.repository.cns.CnsFaqBasRepository;
import com.palnet.biz.jpa.repository.cns.CnsFaqQueryRepository;
@ -30,9 +32,9 @@ public class CnsFaqService {
* @param model
* @return
*/
public List<FaqListModel> getFaqList(FaqListRQModel model){
public List<FaqListRSModel> getFaqList(FaqListRQModel model){
List<FaqListModel> result = query.getFaqList(model.getCategory(), model.getWord());
List<FaqListRSModel> result = query.getFaqList(model.getCategory(), model.getWord());
if(result == null) result = new ArrayList<>();
@ -45,9 +47,9 @@ public class CnsFaqService {
* @param sno
* @return
*/
public FaqListModel getFaqDetail(int sno){
public FaqListRSModel getFaqDetail(int sno){
cnsFaqBasRepository.updateViewCnt(sno);
FaqListModel result = query.getFaqDetail(sno);
FaqListRSModel result = query.getFaqDetail(sno);
if(result == null) throw new CustomException(ErrorCode.DATA_NO);
return result;
}
@ -90,7 +92,7 @@ public class CnsFaqService {
* @return
*/
@Transactional
public boolean updateFaq(FaqListModel model) {
public boolean updateFaq(FaqUpdateModel model) {
String userId = jwtTokenUtil.getUserIdByToken();
CnsFaqBas prevData = cnsFaqBasRepository.findById(model.getFaqSno()).orElseThrow(() -> new CustomException(ErrorCode.DATA_NO));

107
pav-server/src/main/java/com/palnet/biz/api/cns/qna/controller/CnsQnaController.java

@ -1,30 +1,48 @@
package com.palnet.biz.api.cns.qna.controller;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.palnet.biz.api.acnt.jwt.utils.JwtTokenUtil;
import com.palnet.biz.api.cns.qna.model.*;
import com.palnet.biz.api.cns.qna.model.QnaBasModel;
import com.palnet.biz.api.cns.qna.model.QnaDetailRSModel;
import com.palnet.biz.api.cns.qna.model.QnaInsertAnserRQModel;
import com.palnet.biz.api.cns.qna.model.QnaInsertRQModel;
import com.palnet.biz.api.cns.qna.model.QnaListAdminRQ;
import com.palnet.biz.api.cns.qna.model.QnaSelectListRQ;
import com.palnet.biz.api.cns.qna.service.CnsQnaService;
import com.palnet.biz.api.comn.response.BasicResponse;
import com.palnet.biz.api.comn.response.ErrorResponse;
import com.palnet.biz.api.comn.response.SuccessResponse;
import com.palnet.comn.code.RSErrorCode;
import com.palnet.comn.exception.CustomException;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@RestController
@Slf4j
@Tag(name = "QNA", description = "QNA 관련 API")
@RequiredArgsConstructor
@RestController
@Tag(name = "QNA", description = "QNA 관련 API")
@RequestMapping("/api/cns/qna")
public class CnsQnaController {
@ -39,8 +57,15 @@ public class CnsQnaController {
* @return
*/
@PostMapping(consumes = "multipart/form-data")
@Tag(name = "QNA", description = "QNA 관련 API")
@ApiOperation(value = "QnA 등록 - 사용자")
@Operation(summary = "QNA 등록 (사용자)", description = "사용자 권한으로 QNA를 등록하는 API 입니다.")
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "성공",
content = {
@io.swagger.v3.oas.annotations.media.Content(mediaType = "application/json",
array = @io.swagger.v3.oas.annotations.media.ArraySchema(
schema = @io.swagger.v3.oas.annotations.media.Schema(implementation = boolean.class)))
})
})
public ResponseEntity<? extends BasicResponse> insertQna(QnaInsertRQModel rq) {
boolean result = false;
try {
@ -83,8 +108,15 @@ public class CnsQnaController {
* @return
*/
@GetMapping
@Tag(name = "QNA", description = "QNA 관련 API")
@ApiOperation(value = "QnA 리스트 조회-관리자")
@Operation(summary = "QNA 리스트 조회 (관리자)", description = "QNA 리스트를 관리자 권한으로 조회하는 API 입니다.")
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "성공",
content = {
@io.swagger.v3.oas.annotations.media.Content(mediaType = "application/json",
array = @io.swagger.v3.oas.annotations.media.ArraySchema(
schema = @io.swagger.v3.oas.annotations.media.Schema(implementation = QnaBasModel.class)))
})
})
public ResponseEntity<? extends BasicResponse> selectQna(QnaListAdminRQ rq) {
List<QnaBasModel> result = new ArrayList<>();
@ -129,8 +161,15 @@ public class CnsQnaController {
* @return
*/
@GetMapping("/user")
@Tag(name = "QNA", description = "QNA 관련 API")
@ApiOperation(value = "QnA 리스트 조회-사용자")
@Operation(summary = "QNA 리스트 조회 (사용자)", description = "QNA 리스트를 사용자 권한으로 조회하는 API 입니다.")
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "성공",
content = {
@io.swagger.v3.oas.annotations.media.Content(mediaType = "application/json",
array = @io.swagger.v3.oas.annotations.media.ArraySchema(
schema = @io.swagger.v3.oas.annotations.media.Schema(implementation = QnaBasModel.class)))
})
})
public ResponseEntity<? extends BasicResponse> selectQnaForUser(QnaSelectListRQ rq) {
List<QnaBasModel> result = new ArrayList<>();
@ -175,9 +214,8 @@ public class CnsQnaController {
* @return
*/
@GetMapping("/{qnaSno}")
@Tag(name = "QNA", description = "QNA 관련 API")
@ApiOperation(value = "QnA 상세보기")
public ResponseEntity<? extends BasicResponse> detailQna(@PathVariable int qnaSno) {
@Operation(summary = "QNA 리스트 상세 조회", description = "QNA 리스트를 상세하게 조회하는 API 입니다.")
public ResponseEntity<? extends BasicResponse> detailQna(@Parameter(name="qnaSno", description = "QnA일련번호", in = ParameterIn.PATH, example = "295") @PathVariable int qnaSno) {
QnaDetailRSModel result = null;
try {
result = cnsQnaService.getQnaDetail(qnaSno); // Qna 상세불러오기 기능
@ -219,8 +257,15 @@ public class CnsQnaController {
* @return
*/
@PutMapping(consumes = "multipart/form-data")
@Tag(name = "QNA", description = "QNA 관련 API")
@ApiOperation(value = "QnA 수정 - 사용자")
@Operation(summary = "QNA 수정 (사용자)", description = "QNA를 사용자 권한으로 수정하는 API 입니다.")
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "성공",
content = {
@io.swagger.v3.oas.annotations.media.Content(mediaType = "application/json",
array = @io.swagger.v3.oas.annotations.media.ArraySchema(
schema = @io.swagger.v3.oas.annotations.media.Schema(implementation = boolean.class)))
})
})
public ResponseEntity<? extends BasicResponse> updateQna(QnaInsertRQModel rq) {
boolean result = false;
try {
@ -264,9 +309,8 @@ public class CnsQnaController {
* @return
*/
@DeleteMapping("/{qnaSno}")
@Tag(name = "QNA", description = "QNA 관련 API")
@ApiOperation(value = "QnA 삭제하기")
public ResponseEntity<? extends BasicResponse> deleteQna(@PathVariable int qnaSno) {
@Operation(summary = "QNA 삭제", description = "QNA를 삭제하는 API 입니다.")
public ResponseEntity<? extends BasicResponse> deleteQna(@Parameter(name="qnaSno", description = "QnA일련번호", in = ParameterIn.PATH, example = "17") @PathVariable int qnaSno) {
// TODO 관리자만 삭제 가능 여부인지 확인 필요
boolean result = false;
try {
@ -309,8 +353,15 @@ public class CnsQnaController {
* @return
*/
@PutMapping("/answer")
@Tag(name = "QNA", description = "QNA 관련 API")
@ApiOperation(value = "QnA 답변 등록 - 관리자")
@Operation(summary = "QNA 답변 등록(관리자)", description = "QNA에 대한 답변을 관리자 권한으로 등록하는 API 입니다.")
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "성공",
content = {
@io.swagger.v3.oas.annotations.media.Content(mediaType = "application/json",
array = @io.swagger.v3.oas.annotations.media.ArraySchema(
schema = @io.swagger.v3.oas.annotations.media.Schema(implementation = boolean.class)))
})
})
public ResponseEntity<? extends BasicResponse> insertAnswer(@RequestBody QnaInsertAnserRQModel rq) {
// TODO 추후 auth -> role 체크로 변경
boolean result = false;

4
pav-server/src/main/java/com/palnet/biz/api/cns/qna/model/QnaInsertAnserRQModel.java

@ -1,17 +1,21 @@
package com.palnet.biz.api.cns.qna.model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Data
public class QnaInsertAnserRQModel {
@Schema(description = "답변을 달 qna 번호" , example = "16")
private Integer qnaSno;
// private Integer targetSno; // 상위 Qna 번호
@Schema(description = "답변 내용" , example = "답변 샘플입니다.")
private String anserContent;
// private String anserUserNm;
// private Instant anserProcDt;
@Schema(description = "답변 상태" , example = "Y")
private String anserStatus;
}

4
pav-server/src/main/java/com/palnet/biz/api/cns/qna/model/QnaListAdminRQ.java

@ -1,15 +1,19 @@
package com.palnet.biz.api.cns.qna.model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Data
public class QnaListAdminRQ {
// 문의유형
@Schema(description = "검색 타입" , example = "불만")
private String category;
// 답변상태
@Schema(description = "답변 여부" , example = "Y")
private String anserStatus;
// 작성자
@Schema(description = "작성자" , example = "팔네트웍스")
private String createUserNm;
}

6
pav-server/src/main/java/com/palnet/biz/api/cns/qna/model/QnaSelectListRQ.java

@ -1,12 +1,18 @@
package com.palnet.biz.api.cns.qna.model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Data
public class QnaSelectListRQ {
@Schema(description = "검색 타입" , example = "TITLE")
private String searchType;
@Schema(description = "검색어" , example = "드론")
private String word;
@Schema(description = "카테고리" , example = "문의")
private String category;
}

2
pav-server/src/main/java/com/palnet/biz/api/cns/qna/service/CnsQnaService.java

@ -123,6 +123,8 @@ public class CnsQnaService {
cnsQnaBasRepository.pulsViewCount(qnaSno);
CnsQnaBas entity = cnsQnaBasRepository.findFirstByQnaSnoAndTargetSnoAndDelYnAndExpsrYn(qnaSno, 0, "N", "Y");
if(entity == null) throw new CustomException(ErrorCode.DATA_NO);
List<ComnFileModel> files = null;
if (entity.getFileGroupNo() != null && entity.getFileGroupNo() != 0)
files = comnFileService.getNormalFileListByGroupNo(entity.getFileGroupNo()); // 파일그룹번호[fileGroupNo]에 해당하는 파일등 모두 가져오는 기능.

12
pav-server/src/main/java/com/palnet/biz/api/comn/elev/controller/ComnElevController.java

@ -8,7 +8,8 @@ import com.palnet.biz.api.comn.response.BasicResponse;
import com.palnet.biz.api.comn.response.ErrorResponse;
import com.palnet.biz.api.comn.response.SuccessResponse;
import com.palnet.comn.exception.CustomException;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@ -38,8 +39,7 @@ public class ComnElevController {
* @return
*/
@PostMapping(value = "/ground")
@ApiOperation(value = "지표면 고도 가져오기")
@Tag(name = "공통 API", description = "공통 API")
@Operation(summary = "특정 좌표의 고도 가져오기", description = "특정 좌표의 해수면고도(MSL)를 입력하면 지표면고도(AGL)로 변환해 주는 API 입니다.")
public ResponseEntity<? extends BasicResponse> getGroundElev(@RequestBody List<ComnGroundElevRq> rq) {
List<ComnElevRs> rs = null;
try {
@ -83,8 +83,7 @@ public class ComnElevController {
* @return
*/
@PostMapping(value = "/to/agl")
@ApiOperation(value = "msl을 agl로 변환")
@Tag(name = "공통 API", description = "공통 API")
@Operation(summary = "해수면고도 -> 지표면고도 변환", description = "특정 좌표의 해수면고도(MSL)를 지표면고도(AGL)로 변환해 주는 API 입니다.")
public ResponseEntity<? extends BasicResponse> convertMslToAgl(@RequestBody List<ComnElevRq> rq) {
List<ComnElevRs> rs = null;
try {
@ -128,8 +127,7 @@ public class ComnElevController {
* @return
*/
@PostMapping(value = "/to/msl")
@ApiOperation(value = "agl을 msl로 변환")
@Tag(name = "공통 API", description = "공통 API")
@Operation(summary = "지표면고도 -> 해수면고도 변환", description = "특정 좌표의 지표면고도(AGL)를 해수면고도(MSL)로 변환해 주는 API 입니다.")
public ResponseEntity<? extends BasicResponse> convertAglToMsl(@RequestBody List<ComnElevRq> rq) {
List<ComnElevRs> rs = null;
try {

7
pav-server/src/main/java/com/palnet/biz/api/comn/elev/model/ComnElevRq.java

@ -1,5 +1,6 @@
package com.palnet.biz.api.comn.elev.model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@ -10,7 +11,13 @@ import lombok.NoArgsConstructor;
@AllArgsConstructor
@Builder
public class ComnElevRq {
@Schema(description = "위도" , example = "37.520930", implementation = Double.class)
private Double lat;
@Schema(description = "경도" , example = "126.605684", implementation = Double.class)
private Double lon;
@Schema(description = "고도" , example = "100.0", implementation = Double.class)
private Double elev;
}

5
pav-server/src/main/java/com/palnet/biz/api/comn/elev/model/ComnGroundElevRq.java

@ -1,5 +1,6 @@
package com.palnet.biz.api.comn.elev.model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@ -10,6 +11,10 @@ import lombok.NoArgsConstructor;
@AllArgsConstructor
@Builder
public class ComnGroundElevRq {
@Schema(description = "위도" , example = "37.520930", implementation = Double.class)
private Double lat;
@Schema(description = "경도" , example = "126.605684", implementation = Double.class)
private Double lon;
}

13
pav-server/src/main/java/com/palnet/biz/api/comn/file/controller/ComnFileController.java

@ -1,6 +1,11 @@
package com.palnet.biz.api.comn.file.controller;
import com.palnet.biz.api.comn.file.service.ComnFileService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
@ -23,6 +28,8 @@ import org.springframework.web.bind.annotation.RestController;
@RequiredArgsConstructor
@RequestMapping("/api/comn/file")
@RestController
@Tag(name ="파일", description = "파일 관련 API")
public class ComnFileController {
private final ComnFileService comnFileService;
@ -35,7 +42,8 @@ public class ComnFileController {
*/
@Deprecated
@GetMapping("/download")
public void downloadPDF(int fileSno) {
@Operation(summary = "파일다운로드[사용하지 않음]", description = "미사용")
public void downloadPDF(@Parameter(name="fileSno", description = "파일일련번호", in = ParameterIn.QUERY, example = "117") int fileSno) {
try {
comnFileService.fileDownload(fileSno); // 파일 일련번호[fileSno]로 파일 다운로드하는 기능
} catch (Exception e) {
@ -55,7 +63,8 @@ public class ComnFileController {
* @param fileSno
*/
@GetMapping("/download/{fileSno}")
public void download(@PathVariable("fileSno") int fileSno) {
@Operation(summary = "파일다운로드", description = "파일 일련번호로 파일을 다운로드 합니다.")
public void download(@Parameter(name="fileSno", description = "파일일련번호", in = ParameterIn.PATH, example = "117") @PathVariable("fileSno") int fileSno) {
try {
comnFileService.fileDownload(fileSno);
} catch (Exception e) {

8
pav-server/src/main/java/com/palnet/biz/api/comn/model/ComnPagingModel.java

@ -1,13 +1,21 @@
package com.palnet.biz.api.comn.model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Data
public class ComnPagingModel {
@Schema(description = "데이터 표출 수" , example = "10")
private int record = 10; // 데이터 표출 수
@Schema(description = "현재 페이지" , example = "1")
private int page = 0; // 현재 페이지
@Schema(description = "시작위치" , example = "0")
private int stIdx = 0; // 시작 위치
@Schema(description = "끝 위치" , example = "0")
private int endIdx = 0; // 끝 위치
}

6
pav-server/src/main/java/com/palnet/biz/api/comn/model/ComnRqModel.java

@ -1,17 +1,23 @@
package com.palnet.biz.api.comn.model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper=false)
public class ComnRqModel extends ComnPagingModel {
@Schema(description = "검색 시작 날짜" , example = "2023-11-01" , implementation = String.class)
private String stDate;
@Schema(description = "검색 종료 날짜" , example = "2023-11-30" , implementation = String.class)
private String endDate;
@Schema(hidden = true)
private String search1;
@Schema(hidden = true)
private String searchType1;
}

9
pav-server/src/main/java/com/palnet/biz/api/comn/response/SuccessResponse.java

@ -1,15 +1,20 @@
package com.palnet.biz.api.comn.response;
import java.util.List;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.List;
@Data
@EqualsAndHashCode(callSuper=false)
public class SuccessResponse<T> extends BasicResponse {
@Schema(description = "응답 데이터 건수")
private int count;
@Schema(description = "응답 데이터")
private T data;
public SuccessResponse(T data) {

20
pav-server/src/main/java/com/palnet/biz/api/comn/sunriseset/controller/ComnSunrisesetController.java

@ -8,9 +8,7 @@ import com.palnet.biz.api.comn.sunriseset.model.ComnSunrisesetRq;
import com.palnet.biz.api.comn.sunriseset.model.ComnSunrisesetRs;
import com.palnet.biz.api.comn.sunriseset.service.ComnSunrisesetService;
import com.palnet.comn.exception.CustomException;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@ -19,7 +17,6 @@ import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;
import java.util.HashMap;
import java.util.List;
@ -51,9 +48,8 @@ public class ComnSunrisesetController {
* @param rq
* @return
*/
@ApiOperation(value = "일출/일몰 조회", notes = "기간내 모든 일출/일몰조회")
@Tag(name = "공통 API", description = "공통 API")
@GetMapping("/list")
@Operation(summary = "일출/일몰 조회", description = "기간 내 모든 일출과 일몰시간을 조회하는 API 입니다.")
public ResponseEntity<? extends BasicResponse> getSunRiseSetList(ComnSunrisesetRq rq) {
List<ComnSunrisesetRs> rs = null;
try {
@ -98,9 +94,8 @@ public class ComnSunrisesetController {
* @param rq
* @return
*/
@ApiOperation(value = "일출/일몰 조회(좌표)", notes = "기간내 근접한 지역의 일출/일몰 조회")
@Tag(name = "공통 API", description = "공통 API")
@GetMapping("/coord")
@Operation(summary = "일출/일몰 조회(좌표)", description = "기간 내 좌표와 근접한 지역의 일출과 일몰시간을 1건 조회하는 API 입니다.")
public ResponseEntity<? extends BasicResponse> getSunRiseSetByCoordAndDate(ComnSunrisesetCoordRq rq) {
ComnSunrisesetRs rs = null;
try {
@ -144,14 +139,9 @@ public class ComnSunrisesetController {
* @param rq
* @return
*/
@ApiOperation(value = "일출/일몰 조회(좌표-6개월치)", notes = "근접한 지역의 현재~6개월치의 일출/일몰 데이터 조회")
@Tag(name = "공통 API", description = "공통 API")
@ApiImplicitParams(value = {
@ApiImplicitParam(name = "lat", value = "위도", required = true, dataType = "double", paramType = "query", example = "37.5665", defaultValue = "37.5665"),
@ApiImplicitParam(name = "lon", value = "경도", required = true, dataType = "double", paramType = "query", example = "126.9780", defaultValue = "126.9780"),
})
@GetMapping("/coord/list")
public ResponseEntity<? extends BasicResponse> getSunRiseSetByCoord(@ApiIgnore ComnSunrisesetCoordRq rq) {
@Operation(summary = "일출/일몰 조회(좌표 - 6개월치)", description = "기간 내 근접 지역에서 현재부터 6개월치 일출과 일몰시간을 조회하는 API 입니다.")
public ResponseEntity<? extends BasicResponse> getSunRiseSetByCoord(ComnSunrisesetCoordRq rq) {
List<ComnSunrisesetRs> rs = null;
try {
log.debug(">>> rq : {}", rq);

15
pav-server/src/main/java/com/palnet/biz/api/comn/sunriseset/model/ComnSunrisesetCoordRq.java

@ -1,7 +1,8 @@
package com.palnet.biz.api.comn.sunriseset.model;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@ -23,13 +24,17 @@ import lombok.NoArgsConstructor;
@AllArgsConstructor
@Builder
public class ComnSunrisesetCoordRq {
@ApiParam(value = "시작일자", defaultValue = "20231101", example = "20231101", required = true)
@Schema(description = "시작일자", example = "20231101")
private String locStDate;
@ApiParam(value = "종료일자", defaultValue = "20231231", example = "20231231", required = true)
@Schema(description = "종료일자", example = "20231231")
private String locEndDate;
@ApiParam(value = "위도", defaultValue = "37.4717452", example = "37.11", required = true)
@Schema(description = "위도", example = "37.520987")
private Double lat;
@ApiParam(value = "경도", defaultValue = "126.7081059", example = "127.11", required = true)
@Schema(description = "경도", example = "126.610646")
private Double lon;
@JsonIgnore

12
pav-server/src/main/java/com/palnet/biz/api/comn/sunriseset/model/ComnSunrisesetRq.java

@ -1,6 +1,6 @@
package com.palnet.biz.api.comn.sunriseset.model;
import io.swagger.annotations.ApiParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@ -22,10 +22,14 @@ import lombok.NoArgsConstructor;
@AllArgsConstructor
@Builder
public class ComnSunrisesetRq {
@ApiParam(name = "시작일자", example = "20231101")
@Schema(description = "시작일자", example = "20231101", implementation = String.class)
private String locStDate;
@ApiParam(name = "종료일자", example = "20231231")
@Schema(description = "종료일자", example = "20231231", implementation = String.class)
private String locEndDate;
@ApiParam(name = "지역", example = "김포")
@Schema(description = "지역", example = "김포")
private String location;
}

16
pav-server/src/main/java/com/palnet/biz/api/comn/sunriseset/model/ComnSunrisesetRs.java

@ -1,14 +1,10 @@
package com.palnet.biz.api.comn.sunriseset.model;
import io.swagger.annotations.ApiParam;
import io.swagger.v3.oas.annotations.Parameter;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.persistence.Column;
/**
* packageName : com.palnet.biz.api.comn.sunriseset.model
* fileName : ComnSunrisesetRs
@ -25,16 +21,16 @@ import javax.persistence.Column;
@AllArgsConstructor
@Builder
public class ComnSunrisesetRs {
@ApiParam(name = "일자", example = "20231212")
// @ApiParam(name = "일자", example = "20231212")
private String locDate;
@ApiParam(name = "지역", example = "김포")
// @ApiParam(name = "지역", example = "김포")
private String location;
@ApiParam(name = "일출", example = "071000")
// @ApiParam(name = "일출", example = "071000")
private String sunrise; // 일출
@ApiParam(name = "일몰", example = "183000")
// @ApiParam(name = "일몰", example = "183000")
private String sunset; // 일몰
@ApiParam(name = "시민박명(아침)", example = "071000")
// @ApiParam(name = "시민박명(아침)", example = "071000")
private String civilm; // 시민박명(아침)
@ApiParam(name = "시민박명(저녁)", example = "183000")
// @ApiParam(name = "시민박명(저녁)", example = "183000")
private String civile; // 시민박명(저녁)
}

92
pav-server/src/main/java/com/palnet/biz/api/ctr/cntrl/controller/CtrCntrlController.java

@ -7,10 +7,11 @@ import com.palnet.biz.api.comn.response.SuccessResponse;
import com.palnet.biz.api.ctr.cntrl.model.*;
import com.palnet.biz.api.ctr.cntrl.service.CtrCntrlService;
import com.palnet.comn.model.GPHistoryModel;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.log4j.Log4j2;
import lombok.extern.slf4j.Slf4j;
import org.json.simple.JSONObject;
import org.json.simple.parser.ParseException;
import org.springframework.beans.factory.annotation.Value;
@ -24,7 +25,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Log4j2
@Slf4j
@RestController
@RequestMapping(value = "/api/ctr/cntrl", produces = {MediaType.APPLICATION_JSON_VALUE})
@Tag(name = "드론 관제 시스템", description = "드론 관제 관련 API")
@ -43,9 +44,10 @@ public class CtrCntrlController {
* @return
*/
@GetMapping(value = "/history/{id}")
@ApiOperation(value = "TODO 드론 관제 이력 목록 (Socket 분리 전)")
@Tag(name = "드론 관제 시스템", description = "드론 관제 관련 API")
@ApiImplicitParam(name = "id",value = "관제ID", dataTypeClass = String.class)
@Deprecated
// @ApiOperation(value = "TODO 드론 관제 이력 목록 (Socket 분리 전)")
// @Tag(name = "드론 관제 시스템", description = "드론 관제 관련 API")
// @ApiImplicitParam(name = "id",value = "관제ID", dataTypeClass = String.class)
public ResponseEntity<? extends BasicResponse> historyList(@PathVariable String id) {
List<GPHistoryModel> result = null;
@ -75,10 +77,9 @@ public class CtrCntrlController {
* @return
*/
@GetMapping(value = "/detail/{id}")
@ApiOperation(value = "TODO 드론 관제 상세 정보")
@Tag(name = "드론 관제 시스템", description = "드론 관제 관련 API")
@ApiImplicitParam(name = "id",value = "관제ID", dataTypeClass = String.class)
public ResponseEntity<? extends BasicResponse> detail(@PathVariable String id) {
@Operation(summary = "드론 관제 상세 정보 조회", description = "드론 관제 상세 정보를 조회하는 API 입니다.")
public ResponseEntity<? extends BasicResponse> detail(
@Parameter(name="id", description = "개체 비행 ID", in = ParameterIn.PATH, example = "06b6314e-7143-4bdf-a427-1f2b1a834633")@PathVariable String id) {
CtrCntrlDtlModel result = null;
try {
@ -107,10 +108,9 @@ public class CtrCntrlController {
* @return
*/
@GetMapping(value = "/history/list/{id}")
@ApiOperation(value = "TODO 드론 관제 '실시간' 이력 목록")
@Tag(name = "드론 관제 시스템", description = "드론 관제 관련 API")
@ApiImplicitParam(name = "id",value = "관제ID", dataTypeClass = String.class)
public ResponseEntity<? extends BasicResponse> history(@PathVariable String id) {
@Operation(summary = "드론 관제 이력 정보 조회", description = "드론 관제 이력 정보를 조회하는 API 입니다.")
public ResponseEntity<? extends BasicResponse> history(
@Parameter(name="id", description = "개체 비행 ID", in = ParameterIn.PATH, example = "06b6314e-7143-4bdf-a427-1f2b1a834633")@PathVariable String id) {
List<GPHistoryModel> history;
try {
@ -139,8 +139,7 @@ public class CtrCntrlController {
* @throws ParseException
*/
@GetMapping("/api/weather")
@ApiOperation(value = "드론 관제 날씨")
@Tag(name = "드론 관제 시스템", description = "드론 관제 관련 API")
@Operation(summary = "드론 관제 날씨 조회", description = "드론 관제 - 비행 지역의 날씨를 조회하는 API 입니다.")
public ResponseEntity<? extends BasicResponse> restApiGetWeather(CtrCntrlWeatherModel rq) throws IOException, ParseException {
JSONObject jsonObject = null;
try {
@ -166,10 +165,8 @@ public class CtrCntrlController {
* @return
*/
@GetMapping("/group")
@ApiOperation(value = "TODO 비행 관제 사용자 권한 정보")
@Tag(name = "드론 관제 시스템", description = "드론 관제 관련 API")
@ApiImplicitParam(name = "cstmrSno",value = "고객일련번호", dataTypeClass = Integer.class)
public ResponseEntity<? extends BasicResponse> findGroupAuthInfo(int cstmrSno) {
@Operation(summary = "드론 관제 사용자 권한 정보", description = "드론 관제 - 토큰에 등록된 사용자가 관리 가능한 드론 기체의 식별번호를 조회하는 API 입니다.")
public ResponseEntity<? extends BasicResponse> findGroupAuthInfo() {
List<CtrCntrlGroupArcrftModel> list;
try {
@ -197,10 +194,10 @@ public class CtrCntrlController {
* @return
*/
@GetMapping("/flight_plan/{idntfNum}")
@ApiOperation(value = "TODO 비행 관제 사용자 비행 계획서 정보")
@Tag(name = "드론 관제 시스템", description = "드론 관제 관련 API")
@ApiImplicitParam(name = "idtfNum",value = "식별번호", dataTypeClass = String.class, paramType = "query")
public ResponseEntity<? extends BasicResponse> findFlightPlan(@PathVariable("idntfNum") String idntfNum) {
@Operation(summary = "드론 관제 사용자 비행계획서 정보", description = "사용자의 비행계획서 정보를 조회하는 API 입니다. 해당 식별번호가 포함된 laanc 신청서가 승인되어 있어야 하며, 비행일자가 오늘을 포함하고 있는 건만 조회합니다.\n"
+ "따라서 count가 0인 경우가 존재할 수 있습니다.")
public ResponseEntity<? extends BasicResponse> findFlightPlan(
@Parameter(name="idntfNum", description = "개체 식별번호", in = ParameterIn.PATH, example = "PA0001")@PathVariable String idntfNum) {
List<BasFlightPlanModel> list;
try {
@ -228,10 +225,9 @@ public class CtrCntrlController {
* @return
*/
@GetMapping(value = "/warn/detail/{id}")
@ApiOperation(value = "TODO 드론 운행 시작 후 알람 목록")
@Tag(name = "드론 관제 시스템", description = "드론 관제 관련 API")
@ApiImplicitParam(name = "id",value = "관제ID", dataTypeClass = String.class)
public ResponseEntity<? extends BasicResponse> warnDetail(@PathVariable String id){
@Operation(summary = "드론 운행 시작 후 비정상 알람 목록", description = "드론 관제 - 드론 비행 중 비정상 상황이 표출된 로그를 조회하는 API 입니다.")
public ResponseEntity<? extends BasicResponse> warnDetail(
@Parameter(name="id", description = "개체 비행 ID", in = ParameterIn.PATH, example = "061fbd9d-25c5-4801-bb11-2307a8eb8d8f")@PathVariable String id){
List<CtrCntrlWarnLogModel> warnLog;
try {
@ -258,8 +254,9 @@ public class CtrCntrlController {
* @return
*/
@PostMapping(value = "/arcrft/warn/list")
@ApiOperation(value = "TODO 기체 별 최신 비정상 로그 및 비정상 로그 전체 개수")
@Tag(name = "드론 관제 시스템", description = "드론 관제 관련 API")
// @ApiOperation(value = "TODO 기체 별 최신 비정상 로그 및 비정상 로그 전체 개수")
// @Tag(name = "드론 관제 시스템", description = "드론 관제 관련 API")
@Operation(summary = "기체 별 최신 비정상 로그 및 전체 개수", description = "비행 중 laanc 비행계획서의 비행계획경로 정보와 실제로 들어온 드론 데이터를 비교해 비정상 여부를 판단합니다. 이 API는 실제로 laanc 승인 이후 비행계획일자 내에서 경로를 벗어난 경우만 체크할 수 있기 때문에 결과값이 없을 수 있습니다.")
public ResponseEntity<? extends BasicResponse> arcrftWarnList(@RequestBody CtrCntrlArcrftWarnRqModel rq){
// public ResponseEntity<? extends BasicResponse> arcrftWarnList(@RequestParam("id") String id){
List<CtrCntrlArcrftWarnModel> arcrftWarnList;
@ -289,8 +286,9 @@ public class CtrCntrlController {
* @return
*/
@PostMapping("/contains")
@ApiOperation(value = "TODO 비행 관제 구역 비정상 상황 체크")
@Tag(name = "드론 관제 시스템", description = "드론 관제 관련 API")
// @ApiOperation(value = "TODO 비행 관제 구역 비정상 상황 체크")
// @Tag(name = "드론 관제 시스템", description = "드론 관제 관련 API")
@Operation(summary = "드론 비행 시 비정상 상황 체크", description = "드론 관제 - 드론 비행 중 실시간으로 비정상 상황이 발생했는지 여부를 조회하는 API 입니다.")
public ResponseEntity<? extends BasicResponse> checkPlanContains(@RequestBody CtrCntrlPlanContainsRq rq) {
CtrCntrlPlanContainsRs rs;
@ -319,9 +317,11 @@ public class CtrCntrlController {
* @return
*/
@GetMapping("/id/{id}")
@ApiOperation(value = "TODO 실시간 Control ID 발급")
@Tag(name = "드론 관제 시스템", description = "드론 관제 관련 API")
public ResponseEntity<? extends BasicResponse> getId(@PathVariable String id) {
// @ApiOperation(value = "TODO 실시간 Control ID 발급")
// @Tag(name = "드론 관제 시스템", description = "드론 관제 관련 API")
@Operation(summary = "기체 비행 ID 발급", description = "기체 비행 ID를 발급하는 API 입니다.")
public ResponseEntity<? extends BasicResponse> getId(
@Parameter(name="id", description = "개체 비행 ID", in = ParameterIn.PATH, example = "example")@PathVariable String id) {
Map<String, String> result;
try {
result = service.getId(id);
@ -349,11 +349,13 @@ public class CtrCntrlController {
* @return
*/
@GetMapping("/warn/{id}/{lat}/{lon}")
@ApiOperation(value = "TODO 비행 관제 기체의 비정상 상황 확인")
@Tag(name = "드론 관제 시스템", description = "드론 관제 관련 API")
public ResponseEntity<? extends BasicResponse> checkWarring(@PathVariable String id,
@PathVariable Double lat,
@PathVariable Double lon) {
// @ApiOperation(value = "TODO 비행 관제 기체의 비정상 상황 확인")
// @Tag(name = "드론 관제 시스템", description = "드론 관제 관련 API")
@Operation(summary = "기체의 비정상 상황 확인", description = "좌표와 기체 비행 ID를 사용해 기체의 비정상 상황을 확인하는 API 입니다.")
public ResponseEntity<? extends BasicResponse> checkWarring(
@Parameter(name="id", description = "개체 비행 ID", in = ParameterIn.PATH, example = "061fbd9d-25c5-4801-bb11-2307a8eb8d8f")@PathVariable String id,
@Parameter(name="lat", description = "위도", in = ParameterIn.PATH, example = "37.12")@PathVariable Double lat,
@Parameter(name="lon", description = "경도", in = ParameterIn.PATH, example = "127.12")@PathVariable Double lon) {
Map<String, String> result;
try {
result = service.checkWarring(id, lat, lon);
@ -379,9 +381,11 @@ public class CtrCntrlController {
* @return
*/
@GetMapping("/complete/{cntrlId}")
@ApiOperation(value = "TODO 비행 완료된 기체의 정보 확인")
@Tag(name = "드론 관제 시스템", description = "드론 관제 관련 API")
public ResponseEntity<? extends BasicResponse> flightCompleteInfo(@PathVariable String cntrlId) {
// @ApiOperation(value = "TODO 비행 완료된 기체의 정보 확인")
// @Tag(name = "드론 관제 시스템", description = "드론 관제 관련 API")
@Operation(summary = "비행 완료된 기체의 정보 확인", description = "비행 완료된 기체의 정보를 확인하는 API 입니다.")
public ResponseEntity<? extends BasicResponse> flightCompleteInfo(
@Parameter(name="cntrlId", description = "개체 비행 ID", in = ParameterIn.PATH, example = "078c2e77-d8ef-4900-b44a-f401f3aef72c")@PathVariable String cntrlId) {
CtrCntrlArcrftComplModel result = new CtrCntrlArcrftComplModel();
try {
result = service.getComplete(cntrlId);

16
pav-server/src/main/java/com/palnet/biz/api/ctr/cntrl/controller/SocketReceiverController.java

@ -2,6 +2,8 @@ package com.palnet.biz.api.ctr.cntrl.controller;
import com.palnet.biz.api.ctr.cntrl.service.SocketReceiverService;
import com.palnet.comn.model.GPModel;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.ResponseEntity;
@ -28,6 +30,7 @@ import java.util.concurrent.Callable;
@Slf4j
@RequiredArgsConstructor
@RestController
@Tag(name = "SOCKET" , description = "소켓 관련 API")
@RequestMapping("/api/server")
public class SocketReceiverController {
@ -39,10 +42,12 @@ public class SocketReceiverController {
* @param model
* @return
*/
@Deprecated
@PostMapping("/receiver")
@Operation(summary = "소켓 데이터 수신", description = "소켓 데이터를 수신하는 API 입니다.")
public ResponseEntity<?> receiver(@RequestBody GPModel model) {
log.info("socket message : {}", model);
socketReceiverService.insert(model); // 소켓에서 날아오는 데이터를 데이터베이스에 저장시키는 기능
log.info("socket message : {}", model); // 소켓에서 날아오는 데이터를 데이터베이스에 저장시키는 기능
socketReceiverService.insert(model);
return ResponseEntity.ok().build();
}
@ -52,10 +57,12 @@ public class SocketReceiverController {
* @param model
* @return
*/
@Deprecated
@PostMapping("/receiver/async")
@Operation(summary = "소켓 데이터 수신(멀티 스레드)", description = "여러개의 스레드로 소켓 데이터를 수신하는 API 입니다.")
public Callable<String> asyncReceiver(@RequestBody GPModel model) {
return () -> {
log.info("websocket message : {}", model);
log.info("socket async message : {}", model);
socketReceiverService.insert(model);
return "OK";
};
@ -68,8 +75,9 @@ public class SocketReceiverController {
* @return
*/
@PostMapping("/receiver/all")
@Operation(summary = "소켓 데이터 수신(리스트)", description = "여러개의 소켓 데이터를 모아 한번에 수신하는 API 입니다. <br> additionalProp 자리에는 관제아이디[objectId]가 들어갑니다. <br> 배열 객체 안 objectId 값을 가져와 넣어주시면 됩니다.")
public ResponseEntity<?> receiver(@RequestBody Map<String, List<GPModel>> models) {
// System.out.println("socket message : " + models);
log.info("socket all message : {}", models);
socketReceiverService.insertAll(models); // 한번에 많은 데이터를 데이터베이스에 저장하는 기능
return ResponseEntity.ok().build();
}

2
pav-server/src/main/java/com/palnet/biz/api/ctr/cntrl/model/CtrCntrlArcrftWarnRqModel.java

@ -1,8 +1,10 @@
package com.palnet.biz.api.ctr.cntrl.model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Data
public class CtrCntrlArcrftWarnRqModel {
@Schema(description = "기체 비행 ID" , example = "078c2e77-d8ef-4900-b44a-f401f3aef72c")
private String cntrlId;
}

7
pav-server/src/main/java/com/palnet/biz/api/ctr/cntrl/model/CtrCntrlPlanContainsRq.java

@ -1,11 +1,10 @@
package com.palnet.biz.api.ctr.cntrl.model;
import com.palnet.biz.api.bas.flight.model.BasFlightPlanAreaCoordModel;
import java.util.List;
import com.palnet.biz.api.bas.flight.model.BasFlightPlanModel;
import lombok.Data;
import java.util.Date;
import java.util.List;
import lombok.Data;
@Data
public class CtrCntrlPlanContainsRq {

29
pav-server/src/main/java/com/palnet/biz/api/ctr/cntrl/model/CtrCntrlWeatherModel.java

@ -1,21 +1,46 @@
package com.palnet.biz.api.ctr.cntrl.model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Data
public class CtrCntrlWeatherModel {
@Schema(description = "위도" , example = "37.558522" , implementation = Double.class)
private double nx;
@Schema(description = "경도" , example = "126.793722" , implementation = Double.class)
private double ny;
private String Snx;
private String Sny;
// private String Snx;
// private String Sny;
@Schema(hidden = true)
private Integer hstryAreaSno;
@Schema(hidden = true)
private String area1;
@Schema(hidden = true)
private String area2;
@Schema(hidden = true)
private String area3;
@Schema(hidden = true)
private String zipCd;
@Schema(hidden = true)
private String landNm;
@Schema(hidden = true)
private String landNum;
@Schema(hidden = true)
private String areaType;
@Schema(hidden = true)
private String areaNm;
}

3
pav-server/src/main/java/com/palnet/biz/api/ctr/cntrl/service/CtrCntrlService.java

@ -21,7 +21,6 @@ import com.palnet.biz.scheduler.ctr.service.CtrTrnsLctnService;
import com.palnet.comn.model.GPHistoryModel;
import com.palnet.comn.utils.AreaUtils;
import com.palnet.comn.utils.DateUtils;
import com.palnet.comn.utils.EncryptUtils;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
@ -230,7 +229,7 @@ public class CtrCntrlService {
CtrCntrlArcrftWarnModel model = new CtrCntrlArcrftWarnModel();
String idntfNum = cntrlBasRepository.getIdntfNum(cntrlId); //이미 Socket에서 payload의 trim에 따라 cntrlBas에 식별번호가 PA로 시작하는 데이터가 insert 되어 있음. 이 데이터 중 매개변수로 들어온 id와 일치하는 cntrlBas의 식별번호를 가져옴
CtrCntrlHstry hisControl = query.getWarnHstryList(cntrlId); // repo method 이름을 왜 이렇게 지었는지는 모르겠으나.. cntrlBas에 insert될 때 같이 insert되는 cntrlHstry 데이터 중 가장 마지막에 찍힌 hstry 로그를 가져옴
CtrCntrlHstry hisControl = query.getWarnHstryList(cntrlId); // cntrlBas에 insert될 때 같이 insert되는 cntrlHstry 데이터 중 가장 마지막에 찍힌 hstry 로그를 가져옴
int planSno = relRepository.getPlanSno(idntfNum).orElse(0); // cntrlBas insert될때 같이 insert된 mapping 테이블에서 식별번호로 planSno 가져옴
if (query.checkPlanSno(planSno) < 1) continue;

18
pav-server/src/main/java/com/palnet/biz/api/external/controller/ExternalLaancController.java vendored

@ -7,6 +7,12 @@ import com.palnet.biz.api.external.service.TsService;
import com.palnet.comn.code.ErrorCode;
import com.palnet.comn.exception.CustomException;
import com.palnet.comn.utils.JsonUtils;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.ResponseEntity;
@ -19,6 +25,7 @@ import java.util.HashMap;
import java.util.Map;
@Slf4j
@Tag(name = "외부 연동 API", description = "외부 연동 API")
@RequiredArgsConstructor
@RequestMapping("/api/external/laanc")
@RestController
@ -40,8 +47,12 @@ public class ExternalLaancController {
*/
// TS로 부터 비행 신청 정보 - endpoint
@Operation(summary = "TS로 부터 비행 신청 정보", description = "TS로 부터 비행 신청 정보")
@PostMapping("/plan/dos")
public ResponseEntity<?> createTsFltPlan(@RequestBody String body) {
public ResponseEntity<?> createTsFltPlan(
@Parameter(schema = @Schema(implementation = TsPlanRq.class))
@RequestBody String body
) {
log.info(">>>> /plan/ost body: {}", body);
TsPlanRq tsPlanRq;
try {
@ -86,7 +97,10 @@ public class ExternalLaancController {
// TS VC 유효성 검토 callback url - endpoint
@PostMapping("/vc/callback")
public ResponseEntity<?> vcCallback(@RequestBody String body) {
public ResponseEntity<?> vcCallback(
@Parameter(schema = @Schema(implementation = TsQrcodeRs.class))
@RequestBody String body
) {
log.info(">>>> vc/callback body: {}", body);
TsQrcodeRs rs;
try {

7
pav-server/src/main/java/com/palnet/biz/api/external/model/PilotValidRq.java vendored

@ -1,5 +1,6 @@
package com.palnet.biz.api.external.model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@ -21,6 +22,8 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor
@AllArgsConstructor
public class PilotValidRq {
private String pilotci; // 조종사 ci - 본인인증
private String declarationnum; // 기체신고번호
@Schema(description = "조종사 ci - 본인인증", example = "dzT9zrm1JJRbrT1oRsUbvXYDfbAtXG5QOZjbIVHPaklSZ2PTw8ojYdJyeTrdQdtKIGFM5Z7xfrN/Crm6iGRLkA==")
private String pilotci;
@Schema(description = "기체신고번호", example = "C1CM0231251")
private String declarationnum;
}

20
pav-server/src/main/java/com/palnet/biz/api/external/model/PilotValidRs.java vendored

@ -1,5 +1,6 @@
package com.palnet.biz.api.external.model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@ -21,11 +22,18 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor
@AllArgsConstructor
public class PilotValidRs {
private String rspCode; // 결과코드
private String rspMessage; // 결과메시지
private String pilotcredentialyn; // 조종사자격증명여부
private String arcrftinsuranceyn; // 기체보험가입여부
private String arcrftdeclaration; // 기체신고여부
private String corpregyn; // 사업자유무
@Schema(description = "결과코드", example = "200")
private String rspCode;
@Schema(description = "결과메시지", example = "SUCCESS")
private String rspMessage;
@Schema(description = "조종사자격증명여부", example = "Y")
private String pilotcredentialyn;
@Schema(description = "기체보험가입여부", example = "Y")
private String arcrftinsuranceyn;
@Schema(description = "기체신고여부", example = "Y")
private String arcrftdeclaration;
@Schema(description = "사업자유무", example = "Y")
private String corpregyn;
private PilotValidRq rq;
}

48
pav-server/src/main/java/com/palnet/biz/api/external/model/TsPlanRq.java vendored

@ -1,6 +1,7 @@
package com.palnet.biz.api.external.model;
import com.palnet.biz.api.bas.laanc.model.BasLaancPlanRq;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@ -32,7 +33,9 @@ public class TsPlanRq {
@AllArgsConstructor
@Builder
public static class Operatorinfo {
@Schema(description = "조종자성명", example = "홍길동")
private String pilotname;
@Schema(description = "조종자격번호", example = "91-123456")
private String pilotcredentialno;
}
}
@ -42,17 +45,37 @@ public class TsPlanRq {
@AllArgsConstructor
@Builder
public static class TsArcrftInfo {
@Schema(description = "기체종류", example = "13")
private String arcrfttype;
@Schema(description = "신고번호", example = "12345678912")
private String declarationnum;
@Schema(description = "기체 모델명", example = "dJI Mavic 3 Pro")
private String arcrftmodelnm;
@Schema(description = "제작자", example = "dji")
private String prdctcmpnnm;
@Schema(description = "제작번호", example = "2C458790348REF")
private String prdctnum;
@Schema(description = "기체 사이즈(단위:mm)", example = "207x100x91(length x width x height)")
private String arcrftlwh;
/*
7 : 250g 이하
8 : 250g 초과 ~ 2kg 이하
9 : 2kg 초과 ~ 7kg 이하
10 : 7kg 초과 ~ 25kg 이하
11 : 25kg 초과
12 : 25kg 초과(시험비행)
*/
@Schema(description = "최대이륙중량 [7,8,9,10,11,12]", example = "7")
private String arcrftwght;
@Schema(description = "소유자명", example = "홍길동")
private String ownernm;
@Schema(description = "법인명", example = "팔네트웍스")
private String corporationnm;
@Schema(description = "보험가입여부", example = "Y")
private String insrncyn;
@Schema(description = "기체보험유무", example = "Y")
private String arcrftinsuranceyn;
@Schema(description = "보험 유효기간[yyyyMMdd]", example = "20240101")
private String insuranceexperiod;
}
@ -61,6 +84,7 @@ public class TsPlanRq {
@AllArgsConstructor
@Builder
public static class TsBusinessinfo {
@Schema(description = "사업자유무", example = "Y")
private String corpregyn;
}
@ -69,10 +93,30 @@ public class TsPlanRq {
@AllArgsConstructor
@Builder
public static class TsFlightInfo {
@Schema(description = "비행구역수", example = "1")
private String fltareacnt;
/*
01 : 시계비행
02 : 자동비행
03 : 선회비행
04 : 계기비행
05 : 격자비행
06 : 수직이착륙비행
07 : 가시권비행
08 : 수동조종비행
09 : 제자리비행
10 : 군집비행
00 : 직접입력
*/
@Schema(description = "비행방식[00~10]", example = "02")
private String fltmethod;
@Schema(description = "비행방식(직접입력):fltmethod=00일경우", example = "")
private String udfltmethod;
@Schema(description = "비행시작일시[yyyyMMddHHmm]", example = "202308150000")
private String pltstdt;
@Schema(description = "비행종료일시[yyyyMMddHHmm]", example = "202308160000")
private String pltenddt;
@Schema(description = "비행목적", example = "06")
private String pltpurpose;
private List<TsAreaInfo> areaInfo;
@ -81,9 +125,13 @@ public class TsPlanRq {
@AllArgsConstructor
@Builder
public static class TsAreaInfo {
@Schema(description = "주소", example = "강원특별자치도 원주시 귀래면 주포리 산 7")
private String addr;
@Schema(description = "좌표", example = "37° 10′ 09″ N 127° 52′ 28″ E")
private String coord;
@Schema(description = "고도[--M:--FT]", example = "100M:328FT")
private String elev;
@Schema(description = "반경[단위:m]", example = "100")
private String radius;
}
}

35
pav-server/src/main/java/com/palnet/biz/api/external/model/TsQrcodeRs.java vendored

@ -1,5 +1,6 @@
package com.palnet.biz.api.external.model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@ -21,11 +22,31 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor
@AllArgsConstructor
public class TsQrcodeRs {
private String rspCode; // 결과코드
private String rspMessage; // 결과메시지
private String rqID; // 요청ID-UUID
private String pilotcredentialyn; // 조종사자격증명여부
private String arcrftinsuranceyn; // 기체보험가입여부
private String arcrftdeclaration; // 기체신고여부
private String corpregyn; // 사업자유무
// 결과코드
@Schema(description = "결과코드", example = "200")
private String rspCode;
// 결과메시지
@Schema(description = "결과메시지", example = "정상적으로 수신되었습니다.")
private String rspMessage;
// 요청ID
@Schema(description = "요청ID", example = "6f1e469c-3819-4427-b047-08a2d361f9dd")
private String rqID;
// 조종사자격증명여부
@Schema(description = "조종사자격증명여부", example = "Y")
private String pilotcredentialyn;
// 기체보험가입여부
@Schema(description = "기체보험가입여부", example = "Y")
private String arcrftinsuranceyn;
// 기체신고여부
@Schema(description = "기체신고여부", example = "Y")
private String arcrftdeclaration;
// 사업자유무
@Schema(description = "사업자유무", example = "Y")
private String corpregyn;
}

272
pav-server/src/main/java/com/palnet/biz/api/main/dash/controller/MainDashController.java

@ -1,57 +1,52 @@
package com.palnet.biz.api.main.dash.controller;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import com.palnet.biz.api.main.dash.model.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.palnet.biz.api.comn.response.BasicResponse;
import com.palnet.biz.api.comn.response.ErrorResponse;
import com.palnet.biz.api.comn.response.SuccessResponse;
import com.palnet.biz.api.main.dash.model.*;
import com.palnet.biz.api.main.dash.service.MainDashService;
import com.palnet.comn.code.RSErrorCode;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import com.palnet.comn.exception.CustomException;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Log4j2
@Slf4j
@Tag(name = "메인화면 컨트롤러", description = "메인화면 관련 API")
@RestController
@RequiredArgsConstructor
@RequestMapping(value = "/api/main/dash", produces = {MediaType.APPLICATION_JSON_VALUE})
@Tag(name = "메인화면 컨트롤러", description = "메인화면 관련 API")
public class MainDashController {
@Autowired
private final MainDashService service;
/**
* 비행횟수 통계를 조회하는 기능.
*
* @param yyyymm
* @return
*/
@Operation(summary = "일 별 비행횟수 통계", description = "일 별 비행횟수 통계")
@Parameter(name = "yyyymm", description = "날짜", in = ParameterIn.QUERY, example = "2023-12")
@ApiResponse(responseCode = "200", description = "OK")
@GetMapping(value = "/stcs/day")
@ApiOperation(value = "일 별 비행횟수 통계")
@Tag(name = "메인화면 컨트롤러", description = "메인화면 관련 API")
@ApiImplicitParam(name = "yyyymm",value = "날짜", dataTypeClass = String.class)
public ResponseEntity<? extends BasicResponse> stcsDay(String yyyymm) {
List<MainDashStcsModel> result = null;
// log.debug(yyyymm);
// yyyymm 값이 있는지, 글자 갯수가 7개인지 입력값 검증
if (yyyymm == null || !(yyyymm.length() == 7)) {
// 검증통과하지 못할 시 서버에서 "의도적인" 에러 반환
@ -62,7 +57,13 @@ public class MainDashController {
try {
result = service.mainDashStcsDay(yyyymm); // 일별 비행건수 통계하는 기능
} catch (CustomException e) {
Map<String, Object> resultMap = new HashMap<>();
log.error("IGNORE : ", e);
resultMap.put("result", false);
resultMap.put("errorCode", e.getErrorCode());
resultMap.put("errorMessage", e.getMessage());
return ResponseEntity.ok().body(new SuccessResponse<>(resultMap));
} catch (Exception e) {
/**
* try{
@ -83,14 +84,14 @@ public class MainDashController {
/**
* TOP5 지역 비행횟수 통계를 조회하는 기능
* 일자[yyyymm] 검색
*
* @param yyyymm
* @return
*/
@Operation(summary = "TOP5 지역 별 비행횟수 통계", description = "TOP5 지역 별 비행횟수 통계")
@Parameter(name = "yyyymm", description = "날짜", in = ParameterIn.QUERY, example = "2023-12")
@ApiResponse(responseCode = "200", description = "성공")
@GetMapping(value = "/stcs/area")
@ApiOperation(value = "TOP5 지역 별 비행횟수 통계")
@Tag(name = "메인화면 컨트롤러", description = "메인화면 관련 API")
@ApiImplicitParam(name = "yyyymm",value = "날짜", dataTypeClass = String.class)
public ResponseEntity<? extends BasicResponse> stcsArea(String yyyymm) {
List<MainDashStcsModel> result = null;
@ -104,7 +105,13 @@ public class MainDashController {
try {
result = service.mainDashStcsArea(yyyymm); // Top5 지역별 비행횟수 통계기능
} catch (CustomException e) {
Map<String, Object> resultMap = new HashMap<>();
log.error("IGNORE : ", e);
resultMap.put("result", false);
resultMap.put("errorCode", e.getErrorCode());
resultMap.put("errorMessage", e.getMessage());
return ResponseEntity.ok().body(new SuccessResponse<>(resultMap));
} catch (Exception e) {
/**
* try{
@ -124,13 +131,14 @@ public class MainDashController {
/**
* 본인이 생성한 그룹 정보죄하는 기능.
*
* @param cstmrSno
* @return
*/
@Operation(summary = "본인이 생성한 그룹 정보", description = "본인이 생성한 그룹 정보")
@Parameter(name = "cstmrSno", description = "고객일련번호", in = ParameterIn.QUERY, example = "1")
@ApiResponse(responseCode = "200", description = "성공")
@GetMapping(value = "/group/list")
@ApiOperation(value = "본인이 생성한 그룹 정보")
@Tag(name = "메인화면 컨트롤러", description = "메인화면 관련 API")
@ApiImplicitParam(name = "cstmrSno",value = "고객일련번호", dataTypeClass = Integer.class)
public ResponseEntity<? extends BasicResponse> groupList(Integer cstmrSno) {
List<Map> result = null;
@ -143,7 +151,13 @@ public class MainDashController {
try {
result = service.mainDashGroupList(cstmrSno); // TOP3 가입 그룹 리스트 조회하는 기능
} catch (CustomException e) {
Map<String, Object> resultMap = new HashMap<>();
log.error("IGNORE : ", e);
resultMap.put("result", false);
resultMap.put("errorCode", e.getErrorCode());
resultMap.put("errorMessage", e.getMessage());
return ResponseEntity.ok().body(new SuccessResponse<>(resultMap));
} catch (Exception e) {
/**
* try{
@ -161,16 +175,18 @@ public class MainDashController {
}
/**
* 기체 정보 리스트 조회하는 기능,
* 회원 고유번호[cstmrSno] 조회함.
*
* @param cstmrSno
* @return
*/
@Operation(summary = "기체 정보 리스트", description = "기체 정보 리스트")
@Parameter(name = "cstmrSno", description = "고객일련번호", in = ParameterIn.QUERY, example = "1")
@ApiResponse(responseCode = "200", description = "성공")
@GetMapping(value = "/arcrft/list")
@ApiOperation(value = "기체 정보 리스트")
@Tag(name = "메인화면 컨트롤러", description = "메인화면 관련 API")
@ApiImplicitParam(name = "cstmrSno",value = "고객일련번호", dataTypeClass = Integer.class)
public ResponseEntity<? extends BasicResponse> arcrftList(Integer cstmrSno) {
List<MainDashListModel> result = null;
@ -183,7 +199,13 @@ public class MainDashController {
try {
result = service.mainDashDronList(cstmrSno); // Top3 기체 정보 리스트 조회하는 기능
} catch (CustomException e) {
Map<String, Object> resultMap = new HashMap<>();
log.error("IGNORE : ", e);
resultMap.put("result", false);
resultMap.put("errorCode", e.getErrorCode());
resultMap.put("errorMessage", e.getMessage());
return ResponseEntity.ok().body(new SuccessResponse<>(resultMap));
} catch (Exception e) {
/**
* try{
@ -201,21 +223,21 @@ public class MainDashController {
}
/**
* 비행실적 통계하는 기능.
*
* @param date
* @param type
* @Deprecated 현재 사용하지 않음
* @return
*/
@GetMapping(value = "/stcs/flight/date/{type}")
@ApiOperation(value = "김포공항, 비행실적 통계")
@Tag(name = "메인화면 컨트롤러", description = "메인화면 관련 API")
@ApiImplicitParams({
@ApiImplicitParam(name = "date",value = "날짜", dataTypeClass = String.class),
@ApiImplicitParam(name = "type",value = "날짜형식", dataTypeClass = String.class)
})
@Deprecated
@Operation(summary = "김포공항, 비행실적 통계", description = "김포공항, 비행실적 통계")
@Parameters({
@Parameter(name = "type", description = "날짜형식", in = ParameterIn.PATH, example = "month"),
@Parameter(name = "date", description = "날짜", in = ParameterIn.QUERY, example = "2023")
})
@GetMapping(value = "/stcs/flight/date/{type}")
public ResponseEntity<? extends BasicResponse> flightStatistics(String date, @PathVariable String type) {
String[] formatParam = null;
@ -233,6 +255,13 @@ public class MainDashController {
try {
result = service.mainKacDashStcsDay(date, formatParam); // 날짜별 비행실적 통계기능
} catch (CustomException e) {
Map<String, Object> resultMap = new HashMap<>();
log.error("IGNORE : ", e);
resultMap.put("result", false);
resultMap.put("errorCode", e.getErrorCode());
resultMap.put("errorMessage", e.getMessage());
return ResponseEntity.ok().body(new SuccessResponse<>(resultMap));
} catch (Exception e) {
/**
* try{
@ -251,19 +280,19 @@ public class MainDashController {
/**
* 김포공항, 비행승인 통계
*
* @param date
* @param type
* @Deprecated 현재 사용하지 않음
* @return
*/
@GetMapping("/stcs/plan-allow/date/{type}")
@ApiOperation(value = "김포공항, 비행승인 통계")
@Tag(name = "메인화면 컨트롤러", description = "메인화면 관련 API")
@ApiImplicitParams({
@ApiImplicitParam(name = "date",value = "날짜", dataTypeClass = String.class),
@ApiImplicitParam(name = "type",value = "날짜형식", dataTypeClass = String.class)
})
@Deprecated
@Operation(summary = "김포공항, 비행승인 통계", description = "김포공항, 비행승인 통계")
@Parameters({
@Parameter(name = "type", description = "날짜형식", in = ParameterIn.PATH, example = "month"),
@Parameter(name = "date", description = "날짜", in = ParameterIn.QUERY, example = "2023")
})
@ApiResponse(responseCode = "200", description = "성공")
@GetMapping("/stcs/plan-allow/date/{type}")
public ResponseEntity<? extends BasicResponse> planAllowStatistics(String date, @PathVariable String type) {
String[] formatParam = null;
@ -281,6 +310,13 @@ public class MainDashController {
try {
result = service.mainStcsPlanAllow(date, formatParam); // 김포공항, 비행승인 통계 기능
} catch (CustomException e) {
Map<String, Object> resultMap = new HashMap<>();
log.error("IGNORE : ", e);
resultMap.put("result", false);
resultMap.put("errorCode", e.getErrorCode());
resultMap.put("errorMessage", e.getMessage());
return ResponseEntity.ok().body(new SuccessResponse<>(resultMap));
} catch (Exception e) {
/**
* try{
@ -299,22 +335,23 @@ public class MainDashController {
/**
* 드론별 비행 통계조회하는 기능.
*
* @param date
* @param idntfNum
* @param type
* @Deprecated 현재 사용하지 않음
* @return
*/
@GetMapping("/stcs/drone-flight/date/{type}")
@ApiOperation(value = "김포공항, 드론별 비행 통계")
@Tag(name = "메인화면 컨트롤러", description = "메인화면 관련 API")
@ApiImplicitParams({
@ApiImplicitParam(name = "date",value = "날짜", dataTypeClass = String.class),
@ApiImplicitParam(name = "type",value = "날짜형식", dataTypeClass = String.class),
@ApiImplicitParam(name = "idntfNum",value = "드론식별번호", dataTypeClass = String.class),
})
@Deprecated
@Operation(summary = "김포공항, 드론별 비행 통계", description = "김포공항, 드론별 비행 통계")
@Parameters({
@Parameter(name = "type", description = "날짜형식", in = ParameterIn.PATH, example = "month"),
@Parameter(name = "date", description = "날짜", in = ParameterIn.QUERY, example = "2023"),
@Parameter(name = "idntfNum", description = "드론식별번호", in = ParameterIn.QUERY, example = "PA001")
})
@ApiResponse(responseCode = "200", description = "성공")
@GetMapping("/stcs/drone-flight/date/{type}")
public ResponseEntity<? extends BasicResponse> droneFlightStatistics(String date, @RequestParam(required = true) String idntfNum, @PathVariable String type) {
log.info("idntfNum -> {}", idntfNum);
String[] formatParam = null;
@ -331,6 +368,13 @@ public class MainDashController {
try {
result = service.mainStcsDroneFlight(date, idntfNum, formatParam); // 드론별 비행실적 통계 기능.
} catch (CustomException e) {
Map<String, Object> resultMap = new HashMap<>();
log.error("IGNORE : ", e);
resultMap.put("result", false);
resultMap.put("errorCode", e.getErrorCode());
resultMap.put("errorMessage", e.getMessage());
return ResponseEntity.ok().body(new SuccessResponse<>(resultMap));
} catch (Exception e) {
/**
* try{
@ -349,19 +393,19 @@ public class MainDashController {
/**
* 비정상상황 비행 통계조회하는 기능.
*
* @param date
* @param type
* @Deprecated 현재 사용하지 않음
* @return
*/
@GetMapping("/stcs/warning-flight/date/{type}")
@ApiOperation(value = "김포공항, 비정상상황 비행 통계")
@Tag(name = "메인화면 컨트롤러", description = "메인화면 관련 API")
@ApiImplicitParams({
@ApiImplicitParam(name = "date",value = "날짜", dataTypeClass = String.class),
@ApiImplicitParam(name = "type",value = "날짜형식", dataTypeClass = String.class)
})
@Deprecated
@Operation(summary = "김포공항, 비정상상황 비행 통계", description = "김포공항, 비정상상황 비행 통계")
@Parameters({
@Parameter(name = "type", description = "날짜형식", in = ParameterIn.PATH, example = "month"),
@Parameter(name = "date", description = "날짜", in = ParameterIn.QUERY, example = "2023")
})
@ApiResponse(responseCode = "200", description = "성공")
@GetMapping("/stcs/warning-flight/date/{type}")
public ResponseEntity<? extends BasicResponse> warningFlightStatistics(String date, @PathVariable String type) {
String[] formatParam = null;
@ -379,6 +423,13 @@ public class MainDashController {
try {
result = service.mainStcsWarningFlight(date, formatParam); // 비정상상황 통계구하는 기능.
} catch (CustomException e) {
Map<String, Object> resultMap = new HashMap<>();
log.error("IGNORE : ", e);
resultMap.put("result", false);
resultMap.put("errorCode", e.getErrorCode());
resultMap.put("errorMessage", e.getMessage());
return ResponseEntity.ok().body(new SuccessResponse<>(resultMap));
} catch (Exception e) {
/**
* try{
@ -397,17 +448,25 @@ public class MainDashController {
/**
* 드론 비행 현황 통계 기능.
*
* @return
*/
@Operation(summary = "드론 비행 현황", description = "드론 비행 현황")
@ApiResponse(responseCode = "200", description = "성공")
@GetMapping(value = "/stcs/dron-flight")
@ApiOperation(value = "드론 비행 현황")
@Tag(name = "메인화면 컨트롤러", description = "메인화면 관련 API")
public ResponseEntity<? extends BasicResponse> dronFlightStcs() {
Map<String, String> result = null;
try {
result = service.mainDashDronFlightStcs(); // 드론 비행 현황기능
} catch (CustomException e) {
Map<String, Object> resultMap = new HashMap<>();
log.error("IGNORE : ", e);
resultMap.put("result", false);
resultMap.put("errorCode", e.getErrorCode());
resultMap.put("errorMessage", e.getMessage());
return ResponseEntity.ok().body(new SuccessResponse<>(resultMap));
} catch (Exception e) {
/**
* try{
@ -426,18 +485,27 @@ public class MainDashController {
/**
* 드론 비행운항 목록 조회하는 기능.
*
* @param serviceType
* @return
*/
@Operation(summary = "드론 별 비행운항 목록", description = "드론 별 비행운항 목록")
@Parameter(name = "serviceType", description = "서비스 타입(관할기관코드)", in = ParameterIn.QUERY, example = "F0002")
@ApiResponse(responseCode = "200", description = "성공")
@GetMapping(value = "/dron-flight/list")
@ApiOperation(value = "드론 별 비행운항 목록")
@Tag(name = "메인화면 컨트롤러", description = "메인화면 관련 API")
public ResponseEntity<? extends BasicResponse> dronFlightList(@RequestParam String serviceType) {
List<MainDashFlightListModel> result = null;
try {
result = service.mainDashDronFlightList(serviceType); // 드론 별 비행운항 목록 조회하는 기능
} catch (CustomException e) {
Map<String, Object> resultMap = new HashMap<>();
log.error("IGNORE : ", e);
resultMap.put("result", false);
resultMap.put("errorCode", e.getErrorCode());
resultMap.put("errorMessage", e.getMessage());
return ResponseEntity.ok().body(new SuccessResponse<>(resultMap));
} catch (Exception e) {
/**
* try{
@ -456,21 +524,27 @@ public class MainDashController {
/**
* 일일 비정상상황에 대한 통계 기능.
*
* @param serviceType
* @return
*/
@Operation(summary = "일일 비정상상황 통계", description = "일일 비정상상황 통계")
@Parameter(name = "serviceType", description = "서비스 타입(관할기관코드)", in = ParameterIn.QUERY, example = "F0002")
@ApiResponse(responseCode = "200", description = "성공")
@GetMapping("/current/flight-warn")
@ApiOperation(value = "일일 비정상상황 통계")
@Tag(name = "메인화면 컨트롤러", description = "메인화면 관련 API")
@ApiImplicitParams({
@ApiImplicitParam(name = "serviceType",value = "관할기관코드(cptAuthCode)", dataTypeClass = String.class)
})
public ResponseEntity<? extends BasicResponse> currentFlightWarn(@RequestParam(required = false) String serviceType) {
List<MainDashWarnNumStcsModel> result = new ArrayList<>();
try {
result = service.currentFlightWarn(serviceType); // 일일비정상상황에 대한 통계 기능을 조회하는 기능
} catch (CustomException e) {
Map<String, Object> resultMap = new HashMap<>();
log.error("IGNORE : ", e);
resultMap.put("result", false);
resultMap.put("errorCode", e.getErrorCode());
resultMap.put("errorMessage", e.getMessage());
return ResponseEntity.ok().body(new SuccessResponse<>(resultMap));
} catch (Exception e) {
/**
* try{
@ -489,20 +563,26 @@ public class MainDashController {
/**
* 일일 비행계획에 대한 통계 기능.
*
* @param serviceType
* @return
*/
@Operation(summary = "일일 비행계획 통계", description = "일일 비행계획 통계")
@Parameter(name = "serviceType", description = "서비스 타입(관할기관코드)", in = ParameterIn.QUERY, example = "F0002")
@ApiResponse(responseCode = "200", description = "성공")
@GetMapping("/current/flight-plan")
@ApiOperation(value = "일일 비행계획 통계")
@Tag(name = "메인화면 컨트롤러", description = "메인화면 관련 API")
@ApiImplicitParams({
@ApiImplicitParam(name = "serviceType",value = "관할기관코드(cptAuthCode)", dataTypeClass = String.class)
})
public ResponseEntity<? extends BasicResponse> currentFlightPlan(@RequestParam(required = false) String serviceType) {
List<MainDashPlanNumStcsModel> result = new ArrayList<>();
try {
result = service.currentFlightPlan(serviceType);
} catch (CustomException e) {
Map<String, Object> resultMap = new HashMap<>();
log.error("IGNORE : ", e);
resultMap.put("result", false);
resultMap.put("errorCode", e.getErrorCode());
resultMap.put("errorMessage", e.getMessage());
return ResponseEntity.ok().body(new SuccessResponse<>(resultMap));
} catch (Exception e) {
/**
* try{
@ -517,21 +597,29 @@ public class MainDashController {
}
return ResponseEntity.ok().body(new SuccessResponse<List<MainDashPlanNumStcsModel>>(result));
}
/**
* 일일 비행건수 현황 통계기능.
*
* @return
*/
@Operation(summary = "일일 비행건수 현황", description = "일일 비행건수 현황")
@ApiResponse(responseCode = "200", description = "성공")
@GetMapping("/stcs/dailyflight")
@ApiOperation(value = "일일 비행건수 현황")
@Tag(name = "메인화면 컨트롤러",description = "메인화면 관련 API")
public ResponseEntity<? extends BasicResponse> getDailyFlightNumOfStcs() {
List<MainDashFlightNumStcsModel> result = null;
try {
result = service.dailyFlightNumOfStcs(); // 일일 비행건수 현황 통계기능
} catch (CustomException e) {
Map<String, Object> resultMap = new HashMap<>();
log.error("IGNORE : ", e);
resultMap.put("result", false);
resultMap.put("errorCode", e.getErrorCode());
resultMap.put("errorMessage", e.getMessage());
return ResponseEntity.ok().body(new SuccessResponse<>(resultMap));
} catch (Exception e) {
/**
* try{

11
pav-server/src/main/java/com/palnet/biz/api/main/dash/model/MainDashFlightNumStcsModel.java

@ -1,6 +1,5 @@
package com.palnet.biz.api.main.dash.model;
import io.swagger.annotations.ApiParam;
import lombok.Data;
/**
@ -17,19 +16,19 @@ import lombok.Data;
@Data
public class MainDashFlightNumStcsModel {
@ApiParam(value = "구분",example = "전일(어제), 금일(오늘), 명일(내일)")
// @ApiParam(value = "구분",example = "전일(어제), 금일(오늘), 명일(내일)")
private String dateType = "";
@ApiParam(value = "계획",example = "전일(어제), 금일(오늘), 명일(내일) 비행계획서 목록")
// @ApiParam(value = "계획",example = "전일(어제), 금일(오늘), 명일(내일) 비행계획서 목록")
private int flightPlan = 0;
@ApiParam(value = "비행 완료",example = "전일(어제), 금일(오늘), 명일(내일) 비행완료 목록")
// @ApiParam(value = "비행 완료",example = "전일(어제), 금일(오늘), 명일(내일) 비행완료 목록")
private int completeFlight = 0;
@ApiParam(value = "미 비행",example = "전일(어제), 금일(오늘), 명일(내일) 미 비행 목록")
// @ApiParam(value = "미 비행",example = "전일(어제), 금일(오늘), 명일(내일) 미 비행 목록")
private int notFlight = 0;
@ApiParam(value = "비고",example = "전일(어제), 금일(오늘), 명일(내일) 비고")
// @ApiParam(value = "비고",example = "전일(어제), 금일(오늘), 명일(내일) 비고")
private double note = 0;
}

11
pav-server/src/main/java/com/palnet/biz/api/main/dash/model/MainDashPlanNumStcsModel.java

@ -1,24 +1,23 @@
package com.palnet.biz.api.main.dash.model;
import io.swagger.annotations.ApiParam;
import lombok.Data;
@Data
public class MainDashPlanNumStcsModel {
@ApiParam(value = "구분",example = "전일(어제), 금일(오늘), 명일(내일)")
// @ApiParam(value = "구분",example = "전일(어제), 금일(오늘), 명일(내일)")
private String dateType = "";
@ApiParam(value = "제출",example = "전일(어제), 금일(오늘), 명일(내일) 비행계획서 목록")
// @ApiParam(value = "제출",example = "전일(어제), 금일(오늘), 명일(내일) 비행계획서 목록")
private int plan = 0;
@ApiParam(value = "승인",example = "전일(어제), 금일(오늘), 명일(내일) 비행승인 목록")
// @ApiParam(value = "승인",example = "전일(어제), 금일(오늘), 명일(내일) 비행승인 목록")
private int aprvn = 0;
@ApiParam(value = "합계",example = "전일(어제), 금일(오늘), 명일(내일) 합계")
// @ApiParam(value = "합계",example = "전일(어제), 금일(오늘), 명일(내일) 합계")
private int count = 0;
@ApiParam(value = "비고",example = "전일(어제), 금일(오늘), 명일(내일) 비고")
// @ApiParam(value = "비고",example = "전일(어제), 금일(오늘), 명일(내일) 비고")
private double note = 0;
}

13
pav-server/src/main/java/com/palnet/biz/api/main/dash/model/MainDashWarnNumStcsModel.java

@ -1,25 +1,24 @@
package com.palnet.biz.api.main.dash.model;
import io.swagger.annotations.ApiParam;
import lombok.Data;
@Data
public class MainDashWarnNumStcsModel {
@ApiParam(value = "구분",example = "전일(어제), 금일(오늘), 명일(내일)")
// @ApiParam(value = "구분",example = "전일(어제), 금일(오늘), 명일(내일)")
private String dateType = "";
@ApiParam(value = "경로이탈",example = "전일(어제), 금일(오늘), 명일(내일) 경로이탈")
// @ApiParam(value = "경로이탈",example = "전일(어제), 금일(오늘), 명일(내일) 경로이탈")
private int plan = 0;
@ApiParam(value = "고도이탈",example = "전일(어제), 금일(오늘), 명일(내일) 고도이탈")
// @ApiParam(value = "고도이탈",example = "전일(어제), 금일(오늘), 명일(내일) 고도이탈")
private int altitude = 0;
@ApiParam(value = "충돌",example = "전일(어제), 금일(오늘), 명일(내일) 충돌")
// @ApiParam(value = "충돌",example = "전일(어제), 금일(오늘), 명일(내일) 충돌")
private int crash = 0;
@ApiParam(value = "합계",example = "전일(어제), 금일(오늘), 명일(내일) 합계")
// @ApiParam(value = "합계",example = "전일(어제), 금일(오늘), 명일(내일) 합계")
private int count = 0;
@ApiParam(value = "비고",example = "전일(어제), 금일(오늘), 명일(내일) 비고")
// @ApiParam(value = "비고",example = "전일(어제), 금일(오늘), 명일(내일) 비고")
private double note = 0;
}

171
pav-server/src/main/java/com/palnet/biz/api/main/statistics/controller/MainStatisticsController.java

@ -1,7 +1,17 @@
package com.palnet.biz.api.main.statistics.controller;
import java.util.List;
import com.palnet.biz.api.comn.response.BasicResponse;
import com.palnet.biz.api.comn.response.ErrorResponse;
import com.palnet.biz.api.comn.response.SuccessResponse;
import com.palnet.biz.api.main.statistics.model.*;
import com.palnet.biz.api.main.statistics.service.MainStatisticsService;
import com.palnet.comn.exception.CustomException;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
@ -10,44 +20,42 @@ import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.palnet.biz.api.comn.response.BasicResponse;
import com.palnet.biz.api.comn.response.ErrorResponse;
import com.palnet.biz.api.comn.response.SuccessResponse;
import com.palnet.biz.api.main.statistics.model.FlightStcsValueModel;
import com.palnet.biz.api.main.statistics.model.FlightStcsModel;
import com.palnet.biz.api.main.statistics.model.FlightStcsRQ;
import com.palnet.biz.api.main.statistics.service.MainStatisticsService;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Log4j2
@Slf4j
@Tag(name = "통계 컨트롤러", description = "통계 관련 API")
@RestController
@RequiredArgsConstructor
@RequestMapping(value = "/api/main/statistics", produces = {MediaType.APPLICATION_JSON_VALUE})
@Tag(name = "통계 컨트롤러", description = "통계 관련 API")
public class MainStatisticsController {
private final MainStatisticsService service;
/**
* 비행통계 상단데이터 통계 조회기능.
*
* @param serviceType
* @return
*/
@Operation(summary = "비행 통계(총 비행시간, 총 비행거리, 총 비행횟수)", description = "비행 통계(총 비행시간, 총 비행거리, 총 비행횟수) - 상단 통계")
@ApiResponse(responseCode = "200", description = "OK")
@Parameter(name = "serviceType", description = "서비스 타입(관할기관코드)", example = "F0002")
@GetMapping("/flight-static")
@ApiOperation(value = "비행통계 상단 데이터[DB전체 통계데이터]")
@Tag(name = "통계 컨트롤러", description = "통계 관련 API")
public ResponseEntity<? extends BasicResponse> fltStcsStatic(String serviceType) {
List<FlightStcsValueModel> result = null;
try {
result = service.getFlightStaticStcs(serviceType); // 비행관련 고정 통계, 항상 DB 전체값에서 통계조회 하는기능.
} catch (CustomException e) {
Map<String, Object> resultMap = new HashMap<>();
log.error("IGNORE : ", e);
resultMap.put("result", false);
resultMap.put("errorCode", e.getErrorCode());
resultMap.put("errorMessage", e.getMessage());
return ResponseEntity.ok().body(new SuccessResponse<>(resultMap));
} catch (Exception e) {
/**
* try{
@ -56,12 +64,12 @@ public class MainStatisticsController {
* try 영역 코드들중 문제가 생기면 오는 .
* log.error 로그로 원인 파악과 함께 API를 호출한 곳에 서버에러 내려줌
*/
log.error("IGNORE : {}", e);
log.error("IGNORE : ", e);
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR)
.body(new ErrorResponse("Server Error", "-1"));
}
return ResponseEntity.ok().body(new SuccessResponse<List<FlightStcsValueModel>>(result));
return ResponseEntity.ok().body(new SuccessResponse<>(result));
}
/**
@ -70,15 +78,19 @@ public class MainStatisticsController {
* @param type
* @return
*/
@Operation(summary = "비행통계(비행시간, 비행시간 TOP5)", description = "비행통계(비행시간, 비행시간 TOP5)<br />" +
" cate = 'TIME'(시간), 'DISTANCE'(거리), 'FLT_COUNT'(횟수)<br />" +
" type=['year','month','day','one-day']<br />" +
" **type=year => date=, type=month => date=2023, type=day => date=2023-10, type=one-day => date=2023-10-01**")
@ApiResponse(responseCode = "200", description = "OK")
@GetMapping("/flight/{type}")
@ApiOperation(value = "비행통계 cate = ['TIME', 'DISTANCE','FLT_COUNT'], type=['year','month','day','one-day']")
@Tag(name = "통계 컨트롤러", description = "통계 관련 API")
@ApiImplicitParams({
@ApiImplicitParam(name = "date",value = "날짜[2023]", dataTypeClass = String.class),
@ApiImplicitParam(name = "cate",value = "비행시간,거리,횟수[TIME]", dataTypeClass = String.class),
@ApiImplicitParam(name = "type",value = "날짜형식[month]", dataTypeClass = String.class)
})
public ResponseEntity<? extends BasicResponse> fltStcs(FlightStcsRQ rq, @PathVariable String type){
public ResponseEntity<? extends BasicResponse> fltStcs(
FlightStcsByFlightRQ rq,
@Parameter(description = "년/월/일 구분값 - ['year','month','day','one-day']", example = "month")
@PathVariable String type
) {
log.warn("type => {}", type);
FlightStcsModel result = new FlightStcsModel();
@ -93,6 +105,13 @@ public class MainStatisticsController {
result.setGraphData(graphData);
result.setTopData(topData);
} catch (CustomException e) {
Map<String, Object> resultMap = new HashMap<>();
log.error("IGNORE : ", e);
resultMap.put("result", false);
resultMap.put("errorCode", e.getErrorCode());
resultMap.put("errorMessage", e.getMessage());
return ResponseEntity.ok().body(new SuccessResponse<>(resultMap));
} catch (Exception e) {
/**
* try{
@ -106,7 +125,7 @@ public class MainStatisticsController {
.body(new ErrorResponse("Server Error", "-1"));
}
return ResponseEntity.ok().body(new SuccessResponse<FlightStcsModel>(result));
return ResponseEntity.ok().body(new SuccessResponse<>(result));
}
/**
@ -114,15 +133,23 @@ public class MainStatisticsController {
* @param serviceType
* @return
*/
@Operation(summary = "비정상 상황 통계(비행경로이탈,비정상고도,충돌위험)", description = "비정상 상황 통계(비행경로이탈,비정상고도,충돌위험) - 상단 통계")
@Parameter(name = "serviceType", description = "서비스 타입(관할기관코드)", example = "F0002")
@ApiResponse(responseCode = "200", description = "OK")
@GetMapping("/warn-static")
@ApiOperation(value = "비정상 상황 상단 데이터[DB전체 통계데이터]")
@Tag(name = "통계 컨트롤러", description = "통계 관련 API")
public ResponseEntity<? extends BasicResponse> warnStcsStatic(String serviceType) {
List<FlightStcsValueModel> result = null;
try {
result = service.getWarnStaticStcs(serviceType);
} catch (CustomException e) {
Map<String, Object> resultMap = new HashMap<>();
log.error("IGNORE : ", e);
resultMap.put("result", false);
resultMap.put("errorCode", e.getErrorCode());
resultMap.put("errorMessage", e.getMessage());
return ResponseEntity.ok().body(new SuccessResponse<>(resultMap));
} catch (Exception e) {
/**
* try{
@ -131,12 +158,12 @@ public class MainStatisticsController {
* try 영역 코드들중 문제가 생기면 오는 .
* log.error 로그로 원인 파악과 함께 API를 호출한 곳에 서버에러 내려줌
*/
log.error("IGNORE : {}", e);
log.error("IGNORE : ", e);
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR)
.body(new ErrorResponse("Server Error", "-1"));
}
return ResponseEntity.ok().body(new SuccessResponse<List<FlightStcsValueModel>>(result));
return ResponseEntity.ok().body(new SuccessResponse<>(result));
}
/**
@ -145,15 +172,17 @@ public class MainStatisticsController {
* @param type
* @return
*/
@Operation(summary = "비정상상황 통계(비행시간, 비행시간 TOP5)", description = "비정상상황 통계(비행경로이탈 통계, 비행경로이탈 TOP5)<br />" +
" cate = 'PLAN'(비행경로이탈), 'ALTITUDE'(비정상고도), 'CRASH'(충돌위험)<br />" +
" type=['year','month','day','one-day']<br />" +
" **type=year => date=, type=month => date=2023, type=day => date=2023-10, type=one-day => date=2023-10-01**")
@ApiResponse(responseCode = "200", description = "OK")
@GetMapping("/warn/{type}")
@ApiOperation(value = "비정상상황 cate = ['PLAN' ,'ALTITUDE', 'CRASH'], type=['year','month','day','one-day']")
@Tag(name = "통계 컨트롤러", description = "통계 관련 API")
@ApiImplicitParams({
@ApiImplicitParam(name = "date",value = "날짜[2023]", dataTypeClass = String.class),
@ApiImplicitParam(name = "cate",value = "비행시간,거리,횟수[TIME]", dataTypeClass = String.class),
@ApiImplicitParam(name = "type",value = "날짜형식[month]", dataTypeClass = String.class)
})
public ResponseEntity<? extends BasicResponse> warnStcs(FlightStcsRQ rq, @PathVariable String type){
public ResponseEntity<? extends BasicResponse> warnStcs(
FlightStcsByWarnRQ rq,
@Parameter(description = "년/월/일 구분값 - ['year','month','day','one-day']", example = "month")
@PathVariable String type
) {
FlightStcsModel result = new FlightStcsModel();
@ -168,6 +197,13 @@ public class MainStatisticsController {
result.setGraphData(graphData);
result.setTopData(topData);
} catch (CustomException e) {
Map<String, Object> resultMap = new HashMap<>();
log.error("IGNORE : ", e);
resultMap.put("result", false);
resultMap.put("errorCode", e.getErrorCode());
resultMap.put("errorMessage", e.getMessage());
return ResponseEntity.ok().body(new SuccessResponse<>(resultMap));
} catch (Exception e) {
/**
* try{
@ -176,12 +212,12 @@ public class MainStatisticsController {
* try 영역 코드들중 문제가 생기면 오는 .
* log.error 로그로 원인 파악과 함께 API를 호출한 곳에 서버에러 내려줌
*/
log.error("IGNORE : {}", e);
log.error("IGNORE : ", e);
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR)
.body(new ErrorResponse("Server Error", "-1"));
}
return ResponseEntity.ok().body(new SuccessResponse<FlightStcsModel>(result));
return ResponseEntity.ok().body(new SuccessResponse<>(result));
}
/**
@ -189,15 +225,23 @@ public class MainStatisticsController {
* @param serviceType
* @return
*/
@Operation(summary = "비행 실적 통계(비행실적,비행계획,비행승인)", description = "비행 실적 통계(비행실적,비행계획,비행승인) - 상단 통계")
@Parameter(name = "serviceType", description = "서비스 타입(관할기관코드)", example = "F0002")
@ApiResponse(responseCode = "200", description = "OK")
@GetMapping("/flight/result-static")
@ApiOperation(value = "비행실적 상단데이터 통계 [DB전체 통계데이터]")
@Tag(name = "통계 컨트롤러", description = "통계 관련 API")
public ResponseEntity<? extends BasicResponse> fltResultStcs(String serviceType) {
List<FlightStcsValueModel> result = null;
try {
result = service.getFltResultStaticStcs(serviceType);
} catch (CustomException e) {
Map<String, Object> resultMap = new HashMap<>();
log.error("IGNORE : ", e);
resultMap.put("result", false);
resultMap.put("errorCode", e.getErrorCode());
resultMap.put("errorMessage", e.getMessage());
return ResponseEntity.ok().body(new SuccessResponse<>(resultMap));
} catch (Exception e) {
/**
* try{
@ -206,12 +250,12 @@ public class MainStatisticsController {
* try 영역 코드들중 문제가 생기면 오는 .
* log.error 로그로 원인 파악과 함께 API를 호출한 곳에 서버에러 내려줌
*/
log.error("IGNORE : {}", e);
log.error("IGNORE : ", e);
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR)
.body(new ErrorResponse("Server Error", "-1"));
}
return ResponseEntity.ok().body(new SuccessResponse<List<FlightStcsValueModel>>(result));
return ResponseEntity.ok().body(new SuccessResponse<>(result));
}
/**
@ -220,15 +264,17 @@ public class MainStatisticsController {
* @param type
* @return
*/
@Operation(summary = "비행 실적 통계(비행 실적 통계, 비행 실적 TOP5)", description = "비행 실적 통계(비행 실적 통계, 비행 실적 TOP5)<br />" +
" cate = 'FLT_RESULT'(실적), 'FLT_PLAN'(계획),'FLT_PLAN_APRVN'(승인)<br />" +
" type=['year','month','day','one-day']<br />" +
" **type=year => date=, type=month => date=2023, type=day => date=2023-10, type=one-day => date=2023-10-01**")
@ApiResponse(responseCode = "200", description = "OK")
@GetMapping("/flight/result/{type}")
@ApiOperation(value = "비행실적 cate = ['FLT_RESULT' ,'FLT_PLAN', 'FLT_PLAN_APRVN'], type=['year','month','day','one-day']")
@Tag(name = "통계 컨트롤러", description = "통계 관련 API")
@ApiImplicitParams({
@ApiImplicitParam(name = "date",value = "날짜[2023]", dataTypeClass = String.class),
@ApiImplicitParam(name = "cate",value = "비행실적,비행계획서,비행계획승인[FLT_PLAN_APRVN]", dataTypeClass = String.class),
@ApiImplicitParam(name = "type",value = "날짜형식[month]", dataTypeClass = String.class)
})
public ResponseEntity<? extends BasicResponse> fltResultStcs(FlightStcsRQ rq, @PathVariable String type){
public ResponseEntity<? extends BasicResponse> fltResultStcs(
FlightStcsByResultRQ rq,
@Parameter(description = "년/월/일 구분값 - ['year','month','day','one-day']", example = "month")
@PathVariable String type
) {
FlightStcsModel result = new FlightStcsModel();
@ -243,6 +289,13 @@ public class MainStatisticsController {
result.setGraphData(graphData);
result.setTopData(topData);
} catch (CustomException e) {
Map<String, Object> resultMap = new HashMap<>();
log.error("IGNORE : ", e);
resultMap.put("result", false);
resultMap.put("errorCode", e.getErrorCode());
resultMap.put("errorMessage", e.getMessage());
return ResponseEntity.ok().body(new SuccessResponse<>(resultMap));
} catch (Exception e) {
/**
* try{
@ -251,12 +304,12 @@ public class MainStatisticsController {
* try 영역 코드들중 문제가 생기면 오는 .
* log.error 로그로 원인 파악과 함께 API를 호출한 곳에 서버에러 내려줌
*/
log.error("IGNORE : {}", e);
log.error("IGNORE : ", e);
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR)
.body(new ErrorResponse("Server Error", "-1"));
}
return ResponseEntity.ok().body(new SuccessResponse<FlightStcsModel>(result));
return ResponseEntity.ok().body(new SuccessResponse<>(result));
}
}

18
pav-server/src/main/java/com/palnet/biz/api/main/statistics/model/FlightStcsByFlightRQ.java

@ -0,0 +1,18 @@
package com.palnet.biz.api.main.statistics.model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Data
public class FlightStcsByFlightRQ {
@Schema(description = "카테고리 (시간,거리,횟수) - ['TIME', 'DISTANCE','FLT_COUNT']", example = "TIME")
private String cate;
@Schema(description = "서비스 타입(관할기관코드)", example = "F0002")
private String serviceType;
@Schema(description = "일자(type에 따른 포멧 변경 > year : -, month : yyyy, day : yyyy-MM, one-day : yyyy-MM-dd", example = "2023")
private String date;
}

18
pav-server/src/main/java/com/palnet/biz/api/main/statistics/model/FlightStcsByResultRQ.java

@ -0,0 +1,18 @@
package com.palnet.biz.api.main.statistics.model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Data
public class FlightStcsByResultRQ {
@Schema(description = "카테고리 (실적,계획,승인) - ['FLT_RESULT', 'FLT_PLAN','FLT_PLAN_APRVN']", example = "FLT_RESULT")
private String cate;
@Schema(description = "서비스 타입(관할기관코드)", example = "F0002")
private String serviceType;
@Schema(description = "일자(type에 따른 포멧 변경 > year : -, month : yyyy, day : yyyy-MM, one-day : yyyy-MM-dd", example = "2023")
private String date;
}

18
pav-server/src/main/java/com/palnet/biz/api/main/statistics/model/FlightStcsByWarnRQ.java

@ -0,0 +1,18 @@
package com.palnet.biz.api.main.statistics.model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Data
public class FlightStcsByWarnRQ {
@Schema(description = "카테고리 (비행경로이탈,비정상고도,충돌위험) - ['PLAN', 'ALTITUDE','CRASH']", example = "PLAN")
private String cate;
@Schema(description = "서비스 타입(관할기관코드)", example = "F0002")
private String serviceType;
@Schema(description = "일자(type에 따른 포멧 변경 > year : -, month : yyyy, day : yyyy-MM, one-day : yyyy-MM-dd", example = "2023")
private String date;
}

14
pav-server/src/main/java/com/palnet/biz/api/main/statistics/model/FlightStcsRQ.java

@ -1,14 +0,0 @@
package com.palnet.biz.api.main.statistics.model;
import lombok.Data;
@Data
public class FlightStcsRQ {
private String cate;
private String serviceType;
private String date;
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save