spotlessApply 적용
This commit is contained in:
@@ -1,14 +1,11 @@
|
||||
package com.kamco.cd.kamcoback.Innopam.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
public class ChngDetectMastDto {
|
||||
|
||||
@@ -77,8 +74,6 @@ public class ChngDetectMastDto {
|
||||
private String reqIp; // 사원아이피
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@@ -111,7 +106,6 @@ public class ChngDetectMastDto {
|
||||
private String reqIp; // 요청사원아이피
|
||||
}
|
||||
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@@ -126,7 +120,6 @@ public class ChngDetectMastDto {
|
||||
private String chnDtctObjtId; // 탐지객체아이디. UUID를 기반으로 '-'를 제거하고 대문자/숫자로 구성
|
||||
private String reqEpno; // 사원번호
|
||||
private String reqIp;
|
||||
|
||||
}
|
||||
|
||||
@Getter
|
||||
@@ -140,7 +133,6 @@ public class ChngDetectMastDto {
|
||||
private String chnDtctSno;
|
||||
}
|
||||
|
||||
|
||||
@Schema(name = "ResReturn", description = "수행 후 리턴")
|
||||
@Getter
|
||||
@Setter
|
||||
@@ -151,5 +143,4 @@ public class ChngDetectMastDto {
|
||||
private String flag;
|
||||
private String message;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,49 +1,20 @@
|
||||
package com.kamco.cd.kamcoback.Innopam.service;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonFactory;
|
||||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.core.JsonToken;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.kamco.cd.kamcoback.Innopam.dto.ChngDetectMastDto;
|
||||
import com.kamco.cd.kamcoback.Innopam.dto.ChngDetectMastDto.ChngDetectMastSearchDto;
|
||||
import com.kamco.cd.kamcoback.Innopam.dto.ChngDetectMastDto.ResReturn;
|
||||
import com.kamco.cd.kamcoback.Innopam.dto.DetectMastDto;
|
||||
import com.kamco.cd.kamcoback.Innopam.dto.DetectMastDto.Basic;
|
||||
import com.kamco.cd.kamcoback.Innopam.dto.DetectMastDto.DetectMastReq;
|
||||
import com.kamco.cd.kamcoback.Innopam.dto.DetectMastDto.DetectMastSearch;
|
||||
import com.kamco.cd.kamcoback.Innopam.dto.DetectMastDto.FeaturePnuDto;
|
||||
import com.kamco.cd.kamcoback.Innopam.postgres.core.DetectMastCoreService;
|
||||
import com.kamco.cd.kamcoback.common.utils.NetUtils;
|
||||
import com.kamco.cd.kamcoback.common.utils.UserUtil;
|
||||
import com.kamco.cd.kamcoback.config.api.ApiResponseDto;
|
||||
import com.kamco.cd.kamcoback.config.resttemplate.ExternalHttpClient;
|
||||
import com.kamco.cd.kamcoback.config.resttemplate.ExternalHttpClient.ExternalCallResult;
|
||||
import com.kamco.cd.kamcoback.mapsheet.dto.MapSheetMngDto.DmlReturn;
|
||||
import java.io.InputStream;
|
||||
import java.net.InetAddress;
|
||||
import java.net.URLEncoder;
|
||||
import java.net.UnknownHostException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.ThreadLocalRandom;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.HttpMethod;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.util.UriComponentsBuilder;
|
||||
|
||||
@Service
|
||||
@Transactional(readOnly = true)
|
||||
@@ -59,7 +30,6 @@ public class InnopamApiService {
|
||||
@Value("${innopam.mast}")
|
||||
private String innopamMastUrl;
|
||||
|
||||
|
||||
private final DetectMastCoreService detectMastCoreService;
|
||||
|
||||
private final ExternalHttpClient externalHttpClient;
|
||||
@@ -83,7 +53,8 @@ public class InnopamApiService {
|
||||
System.out.println("url == " + myip);
|
||||
|
||||
ExternalCallResult<String> result =
|
||||
externalHttpClient.call(url, HttpMethod.POST, chnDetectMastReq, netUtils.jsonHeaders(), String.class);
|
||||
externalHttpClient.call(
|
||||
url, HttpMethod.POST, chnDetectMastReq, netUtils.jsonHeaders(), String.class);
|
||||
|
||||
System.out.println("result == " + result);
|
||||
|
||||
@@ -104,7 +75,8 @@ public class InnopamApiService {
|
||||
System.out.println("url == " + myip);
|
||||
|
||||
ExternalCallResult<String> result =
|
||||
externalHttpClient.call(url, HttpMethod.POST, chnDetectMastReq, netUtils.jsonHeaders(), String.class);
|
||||
externalHttpClient.call(
|
||||
url, HttpMethod.POST, chnDetectMastReq, netUtils.jsonHeaders(), String.class);
|
||||
|
||||
System.out.println("result == " + result);
|
||||
|
||||
@@ -125,10 +97,4 @@ public class InnopamApiService {
|
||||
|
||||
return masterList;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -7,9 +7,7 @@ import java.net.UnknownHostException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
import org.mindrot.jbcrypt.BCrypt;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.MediaType;
|
||||
|
||||
@@ -30,15 +28,18 @@ public class NetUtils {
|
||||
return ip;
|
||||
}
|
||||
|
||||
|
||||
public String dtoToQueryString(Object dto, String queryString) {
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
|
||||
Map<String, Object> map = objectMapper.convertValue(dto, Map.class);
|
||||
|
||||
String qStr = map.entrySet().stream()
|
||||
String qStr =
|
||||
map.entrySet().stream()
|
||||
.filter(entry -> entry.getValue() != null) // null 제외
|
||||
.map(entry -> String.format("%s=%s",
|
||||
.map(
|
||||
entry ->
|
||||
String.format(
|
||||
"%s=%s",
|
||||
entry.getKey(),
|
||||
URLEncoder.encode(entry.getValue().toString(), StandardCharsets.UTF_8)))
|
||||
.collect(Collectors.joining("&"));
|
||||
@@ -60,5 +61,4 @@ public class NetUtils {
|
||||
|
||||
return headers;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -204,80 +204,6 @@ public class InferenceResultApiController {
|
||||
return ApiResponseDto.ok(result);
|
||||
}
|
||||
|
||||
// @ApiResponses(
|
||||
// value = {
|
||||
// @ApiResponse(
|
||||
// responseCode = "200",
|
||||
// description = "검색 성공",
|
||||
// content =
|
||||
// @Content(
|
||||
// mediaType = "application/json",
|
||||
// schema = @Schema(implementation = InferenceDetailDto.AnalResSummary.class))),
|
||||
// @ApiResponse(responseCode = "400", description = "잘못된 검색 조건", content = @Content),
|
||||
// @ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||
// })
|
||||
// @GetMapping("/summary/{id}")
|
||||
// public ApiResponseDto<InferenceDetailDto.AnalResSummary> getInferenceResultSummary(
|
||||
// @Parameter(description = "목록 id", example = "53") @PathVariable Long id) {
|
||||
// return ApiResponseDto.ok(inferenceResultService.getInferenceResultSummary(id));
|
||||
// }
|
||||
//
|
||||
// @Operation(summary = "추론관리 분석결과 상세", description = "분석결과 상제 정보 Summary, DashBoard")
|
||||
// @ApiResponses(
|
||||
// value = {
|
||||
// @ApiResponse(
|
||||
// responseCode = "200",
|
||||
// description = "검색 성공",
|
||||
// content =
|
||||
// @Content(
|
||||
// mediaType = "application/json",
|
||||
// schema = @Schema(implementation = InferenceDetailDto.Detail.class))),
|
||||
// @ApiResponse(responseCode = "400", description = "잘못된 검색 조건", content = @Content),
|
||||
// @ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||
// })
|
||||
// @GetMapping("/detail/{id}")
|
||||
// public ApiResponseDto<InferenceDetailDto.Detail> getInferenceDetail(
|
||||
// @Parameter(description = "목록 id", example = "53") @PathVariable Long id) {
|
||||
// return ApiResponseDto.ok(inferenceResultService.getDetail(id));
|
||||
// }
|
||||
//
|
||||
// @Operation(summary = "추론관리 분석결과 상세 목록", description = "추론관리 분석결과 상세 목록 geojson 데이터 조회")
|
||||
// @ApiResponses(
|
||||
// value = {
|
||||
// @ApiResponse(
|
||||
// responseCode = "200",
|
||||
// description = "검색 성공",
|
||||
// content =
|
||||
// @Content(
|
||||
// mediaType = "application/json",
|
||||
// schema = @Schema(implementation = Page.class))),
|
||||
// @ApiResponse(responseCode = "400", description = "잘못된 검색 조건", content = @Content),
|
||||
// @ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||
// })
|
||||
// @GetMapping("/geom/{id}")
|
||||
// public ApiResponseDto<Page<InferenceDetailDto.Geom>> getInferenceResultGeomList(
|
||||
// @Parameter(description = "분석결과 id", example = "53") @PathVariable Long id,
|
||||
// @Parameter(description = "기준년도 분류", example = "land") @RequestParam(required = false)
|
||||
// String targetClass,
|
||||
// @Parameter(description = "비교년도 분류", example = "waste") @RequestParam(required = false)
|
||||
// String compareClass,
|
||||
// @Parameter(description = "5000:1 도협번호 37801011,37801012") @RequestParam(required = false)
|
||||
// List<Long> mapSheetNum,
|
||||
// @Parameter(description = "페이지 번호 (0부터 시작)", example = "0") @RequestParam(defaultValue = "0")
|
||||
// int page,
|
||||
// @Parameter(description = "페이지 크기", example = "20") @RequestParam(defaultValue = "20")
|
||||
// int size,
|
||||
// @Parameter(description = "정렬 조건 (형식: 필드명,방향)", example = "name,asc")
|
||||
// @RequestParam(required = false)
|
||||
// String sort) {
|
||||
// InferenceDetailDto.SearchGeoReq searchGeoReq =
|
||||
// new InferenceDetailDto.SearchGeoReq(
|
||||
// targetClass, compareClass, mapSheetNum, page, size, sort);
|
||||
// Page<InferenceDetailDto.Geom> geomList =
|
||||
// inferenceResultService.getInferenceResultGeomList(id, searchGeoReq);
|
||||
// return ApiResponseDto.ok(geomList);
|
||||
// }
|
||||
|
||||
@Operation(summary = "추론관리 추론진행 서버 현황", description = "추론관리 추론진행 서버 현황")
|
||||
@ApiResponses(
|
||||
value = {
|
||||
|
||||
@@ -308,16 +308,16 @@ public class InferenceDetailDto {
|
||||
String mapSheetName;
|
||||
String subUid;
|
||||
String pnu;
|
||||
String passYn;
|
||||
String fitState;
|
||||
|
||||
@JsonProperty("passYn")
|
||||
public String getPassYn() {
|
||||
return this.passYn == null ? null : this.passYn;
|
||||
@JsonProperty("fitState")
|
||||
public String getFitState() {
|
||||
return this.fitState == null ? null : this.fitState;
|
||||
}
|
||||
|
||||
@JsonProperty("passYnName")
|
||||
public String getPassYnName() {
|
||||
return ImageryFitStatus.getDescByCode(this.passYn);
|
||||
@JsonProperty("fitStateName")
|
||||
public String fitStateName() {
|
||||
return ImageryFitStatus.getDescByCode(this.fitState);
|
||||
}
|
||||
|
||||
// @JsonIgnore String gemoStr;
|
||||
@@ -339,7 +339,7 @@ public class InferenceDetailDto {
|
||||
String mapSheetName,
|
||||
String subUid,
|
||||
String pnu,
|
||||
String passYn) {
|
||||
String fitState) {
|
||||
this.uuid = uuid;
|
||||
this.uid = uid;
|
||||
this.compareYyyy = compareYyyy;
|
||||
@@ -355,7 +355,7 @@ public class InferenceDetailDto {
|
||||
this.mapSheetName = mapSheetName;
|
||||
this.subUid = subUid;
|
||||
this.pnu = pnu;
|
||||
this.passYn = passYn;
|
||||
this.fitState = fitState;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -90,7 +90,6 @@ public class MapSheetAnalDataInferenceGeomEntity {
|
||||
private Long pnu;
|
||||
|
||||
@Size(max = 20)
|
||||
@ColumnDefault("'0'")
|
||||
@Column(name = "fit_state", length = 20)
|
||||
private String fitState;
|
||||
|
||||
@@ -150,12 +149,6 @@ public class MapSheetAnalDataInferenceGeomEntity {
|
||||
@Column(name = "file_created_dttm")
|
||||
private ZonedDateTime fileCreatedDttm;
|
||||
|
||||
@Column(name = "pass_yn")
|
||||
private String passYn;
|
||||
|
||||
@Column(name = "pass_yn_dttm")
|
||||
private ZonedDateTime passYnDttm;
|
||||
|
||||
@Column(name = "result_uid")
|
||||
private String resultUid;
|
||||
|
||||
|
||||
@@ -446,7 +446,7 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
|
||||
"substring({0} from 1 for 8)",
|
||||
mapSheetAnalDataInferenceGeomEntity.resultUid),
|
||||
pnu,
|
||||
mapSheetAnalDataInferenceGeomEntity.passYn))
|
||||
mapSheetAnalDataInferenceGeomEntity.fitState))
|
||||
.from(mapSheetAnalInferenceEntity)
|
||||
.join(mapSheetAnalDataInferenceEntity)
|
||||
.on(mapSheetAnalDataInferenceEntity.analUid.eq(mapSheetAnalInferenceEntity.id))
|
||||
|
||||
@@ -63,3 +63,7 @@ inference:
|
||||
geojson-dir: /kamco-nfs/requests/
|
||||
jar-path: /kamco-nfs/dataset/shp_exporter-1.0.0.jar
|
||||
|
||||
innopam:
|
||||
#url: http://localhost:8080
|
||||
url: http://192.168.2.129:5301
|
||||
mast: ${innopam.url}/api/kcd/cdi/chn/mast
|
||||
|
||||
Reference in New Issue
Block a user