Merge pull request 'feat/dev_251201' (#68) from feat/dev_251201 into develop

Reviewed-on: https://kamco.gitea.gs.dabeeo.com/dabeeo/kamco-dabeeo-backoffice/pulls/68
This commit is contained in:
2025-12-17 13:54:03 +09:00
4 changed files with 82 additions and 44 deletions

View File

@@ -0,0 +1,29 @@
package com.kamco.cd.kamcoback.common.enums;
import com.kamco.cd.kamcoback.config.enums.EnumType;
import lombok.AllArgsConstructor;
import lombok.Getter;
@Getter
@AllArgsConstructor
public enum SyncStateType implements EnumType {
NOTYET("미처리"),
NOFILE("파일없음"),
NOTPAIR("페어파일누락"),
DUPLICATE("파일중복"),
SIZEERROR("파일용량오류"),
TYPEERROR("파일형식오류"),
DONE("완료");
private final String desc;
@Override
public String getId() {
return name();
}
@Override
public String getText() {
return desc;
}
}

View File

@@ -1,5 +1,7 @@
package com.kamco.cd.kamcoback.mapsheet.dto;
import com.kamco.cd.kamcoback.common.enums.SyncStateType;
import com.kamco.cd.kamcoback.common.utils.Enums;
import com.kamco.cd.kamcoback.common.utils.interfaces.JsonFormatDttm;
import com.kamco.cd.kamcoback.config.enums.EnumType;
import io.swagger.v3.oas.annotations.media.Schema;
@@ -149,7 +151,6 @@ public class MapSheetMngDto {
@Schema(name = "ErrorDataDto", description = "영상관리 오류데이터 검색 리턴")
@Getter
@Setter
@NoArgsConstructor
public static class ErrorDataDto {
// private Integer rowNum;
private Long hstUid;
@@ -158,12 +159,16 @@ public class MapSheetMngDto {
private String mapSrcName;
private Integer mapCodeSrc;
@JsonFormatDttm private ZonedDateTime createdDttm;
private String syncState;
private String syncCheckState;
// private Long fileUid;
private String tfwFileName;
private String tifFileName;
private String syncState;
private String syncStateName;
private String syncTfwFileName;
private String syncTifFileName;
private String errorCheckState;
private String errorCheckStateName;
private String errorCheckTfwFileName;
private String errorCheckTifFileName;
// private List<MngFIleDto> fileArray;
@@ -175,9 +180,11 @@ public class MapSheetMngDto {
Integer mapCodeSrc,
ZonedDateTime createdDttm,
String syncState,
String syncCheckState,
String tfwFileName,
String tifFileName) {
String syncTfwFileName,
String syncTifFileName,
String errorCheckState,
String errorCheckTfwFileName,
String errorCheckTifFileName) {
this.hstUid = hstUid;
this.map50kName = map50kName;
this.map5kName = map5kName;
@@ -185,9 +192,20 @@ public class MapSheetMngDto {
this.mapCodeSrc = mapCodeSrc;
this.createdDttm = createdDttm;
this.syncState = syncState;
this.syncCheckState = syncCheckState;
this.tfwFileName = tfwFileName;
this.tifFileName = tifFileName;
this.syncStateName = getSyncStateName(syncState);
this.syncTfwFileName = syncTfwFileName;
this.syncTifFileName = syncTifFileName;
this.errorCheckState = errorCheckState;
this.errorCheckStateName = getSyncStateName(errorCheckState);
this.errorCheckTfwFileName = errorCheckTfwFileName;
this.errorCheckTifFileName = errorCheckTifFileName;
}
private String getSyncStateName(String enumId) {
if (enumId == null || enumId.isEmpty()) enumId = "NOTYET";
SyncStateType type = Enums.fromId(SyncStateType.class, enumId);
return type.getText();
}
}
@@ -233,32 +251,12 @@ public class MapSheetMngDto {
}
}
@Getter
@AllArgsConstructor
public enum SyncState implements EnumType {
COMPLETE("동기화 완료"),
IN_PROGRESS("진행중"),
FAIL("오류"),
NONE("미진행");
private final String desc;
@Override
public String getId() {
return name();
}
@Override
public String getText() {
return desc;
}
}
@Getter
@AllArgsConstructor
public enum DataState implements EnumType {
SUCCESS("정상"),
FAIL("데이터 없음");
NOTYET("대기중"),
PROCESSING("진행중"),
DONE("완료");
private final String desc;

View File

@@ -87,4 +87,20 @@ public class MapSheetMngHstEntity extends CommonDateEntity {
@Column(name = "total_size_bytes")
private Long totalSizeBytes;
@Size(max = 100)
@Column(name = "sync_tif_file_name", length = 100)
private String syncTifFileName;
@Size(max = 100)
@Column(name = "sync_tfw_file_name", length = 100)
private String syncTfwFileName;
@Size(max = 100)
@Column(name = "sync_check_tif_file_name", length = 100)
private String syncCheckTifFileName;
@Size(max = 100)
@Column(name = "sync_check_tfw_file_name", length = 100)
private String syncCheckTfwFileName;
}

View File

@@ -339,20 +339,15 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
mapInkx5kEntity.fid,
mapSheetMngHstEntity.createdDate,
mapSheetMngHstEntity.syncState,
mapSheetMngHstEntity.syncTfwFileName,
mapSheetMngHstEntity.syncTifFileName,
mapSheetMngHstEntity.syncCheckState,
Expressions.stringTemplate(
"MAX(CASE WHEN {0} = 'tfw' THEN {1} END)",
mapSheetMngFileEntity.fileExt, mapSheetMngFileEntity.fileName),
Expressions.stringTemplate(
"MAX(CASE WHEN {0} = 'tif' THEN {1} END)",
mapSheetMngFileEntity.fileExt, mapSheetMngFileEntity.fileName)))
mapSheetMngHstEntity.syncCheckTfwFileName,
mapSheetMngHstEntity.syncCheckTifFileName))
.from(mapSheetMngHstEntity)
.innerJoin(mapInkx5kEntity)
.on(mapSheetMngHstEntity.mapSheetNum.eq(mapInkx5kEntity.mapidcdNo))
.leftJoin(mapSheetMngFileEntity)
.on(mapSheetMngHstEntity.hstUid.eq(mapSheetMngFileEntity.hstUid))
.where(whereBuilder)
.groupBy(mapSheetMngHstEntity.hstUid, mapInkx5kEntity.fid, mapInkx5kEntity.mapidNm)
.orderBy(mapSheetMngHstEntity.createdDate.desc())
.offset(pageable.getOffset())
.limit(pageable.getPageSize())