Compare commits

...

21 Commits

Author SHA1 Message Date
leehagjoon(이학준) cbaa318801 롤백 11 months ago
leehagjoon(이학준) 3068d07eec [LDRA] 38 S : 정적 클래스 멤버 사용시 검출 - public static변수에 final 미사용 시 검출된 위반 코드(테스트완료) 11 months ago
leehagjoon(이학준) df45b28d3d [LDRA] 585 S : 연산식 재 수정 11 months ago
leehagjoon(이학준) 8187b8229f Merge branch 'master' into feature/ldra 11 months ago
leehagjoon(이학준) c42da093f4 Merge branch 'master' into feature/ldra 11 months ago
leehagjoon(이학준) c0de573faf . 11 months ago
leehagjoon(이학준) 36bee6cd32 Merge branch 'master' into feature/ldra 11 months ago
leehagjoon(이학준) 206c68b285 날씨 API serviceKey 및 url 정보 관리 11 months ago
leehagjoon(이학준) 5e8b8a2339 [LDRA] 585 S : 동일한 데이터에 대한 비트와 연산 - 연산식 수정 11 months ago
leehagjoon(이학준) 20fdddd676 [LDRA] 585 S : 동일한 데이터에 대한 비트와 연산 - 한줄로 작업되는 부분들 변수 추가로 나눠서 처리 12 months ago
leehagjoon(이학준) 54ee923462 [LDRA] 202 S : 클래스 데이터가 명시적으로 비공개가 아님 - 사용하지 않는 코드여서 임시 주석 처리 1 year ago
leehagjoon(이학준) 15f28eab12 [LDRA] 56 D : 범위 내에서 캐치가 없는 상태로 던져지는 부분 수정 - 56D 규칙 위반은 안나오지만 71D 규칙 위반으로 바뀌는 현상 모아소프트측에서 사유서 작성 해야해서 한쪽 규칙을 클리어 하는게 좋다고 하여 56 D 로 규칙에 맞게 클리어 1 year ago
leehagjoon(이학준) 12b7fb9cf9 [LDRA] 56 D : 범위 내에서 캐치가 없는 상태로 던져지는 부분 수정 - 조건문에서 커스텀으로 에러 메세지 보내주는데 이부분을 잡아주는게 없어서 해당 규칙을 위반한다고 나왔음 1 year ago
leehagjoon(이학준) 13dd1324da [LDRA] 26 S , 91 D : 무한루프 가능성 수정 및 사용하지 않는 코드 수정 1 year ago
leehagjoon(이학준) 2187dd741f [LDRA] 80D : 잠재적으로 사용되지 않는 함수 수정 값. - main 메소드에 선언은 하였지만 호출 하는 부분이 없어 주석 해제 1 year ago
leehagjoon(이학준) e0bdaacc92 [LDRA] 71D : 호출된 함수에서 throw에 대한 일치하는 catch가 없음 1 year ago
leehagjoon(이학준) b448673be1 [LDRA] 6S : 부동 소수점 비교 - 날씨 좌표계 비교문 수정 1 year ago
leehagjoon(이학준) dad454ca4c [LDRA] 9S : 표현식에 대입 연산 했을 시 검출 1 year ago
leehagjoon(이학준) 21d148f27e [LDRA] 9S : 표현식에 대입 연산 했을 시 검출 - while문 수정 1 year ago
leehagjoon(이학준) bbf04818c0 [LDRA] 26S : 반복 제어 표현식에 반복문을 종료하지 않을 시 검출 - 조건문 수정 1 year ago
leehagjoon(이학준) fb4d218b81 [LDRA] 113S : 코드의 비 표준 문자 - 모든 내용에 한글이 들어가면 안된다. 1 year ago
  1. 41
      src/main/java/com/palnet/biz/api/acnt/crtfyhp/controller/AcntCrtfyhpController.java
  2. 25
      src/main/java/com/palnet/biz/api/acnt/cstmr/controller/AcntCstmrController.java
  3. 2
      src/main/java/com/palnet/biz/api/acnt/cstmr/service/AcntCstmrService.java
  4. 17
      src/main/java/com/palnet/biz/api/acnt/jwt/controller/JwtAuthenticationController.java
  5. 3
      src/main/java/com/palnet/biz/api/acnt/jwt/service/JwtService.java
  6. 6
      src/main/java/com/palnet/biz/api/acnt/terms/controller/AcntTermsController.java
  7. 16
      src/main/java/com/palnet/biz/api/anls/hstry/controller/AnlsHstryController.java
  8. 21
      src/main/java/com/palnet/biz/api/anls/smlt/controller/AnlsSmltController.java
  9. 35
      src/main/java/com/palnet/biz/api/bas/dron/controller/BasDronController.java
  10. 3
      src/main/java/com/palnet/biz/api/bas/dron/service/BasDronService.java
  11. 108
      src/main/java/com/palnet/biz/api/bas/flight/controller/BasFlightController.java
  12. 47
      src/main/java/com/palnet/biz/api/bas/flight/service/BasFlightService.java
  13. 9
      src/main/java/com/palnet/biz/api/bas/group/controller/BasGroupAprvController.java
  14. 40
      src/main/java/com/palnet/biz/api/bas/group/controller/BasGroupController.java
  15. 12
      src/main/java/com/palnet/biz/api/bas/group/controller/BasGroupJoinController.java
  16. 12
      src/main/java/com/palnet/biz/api/bas/group/controller/BasGroupUserController.java
  17. 11
      src/main/java/com/palnet/biz/api/bas/group/service/BasGroupService.java
  18. 48
      src/main/java/com/palnet/biz/api/ctr/cntrl/controller/CtrCntrlController.java
  19. 11
      src/main/java/com/palnet/biz/api/ctr/cntrl/service/CtrCntrlService.java
  20. 23
      src/main/java/com/palnet/biz/api/main/dash/controller/MainDashController.java
  21. 2
      src/main/java/com/palnet/biz/config/SwaggerConfig.java
  22. 116
      src/main/java/com/palnet/comn/encrptn/kisa/KISA_SEED_CBC.java
  23. 39
      src/main/java/com/palnet/comn/encrptn/kisa/KISA_SHA256.java
  24. 9
      src/main/java/com/palnet/comn/utils/EncryptUtils.java
  25. 11
      src/main/java/com/palnet/comn/utils/HttpUtils.java
  26. 20
      src/main/java/com/palnet/comn/utils/LocationUtils.java
  27. 20
      src/main/java/com/palnet/server/command/TempUtils.java
  28. 4
      src/main/java/com/palnet/server/task/ctr/service/CtrCntrlTaskService.java
  29. 2
      src/main/resources/application.properties

41
src/main/java/com/palnet/biz/api/acnt/crtfyhp/controller/AcntCrtfyhpController.java

@ -3,6 +3,7 @@ package com.palnet.biz.api.acnt.crtfyhp.controller;
import java.util.HashMap;
import java.util.Map;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
@ -34,7 +35,7 @@ import lombok.extern.log4j.Log4j2;
@RestController
@RequiredArgsConstructor
@RequestMapping(value = "/api/acnt/crtfyhp", produces = {MediaType.APPLICATION_JSON_VALUE})
@Tag(name = "휴대폰 인증 관리", description = "회원 휴대폰 인증 관련 API")
@Api(tags = {"Mobile Phone Authentication API"} , value = "AcntCrtfyhpController")
public class AcntCrtfyhpController {
@Autowired
@ -45,8 +46,7 @@ public class AcntCrtfyhpController {
@GetMapping(value = "/register/send")
@Tag(name = "휴대폰 인증 관리", description = "회원 휴대폰 인증 관련 API")
@ApiImplicitParam(name = "hnpo",value = "휴대폰번호", dataTypeClass = String.class)
@ApiImplicitParam(name = "hnpo",value = "hnpo", dataTypeClass = String.class)
public ResponseEntity<? extends BasicResponse> send(String hpno) {
@ -87,10 +87,9 @@ public class AcntCrtfyhpController {
@GetMapping(value = "/register/confirm")
@Tag(name = "휴대폰 인증 관리", description = "회원 휴대폰 인증 관련 API")
@ApiImplicitParams({
@ApiImplicitParam(name = "hpno",value = "휴대폰번호", dataTypeClass = String.class),
@ApiImplicitParam(name = "crtfyNo",value = "인증일련번호", dataTypeClass = String.class)
@ApiImplicitParam(name = "hpno",value = "hpno", dataTypeClass = String.class),
@ApiImplicitParam(name = "crtfyNo",value = "crtfyNo", dataTypeClass = String.class)
})
public ResponseEntity<? extends BasicResponse> confirm(String hpno , String crtfyNo) {
@ -122,11 +121,10 @@ public class AcntCrtfyhpController {
//아이디 찾기 시 인증번호 발송 로직
@GetMapping(value = "/find/sendForId")
@ApiOperation(value = "아이디 찾기 시 인증번호 발송")
@Tag(name = "휴대폰 인증 관리", description = "회원 휴대폰 인증 관련 API")
@ApiOperation(value = "Find Id and Send crftyNo")
@ApiImplicitParams({
@ApiImplicitParam(name = "memberName", value = "회원 이름", dataTypeClass = String.class),
@ApiImplicitParam(name = "hpno", value = "휴대폰 번호", dataTypeClass = String.class)
@ApiImplicitParam(name = "memberName", value = "memberName", dataTypeClass = String.class),
@ApiImplicitParam(name = "hpno", value = "hpno", dataTypeClass = String.class)
})
public ResponseEntity<? extends BasicResponse> sendForId(String memberName, String hpno) {
Map<String, Object> resultMap = new HashMap<String, Object>();
@ -154,11 +152,10 @@ public class AcntCrtfyhpController {
//아이디 찾기
@GetMapping(value = "/find/findUserId")
@ApiOperation(value = "회원 아이디 찾기")
@Tag(name = "휴대폰 인증 관리", description = "회원 휴대폰 인증 관련 API")
@ApiOperation(value = "Find Member Id")
@ApiImplicitParams({
@ApiImplicitParam(name = "memberName",value = "회원이름", dataTypeClass = String.class),
@ApiImplicitParam(name = "hpno",value = "휴대폰번호", dataTypeClass = String.class)
@ApiImplicitParam(name = "memberName",value = "memberName", dataTypeClass = String.class),
@ApiImplicitParam(name = "hpno",value = "hpno", dataTypeClass = String.class)
})
public ResponseEntity<? extends BasicResponse> findUserId(String memberName, String hpno) {
Map<String, Object> resultMap = new HashMap<String, Object>();
@ -188,11 +185,10 @@ public class AcntCrtfyhpController {
//비밀번호 찾기 시 인증번호 발송 로직
@GetMapping(value = "/find/sendForPw")
@ApiOperation(value = "비밀번호 찾기 시 인증번호 발송")
@Tag(name = "휴대폰 인증 관리", description = "회원 휴대폰 인증 관련 API")
@ApiOperation(value = "Find PW and Send crtfyNo")
@ApiImplicitParams({
@ApiImplicitParam(name = "userId",value = "사용자ID", dataTypeClass = String.class),
@ApiImplicitParam(name = "hpno",value = "휴대폰번호", dataTypeClass = String.class)
@ApiImplicitParam(name = "userId",value = "userId", dataTypeClass = String.class),
@ApiImplicitParam(name = "hpno",value = "hpno", dataTypeClass = String.class)
})
public ResponseEntity<? extends BasicResponse> sendForPw(String userId, String hpno) {
Map<String, Object> resultMap = new HashMap<String, Object>();
@ -221,12 +217,11 @@ public class AcntCrtfyhpController {
@GetMapping(value = "/find/updatePw")
@ApiOperation(value = "비밀번호 찾기 및 업데이트")
@Tag(name = "휴대폰 인증 관리", description = "회원 휴대폰 인증 관련 API")
@ApiOperation(value = "Find PW and UPDATE PW")
@ApiImplicitParams({
@ApiImplicitParam(name = "userID",value = "사용자ID", dataTypeClass = String.class),
@ApiImplicitParam(name = "hpno",value = "휴대폰번호", dataTypeClass = String.class),
@ApiImplicitParam(name = "newPw",value = "새로운 비밀번호", dataTypeClass = String.class)
@ApiImplicitParam(name = "userID",value = "userID", dataTypeClass = String.class),
@ApiImplicitParam(name = "hpno",value = "hpno", dataTypeClass = String.class),
@ApiImplicitParam(name = "newPw",value = "newPw", dataTypeClass = String.class)
})
public ResponseEntity<? extends BasicResponse> updatePw(String userId, String hpno, String newPw) throws Exception {
Map<String, Object> resultMap = new HashMap<String, Object>();

25
src/main/java/com/palnet/biz/api/acnt/cstmr/controller/AcntCstmrController.java

@ -11,6 +11,7 @@ import com.palnet.biz.api.acnt.cstmr.model.AcntCstmrEmModel;
import com.palnet.biz.api.acnt.cstmr.model.AcntCstmrGroupModel;
import com.palnet.biz.api.acnt.cstmr.model.AcntCstmrPwModel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.Parameter;
@ -50,15 +51,14 @@ import lombok.extern.log4j.Log4j2;
@RestController
@RequiredArgsConstructor
@RequestMapping(value = "/api/acnt/cstmr", produces = {MediaType.APPLICATION_JSON_VALUE})
@Tag(name = "회원관리", description = "회원 관련 API")
@Api(tags = {"Member Management API"}, value = "AcntCstmrController")
public class AcntCstmrController {
@Autowired
private final AcntCstmrService service;
@PostMapping(value = "/register")
@ApiOperation(value = "회원 가입")
@Tag(name = "회원관리", description = "회원 관련 API")
@ApiOperation(value = "Join User")
public ResponseEntity<? extends BasicResponse> register(@RequestBody AcntCstmrRqModel rq) {
AcntCstmrRsModel result;
@ -79,9 +79,8 @@ public class AcntCstmrController {
}
@GetMapping(value = "/profile/{cstmrSno}")
@ApiOperation(value = "회원 정보")
@Tag(name = "회원관리", description = "회원 관련 API")
@ApiImplicitParam(name = "cstmrSno",value = "고객일련번호", dataTypeClass = Integer.class)
@ApiOperation(value = "User Info")
@ApiImplicitParam(name = "cstmrSno",value = "cstmrSno", dataTypeClass = Integer.class)
public ResponseEntity<? extends BasicResponse> mypage(@PathVariable Integer cstmrSno){
List<AnctCstmerRlModel> result = null;
@ -100,8 +99,7 @@ public class AcntCstmrController {
}
@PostMapping(value = "/profile/pswdupdate")
@ApiOperation(value = "회원 패스워드 변경")
@Tag(name = "회원관리", description = "회원 관련 API")
@ApiOperation(value = "Password Update")
public ResponseEntity<? extends BasicResponse> passwordupdate(@RequestBody AcntCstmrPwModel rq){
Map<String, Object> resultMap = new HashMap<String, Object>();
try {
@ -123,8 +121,7 @@ public class AcntCstmrController {
}
@PostMapping(value = "/profile/pwcheck")
@ApiOperation(value = "회원 기존 패스워드 확인")
@Tag(name = "회원관리", description = "회원 관련 API")
@ApiOperation(value = "Member Check Existing PW")
public ResponseEntity<? extends BasicResponse> extendpsw(@RequestBody Map<String,String> userPswdMap){
Map<String, Object> resultMap = new HashMap<String, Object>();
try {
@ -146,8 +143,7 @@ public class AcntCstmrController {
}
@PutMapping(value = "/profile/update")
@ApiOperation(value = "회원 정보 변경 (이메일,핸드폰)")
@Tag(name = "회원관리", description = "회원 관련 API")
@ApiOperation(value = "Member Info update EMAIL,HPNO")
public ResponseEntity<? extends BasicResponse> updateEmail(@RequestBody AcntCstmrEmModel rq){
Map<String, Object> resultMap = new HashMap<String, Object>();
try {
@ -171,9 +167,8 @@ public class AcntCstmrController {
}
@PostMapping(value = "/profile/delete/{cstmrSno}")
@ApiOperation(value = "회원 탈퇴")
@Tag(name = "회원관리", description = "회원 관련 API")
@ApiImplicitParam(name = "cstmrSno",value = "고객일련번호", dataTypeClass = Integer.class)
@ApiOperation(value = "Member Delete")
@ApiImplicitParam(name = "cstmrSno",value = "cstmrSno", dataTypeClass = Integer.class)
public ResponseEntity<? extends BasicResponse> userDelete(@PathVariable Integer cstmrSno){
Map<String, Object> resultMap = new HashMap<String, Object>();
try {

2
src/main/java/com/palnet/biz/api/acnt/cstmr/service/AcntCstmrService.java

@ -244,7 +244,7 @@ public class AcntCstmrService {
// 4. RQ의 암호화한 패스워드와 DB에서 조회한 유저의 패스워드랑 비교
if(!userPswd.equals(userEntity.getUserPswd())) {
log.info("USERPSWD 비밀번호 : {}, DB 비밀번호 : {}", userPswd, userEntity.getUserPswd());
log.info("USERPSWD PW : {}, DB PW : {}", userPswd, userEntity.getUserPswd());
// 4.e 일치하지 않으면 예외처리 (패스워드 불일치)
throw new CustomException(ErrorCode.FAIL); // 임시,, 수정해야함

17
src/main/java/com/palnet/biz/api/acnt/jwt/controller/JwtAuthenticationController.java

@ -3,6 +3,7 @@ package com.palnet.biz.api.acnt.jwt.controller;
import java.util.HashMap;
import java.util.Map;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
@ -44,7 +45,7 @@ import lombok.extern.log4j.Log4j2;
@RequiredArgsConstructor
@Log4j2
@RequestMapping(value = "/api/acnt/jwt", produces = {MediaType.APPLICATION_JSON_VALUE})
@Tag(name = "JWT 토큰 이용", description = "JWT 토큰 관련 API")
@Api(tags = {"JWT API"},value = "JwtAuthenticationController")
public class JwtAuthenticationController {
@Autowired
@ -58,8 +59,7 @@ public class JwtAuthenticationController {
private JwtService service;
@PostMapping(value = "/login")
@ApiOperation(value = "로그인")
@Tag(name = "JWT 토큰 이용", description = "JWT 토큰 관련 API")
@ApiOperation(value = "login")
public ResponseEntity<? extends BasicResponse> createAuthenticationToken(@RequestBody JwtRqModel authenticationRequest) throws Exception {
Map<String , Object> resultMap = service.loginProcess(authenticationRequest);
@ -82,9 +82,8 @@ public class JwtAuthenticationController {
}
@GetMapping(value = "/profile/{cstmrSno}")
@ApiOperation(value = "로그인한 회원의 정보")
@Tag(name = "JWT 토큰 이용", description = "JWT 토큰 관련 API")
@ApiImplicitParam(name = "cstmrSno",value = "고객일련번호", dataTypeClass = Integer.class)
@ApiOperation(value = "login user Info")
@ApiImplicitParam(name = "cstmrSno",value = "cstmrSno", dataTypeClass = Integer.class)
public ResponseEntity<? extends BasicResponse> proflie(@PathVariable Integer cstmrSno) throws Exception{
JwtProfileRsModel result = service.profile(cstmrSno);
@ -97,7 +96,6 @@ public class JwtAuthenticationController {
@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{
@ -125,9 +123,8 @@ public class JwtAuthenticationController {
}
@GetMapping(value = "/logout/{cstmrSno}")
@ApiOperation(value = "로그아웃 한 회원의 정보")
@Tag(name = "JWT 토큰 이용", description = "JWT 토큰 관련 API")
@ApiImplicitParam(name = "cstmrSno",value = "고객일련번호", dataTypeClass = Integer.class)
@ApiOperation(value = "logout user Info")
@ApiImplicitParam(name = "cstmrSno",value = "cstmrSno", dataTypeClass = Integer.class)
public ResponseEntity<? extends BasicResponse> logout(@PathVariable Integer cstmrSno) throws Exception{
// if(cstmrSno == null || !(body.get("cstmrSno") instanceof Integer)) {

3
src/main/java/com/palnet/biz/api/acnt/jwt/service/JwtService.java

@ -187,7 +187,8 @@ public class JwtService {
Optional<PtyCstmrBas> optional = ptyCstmrBasRepository.findById(cstmrSno);
if (!optional.isPresent()) {
throw new CustomException(ErrorCode.DATA_NOTFIND);
// throw new CustomException(ErrorCode.DATA_NOTFIND);
log.error("NO DATA FOUND");
}
PtyCstmrBas entity = optional.get();

6
src/main/java/com/palnet/biz/api/acnt/terms/controller/AcntTermsController.java

@ -2,6 +2,7 @@ package com.palnet.biz.api.acnt.terms.controller;
import java.util.List;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
@ -37,7 +38,7 @@ import lombok.extern.log4j.Log4j2;
@RestController
@RequiredArgsConstructor
@RequestMapping(value = "/api/acnt/terms", produces = {MediaType.APPLICATION_JSON_VALUE})
@Tag(name = "약관 기본", description = "약관 관련 API")
@Api(value = "AcntTermsController", tags = {"Terms Basic API"})
public class AcntTermsController {
@Autowired
@ -46,8 +47,7 @@ public class AcntTermsController {
@GetMapping(value = "/list")
@Tag(name = "약관 기본", description = "약관 관련 API")
@ApiOperation(value = "약관 기본 정보")
@ApiOperation(value = "Terms Info")
public ResponseEntity<? extends BasicResponse> list(AcntTermsRqModel rq) {
List<AcntTermsRsModel> result = null;

16
src/main/java/com/palnet/biz/api/anls/hstry/controller/AnlsHstryController.java

@ -3,6 +3,7 @@ package com.palnet.biz.api.anls.hstry.controller;
import java.util.List;
import com.palnet.biz.api.comn.model.ComnPagingRs;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.tags.Tag;
@ -34,7 +35,7 @@ import lombok.extern.log4j.Log4j2;
@RestController
@RequiredArgsConstructor
@RequestMapping(value = "/api/anls/hstry", produces = {MediaType.APPLICATION_JSON_VALUE})
@Tag(name = "비행 이력 현황", description = "비행 이력 현황 관련 API")
@Api(value = "AnlsHstryController",tags = {"Flight History Status API"})
public class AnlsHstryController {
@Autowired
@ -42,8 +43,7 @@ public class AnlsHstryController {
@GetMapping(value = "/list")
@ApiOperation(value = "비행 현황 목록 출력")
@Tag(name = "비행 이력 현황", description = "비행 이력 현황 관련 API")
@ApiOperation(value = "Flight Status List")
public ResponseEntity<? extends BasicResponse> list(AnlsHstryGroupModel rq) {
List<AnlsHstryModel> rs = null;
ComnPagingRs<AnlsHstryModel> response;
@ -68,9 +68,8 @@ public class AnlsHstryController {
}
@GetMapping(value = "/detail/{id}")
@ApiOperation(value = "비행 현황 상세")
@Tag(name = "비행 이력 현황", description = "비행 이력 현황 관련 API")
@ApiImplicitParam(name = "id",value = "관제ID", dataTypeClass = String.class)
@ApiOperation(value = "Flight Status Detail")
@ApiImplicitParam(name = "id",value = "id", dataTypeClass = String.class)
public ResponseEntity<? extends BasicResponse> detail(@PathVariable String id) {
AnlsHstryModel result = null;
@ -89,9 +88,8 @@ public class AnlsHstryController {
@GetMapping(value = "/log/{id}")
@ApiOperation(value = "비행 이력 데이터")
@Tag(name = "비행 이력 현황", description = "비행 이력 현황 관련 API")
@ApiImplicitParam(name = "id",value = "관제ID", dataTypeClass = String.class)
@ApiOperation(value = "Flight History Log")
@ApiImplicitParam(name = "id",value = "id", dataTypeClass = String.class)
public ResponseEntity<? extends BasicResponse> log(@PathVariable String id) {
List<AnlsHstryDetailModel> result = null;
try {

21
src/main/java/com/palnet/biz/api/anls/smlt/controller/AnlsSmltController.java

@ -2,6 +2,7 @@ package com.palnet.biz.api.anls.smlt.controller;
import java.util.List;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
@ -35,7 +36,7 @@ import lombok.extern.log4j.Log4j2;
@RestController
@RequiredArgsConstructor
@RequestMapping(value = "/api/anls/smlt", produces = {MediaType.APPLICATION_JSON_VALUE})
@Tag(name = "비행 시뮬레이션", description = "비행 이력 시뮬레이션 관련 API")
@Api(value = "AnlsSmltController",tags = {"Flight History Simulation API"})
public class AnlsSmltController {
@Autowired
@ -47,8 +48,7 @@ public class AnlsSmltController {
* @return
*/
@GetMapping(value = "/list")
@ApiOperation(value = "비행 현황 목록")
@Tag(name = "비행 시뮬레이션", description = "비행 이력 시뮬레이션 관련 API")
@ApiOperation(value = "Flight status List")
public ResponseEntity<? extends BasicResponse> list(AnlsHstryRqModel rq) {
ComnPagingRs<AnlsHstryModel> result = null;
@ -82,9 +82,8 @@ public class AnlsSmltController {
* @return
*/
@GetMapping(value = "/hist/{id}")
@ApiOperation(value = "비행 이력 데이터 조회")
@Tag(name = "비행 시뮬레이션", description = "비행 이력 시뮬레이션 관련 API")
@ApiImplicitParam(name = "id",value = "관제ID", dataTypeClass = String.class)
@ApiOperation(value = "Flight History")
@ApiImplicitParam(name = "id",value = "id", dataTypeClass = String.class)
public ResponseEntity<? extends BasicResponse> histList(@PathVariable String id) {
List<AnlsHstryDetailModel> result = null;
@ -109,9 +108,8 @@ public class AnlsSmltController {
* @return
*/
@GetMapping(value = "/stcs/{id}")
@ApiOperation(value = "통계 데이터 조회")
@Tag(name = "비행 시뮬레이션", description = "비행 이력 시뮬레이션 관련 API")
@ApiImplicitParam(name = "id",value = "관제ID", dataTypeClass = String.class)
@ApiOperation(value = "Query Statistical data")
@ApiImplicitParam(name = "id",value = "id", dataTypeClass = String.class)
public ResponseEntity<? extends BasicResponse> stcsList(@PathVariable String id) {
List<AnlsSmltStcsModel> result = null;
@ -136,9 +134,8 @@ public class AnlsSmltController {
* @return
*/
@GetMapping(value = "/detail/{id}")
@ApiOperation(value = "비행 상세정보 조회")
@Tag(name = "비행 시뮬레이션", description = "비행 이력 시뮬레이션 관련 API")
@ApiImplicitParam(name = "id",value = "관제ID", dataTypeClass = String.class)
@ApiOperation(value = "Flight Detail")
@ApiImplicitParam(name = "id",value = "id", dataTypeClass = String.class)
public ResponseEntity<? extends BasicResponse> detail(@PathVariable String id) {
AnlsSmltDetailModel result = null;

35
src/main/java/com/palnet/biz/api/bas/dron/controller/BasDronController.java

@ -4,6 +4,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
@ -40,7 +41,7 @@ import lombok.extern.log4j.Log4j2;
@RestController
@RequiredArgsConstructor
@RequestMapping(value = "/api/bas/dron", produces = {MediaType.APPLICATION_JSON_VALUE})
@Tag(name = "드론 컨트롤러", description = "드론 관련 API")
@Api(value = "BasDronController",tags = {"Drone Information API"})
public class BasDronController {
@Autowired
@ -53,8 +54,7 @@ public class BasDronController {
* @return
*/
@GetMapping(value = "/list")
@ApiOperation(value = "드론 목록 조회")
@Tag(name = "드론 컨트롤러", description = "드론 관련 API")
@ApiOperation(value = "Drone List")
public ResponseEntity<? extends BasicResponse> list(BasDronRqModel rq) {
ComnPagingRs<BasDronModel> result = null;
@ -85,9 +85,8 @@ public class BasDronController {
* @return
*/
@GetMapping(value = "/idntf/list/{id}")
@ApiOperation(value = "식별정보 조회")
@Tag(name = "드론 컨트롤러", description = "드론 관련 API")
@ApiImplicitParam(name = "id",value = "기체일련번호", dataTypeClass = Integer.class)
@ApiOperation(value = "Idntf List")
@ApiImplicitParam(name = "id",value = "id", dataTypeClass = Integer.class)
public ResponseEntity<? extends BasicResponse> mylist(@PathVariable Integer id) {
List<BasIdntfModel> result = null;
@ -118,9 +117,8 @@ public class BasDronController {
* @return
*/
@GetMapping(value = "/detail/{id}")
@ApiOperation(value = "드론 상세 조회")
@Tag(name = "드론 컨트롤러", description = "드론 관련 API")
@ApiImplicitParam(name = "id",value = "기체일련번호", dataTypeClass = Integer.class)
@ApiOperation(value = "Drone Detail")
@ApiImplicitParam(name = "id",value = "id", dataTypeClass = Integer.class)
public ResponseEntity<? extends BasicResponse> detail(@PathVariable Integer id) {
BasDronModel result = null;
@ -150,8 +148,7 @@ public class BasDronController {
* @return
*/
@PostMapping(value = "/create")
@ApiOperation(value = "드론정보 생성")
@Tag(name = "드론 컨트롤러", description = "드론 관련 API")
@ApiOperation(value = "Create Drone Info")
public ResponseEntity<? extends BasicResponse> create(@RequestBody BasDronModel rq) {
Map<String , Object> resultMap = new HashMap<String,Object>();
@ -180,8 +177,7 @@ public class BasDronController {
* @return
*/
@PostMapping(value = "/idntf/create")
@ApiOperation(value = "식별장치 생성")
@Tag(name = "드론 컨트롤러", description = "드론 관련 API")
@ApiOperation(value = "Create Idntf")
public ResponseEntity<? extends BasicResponse> createIdntf(@RequestBody BasIdntfRqModel rq) {
Map<String , Object> resultMap = new HashMap<String,Object>();
@ -212,8 +208,7 @@ public class BasDronController {
* @return
*/
@PutMapping(value = "/update")
@ApiOperation(value = "드론정보 수정")
@Tag(name = "드론 컨트롤러", description = "드론 관련 API")
@ApiOperation(value = "Update Drone Info")
public ResponseEntity<? extends BasicResponse> update(@RequestBody BasDronModel rq) {
Map<String , Object> resultMap = new HashMap<String,Object>();
@ -244,9 +239,8 @@ public class BasDronController {
* @return
*/
@DeleteMapping(value = "/delete/{id}")
@ApiOperation(value = "드론정보 삭제")
@Tag(name = "드론 컨트롤러", description = "드론 관련 API")
@ApiImplicitParam(name = "id",value = "기체일련번호", dataTypeClass = Integer.class)
@ApiOperation(value = "Delete Drone Info")
@ApiImplicitParam(name = "id",value = "id", dataTypeClass = Integer.class)
public ResponseEntity<? extends BasicResponse> delete(@PathVariable Integer id) {
Map<String , Object> resultMap = new HashMap<String,Object>();
@ -278,9 +272,8 @@ public class BasDronController {
* @return
*/
@DeleteMapping(value = "/idntf/delete/{id}")
@ApiOperation(value = "식별장치 삭제")
@Tag(name = "드론 컨트롤러", description = "드론 관련 API")
@ApiImplicitParam(name = "id",value = "식별번호", dataTypeClass = String.class)
@ApiOperation(value = "Delete Idntf")
@ApiImplicitParam(name = "id",value = "id", dataTypeClass = String.class)
public ResponseEntity<? extends BasicResponse> deleteIdntf(@PathVariable String id) {
Map<String , Object> resultMap = new HashMap<String,Object>();

3
src/main/java/com/palnet/biz/api/bas/dron/service/BasDronService.java

@ -325,7 +325,8 @@ public class BasDronService {
Optional<ComArcrftBas> optional = comArcrftBasRepository.findById(model.getArcrftSno());
if (!optional.isPresent()) {
throw new CustomException(ErrorCode.DATA_NOTFIND);
// throw new CustomException(ErrorCode.DATA_NOTFIND);
log.error("NO DATA FOUND.");
}
ComArcrftBas entity = optional.get();

108
src/main/java/com/palnet/biz/api/bas/flight/controller/BasFlightController.java

@ -10,6 +10,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import io.swagger.annotations.Api;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
@ -57,7 +58,7 @@ import lombok.extern.slf4j.Slf4j;
@Slf4j
@RestController
@RequestMapping(value = "/api/bas/flight", produces = {MediaType.APPLICATION_JSON_VALUE})
@Tag(name = "비행계획서", description = "비행계획서 관련 API")
@Api(value = "BasFlightController",tags = {"Flight Plan API"})
public class BasFlightController {
private final BasFlightService basFlightService;
@ -74,7 +75,6 @@ public class BasFlightController {
}
@GetMapping("/area")
@Tag(name = "비행계획서", description = "비행계획서 관련 API")
public ResponseEntity<Object> findAirSpace() throws IOException, ParseException {
// 1. file read
Resource resource = new ClassPathResource("air/airgeo.json");
@ -99,10 +99,9 @@ public class BasFlightController {
// 비행계획서 조회
@GetMapping(value = "/plan/list")
@ApiOperation(value = "비행계획서 조회")
@Tag(name = "비행계획서", description = "비행계획서 관련 API")
@ApiOperation(value = "Flight Plan List")
public ResponseEntity<? extends BasicResponse> findPlanList(BasFlightPlanListRq rq) {
ComnPagingRs<BasFlightPlanModel> result = null;
ComnPagingRs<BasFlightPlanModel> result = null;
// System.out.println(rq);
try {
result = basFlightService.listPlan(rq);
@ -117,9 +116,8 @@ public class BasFlightController {
// 비행계획서 상세 조회
@GetMapping(value = "/plan/detail/{planSno}")
@ApiOperation(value = "비행계획서 상세 조회")
@Tag(name = "비행계획서", description = "비행계획서 관련 API")
@ApiImplicitParam(name = "planSno",value = "비행계획서일련번호", dataTypeClass = Integer.class)
@ApiOperation(value = "Flight Plan Detail")
@ApiImplicitParam(name = "planSno",value = "planSno", dataTypeClass = Integer.class)
public ResponseEntity<? extends BasicResponse> detailPlan(@PathVariable("planSno") Integer planSno) {
BasFlightPlanModel result = null;
try {
@ -135,8 +133,7 @@ public class BasFlightController {
// 비행계획서 등록
@PostMapping(value = "/plan/create")
@ApiOperation(value = "비행계획서 등록")
@Tag(name = "비행계획서", description = "비행계획서 관련 API")
@ApiOperation(value = "Create Flight Plan")
public ResponseEntity<? extends BasicResponse> createPlan(@RequestBody BasFlightPlanModel rq) {
Map<String, Object> resultMap = new HashMap<String, Object>();
try {
@ -162,8 +159,7 @@ public class BasFlightController {
// 비행계획서 수정
@PutMapping(value = "/plan/update")
@ApiOperation(value = "비행계획서 수정")
@Tag(name = "비행계획서", description = "비행계획서 관련 API")
@ApiOperation(value = "Update Flight Plan")
public ResponseEntity<? extends BasicResponse> updatePlan(@RequestBody BasFlightPlanModel rq) {
Map<String, Object> resultMap = new HashMap<String, Object>();
try {
@ -187,9 +183,8 @@ public class BasFlightController {
// 비행계획서 삭제
@DeleteMapping(value = "/plan/delete/{planSno}")
@ApiOperation(value = "비행계획서 삭제")
@Tag(name = "비행계획서", description = "비행계획서 관련 API")
@ApiImplicitParam(name = "planSno",value = "비행계획서일련번호", dataTypeClass = Integer.class)
@ApiOperation(value = "Delete Flight Plan")
@ApiImplicitParam(name = "planSno",value = "planSno", dataTypeClass = Integer.class)
public ResponseEntity<? extends BasicResponse> deletePlan(@PathVariable("planSno") Integer planSno) {
Map<String, Object> resultMap = new HashMap<String, Object>();
try {
@ -212,9 +207,8 @@ public class BasFlightController {
// 그룹 조종사 조회
@GetMapping(value = "/plan/pilot/{groupId}")
@ApiOperation(value = "그룹의 조종사 조회")
@Tag(name = "비행계획서", description = "비행계획서 관련 API")
@ApiImplicitParam(name = "groupId",value = "그룹ID", dataTypeClass = String.class)
@ApiOperation(value = "Group Pilot List")
@ApiImplicitParam(name = "groupId",value = "groupId", dataTypeClass = String.class)
public ResponseEntity<? extends BasicResponse> findPilot(@PathVariable("groupId") String groupId) {
List<BasFlightPlanPilotModel> result = null;
try {
@ -231,9 +225,8 @@ public class BasFlightController {
}
// 그룹 기체 조회
@GetMapping(value = "/plan/arcrft/{groupId}")
@ApiOperation(value = "그룹의 기체 조회")
@Tag(name = "비행계획서", description = "비행계획서 관련 API")
@ApiImplicitParam(name = "groupId",value = "그룹ID", dataTypeClass = String.class)
@ApiOperation(value = "Group Arcrft")
@ApiImplicitParam(name = "groupId",value = "groupId", dataTypeClass = String.class)
public ResponseEntity<? extends BasicResponse> findArcrft(@PathVariable("groupId") String groupId) {
List<BasFlightPlanArcrftModel> result = null;
try {
@ -250,8 +243,7 @@ public class BasFlightController {
// 비행 구역 버퍼 존 생성
@PostMapping("/plan/area/buffer")
@ApiOperation(value = "비행 구역 버퍼 존 생성")
@Tag(name = "비행계획서", description = "비행계획서 관련 API")
@ApiOperation(value = "Flight area buffer Create")
public ResponseEntity<? extends BasicResponse> findBuffer(@RequestBody List<BasFlightPlanAreaModel> rq) {
List<BasFlightPlanAreaModel> rs = null;
try {
@ -266,28 +258,26 @@ public class BasFlightController {
}
@GetMapping("/plan/api/weather")
@ApiOperation(value = "비행계획서 날씨")
@Tag(name = "비행계획서", description = "비행계획서 관련 API")
@ApiOperation(value = "Flight Plan Weather")
public ResponseEntity<? extends BasicResponse> restApiGetWeather(BasFlightWeatherModel rq){
JSONObject jsonObject = null;
JSONObject jsonObject = null;
try {
jsonObject = basFlightService.getWeather(rq);
} catch (Exception e) {
log.error("IGNORE : {}", e);
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR)
.body(new ErrorResponse("Server Error", "-1"));
}
try {
jsonObject = basFlightService.getWeather(rq);
} catch (Exception e) {
log.error("IGNORE : {}", e);
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR)
.body(new ErrorResponse("Server Error", "-1"));
}
return ResponseEntity.ok().body(new SuccessResponse<>(jsonObject));
}
// 비행계획서 리스트(승인)
@GetMapping(value = "/aprv/list")
@ApiOperation(value = "비행계획서 리스트(승인)")
@Tag(name = "비행계획서", description = "비행계획서 관련 API")
@ApiOperation(value = "Flight Plan Aprv List")
public ResponseEntity<? extends BasicResponse> findAprvList(BasFlightPlanListRq rq) {
ComnPagingRs<BasFlightPlanModel> result = null;
ComnPagingRs<BasFlightPlanModel> result = null;
try {
result = basFlightService.aprvList(rq);
} catch (Exception e) {
@ -300,8 +290,7 @@ public class BasFlightController {
}
// 비행계획서 승인/미승인
@PutMapping(value = "/aprv/proc")
@ApiOperation(value = "비행 계획서 승인/미승인")
@Tag(name = "비행계획서", description = "비행계획서 관련 API")
@ApiOperation(value = "Flight Plan aprv/proc")
public ResponseEntity<? extends BasicResponse> updateAprvProc(@RequestBody BasFlightAprovRq rq) {
Map<String, Object> resultMap = new HashMap<String, Object>();
try {
@ -324,7 +313,6 @@ public class BasFlightController {
}
@PostMapping("/airspace/contains")
@Tag(name = "비행계획서", description = "비행계획서 관련 API")
public ResponseEntity<? extends BasicResponse> checkAirspaceContains(@RequestBody List<BasFlightPlanAreaModel> rq) {
Map<String, Object> resultMap = new HashMap<String, Object>();
try {
@ -343,30 +331,28 @@ public class BasFlightController {
//지역 검색
@GetMapping("/plan/area/search")
@ApiOperation(value = "지역 검색")
@Tag(name = "비행계획서", description = "비행계획서 관련 API")
public ResponseEntity<? extends BasicResponse> searchArea(String query) throws ParseException {
String text = null;
try {
text = URLEncoder.encode(query, "UTF-8");
} catch (UnsupportedEncodingException e) {
throw new RuntimeException("검색어 인코딩 실패", e);
}
String apiURL = env.getProperty("api.naver.search-url") + "?query=" + text + "&display=5";
Map<String, String> requestHeaders = new HashMap<>();
requestHeaders.put("X-Naver-Client-Id", env.getProperty("api.naver.client-id"));
requestHeaders.put("X-Naver-Client-Secret", env.getProperty("api.naver.client-secret-key"));
String responseBody = basFlightService.searchArea(apiURL, requestHeaders);
JSONParser parser = new JSONParser();
Object obj = parser.parse(responseBody);
return ResponseEntity.ok().body(new SuccessResponse<>(obj));
}
@ApiOperation(value = "Search area")
public ResponseEntity<? extends BasicResponse> searchArea(String query) throws ParseException{
String text = null;
try {
text = URLEncoder.encode(query, "UTF-8");
} catch (UnsupportedEncodingException e) {
throw new RuntimeException("Search Encoding Fail", e);
}
String apiURL = env.getProperty("api.naver.search-url") + "?query=" + text + "&display=5";
Map<String, String> requestHeaders = new HashMap<>();
requestHeaders.put("X-Naver-Client-Id", env.getProperty("api.naver.client-id"));
requestHeaders.put("X-Naver-Client-Secret", env.getProperty("api.naver.client-secret-key"));
String responseBody = basFlightService.searchArea(apiURL, requestHeaders);
JSONParser parser = new JSONParser();
Object obj = parser.parse(responseBody);
return ResponseEntity.ok().body(new SuccessResponse<>(obj));
}
@GetMapping("/schedule")
@Tag(name = "비행계획서", description = "비행계획서 관련 API")
public ResponseEntity<? extends BasicResponse> findSchedule(@RequestParam("searchDate") String searchDate) {
List<BasFlightScheduleRs> response;

47
src/main/java/com/palnet/biz/api/bas/flight/service/BasFlightService.java

@ -15,6 +15,7 @@ import java.util.stream.Collectors;
import javax.xml.bind.JAXBException;
import com.jcraft.jsch.IO;
import org.apache.commons.lang3.StringUtils;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
@ -82,6 +83,7 @@ public class BasFlightService {
@Value("${weather.api.key}")
private String weatherKey;
private final FltPlanBasRepository fltPlanBasRepository;
private final FltPlanArcrftRepository fltPlanArcrftRepository;
private final FltPlanAreaRepository fltPlanAreaRepository;
@ -200,7 +202,7 @@ public class BasFlightService {
return rs;
}
public void planValid(BasFlightPlanModel rq) {
public void planValid(BasFlightPlanModel rq){
boolean isEqualsFltElev = false;
List<BasFlightPlanAreaModel> rqAreaList = rq.getAreaList();
String rqFltElev = rqAreaList.get(0).getFltElev();
@ -308,10 +310,14 @@ public class BasFlightService {
// 비행계획서 등록
@Transactional
public void createPlan(BasFlightPlanModel rq) throws IOException, JAXBException {
public void createPlan(BasFlightPlanModel rq) throws IOException, JAXBException{
// 비행계획서 유효성 검사.
this.planValid(rq);
try {
// 비행계획서 유효성 검사.
this.planValid(rq);
}catch (RuntimeException e) {
throw new CustomException(ErrorCode.FAIL);
}
// 비행계획서
String userId = jwtTokenUtil.getUserIdByToken();
@ -388,10 +394,13 @@ public class BasFlightService {
// 비행계획서 수정
@Transactional
public boolean updatePlan(BasFlightPlanModel rq) throws IOException, JAXBException {
// 비행계획서 유효성 검사.
this.planValid(rq);
public boolean updatePlan(BasFlightPlanModel rq) throws IOException, JAXBException{
try {
// 비행계획서 유효성 검사.
this.planValid(rq);
}catch (RuntimeException e) {
throw new CustomException(ErrorCode.FAIL);
}
if (rq != null && rq.getPlanSno() != null) {
String userId = jwtTokenUtil.getUserIdByToken();
@ -677,37 +686,36 @@ public class BasFlightService {
return readBody(con.getErrorStream());
}
} catch (IOException e) {
throw new RuntimeException("API 요청과 응답 실패", e);
throw new RuntimeException("API Request and Response Fail", e);
} finally {
con.disconnect();
}
}
public HttpURLConnection connect(String apiUrl) {
public HttpURLConnection connect(String apiUrl){
try {
URL url = new URL(apiUrl);
return (HttpURLConnection)url.openConnection();
} catch (MalformedURLException e) {
throw new RuntimeException("API URL이 잘못되었습니다. : " + apiUrl, e);
throw new RuntimeException("Invalid API URL. : " + apiUrl, e);
} catch (IOException e) {
throw new RuntimeException("연결이 실패했습니다. : " + apiUrl, e);
throw new RuntimeException("Connection Fail. : " + apiUrl, e);
}
}
public String readBody(InputStream body) {
public String readBody(InputStream body) throws IOException{
InputStreamReader streamReader = new InputStreamReader(body);
try(BufferedReader lineReader = new BufferedReader(streamReader)) {
StringBuilder responseBody = new StringBuilder();
String line;
while ((line = lineReader.readLine()) != null) {
String line = lineReader.readLine();
while (line != null) {
responseBody.append(line);
line = lineReader.readLine();
}
return responseBody.toString();
} catch (IOException e) {
throw new RuntimeException("API 응답을 읽는데 실패했습니다.", e);
}
}
@ -739,10 +747,11 @@ public class BasFlightService {
rd = new BufferedReader(new InputStreamReader(conn.getErrorStream()));
}
StringBuilder sb = new StringBuilder();
String line;
String line = rd.readLine();
while ((line = rd.readLine()) != null) {
while (line != null) {
sb.append(line);
line = rd.readLine();
}
CtrTrnsLctnModel weatherResult = ctrTrnsLctnService.convertLatlonToAddress(rq.getNx2(),rq.getNy2());

9
src/main/java/com/palnet/biz/api/bas/group/controller/BasGroupAprvController.java

@ -4,6 +4,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
@ -33,7 +34,7 @@ import lombok.extern.log4j.Log4j2;
@RestController
@RequiredArgsConstructor
@RequestMapping(value = "/api/bas/group/aprv", produces = {MediaType.APPLICATION_JSON_VALUE})
@Tag(name = "그룹 승인 컨트롤러", description = "그룹 가입 승인 관련 API")
@Api(value = "BasGroupAprvController", tags = {"Group Approval API"})
public class BasGroupAprvController {
@Autowired
@ -45,8 +46,7 @@ public class BasGroupAprvController {
* @return
*/
@GetMapping(value = "/list")
@ApiOperation(value = "승인요청 조회")
@Tag(name = "그룹 승인 컨트롤러", description = "그룹 가입 승인 관련 API")
@ApiOperation(value = "Aprov List")
public ResponseEntity<? extends BasicResponse> list(BasGroupAprvRqModel rq) {
ComnPagingRs<BasGroupAprvModel> result = null;
// log.debug(">>>>" + rq.toString());
@ -76,8 +76,7 @@ public class BasGroupAprvController {
* @return
*/
@PutMapping(value = "/update")
@ApiOperation(value = "승인처리 / 승인취소 처리")
@Tag(name = "그룹 승인 컨트롤러", description = "그룹 가입 승인 관련 API")
@ApiOperation(value = "Update Aprov / cancellAprov")
public ResponseEntity<? extends BasicResponse> update(@RequestBody BasGroupAprvModel rq) {
Map<String , Object> resultMap = new HashMap<String,Object>();

40
src/main/java/com/palnet/biz/api/bas/group/controller/BasGroupController.java

@ -4,6 +4,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.tags.Tag;
@ -38,15 +39,14 @@ import lombok.extern.log4j.Log4j2;
@RestController
@RequiredArgsConstructor
@RequestMapping(value = "/api/bas/group", produces = {MediaType.APPLICATION_JSON_VALUE})
@Tag(name = "그룹 컨트롤러", description = "그룹 관련 API")
@Api(value = "BasGroupController", tags = {"Group API"})
public class BasGroupController {
@Autowired
private final BasGroupService service;
@GetMapping(value = "/createid")
@ApiOperation(value = "그룹코드 생성")
@Tag(name = "그룹 컨트롤러", description = "그룹 관련 API")
@ApiOperation(value = "Create Group ID")
public ResponseEntity<? extends BasicResponse> createid() {
Map<String , Object> resultMap = new HashMap<String,Object>();
@ -71,9 +71,8 @@ public class BasGroupController {
* @return
*/
@GetMapping(value = "/mylist")
@ApiOperation(value = "나의 그룹 목록 조회")
@Tag(name = "그룹 컨트롤러", description = "그룹 관련 API")
@ApiImplicitParam(name = "cstmrSno",value = "고객일련번호", dataTypeClass = Integer.class)
@ApiOperation(value = "My Group List")
@ApiImplicitParam(name = "cstmrSno",value = "cstmrSno", dataTypeClass = Integer.class)
public ResponseEntity<? extends BasicResponse> mylist(Integer cstmrSno) {
List<BasGroupModel> result = null;
@ -105,9 +104,8 @@ public class BasGroupController {
* @return
*/
@GetMapping(value = "/joinlist")
@ApiOperation(value = "나의 그룹 - 참여 그룹 목록 조회")
@Tag(name = "그룹 컨트롤러", description = "그룹 관련 API")
@ApiImplicitParam(name = "cstmrSno",value = "고객일련번호", dataTypeClass = Integer.class)
@ApiOperation(value = "My Group - Join Groups List")
@ApiImplicitParam(name = "cstmrSno",value = "cstmrSno", dataTypeClass = Integer.class)
public ResponseEntity<? extends BasicResponse> joinList(Integer cstmrSno) {
List<BasGroupJoinModel> result = null;
@ -138,9 +136,8 @@ public class BasGroupController {
* @return
*/
@GetMapping(value = "/grouplist")
@ApiOperation(value = "그룹 목록 조회")
@Tag(name = "그룹 컨트롤러", description = "그룹 관련 API")
@ApiImplicitParam(name = "cstmrSno",value = "고객일련번호", dataTypeClass = Integer.class)
@ApiOperation(value = "Group List")
@ApiImplicitParam(name = "cstmrSno",value = "cstmrSno", dataTypeClass = Integer.class)
public ResponseEntity<? extends BasicResponse> grouplist(Integer cstmrSno) {
List<BasGroupJoinModel> result = null;
@ -171,8 +168,7 @@ public class BasGroupController {
* @return
*/
@GetMapping(value = "/list")
@ApiOperation(value = "전체 그룹 목록 조회")
@Tag(name = "그룹 컨트롤러", description = "그룹 관련 API")
@ApiOperation(value = "All Group List")
public ResponseEntity<? extends BasicResponse> list(BasGroupRqModel rq) {
List<BasGroupModel> result = null;
@ -196,9 +192,8 @@ public class BasGroupController {
* @return
*/
@GetMapping(value = "/detail/{id}")
@ApiOperation(value = "그룹 상세 조회")
@Tag(name = "그룹 컨트롤러", description = "그룹 관련 API")
@ApiImplicitParam(name = "id",value = "그룹ID", dataTypeClass = String.class)
@ApiOperation(value = "Group Detail")
@ApiImplicitParam(name = "id",value = "id", dataTypeClass = String.class)
public ResponseEntity<? extends BasicResponse> detail(@PathVariable String id) {
BasGroupModel result = null;
@ -222,8 +217,7 @@ public class BasGroupController {
* @throws Exception
*/
@PostMapping(value = "/create")
@ApiOperation(value = "그룹 생성")
@Tag(name = "그룹 컨트롤러", description = "그룹 관련 API")
@ApiOperation(value = "Create Group")
public ResponseEntity<? extends BasicResponse> create(@RequestBody BasGroupModel rq) throws Exception {
Map<String , Object> resultMap = new HashMap<String,Object>();
@ -249,8 +243,7 @@ public class BasGroupController {
* @throws Exception
*/
@PutMapping(value = "/update")
@ApiOperation(value = "그룹 수정")
@Tag(name = "그룹 컨트롤러", description = "그룹 관련 API")
@ApiOperation(value = "Update Group")
public ResponseEntity<? extends BasicResponse> update(@RequestBody BasGroupModel rq) throws Exception {
Map<String , Object> resultMap = new HashMap<String,Object>();
@ -282,9 +275,8 @@ public class BasGroupController {
* @return
*/
@DeleteMapping(value = "/delete/{id}")
@ApiOperation(value = "그룹 삭제")
@Tag(name = "그룹 컨트롤러", description = "그룹 관련 API")
@ApiImplicitParam(name = "id",value = "그룹ID", dataTypeClass = String.class)
@ApiOperation(value = "Delete Group")
@ApiImplicitParam(name = "id",value = "id", dataTypeClass = String.class)
public ResponseEntity<? extends BasicResponse> delete(@PathVariable String id) {
Map<String , Object> resultMap = new HashMap<String,Object>();

12
src/main/java/com/palnet/biz/api/bas/group/controller/BasGroupJoinController.java

@ -4,6 +4,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
@ -33,7 +34,7 @@ import lombok.extern.log4j.Log4j2;
@RestController
@RequiredArgsConstructor
@RequestMapping(value = "/api/bas/group/join", produces = {MediaType.APPLICATION_JSON_VALUE})
@Tag(name = "그룹 참여 컨트롤러", description = "그룹 참여 관련 API")
@Api(value = "BasGroupJoinController", tags = {"Join Group API"})
public class BasGroupJoinController {
@Autowired
@ -41,8 +42,7 @@ public class BasGroupJoinController {
@GetMapping(value = "/list")
@ApiOperation(value = "참여한 그룹 목록 조회")
@Tag(name = "그룹 참여 컨트롤러", description = "그룹 참여 관련 API")
@ApiOperation(value = "Join Group List")
public ResponseEntity<? extends BasicResponse> list(BasGroupJoinRqModel rq) {
List<BasGroupJoinModel> result = null;
@ -67,8 +67,7 @@ public class BasGroupJoinController {
@PostMapping(value = "/create")
@ApiOperation(value = "그룹 가입 요청")
@Tag(name = "그룹 참여 컨트롤러", description = "그룹 참여 관련 API")
@ApiOperation(value = "Group Request to Join")
public ResponseEntity<? extends BasicResponse> create(@RequestBody BasGroupJoinModel rq) {
Map<String , Object> resultMap = new HashMap<String,Object>();
@ -88,8 +87,7 @@ public class BasGroupJoinController {
}
@PutMapping(value = "/update")
@ApiOperation(value = "그룹 가입 승인/미승인")
@Tag(name = "그룹 참여 컨트롤러", description = "그룹 참여 관련 API")
@ApiOperation(value = "Group Join Aprov/NoAprov")
public ResponseEntity<? extends BasicResponse> update(@RequestBody BasGroupJoinModel rq) {
Map<String , Object> resultMap = new HashMap<String,Object>();

12
src/main/java/com/palnet/biz/api/bas/group/controller/BasGroupUserController.java

@ -4,6 +4,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
@ -34,7 +35,7 @@ import lombok.extern.log4j.Log4j2;
@RestController
@RequiredArgsConstructor
@RequestMapping(value = "/api/bas/group/user", produces = {MediaType.APPLICATION_JSON_VALUE})
@Tag(name = "그룹 사용자 컨트롤러", description = "그룹 사용자 관련 API")
@Api(value = "BasGroupUserController", tags = {"User Group API"})
public class BasGroupUserController {
@Autowired
@ -42,8 +43,7 @@ public class BasGroupUserController {
@GetMapping(value = "/list")
@ApiOperation(value = "그룹 사용자 조회")
@Tag(name = "그룹 사용자 컨트롤러", description = "그룹 사용자 관련 API")
@ApiOperation(value = "Group User List")
public ResponseEntity<? extends BasicResponse> list(BasGroupUserListModel rq) {
ComnPagingRs<BasGroupUserModel> result = null;
@ -68,8 +68,7 @@ public class BasGroupUserController {
@PutMapping(value = "/update")
@ApiOperation(value = "그룹 사용자 권한 수정")
@Tag(name = "그룹 사용자 컨트롤러", description = "그룹 사용자 관련 API")
@ApiOperation(value = "Group User Auth Update")
public ResponseEntity<? extends BasicResponse> update(@RequestBody BasGroupUserModel rq) {
Map<String , Object> resultMap = new HashMap<String,Object>();
@ -89,8 +88,7 @@ public class BasGroupUserController {
}
@PutMapping(value = "/delegate")
@ApiOperation(value = "MASTER 권한 위임")
@Tag(name = "그룹 사용자 컨트롤러", description = "그룹 사용자 관련 API")
@ApiOperation(value = "MASTER Auth Delegate")
public ResponseEntity<? extends BasicResponse> delegate(@RequestBody List<BasGroupUserModel> rq) {
Map<String, Object> resultMap = new HashMap<String, Object>();

11
src/main/java/com/palnet/biz/api/bas/group/service/BasGroupService.java

@ -44,15 +44,12 @@ public class BasGroupService {
public String createid() {
String groupId = "";
String groupId;
while(true) {
do {
groupId = UUID.randomUUID().toString().replaceAll("-", "").toUpperCase().substring(0, 6);
Optional<PtyGroupBas> optional = ptyGroupBasRepository.findById(groupId);
if(!optional.isPresent()) {
break;
}
}
} while (ptyGroupBasRepository.findById(groupId).isPresent());
return groupId;
}

48
src/main/java/com/palnet/biz/api/ctr/cntrl/controller/CtrCntrlController.java

@ -13,6 +13,7 @@ import java.util.*;
import com.palnet.biz.api.ctr.cntrl.model.*;
import com.palnet.biz.scheduler.ctr.model.CtrTrnsLctnModel;
import com.palnet.biz.scheduler.ctr.service.CtrTrnsLctnService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.tags.Tag;
@ -37,7 +38,7 @@ import lombok.extern.log4j.Log4j2;
@Log4j2
@RestController
@RequestMapping(value = "/api/ctr/cntrl", produces = {MediaType.APPLICATION_JSON_VALUE})
@Tag(name = "드론 관제 시스템", description = "드론 관제 관련 API")
@Api(value = "CtrCntrlController", tags = {"Drone Control System API"})
public class CtrCntrlController {
private final CtrCntrlService service;
@ -53,9 +54,8 @@ public class CtrCntrlController {
* @return
*/
@GetMapping(value = "/history/{id}")
@ApiOperation(value = "TODO 드론 관제 이력 목록 (Socket 분리 전)")
@Tag(name = "드론 관제 시스템", description = "드론 관제 관련 API")
@ApiImplicitParam(name = "id",value = "관제ID", dataTypeClass = String.class)
@ApiOperation(value = "TODO Drone Control Histroy")
@ApiImplicitParam(name = "id",value = "id", dataTypeClass = String.class)
public ResponseEntity<? extends BasicResponse> historyList(@PathVariable String id) {
List<GPHistoryModel> result = null;
@ -78,9 +78,8 @@ public class CtrCntrlController {
* @return
*/
@GetMapping(value = "/detail/{id}")
@ApiOperation(value = "TODO 드론 관제 상세 정보")
@Tag(name = "드론 관제 시스템", description = "드론 관제 관련 API")
@ApiImplicitParam(name = "id",value = "관제ID", dataTypeClass = String.class)
@ApiOperation(value = "TODO Drone Control Detail")
@ApiImplicitParam(name = "id",value = "id", dataTypeClass = String.class)
public ResponseEntity<? extends BasicResponse> detail(@PathVariable String id) {
CtrCntrlDtlModel result = null;
@ -103,9 +102,8 @@ public class CtrCntrlController {
* @return
*/
@GetMapping(value = "/history/list/{id}")
@ApiOperation(value = "TODO 드론 관제 '실시간' 이력 목록")
@Tag(name = "드론 관제 시스템", description = "드론 관제 관련 API")
@ApiImplicitParam(name = "id",value = "관제ID", dataTypeClass = String.class)
@ApiOperation(value = "TODO Drone Control 'Real-Time' History List")
@ApiImplicitParam(name = "id",value = "id", dataTypeClass = String.class)
public ResponseEntity<? extends BasicResponse> history(@PathVariable String id) {
List<GPHistoryModel> history;
@ -120,8 +118,7 @@ public class CtrCntrlController {
}
@GetMapping("/api/weather")
@ApiOperation(value = "드론 관제 날씨")
@Tag(name = "드론 관제 시스템", description = "드론 관제 관련 API")
@ApiOperation(value = "Drone Control Weather")
public ResponseEntity<? extends BasicResponse> restApiGetWeather(CtrCntrlWeatherModel rq) throws IOException, ParseException {
JSONObject jsonObject = null;
try {
@ -140,9 +137,8 @@ public class CtrCntrlController {
* @return
*/
@GetMapping("/group")
@ApiOperation(value = "TODO 비행 관제 사용자 권한 정보")
@Tag(name = "드론 관제 시스템", description = "드론 관제 관련 API")
@ApiImplicitParam(name = "cstmrSno",value = "고객일련번호", dataTypeClass = Integer.class)
@ApiOperation(value = "TODO Flight Control User Auth Info")
@ApiImplicitParam(name = "cstmrSno",value = "cstmrSno", dataTypeClass = Integer.class)
public ResponseEntity<? extends BasicResponse> findGroupAuthInfo(int cstmrSno) {
List<CtrCntrlGroupArcrftModel> list;
@ -164,9 +160,8 @@ public class CtrCntrlController {
* @return
*/
@GetMapping("/flight_plan/{idntfNum}")
@ApiOperation(value = "TODO 비행 관제 사용자 비행 계획서 정보")
@Tag(name = "드론 관제 시스템", description = "드론 관제 관련 API")
@ApiImplicitParam(name = "idtfNum",value = "식별번호", dataTypeClass = String.class)
@ApiOperation(value = "TODO Flight Control User Plan Info")
@ApiImplicitParam(name = "idtfNum",value = "idtfNum", dataTypeClass = String.class)
public ResponseEntity<? extends BasicResponse> findFlightPlan(@PathVariable("idntfNum") String idntfNum) {
List<BasFlightPlanModel> list;
@ -188,9 +183,8 @@ public class CtrCntrlController {
* @return
*/
@GetMapping(value = "/warn/detail/{id}")
@ApiOperation(value = "TODO 드론 운행 시작 후 알람 목록")
@Tag(name = "드론 관제 시스템", description = "드론 관제 관련 API")
@ApiImplicitParam(name = "id",value = "관제ID", dataTypeClass = String.class)
@ApiOperation(value = "TODO Drone Fly Start and Alarm List")
@ApiImplicitParam(name = "id",value = "id", dataTypeClass = String.class)
public ResponseEntity<? extends BasicResponse> warnDetail(@PathVariable String id){
List<CtrCntrlWarnLogModel> warnLog;
@ -211,8 +205,7 @@ public class CtrCntrlController {
* @return
*/
@PostMapping(value = "/arcrft/warn/list")
@ApiOperation(value = "TODO 기체 별 최신 비정상 로그 및 비정상 로그 전체 개수")
@Tag(name = "드론 관제 시스템", description = "드론 관제 관련 API")
@ApiOperation(value = "TODO Arcrft Warn List")
public ResponseEntity<? extends BasicResponse> arcrftWarnList(@RequestBody CtrCntrlArcrftWarnRqModel rq){
// public ResponseEntity<? extends BasicResponse> arcrftWarnList(@RequestParam("id") String id){
List<CtrCntrlArcrftWarnModel> arcrftWarnList;
@ -235,8 +228,7 @@ public class CtrCntrlController {
* @return
*/
@PostMapping("/contains")
@ApiOperation(value = "TODO 비행 관제 구역 비정상 상황 체크")
@Tag(name = "드론 관제 시스템", description = "드론 관제 관련 API")
@ApiOperation(value = "TODO Flight Control area Anomaly Check")
public ResponseEntity<? extends BasicResponse> checkPlanContains(@RequestBody CtrCntrlPlanContainsRq rq) {
CtrCntrlPlanContainsRs rs;
@ -258,8 +250,7 @@ public class CtrCntrlController {
* @return
*/
@GetMapping("/id/{id}")
@ApiOperation(value = "TODO 실시간 Control ID 발급")
@Tag(name = "드론 관제 시스템", description = "드론 관제 관련 API")
@ApiOperation(value = "TODO RealTime Control Id Issue")
public ResponseEntity<? extends BasicResponse> getId(@PathVariable String id) {
Map<String, String> result;
try {
@ -281,8 +272,7 @@ public class CtrCntrlController {
* @return
*/
@GetMapping("/warn/{id}/{lat}/{lon}")
@ApiOperation(value = "TODO 비행 관제 기체의 비정상 상황 확인")
@Tag(name = "드론 관제 시스템", description = "드론 관제 관련 API")
@ApiOperation(value = "TODO Flight Control Aircraft Warring Check")
public ResponseEntity<? extends BasicResponse> checkWarring(@PathVariable String id,
@PathVariable Double lat,
@PathVariable Double lon) {

11
src/main/java/com/palnet/biz/api/ctr/cntrl/service/CtrCntrlService.java

@ -93,6 +93,7 @@ public class CtrCntrlService {
@Value("${weather.api.key}")
private String weatherKey;
private final CtrCntrlQueryRepository query;
private final CtrCntrlBasRepository cntrlBasRepository;
private final CtrCntrlHstryRepository cntrlHstryRepository;
@ -723,9 +724,10 @@ public class CtrCntrlService {
rd = new BufferedReader(new InputStreamReader(conn.getErrorStream()));
}
StringBuilder sb = new StringBuilder();
String line;
while ((line = rd.readLine()) != null) {
String line = rd.readLine();
while (line != null) {
sb.append(line);
line = rd.readLine();
}
CtrTrnsLctnModel weatherResult = ctrTrnsLctnService.convertLatlonToAddress(rq.getNx(),rq.getNy());
log.info("weatherResult >>>> : {}", weatherResult);
@ -759,6 +761,7 @@ public class CtrCntrlService {
double OLAT = 38.0; // 기준점 위도(degree)
double XO = 43; // 기준점 X좌표(GRID)
double YO = 136; // 기1준점 Y좌표(GRID)
Double epslion = 0.0;
//
// LCC DFS 좌표변환 ( code : "TO_GRID"(위경도->좌표, lat_X:위도, lng_Y:경도), "TO_GPS"(좌표->위경도, lat_X:x, lng_Y:y) )
@ -805,10 +808,10 @@ public class CtrCntrlService {
double alat = Math.pow((re * sf / ra), (1.0 / sn));
alat = 2.0 * Math.atan(alat) - Math.PI * 0.5;
if (Math.abs(xn) <= 0.0) {
if (Math.abs(xn) <= epslion) {
theta = 0.0;
} else {
if (Math.abs(yn) <= 0.0) {
if (Math.abs(yn) <= epslion) {
theta = Math.PI * 0.5;
if (xn < 0.0) {
theta = -theta;

23
src/main/java/com/palnet/biz/api/main/dash/controller/MainDashController.java

@ -3,6 +3,7 @@ package com.palnet.biz.api.main.dash.controller;
import java.util.List;
import java.util.Map;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.tags.Tag;
@ -37,7 +38,7 @@ import lombok.extern.log4j.Log4j2;
@RestController
@RequiredArgsConstructor
@RequestMapping(value = "/api/main/dash", produces = {MediaType.APPLICATION_JSON_VALUE})
@Tag(name = "메인화면 컨트롤러", description = "메인화면 관련 API")
@Api(value = "MainDashController", tags = {"Main page API"})
public class MainDashController {
@Autowired
@ -48,9 +49,8 @@ public class MainDashController {
* @return
*/
@GetMapping(value = "/stcs/day")
@ApiOperation(value = "일 별 비행횟수 통계")
@Tag(name = "메인화면 컨트롤러", description = "메인화면 관련 API")
@ApiImplicitParam(name = "yyyymm",value = "날짜", dataTypeClass = String.class)
@ApiOperation(value = "Daily Flight Count Statistics")
@ApiImplicitParam(name = "yyyymm",value = "day", dataTypeClass = String.class)
public ResponseEntity<? extends BasicResponse> stcsDay(String yyyymm) {
List<MainDashStcsModel> result = null;
@ -83,9 +83,8 @@ public class MainDashController {
* @return
*/
@GetMapping(value = "/stcs/area")
@ApiOperation(value = "TOP5 지역 별 비행횟수 통계")
@Tag(name = "메인화면 컨트롤러", description = "메인화면 관련 API")
@ApiImplicitParam(name = "yyyymm",value = "날짜", dataTypeClass = String.class)
@ApiOperation(value = "TOP5 Flight Count Stat")
@ApiImplicitParam(name = "yyyymm",value = "day", dataTypeClass = String.class)
public ResponseEntity<? extends BasicResponse> stcsArea(String yyyymm) {
List<MainDashStcsModel> result = null;
@ -115,9 +114,8 @@ public class MainDashController {
* @return
*/
@GetMapping(value = "/group/list")
@ApiOperation(value = "본인이 생성한 그룹 정보")
@Tag(name = "메인화면 컨트롤러", description = "메인화면 관련 API")
@ApiImplicitParam(name = "cstmrSno",value = "고객일련번호", dataTypeClass = Integer.class)
@ApiOperation(value = "Group Info have User Created")
@ApiImplicitParam(name = "cstmrSno",value = "cstmrSno", dataTypeClass = Integer.class)
public ResponseEntity<? extends BasicResponse> groupList(Integer cstmrSno) {
List<Map> result = null;
@ -142,9 +140,8 @@ public class MainDashController {
@GetMapping(value = "/arcrft/list")
@ApiOperation(value = "기체 정보 리스트")
@Tag(name = "메인화면 컨트롤러", description = "메인화면 관련 API")
@ApiImplicitParam(name = "cstmrSno",value = "고객일련번호", dataTypeClass = Integer.class)
@ApiOperation(value = "Arcrft List")
@ApiImplicitParam(name = "cstmrSno",value = "cstmrSno", dataTypeClass = Integer.class)
public ResponseEntity<? extends BasicResponse> arcrftList(Integer cstmrSno) {
List<MainDashListModel> result = null;

2
src/main/java/com/palnet/biz/config/SwaggerConfig.java

@ -3,6 +3,7 @@ package com.palnet.biz.config;
import io.swagger.v3.oas.models.parameters.Parameter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
@ -23,6 +24,7 @@ import java.util.List;
@Configuration
//@EnableSwagger2
@EnableWebMvc
public class SwaggerConfig {

116
src/main/java/com/palnet/comn/encrptn/kisa/KISA_SEED_CBC.java

@ -164,8 +164,10 @@ public class KISA_SEED_CBC {
// R0, R1 : right input values at each round
// K : round keys at each round
private static final void SeedRound(int[] T, int LR[], int L0, int L1, int R0, int R1, int[] K, int K_offset) {
T[0] = LR[R0] ^ K[K_offset+0];
T[1] = LR[R1] ^ K[K_offset+1];
int offset = K_offset + 0;
int offset1 = K_offset + 1;
T[0] = LR[R0] ^ K[offset];
T[1] = LR[R1] ^ K[offset1];
T[1] ^= T[0];
T[1] = SS0[GetB0(T[1])&0x0ff] ^ SS1[GetB1(T[1])&0x0ff] ^
SS2[GetB2(T[1])&0x0ff] ^ SS3[GetB3(T[1])&0x0ff];
@ -372,12 +374,18 @@ public class KISA_SEED_CBC {
if(ENDIAN != Common.BIG_ENDIAN) {
for(i=0;i<inLen;i++)
{
data[i] = (byte)(in[i/4] >> ((i%4)*8));
int temp = in[i / 4];
int shift = (i % 4) * 8;
data[i] = (byte) (temp >> shift);
// data[i] = (byte)(in[i/4] >> ((i%4)*8));
}
} else {
for(i=0;i<inLen;i++)
{
data[i] = (byte)(in[i/4] >> ((3-(i%4))*8));
int temp = in[i / 4];
int shift = (3 - (i % 4)) * 8;
data[i] = (byte) (temp >> shift);
// data[i] = (byte)(in[i/4] >> ((3-(i%4))*8));
}
}
@ -398,7 +406,9 @@ public class KISA_SEED_CBC {
K = pInfo.seed_key.key_data; // Pointer of round keys
pInfo.encrypt = enc.value; //
Common.memcpy(pInfo.ivec, pbszIV, 16, ENDIAN);
pInfo.last_block_flag = pInfo.buffer_length = 0;
pInfo.buffer_length = 0;
// pInfo.last_block_flag = pInfo.buffer_length = 0;
pInfo.last_block_flag = pInfo.buffer_length;
// Set up input values for Key Schedule
ABCD[ABCD_A] = Common.byte_to_int(pbszUserKey, 0*4, ENDIAN);
@ -736,11 +746,23 @@ public class KISA_SEED_CBC {
public KISA_SEED_INFO() {
encrypt = 0;
ivec[0] = ivec[1] = ivec[2] = ivec[3] = 0;
ivec[3] = 0;
ivec[2] = ivec[3];
ivec[1] = ivec[2];
ivec[0] = ivec[1];
// ivec[0] = ivec[1] = ivec[2] = ivec[3] = 0;
seed_key.init();
cbc_buffer[0] = cbc_buffer[1] = cbc_buffer[2] = cbc_buffer[3] = 0;
cbc_buffer[3] = 0;
cbc_buffer[2] = cbc_buffer[3];
cbc_buffer[1] = cbc_buffer[2];
cbc_buffer[0] = cbc_buffer[1];
// cbc_buffer[0] = cbc_buffer[1] = cbc_buffer[2] = cbc_buffer[3] = 0;
buffer_length = 0;
cbc_last_block[0] = cbc_last_block[1] = cbc_last_block[2] = cbc_last_block[3] = 0;
cbc_last_block[3] = 0;
cbc_last_block[2] = cbc_last_block[3];
cbc_last_block[1] = cbc_last_block[2];
cbc_last_block[0] = cbc_last_block[1];
// cbc_last_block[0] = cbc_last_block[1] = cbc_last_block[2] = cbc_last_block[3] = 0;
last_block_flag = 0;
}
@ -800,13 +822,21 @@ public class KISA_SEED_CBC {
int mask_value = 0x0ff << shift_value;
int mask_value2 = ~mask_value;
int value2 = (value&0x0ff) << shift_value;
dst[b_offset/4] = (dst[b_offset/4] & mask_value2) | (value2 & mask_value);
int dstValue = dst[b_offset / 4];
dstValue = (dstValue & mask_value2) | (value2 & mask_value);
dst[b_offset / 4] = dstValue;
// dst[b_offset/4] = (dst[b_offset/4] & mask_value2) | (value2 & mask_value);
} else {
int shift_value = (b_offset%4)*8;
int mask_value = 0x0ff << shift_value;
int mask_value2 = ~mask_value;
int value2 = (value&0x0ff) << shift_value;
dst[b_offset/4] = (dst[b_offset/4] & mask_value2) | (value2 & mask_value);
int dstValue = dst[b_offset / 4];
dstValue = (dstValue & mask_value2) | (value2 & mask_value);
dst[b_offset / 4] = dstValue;
// dst[b_offset/4] = (dst[b_offset/4] & mask_value2) | (value2 & mask_value);
}
}
@ -814,12 +844,18 @@ public class KISA_SEED_CBC {
if(ENDIAN == BIG_ENDIAN) {
int shift_value = (3-b_offset%4)*8;
int mask_value = 0x0ff << shift_value;
int value = (src[b_offset/4] & mask_value) >> shift_value;
int mask_value2 = src[b_offset/4];
int value2 = mask_value2 & mask_value;
int value = value2 >> shift_value;
// int value = (src[b_offset/4] & mask_value) >> shift_value;
return (byte)value;
} else {
int shift_value = (b_offset%4)*8;
int mask_value = 0x0ff << shift_value;
int value = (src[b_offset/4] & mask_value) >> shift_value;
int mask_value2 = src[b_offset/4];
int value2 = mask_value2 & mask_value;
int value = value2 >> shift_value;
// int value = (src[b_offset/4] & mask_value) >> shift_value;
return (byte)value;
}
@ -836,10 +872,13 @@ public class KISA_SEED_CBC {
}
public static void byte_to_int(int[] dst, int dst_offset, byte[] src, int src_offset, int ENDIAN) {
int offset1 = src_offset + 1;
int offset2 = src_offset + 2;
int offset3 = src_offset + 3;
if(ENDIAN == BIG_ENDIAN) {
dst[dst_offset] = ((0x0ff&src[src_offset]) << 24) | ((0x0ff&src[src_offset+1]) << 16) | ((0x0ff&src[src_offset+2]) << 8) | ((0x0ff&src[src_offset+3]));
dst[dst_offset] = ((0x0ff&src[src_offset]) << 24) | ((0x0ff&src[offset1]) << 16) | ((0x0ff&src[offset2]) << 8) | ((0x0ff&src[offset3]));
} else {
dst[dst_offset] = ((0x0ff&src[src_offset])) | ((0x0ff&src[src_offset+1]) << 8) | ((0x0ff&src[src_offset+2]) << 16) | ((0x0ff&src[src_offset+3]) << 24);
dst[dst_offset] = ((0x0ff&src[src_offset])) | ((0x0ff&src[offset1]) << 8) | ((0x0ff&src[offset2]) << 16) | ((0x0ff&src[offset3]) << 24);
}
}
@ -887,7 +926,8 @@ public class KISA_SEED_CBC {
if(n >= 32)
return 0;
int v = x >> n;
int v_mask = ~(0x80000000 >> (n-1));
int shift = n - 1;
int v_mask = ~(0x80000000 >> shift);
return v & v_mask;
}
@ -940,7 +980,9 @@ public class KISA_SEED_CBC {
K = pInfo.seed_key.key_data; // Pointer of round keys
pInfo.encrypt = enc.value; //
Common.memcpy(pInfo.ivec, pbszIV, 16, ENDIAN);
pInfo.last_block_flag = pInfo.buffer_length = 0;
pInfo.buffer_length = 0;
// pInfo.last_block_flag = pInfo.buffer_length = 0;
pInfo.last_block_flag = pInfo.buffer_length;
// Set up input values for Key Schedule
ABCD[ABCD_A] = Common.byte_to_int(pbszUserKey, 0*4, ENDIAN);
@ -1042,10 +1084,10 @@ public class KISA_SEED_CBC {
byte[] defaultCipherText = SEED_CBC_Encrypt(pbUserKey, bszIV, pbData, 0, PLAINTEXT_LENGTH);
byte[] PPPPP = SEED_CBC_Decrypt(pbUserKey, bszIV, defaultCipherText, 0, CIPHERTEXT_LENGTH);
// byte[] defaultCipherText = SEED_CBC_Encrypt(pbUserKey, bszIV, pbData, 0, PLAINTEXT_LENGTH);
//
//
// byte[] PPPPP = SEED_CBC_Decrypt(pbUserKey, bszIV, defaultCipherText, 0, CIPHERTEXT_LENGTH);
//System.out.print("\nIV\t\t\t\t: ");
@ -1064,9 +1106,9 @@ public class KISA_SEED_CBC {
//System.out.print("\n\n");
byte[] Cipher1 = SEED_CBC_Encrypt(pbUserKey, bszIV, pbData1,0, 2);
byte[] Plain1 = SEED_CBC_Decrypt(pbUserKey, bszIV, Cipher1, 0, 16);
// byte[] Cipher1 = SEED_CBC_Encrypt(pbUserKey, bszIV, pbData1,0, 2);
//
// byte[] Plain1 = SEED_CBC_Decrypt(pbUserKey, bszIV, Cipher1, 0, 16);
//System.out.print("IV\t\t\t\t: ");
//for (int i=0; i<16; i++)
@ -1084,9 +1126,9 @@ public class KISA_SEED_CBC {
//System.out.print("\n\n");
byte[] Cipher2 = SEED_CBC_Encrypt(pbUserKey, bszIV, pbData2,0, 16);
byte[] Plain2 = SEED_CBC_Decrypt(pbUserKey, bszIV, Cipher2, 0, 32);
// byte[] Cipher2 = SEED_CBC_Encrypt(pbUserKey, bszIV, pbData2,0, 16);
//
// byte[] Plain2 = SEED_CBC_Decrypt(pbUserKey, bszIV, Cipher2, 0, 32);
//System.out.print("IV\t\t\t\t: ");
//for (int i=0; i<16; i++)
@ -1106,9 +1148,9 @@ public class KISA_SEED_CBC {
byte[] Cipher3 = SEED_CBC_Encrypt(pbUserKey, bszIV, pbData3, 0, 18);
byte[] Plain3 = SEED_CBC_Decrypt(pbUserKey, bszIV, Cipher3, 0, 32);
// byte[] Cipher3 = SEED_CBC_Encrypt(pbUserKey, bszIV, pbData3, 0, 18);
//
// byte[] Plain3 = SEED_CBC_Decrypt(pbUserKey, bszIV, Cipher3, 0, 32);
// System.out.print("IV\t\t\t\t: ");
// for (int i=0; i<16; i++)
@ -1190,7 +1232,7 @@ public class KISA_SEED_CBC {
int[] outbuf = new int[process_blockLeng/4];
for(j=0; j<PLAINTEXT_LENGTH-process_blockLeng; )
for(j=0; j<PLAINTEXT_LENGTH-process_blockLeng; j += process_blockLeng)
{
System.arraycopy(pbData, j, newpbszPlainText, 0, process_blockLeng);
data = chartoint32_for_SEED_CBC(newpbszPlainText, process_blockLeng);
@ -1275,7 +1317,7 @@ public class KISA_SEED_CBC {
byte []pbszPlainText = new byte[nCipherTextLen];
for(j=0; j<nCipherTextLen - process_blockLeng; )
for(j=0; j<nCipherTextLen - process_blockLeng; j+= process_blockLeng)
{
System.arraycopy(message, j, newpbszCipherText, 0, process_blockLeng);
data = chartoint32_for_SEED_CBC(newpbszCipherText, process_blockLeng);
@ -1377,7 +1419,7 @@ public class KISA_SEED_CBC {
outbuf = new int[process_blockLeng/4];
pbszPlainText = new byte[process_blockLeng];
for(j=0; j<PLAINTEXT_LENGTH-process_blockLeng; )
for(j=0; j<PLAINTEXT_LENGTH-process_blockLeng; j+= process_blockLeng)
{
System.arraycopy(pbData1, j, newpbszPlainText, 0, process_blockLeng);
data = chartoint32_for_SEED_CBC(newpbszPlainText, process_blockLeng);
@ -1466,7 +1508,7 @@ public class KISA_SEED_CBC {
pbszPlainText = new byte[nCipherTextLen];
for(j=0; j<nCipherTextLen - process_blockLeng; )
for(j=0; j<nCipherTextLen - process_blockLeng; j+= process_blockLeng)
{
System.arraycopy(message, j, newpbszCipherText, 0, process_blockLeng);
data = chartoint32_for_SEED_CBC(newpbszCipherText, process_blockLeng);
@ -1553,7 +1595,7 @@ public class KISA_SEED_CBC {
outbuf = new int[process_blockLeng/4];
pbszPlainText = new byte[process_blockLeng];
for(j=0; j<PLAINTEXT_LENGTH-process_blockLeng; )
for(j=0; j<PLAINTEXT_LENGTH-process_blockLeng; j+= process_blockLeng)
{
System.arraycopy(pbData2, j, newpbszPlainText, 0, process_blockLeng);
data = chartoint32_for_SEED_CBC(newpbszPlainText, process_blockLeng);
@ -1641,7 +1683,7 @@ public class KISA_SEED_CBC {
pbszPlainText = new byte[nCipherTextLen];
for(j=0; j<nCipherTextLen - process_blockLeng; )
for(j=0; j<nCipherTextLen - process_blockLeng; j+= process_blockLeng)
{
System.arraycopy(message, j, newpbszCipherText, 0, process_blockLeng);
data = chartoint32_for_SEED_CBC(newpbszCipherText, process_blockLeng);
@ -1730,7 +1772,7 @@ public class KISA_SEED_CBC {
outbuf = new int[process_blockLeng/4];
pbszPlainText = new byte[process_blockLeng];
for(j=0; j<PLAINTEXT_LENGTH-process_blockLeng; )
for(j=0; j<PLAINTEXT_LENGTH-process_blockLeng; j+= process_blockLeng)
{
System.arraycopy(pbData3, j, newpbszPlainText, 0, process_blockLeng);
data = chartoint32_for_SEED_CBC(newpbszPlainText, process_blockLeng);
@ -1819,7 +1861,7 @@ public class KISA_SEED_CBC {
pbszPlainText = new byte[nCipherTextLen];
for(j=0; j<nCipherTextLen - process_blockLeng; )
for(j=0; j<nCipherTextLen - process_blockLeng; j+= process_blockLeng)
{
System.arraycopy(message, j, newpbszCipherText, 0, process_blockLeng);
data = chartoint32_for_SEED_CBC(newpbszCipherText, process_blockLeng);

39
src/main/java/com/palnet/comn/encrptn/kisa/KISA_SHA256.java

@ -136,7 +136,9 @@ public class KISA_SHA256 {
Info.uChainVar[6] = 0x1f83d9ab;
Info.uChainVar[7] = 0x5be0cd19;
Info.uHighLength = Info.uLowLength = 0;
Info.uLowLength = 0;
Info.uHighLength = Info.uLowLength;
// Info.uHighLength = Info.uLowLength = 0;
}
/**
@ -148,7 +150,8 @@ public class KISA_SHA256 {
public static void SHA256_Process( SHA256_INFO Info, byte[] pszMessage, int uDataLen ) {
int pszMessage_offset;
if((Info.uLowLength += (uDataLen << 3)) < 0) {
Info.uLowLength += (uDataLen <<3);
if(Info.uLowLength < 0) {
Info.uHighLength++;
}
@ -269,13 +272,21 @@ public class KISA_SHA256 {
int mask_value = 0x0ff << shift_value;
int mask_value2 = ~mask_value;
int value2 = (value&0x0ff) << shift_value;
dst[b_offset/4] = (dst[b_offset/4] & mask_value2) | (value2 & mask_value);
int dstValue = dst[b_offset / 4];
dstValue = (dstValue & mask_value2) | (value2 & mask_value);
dst[b_offset / 4] = dstValue;
// dst[b_offset/4] = (dst[b_offset/4] & mask_value2) | (value2 & mask_value);
} else {
int shift_value = (b_offset%4)*8;
int mask_value = 0x0ff << shift_value;
int mask_value2 = ~mask_value;
int value2 = (value&0x0ff) << shift_value;
dst[b_offset/4] = (dst[b_offset/4] & mask_value2) | (value2 & mask_value);
int dstValue = dst[b_offset / 4];
dstValue = (dstValue & mask_value2) | (value2 & mask_value);
dst[b_offset / 4] = dstValue;
// dst[b_offset/4] = (dst[b_offset/4] & mask_value2) | (value2 & mask_value);
}
}
@ -283,12 +294,18 @@ public class KISA_SHA256 {
if(ENDIAN == BIG_ENDIAN) {
int shift_value = (3-b_offset%4)*8;
int mask_value = 0x0ff << shift_value;
int value = (src[b_offset/4] & mask_value) >> shift_value;
int mask_value2 = src[b_offset/4];
int value2 = mask_value2 & mask_value;
int value = value2 >> shift_value;
// int value = (src[b_offset/4] & mask_value) >> shift_value;
return (byte)value;
} else {
int shift_value = (b_offset%4)*8;
int mask_value = 0x0ff << shift_value;
int value = (src[b_offset/4] & mask_value) >> shift_value;
int mask_value2 = src[b_offset/4];
int value2 = mask_value2 & mask_value;
int value = value2 >> shift_value;
// int value = (src[b_offset/4] & mask_value) >> shift_value;
return (byte)value;
}
@ -305,10 +322,13 @@ public class KISA_SHA256 {
}
public static void byte_to_int(int[] dst, int dst_offset, byte[] src, int src_offset, int ENDIAN) {
int offset1 = src_offset + 1;
int offset2 = src_offset + 2;
int offset3 = src_offset + 3;
if(ENDIAN == BIG_ENDIAN) {
dst[dst_offset] = ((0x0ff&src[src_offset]) << 24) | ((0x0ff&src[src_offset+1]) << 16) | ((0x0ff&src[src_offset+2]) << 8) | ((0x0ff&src[src_offset+3]));
dst[dst_offset] = ((0x0ff&src[src_offset]) << 24) | ((0x0ff&src[offset1]) << 16) | ((0x0ff&src[offset2]) << 8) | ((0x0ff&src[offset3]));
} else {
dst[dst_offset] = ((0x0ff&src[src_offset])) | ((0x0ff&src[src_offset+1]) << 8) | ((0x0ff&src[src_offset+2]) << 16) | ((0x0ff&src[src_offset+3]) << 24);
dst[dst_offset] = ((0x0ff&src[src_offset])) | ((0x0ff&src[offset1]) << 8) | ((0x0ff&src[offset2]) << 16) | ((0x0ff&src[offset3]) << 24);
}
}
@ -356,7 +376,8 @@ public class KISA_SHA256 {
if(n >= 32)
return 0;
int v = x >> n;
int v_mask = ~(0x80000000 >> (n-1));
int shift = n - 1;
int v_mask = ~(0x80000000 >> shift);
return v & v_mask;
}

9
src/main/java/com/palnet/comn/utils/EncryptUtils.java

@ -40,24 +40,25 @@ public class EncryptUtils {
/* (1) 시작 시간 측정 */
long startTimeLong = getCurrentTimeLong();
/*test*/// System.out.println( "startTimeLong : " + startTimeLong );
/*test*///
System.out.println( "startTimeLong : " + startTimeLong );
/*************************************
* 암호화
*************************************/
String encryptData = encrypt(plainText);
// System.out.println("encrypt:" + encryptData);
System.out.println("encrypt:" + encryptData);
/*************************************
* 복호화
*************************************/
plainText = decrypt(encryptData);
// System.out.println("decrypt:" + plainText);
System.out.println("decrypt:" + plainText);
String sha256 = sha256Encrypt(plainText);
// System.out.println("sha256:" + sha256);
System.out.println("sha256:" + sha256);

11
src/main/java/com/palnet/comn/utils/HttpUtils.java

@ -57,10 +57,10 @@ public class HttpUtils {
response.setHeader ("Content-Length", ""+file.length() );
outStream = response.getOutputStream();
byte b[] = new byte[(int)file.length()];
int leng = 0;
while( (leng = inputStream.read(b)) > 0 ){
int leng = inputStream.read(b);
while(leng > 0 ){
outStream.write(b,0,leng);
leng = inputStream.read(b);
}
} catch (Exception e) {
@ -182,9 +182,10 @@ public class HttpUtils {
if (respCd == HttpStatus.SC_OK) {
br = new BufferedReader(new InputStreamReader(method.getResponseBodyAsStream()));
String readLine;
while (((readLine = br.readLine()) != null)) {
String readLine = br.readLine();
while (readLine != null) {
log.info(readLine);
readLine = br.readLine();
}
} else {
log.error("respCd: {}", respCd);

20
src/main/java/com/palnet/comn/utils/LocationUtils.java

@ -47,16 +47,16 @@ public class LocationUtils {
public static void main(String[] args) {
// 마일(Mile) 단위
double distanceMile =
distance(37.504198, 127.047967, 37.501025, 127.037701, "");
// 미터(Meter) 단위
double distanceMeter =
distance(37.504198, 127.047967, 37.501025, 127.037701, "meter");
// 킬로미터(Kilo Meter) 단위
double distanceKiloMeter =
distance(37.504198, 127.047967, 37.501025, 127.037701, "kilometer");
// double distanceMile =
// distance(37.504198, 127.047967, 37.501025, 127.037701, "");
//
// // 미터(Meter) 단위
// double distanceMeter =
// distance(37.504198, 127.047967, 37.501025, 127.037701, "meter");
//
// // 킬로미터(Kilo Meter) 단위
// double distanceKiloMeter =
// distance(37.504198, 127.047967, 37.501025, 127.037701, "kilometer");
// System.out.println(distanceMile) ;
// System.out.println(distanceMeter) ;

20
src/main/java/com/palnet/server/command/TempUtils.java

@ -29,31 +29,41 @@ public class TempUtils{
// 일산화탄소
prev = SensorModel.preCo;
SensorModel.preCo = SensorModel.co;
result = SensorModel.co = gradualDoubleData(SensorModel.co, prev, 0.1, 0.0, 20.0);
SensorModel.co = gradualDoubleData(SensorModel.co, prev, 0.1, 0.0, 20.0);
// result = SensorModel.co = gradualDoubleData(SensorModel.co, prev, 0.1, 0.0, 20.0);
result = SensorModel.co;
break;
case "so2":
// 아황산가스
prev = SensorModel.preSo2;
SensorModel.preSo2 = SensorModel.so2;
result = SensorModel.so2 = gradualDoubleData(SensorModel.so2, prev, 0.005, 0.0, 0.2);
SensorModel.so2 = gradualDoubleData(SensorModel.so2, prev, 0.005, 0.0, 0.2);
// result = SensorModel.so2 = gradualDoubleData(SensorModel.so2, prev, 0.005, 0.0, 0.2);
result = SensorModel.so2;
break;
case "no2":
// 이산화질소
prev = SensorModel.preNo2;
SensorModel.preNo2 = SensorModel.no2;
result = SensorModel.no2 = gradualDoubleData(SensorModel.no2, prev, 0.003, 0.0, 0.3);
SensorModel.no2 = gradualDoubleData(SensorModel.no2, prev, 0.003, 0.0, 0.3);
// result = SensorModel.no2 = gradualDoubleData(SensorModel.no2, prev, 0.003, 0.0, 0.3);
result = SensorModel.no2;
break;
case "o3":
// 오존
prev = SensorModel.preO3;
SensorModel.preO3 = SensorModel.o3;
result = SensorModel.o3 = gradualDoubleData(SensorModel.o3, prev, 1.0, 0.0, 175.0);
SensorModel.o3 = gradualDoubleData(SensorModel.o3, prev, 1.0, 0.0, 175.0);
// result = SensorModel.o3 = gradualDoubleData(SensorModel.o3, prev, 1.0, 0.0, 175.0);
result = SensorModel.o3;
break;
case "dust":
// 미세먼지
prev = SensorModel.preDust;
SensorModel.preDust = SensorModel.dust;
result = SensorModel.dust = gradualDoubleData(SensorModel.dust, prev, 1.1, 0.0, 175.0);
SensorModel.dust = gradualDoubleData(SensorModel.dust, prev, 1.1, 0.0, 175.0);
// result = SensorModel.dust = gradualDoubleData(SensorModel.dust, prev, 1.1, 0.0, 175.0);
result = SensorModel.dust;
break;
default:
result = (Math.round((new Random()).nextDouble() * 100000)) / 100.0;

4
src/main/java/com/palnet/server/task/ctr/service/CtrCntrlTaskService.java

@ -20,8 +20,8 @@ import com.palnet.comn.model.GPModel;
@Service
public class CtrCntrlTaskService {
GPCollection cic = new GPCollection();
GPDatabaseCollection gpdc = new GPDatabaseCollection();
// GPCollection cic = new GPCollection();
// GPDatabaseCollection gpdc = new GPDatabaseCollection();

2
src/main/resources/application.properties

@ -14,7 +14,7 @@ naver.api.url=https://naveropenapi.apigw.ntruss.com/map-reversegeocode/v2/gc
spring.jwt.secret=jwtsecretkey
spring.jwt.prefix=palnet
## Weather key ####
### Weather key ####
weather.api.url = http://apis.data.go.kr/1360000/VilageFcstInfoService_2.0/getVilageFcst
weather.api.key = =r6RMUsk3Vtama7D6uq7MiWV9dTC9MwfIIr4%2F45y0uVNw6BaYbgpKmL%2BLUDFVTfIYUmEe4K%2FaniEjdV9mg5t82Q%3D%3D

Loading…
Cancel
Save