추론자동제외
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.kamco.cd.kamcoback.postgres.core;
|
||||
|
||||
import com.kamco.cd.kamcoback.mapsheet.dto.MapSheetMngDto.MngListCompareDto;
|
||||
import com.kamco.cd.kamcoback.postgres.entity.MapSheetMngFileEntity;
|
||||
import com.kamco.cd.kamcoback.postgres.repository.scheduler.MapSheetMngFileJobRepository;
|
||||
import com.kamco.cd.kamcoback.scheduler.dto.MapSheetMngDto;
|
||||
@@ -63,4 +64,13 @@ public class MapSheetMngFileJobCoreService {
|
||||
public Integer findNotYetMapSheetMng() {
|
||||
return mapSheetMngFileJobRepository.findNotYetMapSheetMng();
|
||||
}
|
||||
|
||||
public Long findByHstMapSheetBeforeYyyyListCount(int strtYyyy, int endYyyy, String mapSheetNum){
|
||||
return mapSheetMngFileJobRepository.findByHstMapSheetBeforeYyyyListCount(strtYyyy, endYyyy, mapSheetNum);
|
||||
}
|
||||
|
||||
public void updateException5kMapSheet(String mapSheetNum){
|
||||
mapSheetMngFileJobRepository.updateException5kMapSheet(mapSheetNum);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.kamco.cd.kamcoback.postgres.repository.scheduler;
|
||||
|
||||
import com.kamco.cd.kamcoback.mapsheet.dto.MapSheetMngDto.MngListCompareDto;
|
||||
import com.kamco.cd.kamcoback.scheduler.dto.MapSheetMngDto;
|
||||
import com.kamco.cd.kamcoback.scheduler.dto.MapSheetMngDto.MngHstDto;
|
||||
import java.util.List;
|
||||
@@ -18,4 +19,8 @@ public interface MapSheetMngFileJobRepositoryCustom {
|
||||
public void mngDataState(int mngYyyy, String mngState);
|
||||
|
||||
public Integer findNotYetMapSheetMng();
|
||||
|
||||
public Long findByHstMapSheetBeforeYyyyListCount(int strtYyyy, int endYyyy, String mapSheetNum);
|
||||
|
||||
public void updateException5kMapSheet(String mapSheetNum);
|
||||
}
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
package com.kamco.cd.kamcoback.postgres.repository.scheduler;
|
||||
|
||||
import static com.kamco.cd.kamcoback.postgres.entity.QMapInkx5kEntity.mapInkx5kEntity;
|
||||
import static com.kamco.cd.kamcoback.postgres.entity.QMapSheetMngEntity.mapSheetMngEntity;
|
||||
import static com.kamco.cd.kamcoback.postgres.entity.QMapSheetMngHstEntity.mapSheetMngHstEntity;
|
||||
|
||||
import com.kamco.cd.kamcoback.common.enums.CommonUseStatus;
|
||||
import com.kamco.cd.kamcoback.mapsheet.dto.MapSheetMngDto.MngListCompareDto;
|
||||
import com.kamco.cd.kamcoback.postgres.entity.MapSheetMngHstEntity;
|
||||
import com.kamco.cd.kamcoback.scheduler.dto.MapSheetMngDto;
|
||||
import com.kamco.cd.kamcoback.scheduler.dto.MapSheetMngDto.MngHstDto;
|
||||
@@ -15,6 +18,7 @@ import com.querydsl.jpa.impl.JPAQueryFactory;
|
||||
import jakarta.persistence.EntityManager;
|
||||
import jakarta.persistence.PersistenceContext;
|
||||
import java.time.ZonedDateTime;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.PageImpl;
|
||||
@@ -168,6 +172,7 @@ public class MapSheetMngFileJobRepositoryImpl extends QuerydslRepositorySupport
|
||||
.set(mapSheetMngHstEntity.mapSheetPath, updateReq.getMapSheetPath())
|
||||
.set(mapSheetMngHstEntity.syncTfwFileName, updateReq.getSyncTfwFileName())
|
||||
.set(mapSheetMngHstEntity.syncTifFileName, updateReq.getSyncTifFileName())
|
||||
.set(mapSheetMngHstEntity.useInference, updateReq.getUseInference())
|
||||
.where(mapSheetMngHstEntity.hstUid.eq(updateReq.getHstUid()))
|
||||
.execute();
|
||||
} else {
|
||||
@@ -185,6 +190,7 @@ public class MapSheetMngFileJobRepositoryImpl extends QuerydslRepositorySupport
|
||||
.set(mapSheetMngHstEntity.mapSheetPath, updateReq.getMapSheetPath())
|
||||
.set(mapSheetMngHstEntity.syncTfwFileName, updateReq.getSyncTfwFileName())
|
||||
.set(mapSheetMngHstEntity.syncTifFileName, updateReq.getSyncTifFileName())
|
||||
.set(mapSheetMngHstEntity.useInference, updateReq.getUseInference())
|
||||
.where(mapSheetMngHstEntity.hstUid.eq(updateReq.getHstUid()))
|
||||
.execute();
|
||||
}
|
||||
@@ -213,6 +219,7 @@ public class MapSheetMngFileJobRepositoryImpl extends QuerydslRepositorySupport
|
||||
mapSheetMngHstEntity.mapSheetPath,
|
||||
mapSheetMngHstEntity.syncCheckTfwFileName,
|
||||
mapSheetMngHstEntity.syncCheckTifFileName,
|
||||
mapSheetMngHstEntity.useInference,
|
||||
mapSheetMngEntity.mngPath))
|
||||
.from(mapSheetMngHstEntity)
|
||||
.join(mapSheetMngEntity)
|
||||
@@ -226,4 +233,33 @@ public class MapSheetMngFileJobRepositoryImpl extends QuerydslRepositorySupport
|
||||
|
||||
return foundContent;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long findByHstMapSheetBeforeYyyyListCount(int strtYyyy, int endYyyy, String mapSheetNum) {
|
||||
|
||||
Long countQuery =
|
||||
queryFactory
|
||||
.select(mapSheetMngHstEntity.mngYyyy.count())
|
||||
.from(mapSheetMngHstEntity)
|
||||
.where(mapSheetMngHstEntity.mngYyyy.goe(strtYyyy)
|
||||
.and(mapSheetMngHstEntity.mngYyyy.loe(endYyyy))
|
||||
.and(mapSheetMngHstEntity.mapSheetNum.eq(mapSheetNum))
|
||||
.and(mapSheetMngHstEntity.useInference.eq("USE"))
|
||||
.and(mapSheetMngHstEntity.syncState.eq("DONE")
|
||||
.or(mapSheetMngHstEntity.syncCheckState.eq("DONE")))
|
||||
)
|
||||
.fetchOne();
|
||||
|
||||
return countQuery;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateException5kMapSheet(String mapSheetNum){
|
||||
long updateCount =
|
||||
queryFactory
|
||||
.update(mapInkx5kEntity)
|
||||
.set(mapInkx5kEntity.useInference, CommonUseStatus.EXCEPT)
|
||||
.where(mapInkx5kEntity.mapidcdNo.eq(mapSheetNum))
|
||||
.execute();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user