영상관리 수정
This commit is contained in:
@@ -9,10 +9,10 @@ import lombok.Getter;
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum MngStateType implements EnumType {
|
||||
NOTYET("미처리"),
|
||||
PROCESSING("진행중"),
|
||||
DONE("싱크완료"),
|
||||
COMPLETE("작업완료");
|
||||
NOTYET("동기화 시작"),
|
||||
PROCESSING("데이터 체크"),
|
||||
DONE("동기화작업종료"),
|
||||
TAKINGERROR("오류 데이터 처리중");
|
||||
|
||||
private final String desc;
|
||||
|
||||
|
||||
@@ -13,8 +13,7 @@ public enum SyncStateType implements EnumType {
|
||||
NOFILE("파일없음"),
|
||||
NOTPAIR("페어파일누락"),
|
||||
DUPLICATE("파일중복"),
|
||||
SIZEERROR("파일용량오류"),
|
||||
TYPEERROR("파일형식오류"),
|
||||
TYPEERROR("손상파일"),
|
||||
DONE("완료");
|
||||
|
||||
private final String desc;
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.kamco.cd.kamcoback.common.utils;
|
||||
|
||||
import static java.lang.String.CASE_INSENSITIVE_ORDER;
|
||||
|
||||
import com.kamco.cd.kamcoback.mapsheet.dto.MapSheetMngDto.DmlReturn;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
@@ -29,6 +30,7 @@ import lombok.Getter;
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
import org.geotools.coverage.grid.GridCoverage2D;
|
||||
import org.geotools.gce.geotiff.GeoTiffReader;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
public class FIleChecker {
|
||||
|
||||
@@ -455,6 +457,17 @@ public class FIleChecker {
|
||||
return FIleChecker.getFilesFromAllDepth(dir, targetFileNm, extension, 100, "name", 0, 100);
|
||||
}
|
||||
|
||||
public static int getFileCountFromAllDepth(
|
||||
String dir, String targetFileNm, String extension) {
|
||||
|
||||
List<FIleChecker.Basic> basicList =
|
||||
FIleChecker.getFilesFromAllDepth(dir, targetFileNm, extension);
|
||||
|
||||
return (int) basicList.stream()
|
||||
.filter(dto -> dto.getExtension().toString().equals(extension))
|
||||
.count();
|
||||
}
|
||||
|
||||
public static Long getFileTotSize(List<FIleChecker.Basic> files) {
|
||||
|
||||
Long fileTotSize = 0L;
|
||||
@@ -465,6 +478,16 @@ public class FIleChecker {
|
||||
return fileTotSize;
|
||||
}
|
||||
|
||||
public static boolean validationMultipart(MultipartFile mfile)
|
||||
{
|
||||
// 파일 유효성 검증
|
||||
if (mfile == null || mfile.isEmpty() || mfile.getSize() == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public static boolean checkExtensions(String fileName, String ext) {
|
||||
if (fileName == null) return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user