feat/infer_dev_260211 #125
@@ -638,4 +638,8 @@ public class GukYuinApiService {
|
|||||||
public List<String> findStbltObjectIds(String uid, String mapSheetNum) {
|
public List<String> findStbltObjectIds(String uid, String mapSheetNum) {
|
||||||
return gukyuinCoreService.findStbltObjectIds(uid, mapSheetNum);
|
return gukyuinCoreService.findStbltObjectIds(uid, mapSheetNum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Integer updateStbltRandomData(String uid, int updateCnt) {
|
||||||
|
return gukyuinCoreService.updateStbltRandomData(uid, updateCnt);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,4 +81,8 @@ public class GukYuinCoreService {
|
|||||||
public List<String> findStbltObjectIds(String uid, String mapSheetNum) {
|
public List<String> findStbltObjectIds(String uid, String mapSheetNum) {
|
||||||
return gukYuinRepository.findStbltObjectIds(uid, mapSheetNum);
|
return gukYuinRepository.findStbltObjectIds(uid, mapSheetNum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Integer updateStbltRandomData(String uid, int updateCnt) {
|
||||||
|
return gukYuinRepository.updateStbltRandomData(uid, updateCnt);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,4 +47,6 @@ public interface GukYuinRepositoryCustom {
|
|||||||
void updateMapSheetInferenceLabelEndStatus(Long learnId);
|
void updateMapSheetInferenceLabelEndStatus(Long learnId);
|
||||||
|
|
||||||
List<String> findStbltObjectIds(String uid, String mapSheetNum);
|
List<String> findStbltObjectIds(String uid, String mapSheetNum);
|
||||||
|
|
||||||
|
Integer updateStbltRandomData(String uid, int updateCnt);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -336,6 +336,44 @@ public class GukYuinRepositoryImpl implements GukYuinRepositoryCustom {
|
|||||||
.fetch();
|
.fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* mapSheetAnalDataInferenceGeomEntity 데이터 에 실태조사 값 들어온 것으로 간주하고 update 랜덤으로 하기
|
||||||
|
*
|
||||||
|
* @param uid
|
||||||
|
* @param updateCnt
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Integer updateStbltRandomData(String uid, int updateCnt) {
|
||||||
|
List<Long> geoUids =
|
||||||
|
queryFactory
|
||||||
|
.select(mapSheetAnalDataInferenceGeomEntity.geoUid)
|
||||||
|
.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),
|
||||||
|
mapSheetAnalDataInferenceGeomEntity.fitState.isNull())
|
||||||
|
.where(mapSheetLearnEntity.uid.eq(uid))
|
||||||
|
.orderBy(mapSheetAnalDataInferenceGeomEntity.geoUid.asc())
|
||||||
|
.limit(updateCnt)
|
||||||
|
.fetch();
|
||||||
|
|
||||||
|
for (Long geoUid : geoUids) {
|
||||||
|
queryFactory
|
||||||
|
.update(mapSheetAnalDataInferenceGeomEntity)
|
||||||
|
.set(mapSheetAnalDataInferenceGeomEntity.pnu, 1L)
|
||||||
|
.set(mapSheetAnalDataInferenceGeomEntity.fitState, "Y")
|
||||||
|
.set(mapSheetAnalDataInferenceGeomEntity.fitStateDttm, ZonedDateTime.now())
|
||||||
|
.where(mapSheetAnalDataInferenceGeomEntity.geoUid.eq(geoUid))
|
||||||
|
.execute();
|
||||||
|
}
|
||||||
|
return updateCnt;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public void updateGukYuinApplyStateComplete(Long id, GukYuinStatus status) {
|
public void updateGukYuinApplyStateComplete(Long id, GukYuinStatus status) {
|
||||||
|
|||||||
@@ -175,4 +175,11 @@ public class SchedulerApiController {
|
|||||||
inferenceResultShpService.createShp(uuid);
|
inferenceResultShpService.createShp(uuid);
|
||||||
return ApiResponseDto.createOK(null);
|
return ApiResponseDto.createOK(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "국유인 실태조사 적합여부 랜덤 업데이트", description = "국유인 실태조사 적합여부 랜덤 업데이트")
|
||||||
|
@PutMapping("/gukyuin/random-stblt-update/{uid}/{updateCnt}")
|
||||||
|
public ApiResponseDto<Integer> updateStbltRandomData(
|
||||||
|
@PathVariable String uid, @PathVariable int updateCnt) {
|
||||||
|
return ApiResponseDto.ok(gukYuinApiService.updateStbltRandomData(uid, updateCnt));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user