학습관리 수정
This commit is contained in:
@@ -17,13 +17,18 @@ public class InferenceResultRepositoryImpl implements InferenceResultRepositoryC
|
||||
|
||||
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 =
|
||||
QMapSheetAnalDataInferenceEntity.mapSheetAnalDataInferenceEntity;
|
||||
|
||||
/** tb_map_sheet_anal_data_inference_geom */
|
||||
/**
|
||||
* tb_map_sheet_anal_data_inference_geom
|
||||
*/
|
||||
private final QMapSheetAnalDataInferenceGeomEntity inferenceGeomEntity =
|
||||
QMapSheetAnalDataInferenceGeomEntity.mapSheetAnalDataInferenceGeomEntity;
|
||||
|
||||
@@ -35,32 +40,27 @@ public class InferenceResultRepositoryImpl implements InferenceResultRepositoryC
|
||||
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
|
||||
CONCAT(r.stage ,'_', r.input1 ,'_', r.input2) 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()
|
||||
GROUP BY r.stage, r.input1, r.input2;
|
||||
""";
|
||||
|
||||
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 건수 기준
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user