Merge pull request '스웨거 설정 변경' (#118) from feat/dev_251201 into develop
Reviewed-on: https://kamco.gitea.gs.dabeeo.com/dabeeo/kamco-dabeeo-backoffice/pulls/118
This commit is contained in:
@@ -46,11 +46,18 @@ public class OpenApiConfig {
|
||||
|
||||
// profile 별 server url 분기
|
||||
List<Server> servers = new ArrayList<>();
|
||||
switch (profile) {
|
||||
case "prod" -> servers.add(new Server().url(prodUrl).description("운영 서버"));
|
||||
case "dev" -> servers.add(new Server().url(devUrl).description("개발 서버"));
|
||||
default ->
|
||||
servers.add(new Server().url("http://localhost:" + serverPort).description("로컬 개발 서버"));
|
||||
if ("dev".equals(profile)) {
|
||||
servers.add(new Server().url(devUrl).description("개발 서버"));
|
||||
servers.add(new Server().url("http://localhost:" + serverPort).description("로컬 서버"));
|
||||
// servers.add(new Server().url(prodUrl).description("운영 서버"));
|
||||
} else if ("prod".equals(profile)) {
|
||||
// servers.add(new Server().url(prodUrl).description("운영 서버"));
|
||||
servers.add(new Server().url("http://localhost:" + serverPort).description("로컬 서버"));
|
||||
servers.add(new Server().url(devUrl).description("개발 서버"));
|
||||
} else {
|
||||
servers.add(new Server().url("http://localhost:" + serverPort).description("로컬 서버"));
|
||||
servers.add(new Server().url(devUrl).description("개발 서버"));
|
||||
// servers.add(new Server().url(prodUrl).description("운영 서버"));
|
||||
}
|
||||
|
||||
return new OpenAPI()
|
||||
|
||||
@@ -71,6 +71,9 @@ public class InferenceResultShpDto {
|
||||
@NoArgsConstructor
|
||||
public static class InferenceCntDto {
|
||||
|
||||
@Schema(description = "추론 결과(inference_results)를 기준으로 신규 목록 저장 터이터 건수", example = "120")
|
||||
int sheetAnalDataCnt;
|
||||
|
||||
@Schema(description = "추론 결과(inference_results)를 기준으로 신규 저장 데이터 건수", example = "120")
|
||||
int inferenceCnt;
|
||||
|
||||
|
||||
@@ -20,10 +20,12 @@ public class InferenceResultShpCoreService {
|
||||
*/
|
||||
@Transactional
|
||||
public InferenceResultShpDto.InferenceCntDto buildInferenceData() {
|
||||
int sheetAnalDataCnt = repo.upsertGroupsFromMapSheetAnal();
|
||||
int inferenceCnt = repo.upsertGroupsFromInferenceResults();
|
||||
int inferenceGeomCnt = repo.upsertGeomsFromInferenceResults();
|
||||
|
||||
InferenceResultShpDto.InferenceCntDto cntDto = new InferenceResultShpDto.InferenceCntDto();
|
||||
cntDto.setSheetAnalDataCnt(sheetAnalDataCnt);
|
||||
cntDto.setInferenceCnt(inferenceCnt);
|
||||
cntDto.setInferenceGeomCnt(inferenceGeomCnt);
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@ import java.util.List;
|
||||
|
||||
public interface InferenceResultRepositoryCustom {
|
||||
|
||||
int upsertGroupsFromMapSheetAnal();
|
||||
|
||||
int upsertGroupsFromInferenceResults();
|
||||
|
||||
int upsertGeomsFromInferenceResults();
|
||||
|
||||
@@ -31,6 +31,33 @@ public class InferenceResultRepositoryImpl implements InferenceResultRepositoryC
|
||||
// Upsert (Native only)
|
||||
// ===============================
|
||||
|
||||
@Override
|
||||
public int upsertGroupsFromMapSheetAnal() {
|
||||
String sql =
|
||||
"""
|
||||
INSERT INTO tb_map_sheet_anal_inference (
|
||||
compare_yyyy,
|
||||
target_yyyy,
|
||||
anal_map_sheet,
|
||||
stage,
|
||||
anal_title
|
||||
)
|
||||
SELECT
|
||||
r.input1 AS compare_yyyy,
|
||||
r.input2 AS target_yyyy,
|
||||
r.map_id AS anal_map_sheet,
|
||||
r.stage,
|
||||
CONCAT(r.stage ,'_', r.input1 ,'_', r.input2 ,'_', r.map_id) as anal_title
|
||||
FROM inference_results r
|
||||
GROUP BY r.stage, r.input1, r.input2, r.map_id
|
||||
ON CONFLICT (compare_yyyy, target_yyyy, anal_map_sheet, stage)
|
||||
DO UPDATE SET
|
||||
updated_dttm = now()
|
||||
""";
|
||||
|
||||
return em.createNativeQuery(sql).executeUpdate();
|
||||
}
|
||||
|
||||
/**
|
||||
* inference_results 테이블을 기준으로 분석 데이터 단위(stage, compare_yyyy, target_yyyy, map_sheet_num)를
|
||||
* 생성/갱신한다.
|
||||
|
||||
Reference in New Issue
Block a user