국유인 수정, 라벨대상 건수 수정
This commit is contained in:
@@ -15,6 +15,7 @@ import com.kamco.cd.kamcoback.scheduler.service.GukYuinApiLabelJobService;
|
|||||||
import com.kamco.cd.kamcoback.scheduler.service.GukYuinApiPnuJobService;
|
import com.kamco.cd.kamcoback.scheduler.service.GukYuinApiPnuJobService;
|
||||||
import com.kamco.cd.kamcoback.scheduler.service.GukYuinApiStatusJobService;
|
import com.kamco.cd.kamcoback.scheduler.service.GukYuinApiStatusJobService;
|
||||||
import com.kamco.cd.kamcoback.scheduler.service.GukYuinApiStbltJobService;
|
import com.kamco.cd.kamcoback.scheduler.service.GukYuinApiStbltJobService;
|
||||||
|
import io.swagger.v3.oas.annotations.Hidden;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
import io.swagger.v3.oas.annotations.media.Content;
|
import io.swagger.v3.oas.annotations.media.Content;
|
||||||
@@ -330,6 +331,7 @@ public class GukYuinApiController {
|
|||||||
return ApiResponseDto.ok(gukYuinApiService.findRlbDtctObject(chnDtctObjtId));
|
return ApiResponseDto.ok(gukYuinApiService.findRlbDtctObject(chnDtctObjtId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Hidden
|
||||||
@Operation(summary = "job test pnu", description = "job test pnu")
|
@Operation(summary = "job test pnu", description = "job test pnu")
|
||||||
@GetMapping("/job-test/pnu")
|
@GetMapping("/job-test/pnu")
|
||||||
public ApiResponseDto<Void> findGukYuinContListPnuUpdate() {
|
public ApiResponseDto<Void> findGukYuinContListPnuUpdate() {
|
||||||
@@ -337,6 +339,7 @@ public class GukYuinApiController {
|
|||||||
return ApiResponseDto.ok(null);
|
return ApiResponseDto.ok(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Hidden
|
||||||
@Operation(summary = "job test status", description = "job test status")
|
@Operation(summary = "job test status", description = "job test status")
|
||||||
@GetMapping("/job-test/status")
|
@GetMapping("/job-test/status")
|
||||||
public ApiResponseDto<Void> findGukYuinMastCompleteYn() {
|
public ApiResponseDto<Void> findGukYuinMastCompleteYn() {
|
||||||
@@ -344,6 +347,7 @@ public class GukYuinApiController {
|
|||||||
return ApiResponseDto.ok(null);
|
return ApiResponseDto.ok(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Hidden
|
||||||
@Operation(summary = "job test label", description = "job test label")
|
@Operation(summary = "job test label", description = "job test label")
|
||||||
@GetMapping("/job-test/label")
|
@GetMapping("/job-test/label")
|
||||||
public ApiResponseDto<Void> findLabelingCompleteSend() {
|
public ApiResponseDto<Void> findLabelingCompleteSend() {
|
||||||
@@ -351,6 +355,7 @@ public class GukYuinApiController {
|
|||||||
return ApiResponseDto.ok(null);
|
return ApiResponseDto.ok(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Hidden
|
||||||
@Operation(summary = "job test stblt", description = "job test stblt")
|
@Operation(summary = "job test stblt", description = "job test stblt")
|
||||||
@GetMapping("/job-test/stblt")
|
@GetMapping("/job-test/stblt")
|
||||||
public ApiResponseDto<Void> findGukYuinEligibleForSurvey() {
|
public ApiResponseDto<Void> findGukYuinEligibleForSurvey() {
|
||||||
|
|||||||
@@ -456,8 +456,15 @@ public class GukYuinApiService {
|
|||||||
Integer maxStage =
|
Integer maxStage =
|
||||||
gukyuinCoreService.findMapSheetLearnYearStage(info.getCompareYyyy(), info.getTargetYyyy());
|
gukyuinCoreService.findMapSheetLearnYearStage(info.getCompareYyyy(), info.getTargetYyyy());
|
||||||
|
|
||||||
// TODO : 1회차를 종료 상태로 처리하고 2회차를 보내야 함
|
// 1회차를 종료 상태로 처리하고 2회차를 보내야 함
|
||||||
// TODO : learn, inference 둘다 종료 처리
|
// 추론(learn), 학습데이터(inference) 둘 다 종료 처리
|
||||||
|
if (maxStage > 0) {
|
||||||
|
Long learnId =
|
||||||
|
gukyuinCoreService.findMapSheetLearnInfoByYyyy(
|
||||||
|
info.getCompareYyyy(), info.getTargetYyyy(), maxStage);
|
||||||
|
gukyuinCoreService.updateMapSheetLearnGukyuinEndStatus(learnId);
|
||||||
|
gukyuinCoreService.updateMapSheetInferenceLabelEndStatus(learnId);
|
||||||
|
}
|
||||||
|
|
||||||
// reqDto 셋팅
|
// reqDto 셋팅
|
||||||
ChnDetectMastReqDto reqDto = new ChnDetectMastReqDto();
|
ChnDetectMastReqDto reqDto = new ChnDetectMastReqDto();
|
||||||
@@ -467,22 +474,18 @@ public class GukYuinApiService {
|
|||||||
reqDto.setChnDtctId(info.getUid());
|
reqDto.setChnDtctId(info.getUid());
|
||||||
reqDto.setPathNm("/kamco-nfs/dataset/export/" + info.getUid());
|
reqDto.setPathNm("/kamco-nfs/dataset/export/" + info.getUid());
|
||||||
|
|
||||||
log.info("### path : " + Path.of("/kamco-nfs/dataset/export/" + info.getUid()));
|
if (!Files.isDirectory(Path.of("/kamco-nfs/dataset/export/" + info.getUid()))) {
|
||||||
log.info(
|
|
||||||
"#### isDirectory : "
|
|
||||||
+ Files.isDirectory(Path.of("/kamco-nfs/dataset/export/" + info.getUid())));
|
|
||||||
if (Files.isDirectory(Path.of("/kamco-nfs/dataset/export/" + info.getUid()))) {
|
|
||||||
return new ResponseObj(
|
return new ResponseObj(
|
||||||
ApiResponseCode.NOT_FOUND_DATA, "파일 경로에 회차 실행 파일이 생성되지 않았습니다. 확인 부탁드립니다.");
|
ApiResponseCode.NOT_FOUND_DATA, "파일 경로에 회차 실행 파일이 생성되지 않았습니다. 확인 부탁드립니다.");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 국유인 /chn/mast/regist 전송
|
// 국유인 /chn/mast/regist 전송
|
||||||
// ChngDetectMastDto.RegistResDto result = this.regist(reqDto);
|
ChngDetectMastDto.RegistResDto result = this.regist(reqDto);
|
||||||
// if (result.getSuccess()) {
|
if (result.getSuccess()) {
|
||||||
return new ResponseObj(ApiResponseCode.OK, "연동되었습니다.");
|
return new ResponseObj(ApiResponseCode.OK, "연동되었습니다.");
|
||||||
// } else {
|
} else {
|
||||||
// return new ResponseObj(ApiResponseCode.INTERNAL_SERVER_ERROR, result.getMessage());
|
return new ResponseObj(ApiResponseCode.INTERNAL_SERVER_ERROR, result.getMessage());
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<LabelSendDto> findLabelingCompleteSendList(LocalDate yesterday) {
|
public List<LabelSendDto> findLabelingCompleteSendList(LocalDate yesterday) {
|
||||||
|
|||||||
@@ -64,4 +64,17 @@ public class GukYuinCoreService {
|
|||||||
public List<LabelSendDto> findLabelingCompleteSendList(LocalDate yesterday) {
|
public List<LabelSendDto> findLabelingCompleteSendList(LocalDate yesterday) {
|
||||||
return gukYuinRepository.findLabelingCompleteSendList(yesterday);
|
return gukYuinRepository.findLabelingCompleteSendList(yesterday);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Long findMapSheetLearnInfoByYyyy(
|
||||||
|
Integer compareYyyy, Integer targetYyyy, Integer maxStage) {
|
||||||
|
return gukYuinRepository.findMapSheetLearnInfoByYyyy(compareYyyy, targetYyyy, maxStage);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateMapSheetLearnGukyuinEndStatus(Long learnId) {
|
||||||
|
gukYuinRepository.updateMapSheetLearnGukyuinEndStatus(learnId);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateMapSheetInferenceLabelEndStatus(Long learnId) {
|
||||||
|
gukYuinRepository.updateMapSheetInferenceLabelEndStatus(learnId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,10 +24,12 @@ public class GukYuinStbltJobCoreService {
|
|||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public void updateGukYuinEligibleForSurvey(String resultUid, RlbDtctMastDto stbltDto) {
|
public void updateGukYuinEligibleForSurvey(String resultUid, RlbDtctMastDto stbltDto) {
|
||||||
|
String chnDtctObjtId = "";
|
||||||
PnuEntity entity =
|
PnuEntity entity =
|
||||||
gukYuinStbltRepository.findPnuEntityByResultUid(resultUid, stbltDto.getPnu());
|
gukYuinStbltRepository.findPnuEntityByResultUid(resultUid, stbltDto.getPnu());
|
||||||
|
|
||||||
if (entity != null) {
|
if (entity != null) {
|
||||||
|
chnDtctObjtId = resultUid;
|
||||||
|
|
||||||
entity.setPnuDtctId(stbltDto.getPnuDtctId());
|
entity.setPnuDtctId(stbltDto.getPnuDtctId());
|
||||||
entity.setPnu(stbltDto.getPnu());
|
entity.setPnu(stbltDto.getPnu());
|
||||||
@@ -66,6 +68,8 @@ public class GukYuinStbltJobCoreService {
|
|||||||
|
|
||||||
entity.setCreatedDttm(ZonedDateTime.now());
|
entity.setCreatedDttm(ZonedDateTime.now());
|
||||||
gukYuinStbltRepository.save(entity);
|
gukYuinStbltRepository.save(entity);
|
||||||
|
|
||||||
|
//
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,4 +39,10 @@ public interface GukYuinRepositoryCustom {
|
|||||||
void updateAnalDataInferenceGeomSendDttm(Long geoUid);
|
void updateAnalDataInferenceGeomSendDttm(Long geoUid);
|
||||||
|
|
||||||
List<LabelSendDto> findLabelingCompleteSendList(LocalDate yesterday);
|
List<LabelSendDto> findLabelingCompleteSendList(LocalDate yesterday);
|
||||||
|
|
||||||
|
Long findMapSheetLearnInfoByYyyy(Integer compareYyyy, Integer targetYyyy, Integer maxStage);
|
||||||
|
|
||||||
|
void updateMapSheetLearnGukyuinEndStatus(Long learnId);
|
||||||
|
|
||||||
|
void updateMapSheetInferenceLabelEndStatus(Long learnId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import com.kamco.cd.kamcoback.gukyuin.dto.GukYuinDto.GeomUidDto;
|
|||||||
import com.kamco.cd.kamcoback.gukyuin.dto.GukYuinDto.LearnInfo;
|
import com.kamco.cd.kamcoback.gukyuin.dto.GukYuinDto.LearnInfo;
|
||||||
import com.kamco.cd.kamcoback.gukyuin.dto.GukYuinStatus;
|
import com.kamco.cd.kamcoback.gukyuin.dto.GukYuinStatus;
|
||||||
import com.kamco.cd.kamcoback.label.dto.LabelAllocateDto.InspectState;
|
import com.kamco.cd.kamcoback.label.dto.LabelAllocateDto.InspectState;
|
||||||
|
import com.kamco.cd.kamcoback.label.dto.LabelAllocateDto.LabelMngState;
|
||||||
import com.kamco.cd.kamcoback.postgres.entity.PnuEntity;
|
import com.kamco.cd.kamcoback.postgres.entity.PnuEntity;
|
||||||
import com.querydsl.core.types.Projections;
|
import com.querydsl.core.types.Projections;
|
||||||
import com.querydsl.core.types.dsl.BooleanExpression;
|
import com.querydsl.core.types.dsl.BooleanExpression;
|
||||||
@@ -204,6 +205,7 @@ public class GukYuinRepositoryImpl implements GukYuinRepositoryCustom {
|
|||||||
.update(mapSheetAnalInferenceEntity)
|
.update(mapSheetAnalInferenceEntity)
|
||||||
.set(mapSheetAnalInferenceEntity.gukyuinUsed, "Y")
|
.set(mapSheetAnalInferenceEntity.gukyuinUsed, "Y")
|
||||||
.set(mapSheetAnalInferenceEntity.gukyuinApplyDttm, ZonedDateTime.now())
|
.set(mapSheetAnalInferenceEntity.gukyuinApplyDttm, ZonedDateTime.now())
|
||||||
|
.set(mapSheetAnalInferenceEntity.stage, Integer.parseInt(registRes.getChnDtctSno()))
|
||||||
.where(mapSheetAnalInferenceEntity.learnId.eq(learnId))
|
.where(mapSheetAnalInferenceEntity.learnId.eq(learnId))
|
||||||
.execute();
|
.execute();
|
||||||
}
|
}
|
||||||
@@ -283,6 +285,39 @@ public class GukYuinRepositoryImpl implements GukYuinRepositoryCustom {
|
|||||||
.fetch();
|
.fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long findMapSheetLearnInfoByYyyy(
|
||||||
|
Integer compareYyyy, Integer targetYyyy, Integer maxStage) {
|
||||||
|
return queryFactory
|
||||||
|
.select(mapSheetLearnEntity.id)
|
||||||
|
.from(mapSheetLearnEntity)
|
||||||
|
.where(
|
||||||
|
mapSheetLearnEntity.compareYyyy.eq(compareYyyy),
|
||||||
|
mapSheetLearnEntity.targetYyyy.eq(targetYyyy),
|
||||||
|
mapSheetLearnEntity.stage.eq(maxStage))
|
||||||
|
.fetchOne();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateMapSheetLearnGukyuinEndStatus(Long learnId) {
|
||||||
|
queryFactory
|
||||||
|
.update(mapSheetLearnEntity)
|
||||||
|
.set(mapSheetLearnEntity.applyStatus, GukYuinStatus.END.getId())
|
||||||
|
.set(mapSheetLearnEntity.applyStatusDttm, ZonedDateTime.now())
|
||||||
|
.where(mapSheetLearnEntity.id.eq(learnId))
|
||||||
|
.execute();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateMapSheetInferenceLabelEndStatus(Long learnId) {
|
||||||
|
queryFactory
|
||||||
|
.update(mapSheetAnalInferenceEntity)
|
||||||
|
.set(mapSheetAnalInferenceEntity.analState, LabelMngState.FINISH.getId())
|
||||||
|
.set(mapSheetAnalInferenceEntity.updatedDttm, ZonedDateTime.now())
|
||||||
|
.where(mapSheetAnalInferenceEntity.learnId.eq(learnId))
|
||||||
|
.execute();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public void updateGukYuinApplyStateComplete(Long id, GukYuinStatus status) {
|
public void updateGukYuinApplyStateComplete(Long id, GukYuinStatus status) {
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ public class GukYuinStbltJobRepositoryImpl implements GukYuinStbltJobRepositoryC
|
|||||||
.on(mapSheetAnalDataInferenceEntity.id.eq(mapSheetAnalDataInferenceGeomEntity.dataUid))
|
.on(mapSheetAnalDataInferenceEntity.id.eq(mapSheetAnalDataInferenceGeomEntity.dataUid))
|
||||||
.where(
|
.where(
|
||||||
mapSheetLearnEntity.applyStatus.eq(GukYuinStatus.PNU_COMPLETED.getId()),
|
mapSheetLearnEntity.applyStatus.eq(GukYuinStatus.PNU_COMPLETED.getId()),
|
||||||
mapSheetAnalDataInferenceGeomEntity.pnu.isNotNull(),
|
mapSheetAnalDataInferenceGeomEntity.pnu.gt(0),
|
||||||
mapSheetAnalDataInferenceGeomEntity.fitState.isNull())
|
mapSheetAnalDataInferenceGeomEntity.fitState.isNull())
|
||||||
.groupBy(mapSheetLearnEntity.id, mapSheetLearnEntity.uid, mapSheetLearnEntity.chnDtctMstId)
|
.groupBy(mapSheetLearnEntity.id, mapSheetLearnEntity.uid, mapSheetLearnEntity.chnDtctMstId)
|
||||||
.having(mapSheetAnalDataInferenceGeomEntity.geoUid.count().gt(1L))
|
.having(mapSheetAnalDataInferenceGeomEntity.geoUid.count().gt(1L))
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import static com.kamco.cd.kamcoback.postgres.entity.QMapSheetAnalDataInferenceG
|
|||||||
import static com.kamco.cd.kamcoback.postgres.entity.QMapSheetAnalInferenceEntity.mapSheetAnalInferenceEntity;
|
import static com.kamco.cd.kamcoback.postgres.entity.QMapSheetAnalInferenceEntity.mapSheetAnalInferenceEntity;
|
||||||
import static com.kamco.cd.kamcoback.postgres.entity.QMemberEntity.memberEntity;
|
import static com.kamco.cd.kamcoback.postgres.entity.QMemberEntity.memberEntity;
|
||||||
|
|
||||||
|
import com.kamco.cd.kamcoback.common.enums.ImageryFitStatus;
|
||||||
import com.kamco.cd.kamcoback.common.enums.StatusType;
|
import com.kamco.cd.kamcoback.common.enums.StatusType;
|
||||||
import com.kamco.cd.kamcoback.label.dto.LabelAllocateDto;
|
import com.kamco.cd.kamcoback.label.dto.LabelAllocateDto;
|
||||||
import com.kamco.cd.kamcoback.label.dto.LabelAllocateDto.AllocateInfoDto;
|
import com.kamco.cd.kamcoback.label.dto.LabelAllocateDto.AllocateInfoDto;
|
||||||
@@ -82,7 +83,9 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
|
|||||||
.innerJoin(mapSheetAnalDataInferenceGeomEntity)
|
.innerJoin(mapSheetAnalDataInferenceGeomEntity)
|
||||||
.on(
|
.on(
|
||||||
mapSheetAnalDataInferenceEntity.id.eq(mapSheetAnalDataInferenceGeomEntity.dataUid),
|
mapSheetAnalDataInferenceEntity.id.eq(mapSheetAnalDataInferenceGeomEntity.dataUid),
|
||||||
mapSheetAnalDataInferenceGeomEntity.pnu.isNotNull(),
|
// mapSheetAnalDataInferenceGeomEntity.pnu.isNotNull(),
|
||||||
|
mapSheetAnalDataInferenceGeomEntity.pnu.gt(0),
|
||||||
|
mapSheetAnalDataInferenceGeomEntity.fitState.eq(ImageryFitStatus.UNFIT.getId()),
|
||||||
mapSheetAnalDataInferenceGeomEntity.labelState.isNull())
|
mapSheetAnalDataInferenceGeomEntity.labelState.isNull())
|
||||||
.where(
|
.where(
|
||||||
mapSheetAnalInferenceEntity.uuid.eq(uuid),
|
mapSheetAnalInferenceEntity.uuid.eq(uuid),
|
||||||
@@ -189,7 +192,9 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
|
|||||||
.innerJoin(mapSheetAnalDataInferenceGeomEntity)
|
.innerJoin(mapSheetAnalDataInferenceGeomEntity)
|
||||||
.on(
|
.on(
|
||||||
mapSheetAnalDataInferenceEntity.id.eq(mapSheetAnalDataInferenceGeomEntity.dataUid),
|
mapSheetAnalDataInferenceEntity.id.eq(mapSheetAnalDataInferenceGeomEntity.dataUid),
|
||||||
mapSheetAnalDataInferenceGeomEntity.pnu.isNotNull(),
|
// mapSheetAnalDataInferenceGeomEntity.pnu.isNotNull(),
|
||||||
|
mapSheetAnalDataInferenceGeomEntity.pnu.gt(0),
|
||||||
|
mapSheetAnalDataInferenceGeomEntity.fitState.eq(ImageryFitStatus.UNFIT.getId()),
|
||||||
mapSheetAnalDataInferenceGeomEntity.labelState.isNull())
|
mapSheetAnalDataInferenceGeomEntity.labelState.isNull())
|
||||||
.where(mapSheetAnalInferenceEntity.uuid.eq(uuid))
|
.where(mapSheetAnalInferenceEntity.uuid.eq(uuid))
|
||||||
.fetchOne();
|
.fetchOne();
|
||||||
@@ -380,9 +385,10 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
|
|||||||
mapSheetAnalDataInferenceGeomEntity.compareYyyy.eq(analEntity.getCompareYyyy()),
|
mapSheetAnalDataInferenceGeomEntity.compareYyyy.eq(analEntity.getCompareYyyy()),
|
||||||
mapSheetAnalDataInferenceGeomEntity.targetYyyy.eq(analEntity.getTargetYyyy()),
|
mapSheetAnalDataInferenceGeomEntity.targetYyyy.eq(analEntity.getTargetYyyy()),
|
||||||
mapSheetAnalDataInferenceGeomEntity.stage.eq(analEntity.getStage()),
|
mapSheetAnalDataInferenceGeomEntity.stage.eq(analEntity.getStage()),
|
||||||
mapSheetAnalDataInferenceGeomEntity.pnu.isNotNull()
|
// mapSheetAnalDataInferenceGeomEntity.pnu.isNotNull()
|
||||||
// mapSheetAnalDataInferenceGeomEntity.pnu.gt(0L)
|
mapSheetAnalDataInferenceGeomEntity.pnu.gt(0L),
|
||||||
// mapSheetAnalDataInferenceGeomEntity.passYn.isFalse() //TODO:
|
mapSheetAnalDataInferenceGeomEntity.fitState.eq(
|
||||||
|
ImageryFitStatus.UNFIT.getId()) // TODO:
|
||||||
// 추후 라벨링 대상 조건 수정하기
|
// 추후 라벨링 대상 조건 수정하기
|
||||||
)
|
)
|
||||||
.fetchOne();
|
.fetchOne();
|
||||||
@@ -554,11 +560,9 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
|
|||||||
mapSheetAnalDataInferenceGeomEntity.dataUid))
|
mapSheetAnalDataInferenceGeomEntity.dataUid))
|
||||||
.where(
|
.where(
|
||||||
mapSheetAnalInferenceEntity.uuid.eq(targetUuid),
|
mapSheetAnalInferenceEntity.uuid.eq(targetUuid),
|
||||||
mapSheetAnalDataInferenceGeomEntity.pnu.isNotNull()
|
// mapSheetAnalDataInferenceGeomEntity.pnu.isNotNull()
|
||||||
// mapSheetAnalDataInferenceGeomEntity.pnu.gt(0L),
|
mapSheetAnalDataInferenceGeomEntity.pnu.gt(0L),
|
||||||
//
|
mapSheetAnalDataInferenceGeomEntity.fitState.eq(ImageryFitStatus.UNFIT.getId()))
|
||||||
// mapSheetAnalDataInferenceGeomEntity.fitState.eq(ImageryFitStatus.UNFIT.getId())
|
|
||||||
)
|
|
||||||
.fetchOne();
|
.fetchOne();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -746,11 +750,9 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
|
|||||||
mapSheetAnalInferenceEntity.targetYyyy.eq(
|
mapSheetAnalInferenceEntity.targetYyyy.eq(
|
||||||
mapSheetAnalDataInferenceGeomEntity.targetYyyy),
|
mapSheetAnalDataInferenceGeomEntity.targetYyyy),
|
||||||
mapSheetAnalInferenceEntity.stage.eq(mapSheetAnalDataInferenceGeomEntity.stage),
|
mapSheetAnalInferenceEntity.stage.eq(mapSheetAnalDataInferenceGeomEntity.stage),
|
||||||
mapSheetAnalDataInferenceGeomEntity.pnu.isNotNull()
|
// mapSheetAnalDataInferenceGeomEntity.pnu.isNotNull()
|
||||||
// mapSheetAnalDataInferenceGeomEntity.pnu.gt(0),
|
mapSheetAnalDataInferenceGeomEntity.pnu.gt(0),
|
||||||
// mapSheetAnalDataInferenceGeomEntity.passYn.isFalse() //TODO: 추후 라벨링 대상 조건
|
mapSheetAnalDataInferenceGeomEntity.fitState.eq(ImageryFitStatus.UNFIT.getId()))
|
||||||
// 수정하기
|
|
||||||
)
|
|
||||||
.where(mapSheetAnalInferenceEntity.id.eq(analEntity.getId()))
|
.where(mapSheetAnalInferenceEntity.id.eq(analEntity.getId()))
|
||||||
.groupBy(
|
.groupBy(
|
||||||
mapSheetAnalInferenceEntity.analTitle,
|
mapSheetAnalInferenceEntity.analTitle,
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.kamco.cd.kamcoback.postgres.repository.label;
|
|||||||
|
|
||||||
import static com.kamco.cd.kamcoback.postgres.entity.QMapSheetLearnEntity.mapSheetLearnEntity;
|
import static com.kamco.cd.kamcoback.postgres.entity.QMapSheetLearnEntity.mapSheetLearnEntity;
|
||||||
|
|
||||||
|
import com.kamco.cd.kamcoback.common.enums.ImageryFitStatus;
|
||||||
import com.kamco.cd.kamcoback.label.dto.LabelAllocateDto.InspectState;
|
import com.kamco.cd.kamcoback.label.dto.LabelAllocateDto.InspectState;
|
||||||
import com.kamco.cd.kamcoback.label.dto.LabelAllocateDto.LabelState;
|
import com.kamco.cd.kamcoback.label.dto.LabelAllocateDto.LabelState;
|
||||||
import com.kamco.cd.kamcoback.label.dto.LabelWorkDto;
|
import com.kamco.cd.kamcoback.label.dto.LabelWorkDto;
|
||||||
@@ -557,7 +558,14 @@ public class LabelWorkRepositoryImpl implements LabelWorkRepositoryCustom {
|
|||||||
|
|
||||||
NumberExpression<Long> labelTotCnt =
|
NumberExpression<Long> labelTotCnt =
|
||||||
new CaseBuilder()
|
new CaseBuilder()
|
||||||
.when(mapSheetAnalDataInferenceGeomEntity.pnu.isNotNull())
|
// .when(mapSheetAnalDataInferenceGeomEntity.pnu.isNotNull())
|
||||||
|
.when(
|
||||||
|
mapSheetAnalDataInferenceGeomEntity
|
||||||
|
.pnu
|
||||||
|
.gt(0)
|
||||||
|
.and(
|
||||||
|
mapSheetAnalDataInferenceGeomEntity.fitState.eq(
|
||||||
|
ImageryFitStatus.UNFIT.getId())))
|
||||||
.then(1L)
|
.then(1L)
|
||||||
.otherwise(0L)
|
.otherwise(0L)
|
||||||
.sum();
|
.sum();
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import java.util.List;
|
|||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.log4j.Log4j2;
|
import lombok.extern.log4j.Log4j2;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@Log4j2
|
@Log4j2
|
||||||
@@ -31,11 +32,11 @@ public class GukYuinApiLabelJobService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 어제 라벨링 검수 완료된 것 -> 국유인에 전송 */
|
/** 어제 라벨링 검수 완료된 것 -> 국유인에 전송 */
|
||||||
// @Scheduled(cron = "0 0 2 * * *")
|
@Scheduled(cron = "0 0 2 * * *")
|
||||||
public void findLabelingCompleteSend() {
|
public void findLabelingCompleteSend() {
|
||||||
// if (isLocalProfile()) {
|
if (isLocalProfile()) {
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
|
|
||||||
List<GeomUidDto> list = gukYuinLabelJobCoreService.findYesterdayLabelingCompleteList();
|
List<GeomUidDto> list = gukYuinLabelJobCoreService.findYesterdayLabelingCompleteList();
|
||||||
if (list.isEmpty()) {
|
if (list.isEmpty()) {
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import java.util.List;
|
|||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.log4j.Log4j2;
|
import lombok.extern.log4j.Log4j2;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@Log4j2
|
@Log4j2
|
||||||
@@ -35,11 +36,11 @@ public class GukYuinApiPnuJobService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 국유인 등록 완료 후, 탐지객체 조회해서 PNU 업데이트 하는 스케줄링 하루 1번 새벽 1시에 실행 */
|
/** 국유인 등록 완료 후, 탐지객체 조회해서 PNU 업데이트 하는 스케줄링 하루 1번 새벽 1시에 실행 */
|
||||||
// @Scheduled(cron = "0 0/10 * * * *") // 0 0 1 * * *
|
@Scheduled(cron = "0 0 1 * * *")
|
||||||
public void findGukYuinContListPnuUpdate() {
|
public void findGukYuinContListPnuUpdate() {
|
||||||
// if (isLocalProfile()) {
|
if (isLocalProfile()) {
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
|
|
||||||
List<LearnKeyDto> list =
|
List<LearnKeyDto> list =
|
||||||
gukYuinPnuJobCoreService.findGukyuinApplyStatusUidList(
|
gukYuinPnuJobCoreService.findGukyuinApplyStatusUidList(
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import java.util.List;
|
|||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.log4j.Log4j2;
|
import lombok.extern.log4j.Log4j2;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@Log4j2
|
@Log4j2
|
||||||
@@ -32,11 +33,11 @@ public class GukYuinApiStatusJobService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 국유인 연동 후, 100% 되었는지 확인하는 스케줄링 매 10분마다 호출 */
|
/** 국유인 연동 후, 100% 되었는지 확인하는 스케줄링 매 10분마다 호출 */
|
||||||
// @Scheduled(cron = "0 0/10 * * * *") // 0 0/10 * * * *
|
@Scheduled(cron = "0 0/10 * * * *")
|
||||||
public void findGukYuinMastCompleteYn() {
|
public void findGukYuinMastCompleteYn() {
|
||||||
// if (isLocalProfile()) {
|
if (isLocalProfile()) {
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
|
|
||||||
List<LearnKeyDto> list =
|
List<LearnKeyDto> list =
|
||||||
gukYuinJobCoreService.findGukyuinApplyStatusUidList(
|
gukYuinJobCoreService.findGukyuinApplyStatusUidList(
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import java.util.List;
|
|||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.log4j.Log4j2;
|
import lombok.extern.log4j.Log4j2;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@Log4j2
|
@Log4j2
|
||||||
@@ -36,11 +37,11 @@ public class GukYuinApiStbltJobService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 국유인 연동 후, 실태조사 적합여부 확인하여 update */
|
/** 국유인 연동 후, 실태조사 적합여부 확인하여 update */
|
||||||
// @Scheduled(cron = "0 * * * * *") // 0 0 3 * * *
|
@Scheduled(cron = "0 0 3 * * *") // 0 0 3 * * *
|
||||||
public void findGukYuinEligibleForSurvey() {
|
public void findGukYuinEligibleForSurvey() {
|
||||||
// if (isLocalProfile()) {
|
if (isLocalProfile()) {
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
|
|
||||||
List<LearnKeyDto> list =
|
List<LearnKeyDto> list =
|
||||||
gukYuinStbltJobCoreService.findGukYuinEligibleForSurveyList(
|
gukYuinStbltJobCoreService.findGukYuinEligibleForSurveyList(
|
||||||
@@ -51,12 +52,11 @@ public class GukYuinApiStbltJobService {
|
|||||||
|
|
||||||
for (LearnKeyDto dto : list) {
|
for (LearnKeyDto dto : list) {
|
||||||
try {
|
try {
|
||||||
String today =
|
String yesterday =
|
||||||
LocalDate.now(ZoneId.of("Asia/Seoul")).format(DateTimeFormatter.ofPattern("yyyyMMdd"));
|
LocalDate.now(ZoneId.of("Asia/Seoul"))
|
||||||
// String yesterday =
|
.minusDays(1)
|
||||||
// LocalDate.now(ZoneId.of("Asia/Seoul")).minusDays(1).format(DateTimeFormatter.ofPattern("yyyyMMdd"));
|
.format(DateTimeFormatter.ofPattern("yyyyMMdd"));
|
||||||
RlbDtctDto result =
|
RlbDtctDto result = gukYuinApiService.findRlbDtctList(dto.getUid(), yesterday);
|
||||||
gukYuinApiService.findRlbDtctList(dto.getUid(), today); // todo : test 다 끝내고 어제로 바꿔야 함
|
|
||||||
|
|
||||||
if (result == null || result.getResult() == null || result.getResult().isEmpty()) {
|
if (result == null || result.getResult() == null || result.getResult().isEmpty()) {
|
||||||
log.warn("[GUKYUIN] empty result chnDtctMstId={}", dto.getChnDtctMstId());
|
log.warn("[GUKYUIN] empty result chnDtctMstId={}", dto.getChnDtctMstId());
|
||||||
@@ -67,6 +67,7 @@ public class GukYuinApiStbltJobService {
|
|||||||
String resultUid = stbltDto.getChnDtctObjtId();
|
String resultUid = stbltDto.getChnDtctObjtId();
|
||||||
gukYuinStbltJobCoreService.updateGukYuinEligibleForSurvey(resultUid, stbltDto);
|
gukYuinStbltJobCoreService.updateGukYuinEligibleForSurvey(resultUid, stbltDto);
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("[GUKYUIN] failed uid={}", dto.getChnDtctMstId(), e);
|
log.error("[GUKYUIN] failed uid={}", dto.getChnDtctMstId(), e);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user