영상데이터 관리 > 오류 처리 내역 수정
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.kamco.cd.kamcoback.mapsheet.dto;
|
||||
|
||||
import com.kamco.cd.kamcoback.common.enums.RoleType;
|
||||
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;
|
||||
@@ -150,7 +153,6 @@ public class MapSheetMngDto {
|
||||
@Schema(name = "ErrorDataDto", description = "영상관리 오류데이터 검색 리턴")
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
public static class ErrorDataDto {
|
||||
// private Integer rowNum;
|
||||
private Long hstUid;
|
||||
@@ -159,12 +161,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;
|
||||
|
||||
@@ -177,9 +183,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;
|
||||
@@ -187,9 +195,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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -235,32 +254,14 @@ 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;
|
||||
|
||||
|
||||
@@ -87,4 +87,21 @@ 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;
|
||||
|
||||
}
|
||||
|
||||
@@ -340,22 +340,16 @@ 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())
|
||||
|
||||
Reference in New Issue
Block a user