영상이미지관리 스케줄 수정
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -650,7 +650,7 @@ code + .copy-button {
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function configurationCacheProblems() { return (
|
function configurationCacheProblems() { return (
|
||||||
// begin-report-data
|
// 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
|
// end-report-data
|
||||||
);}
|
);}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Binary file not shown.
@@ -40,6 +40,7 @@ public class MapSheetMngDto {
|
|||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public static class MngDto {
|
public static class MngDto {
|
||||||
|
|
||||||
private int rowNum;
|
private int rowNum;
|
||||||
private int mngYyyy;
|
private int mngYyyy;
|
||||||
private String mngState;
|
private String mngState;
|
||||||
@@ -61,6 +62,7 @@ public class MapSheetMngDto {
|
|||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public static class MngHstDto {
|
public static class MngHstDto {
|
||||||
|
|
||||||
private long hstUid;
|
private long hstUid;
|
||||||
private int mngYyyy;
|
private int mngYyyy;
|
||||||
private String mapSheetNum;
|
private String mapSheetNum;
|
||||||
@@ -86,6 +88,7 @@ public class MapSheetMngDto {
|
|||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public static class MngFileAddReq {
|
public static class MngFileAddReq {
|
||||||
|
|
||||||
private int mngYyyy;
|
private int mngYyyy;
|
||||||
private String mapSheetNum;
|
private String mapSheetNum;
|
||||||
private String refMapSheetNum;
|
private String refMapSheetNum;
|
||||||
@@ -103,6 +106,7 @@ public class MapSheetMngDto {
|
|||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public static class MngFilesDto {
|
public static class MngFilesDto {
|
||||||
|
|
||||||
private long fileUid;
|
private long fileUid;
|
||||||
private int mngYyyy;
|
private int mngYyyy;
|
||||||
private String mapSheetNum;
|
private String mapSheetNum;
|
||||||
@@ -132,7 +136,19 @@ public class MapSheetMngDto {
|
|||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public static class DmlReturn {
|
public static class DmlReturn {
|
||||||
|
|
||||||
private String flag;
|
private String flag;
|
||||||
private String message;
|
private String message;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Schema(name = "MngYyyyDto", description = "년도 값")
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public static class YearMinMax {
|
||||||
|
|
||||||
|
private Integer minYyyy;
|
||||||
|
private Integer maxYyyy;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package com.kamco.cd.kamcoback.postgres.core;
|
package com.kamco.cd.kamcoback.postgres.core;
|
||||||
|
|
||||||
import com.kamco.cd.kamcoback.dto.MapSheetMngDto;
|
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.MngHstDto;
|
||||||
|
import com.kamco.cd.kamcoback.dto.MapSheetMngDto.YearMinMax;
|
||||||
import com.kamco.cd.kamcoback.enums.CommonUseStatus;
|
import com.kamco.cd.kamcoback.enums.CommonUseStatus;
|
||||||
import com.kamco.cd.kamcoback.postgres.entity.MapSheetMngFileEntity;
|
import com.kamco.cd.kamcoback.postgres.entity.MapSheetMngFileEntity;
|
||||||
import com.kamco.cd.kamcoback.postgres.repository.MapSheetMngFileJobRepository;
|
import com.kamco.cd.kamcoback.postgres.repository.MapSheetMngFileJobRepository;
|
||||||
@@ -20,7 +20,8 @@ public class MapSheetMngFileJobCoreService {
|
|||||||
private final MapSheetMngFileJobRepository mapSheetMngFileJobRepository;
|
private final MapSheetMngFileJobRepository mapSheetMngFileJobRepository;
|
||||||
private final MapSheetMngYearRepository mapSheetMngYearRepository;
|
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);
|
return mapSheetMngFileJobRepository.findMapSheetMngList(searchReq);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -67,9 +68,10 @@ public class MapSheetMngFileJobCoreService {
|
|||||||
return mapSheetMngFileJobRepository.findNotYetMapSheetMng();
|
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(
|
return mapSheetMngFileJobRepository.findByHstMapSheetBeforeYyyyListCount(
|
||||||
strtYyyy, endYyyy, mapSheetNum);
|
mngYyyy, strtYyyy, endYyyy, mapSheetNum);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateException5kMapSheet(String mapSheetNum, CommonUseStatus commonUseStatus) {
|
public void updateException5kMapSheet(String mapSheetNum, CommonUseStatus commonUseStatus) {
|
||||||
@@ -79,4 +81,16 @@ public class MapSheetMngFileJobCoreService {
|
|||||||
public void saveSheetMngYear() {
|
public void saveSheetMngYear() {
|
||||||
mapSheetMngYearRepository.saveFileInfo();
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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;
|
||||||
|
}
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
package com.kamco.cd.kamcoback.postgres.repository;
|
package com.kamco.cd.kamcoback.postgres.repository;
|
||||||
|
|
||||||
import com.kamco.cd.kamcoback.dto.MapSheetMngDto;
|
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.MngHstDto;
|
||||||
import com.kamco.cd.kamcoback.enums.CommonUseStatus;
|
import com.kamco.cd.kamcoback.enums.CommonUseStatus;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -9,7 +8,7 @@ import org.springframework.data.domain.Page;
|
|||||||
|
|
||||||
public interface MapSheetMngFileJobRepositoryCustom {
|
public interface MapSheetMngFileJobRepositoryCustom {
|
||||||
|
|
||||||
Page<MngDto> findMapSheetMngList(MapSheetMngDto.MngSearchReq searchReq);
|
Page<MapSheetMngDto.MngDto> findMapSheetMngList(MapSheetMngDto.MngSearchReq searchReq);
|
||||||
|
|
||||||
void mngHstDataSyncStateUpdate(MapSheetMngDto.MngHstDto updateReq);
|
void mngHstDataSyncStateUpdate(MapSheetMngDto.MngHstDto updateReq);
|
||||||
|
|
||||||
@@ -21,7 +20,12 @@ public interface MapSheetMngFileJobRepositoryCustom {
|
|||||||
|
|
||||||
public Integer findNotYetMapSheetMng();
|
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);
|
public void updateException5kMapSheet(String mapSheetNum, CommonUseStatus commonUseStatus);
|
||||||
|
|
||||||
|
Long findMngYyyyCnt(Integer mngYyyy);
|
||||||
|
|
||||||
|
Long findMapSheetUseExceptCnt(String mapSheetNum);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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;
|
||||||
import com.kamco.cd.kamcoback.dto.MapSheetMngDto.MngHstDto;
|
import com.kamco.cd.kamcoback.dto.MapSheetMngDto.MngHstDto;
|
||||||
import com.kamco.cd.kamcoback.enums.CommonUseStatus;
|
import com.kamco.cd.kamcoback.enums.CommonUseStatus;
|
||||||
|
import com.kamco.cd.kamcoback.postgres.entity.MapSheetMngHstEntity;
|
||||||
import com.querydsl.core.BooleanBuilder;
|
import com.querydsl.core.BooleanBuilder;
|
||||||
import com.querydsl.core.types.Projections;
|
import com.querydsl.core.types.Projections;
|
||||||
import com.querydsl.core.types.dsl.CaseBuilder;
|
import com.querydsl.core.types.dsl.CaseBuilder;
|
||||||
@@ -17,21 +18,24 @@ import jakarta.persistence.EntityManager;
|
|||||||
import jakarta.persistence.PersistenceContext;
|
import jakarta.persistence.PersistenceContext;
|
||||||
import java.time.ZonedDateTime;
|
import java.time.ZonedDateTime;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import org.springframework.data.domain.Page;
|
import org.springframework.data.domain.Page;
|
||||||
import org.springframework.data.domain.PageImpl;
|
import org.springframework.data.domain.PageImpl;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.data.jpa.repository.support.QuerydslRepositorySupport;
|
||||||
|
|
||||||
@Repository
|
public class MapSheetMngFileJobRepositoryImpl extends QuerydslRepositorySupport
|
||||||
@RequiredArgsConstructor
|
implements MapSheetMngFileJobRepositoryCustom {
|
||||||
public class MapSheetMngFileJobRepositoryImpl implements MapSheetMngFileJobRepositoryCustom {
|
|
||||||
|
|
||||||
private final JPAQueryFactory queryFactory;
|
private final JPAQueryFactory queryFactory;
|
||||||
private final StringExpression NULL_STRING = Expressions.stringTemplate("cast(null as text)");
|
private final StringExpression NULL_STRING = Expressions.stringTemplate("cast(null as text)");
|
||||||
|
|
||||||
@PersistenceContext private EntityManager em;
|
@PersistenceContext private EntityManager em;
|
||||||
|
|
||||||
|
public MapSheetMngFileJobRepositoryImpl(JPAQueryFactory queryFactory) {
|
||||||
|
super(MapSheetMngHstEntity.class);
|
||||||
|
this.queryFactory = queryFactory;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer findNotYetMapSheetMng() {
|
public Integer findNotYetMapSheetMng() {
|
||||||
Integer countQuery =
|
Integer countQuery =
|
||||||
@@ -49,33 +53,6 @@ public class MapSheetMngFileJobRepositoryImpl implements MapSheetMngFileJobRepos
|
|||||||
return countQuery;
|
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
|
@Override
|
||||||
public Page<MapSheetMngDto.MngDto> findMapSheetMngList(MapSheetMngDto.MngSearchReq searchReq) {
|
public Page<MapSheetMngDto.MngDto> findMapSheetMngList(MapSheetMngDto.MngSearchReq searchReq) {
|
||||||
|
|
||||||
@@ -148,6 +125,33 @@ public class MapSheetMngFileJobRepositoryImpl implements MapSheetMngFileJobRepos
|
|||||||
return new PageImpl<>(foundContent, pageable, countQuery);
|
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) {
|
public void mngHstDataSyncStateUpdate(MapSheetMngDto.MngHstDto updateReq) {
|
||||||
|
|
||||||
ZonedDateTime now = ZonedDateTime.now();
|
ZonedDateTime now = ZonedDateTime.now();
|
||||||
@@ -229,7 +233,8 @@ public class MapSheetMngFileJobRepositoryImpl implements MapSheetMngFileJobRepos
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Long findByHstMapSheetBeforeYyyyListCount(int strtYyyy, int endYyyy, String mapSheetNum) {
|
public Long findByHstMapSheetBeforeYyyyListCount(
|
||||||
|
int mngYyyy, int strtYyyy, int endYyyy, String mapSheetNum) {
|
||||||
|
|
||||||
Long countQuery =
|
Long countQuery =
|
||||||
queryFactory
|
queryFactory
|
||||||
@@ -240,8 +245,8 @@ public class MapSheetMngFileJobRepositoryImpl implements MapSheetMngFileJobRepos
|
|||||||
.mngYyyy
|
.mngYyyy
|
||||||
.goe(strtYyyy)
|
.goe(strtYyyy)
|
||||||
.and(mapSheetMngHstEntity.mngYyyy.loe(endYyyy))
|
.and(mapSheetMngHstEntity.mngYyyy.loe(endYyyy))
|
||||||
|
.and(mapSheetMngHstEntity.mngYyyy.ne(mngYyyy))
|
||||||
.and(mapSheetMngHstEntity.mapSheetNum.eq(mapSheetNum))
|
.and(mapSheetMngHstEntity.mapSheetNum.eq(mapSheetNum))
|
||||||
.and(mapSheetMngHstEntity.useInference.eq("USE"))
|
|
||||||
.and(
|
.and(
|
||||||
mapSheetMngHstEntity
|
mapSheetMngHstEntity
|
||||||
.syncState
|
.syncState
|
||||||
@@ -262,4 +267,26 @@ public class MapSheetMngFileJobRepositoryImpl implements MapSheetMngFileJobRepos
|
|||||||
.where(mapInkx5kEntity.mapidcdNo.eq(mapSheetNum))
|
.where(mapInkx5kEntity.mapidcdNo.eq(mapSheetNum))
|
||||||
.execute();
|
.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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,14 @@
|
|||||||
package com.kamco.cd.kamcoback.postgres.repository;
|
package com.kamco.cd.kamcoback.postgres.repository;
|
||||||
|
|
||||||
import com.kamco.cd.kamcoback.dto.MapSheetMngDto.MngListCompareDto;
|
import com.kamco.cd.kamcoback.dto.MapSheetMngDto.MngListCompareDto;
|
||||||
|
import com.kamco.cd.kamcoback.dto.MapSheetMngDto.YearMinMax;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public interface MapSheetMngYearRepositoryCustom {
|
public interface MapSheetMngYearRepositoryCustom {
|
||||||
|
|
||||||
void saveFileInfo();
|
void saveFileInfo();
|
||||||
|
|
||||||
List<MngListCompareDto> findByHstMapSheetCompareList(int mngYyyy, List<String> mapIds);
|
List<MngListCompareDto> findByHstMapSheetCompareList(int mngYyyy, List<String> mapIds);
|
||||||
|
|
||||||
|
YearMinMax findYearMinMaxInfo();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
package com.kamco.cd.kamcoback.postgres.repository;
|
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.MngListCompareDto;
|
||||||
|
import com.kamco.cd.kamcoback.dto.MapSheetMngDto.YearMinMax;
|
||||||
import com.kamco.cd.kamcoback.postgres.entity.QMapSheetMngYearYnEntity;
|
import com.kamco.cd.kamcoback.postgres.entity.QMapSheetMngYearYnEntity;
|
||||||
import com.querydsl.core.types.Projections;
|
import com.querydsl.core.types.Projections;
|
||||||
import com.querydsl.core.types.dsl.Expressions;
|
import com.querydsl.core.types.dsl.Expressions;
|
||||||
@@ -98,4 +101,13 @@ public class MapSheetMngYearRepositoryImpl implements MapSheetMngYearRepositoryC
|
|||||||
.groupBy(y.id.mapSheetNum)
|
.groupBy(y.id.mapSheetNum)
|
||||||
.fetch();
|
.fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public YearMinMax findYearMinMaxInfo() {
|
||||||
|
return queryFactory
|
||||||
|
.select(
|
||||||
|
Projections.constructor(YearMinMax.class, yearEntity.yyyy.min(), yearEntity.yyyy.max()))
|
||||||
|
.from(yearEntity)
|
||||||
|
.fetchOne();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
40
imagery-make-dataset/src/main/java/com/kamco/cd/kamcoback/service/MapSheetMngFileJobService.java
Executable file → Normal file
40
imagery-make-dataset/src/main/java/com/kamco/cd/kamcoback/service/MapSheetMngFileJobService.java
Executable file → Normal 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.DmlReturn;
|
||||||
import com.kamco.cd.kamcoback.dto.MapSheetMngDto.MngFileAddReq;
|
import com.kamco.cd.kamcoback.dto.MapSheetMngDto.MngFileAddReq;
|
||||||
import com.kamco.cd.kamcoback.dto.MapSheetMngDto.MngHstDto;
|
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.enums.CommonUseStatus;
|
||||||
import com.kamco.cd.kamcoback.postgres.core.MapSheetMngFileJobCoreService;
|
import com.kamco.cd.kamcoback.postgres.core.MapSheetMngFileJobCoreService;
|
||||||
import com.kamco.cd.kamcoback.utils.FIleChecker;
|
import com.kamco.cd.kamcoback.utils.FIleChecker;
|
||||||
@@ -63,9 +64,18 @@ public class MapSheetMngFileJobService {
|
|||||||
|
|
||||||
for (MngHstDto item : mapSheetFileNotYetList) {
|
for (MngHstDto item : mapSheetFileNotYetList) {
|
||||||
|
|
||||||
|
// mng_yyyy 가 완전 최초로 등록되는 것인지 확인
|
||||||
|
Long mngCnt = mapSheetMngFileJobCoreService.findMngYyyyCnt(item.getMngYyyy());
|
||||||
|
|
||||||
// 5K도엽 자동추론제외
|
// 5K도엽 자동추론제외
|
||||||
Long exceptCheckCnt =
|
Long exceptCheckCnt = 0L;
|
||||||
this.mapSheetAutoExceptionUpdate(item.getMngYyyy(), item.getMapSheetNum());
|
|
||||||
|
if (mngCnt == 0) { // 최초 등록이면 도엽의 추론제외여부를 확인
|
||||||
|
exceptCheckCnt =
|
||||||
|
mapSheetMngFileJobCoreService.findMapSheetUseExceptCnt(item.getMapSheetNum());
|
||||||
|
} else { // 등록된 영상 년도가 있으면 자동추론제외 확인
|
||||||
|
exceptCheckCnt = this.mapSheetAutoExceptionUpdate(item.getMngYyyy(), item.getMapSheetNum());
|
||||||
|
}
|
||||||
|
|
||||||
// 도엽별 파일 체크 진행중으로 변경
|
// 도엽별 파일 체크 진행중으로 변경
|
||||||
item.setDataState("PROCESSING");
|
item.setDataState("PROCESSING");
|
||||||
@@ -105,11 +115,11 @@ public class MapSheetMngFileJobService {
|
|||||||
|
|
||||||
int tfwCnt =
|
int tfwCnt =
|
||||||
(int)
|
(int)
|
||||||
basicList.stream().filter(dto -> dto.getExtension().toString().equals("tfw")).count();
|
basicList.stream().filter(dto -> dto.getExtension().equalsIgnoreCase("tfw")).count();
|
||||||
|
|
||||||
int tifCnt =
|
int tifCnt =
|
||||||
(int)
|
(int)
|
||||||
basicList.stream().filter(dto -> dto.getExtension().toString().equals("tif")).count();
|
basicList.stream().filter(dto -> dto.getExtension().equalsIgnoreCase("tif")).count();
|
||||||
|
|
||||||
syncState = "";
|
syncState = "";
|
||||||
syncCheckState = "";
|
syncCheckState = "";
|
||||||
@@ -212,28 +222,26 @@ public class MapSheetMngFileJobService {
|
|||||||
return notyetCnt;
|
return notyetCnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Long mapSheetAutoExceptionUpdate(int mngYyyy, String mapSheetNum) {
|
public Long mapSheetAutoExceptionUpdate(Integer mngYyyy, String mapSheetNum) {
|
||||||
|
|
||||||
// 2025년 이전 파일싱크는 무조건 이전3년이 존재하지 않으므로 자동추론제외를 진행하지 않는다.(전년도 파일이 무조건 존재하는 것으로 리턴)
|
// tb_year 에 있는 년도 min,max 가져오기
|
||||||
// if (syncAutoExceptionStartYear > mngYyyy) {
|
YearMinMax yearInfo = mapSheetMngFileJobCoreService.findYearMinMaxInfo();
|
||||||
// return 1L;
|
int strtYyyy = yearInfo.getMinYyyy();
|
||||||
// }
|
int endYyyy = yearInfo.getMaxYyyy();
|
||||||
|
|
||||||
// int strtYyyy = mngYyyy - syncAutoExceptionBeforeYearCnt + 1;
|
// tb_map_sheet_mng_hst 에 도엽 정보가 하나라도 DONE 인 게 있는지 count 가져오기
|
||||||
int strtYyyy = 2020;
|
|
||||||
int endYyyy = mngYyyy;
|
|
||||||
|
|
||||||
// 본년도+이전년도가 3개년인 도엽 확인 -> 2020년도부터 현재까지
|
|
||||||
Long beforeCnt =
|
Long beforeCnt =
|
||||||
mapSheetMngFileJobCoreService.findByHstMapSheetBeforeYyyyListCount(
|
mapSheetMngFileJobCoreService.findByHstMapSheetBeforeYyyyListCount(
|
||||||
strtYyyy, endYyyy, mapSheetNum);
|
mngYyyy, strtYyyy, endYyyy, mapSheetNum);
|
||||||
|
|
||||||
if (beforeCnt == 0) {
|
if (beforeCnt == 0) {
|
||||||
System.out.println("mapSheetAutoExceptionUpdate inference == 자동추론제외");
|
System.out.println("beforeCnt: 0, mapSheetAutoExceptionUpdate inference == 자동추론제외");
|
||||||
mapSheetMngFileJobCoreService.updateException5kMapSheet(
|
mapSheetMngFileJobCoreService.updateException5kMapSheet(
|
||||||
mapSheetNum, CommonUseStatus.AUTO_EXCEPT);
|
mapSheetNum, CommonUseStatus.AUTO_EXCEPT);
|
||||||
} else {
|
} else {
|
||||||
// 하나라도 있으면 USE
|
// 하나라도 있으면 USE
|
||||||
|
System.out.println(
|
||||||
|
"beforeCnt: " + beforeCnt + ", mapSheetAutoExceptionUpdate inference == 자동추론제외 해제");
|
||||||
mapSheetMngFileJobCoreService.updateException5kMapSheet(mapSheetNum, CommonUseStatus.USE);
|
mapSheetMngFileJobCoreService.updateException5kMapSheet(mapSheetNum, CommonUseStatus.USE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user