영상이미지관리 스케줄 수정

This commit is contained in:
2026-02-24 19:31:15 +09:00
parent 207078e5a2
commit 135c6b5892
24 changed files with 211 additions and 102 deletions

View File

@@ -650,7 +650,7 @@ code + .copy-button {
<script type="text/javascript">
function configurationCacheProblems() { return (
// begin-report-data
{"diagnostics":[{"locations":[{}],"problem":[{"text":"Properties should be assigned using the 'propName = value' syntax. Setting a property via the Gradle-generated 'propName value' or 'propName(value)' syntax in Groovy DSL has been deprecated."}],"severity":"WARNING","problemDetails":[{"text":"This is scheduled to be removed in Gradle 10.0."}],"contextualLabel":"Properties should be assigned using the 'propName = value' syntax. Setting a property via the Gradle-generated 'propName value' or 'propName(value)' syntax in Groovy DSL has been deprecated.","documentationLink":"https://docs.gradle.org/8.14/userguide/upgrading_version_8.html#groovy_space_assignment_syntax","problemId":[{"name":"deprecation","displayName":"Deprecation"},{"name":"properties-should-be-assigned-using-the-propname-value-syntax-setting-a-property-via-the-gradle-generated-propname-value-or-propname-value-syntax-in-groovy-dsl","displayName":"Properties should be assigned using the 'propName = value' syntax. Setting a property via the Gradle-generated 'propName value' or 'propName(value)' syntax in Groovy DSL has been deprecated."}],"solutions":[[{"text":"Use assignment ('url = <value>') instead."}]]}],"problemsReport":{"totalProblemCount":1,"buildName":"kamco-map-sheet-image-job","requestedTasks":"spotlessApply","documentationLink":"https://docs.gradle.org/8.14/userguide/reporting_problems.html","documentationLinkCaption":"Problem report","summaries":[]}}
{"diagnostics":[{"locations":[{}],"problem":[{"text":"Properties should be assigned using the 'propName = value' syntax. Setting a property via the Gradle-generated 'propName value' or 'propName(value)' syntax in Groovy DSL has been deprecated."}],"severity":"WARNING","problemDetails":[{"text":"This is scheduled to be removed in Gradle 10.0."}],"contextualLabel":"Properties should be assigned using the 'propName = value' syntax. Setting a property via the Gradle-generated 'propName value' or 'propName(value)' syntax in Groovy DSL has been deprecated.","documentationLink":"https://docs.gradle.org/8.14/userguide/upgrading_version_8.html#groovy_space_assignment_syntax","problemId":[{"name":"deprecation","displayName":"Deprecation"},{"name":"properties-should-be-assigned-using-the-propname-value-syntax-setting-a-property-via-the-gradle-generated-propname-value-or-propname-value-syntax-in-groovy-dsl","displayName":"Properties should be assigned using the 'propName = value' syntax. Setting a property via the Gradle-generated 'propName value' or 'propName(value)' syntax in Groovy DSL has been deprecated."}],"solutions":[[{"text":"Use assignment ('url = <value>') instead."}]]},{"locations":[{"path":"/Users/bokmin/workspace/kamco-cd-cron/imagery-make-dataset/src/main/java/com/kamco/cd/kamcoback/enums/Enums.java"},{"taskPath":":compileJava"}],"problem":[{"text":"/Users/bokmin/workspace/kamco-cd-cron/imagery-make-dataset/src/main/java/com/kamco/cd/kamcoback/enums/Enums.java uses unchecked or unsafe operations."}],"severity":"ADVICE","problemDetails":[{"text":"Note: /Users/bokmin/workspace/kamco-cd-cron/imagery-make-dataset/src/main/java/com/kamco/cd/kamcoback/enums/Enums.java uses unchecked or unsafe operations."}],"contextualLabel":"/Users/bokmin/workspace/kamco-cd-cron/imagery-make-dataset/src/main/java/com/kamco/cd/kamcoback/enums/Enums.java uses unchecked or unsafe operations.","problemId":[{"name":"java","displayName":"Java compilation"},{"name":"compilation","displayName":"Compilation"},{"name":"compiler.note.unchecked.filename","displayName":"/Users/bokmin/workspace/kamco-cd-cron/imagery-make-dataset/src/main/java/com/kamco/cd/kamcoback/enums/Enums.java uses unchecked or unsafe operations."}]},{"locations":[{"path":"/Users/bokmin/workspace/kamco-cd-cron/imagery-make-dataset/src/main/java/com/kamco/cd/kamcoback/enums/Enums.java"},{"taskPath":":compileJava"}],"problem":[{"text":"Recompile with -Xlint:unchecked for details."}],"severity":"ADVICE","problemDetails":[{"text":"Note: Recompile with -Xlint:unchecked for details."}],"contextualLabel":"Recompile with -Xlint:unchecked for details.","problemId":[{"name":"java","displayName":"Java compilation"},{"name":"compilation","displayName":"Compilation"},{"name":"compiler.note.unchecked.recompile","displayName":"Recompile with -Xlint:unchecked for details."}]}],"problemsReport":{"totalProblemCount":3,"buildName":"kamco-map-sheet-image-job","requestedTasks":"clean build","documentationLink":"https://docs.gradle.org/8.14/userguide/reporting_problems.html","documentationLinkCaption":"Problem report","summaries":[]}}
// end-report-data
);}
</script>

View File

@@ -40,6 +40,7 @@ public class MapSheetMngDto {
@NoArgsConstructor
@AllArgsConstructor
public static class MngDto {
private int rowNum;
private int mngYyyy;
private String mngState;
@@ -61,6 +62,7 @@ public class MapSheetMngDto {
@NoArgsConstructor
@AllArgsConstructor
public static class MngHstDto {
private long hstUid;
private int mngYyyy;
private String mapSheetNum;
@@ -86,6 +88,7 @@ public class MapSheetMngDto {
@NoArgsConstructor
@AllArgsConstructor
public static class MngFileAddReq {
private int mngYyyy;
private String mapSheetNum;
private String refMapSheetNum;
@@ -103,6 +106,7 @@ public class MapSheetMngDto {
@NoArgsConstructor
@AllArgsConstructor
public static class MngFilesDto {
private long fileUid;
private int mngYyyy;
private String mapSheetNum;
@@ -132,7 +136,19 @@ public class MapSheetMngDto {
@NoArgsConstructor
@AllArgsConstructor
public static class DmlReturn {
private String flag;
private String message;
}
@Schema(name = "MngYyyyDto", description = "년도 값")
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public static class YearMinMax {
private Integer minYyyy;
private Integer maxYyyy;
}
}

View File

@@ -1,8 +1,8 @@
package com.kamco.cd.kamcoback.postgres.core;
import com.kamco.cd.kamcoback.dto.MapSheetMngDto;
import com.kamco.cd.kamcoback.dto.MapSheetMngDto.MngDto;
import com.kamco.cd.kamcoback.dto.MapSheetMngDto.MngHstDto;
import com.kamco.cd.kamcoback.dto.MapSheetMngDto.YearMinMax;
import com.kamco.cd.kamcoback.enums.CommonUseStatus;
import com.kamco.cd.kamcoback.postgres.entity.MapSheetMngFileEntity;
import com.kamco.cd.kamcoback.postgres.repository.MapSheetMngFileJobRepository;
@@ -20,7 +20,8 @@ public class MapSheetMngFileJobCoreService {
private final MapSheetMngFileJobRepository mapSheetMngFileJobRepository;
private final MapSheetMngYearRepository mapSheetMngYearRepository;
public Page<MngDto> findMapSheetMngList(MapSheetMngDto.@Valid MngSearchReq searchReq) {
public Page<MapSheetMngDto.MngDto> findMapSheetMngList(
MapSheetMngDto.@Valid MngSearchReq searchReq) {
return mapSheetMngFileJobRepository.findMapSheetMngList(searchReq);
}
@@ -67,9 +68,10 @@ public class MapSheetMngFileJobCoreService {
return mapSheetMngFileJobRepository.findNotYetMapSheetMng();
}
public Long findByHstMapSheetBeforeYyyyListCount(int strtYyyy, int endYyyy, String mapSheetNum) {
public Long findByHstMapSheetBeforeYyyyListCount(
int mngYyyy, int strtYyyy, int endYyyy, String mapSheetNum) {
return mapSheetMngFileJobRepository.findByHstMapSheetBeforeYyyyListCount(
strtYyyy, endYyyy, mapSheetNum);
mngYyyy, strtYyyy, endYyyy, mapSheetNum);
}
public void updateException5kMapSheet(String mapSheetNum, CommonUseStatus commonUseStatus) {
@@ -79,4 +81,16 @@ public class MapSheetMngFileJobCoreService {
public void saveSheetMngYear() {
mapSheetMngYearRepository.saveFileInfo();
}
public YearMinMax findYearMinMaxInfo() {
return mapSheetMngYearRepository.findYearMinMaxInfo();
}
public Long findMngYyyyCnt(Integer mngYyyy) {
return mapSheetMngFileJobRepository.findMngYyyyCnt(mngYyyy);
}
public Long findMapSheetUseExceptCnt(String mapSheetNum) {
return mapSheetMngFileJobRepository.findMapSheetUseExceptCnt(mapSheetNum);
}
}

View File

@@ -0,0 +1,24 @@
package com.kamco.cd.kamcoback.postgres.entity;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import jakarta.validation.constraints.Size;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
@Entity
@Table(name = "tb_year")
public class YearEntity {
@Id
@Column(name = "yyyy", nullable = false)
private Integer yyyy;
@Size(max = 20)
@Column(name = "status", length = 20)
private String status;
}

View File

@@ -1,7 +1,6 @@
package com.kamco.cd.kamcoback.postgres.repository;
import com.kamco.cd.kamcoback.dto.MapSheetMngDto;
import com.kamco.cd.kamcoback.dto.MapSheetMngDto.MngDto;
import com.kamco.cd.kamcoback.dto.MapSheetMngDto.MngHstDto;
import com.kamco.cd.kamcoback.enums.CommonUseStatus;
import java.util.List;
@@ -9,7 +8,7 @@ import org.springframework.data.domain.Page;
public interface MapSheetMngFileJobRepositoryCustom {
Page<MngDto> findMapSheetMngList(MapSheetMngDto.MngSearchReq searchReq);
Page<MapSheetMngDto.MngDto> findMapSheetMngList(MapSheetMngDto.MngSearchReq searchReq);
void mngHstDataSyncStateUpdate(MapSheetMngDto.MngHstDto updateReq);
@@ -21,7 +20,12 @@ public interface MapSheetMngFileJobRepositoryCustom {
public Integer findNotYetMapSheetMng();
public Long findByHstMapSheetBeforeYyyyListCount(int strtYyyy, int endYyyy, String mapSheetNum);
public Long findByHstMapSheetBeforeYyyyListCount(
int mngYyyy, int strtYyyy, int endYyyy, String mapSheetNum);
public void updateException5kMapSheet(String mapSheetNum, CommonUseStatus commonUseStatus);
Long findMngYyyyCnt(Integer mngYyyy);
Long findMapSheetUseExceptCnt(String mapSheetNum);
}

View File

@@ -7,6 +7,7 @@ import static com.kamco.cd.kamcoback.postgres.entity.QMapSheetMngHstEntity.mapSh
import com.kamco.cd.kamcoback.dto.MapSheetMngDto;
import com.kamco.cd.kamcoback.dto.MapSheetMngDto.MngHstDto;
import com.kamco.cd.kamcoback.enums.CommonUseStatus;
import com.kamco.cd.kamcoback.postgres.entity.MapSheetMngHstEntity;
import com.querydsl.core.BooleanBuilder;
import com.querydsl.core.types.Projections;
import com.querydsl.core.types.dsl.CaseBuilder;
@@ -17,21 +18,24 @@ import jakarta.persistence.EntityManager;
import jakarta.persistence.PersistenceContext;
import java.time.ZonedDateTime;
import java.util.List;
import lombok.RequiredArgsConstructor;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Repository;
import org.springframework.data.jpa.repository.support.QuerydslRepositorySupport;
@Repository
@RequiredArgsConstructor
public class MapSheetMngFileJobRepositoryImpl implements MapSheetMngFileJobRepositoryCustom {
public class MapSheetMngFileJobRepositoryImpl extends QuerydslRepositorySupport
implements MapSheetMngFileJobRepositoryCustom {
private final JPAQueryFactory queryFactory;
private final StringExpression NULL_STRING = Expressions.stringTemplate("cast(null as text)");
@PersistenceContext private EntityManager em;
public MapSheetMngFileJobRepositoryImpl(JPAQueryFactory queryFactory) {
super(MapSheetMngHstEntity.class);
this.queryFactory = queryFactory;
}
@Override
public Integer findNotYetMapSheetMng() {
Integer countQuery =
@@ -49,33 +53,6 @@ public class MapSheetMngFileJobRepositoryImpl implements MapSheetMngFileJobRepos
return countQuery;
}
@Override
public Long findByMngYyyyTargetMapSheetNotYetCount(int mngYyyy) {
Long countQuery =
queryFactory
.select(mapSheetMngHstEntity.mngYyyy.count())
.from(mapSheetMngHstEntity)
.where(
mapSheetMngHstEntity
.mngYyyy
.eq(mngYyyy)
.and(mapSheetMngHstEntity.syncState.eq("NOTYET")))
.fetchOne();
return countQuery;
}
public void mngDataState(int mngYyyy, String mngState) {
long updateCount =
queryFactory
.update(mapSheetMngEntity)
.set(mapSheetMngEntity.mngState, mngState)
.set(mapSheetMngEntity.syncState, mngState)
.set(mapSheetMngEntity.syncCheckState, mngState)
.where(mapSheetMngEntity.mngYyyy.eq(mngYyyy))
.execute();
}
@Override
public Page<MapSheetMngDto.MngDto> findMapSheetMngList(MapSheetMngDto.MngSearchReq searchReq) {
@@ -148,6 +125,33 @@ public class MapSheetMngFileJobRepositoryImpl implements MapSheetMngFileJobRepos
return new PageImpl<>(foundContent, pageable, countQuery);
}
@Override
public Long findByMngYyyyTargetMapSheetNotYetCount(int mngYyyy) {
Long countQuery =
queryFactory
.select(mapSheetMngHstEntity.mngYyyy.count())
.from(mapSheetMngHstEntity)
.where(
mapSheetMngHstEntity
.mngYyyy
.eq(mngYyyy)
.and(mapSheetMngHstEntity.syncState.eq("NOTYET")))
.fetchOne();
return countQuery;
}
public void mngDataState(int mngYyyy, String mngState) {
long updateCount =
queryFactory
.update(mapSheetMngEntity)
.set(mapSheetMngEntity.mngState, mngState)
.set(mapSheetMngEntity.syncState, mngState)
.set(mapSheetMngEntity.syncCheckState, mngState)
.where(mapSheetMngEntity.mngYyyy.eq(mngYyyy))
.execute();
}
public void mngHstDataSyncStateUpdate(MapSheetMngDto.MngHstDto updateReq) {
ZonedDateTime now = ZonedDateTime.now();
@@ -229,7 +233,8 @@ public class MapSheetMngFileJobRepositoryImpl implements MapSheetMngFileJobRepos
}
@Override
public Long findByHstMapSheetBeforeYyyyListCount(int strtYyyy, int endYyyy, String mapSheetNum) {
public Long findByHstMapSheetBeforeYyyyListCount(
int mngYyyy, int strtYyyy, int endYyyy, String mapSheetNum) {
Long countQuery =
queryFactory
@@ -240,8 +245,8 @@ public class MapSheetMngFileJobRepositoryImpl implements MapSheetMngFileJobRepos
.mngYyyy
.goe(strtYyyy)
.and(mapSheetMngHstEntity.mngYyyy.loe(endYyyy))
.and(mapSheetMngHstEntity.mngYyyy.ne(mngYyyy))
.and(mapSheetMngHstEntity.mapSheetNum.eq(mapSheetNum))
.and(mapSheetMngHstEntity.useInference.eq("USE"))
.and(
mapSheetMngHstEntity
.syncState
@@ -262,4 +267,26 @@ public class MapSheetMngFileJobRepositoryImpl implements MapSheetMngFileJobRepos
.where(mapInkx5kEntity.mapidcdNo.eq(mapSheetNum))
.execute();
}
@Override
public Long findMngYyyyCnt(Integer mngYyyy) {
return queryFactory
.select(mapSheetMngEntity.mngYyyy.count())
.from(mapSheetMngEntity)
.where(mapSheetMngEntity.mngYyyy.ne(mngYyyy))
.fetchOne();
}
@Override
public Long findMapSheetUseExceptCnt(String mapSheetNum) {
return queryFactory
.select(
new CaseBuilder()
.when(mapInkx5kEntity.useInference.eq(CommonUseStatus.USE))
.then(1L)
.otherwise(0L))
.from(mapInkx5kEntity)
.where(mapInkx5kEntity.mapidcdNo.eq(mapSheetNum))
.fetchOne();
}
}

View File

@@ -1,10 +1,14 @@
package com.kamco.cd.kamcoback.postgres.repository;
import com.kamco.cd.kamcoback.dto.MapSheetMngDto.MngListCompareDto;
import com.kamco.cd.kamcoback.dto.MapSheetMngDto.YearMinMax;
import java.util.List;
public interface MapSheetMngYearRepositoryCustom {
void saveFileInfo();
List<MngListCompareDto> findByHstMapSheetCompareList(int mngYyyy, List<String> mapIds);
YearMinMax findYearMinMaxInfo();
}

View File

@@ -1,6 +1,9 @@
package com.kamco.cd.kamcoback.postgres.repository;
import static com.kamco.cd.kamcoback.postgres.entity.QYearEntity.yearEntity;
import com.kamco.cd.kamcoback.dto.MapSheetMngDto.MngListCompareDto;
import com.kamco.cd.kamcoback.dto.MapSheetMngDto.YearMinMax;
import com.kamco.cd.kamcoback.postgres.entity.QMapSheetMngYearYnEntity;
import com.querydsl.core.types.Projections;
import com.querydsl.core.types.dsl.Expressions;
@@ -26,52 +29,52 @@ public class MapSheetMngYearRepositoryImpl implements MapSheetMngYearRepositoryC
String sql =
"""
WITH bounds AS (
WITH bounds AS (
SELECT
map_sheet_num,
MIN(mng_yyyy::int) AS min_y,
MAX(mng_yyyy::int) AS max_y
FROM tb_map_sheet_mng_files
GROUP BY map_sheet_num
),
years AS (
SELECT
b.map_sheet_num,
gs.y AS mng_yyyy
FROM bounds b
CROSS JOIN LATERAL generate_series(b.min_y, b.max_y) AS gs(y)
),
exist AS (
SELECT DISTINCT
map_sheet_num,
mng_yyyy::int AS mng_yyyy
FROM tb_map_sheet_mng_files
),
src AS (
SELECT
y.map_sheet_num,
y.mng_yyyy,
CASE
WHEN e.map_sheet_num IS NULL THEN 'N'
ELSE 'Y'
END AS yn
FROM years y
LEFT JOIN exist e
ON e.map_sheet_num = y.map_sheet_num
AND e.mng_yyyy = y.mng_yyyy
)
INSERT INTO tb_map_sheet_mng_year_yn
(map_sheet_num, mng_yyyy, yn)
SELECT
map_sheet_num,
MIN(mng_yyyy::int) AS min_y,
MAX(mng_yyyy::int) AS max_y
FROM tb_map_sheet_mng_files
GROUP BY map_sheet_num
),
years AS (
SELECT
b.map_sheet_num,
gs.y AS mng_yyyy
FROM bounds b
CROSS JOIN LATERAL generate_series(b.min_y, b.max_y) AS gs(y)
),
exist AS (
SELECT DISTINCT
map_sheet_num,
mng_yyyy::int AS mng_yyyy
FROM tb_map_sheet_mng_files
),
src AS (
SELECT
y.map_sheet_num,
y.mng_yyyy,
CASE
WHEN e.map_sheet_num IS NULL THEN 'N'
ELSE 'Y'
END AS yn
FROM years y
LEFT JOIN exist e
ON e.map_sheet_num = y.map_sheet_num
AND e.mng_yyyy = y.mng_yyyy
)
INSERT INTO tb_map_sheet_mng_year_yn
(map_sheet_num, mng_yyyy, yn)
SELECT
map_sheet_num,
mng_yyyy,
yn
FROM src
ON CONFLICT (map_sheet_num, mng_yyyy)
DO UPDATE SET
yn = EXCLUDED.yn,
updated_dttm = now()
""";
mng_yyyy,
yn
FROM src
ON CONFLICT (map_sheet_num, mng_yyyy)
DO UPDATE SET
yn = EXCLUDED.yn,
updated_dttm = now()
""";
em.createNativeQuery(sql).executeUpdate();
}
@@ -98,4 +101,13 @@ public class MapSheetMngYearRepositoryImpl implements MapSheetMngYearRepositoryC
.groupBy(y.id.mapSheetNum)
.fetch();
}
@Override
public YearMinMax findYearMinMaxInfo() {
return queryFactory
.select(
Projections.constructor(YearMinMax.class, yearEntity.yyyy.min(), yearEntity.yyyy.max()))
.from(yearEntity)
.fetchOne();
}
}

View File

@@ -7,6 +7,7 @@ import com.kamco.cd.kamcoback.dto.FileDto.SrchFilesDepthDto;
import com.kamco.cd.kamcoback.dto.MapSheetMngDto.DmlReturn;
import com.kamco.cd.kamcoback.dto.MapSheetMngDto.MngFileAddReq;
import com.kamco.cd.kamcoback.dto.MapSheetMngDto.MngHstDto;
import com.kamco.cd.kamcoback.dto.MapSheetMngDto.YearMinMax;
import com.kamco.cd.kamcoback.enums.CommonUseStatus;
import com.kamco.cd.kamcoback.postgres.core.MapSheetMngFileJobCoreService;
import com.kamco.cd.kamcoback.utils.FIleChecker;
@@ -63,9 +64,18 @@ public class MapSheetMngFileJobService {
for (MngHstDto item : mapSheetFileNotYetList) {
// mng_yyyy 가 완전 최초로 등록되는 것인지 확인
Long mngCnt = mapSheetMngFileJobCoreService.findMngYyyyCnt(item.getMngYyyy());
// 5K도엽 자동추론제외
Long exceptCheckCnt =
this.mapSheetAutoExceptionUpdate(item.getMngYyyy(), item.getMapSheetNum());
Long exceptCheckCnt = 0L;
if (mngCnt == 0) { // 최초 등록이면 도엽의 추론제외여부를 확인
exceptCheckCnt =
mapSheetMngFileJobCoreService.findMapSheetUseExceptCnt(item.getMapSheetNum());
} else { // 등록된 영상 년도가 있으면 자동추론제외 확인
exceptCheckCnt = this.mapSheetAutoExceptionUpdate(item.getMngYyyy(), item.getMapSheetNum());
}
// 도엽별 파일 체크 진행중으로 변경
item.setDataState("PROCESSING");
@@ -105,11 +115,11 @@ public class MapSheetMngFileJobService {
int tfwCnt =
(int)
basicList.stream().filter(dto -> dto.getExtension().toString().equals("tfw")).count();
basicList.stream().filter(dto -> dto.getExtension().equalsIgnoreCase("tfw")).count();
int tifCnt =
(int)
basicList.stream().filter(dto -> dto.getExtension().toString().equals("tif")).count();
basicList.stream().filter(dto -> dto.getExtension().equalsIgnoreCase("tif")).count();
syncState = "";
syncCheckState = "";
@@ -212,28 +222,26 @@ public class MapSheetMngFileJobService {
return notyetCnt;
}
public Long mapSheetAutoExceptionUpdate(int mngYyyy, String mapSheetNum) {
public Long mapSheetAutoExceptionUpdate(Integer mngYyyy, String mapSheetNum) {
// 2025년 이전 파일싱크는 무조건 이전3년이 존재하지 않으므로 자동추론제외를 진행하지 않는다.(전년도 파일이 무조건 존재하는 것으로 리턴)
// if (syncAutoExceptionStartYear > mngYyyy) {
// return 1L;
// }
// tb_year 에 있는 년도 min,max 가져오기
YearMinMax yearInfo = mapSheetMngFileJobCoreService.findYearMinMaxInfo();
int strtYyyy = yearInfo.getMinYyyy();
int endYyyy = yearInfo.getMaxYyyy();
// int strtYyyy = mngYyyy - syncAutoExceptionBeforeYearCnt + 1;
int strtYyyy = 2020;
int endYyyy = mngYyyy;
// 본년도+이전년도가 3개년인 도엽 확인 -> 2020년도부터 현재까지
// tb_map_sheet_mng_hst 에 도엽 정보가 하나라도 DONE 인 게 있는지 count 가져오기
Long beforeCnt =
mapSheetMngFileJobCoreService.findByHstMapSheetBeforeYyyyListCount(
strtYyyy, endYyyy, mapSheetNum);
mngYyyy, strtYyyy, endYyyy, mapSheetNum);
if (beforeCnt == 0) {
System.out.println("mapSheetAutoExceptionUpdate inference == 자동추론제외");
System.out.println("beforeCnt: 0, mapSheetAutoExceptionUpdate inference == 자동추론제외");
mapSheetMngFileJobCoreService.updateException5kMapSheet(
mapSheetNum, CommonUseStatus.AUTO_EXCEPT);
} else {
// 하나라도 있으면 USE
System.out.println(
"beforeCnt: " + beforeCnt + ", mapSheetAutoExceptionUpdate inference == 자동추론제외 해제");
mapSheetMngFileJobCoreService.updateException5kMapSheet(mapSheetNum, CommonUseStatus.USE);
}