국유인 실태조사 bulk 확인
This commit is contained in:
@@ -77,4 +77,8 @@ public class GukYuinCoreService {
|
||||
public void updateMapSheetInferenceLabelEndStatus(Long learnId) {
|
||||
gukYuinRepository.updateMapSheetInferenceLabelEndStatus(learnId);
|
||||
}
|
||||
|
||||
public List<String> findStbltObjectIds(String uid, String mapSheetNum) {
|
||||
return gukYuinRepository.findStbltObjectIds(uid, mapSheetNum);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,10 +48,20 @@ public class MapSheetMngCoreService {
|
||||
@Value("${file.sync-root-dir}")
|
||||
private String syncRootDir;
|
||||
|
||||
/**
|
||||
* 영상데이터관리 > 목록 조회
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public List<MapSheetMngDto.MngDto> findMapSheetMngList() {
|
||||
return mapSheetMngRepository.findMapSheetMngList();
|
||||
}
|
||||
|
||||
/**
|
||||
* 영상데이터관리 > 데이터 등록 > 연도 선택 목록
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public List<Integer> findMapSheetMngYyyyList() {
|
||||
return mapSheetMngRepository.findMapSheetMngYyyyList();
|
||||
}
|
||||
@@ -68,6 +78,12 @@ public class MapSheetMngCoreService {
|
||||
return mapSheetMngRepository.getYears(req);
|
||||
}
|
||||
|
||||
/**
|
||||
* 영상데이터관리 > 상세 조회
|
||||
*
|
||||
* @param mngYyyy
|
||||
* @return
|
||||
*/
|
||||
public MapSheetMngDto.MngDto findMapSheetMng(int mngYyyy) {
|
||||
return mapSheetMngRepository.findMapSheetMng(mngYyyy);
|
||||
}
|
||||
@@ -95,15 +111,33 @@ public class MapSheetMngCoreService {
|
||||
mapSheetMngRepository.updateMapSheetMngHstSyncCheckState(reqDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 영상데이터관리 > 상세 > 오류 처리 내역
|
||||
*
|
||||
* @param searchReq 오류 검색 조건
|
||||
* @return
|
||||
*/
|
||||
public Page<MapSheetMngDto.ErrorDataDto> findMapSheetErrorList(
|
||||
MapSheetMngDto.@Valid ErrorSearchReq searchReq) {
|
||||
return mapSheetMngRepository.findMapSheetErrorList(searchReq);
|
||||
}
|
||||
|
||||
/**
|
||||
* hst 테이블에 선택한 hstUid row 정보 조회
|
||||
*
|
||||
* @param hstUid
|
||||
* @return
|
||||
*/
|
||||
public MapSheetMngDto.ErrorDataDto findMapSheetError(Long hstUid) {
|
||||
return mapSheetMngRepository.findMapSheetError(hstUid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 파일 목록으로 업로드 경로 확인
|
||||
*
|
||||
* @param hstUid
|
||||
* @return
|
||||
*/
|
||||
public List<MapSheetMngDto.MngFilesDto> findByHstUidMapSheetFileList(Long hstUid) {
|
||||
return mapSheetMngRepository.findByHstUidMapSheetFileList(hstUid);
|
||||
}
|
||||
@@ -146,12 +180,19 @@ public class MapSheetMngCoreService {
|
||||
entity.setCreatedUid(addReq.getCreatedUid());
|
||||
entity.setUpdatedUid(addReq.getCreatedUid());
|
||||
|
||||
// 같은 년도로 저장된 데이터가 있다면 삭제
|
||||
// tb_map_sheet_mng, tb_map_sheet_hst, tb_map_sheet_mng_files, tb_map_sheet_mng_tile
|
||||
mapSheetMngRepository.deleteByMngYyyyMngAll(addReq.getMngYyyy());
|
||||
|
||||
// tb_map_sheet_mng 엔티티 저장
|
||||
MapSheetMngEntity saved = mapSheetMngRepository.save(entity);
|
||||
|
||||
// 5k 도엽 기준으로 tb_map_sheet_hst 테이블에 먼저 insert 하기
|
||||
int hstCnt =
|
||||
mapSheetMngRepository.insertMapSheetOrgDataToMapSheetMngHst(
|
||||
saved.getMngYyyy(), saved.getMngPath());
|
||||
|
||||
// tb_year 에 해당 년도 완료로 업데이트
|
||||
mapSheetMngRepository.updateYearState(saved.getMngYyyy(), "DONE");
|
||||
|
||||
// 년도별 Tile 정보 등록
|
||||
|
||||
@@ -45,4 +45,6 @@ public interface GukYuinRepositoryCustom {
|
||||
void updateMapSheetLearnGukyuinEndStatus(Long learnId);
|
||||
|
||||
void updateMapSheetInferenceLabelEndStatus(Long learnId);
|
||||
|
||||
List<String> findStbltObjectIds(String uid, String mapSheetNum);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.kamco.cd.kamcoback.postgres.repository.gukyuin;
|
||||
|
||||
import static com.kamco.cd.kamcoback.postgres.entity.QLabelingAssignmentEntity.labelingAssignmentEntity;
|
||||
import static com.kamco.cd.kamcoback.postgres.entity.QMapSheetAnalDataInferenceEntity.mapSheetAnalDataInferenceEntity;
|
||||
import static com.kamco.cd.kamcoback.postgres.entity.QMapSheetAnalDataInferenceGeomEntity.mapSheetAnalDataInferenceGeomEntity;
|
||||
import static com.kamco.cd.kamcoback.postgres.entity.QMapSheetAnalInferenceEntity.mapSheetAnalInferenceEntity;
|
||||
import static com.kamco.cd.kamcoback.postgres.entity.QMapSheetLearnEntity.mapSheetLearnEntity;
|
||||
@@ -318,6 +319,23 @@ public class GukYuinRepositoryImpl implements GukYuinRepositoryCustom {
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> findStbltObjectIds(String uid, String mapSheetNum) {
|
||||
return queryFactory
|
||||
.select(mapSheetAnalDataInferenceGeomEntity.resultUid)
|
||||
.from(mapSheetLearnEntity)
|
||||
.innerJoin(mapSheetAnalInferenceEntity)
|
||||
.on(mapSheetLearnEntity.id.eq(mapSheetAnalInferenceEntity.learnId))
|
||||
.innerJoin(mapSheetAnalDataInferenceEntity)
|
||||
.on(mapSheetAnalInferenceEntity.id.eq(mapSheetAnalDataInferenceEntity.analUid))
|
||||
.innerJoin(mapSheetAnalDataInferenceGeomEntity)
|
||||
.on(mapSheetAnalDataInferenceEntity.id.eq(mapSheetAnalDataInferenceGeomEntity.dataUid))
|
||||
.where(
|
||||
mapSheetLearnEntity.uid.eq(uid),
|
||||
mapSheetAnalDataInferenceGeomEntity.mapSheetNum.eq(Long.valueOf(mapSheetNum)))
|
||||
.fetch();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void updateGukYuinApplyStateComplete(Long id, GukYuinStatus status) {
|
||||
|
||||
@@ -15,16 +15,39 @@ import org.springframework.data.domain.Page;
|
||||
|
||||
public interface MapSheetMngRepositoryCustom {
|
||||
|
||||
/**
|
||||
* 영상데이터관리 > 목록 조회
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<MapSheetMngDto.MngDto> findMapSheetMngList();
|
||||
|
||||
/**
|
||||
* 영상데이터관리 > 데이터 등록 > 연도 선택 목록
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<Integer> findMapSheetMngYyyyList();
|
||||
|
||||
/**
|
||||
* 영상데이터관리 > 상세 조회
|
||||
*
|
||||
* @param mngYyyy
|
||||
* @return
|
||||
*/
|
||||
MapSheetMngDto.MngDto findMapSheetMng(int mngYyyy);
|
||||
|
||||
void MapSheetMngComplete(int mngYyyy);
|
||||
|
||||
Optional<MapSheetMngHstEntity> findMapSheetMngHstInfo(Long hstUid);
|
||||
|
||||
/**
|
||||
* 5k 도엽 기준으로 tb_map_sheet_hst 테이블에 먼저 insert 하기
|
||||
*
|
||||
* @param mngYyyy
|
||||
* @param mngPath
|
||||
* @return
|
||||
*/
|
||||
int insertMapSheetOrgDataToMapSheetMngHst(int mngYyyy, String mngPath);
|
||||
|
||||
List<MapSheetMngDto.MngFilesDto> findHstUidToMapSheetFileList(Long hstUid);
|
||||
@@ -33,6 +56,11 @@ public interface MapSheetMngRepositoryCustom {
|
||||
|
||||
MapSheetMngDto.MngFilesDto findYyyyToMapSheetFilePathRefer(int mngYyyy);
|
||||
|
||||
/**
|
||||
* 같은 년도로 저장된 데이터가 있다면 삭제
|
||||
*
|
||||
* @param mngYyyy
|
||||
*/
|
||||
void deleteByMngYyyyMngAll(int mngYyyy);
|
||||
|
||||
void deleteByMngYyyyMng(int mngYyyy);
|
||||
@@ -53,13 +81,37 @@ public interface MapSheetMngRepositoryCustom {
|
||||
|
||||
void deleteByNotInFileUidMngFile(Long hstUid, List<Long> fileUids);
|
||||
|
||||
/**
|
||||
* tb_year 에 해당 년도 완료로 업데이트
|
||||
*
|
||||
* @param yyyy
|
||||
* @param status
|
||||
*/
|
||||
void updateYearState(int yyyy, String status);
|
||||
|
||||
/**
|
||||
* 영상데이터관리 > 상세 > 오류 처리 내역
|
||||
*
|
||||
* @param searchReq 오류 검색 조건
|
||||
* @return
|
||||
*/
|
||||
Page<MapSheetMngDto.ErrorDataDto> findMapSheetErrorList(
|
||||
MapSheetMngDto.@Valid ErrorSearchReq searchReq);
|
||||
|
||||
/**
|
||||
* hst 테이블에 선택한 hstUid row 정보 조회
|
||||
*
|
||||
* @param hstUid
|
||||
* @return
|
||||
*/
|
||||
MapSheetMngDto.ErrorDataDto findMapSheetError(Long hstUid);
|
||||
|
||||
/**
|
||||
* 파일 목록으로 업로드 경로 확인
|
||||
*
|
||||
* @param hstUid
|
||||
* @return
|
||||
*/
|
||||
List<MapSheetMngDto.MngFilesDto> findByHstUidMapSheetFileList(Long hstUid);
|
||||
|
||||
MapSheetMngDto.MngFilesDto findByFileUidMapSheetFile(Long fileUid);
|
||||
@@ -81,6 +133,11 @@ public interface MapSheetMngRepositoryCustom {
|
||||
|
||||
void updateMapSheetMngHstUploadId(Long hstUid, UUID uuid, String uploadId);
|
||||
|
||||
/**
|
||||
* 년도별 Tile 정보 등록
|
||||
*
|
||||
* @param addReq
|
||||
*/
|
||||
void insertMapSheetMngTile(@Valid AddReq addReq);
|
||||
|
||||
/**
|
||||
|
||||
@@ -59,16 +59,17 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
|
||||
this.queryFactory = queryFactory;
|
||||
}
|
||||
|
||||
/**
|
||||
* 영상데이터관리 > 목록 조회
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<MapSheetMngDto.MngDto> findMapSheetMngList() {
|
||||
|
||||
// Pageable pageable = searchReq.toPageable();
|
||||
BooleanBuilder whereBuilder = new BooleanBuilder();
|
||||
|
||||
// if (searchReq.getMngYyyy() != null) {
|
||||
// whereBuilder.and(mapSheetMngEntity.mngYyyy.eq(searchReq.getMngYyyy()));
|
||||
// }
|
||||
|
||||
NumberExpression<Long> totalCount = mapSheetMngHstEntity.count().as("syncTotCnt");
|
||||
|
||||
NumberExpression<Long> doneCount =
|
||||
@@ -227,6 +228,11 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
|
||||
return foundContent;
|
||||
}
|
||||
|
||||
/**
|
||||
* 영상데이터관리 > 데이터 등록 > 연도 선택 목록
|
||||
*
|
||||
* @return List<Integer>
|
||||
*/
|
||||
public List<Integer> findMapSheetMngYyyyList() {
|
||||
|
||||
List<Integer> foundContent =
|
||||
@@ -245,6 +251,12 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
|
||||
return foundContent;
|
||||
}
|
||||
|
||||
/**
|
||||
* tb_year 에 해당 년도 완료로 업데이트
|
||||
*
|
||||
* @param yyyy
|
||||
* @param status
|
||||
*/
|
||||
public void updateYearState(int yyyy, String status) {
|
||||
long execCount =
|
||||
queryFactory
|
||||
@@ -254,6 +266,12 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
|
||||
.execute();
|
||||
}
|
||||
|
||||
/**
|
||||
* 영상데이터관리 > 상세 조회
|
||||
*
|
||||
* @param mngYyyy
|
||||
* @return
|
||||
*/
|
||||
public MapSheetMngDto.MngDto findMapSheetMng(int mngYyyy) {
|
||||
|
||||
BooleanBuilder whereBuilder = new BooleanBuilder();
|
||||
@@ -399,6 +417,12 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
|
||||
return foundContent;
|
||||
}
|
||||
|
||||
/**
|
||||
* 영상데이터관리 > 상세 > 오류 처리 내역
|
||||
*
|
||||
* @param searchReq 오류 검색 조건
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Page<MapSheetMngDto.ErrorDataDto> findMapSheetErrorList(
|
||||
MapSheetMngDto.@Valid ErrorSearchReq searchReq) {
|
||||
@@ -407,6 +431,10 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
|
||||
BooleanBuilder whereBuilder = new BooleanBuilder();
|
||||
|
||||
whereBuilder.and(mapSheetMngHstEntity.mngYyyy.eq(searchReq.getMngYyyy()));
|
||||
|
||||
// syncState : 동기화 상태
|
||||
// hst 테이블의 syncState 가 DONE, NOTYET 이 아닌 것 -> 오류
|
||||
// (오류인 상태 SyncStateType : DUPLICATE, NOFILE, NOTPAIR, TYPEERROR)
|
||||
whereBuilder.and(
|
||||
mapSheetMngHstEntity.syncState.ne("DONE").and(mapSheetMngHstEntity.syncState.ne("NOTYET")));
|
||||
|
||||
@@ -414,10 +442,12 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
|
||||
whereBuilder.and(mapSheetMngHstEntity.syncState.eq(searchReq.getSyncState()));
|
||||
}
|
||||
|
||||
// syncCheckState : 동기화 이후, 에러 처리 상태 - 처리 DONE / 미처리 NOTYET
|
||||
if (searchReq.getSyncCheckState() != null && !searchReq.getSyncCheckState().isEmpty()) {
|
||||
whereBuilder.and(mapSheetMngHstEntity.syncCheckState.eq(searchReq.getSyncCheckState()));
|
||||
}
|
||||
|
||||
// 도엽 검색 조건 있을 때 whereBuilder에 추가
|
||||
if (searchReq.getSearchValue() != null && !searchReq.getSearchValue().isEmpty()) {
|
||||
whereBuilder.and(
|
||||
mapSheetMngHstEntity
|
||||
@@ -475,7 +505,8 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
|
||||
mapSheetMngHstEntity
|
||||
.mapSheetNum
|
||||
.eq(mapInkx5kEntity.mapidcdNo)
|
||||
.and(mapInkx5kEntity.useInference.eq(CommonUseStatus.USE)))
|
||||
.and(
|
||||
mapInkx5kEntity.useInference.eq(CommonUseStatus.USE))) // 도엽 사용인 것만 오류 내역 표기
|
||||
.where(whereBuilder)
|
||||
.orderBy(mapSheetMngHstEntity.createdDate.desc())
|
||||
.offset(pageable.getOffset())
|
||||
@@ -491,13 +522,20 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
|
||||
mapSheetMngHstEntity
|
||||
.mapSheetNum
|
||||
.eq(mapInkx5kEntity.mapidcdNo)
|
||||
.and(mapInkx5kEntity.useInference.eq(CommonUseStatus.USE)))
|
||||
.and(
|
||||
mapInkx5kEntity.useInference.eq(CommonUseStatus.USE))) // 도엽 사용인 것만 오류 내역 표기
|
||||
.where(whereBuilder)
|
||||
.fetchOne();
|
||||
|
||||
return new PageImpl<>(foundContent, pageable, countQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* hst 테이블에 선택한 hstUid row 정보 조회
|
||||
*
|
||||
* @param hstUid
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public MapSheetMngDto.ErrorDataDto findMapSheetError(Long hstUid) {
|
||||
|
||||
@@ -680,6 +718,11 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
|
||||
.execute();
|
||||
}
|
||||
|
||||
/**
|
||||
* 같은 년도로 저장된 데이터가 있다면 삭제
|
||||
*
|
||||
* @param mngYyyy
|
||||
*/
|
||||
@Override
|
||||
public void deleteByMngYyyyMngAll(int mngYyyy) {
|
||||
|
||||
@@ -700,6 +743,12 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
|
||||
.delete(mapSheetMngEntity)
|
||||
.where(mapSheetMngEntity.mngYyyy.eq(mngYyyy))
|
||||
.execute();
|
||||
|
||||
long deletedTileCount =
|
||||
queryFactory
|
||||
.delete(mapSheetMngTileEntity)
|
||||
.where(mapSheetMngTileEntity.mngYyyy.eq(mngYyyy))
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -830,6 +879,13 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
|
||||
.execute();
|
||||
}
|
||||
|
||||
/**
|
||||
* 5k 도엽 기준으로 tb_map_sheet_hst 테이블에 먼저 insert 하기
|
||||
*
|
||||
* @param mngYyyy
|
||||
* @param mngPath
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public int insertMapSheetOrgDataToMapSheetMngHst(int mngYyyy, String mngPath) {
|
||||
|
||||
@@ -966,6 +1022,11 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
|
||||
.execute();
|
||||
}
|
||||
|
||||
/**
|
||||
* 년도별 Tile 정보 등록
|
||||
*
|
||||
* @param addReq
|
||||
*/
|
||||
@Override
|
||||
public void insertMapSheetMngTile(AddReq addReq) {
|
||||
long execute =
|
||||
|
||||
Reference in New Issue
Block a user