동영상관리 추가 및 수정
This commit is contained in:
@@ -26,17 +26,7 @@ public class MapSheetMngApiController {
|
||||
private final CommonCodeService commonCodeService;
|
||||
private final MapSheetMngService mapSheetMngService;
|
||||
|
||||
/**
|
||||
* 오류데이터 목록 조회
|
||||
*
|
||||
* @param searchReq
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/error-list")
|
||||
public ApiResponseDto<Page<MapSheetMngDto.ErrorDataDto>> findMapSheetErrorList(
|
||||
@RequestBody @Valid MapSheetMngDto.searchReq searchReq) {
|
||||
return ApiResponseDto.ok(mapSheetMngService.findMapSheetErrorList(searchReq));
|
||||
}
|
||||
|
||||
|
||||
@Operation(summary = "영상데이터관리목록 조회", description = "영상데이터관리목록 조회")
|
||||
@ApiResponses(
|
||||
@@ -53,7 +43,7 @@ public class MapSheetMngApiController {
|
||||
})
|
||||
@PostMapping("/mng-list")
|
||||
public ApiResponseDto<Page<MapSheetMngDto.MngDto>> findMapSheetMngList(
|
||||
@RequestBody @Valid MapSheetMngDto.searchReq searchReq) {
|
||||
@RequestBody MapSheetMngDto.MngSearchReq searchReq) {
|
||||
return ApiResponseDto.ok(mapSheetMngService.findMapSheetMngList(searchReq));
|
||||
}
|
||||
|
||||
@@ -77,6 +67,21 @@ public class MapSheetMngApiController {
|
||||
return ApiResponseDto.ok(mapSheetMngService.mngDataSave(AddReq));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 오류데이터 목록 조회
|
||||
*
|
||||
* @param searchReq
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/error-list")
|
||||
public ApiResponseDto<Page<MapSheetMngDto.ErrorDataDto>> findMapSheetErrorList(
|
||||
@RequestBody @Valid MapSheetMngDto.ErrorSearchReq searchReq) {
|
||||
return ApiResponseDto.ok(mapSheetMngService.findMapSheetErrorList(searchReq));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param hstUidList
|
||||
* @return
|
||||
@@ -86,7 +91,7 @@ public class MapSheetMngApiController {
|
||||
value = {
|
||||
@ApiResponse(
|
||||
responseCode = "201",
|
||||
description = "공통코드 저장 성공",
|
||||
description = "업로드 처리 성공",
|
||||
content =
|
||||
@Content(
|
||||
mediaType = "application/json",
|
||||
|
||||
@@ -14,12 +14,12 @@ import org.springframework.data.domain.Sort;
|
||||
|
||||
public class MapSheetMngDto {
|
||||
|
||||
@Schema(name = "searchReq", description = "영상관리 오류데이터 검색 요청")
|
||||
@Schema(name = "MngSearchReq", description = "영상관리 검색 요청")
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class searchReq {
|
||||
public static class MngSearchReq {
|
||||
|
||||
// 페이징 파라미터
|
||||
@Schema(description = "페이지 번호 (0부터 시작) ", example = "0")
|
||||
@@ -28,42 +28,14 @@ public class MapSheetMngDto {
|
||||
@Schema(description = "페이지 크기", example = "20")
|
||||
private int size = 20;
|
||||
|
||||
@Schema(description = "정렬", example = "id desc")
|
||||
private String sort;
|
||||
|
||||
@Schema(description = "검색어", example = "부산3959")
|
||||
private String searchValue;
|
||||
|
||||
@Schema(description = "년도", example = "2025")
|
||||
private Integer mngYyyy;
|
||||
|
||||
public Pageable toPageable() {
|
||||
if (sort != null && !sort.isEmpty()) {
|
||||
String[] sortParams = sort.split(",");
|
||||
String property = sortParams[0];
|
||||
Sort.Direction direction =
|
||||
sortParams.length > 1 ? Sort.Direction.fromString(sortParams[1]) : Sort.Direction.ASC;
|
||||
return PageRequest.of(page, size, Sort.by(direction, property));
|
||||
}
|
||||
return PageRequest.of(page, size);
|
||||
}
|
||||
}
|
||||
|
||||
@Schema(name = "ErrorDataDto", description = "영상관리 오류데이터 검색 리턴")
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class ErrorDataDto {
|
||||
private Long hstUid;
|
||||
private Integer rowNum;
|
||||
private String map50kName;
|
||||
private String map5kName;
|
||||
private Integer mapCodeSrc;
|
||||
private String createdDttm;
|
||||
private DataState dataState;
|
||||
}
|
||||
|
||||
@Schema(name = "MngAddReq", description = "영상관리 생성 요청")
|
||||
@Getter
|
||||
@Setter
|
||||
@@ -98,6 +70,64 @@ public class MapSheetMngDto {
|
||||
@JsonFormatDttm private ZonedDateTime rgstEndDttm;
|
||||
}
|
||||
|
||||
|
||||
@Schema(name = "ErrorSearchReq", description = "영상관리 오류데이터 검색 요청")
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class ErrorSearchReq {
|
||||
|
||||
// 페이징 파라미터
|
||||
@Schema(description = "페이지 번호 (0부터 시작) ", example = "0")
|
||||
private int page = 0;
|
||||
|
||||
@Schema(description = "페이지 크기", example = "20")
|
||||
private int size = 20;
|
||||
|
||||
@Schema(description = "정렬", example = "id desc")
|
||||
private String sort;
|
||||
|
||||
@Schema(description = "검색어", example = "부산3959")
|
||||
private String searchValue;
|
||||
|
||||
@Schema(description = "년도", example = "2025")
|
||||
private Integer mngYyyy;
|
||||
|
||||
public Pageable toPageable() {
|
||||
if (sort != null && !sort.isEmpty()) {
|
||||
String[] sortParams = sort.split(",");
|
||||
String property = sortParams[0];
|
||||
Sort.Direction direction =
|
||||
sortParams.length > 1 ? Sort.Direction.fromString(sortParams[1]) : Sort.Direction.ASC;
|
||||
return PageRequest.of(page, size, Sort.by(direction, property));
|
||||
}
|
||||
return PageRequest.of(page, size);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Schema(name = "ErrorDataDto", description = "영상관리 오류데이터 검색 리턴")
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class ErrorDataDto {
|
||||
private Long hstUid;
|
||||
private Integer rowNum;
|
||||
private String map50kName;
|
||||
private String map5kName;
|
||||
private Integer mapCodeSrc;
|
||||
private String createdDttm;
|
||||
private DataState dataState;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Schema(name = "DmlReturn", description = "영상관리 DML 수행 후 리턴")
|
||||
@Getter
|
||||
@Setter
|
||||
|
||||
@@ -213,16 +213,17 @@ public class MapSheetMngService {
|
||||
}
|
||||
|
||||
public Page<MapSheetMngDto.ErrorDataDto> findMapSheetErrorList(
|
||||
MapSheetMngDto.@Valid searchReq searchReq) {
|
||||
MapSheetMngDto.@Valid ErrorSearchReq searchReq) {
|
||||
return mapSheetMngCoreService.findMapSheetErrorList(searchReq);
|
||||
}
|
||||
|
||||
public Page<MapSheetMngDto.MngDto> findMapSheetMngList(
|
||||
MapSheetMngDto.@Valid searchReq searchReq) {
|
||||
MapSheetMngDto.MngSearchReq searchReq) {
|
||||
return mapSheetMngCoreService.findMapSheetMngList(searchReq);
|
||||
}
|
||||
|
||||
public MapSheetMngDto.DmlReturn mngDataSave(@Valid MapSheetMngDto.AddReq AddReq) {
|
||||
@Transactional
|
||||
public MapSheetMngDto.DmlReturn mngDataSave(MapSheetMngDto.AddReq AddReq) {
|
||||
return mapSheetMngCoreService.mngDataSave(AddReq);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user