학습관리 수정
This commit is contained in:
@@ -17,13 +17,18 @@ public class InferenceResultRepositoryImpl implements InferenceResultRepositoryC
|
|||||||
|
|
||||||
private final JPAQueryFactory queryFactory;
|
private final JPAQueryFactory queryFactory;
|
||||||
|
|
||||||
@PersistenceContext private final EntityManager em;
|
@PersistenceContext
|
||||||
|
private final EntityManager em;
|
||||||
|
|
||||||
/** tb_map_sheet_anal_data_inference */
|
/**
|
||||||
|
* tb_map_sheet_anal_data_inference
|
||||||
|
*/
|
||||||
private final QMapSheetAnalDataInferenceEntity inferenceEntity =
|
private final QMapSheetAnalDataInferenceEntity inferenceEntity =
|
||||||
QMapSheetAnalDataInferenceEntity.mapSheetAnalDataInferenceEntity;
|
QMapSheetAnalDataInferenceEntity.mapSheetAnalDataInferenceEntity;
|
||||||
|
|
||||||
/** tb_map_sheet_anal_data_inference_geom */
|
/**
|
||||||
|
* tb_map_sheet_anal_data_inference_geom
|
||||||
|
*/
|
||||||
private final QMapSheetAnalDataInferenceGeomEntity inferenceGeomEntity =
|
private final QMapSheetAnalDataInferenceGeomEntity inferenceGeomEntity =
|
||||||
QMapSheetAnalDataInferenceGeomEntity.mapSheetAnalDataInferenceGeomEntity;
|
QMapSheetAnalDataInferenceGeomEntity.mapSheetAnalDataInferenceGeomEntity;
|
||||||
|
|
||||||
@@ -35,32 +40,27 @@ public class InferenceResultRepositoryImpl implements InferenceResultRepositoryC
|
|||||||
public int upsertGroupsFromMapSheetAnal() {
|
public int upsertGroupsFromMapSheetAnal() {
|
||||||
String sql =
|
String sql =
|
||||||
"""
|
"""
|
||||||
|
|
||||||
INSERT INTO tb_map_sheet_anal_inference (
|
INSERT INTO tb_map_sheet_anal_inference (
|
||||||
compare_yyyy,
|
compare_yyyy,
|
||||||
target_yyyy,
|
target_yyyy,
|
||||||
anal_map_sheet,
|
|
||||||
stage,
|
stage,
|
||||||
anal_title
|
anal_title
|
||||||
)
|
)
|
||||||
SELECT
|
SELECT
|
||||||
r.input1 AS compare_yyyy,
|
r.input1 AS compare_yyyy,
|
||||||
r.input2 AS target_yyyy,
|
r.input2 AS target_yyyy,
|
||||||
r.map_id AS anal_map_sheet,
|
|
||||||
r.stage,
|
r.stage,
|
||||||
CONCAT(r.stage ,'_', r.input1 ,'_', r.input2 ,'_', r.map_id) as anal_title
|
CONCAT(r.stage ,'_', r.input1 ,'_', r.input2) AS anal_title
|
||||||
FROM inference_results r
|
FROM inference_results r
|
||||||
GROUP BY r.stage, r.input1, r.input2, r.map_id
|
GROUP BY r.stage, r.input1, r.input2;
|
||||||
ON CONFLICT (compare_yyyy, target_yyyy, anal_map_sheet, stage)
|
|
||||||
DO UPDATE SET
|
|
||||||
updated_dttm = now()
|
|
||||||
""";
|
""";
|
||||||
|
|
||||||
return em.createNativeQuery(sql).executeUpdate();
|
return em.createNativeQuery(sql).executeUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* inference_results 테이블을 기준으로 분석 데이터 단위(stage, compare_yyyy, target_yyyy, map_sheet_num)를
|
* inference_results 테이블을 기준으로 분석 데이터 단위(stage, compare_yyyy, target_yyyy, map_sheet_num)를 생성/갱신한다.
|
||||||
* 생성/갱신한다.
|
|
||||||
*
|
*
|
||||||
* <p>- 최초 생성 시 file_created_yn = false - detecting_cnt는 inference_results 건수 기준
|
* <p>- 최초 생성 시 file_created_yn = false - detecting_cnt는 inference_results 건수 기준
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user