Merge pull request 'feat/infer_dev_260107' (#249) from feat/infer_dev_260107 into develop
Reviewed-on: https://kamco.gitea.gs.dabeeo.com/dabeeo/kamco-dabeeo-backoffice/pulls/249
This commit is contained in:
@@ -5,6 +5,7 @@ import com.kamco.cd.kamcoback.inference.dto.InferenceDetailDto;
|
|||||||
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto;
|
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto;
|
||||||
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.InferenceServerStatusDto;
|
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.InferenceServerStatusDto;
|
||||||
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.InferenceStatusDetailDto;
|
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.InferenceStatusDetailDto;
|
||||||
|
import com.kamco.cd.kamcoback.mapsheet.dto.MapSheetMngDto.MngYyyyDto;
|
||||||
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.ResultList;
|
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.ResultList;
|
||||||
import com.kamco.cd.kamcoback.inference.service.InferenceResultService;
|
import com.kamco.cd.kamcoback.inference.service.InferenceResultService;
|
||||||
import com.kamco.cd.kamcoback.mapsheet.service.MapSheetMngService;
|
import com.kamco.cd.kamcoback.mapsheet.service.MapSheetMngService;
|
||||||
@@ -111,7 +112,7 @@ public class InferenceResultApiController {
|
|||||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||||
})
|
})
|
||||||
@GetMapping("/years")
|
@GetMapping("/years")
|
||||||
public ApiResponseDto<List<Integer>> findMapSheetMngDoneYyyyList() {
|
public ApiResponseDto<List<MngYyyyDto>> findMapSheetMngDoneYyyyList() {
|
||||||
return ApiResponseDto.ok(mapSheetMngService.findMapSheetMngDoneYyyyList());
|
return ApiResponseDto.ok(mapSheetMngService.findMapSheetMngDoneYyyyList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -619,4 +619,8 @@ public class InferenceResultDto {
|
|||||||
private Integer completedJobs;
|
private Integer completedJobs;
|
||||||
private Integer failedJobs;
|
private Integer failedJobs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,12 +22,7 @@ public class LabelAllocateDto {
|
|||||||
public enum LabelMngState implements EnumType {
|
public enum LabelMngState implements EnumType {
|
||||||
PENDING("작업대기"),
|
PENDING("작업대기"),
|
||||||
ASSIGNED("작업할당"),
|
ASSIGNED("작업할당"),
|
||||||
STOP("중단"),
|
ING("진행중"),
|
||||||
LABEL_ING("라벨진행중"),
|
|
||||||
LABEL_COMPLETE("라벨완료"),
|
|
||||||
INSPECT_REQ("검수요청"),
|
|
||||||
INSPECT_ING("검수진행중"),
|
|
||||||
INSPECT_COMPLETE("검수완료"),
|
|
||||||
FINISH("종료");
|
FINISH("종료");
|
||||||
|
|
||||||
private String desc;
|
private String desc;
|
||||||
|
|||||||
@@ -85,9 +85,7 @@ public class LabelWorkDto {
|
|||||||
} else if (this.labelTotCnt > 0 && this.labelAssignCnt > 0 && this.labelCompleteTotCnt == 0) {
|
} else if (this.labelTotCnt > 0 && this.labelAssignCnt > 0 && this.labelCompleteTotCnt == 0) {
|
||||||
mngState = LabelMngState.ASSIGNED.getId();
|
mngState = LabelMngState.ASSIGNED.getId();
|
||||||
} else if (this.labelCompleteTotCnt > 0) {
|
} else if (this.labelCompleteTotCnt > 0) {
|
||||||
mngState = LabelMngState.LABEL_ING.getId();
|
mngState = LabelMngState.ING.getId();
|
||||||
} else if (this.labelTotCnt <= labelCompleteTotCnt) {
|
|
||||||
mngState = LabelMngState.LABEL_COMPLETE.getId();
|
|
||||||
} else if (this.labelingClosedYn.equals("Y") && this.inspectionClosedYn.equals("Y")) {
|
} else if (this.labelingClosedYn.equals("Y") && this.inspectionClosedYn.equals("Y")) {
|
||||||
mngState = LabelMngState.FINISH.getId();
|
mngState = LabelMngState.FINISH.getId();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import com.kamco.cd.kamcoback.mapsheet.dto.FileDto.FoldersDto;
|
|||||||
import com.kamco.cd.kamcoback.mapsheet.dto.FileDto.SrchFilesDto;
|
import com.kamco.cd.kamcoback.mapsheet.dto.FileDto.SrchFilesDto;
|
||||||
import com.kamco.cd.kamcoback.mapsheet.dto.FileDto.SrchFoldersDto;
|
import com.kamco.cd.kamcoback.mapsheet.dto.FileDto.SrchFoldersDto;
|
||||||
import com.kamco.cd.kamcoback.mapsheet.dto.MapSheetMngDto;
|
import com.kamco.cd.kamcoback.mapsheet.dto.MapSheetMngDto;
|
||||||
|
import com.kamco.cd.kamcoback.mapsheet.dto.MapSheetMngDto.MngYyyyDto;
|
||||||
import com.kamco.cd.kamcoback.mapsheet.service.MapSheetMngService;
|
import com.kamco.cd.kamcoback.mapsheet.service.MapSheetMngService;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.media.Content;
|
import io.swagger.v3.oas.annotations.media.Content;
|
||||||
@@ -295,7 +296,7 @@ public class MapSheetMngApiController {
|
|||||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||||
})
|
})
|
||||||
@PostMapping("/mng-done-yyyy-list")
|
@PostMapping("/mng-done-yyyy-list")
|
||||||
public ApiResponseDto<List<Integer>> findMapSheetMngDoneYyyyList() {
|
public ApiResponseDto<List<MngYyyyDto>> findMapSheetMngDoneYyyyList() {
|
||||||
|
|
||||||
return ApiResponseDto.ok(mapSheetMngService.findMapSheetMngDoneYyyyList());
|
return ApiResponseDto.ok(mapSheetMngService.findMapSheetMngDoneYyyyList());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -452,4 +452,13 @@ public class MapSheetMngDto {
|
|||||||
private String mapSheetNum;
|
private String mapSheetNum;
|
||||||
private Integer beforeYear;
|
private Integer beforeYear;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public static class MngYyyyDto {
|
||||||
|
private Integer yyyy;
|
||||||
|
private String mngPath;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import com.kamco.cd.kamcoback.mapsheet.dto.MapSheetMngDto.ErrorDataDto;
|
|||||||
import com.kamco.cd.kamcoback.mapsheet.dto.MapSheetMngDto.ErrorSearchReq;
|
import com.kamco.cd.kamcoback.mapsheet.dto.MapSheetMngDto.ErrorSearchReq;
|
||||||
import com.kamco.cd.kamcoback.mapsheet.dto.MapSheetMngDto.MngDto;
|
import com.kamco.cd.kamcoback.mapsheet.dto.MapSheetMngDto.MngDto;
|
||||||
import com.kamco.cd.kamcoback.mapsheet.dto.MapSheetMngDto.MngFilesDto;
|
import com.kamco.cd.kamcoback.mapsheet.dto.MapSheetMngDto.MngFilesDto;
|
||||||
|
import com.kamco.cd.kamcoback.mapsheet.dto.MapSheetMngDto.MngYyyyDto;
|
||||||
import com.kamco.cd.kamcoback.mapsheet.dto.MapSheetMngDto.YearSearchReq;
|
import com.kamco.cd.kamcoback.mapsheet.dto.MapSheetMngDto.YearSearchReq;
|
||||||
import com.kamco.cd.kamcoback.postgres.core.MapSheetMngCoreService;
|
import com.kamco.cd.kamcoback.postgres.core.MapSheetMngCoreService;
|
||||||
import com.kamco.cd.kamcoback.postgres.entity.YearEntity;
|
import com.kamco.cd.kamcoback.postgres.entity.YearEntity;
|
||||||
@@ -339,13 +340,13 @@ public class MapSheetMngService {
|
|||||||
mapSheetMngCoreService.getSceneInference(yyyy);
|
mapSheetMngCoreService.getSceneInference(yyyy);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Integer> findMapSheetMngDoneYyyyList() {
|
public List<MngYyyyDto> findMapSheetMngDoneYyyyList() {
|
||||||
|
|
||||||
List<MngDto> mngList = mapSheetMngCoreService.findMapSheetMngList();
|
List<MngDto> mngList = mapSheetMngCoreService.findMapSheetMngList();
|
||||||
List<Integer> yearList =
|
List<MngYyyyDto> yearList =
|
||||||
mngList.stream()
|
mngList.stream()
|
||||||
.filter(dto -> "DONE".equals(dto.getMngState()))
|
.filter(dto -> "DONE".equals(dto.getMngState()))
|
||||||
.map(dto -> dto.getMngYyyy()) // 날짜 객체에서 연도(int)만 추출
|
.map(dto -> new MngYyyyDto(dto.getMngYyyy(), dto.getMngPath()) )
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
return yearList;
|
return yearList;
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ import java.util.stream.Collectors;
|
|||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.apache.commons.io.FilenameUtils;
|
import org.apache.commons.io.FilenameUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
@@ -35,6 +36,15 @@ public class MapSheetMngFileJobService {
|
|||||||
|
|
||||||
private final MapSheetMngFileJobCoreService mapSheetMngFileJobCoreService;
|
private final MapSheetMngFileJobCoreService mapSheetMngFileJobCoreService;
|
||||||
|
|
||||||
|
@Value("${file.sync-root-dir}")
|
||||||
|
private String syncRootDir;
|
||||||
|
|
||||||
|
@Value("${file.sync-tmp-dir}")
|
||||||
|
private String syncTmpDir;
|
||||||
|
|
||||||
|
@Value("${file.sync-file-extention}")
|
||||||
|
private String syncFileExtention;
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public void checkMapSheetFileProcess(long targetNum, int mngSyncPageSize) {
|
public void checkMapSheetFileProcess(long targetNum, int mngSyncPageSize) {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user