영상관리 상세 추가
This commit is contained in:
@@ -46,6 +46,26 @@ public class MapSheetMngApiController {
|
||||
return ApiResponseDto.ok(mapSheetMngService.findMapSheetMngList(searchReq));
|
||||
}
|
||||
|
||||
@Operation(summary = "영상데이터관리 상세", description = "영상데이터관리 상세")
|
||||
@ApiResponses(
|
||||
value = {
|
||||
@ApiResponse(
|
||||
responseCode = "200",
|
||||
description = "조회 성공",
|
||||
content =
|
||||
@Content(
|
||||
mediaType = "application/json",
|
||||
schema = @Schema(implementation = CommonCodeDto.Basic.class))),
|
||||
@ApiResponse(responseCode = "404", description = "코드를 찾을 수 없음", content = @Content),
|
||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||
})
|
||||
@GetMapping("/mng")
|
||||
public ApiResponseDto<MapSheetMngDto.MngDto> findMapSheetMng(
|
||||
@RequestParam int mngYyyy) {
|
||||
|
||||
return ApiResponseDto.ok(mapSheetMngService.findMapSheetMng(mngYyyy));
|
||||
}
|
||||
|
||||
@Operation(summary = "영상관리 > 데이터 등록", description = "영상관리 > 데이터 등록")
|
||||
@ApiResponses(
|
||||
value = {
|
||||
|
||||
@@ -212,14 +212,21 @@ public class MapSheetMngService {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public Page<MapSheetMngDto.MngDto> findMapSheetMngList(MapSheetMngDto.MngSearchReq searchReq) {
|
||||
return mapSheetMngCoreService.findMapSheetMngList(searchReq);
|
||||
}
|
||||
|
||||
public MapSheetMngDto.MngDto findMapSheetMng(int mngYyyy) {
|
||||
return mapSheetMngCoreService.findMapSheetMng(mngYyyy);
|
||||
}
|
||||
|
||||
public Page<MapSheetMngDto.ErrorDataDto> findMapSheetErrorList(
|
||||
MapSheetMngDto.@Valid ErrorSearchReq searchReq) {
|
||||
return mapSheetMngCoreService.findMapSheetErrorList(searchReq);
|
||||
}
|
||||
|
||||
public Page<MapSheetMngDto.MngDto> findMapSheetMngList(MapSheetMngDto.MngSearchReq searchReq) {
|
||||
return mapSheetMngCoreService.findMapSheetMngList(searchReq);
|
||||
}
|
||||
|
||||
|
||||
@Transactional
|
||||
public MapSheetMngDto.DmlReturn mngDataSave(MapSheetMngDto.AddReq AddReq) {
|
||||
|
||||
@@ -42,6 +42,10 @@ public class MapSheetMngCoreService {
|
||||
return mapSheetMngRepository.findMapSheetMngList(searchReq);
|
||||
}
|
||||
|
||||
public MapSheetMngDto.MngDto findMapSheetMng(int mngYyyy) {
|
||||
return mapSheetMngRepository.findMapSheetMng(mngYyyy);
|
||||
}
|
||||
|
||||
public MapSheetMngDto.DmlReturn uploadProcess(@Valid List<Long> hstUidList) {
|
||||
int count = 0;
|
||||
if (!Objects.isNull(hstUidList) && !hstUidList.isEmpty()) {
|
||||
|
||||
@@ -10,6 +10,8 @@ public interface MapSheetMngRepositoryCustom {
|
||||
|
||||
Page<MapSheetMngDto.MngDto> findMapSheetMngList(MapSheetMngDto.MngSearchReq searchReq);
|
||||
|
||||
MapSheetMngDto.MngDto findMapSheetMng(int mngYyyy);
|
||||
|
||||
Optional<MapSheetMngHstEntity> findMapSheetMngHstInfo(Long hstUid);
|
||||
|
||||
int insertMapSheetOrgDataToMapSheetMngHst(int mngYyyy);
|
||||
|
||||
@@ -171,6 +171,106 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
|
||||
return new PageImpl<>(foundContent, pageable, countQuery);
|
||||
}
|
||||
|
||||
public MapSheetMngDto.MngDto findMapSheetMng(int mngYyyy){
|
||||
|
||||
BooleanBuilder whereBuilder = new BooleanBuilder();
|
||||
whereBuilder.and(mapSheetMngEntity.mngYyyy.eq(mngYyyy));
|
||||
|
||||
MapSheetMngDto.MngDto foundContent =
|
||||
queryFactory
|
||||
.select(
|
||||
Projections.constructor(
|
||||
MapSheetMngDto.MngDto.class,
|
||||
Expressions.numberTemplate(
|
||||
Integer.class,
|
||||
"row_number() over(order by {0} desc)",
|
||||
mapSheetMngEntity.createdDttm),
|
||||
mapSheetMngEntity.mngYyyy,
|
||||
mapSheetMngEntity.mngState,
|
||||
mapSheetMngEntity.syncState,
|
||||
mapSheetMngEntity.syncCheckState,
|
||||
mapSheetMngHstEntity.count(),
|
||||
new CaseBuilder()
|
||||
.when(mapSheetMngHstEntity.dataState.eq("DONE"))
|
||||
.then(1L)
|
||||
.otherwise(0L)
|
||||
.sum()
|
||||
.as("syncStateDoneCnt"),
|
||||
new CaseBuilder()
|
||||
.when(mapSheetMngHstEntity.syncState.ne("NOTYET"))
|
||||
.then(1L)
|
||||
.otherwise(0L)
|
||||
.sum(),
|
||||
new CaseBuilder()
|
||||
.when(
|
||||
mapSheetMngHstEntity
|
||||
.syncState
|
||||
.eq("NOFILE")
|
||||
.or(mapSheetMngHstEntity.syncState.eq("NOTPAIR")))
|
||||
.then(1L)
|
||||
.otherwise(0L)
|
||||
.sum(),
|
||||
new CaseBuilder()
|
||||
.when(
|
||||
mapSheetMngHstEntity
|
||||
.syncCheckState
|
||||
.eq("DONE")
|
||||
.and(
|
||||
mapSheetMngHstEntity
|
||||
.syncState
|
||||
.eq("NOFILE")
|
||||
.or(mapSheetMngHstEntity.syncState.eq("NOTPAIR"))))
|
||||
.then(1L)
|
||||
.otherwise(0L)
|
||||
.sum(),
|
||||
new CaseBuilder()
|
||||
.when(mapSheetMngHstEntity.syncState.eq("DUPLICATE"))
|
||||
.then(1L)
|
||||
.otherwise(0L)
|
||||
.sum(),
|
||||
new CaseBuilder()
|
||||
.when(
|
||||
mapSheetMngHstEntity
|
||||
.syncCheckState
|
||||
.eq("DONE")
|
||||
.and(mapSheetMngHstEntity.syncState.eq("DUPLICATE")))
|
||||
.then(1L)
|
||||
.otherwise(0L)
|
||||
.sum(),
|
||||
new CaseBuilder()
|
||||
.when(
|
||||
mapSheetMngHstEntity
|
||||
.syncState
|
||||
.eq("TYPEERROR")
|
||||
.or(mapSheetMngHstEntity.syncState.eq("SIZEERROR")))
|
||||
.then(1L)
|
||||
.otherwise(0L)
|
||||
.sum(),
|
||||
new CaseBuilder()
|
||||
.when(
|
||||
mapSheetMngHstEntity
|
||||
.syncCheckState
|
||||
.eq("DONE")
|
||||
.and(
|
||||
mapSheetMngHstEntity
|
||||
.syncState
|
||||
.eq("TYPEERROR")
|
||||
.or(mapSheetMngHstEntity.syncState.eq("SIZEERROR"))))
|
||||
.then(1L)
|
||||
.otherwise(0L)
|
||||
.sum(),
|
||||
mapSheetMngEntity.createdDttm,
|
||||
mapSheetMngHstEntity.syncEndDttm.max()))
|
||||
.from(mapSheetMngEntity)
|
||||
.leftJoin(mapSheetMngHstEntity)
|
||||
.on(mapSheetMngEntity.mngYyyy.eq(mapSheetMngHstEntity.mngYyyy))
|
||||
.where(whereBuilder)
|
||||
.groupBy(mapSheetMngEntity.mngYyyy)
|
||||
.fetchOne();
|
||||
|
||||
return foundContent;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<MapSheetMngDto.ErrorDataDto> findMapSheetErrorList(
|
||||
MapSheetMngDto.@Valid ErrorSearchReq searchReq) {
|
||||
|
||||
Reference in New Issue
Block a user