영상데이터관리 목록 조회 수정

This commit is contained in:
Moon
2025-12-16 12:33:36 +09:00
parent b6a96846b5
commit 103242d292
5 changed files with 49 additions and 21 deletions

View File

@@ -253,8 +253,8 @@ public class FIleChecker {
List<Basic> fileList = new ArrayList<>();
SimpleDateFormat dttmFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
int fileTotCnt = 0;
long fileTotSize = 0;
//int fileTotCnt = 0;
//long fileTotSize = 0;
try (Stream<Path> stream = Files.walk(startPath, maxDepth)) {

View File

@@ -42,6 +42,9 @@ public class MapSheetMngApiController {
@PostMapping("/mng-list")
public ApiResponseDto<Page<MapSheetMngDto.MngDto>> findMapSheetMngList(
@RequestBody MapSheetMngDto.MngSearchReq searchReq) {
System.out.println("kkkkkkkkkkkkkkkkkkkkkkkkk");
return ApiResponseDto.ok(mapSheetMngService.findMapSheetMngList(searchReq));
}

View File

@@ -69,15 +69,29 @@ public class MapSheetMngDto {
private int mngYyyy;
private String mngState;
private String syncState;
private String syncCheckState;
private String syncDataCheckState;
private Long syncTotCnt;
private Long syncStateDoneCnt;
private Long syncCheckStateDoneCnt;
private Long syncNotFileCnt;
private Long syncTypeErrorCnt;
private Long syncSizeErrorCnt;
private Long syncDataCheckDoneCnt;
private Long syncNotPaireCnt;
private Long syncDuplicateCnt;
private Long syncFaultCnt;
@JsonFormatDttm private ZonedDateTime rgstStrtDttm;
@JsonFormatDttm private ZonedDateTime rgstEndDttm;
public double getSyncStateDoneRate() {
if (this.syncTotCnt == null || this.syncTotCnt == 0) {
return 0.0;
}
return (double) this.syncStateDoneCnt / this.syncTotCnt * 100.0;
}
public double getSyncDataCheckDoneRate() {
if (this.syncTotCnt == null || this.syncTotCnt == 0) {
return 0.0;
}
return (double) this.syncDataCheckDoneCnt / this.syncTotCnt * 100.0;
}
}
@Schema(name = "ErrorSearchReq", description = "영상관리 오류데이터 검색 요청")

View File

@@ -52,6 +52,15 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
whereBuilder.and(mapSheetMngEntity.mngYyyy.eq(searchReq.getMngYyyy()));
}
NumberExpression<Long> totalCount = mapSheetMngHstEntity.count().as("syncTotCnt");
NumberExpression<Long> doneCount = new CaseBuilder()
.when(mapSheetMngHstEntity.dataState.eq("DONE"))
.then(1L)
.otherwise(0L)
.sum()
.as("syncStateDoneCnt");
List<MapSheetMngDto.MngDto> foundContent =
queryFactory
.select(
@@ -67,33 +76,35 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
mapSheetMngEntity.syncCheckState,
mapSheetMngHstEntity.count(),
new CaseBuilder()
.when(mapSheetMngHstEntity.syncState.eq("DONE"))
.when(mapSheetMngHstEntity.dataState.eq("DONE"))
.then(1L)
.otherwise(0L)
.sum()
.as("syncStateDoneCnt"),
new CaseBuilder()
.when(mapSheetMngHstEntity.syncCheckState.eq("DONE"))
.when(mapSheetMngHstEntity.syncState.ne("NOTYET"))
.then(1L)
.otherwise(0L)
.sum(),
new CaseBuilder()
.when(mapSheetMngHstEntity.dataState.eq("NOT"))
.when(mapSheetMngHstEntity.syncState.eq("NOFILE")
.or( mapSheetMngHstEntity.syncState.eq("NOTPAIR")))
.then(1L)
.otherwise(0L)
.sum(),
new CaseBuilder()
.when(mapSheetMngHstEntity.dataState.eq("TYPEERROR"))
.then(1L)
.otherwise(0L)
.sum(),
.when(mapSheetMngHstEntity.syncState.eq("DUPLICATE"))
.then(1L)
.otherwise(0L)
.sum(),
new CaseBuilder()
.when(mapSheetMngHstEntity.dataState.eq("SIZEERROR"))
.then(1L)
.otherwise(0L)
.sum(),
mapSheetMngHstEntity.syncStrtDttm.min(),
mapSheetMngHstEntity.syncCheckEndDttm.max()))
.when(mapSheetMngHstEntity.syncState.eq("TYPEERROR")
.or( mapSheetMngHstEntity.syncState.eq("SIZEERROR")))
.then(1L)
.otherwise(0L)
.sum(),
mapSheetMngEntity.createdDttm,
mapSheetMngHstEntity.syncEndDttm.max()))
.from(mapSheetMngEntity)
.leftJoin(mapSheetMngHstEntity)
.on(mapSheetMngEntity.mngYyyy.eq(mapSheetMngHstEntity.mngYyyy))

View File

@@ -108,7 +108,7 @@ public class MapSheetMngFileJobRepositoryImpl extends QuerydslRepositorySupport
public void mngHstDataSyncStateUpdate(MapSheetMngDto.MngHstDto updateReq) {
if (updateReq.getSyncState().equals("DONE")) {
if (updateReq.getDataState().equals("DONE")) {
long updateCount =
queryFactory
.update(mapSheetMngHstEntity)