Compare commits
52 Commits
feat/infer
...
9dd03f3c52
| Author | SHA1 | Date | |
|---|---|---|---|
| 9dd03f3c52 | |||
| 796591eca6 | |||
| 825e393e05 | |||
| 1410333829 | |||
| d63980476f | |||
| ae1693a33c | |||
| 8dfae65bcc | |||
| 872df11844 | |||
| f992bbe9ca | |||
| 643ea5cf9a | |||
| bc4b2dbac1 | |||
| 694b2fc31e | |||
| fbdda6477c | |||
| a572089dff | |||
| c6abf7a935 | |||
| a9348d9a66 | |||
| b877d2a8c9 | |||
| 151012ea28 | |||
| 68c68082cf | |||
| 4ce96b72aa | |||
| 0a5c5dfd7d | |||
| 7442e4ee09 | |||
| d278baed96 | |||
| 6b0074316f | |||
| f921ef5d0d | |||
| 7667620395 | |||
| 527acc9839 | |||
| 407f14d230 | |||
| 4a91d61b7d | |||
| 9d7bbc1b63 | |||
| f46ea62761 | |||
| 1abc0b93c0 | |||
| 4204e48d88 | |||
| fa41d41739 | |||
| ee28edd9d0 | |||
| 8555897b77 | |||
| fe7b1ed0bd | |||
| 064c02e21b | |||
| fd3499a5ec | |||
| 686cf03524 | |||
| ee9914a5f3 | |||
| b3e90c9f2b | |||
| 156b7a312d | |||
| cfed31656a | |||
| 14e8a6476f | |||
| ae6de0c030 | |||
| 4036f88296 | |||
| 28718c4218 | |||
| 54c92842d4 | |||
| c83c540dfb | |||
| dd1284f5c0 | |||
| 385ada3291 |
24
Dockerfile-prod
Normal file
24
Dockerfile-prod
Normal file
@@ -0,0 +1,24 @@
|
||||
# 1단계에서 만든 로컬 베이스 이미지를 사용
|
||||
FROM 192.168.2.73:18082/kamco-cd/base-java21-gdal:1.0
|
||||
FROM 192.168.2.73:18082/kamco-cd/base-java21-gdal:1.0
|
||||
|
||||
# 사용자 설정 (앱 별로 다를 수 있으므로 여기에 유지)
|
||||
ARG UID=1000
|
||||
ARG GID=1000
|
||||
|
||||
RUN groupadd -g ${GID} kcomu \
|
||||
&& useradd -u ${UID} -g ${GID} -m kcomu
|
||||
|
||||
USER kcomu
|
||||
|
||||
# 작업 디렉토리 설정
|
||||
WORKDIR /app
|
||||
|
||||
# JAR 파일 복사 (Jenkins에서 빌드된 ROOT.jar)
|
||||
COPY build/libs/ROOT.jar app.jar
|
||||
|
||||
# 포트 노출
|
||||
EXPOSE 8080
|
||||
# 애플리케이션 실행
|
||||
# dev 프로파일로 실행
|
||||
ENTRYPOINT ["java", "-jar", "-Dspring.profiles.active=prod", "app.jar"]
|
||||
35
docker-compose-prod.yml
Normal file
35
docker-compose-prod.yml
Normal file
@@ -0,0 +1,35 @@
|
||||
services:
|
||||
kamco-changedetection-api:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile-prod
|
||||
args:
|
||||
UID: 1000 # manager01 UID
|
||||
GID: 1000 # manager01 GID
|
||||
image: kamco-changedetection-api:${IMAGE_TAG:-latest}
|
||||
container_name: kamco-changedetection-api
|
||||
user: "1000:1000"
|
||||
ports:
|
||||
- "7100:8080"
|
||||
environment:
|
||||
- SPRING_PROFILES_ACTIVE=dev
|
||||
- TZ=Asia/Seoul
|
||||
volumes:
|
||||
- /mnt/nfs_share/images:/app/original-images
|
||||
- /mnt/nfs_share/model_output:/app/model-outputs
|
||||
- /mnt/nfs_share/train_dataset:/app/train-dataset
|
||||
- /mnt/nfs_share/tmp:/app/tmp
|
||||
- /kamco-nfs:/kamco-nfs
|
||||
networks:
|
||||
- kamco-cds
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: [ "CMD", "curl", "-f", "http://localhost:8080/monitor/health" ]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 40s
|
||||
|
||||
networks:
|
||||
kamco-cds:
|
||||
external: true
|
||||
@@ -15,7 +15,6 @@ import com.kamco.cd.kamcoback.scheduler.service.GukYuinApiLabelJobService;
|
||||
import com.kamco.cd.kamcoback.scheduler.service.GukYuinApiPnuJobService;
|
||||
import com.kamco.cd.kamcoback.scheduler.service.GukYuinApiStatusJobService;
|
||||
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.Parameter;
|
||||
import io.swagger.v3.oas.annotations.media.Content;
|
||||
@@ -331,7 +330,6 @@ public class GukYuinApiController {
|
||||
return ApiResponseDto.ok(gukYuinApiService.findRlbDtctObject(chnDtctObjtId));
|
||||
}
|
||||
|
||||
@Hidden
|
||||
@Operation(summary = "job test pnu", description = "job test pnu")
|
||||
@GetMapping("/job-test/pnu")
|
||||
public ApiResponseDto<Void> findGukYuinContListPnuUpdate() {
|
||||
@@ -339,7 +337,6 @@ public class GukYuinApiController {
|
||||
return ApiResponseDto.ok(null);
|
||||
}
|
||||
|
||||
@Hidden
|
||||
@Operation(summary = "job test status", description = "job test status")
|
||||
@GetMapping("/job-test/status")
|
||||
public ApiResponseDto<Void> findGukYuinMastCompleteYn() {
|
||||
@@ -347,7 +344,6 @@ public class GukYuinApiController {
|
||||
return ApiResponseDto.ok(null);
|
||||
}
|
||||
|
||||
@Hidden
|
||||
@Operation(summary = "job test label", description = "job test label")
|
||||
@GetMapping("/job-test/label")
|
||||
public ApiResponseDto<Void> findLabelingCompleteSend() {
|
||||
@@ -355,7 +351,6 @@ public class GukYuinApiController {
|
||||
return ApiResponseDto.ok(null);
|
||||
}
|
||||
|
||||
@Hidden
|
||||
@Operation(summary = "job test stblt", description = "job test stblt")
|
||||
@GetMapping("/job-test/stblt")
|
||||
public ApiResponseDto<Void> findGukYuinEligibleForSurvey() {
|
||||
|
||||
@@ -124,7 +124,7 @@ public class ChngDetectContDto {
|
||||
|
||||
private Integer code;
|
||||
private String message;
|
||||
private DtoPnuDetectMpng result;
|
||||
private List<Boolean> result;
|
||||
private Boolean success;
|
||||
}
|
||||
|
||||
|
||||
@@ -456,16 +456,6 @@ public class GukYuinApiService {
|
||||
Integer maxStage =
|
||||
gukyuinCoreService.findMapSheetLearnYearStage(info.getCompareYyyy(), info.getTargetYyyy());
|
||||
|
||||
// 1회차를 종료 상태로 처리하고 2회차를 보내야 함
|
||||
// 추론(learn), 학습데이터(inference) 둘 다 종료 처리
|
||||
if (maxStage > 0) {
|
||||
Long learnId =
|
||||
gukyuinCoreService.findMapSheetLearnInfoByYyyy(
|
||||
info.getCompareYyyy(), info.getTargetYyyy(), maxStage);
|
||||
gukyuinCoreService.updateMapSheetLearnGukyuinEndStatus(learnId);
|
||||
gukyuinCoreService.updateMapSheetInferenceLabelEndStatus(learnId);
|
||||
}
|
||||
|
||||
// reqDto 셋팅
|
||||
ChnDetectMastReqDto reqDto = new ChnDetectMastReqDto();
|
||||
reqDto.setCprsYr(String.valueOf(info.getCompareYyyy()));
|
||||
@@ -474,7 +464,7 @@ public class GukYuinApiService {
|
||||
reqDto.setChnDtctId(info.getUid());
|
||||
reqDto.setPathNm("/kamco-nfs/dataset/export/" + info.getUid());
|
||||
|
||||
if (!Files.isDirectory(Path.of("/kamco-nfs/dataset/export/" + info.getUid()))) {
|
||||
if (Files.isDirectory(Path.of("/kamco-nfs/dataset/export/" + info.getUid()))) {
|
||||
return new ResponseObj(
|
||||
ApiResponseCode.NOT_FOUND_DATA, "파일 경로에 회차 실행 파일이 생성되지 않았습니다. 확인 부탁드립니다.");
|
||||
}
|
||||
|
||||
@@ -64,17 +64,4 @@ public class GukYuinCoreService {
|
||||
public List<LabelSendDto> findLabelingCompleteSendList(LocalDate 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,12 +24,10 @@ public class GukYuinStbltJobCoreService {
|
||||
|
||||
@Transactional
|
||||
public void updateGukYuinEligibleForSurvey(String resultUid, RlbDtctMastDto stbltDto) {
|
||||
String chnDtctObjtId = "";
|
||||
PnuEntity entity =
|
||||
gukYuinStbltRepository.findPnuEntityByResultUid(resultUid, stbltDto.getPnu());
|
||||
|
||||
if (entity != null) {
|
||||
chnDtctObjtId = resultUid;
|
||||
|
||||
entity.setPnuDtctId(stbltDto.getPnuDtctId());
|
||||
entity.setPnu(stbltDto.getPnu());
|
||||
@@ -68,8 +66,6 @@ public class GukYuinStbltJobCoreService {
|
||||
|
||||
entity.setCreatedDttm(ZonedDateTime.now());
|
||||
gukYuinStbltRepository.save(entity);
|
||||
|
||||
//
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,9 +53,8 @@ public class GukYuinPnuJobRepositoryImpl implements GukYuinPnuJobRepositoryCusto
|
||||
if (entity == null) {
|
||||
queryFactory
|
||||
.insert(pnuEntity)
|
||||
.columns(
|
||||
pnuEntity.geo.geoUid, pnuEntity.pnu, pnuEntity.createdDttm, pnuEntity.chnDtctObjtId)
|
||||
.values(geoUid, pnu, ZonedDateTime.now(), chnDtctObjtId)
|
||||
.columns(pnuEntity.geo.geoUid, pnuEntity.pnu, pnuEntity.createdDttm)
|
||||
.values(geoUid, pnu, ZonedDateTime.now())
|
||||
.execute();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,10 +39,4 @@ public interface GukYuinRepositoryCustom {
|
||||
void updateAnalDataInferenceGeomSendDttm(Long geoUid);
|
||||
|
||||
List<LabelSendDto> findLabelingCompleteSendList(LocalDate yesterday);
|
||||
|
||||
Long findMapSheetLearnInfoByYyyy(Integer compareYyyy, Integer targetYyyy, Integer maxStage);
|
||||
|
||||
void updateMapSheetLearnGukyuinEndStatus(Long learnId);
|
||||
|
||||
void updateMapSheetInferenceLabelEndStatus(Long learnId);
|
||||
}
|
||||
|
||||
@@ -13,7 +13,6 @@ 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.GukYuinStatus;
|
||||
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.querydsl.core.types.Projections;
|
||||
import com.querydsl.core.types.dsl.BooleanExpression;
|
||||
@@ -205,7 +204,6 @@ public class GukYuinRepositoryImpl implements GukYuinRepositoryCustom {
|
||||
.update(mapSheetAnalInferenceEntity)
|
||||
.set(mapSheetAnalInferenceEntity.gukyuinUsed, "Y")
|
||||
.set(mapSheetAnalInferenceEntity.gukyuinApplyDttm, ZonedDateTime.now())
|
||||
.set(mapSheetAnalInferenceEntity.stage, Integer.parseInt(registRes.getChnDtctSno()))
|
||||
.where(mapSheetAnalInferenceEntity.learnId.eq(learnId))
|
||||
.execute();
|
||||
}
|
||||
@@ -285,39 +283,6 @@ public class GukYuinRepositoryImpl implements GukYuinRepositoryCustom {
|
||||
.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
|
||||
@Transactional
|
||||
public void updateGukYuinApplyStateComplete(Long id, GukYuinStatus status) {
|
||||
|
||||
@@ -46,7 +46,7 @@ public class GukYuinStbltJobRepositoryImpl implements GukYuinStbltJobRepositoryC
|
||||
.on(mapSheetAnalDataInferenceEntity.id.eq(mapSheetAnalDataInferenceGeomEntity.dataUid))
|
||||
.where(
|
||||
mapSheetLearnEntity.applyStatus.eq(GukYuinStatus.PNU_COMPLETED.getId()),
|
||||
mapSheetAnalDataInferenceGeomEntity.pnu.gt(0),
|
||||
mapSheetAnalDataInferenceGeomEntity.pnu.isNotNull(),
|
||||
mapSheetAnalDataInferenceGeomEntity.fitState.isNull())
|
||||
.groupBy(mapSheetLearnEntity.id, mapSheetLearnEntity.uid, mapSheetLearnEntity.chnDtctMstId)
|
||||
.having(mapSheetAnalDataInferenceGeomEntity.geoUid.count().gt(1L))
|
||||
|
||||
@@ -8,7 +8,6 @@ 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.QMemberEntity.memberEntity;
|
||||
|
||||
import com.kamco.cd.kamcoback.common.enums.ImageryFitStatus;
|
||||
import com.kamco.cd.kamcoback.common.enums.StatusType;
|
||||
import com.kamco.cd.kamcoback.label.dto.LabelAllocateDto;
|
||||
import com.kamco.cd.kamcoback.label.dto.LabelAllocateDto.AllocateInfoDto;
|
||||
@@ -83,9 +82,7 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
|
||||
.innerJoin(mapSheetAnalDataInferenceGeomEntity)
|
||||
.on(
|
||||
mapSheetAnalDataInferenceEntity.id.eq(mapSheetAnalDataInferenceGeomEntity.dataUid),
|
||||
// mapSheetAnalDataInferenceGeomEntity.pnu.isNotNull(),
|
||||
mapSheetAnalDataInferenceGeomEntity.pnu.gt(0),
|
||||
mapSheetAnalDataInferenceGeomEntity.fitState.eq(ImageryFitStatus.UNFIT.getId()),
|
||||
mapSheetAnalDataInferenceGeomEntity.pnu.isNotNull(),
|
||||
mapSheetAnalDataInferenceGeomEntity.labelState.isNull())
|
||||
.where(
|
||||
mapSheetAnalInferenceEntity.uuid.eq(uuid),
|
||||
@@ -192,9 +189,7 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
|
||||
.innerJoin(mapSheetAnalDataInferenceGeomEntity)
|
||||
.on(
|
||||
mapSheetAnalDataInferenceEntity.id.eq(mapSheetAnalDataInferenceGeomEntity.dataUid),
|
||||
// mapSheetAnalDataInferenceGeomEntity.pnu.isNotNull(),
|
||||
mapSheetAnalDataInferenceGeomEntity.pnu.gt(0),
|
||||
mapSheetAnalDataInferenceGeomEntity.fitState.eq(ImageryFitStatus.UNFIT.getId()),
|
||||
mapSheetAnalDataInferenceGeomEntity.pnu.isNotNull(),
|
||||
mapSheetAnalDataInferenceGeomEntity.labelState.isNull())
|
||||
.where(mapSheetAnalInferenceEntity.uuid.eq(uuid))
|
||||
.fetchOne();
|
||||
@@ -385,10 +380,9 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
|
||||
mapSheetAnalDataInferenceGeomEntity.compareYyyy.eq(analEntity.getCompareYyyy()),
|
||||
mapSheetAnalDataInferenceGeomEntity.targetYyyy.eq(analEntity.getTargetYyyy()),
|
||||
mapSheetAnalDataInferenceGeomEntity.stage.eq(analEntity.getStage()),
|
||||
// mapSheetAnalDataInferenceGeomEntity.pnu.isNotNull()
|
||||
mapSheetAnalDataInferenceGeomEntity.pnu.gt(0L),
|
||||
mapSheetAnalDataInferenceGeomEntity.fitState.eq(
|
||||
ImageryFitStatus.UNFIT.getId()) // TODO:
|
||||
mapSheetAnalDataInferenceGeomEntity.pnu.isNotNull()
|
||||
// mapSheetAnalDataInferenceGeomEntity.pnu.gt(0L)
|
||||
// mapSheetAnalDataInferenceGeomEntity.passYn.isFalse() //TODO:
|
||||
// 추후 라벨링 대상 조건 수정하기
|
||||
)
|
||||
.fetchOne();
|
||||
@@ -560,9 +554,11 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
|
||||
mapSheetAnalDataInferenceGeomEntity.dataUid))
|
||||
.where(
|
||||
mapSheetAnalInferenceEntity.uuid.eq(targetUuid),
|
||||
// mapSheetAnalDataInferenceGeomEntity.pnu.isNotNull()
|
||||
mapSheetAnalDataInferenceGeomEntity.pnu.gt(0L),
|
||||
mapSheetAnalDataInferenceGeomEntity.fitState.eq(ImageryFitStatus.UNFIT.getId()))
|
||||
mapSheetAnalDataInferenceGeomEntity.pnu.isNotNull()
|
||||
// mapSheetAnalDataInferenceGeomEntity.pnu.gt(0L),
|
||||
// mapSheetAnalDataInferenceGeomEntity.passYn.isFalse() //TODO: 추후 라벨링
|
||||
// 대상 조건 수정하기
|
||||
)
|
||||
.fetchOne();
|
||||
}
|
||||
|
||||
@@ -579,7 +575,8 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
|
||||
queryFactory
|
||||
.select(labelingAssignmentEntity.count())
|
||||
.from(labelingAssignmentEntity)
|
||||
.where(analUidCondition, labelingAssignmentEntity.workState.in("SKIP", "DONE"))
|
||||
.where(
|
||||
analUidCondition, labelingAssignmentEntity.workState.in("ASSIGNED", "SKIP", "DONE"))
|
||||
.fetchOne();
|
||||
|
||||
Long skipCount =
|
||||
@@ -604,13 +601,6 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
|
||||
.where(analUidCondition, labelingAssignmentEntity.inspectState.eq("COMPLETE"))
|
||||
.fetchOne();
|
||||
|
||||
Long inspectionExcept =
|
||||
queryFactory
|
||||
.select(labelingAssignmentEntity.count())
|
||||
.from(labelingAssignmentEntity)
|
||||
.where(analUidCondition, labelingAssignmentEntity.inspectState.eq("EXCEPT"))
|
||||
.fetchOne();
|
||||
|
||||
Long inspectorCount =
|
||||
queryFactory
|
||||
.select(labelingAssignmentEntity.inspectorUid.countDistinct())
|
||||
@@ -623,7 +613,6 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
|
||||
long labelCompleted = labelingCompleted != null ? labelingCompleted : 0L;
|
||||
long inspectCompleted = inspectionCompleted != null ? inspectionCompleted : 0L;
|
||||
long skipped = skipCount != null ? skipCount : 0L;
|
||||
long inspectExcepted = inspectionExcept != null ? inspectionExcept : 0L;
|
||||
|
||||
long labelingRemaining = labelingTotal - labelCompleted - skipped;
|
||||
if (labelingRemaining < 0) {
|
||||
@@ -631,7 +620,7 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
|
||||
}
|
||||
|
||||
long inspectionTotal = labelingTotal;
|
||||
long inspectionRemaining = inspectionTotal - inspectCompleted - inspectExcepted;
|
||||
long inspectionRemaining = inspectionTotal - inspectCompleted - skipped;
|
||||
if (inspectionRemaining < 0) {
|
||||
inspectionRemaining = 0;
|
||||
}
|
||||
@@ -668,7 +657,7 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
|
||||
.inspectionStatus(inspectionStatus)
|
||||
.inspectionTotalCount(inspectionTotal)
|
||||
.inspectionCompletedCount(inspectCompleted)
|
||||
.inspectionSkipCount(inspectExcepted)
|
||||
.inspectionSkipCount(skipped) // TODO
|
||||
.inspectionRemainingCount(inspectionRemaining)
|
||||
.inspectorCount(inspectorCount != null ? inspectorCount : 0L)
|
||||
.progressRate(labelingRate)
|
||||
@@ -750,9 +739,11 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
|
||||
mapSheetAnalInferenceEntity.targetYyyy.eq(
|
||||
mapSheetAnalDataInferenceGeomEntity.targetYyyy),
|
||||
mapSheetAnalInferenceEntity.stage.eq(mapSheetAnalDataInferenceGeomEntity.stage),
|
||||
// mapSheetAnalDataInferenceGeomEntity.pnu.isNotNull()
|
||||
mapSheetAnalDataInferenceGeomEntity.pnu.gt(0),
|
||||
mapSheetAnalDataInferenceGeomEntity.fitState.eq(ImageryFitStatus.UNFIT.getId()))
|
||||
mapSheetAnalDataInferenceGeomEntity.pnu.isNotNull()
|
||||
// mapSheetAnalDataInferenceGeomEntity.pnu.gt(0),
|
||||
// mapSheetAnalDataInferenceGeomEntity.passYn.isFalse() //TODO: 추후 라벨링 대상 조건
|
||||
// 수정하기
|
||||
)
|
||||
.where(mapSheetAnalInferenceEntity.id.eq(analEntity.getId()))
|
||||
.groupBy(
|
||||
mapSheetAnalInferenceEntity.analTitle,
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.kamco.cd.kamcoback.postgres.repository.label;
|
||||
|
||||
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.LabelState;
|
||||
import com.kamco.cd.kamcoback.label.dto.LabelWorkDto;
|
||||
@@ -295,14 +294,14 @@ public class LabelWorkRepositoryImpl implements LabelWorkRepositoryCustom {
|
||||
|
||||
if (searchReq.getSearchVal() != null && !searchReq.getSearchVal().isEmpty()) {
|
||||
whereSubBuilder.and(
|
||||
Expressions.stringTemplate("{0}", memberEntity.employeeNo)
|
||||
Expressions.stringTemplate("{0}", memberEntity.userId)
|
||||
.likeIgnoreCase("%" + searchReq.getSearchVal() + "%")
|
||||
.or(
|
||||
Expressions.stringTemplate("{0}", memberEntity.name)
|
||||
.likeIgnoreCase("%" + searchReq.getSearchVal() + "%")));
|
||||
}
|
||||
|
||||
whereSubBuilder.and(labelingAssignmentEntity.workerUid.eq(memberEntity.employeeNo));
|
||||
whereSubBuilder.and(labelingAssignmentEntity.workerUid.eq(memberEntity.userId));
|
||||
|
||||
// 공통 조건 추출
|
||||
BooleanExpression doneStateCondition =
|
||||
@@ -345,7 +344,7 @@ public class LabelWorkRepositoryImpl implements LabelWorkRepositoryCustom {
|
||||
WorkerState.class,
|
||||
memberEntity.userRole,
|
||||
memberEntity.name,
|
||||
memberEntity.employeeNo,
|
||||
memberEntity.userId,
|
||||
assignedCnt.as("assignedCnt"),
|
||||
doneCnt.as("doneCnt"),
|
||||
skipCnt.as("skipCnt"),
|
||||
@@ -364,10 +363,7 @@ public class LabelWorkRepositoryImpl implements LabelWorkRepositoryCustom {
|
||||
.on(whereSubBuilder)
|
||||
.where(whereBuilder)
|
||||
.groupBy(
|
||||
memberEntity.userRole,
|
||||
memberEntity.name,
|
||||
memberEntity.employeeNo,
|
||||
memberEntity.status)
|
||||
memberEntity.userRole, memberEntity.name, memberEntity.userId, memberEntity.status)
|
||||
.orderBy(orderSpecifiers.toArray(new OrderSpecifier[0]))
|
||||
.offset(pageable.getOffset())
|
||||
.limit(pageable.getPageSize())
|
||||
@@ -445,14 +441,14 @@ public class LabelWorkRepositoryImpl implements LabelWorkRepositoryCustom {
|
||||
|
||||
if (searchReq.getSearchVal() != null && !searchReq.getSearchVal().isEmpty()) {
|
||||
whereSubBuilder.and(
|
||||
Expressions.stringTemplate("{0}", memberEntity.employeeNo)
|
||||
Expressions.stringTemplate("{0}", memberEntity.userId)
|
||||
.likeIgnoreCase("%" + searchReq.getSearchVal() + "%")
|
||||
.or(
|
||||
Expressions.stringTemplate("{0}", memberEntity.name)
|
||||
.likeIgnoreCase("%" + searchReq.getSearchVal() + "%")));
|
||||
}
|
||||
|
||||
whereSubBuilder.and(labelingAssignmentEntity.inspectorUid.eq(memberEntity.employeeNo));
|
||||
whereSubBuilder.and(labelingAssignmentEntity.inspectorUid.eq(memberEntity.userId));
|
||||
|
||||
// 공통 조건 추출
|
||||
BooleanExpression doneStateCondition =
|
||||
@@ -496,7 +492,7 @@ public class LabelWorkRepositoryImpl implements LabelWorkRepositoryCustom {
|
||||
WorkerState.class,
|
||||
memberEntity.userRole,
|
||||
memberEntity.name,
|
||||
memberEntity.employeeNo,
|
||||
memberEntity.userId,
|
||||
assignedCnt.as("assignedCnt"),
|
||||
doneCnt.as("doneCnt"),
|
||||
skipCnt.as("skipCnt"),
|
||||
@@ -515,10 +511,7 @@ public class LabelWorkRepositoryImpl implements LabelWorkRepositoryCustom {
|
||||
.on(whereSubBuilder)
|
||||
.where(whereBuilder)
|
||||
.groupBy(
|
||||
memberEntity.userRole,
|
||||
memberEntity.name,
|
||||
memberEntity.employeeNo,
|
||||
memberEntity.status)
|
||||
memberEntity.userRole, memberEntity.name, memberEntity.userId, memberEntity.status)
|
||||
.orderBy(orderSpecifiers.toArray(new OrderSpecifier[0]))
|
||||
.offset(pageable.getOffset())
|
||||
.limit(pageable.getPageSize())
|
||||
@@ -558,14 +551,7 @@ public class LabelWorkRepositoryImpl implements LabelWorkRepositoryCustom {
|
||||
|
||||
NumberExpression<Long> labelTotCnt =
|
||||
new CaseBuilder()
|
||||
// .when(mapSheetAnalDataInferenceGeomEntity.pnu.isNotNull())
|
||||
.when(
|
||||
mapSheetAnalDataInferenceGeomEntity
|
||||
.pnu
|
||||
.gt(0)
|
||||
.and(
|
||||
mapSheetAnalDataInferenceGeomEntity.fitState.eq(
|
||||
ImageryFitStatus.UNFIT.getId())))
|
||||
.when(mapSheetAnalDataInferenceGeomEntity.pnu.isNotNull())
|
||||
.then(1L)
|
||||
.otherwise(0L)
|
||||
.sum();
|
||||
|
||||
@@ -8,7 +8,6 @@ import java.util.List;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Log4j2
|
||||
@@ -32,11 +31,11 @@ public class GukYuinApiLabelJobService {
|
||||
}
|
||||
|
||||
/** 어제 라벨링 검수 완료된 것 -> 국유인에 전송 */
|
||||
@Scheduled(cron = "0 0 2 * * *")
|
||||
// @Scheduled(cron = "0 0 2 * * *")
|
||||
public void findLabelingCompleteSend() {
|
||||
if (isLocalProfile()) {
|
||||
return;
|
||||
}
|
||||
// if (isLocalProfile()) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
List<GeomUidDto> list = gukYuinLabelJobCoreService.findYesterdayLabelingCompleteList();
|
||||
if (list.isEmpty()) {
|
||||
|
||||
@@ -12,7 +12,6 @@ import java.util.List;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Log4j2
|
||||
@@ -36,11 +35,11 @@ public class GukYuinApiPnuJobService {
|
||||
}
|
||||
|
||||
/** 국유인 등록 완료 후, 탐지객체 조회해서 PNU 업데이트 하는 스케줄링 하루 1번 새벽 1시에 실행 */
|
||||
@Scheduled(cron = "0 0 1 * * *")
|
||||
// @Scheduled(cron = "0 0/10 * * * *") // 0 0 1 * * *
|
||||
public void findGukYuinContListPnuUpdate() {
|
||||
if (isLocalProfile()) {
|
||||
return;
|
||||
}
|
||||
// if (isLocalProfile()) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
List<LearnKeyDto> list =
|
||||
gukYuinPnuJobCoreService.findGukyuinApplyStatusUidList(
|
||||
|
||||
@@ -9,7 +9,6 @@ import java.util.List;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Log4j2
|
||||
@@ -33,11 +32,11 @@ public class GukYuinApiStatusJobService {
|
||||
}
|
||||
|
||||
/** 국유인 연동 후, 100% 되었는지 확인하는 스케줄링 매 10분마다 호출 */
|
||||
@Scheduled(cron = "0 0/10 * * * *")
|
||||
// @Scheduled(cron = "0 0/10 * * * *") // 0 0/10 * * * *
|
||||
public void findGukYuinMastCompleteYn() {
|
||||
if (isLocalProfile()) {
|
||||
return;
|
||||
}
|
||||
// if (isLocalProfile()) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
List<LearnKeyDto> list =
|
||||
gukYuinJobCoreService.findGukyuinApplyStatusUidList(
|
||||
|
||||
@@ -13,7 +13,6 @@ import java.util.List;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Log4j2
|
||||
@@ -37,11 +36,11 @@ public class GukYuinApiStbltJobService {
|
||||
}
|
||||
|
||||
/** 국유인 연동 후, 실태조사 적합여부 확인하여 update */
|
||||
@Scheduled(cron = "0 0 3 * * *") // 0 0 3 * * *
|
||||
// @Scheduled(cron = "0 * * * * *") // 0 0 3 * * *
|
||||
public void findGukYuinEligibleForSurvey() {
|
||||
if (isLocalProfile()) {
|
||||
return;
|
||||
}
|
||||
// if (isLocalProfile()) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
List<LearnKeyDto> list =
|
||||
gukYuinStbltJobCoreService.findGukYuinEligibleForSurveyList(
|
||||
@@ -52,11 +51,12 @@ public class GukYuinApiStbltJobService {
|
||||
|
||||
for (LearnKeyDto dto : list) {
|
||||
try {
|
||||
String yesterday =
|
||||
LocalDate.now(ZoneId.of("Asia/Seoul"))
|
||||
.minusDays(1)
|
||||
.format(DateTimeFormatter.ofPattern("yyyyMMdd"));
|
||||
RlbDtctDto result = gukYuinApiService.findRlbDtctList(dto.getUid(), yesterday);
|
||||
String today =
|
||||
LocalDate.now(ZoneId.of("Asia/Seoul")).format(DateTimeFormatter.ofPattern("yyyyMMdd"));
|
||||
// String yesterday =
|
||||
// LocalDate.now(ZoneId.of("Asia/Seoul")).minusDays(1).format(DateTimeFormatter.ofPattern("yyyyMMdd"));
|
||||
RlbDtctDto result =
|
||||
gukYuinApiService.findRlbDtctList(dto.getUid(), today); // todo : test 다 끝내고 어제로 바꿔야 함
|
||||
|
||||
if (result == null || result.getResult() == null || result.getResult().isEmpty()) {
|
||||
log.warn("[GUKYUIN] empty result chnDtctMstId={}", dto.getChnDtctMstId());
|
||||
@@ -67,7 +67,6 @@ public class GukYuinApiStbltJobService {
|
||||
String resultUid = stbltDto.getChnDtctObjtId();
|
||||
gukYuinStbltJobCoreService.updateGukYuinEligibleForSurvey(resultUid, stbltDto);
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("[GUKYUIN] failed uid={}", dto.getChnDtctMstId(), e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user