spotlessApply 적용 #170
@@ -274,19 +274,20 @@ public class DatasetApiController {
|
||||
|
||||
@Operation(summary = "납품 학습데이터셋 등록", description = "납품 학습데이터셋 등록 API")
|
||||
@ApiResponses(
|
||||
value = {
|
||||
@ApiResponse(
|
||||
responseCode = "200",
|
||||
description = "등록 성공",
|
||||
content =
|
||||
@Content(
|
||||
mediaType = "application/json",
|
||||
schema = @Schema(implementation = Page.class))),
|
||||
@ApiResponse(responseCode = "404", description = "조회 오류", content = @Content),
|
||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||
})
|
||||
value = {
|
||||
@ApiResponse(
|
||||
responseCode = "200",
|
||||
description = "등록 성공",
|
||||
content =
|
||||
@Content(
|
||||
mediaType = "application/json",
|
||||
schema = @Schema(implementation = Page.class))),
|
||||
@ApiResponse(responseCode = "404", description = "조회 오류", content = @Content),
|
||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||
})
|
||||
@PostMapping("/deliveries")
|
||||
public ApiResponseDto<ResponseObj> insertDeliveriesDataset(@RequestBody AddDeliveriesReq req) throws IOException {
|
||||
public ApiResponseDto<ResponseObj> insertDeliveriesDataset(@RequestBody AddDeliveriesReq req)
|
||||
throws IOException {
|
||||
return ApiResponseDto.createOK(datasetService.insertDeliveriesDataset(req));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,8 +62,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
public class DatasetService {
|
||||
|
||||
private final DatasetCoreService datasetCoreService;
|
||||
@PersistenceContext
|
||||
private EntityManager em;
|
||||
@PersistenceContext private EntityManager em;
|
||||
private final ObjectMapper mapper = new ObjectMapper();
|
||||
|
||||
@Value("${file.dataset-dir}")
|
||||
@@ -615,6 +614,7 @@ public class DatasetService {
|
||||
|
||||
/**
|
||||
* 납품 데이터 등록
|
||||
*
|
||||
* @param req 폴더경로, 메모
|
||||
* @return 성공/실패 여부
|
||||
*/
|
||||
@@ -627,10 +627,7 @@ public class DatasetService {
|
||||
|
||||
DatasetMngRegDto datasetMngRegDto = new DatasetMngRegDto();
|
||||
|
||||
String uid = UUID.randomUUID()
|
||||
.toString()
|
||||
.replace("-", "")
|
||||
.toUpperCase();
|
||||
String uid = UUID.randomUUID().toString().replace("-", "").toUpperCase();
|
||||
|
||||
datasetMngRegDto.setUid(uid);
|
||||
datasetMngRegDto.setDataType("DELIVER");
|
||||
@@ -654,8 +651,7 @@ public class DatasetService {
|
||||
|
||||
datasetCoreService.updateDatasetUploadStatus(datasetUid);
|
||||
|
||||
log.info("========== 전체 완료. 총 소요시간: {} ms ==========",
|
||||
System.currentTimeMillis() - startTime);
|
||||
log.info("========== 전체 완료. 총 소요시간: {} ms ==========", System.currentTimeMillis() - startTime);
|
||||
|
||||
return new ResponseObj(ApiResponseCode.OK, "업로드 성공하였습니다.");
|
||||
}
|
||||
@@ -681,8 +677,11 @@ public class DatasetService {
|
||||
}
|
||||
}
|
||||
|
||||
log.info("[{}] 완료. 총 {}건, 소요시간: {} ms",
|
||||
type.toUpperCase(), count, System.currentTimeMillis() - start);
|
||||
log.info(
|
||||
"[{}] 완료. 총 {}건, 소요시간: {} ms",
|
||||
type.toUpperCase(),
|
||||
count,
|
||||
System.currentTimeMillis() - start);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
@@ -733,20 +732,20 @@ public class DatasetService {
|
||||
root.set("features", features);
|
||||
|
||||
DatasetObjRegDto objRegDto =
|
||||
DatasetObjRegDto.builder()
|
||||
.datasetUid(datasetUid)
|
||||
.compareYyyy(Integer.parseInt(compareYyyy))
|
||||
.compareClassCd(compareClassCd)
|
||||
.targetYyyy(Integer.parseInt(targetYyyy))
|
||||
.targetClassCd(targetClassCd)
|
||||
.comparePath(comparePath)
|
||||
.targetPath(targetPath)
|
||||
.labelPath(labelPath)
|
||||
.mapSheetNum(mapSheetNum)
|
||||
.geojson(root)
|
||||
.geojsonPath(geojsonPath)
|
||||
.fileName(fileName)
|
||||
.build();
|
||||
DatasetObjRegDto.builder()
|
||||
.datasetUid(datasetUid)
|
||||
.compareYyyy(Integer.parseInt(compareYyyy))
|
||||
.compareClassCd(compareClassCd)
|
||||
.targetYyyy(Integer.parseInt(targetYyyy))
|
||||
.targetClassCd(targetClassCd)
|
||||
.comparePath(comparePath)
|
||||
.targetPath(targetPath)
|
||||
.labelPath(labelPath)
|
||||
.mapSheetNum(mapSheetNum)
|
||||
.geojson(root)
|
||||
.geojsonPath(geojsonPath)
|
||||
.fileName(fileName)
|
||||
.build();
|
||||
|
||||
// insert
|
||||
if (subDir.equals("train")) {
|
||||
@@ -766,24 +765,3 @@ public class DatasetService {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@ import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.transaction.support.TransactionSynchronizationManager;
|
||||
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
|
||||
Reference in New Issue
Block a user