Merge branch 'feat/dev_251201' of https://10.100.0.10:3210/dabeeo/kamco-dabeeo-backoffice into feat/dev_251201
This commit is contained in:
@@ -1,9 +1,10 @@
|
|||||||
package com.kamco.cd.kamcoback.label;
|
package com.kamco.cd.kamcoback.label;
|
||||||
|
|
||||||
import com.kamco.cd.kamcoback.code.dto.CommonCodeDto;
|
|
||||||
import com.kamco.cd.kamcoback.config.api.ApiResponseDto;
|
import com.kamco.cd.kamcoback.config.api.ApiResponseDto;
|
||||||
import com.kamco.cd.kamcoback.label.dto.LabelWorkDto;
|
import com.kamco.cd.kamcoback.label.dto.LabelWorkDto;
|
||||||
|
import com.kamco.cd.kamcoback.label.dto.LabelWorkDto.ChangeDetectYear;
|
||||||
import com.kamco.cd.kamcoback.label.dto.LabelWorkDto.LabelWorkMng;
|
import com.kamco.cd.kamcoback.label.dto.LabelWorkDto.LabelWorkMng;
|
||||||
|
import com.kamco.cd.kamcoback.label.dto.LabelWorkDto.LabelWorkMngDetail;
|
||||||
import com.kamco.cd.kamcoback.label.dto.LabelWorkDto.LabelWorkMngSearchReq;
|
import com.kamco.cd.kamcoback.label.dto.LabelWorkDto.LabelWorkMngSearchReq;
|
||||||
import com.kamco.cd.kamcoback.label.service.LabelWorkService;
|
import com.kamco.cd.kamcoback.label.service.LabelWorkService;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
@@ -13,10 +14,13 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
|||||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.UUID;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.data.domain.Page;
|
import org.springframework.data.domain.Page;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
@@ -30,6 +34,24 @@ public class LabelWorkerApiController {
|
|||||||
|
|
||||||
private final LabelWorkService labelWorkService;
|
private final LabelWorkService labelWorkService;
|
||||||
|
|
||||||
|
@Operation(summary = "변화탐지 년도 셀렉트박스 조회", description = "라벨링작업 관리 > 목록 조회 변화탐지 년도 셀렉트박스 조회")
|
||||||
|
@ApiResponses(
|
||||||
|
value = {
|
||||||
|
@ApiResponse(
|
||||||
|
responseCode = "200",
|
||||||
|
description = "조회 성공",
|
||||||
|
content =
|
||||||
|
@Content(
|
||||||
|
mediaType = "application/json",
|
||||||
|
schema = @Schema(implementation = ChangeDetectYear.class))),
|
||||||
|
@ApiResponse(responseCode = "404", description = "코드를 찾을 수 없음", content = @Content),
|
||||||
|
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||||
|
})
|
||||||
|
@GetMapping("/change-detect-year")
|
||||||
|
public ApiResponseDto<List<ChangeDetectYear>> getChangeDetectYear() {
|
||||||
|
return ApiResponseDto.ok(labelWorkService.getChangeDetectYear());
|
||||||
|
}
|
||||||
|
|
||||||
@Operation(summary = "라벨링작업 관리 > 목록 조회", description = "라벨링작업 관리 > 목록 조회")
|
@Operation(summary = "라벨링작업 관리 > 목록 조회", description = "라벨링작업 관리 > 목록 조회")
|
||||||
@ApiResponses(
|
@ApiResponses(
|
||||||
value = {
|
value = {
|
||||||
@@ -39,26 +61,45 @@ public class LabelWorkerApiController {
|
|||||||
content =
|
content =
|
||||||
@Content(
|
@Content(
|
||||||
mediaType = "application/json",
|
mediaType = "application/json",
|
||||||
schema = @Schema(implementation = CommonCodeDto.Basic.class))),
|
schema = @Schema(implementation = Page.class))),
|
||||||
@ApiResponse(responseCode = "404", description = "코드를 찾을 수 없음", content = @Content),
|
@ApiResponse(responseCode = "404", description = "코드를 찾을 수 없음", content = @Content),
|
||||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||||
})
|
})
|
||||||
@GetMapping("/label-work-mng-list")
|
@GetMapping("/label-work-mng-list")
|
||||||
public ApiResponseDto<Page<LabelWorkMng>> labelWorkMngList(
|
public ApiResponseDto<Page<LabelWorkMng>> labelWorkMngList(
|
||||||
@Parameter(description = "변화탐지년도", example = "2024") @RequestParam(required = false)
|
@Parameter(description = "변화탐지년도", example = "2022-2024") @RequestParam(required = false)
|
||||||
Integer detectYyyy,
|
String detectYear,
|
||||||
@Parameter(description = "시작일", example = "20260101") @RequestParam String strtDttm,
|
@Parameter(description = "시작일", example = "20220101") @RequestParam String strtDttm,
|
||||||
@Parameter(description = "종료일", example = "20261201") @RequestParam String endDttm,
|
@Parameter(description = "종료일", example = "20261201") @RequestParam String endDttm,
|
||||||
@Parameter(description = "페이지 번호 (0부터 시작)", example = "0") @RequestParam(defaultValue = "0")
|
@Parameter(description = "페이지 번호 (0부터 시작)", example = "0") @RequestParam(defaultValue = "0")
|
||||||
int page,
|
int page,
|
||||||
@Parameter(description = "페이지 크기", example = "20") @RequestParam(defaultValue = "20")
|
@Parameter(description = "페이지 크기", example = "20") @RequestParam(defaultValue = "20")
|
||||||
int size) {
|
int size) {
|
||||||
LabelWorkDto.LabelWorkMngSearchReq searchReq = new LabelWorkMngSearchReq();
|
LabelWorkDto.LabelWorkMngSearchReq searchReq = new LabelWorkMngSearchReq();
|
||||||
searchReq.setDetectYyyy(detectYyyy);
|
searchReq.setDetectYear(detectYear);
|
||||||
searchReq.setStrtDttm(strtDttm);
|
searchReq.setStrtDttm(strtDttm);
|
||||||
searchReq.setEndDttm(endDttm);
|
searchReq.setEndDttm(endDttm);
|
||||||
searchReq.setPage(page);
|
searchReq.setPage(page);
|
||||||
searchReq.setSize(size);
|
searchReq.setSize(size);
|
||||||
return ApiResponseDto.ok(labelWorkService.labelWorkMngList(searchReq));
|
return ApiResponseDto.ok(labelWorkService.labelWorkMngList(searchReq));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "라벨링작업 관리 > 작업 배정 정보조회", description = "작업 배정 정보조회")
|
||||||
|
@ApiResponses(
|
||||||
|
value = {
|
||||||
|
@ApiResponse(
|
||||||
|
responseCode = "200",
|
||||||
|
description = "조회 성공",
|
||||||
|
content =
|
||||||
|
@Content(
|
||||||
|
mediaType = "application/json",
|
||||||
|
schema = @Schema(implementation = LabelWorkMngDetail.class))),
|
||||||
|
@ApiResponse(responseCode = "404", description = "코드를 찾을 수 없음", content = @Content),
|
||||||
|
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||||
|
})
|
||||||
|
@GetMapping("/label-work-mng-detail/{uuid}")
|
||||||
|
public ApiResponseDto<LabelWorkMngDetail> labelWorkMngDetail(
|
||||||
|
@Parameter(description = "uuid") @PathVariable UUID uuid) {
|
||||||
|
return ApiResponseDto.ok(labelWorkService.findLabelWorkMngDetail(uuid));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
package com.kamco.cd.kamcoback.label.dto;
|
package com.kamco.cd.kamcoback.label.dto;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.kamco.cd.kamcoback.common.utils.enums.Enums;
|
import com.kamco.cd.kamcoback.common.utils.enums.Enums;
|
||||||
import com.kamco.cd.kamcoback.common.utils.interfaces.JsonFormatDttm;
|
import com.kamco.cd.kamcoback.common.utils.interfaces.JsonFormatDttm;
|
||||||
import com.kamco.cd.kamcoback.label.dto.LabelAllocateDto.LabelMngState;
|
import com.kamco.cd.kamcoback.label.dto.LabelAllocateDto.LabelMngState;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import java.time.ZonedDateTime;
|
import java.time.ZonedDateTime;
|
||||||
|
import java.util.UUID;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
@@ -14,6 +16,15 @@ import org.springframework.data.domain.Pageable;
|
|||||||
|
|
||||||
public class LabelWorkDto {
|
public class LabelWorkDto {
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@AllArgsConstructor
|
||||||
|
public static class ChangeDetectYear {
|
||||||
|
|
||||||
|
private String code;
|
||||||
|
private String name;
|
||||||
|
}
|
||||||
|
|
||||||
@Schema(name = "LabelWorkMng", description = "라벨작업관리")
|
@Schema(name = "LabelWorkMng", description = "라벨작업관리")
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@@ -21,8 +32,9 @@ public class LabelWorkDto {
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public static class LabelWorkMng {
|
public static class LabelWorkMng {
|
||||||
|
|
||||||
private int compareYyyy;
|
private UUID uuid;
|
||||||
private int targetYyyy;
|
private Integer compareYyyy;
|
||||||
|
private Integer targetYyyy;
|
||||||
private int stage;
|
private int stage;
|
||||||
@JsonFormatDttm private ZonedDateTime createdDttm;
|
@JsonFormatDttm private ZonedDateTime createdDttm;
|
||||||
private Long detectionTotCnt;
|
private Long detectionTotCnt;
|
||||||
@@ -32,6 +44,14 @@ public class LabelWorkDto {
|
|||||||
private Long labelCompleteTotCnt;
|
private Long labelCompleteTotCnt;
|
||||||
@JsonFormatDttm private ZonedDateTime labelStartDttm;
|
@JsonFormatDttm private ZonedDateTime labelStartDttm;
|
||||||
|
|
||||||
|
@JsonProperty("detectYear")
|
||||||
|
public String getDetectYear() {
|
||||||
|
if (compareYyyy == null || targetYyyy == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return compareYyyy + "-" + targetYyyy;
|
||||||
|
}
|
||||||
|
|
||||||
public String getLabelState() {
|
public String getLabelState() {
|
||||||
|
|
||||||
String mngState = "PENDING";
|
String mngState = "PENDING";
|
||||||
@@ -65,6 +85,20 @@ public class LabelWorkDto {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public static class LabelWorkMngDetail {
|
||||||
|
|
||||||
|
private String detectionYear;
|
||||||
|
private Integer stage;
|
||||||
|
@JsonFormatDttm private ZonedDateTime createdDttm;
|
||||||
|
private Long labelTotCnt;
|
||||||
|
private Long labeler;
|
||||||
|
private Long reviewer;
|
||||||
|
}
|
||||||
|
|
||||||
@Schema(name = "LabelWorkMngSearchReq", description = "라벨작업관리 검색 요청")
|
@Schema(name = "LabelWorkMngSearchReq", description = "라벨작업관리 검색 요청")
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@@ -80,7 +114,7 @@ public class LabelWorkDto {
|
|||||||
private int size = 20;
|
private int size = 20;
|
||||||
|
|
||||||
@Schema(description = "변화탐지년도", example = "2024")
|
@Schema(description = "변화탐지년도", example = "2024")
|
||||||
private Integer detectYyyy;
|
private String detectYear;
|
||||||
|
|
||||||
@Schema(description = "시작일", example = "20260101")
|
@Schema(description = "시작일", example = "20260101")
|
||||||
private String strtDttm;
|
private String strtDttm;
|
||||||
|
|||||||
@@ -1,24 +1,52 @@
|
|||||||
package com.kamco.cd.kamcoback.label.service;
|
package com.kamco.cd.kamcoback.label.service;
|
||||||
|
|
||||||
import com.kamco.cd.kamcoback.label.dto.LabelWorkDto;
|
import com.kamco.cd.kamcoback.label.dto.LabelWorkDto;
|
||||||
|
import com.kamco.cd.kamcoback.label.dto.LabelWorkDto.ChangeDetectYear;
|
||||||
import com.kamco.cd.kamcoback.label.dto.LabelWorkDto.LabelWorkMng;
|
import com.kamco.cd.kamcoback.label.dto.LabelWorkDto.LabelWorkMng;
|
||||||
|
import com.kamco.cd.kamcoback.label.dto.LabelWorkDto.LabelWorkMngDetail;
|
||||||
import com.kamco.cd.kamcoback.postgres.core.LabelWorkCoreService;
|
import com.kamco.cd.kamcoback.postgres.core.LabelWorkCoreService;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.UUID;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.data.domain.Page;
|
import org.springframework.data.domain.Page;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Service
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public class LabelWorkService {
|
public class LabelWorkService {
|
||||||
|
|
||||||
private final LabelWorkCoreService labelWorkCoreService;
|
private final LabelWorkCoreService labelWorkCoreService;
|
||||||
|
|
||||||
public LabelWorkService(LabelWorkCoreService labelWorkCoreService) {
|
/**
|
||||||
this.labelWorkCoreService = labelWorkCoreService;
|
* 라벨링작업 관리 목록조회
|
||||||
}
|
*
|
||||||
|
* @param searchReq
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public Page<LabelWorkMng> labelWorkMngList(LabelWorkDto.LabelWorkMngSearchReq searchReq) {
|
public Page<LabelWorkMng> labelWorkMngList(LabelWorkDto.LabelWorkMngSearchReq searchReq) {
|
||||||
|
|
||||||
return labelWorkCoreService.labelWorkMngList(searchReq);
|
return labelWorkCoreService.labelWorkMngList(searchReq);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 작업배정 정보 조회
|
||||||
|
*
|
||||||
|
* @param uuid
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public LabelWorkMngDetail findLabelWorkMngDetail(UUID uuid) {
|
||||||
|
return labelWorkCoreService.findLabelWorkMngDetail(uuid);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 변화탐지 셀렉트박스 조회
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<ChangeDetectYear> getChangeDetectYear() {
|
||||||
|
return labelWorkCoreService.getChangeDetectYear();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
package com.kamco.cd.kamcoback.postgres.core;
|
package com.kamco.cd.kamcoback.postgres.core;
|
||||||
|
|
||||||
import com.kamco.cd.kamcoback.label.dto.LabelWorkDto;
|
import com.kamco.cd.kamcoback.label.dto.LabelWorkDto;
|
||||||
|
import com.kamco.cd.kamcoback.label.dto.LabelWorkDto.ChangeDetectYear;
|
||||||
import com.kamco.cd.kamcoback.label.dto.LabelWorkDto.LabelWorkMng;
|
import com.kamco.cd.kamcoback.label.dto.LabelWorkDto.LabelWorkMng;
|
||||||
|
import com.kamco.cd.kamcoback.label.dto.LabelWorkDto.LabelWorkMngDetail;
|
||||||
import com.kamco.cd.kamcoback.postgres.repository.label.LabelWorkRepository;
|
import com.kamco.cd.kamcoback.postgres.repository.label.LabelWorkRepository;
|
||||||
|
import com.kamco.cd.kamcoback.postgres.repository.members.MembersRepository;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.UUID;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.data.domain.Page;
|
import org.springframework.data.domain.Page;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -12,8 +17,40 @@ import org.springframework.stereotype.Service;
|
|||||||
public class LabelWorkCoreService {
|
public class LabelWorkCoreService {
|
||||||
|
|
||||||
private final LabelWorkRepository labelWorkRepository;
|
private final LabelWorkRepository labelWorkRepository;
|
||||||
|
private final MembersRepository membersRepository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 변화탐지 년도 셀렉트박스 조회
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<ChangeDetectYear> getChangeDetectYear() {
|
||||||
|
return labelWorkRepository.findChangeDetectYearList().stream()
|
||||||
|
.map(
|
||||||
|
e ->
|
||||||
|
new ChangeDetectYear(
|
||||||
|
e.getCompareYyyy() + "-" + e.getTargetYyyy(),
|
||||||
|
e.getCompareYyyy() + "-" + e.getTargetYyyy()))
|
||||||
|
.toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 라벨링작업 관리 목록 조회
|
||||||
|
*
|
||||||
|
* @param searchReq
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public Page<LabelWorkMng> labelWorkMngList(LabelWorkDto.LabelWorkMngSearchReq searchReq) {
|
public Page<LabelWorkMng> labelWorkMngList(LabelWorkDto.LabelWorkMngSearchReq searchReq) {
|
||||||
return labelWorkRepository.labelWorkMngList(searchReq);
|
return labelWorkRepository.labelWorkMngList(searchReq);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 작업배정 정보 조회
|
||||||
|
*
|
||||||
|
* @param uuid
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public LabelWorkMngDetail findLabelWorkMngDetail(UUID uuid) {
|
||||||
|
return labelWorkRepository.findLabelWorkMngDetail(uuid);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,20 +36,29 @@ public class InferenceResultRepositoryImpl implements InferenceResultRepositoryC
|
|||||||
String sql =
|
String sql =
|
||||||
"""
|
"""
|
||||||
INSERT INTO tb_map_sheet_anal_inference (
|
INSERT INTO tb_map_sheet_anal_inference (
|
||||||
compare_yyyy,
|
stage,
|
||||||
target_yyyy,
|
compare_yyyy,
|
||||||
stage,
|
target_yyyy,
|
||||||
anal_title,
|
anal_title,
|
||||||
detecting_cnt
|
detecting_cnt,
|
||||||
)
|
created_dttm,
|
||||||
SELECT
|
updated_dttm
|
||||||
r.input1 AS compare_yyyy,
|
)
|
||||||
r.input2 AS target_yyyy,
|
SELECT
|
||||||
r.stage,
|
r.stage,
|
||||||
CONCAT(r.stage ,'_', r.input1 ,'_', r.input2) AS anal_title,
|
r.input1 AS compare_yyyy,
|
||||||
count(*)
|
r.input2 AS target_yyyy,
|
||||||
FROM inference_results r
|
CONCAT(r.stage, '_', r.input1, '_', r.input2) AS anal_title,
|
||||||
GROUP BY r.stage, r.input1, r.input2;
|
COUNT(*) AS detecting_cnt,
|
||||||
|
now(),
|
||||||
|
now()
|
||||||
|
FROM inference_results r
|
||||||
|
GROUP BY r.stage, r.input1, r.input2
|
||||||
|
ON CONFLICT (stage, compare_yyyy, target_yyyy)
|
||||||
|
DO UPDATE SET
|
||||||
|
detecting_cnt = EXCLUDED.detecting_cnt,
|
||||||
|
anal_title = EXCLUDED.anal_title,
|
||||||
|
updated_dttm = now()
|
||||||
""";
|
""";
|
||||||
|
|
||||||
return em.createNativeQuery(sql).executeUpdate();
|
return em.createNativeQuery(sql).executeUpdate();
|
||||||
@@ -69,30 +78,42 @@ public class InferenceResultRepositoryImpl implements InferenceResultRepositoryC
|
|||||||
String sql =
|
String sql =
|
||||||
"""
|
"""
|
||||||
INSERT INTO tb_map_sheet_anal_data_inference (
|
INSERT INTO tb_map_sheet_anal_data_inference (
|
||||||
|
anal_uid,
|
||||||
stage,
|
stage,
|
||||||
compare_yyyy,
|
compare_yyyy,
|
||||||
target_yyyy,
|
target_yyyy,
|
||||||
map_sheet_num,
|
map_sheet_num,
|
||||||
created_dttm,
|
detecting_cnt,
|
||||||
updated_dttm,
|
|
||||||
file_created_yn,
|
file_created_yn,
|
||||||
detecting_cnt
|
created_dttm,
|
||||||
|
updated_dttm
|
||||||
)
|
)
|
||||||
SELECT
|
SELECT
|
||||||
|
ai.id AS anal_uid,
|
||||||
r.stage,
|
r.stage,
|
||||||
r.input1 AS compare_yyyy,
|
r.input1 AS compare_yyyy,
|
||||||
r.input2 AS target_yyyy,
|
r.input2 AS target_yyyy,
|
||||||
r.map_id AS map_sheet_num,
|
r.map_id AS map_sheet_num,
|
||||||
now() AS created_dttm,
|
COUNT(*) AS detecting_cnt,
|
||||||
now() AS updated_dttm,
|
false AS file_created_yn,
|
||||||
false AS file_created_yn,
|
now(),
|
||||||
count(*) AS detecting_cnt
|
now()
|
||||||
FROM inference_results r
|
FROM inference_results r
|
||||||
GROUP BY r.stage, r.input1, r.input2, r.map_id
|
JOIN tb_map_sheet_anal_inference ai
|
||||||
|
ON ai.stage = r.stage
|
||||||
|
AND ai.compare_yyyy = r.input1
|
||||||
|
AND ai.target_yyyy = r.input2
|
||||||
|
GROUP BY
|
||||||
|
ai.id,
|
||||||
|
r.stage,
|
||||||
|
r.input1,
|
||||||
|
r.input2,
|
||||||
|
r.map_id
|
||||||
ON CONFLICT (stage, compare_yyyy, target_yyyy, map_sheet_num)
|
ON CONFLICT (stage, compare_yyyy, target_yyyy, map_sheet_num)
|
||||||
DO UPDATE SET
|
DO UPDATE SET
|
||||||
updated_dttm = now(),
|
anal_uid = EXCLUDED.anal_uid,
|
||||||
detecting_cnt = EXCLUDED.detecting_cnt
|
detecting_cnt = EXCLUDED.detecting_cnt,
|
||||||
|
updated_dttm = now()
|
||||||
""";
|
""";
|
||||||
|
|
||||||
return em.createNativeQuery(sql).executeUpdate();
|
return em.createNativeQuery(sql).executeUpdate();
|
||||||
@@ -111,46 +132,70 @@ public class InferenceResultRepositoryImpl implements InferenceResultRepositoryC
|
|||||||
|
|
||||||
String sql =
|
String sql =
|
||||||
"""
|
"""
|
||||||
INSERT INTO tb_map_sheet_anal_data_inference_geom (
|
INSERT INTO tb_map_sheet_anal_data_inference_geom (
|
||||||
uuid, stage, cd_prob, compare_yyyy, target_yyyy, map_sheet_num,
|
uuid,
|
||||||
class_before_cd, class_before_prob, class_after_cd, class_after_prob,
|
stage,
|
||||||
geom, area, data_uid, created_dttm, updated_dttm,
|
cd_prob,
|
||||||
file_created_yn
|
compare_yyyy,
|
||||||
|
target_yyyy,
|
||||||
|
map_sheet_num,
|
||||||
|
class_before_cd,
|
||||||
|
class_before_prob,
|
||||||
|
class_after_cd,
|
||||||
|
class_after_prob,
|
||||||
|
geom,
|
||||||
|
area,
|
||||||
|
data_uid,
|
||||||
|
file_created_yn,
|
||||||
|
created_dttm,
|
||||||
|
updated_dttm
|
||||||
)
|
)
|
||||||
SELECT
|
SELECT
|
||||||
x.uuid, x.stage, x.cd_prob, x.compare_yyyy, x.target_yyyy, x.map_sheet_num,
|
x.uuid,
|
||||||
x.class_before_cd, x.class_before_prob, x.class_after_cd, x.class_after_prob,
|
x.stage,
|
||||||
x.geom, x.area, x.data_uid, x.created_dttm, x.updated_dttm,
|
x.cd_prob,
|
||||||
false AS file_created_yn
|
x.compare_yyyy,
|
||||||
|
x.target_yyyy,
|
||||||
|
x.map_sheet_num,
|
||||||
|
x.class_before_cd,
|
||||||
|
x.class_before_prob,
|
||||||
|
x.class_after_cd,
|
||||||
|
x.class_after_prob,
|
||||||
|
x.geom,
|
||||||
|
x.area,
|
||||||
|
x.data_uid,
|
||||||
|
false,
|
||||||
|
x.created_dttm,
|
||||||
|
x.updated_dttm
|
||||||
FROM (
|
FROM (
|
||||||
SELECT DISTINCT ON (r.uuid)
|
SELECT DISTINCT ON (r.uuid)
|
||||||
r.uuid,
|
r.uuid,
|
||||||
r.stage,
|
r.stage,
|
||||||
r.cd_prob,
|
r.cd_prob,
|
||||||
r.input1 AS compare_yyyy,
|
r.input1 AS compare_yyyy,
|
||||||
r.input2 AS target_yyyy,
|
r.input2 AS target_yyyy,
|
||||||
r.map_id AS map_sheet_num,
|
r.map_id AS map_sheet_num,
|
||||||
r.before_class AS class_before_cd,
|
r.before_class AS class_before_cd,
|
||||||
r.before_probability AS class_before_prob,
|
r.before_probability AS class_before_prob,
|
||||||
r.after_class AS class_after_cd,
|
r.after_class AS class_after_cd,
|
||||||
r.after_probability AS class_after_prob,
|
r.after_probability AS class_after_prob,
|
||||||
CASE
|
CASE
|
||||||
WHEN r.geometry IS NULL THEN NULL
|
WHEN r.geometry IS NULL THEN NULL
|
||||||
WHEN left(r.geometry, 2) = '01'
|
WHEN LEFT(r.geometry, 2) = '01'
|
||||||
THEN ST_SetSRID(ST_GeomFromWKB(decode(r.geometry, 'hex')), 5186)
|
THEN ST_SetSRID(ST_GeomFromWKB(decode(r.geometry, 'hex')), 5186)
|
||||||
ELSE ST_GeomFromText(r.geometry, 5186)
|
ELSE ST_GeomFromText(r.geometry, 5186)
|
||||||
END AS geom,
|
END AS geom,
|
||||||
r.area,
|
r.area,
|
||||||
di.data_uid,
|
di.data_uid,
|
||||||
r.created_dttm,
|
r.created_dttm,
|
||||||
r.updated_dttm
|
r.updated_dttm
|
||||||
FROM inference_results r
|
FROM inference_results r
|
||||||
JOIN tb_map_sheet_anal_data_inference di
|
JOIN tb_map_sheet_anal_data_inference di
|
||||||
ON di.stage = r.stage
|
ON di.stage = r.stage
|
||||||
AND di.compare_yyyy = r.input1
|
AND di.compare_yyyy = r.input1
|
||||||
AND di.target_yyyy = r.input2
|
AND di.target_yyyy = r.input2
|
||||||
AND di.map_sheet_num = r.map_id
|
AND di.map_sheet_num = r.map_id
|
||||||
ORDER BY r.uuid, r.updated_dttm DESC NULLS LAST, r.uid DESC
|
ORDER BY r.uuid, r.updated_dttm DESC NULLS LAST, r.uid DESC
|
||||||
) x
|
) x
|
||||||
ON CONFLICT (uuid)
|
ON CONFLICT (uuid)
|
||||||
DO UPDATE SET
|
DO UPDATE SET
|
||||||
|
|||||||
@@ -2,9 +2,17 @@ package com.kamco.cd.kamcoback.postgres.repository.label;
|
|||||||
|
|
||||||
import com.kamco.cd.kamcoback.label.dto.LabelWorkDto;
|
import com.kamco.cd.kamcoback.label.dto.LabelWorkDto;
|
||||||
import com.kamco.cd.kamcoback.label.dto.LabelWorkDto.LabelWorkMng;
|
import com.kamco.cd.kamcoback.label.dto.LabelWorkDto.LabelWorkMng;
|
||||||
|
import com.kamco.cd.kamcoback.label.dto.LabelWorkDto.LabelWorkMngDetail;
|
||||||
|
import com.kamco.cd.kamcoback.postgres.entity.MapSheetAnalInferenceEntity;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.UUID;
|
||||||
import org.springframework.data.domain.Page;
|
import org.springframework.data.domain.Page;
|
||||||
|
|
||||||
public interface LabelWorkRepositoryCustom {
|
public interface LabelWorkRepositoryCustom {
|
||||||
|
|
||||||
|
List<MapSheetAnalInferenceEntity> findChangeDetectYearList();
|
||||||
|
|
||||||
public Page<LabelWorkMng> labelWorkMngList(LabelWorkDto.LabelWorkMngSearchReq searchReq);
|
public Page<LabelWorkMng> labelWorkMngList(LabelWorkDto.LabelWorkMngSearchReq searchReq);
|
||||||
|
|
||||||
|
LabelWorkMngDetail findLabelWorkMngDetail(UUID uuid);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,22 +1,29 @@
|
|||||||
package com.kamco.cd.kamcoback.postgres.repository.label;
|
package com.kamco.cd.kamcoback.postgres.repository.label;
|
||||||
|
|
||||||
|
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.QMapSheetAnalDataInferenceEntity.mapSheetAnalDataInferenceEntity;
|
||||||
import static com.kamco.cd.kamcoback.postgres.entity.QMapSheetAnalDataInferenceGeomEntity.mapSheetAnalDataInferenceGeomEntity;
|
import static com.kamco.cd.kamcoback.postgres.entity.QMapSheetAnalDataInferenceGeomEntity.mapSheetAnalDataInferenceGeomEntity;
|
||||||
|
import static com.kamco.cd.kamcoback.postgres.entity.QMapSheetAnalInferenceEntity.mapSheetAnalInferenceEntity;
|
||||||
|
|
||||||
import com.kamco.cd.kamcoback.label.dto.LabelWorkDto;
|
import com.kamco.cd.kamcoback.label.dto.LabelWorkDto;
|
||||||
import com.kamco.cd.kamcoback.label.dto.LabelWorkDto.LabelWorkMng;
|
import com.kamco.cd.kamcoback.label.dto.LabelWorkDto.LabelWorkMng;
|
||||||
|
import com.kamco.cd.kamcoback.label.dto.LabelWorkDto.LabelWorkMngDetail;
|
||||||
import com.kamco.cd.kamcoback.postgres.entity.MapSheetAnalDataGeomEntity;
|
import com.kamco.cd.kamcoback.postgres.entity.MapSheetAnalDataGeomEntity;
|
||||||
|
import com.kamco.cd.kamcoback.postgres.entity.MapSheetAnalInferenceEntity;
|
||||||
import com.querydsl.core.BooleanBuilder;
|
import com.querydsl.core.BooleanBuilder;
|
||||||
import com.querydsl.core.types.Projections;
|
import com.querydsl.core.types.Projections;
|
||||||
import com.querydsl.core.types.dsl.CaseBuilder;
|
import com.querydsl.core.types.dsl.CaseBuilder;
|
||||||
import com.querydsl.core.types.dsl.Expressions;
|
import com.querydsl.core.types.dsl.Expressions;
|
||||||
|
import com.querydsl.core.types.dsl.NumberExpression;
|
||||||
import com.querydsl.core.types.dsl.StringExpression;
|
import com.querydsl.core.types.dsl.StringExpression;
|
||||||
|
import com.querydsl.jpa.JPAExpressions;
|
||||||
import com.querydsl.jpa.impl.JPAQueryFactory;
|
import com.querydsl.jpa.impl.JPAQueryFactory;
|
||||||
import jakarta.persistence.EntityManager;
|
import jakarta.persistence.EntityManager;
|
||||||
import jakarta.persistence.PersistenceContext;
|
import jakarta.persistence.PersistenceContext;
|
||||||
import java.time.format.DateTimeFormatter;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.UUID;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.data.domain.Page;
|
import org.springframework.data.domain.Page;
|
||||||
import org.springframework.data.domain.PageImpl;
|
import org.springframework.data.domain.PageImpl;
|
||||||
import org.springframework.data.domain.PageRequest;
|
import org.springframework.data.domain.PageRequest;
|
||||||
@@ -39,20 +46,59 @@ public class LabelWorkRepositoryImpl extends QuerydslRepositorySupport
|
|||||||
this.queryFactory = queryFactory;
|
this.queryFactory = queryFactory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 변화탐지 년도 셀렉트박스 조회
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<MapSheetAnalInferenceEntity> findChangeDetectYearList() {
|
||||||
|
return queryFactory
|
||||||
|
.selectFrom(mapSheetAnalInferenceEntity)
|
||||||
|
.where(
|
||||||
|
mapSheetAnalInferenceEntity.id.in(
|
||||||
|
JPAExpressions.select(mapSheetAnalInferenceEntity.id.min())
|
||||||
|
.from(mapSheetAnalInferenceEntity)
|
||||||
|
.groupBy(
|
||||||
|
mapSheetAnalInferenceEntity.compareYyyy,
|
||||||
|
mapSheetAnalInferenceEntity.targetYyyy)))
|
||||||
|
.orderBy(
|
||||||
|
mapSheetAnalInferenceEntity.compareYyyy.asc(),
|
||||||
|
mapSheetAnalInferenceEntity.targetYyyy.asc())
|
||||||
|
.fetch();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 라벨링 작업관리 목록 조회
|
||||||
|
*
|
||||||
|
* @param searchReq
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Page<LabelWorkMng> labelWorkMngList(LabelWorkDto.LabelWorkMngSearchReq searchReq) {
|
public Page<LabelWorkMng> labelWorkMngList(LabelWorkDto.LabelWorkMngSearchReq searchReq) {
|
||||||
|
|
||||||
Pageable pageable = PageRequest.of(searchReq.getPage(), searchReq.getSize());
|
Pageable pageable = PageRequest.of(searchReq.getPage(), searchReq.getSize());
|
||||||
BooleanBuilder whereBuilder = new BooleanBuilder();
|
BooleanBuilder whereBuilder = new BooleanBuilder();
|
||||||
|
BooleanBuilder whereSubDataBuilder = new BooleanBuilder();
|
||||||
BooleanBuilder whereSubBuilder = new BooleanBuilder();
|
BooleanBuilder whereSubBuilder = new BooleanBuilder();
|
||||||
|
|
||||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd");
|
if (StringUtils.isNotBlank(searchReq.getDetectYear())) {
|
||||||
|
String[] years = searchReq.getDetectYear().split("-");
|
||||||
|
|
||||||
if (searchReq.getDetectYyyy() != null) {
|
if (years.length == 2) {
|
||||||
whereBuilder.and(mapSheetAnalDataInferenceEntity.targetYyyy.eq(searchReq.getDetectYyyy()));
|
Integer compareYear = Integer.valueOf(years[0]);
|
||||||
|
Integer targetYear = Integer.valueOf(years[1]);
|
||||||
|
|
||||||
|
whereBuilder.and(
|
||||||
|
mapSheetAnalDataInferenceEntity
|
||||||
|
.compareYyyy
|
||||||
|
.eq(compareYear)
|
||||||
|
.and(mapSheetAnalDataInferenceEntity.targetYyyy.eq(targetYear)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// mapSheetAnalDataInferenceGeomEntity.dataUid.eq(mapSheetAnalDataInferenceEntity.id)
|
whereSubDataBuilder.and(
|
||||||
|
mapSheetAnalInferenceEntity.id.eq(mapSheetAnalDataInferenceEntity.analUid));
|
||||||
|
|
||||||
whereSubBuilder.and(
|
whereSubBuilder.and(
|
||||||
mapSheetAnalDataInferenceGeomEntity.dataUid.eq(mapSheetAnalDataInferenceEntity.id));
|
mapSheetAnalDataInferenceGeomEntity.dataUid.eq(mapSheetAnalDataInferenceEntity.id));
|
||||||
@@ -61,15 +107,10 @@ public class LabelWorkRepositoryImpl extends QuerydslRepositorySupport
|
|||||||
&& !searchReq.getStrtDttm().isEmpty()
|
&& !searchReq.getStrtDttm().isEmpty()
|
||||||
&& searchReq.getEndDttm() != null
|
&& searchReq.getEndDttm() != null
|
||||||
&& !searchReq.getEndDttm().isEmpty()) {
|
&& !searchReq.getEndDttm().isEmpty()) {
|
||||||
|
|
||||||
// whereSubBuilder.and(mapSheetAnalDataInferenceGeomEntity.labelStateDttm.isNotNull());
|
|
||||||
whereSubBuilder.and(
|
whereSubBuilder.and(
|
||||||
Expressions.stringTemplate(
|
Expressions.stringTemplate(
|
||||||
"to_char({0}, 'YYYYMMDD')", mapSheetAnalDataInferenceGeomEntity.labelStateDttm)
|
"to_char({0}, 'YYYYMMDD')", mapSheetAnalDataInferenceGeomEntity.labelStateDttm)
|
||||||
.between(searchReq.getStrtDttm(), searchReq.getEndDttm()));
|
.between(searchReq.getStrtDttm(), searchReq.getEndDttm()));
|
||||||
|
|
||||||
// whereBuilder.and(mapSheetAnalDataInferenceGeomEntity.labelStateDttm.min().isNotNull());
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
List<LabelWorkMng> foundContent =
|
List<LabelWorkMng> foundContent =
|
||||||
@@ -77,9 +118,10 @@ public class LabelWorkRepositoryImpl extends QuerydslRepositorySupport
|
|||||||
.select(
|
.select(
|
||||||
Projections.constructor(
|
Projections.constructor(
|
||||||
LabelWorkMng.class,
|
LabelWorkMng.class,
|
||||||
mapSheetAnalDataInferenceEntity.compareYyyy,
|
mapSheetAnalInferenceEntity.uuid,
|
||||||
mapSheetAnalDataInferenceEntity.targetYyyy,
|
mapSheetAnalInferenceEntity.compareYyyy,
|
||||||
mapSheetAnalDataInferenceEntity.stage,
|
mapSheetAnalInferenceEntity.targetYyyy,
|
||||||
|
mapSheetAnalInferenceEntity.stage,
|
||||||
mapSheetAnalDataInferenceEntity.createdDttm.min(),
|
mapSheetAnalDataInferenceEntity.createdDttm.min(),
|
||||||
mapSheetAnalDataInferenceGeomEntity.dataUid.count(),
|
mapSheetAnalDataInferenceGeomEntity.dataUid.count(),
|
||||||
mapSheetAnalDataInferenceGeomEntity.dataUid.count(),
|
mapSheetAnalDataInferenceGeomEntity.dataUid.count(),
|
||||||
@@ -99,17 +141,21 @@ public class LabelWorkRepositoryImpl extends QuerydslRepositorySupport
|
|||||||
.otherwise(0L)
|
.otherwise(0L)
|
||||||
.sum(),
|
.sum(),
|
||||||
mapSheetAnalDataInferenceGeomEntity.labelStateDttm.min()))
|
mapSheetAnalDataInferenceGeomEntity.labelStateDttm.min()))
|
||||||
.from(mapSheetAnalDataInferenceEntity)
|
.from(mapSheetAnalInferenceEntity)
|
||||||
|
.innerJoin(mapSheetAnalDataInferenceEntity)
|
||||||
|
.on(whereSubDataBuilder)
|
||||||
.innerJoin(mapSheetAnalDataInferenceGeomEntity)
|
.innerJoin(mapSheetAnalDataInferenceGeomEntity)
|
||||||
.on(whereSubBuilder)
|
.on(whereSubBuilder)
|
||||||
.where(whereBuilder)
|
.where(whereBuilder)
|
||||||
.groupBy(
|
.groupBy(
|
||||||
mapSheetAnalDataInferenceEntity.compareYyyy,
|
mapSheetAnalInferenceEntity.uuid,
|
||||||
mapSheetAnalDataInferenceEntity.targetYyyy,
|
mapSheetAnalInferenceEntity.compareYyyy,
|
||||||
mapSheetAnalDataInferenceEntity.stage)
|
mapSheetAnalInferenceEntity.targetYyyy,
|
||||||
|
mapSheetAnalInferenceEntity.stage)
|
||||||
.orderBy(
|
.orderBy(
|
||||||
mapSheetAnalDataInferenceEntity.targetYyyy.desc(),
|
mapSheetAnalInferenceEntity.targetYyyy.desc(),
|
||||||
mapSheetAnalDataInferenceEntity.stage.desc())
|
mapSheetAnalInferenceEntity.compareYyyy.desc(),
|
||||||
|
mapSheetAnalInferenceEntity.stage.desc())
|
||||||
.offset(pageable.getOffset())
|
.offset(pageable.getOffset())
|
||||||
.limit(pageable.getPageSize())
|
.limit(pageable.getPageSize())
|
||||||
.fetch();
|
.fetch();
|
||||||
@@ -131,8 +177,62 @@ public class LabelWorkRepositoryImpl extends QuerydslRepositorySupport
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Long countQuery = foundContent.stream().count();
|
Long total =
|
||||||
|
queryFactory
|
||||||
|
.select(mapSheetAnalInferenceEntity.uuid.countDistinct())
|
||||||
|
.from(mapSheetAnalInferenceEntity)
|
||||||
|
.innerJoin(mapSheetAnalDataInferenceEntity)
|
||||||
|
.on(whereSubDataBuilder)
|
||||||
|
.innerJoin(mapSheetAnalDataInferenceGeomEntity)
|
||||||
|
.on(whereSubBuilder)
|
||||||
|
.where(whereBuilder)
|
||||||
|
.fetchOne();
|
||||||
|
|
||||||
return new PageImpl<>(foundContent, pageable, countQuery);
|
return new PageImpl<>(foundContent, pageable, total);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 작업배정 상세조회
|
||||||
|
*
|
||||||
|
* @param uuid
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public LabelWorkMngDetail findLabelWorkMngDetail(UUID uuid) {
|
||||||
|
|
||||||
|
NumberExpression<Long> labelTotCnt = mapSheetAnalDataInferenceGeomEntity.geoUid.count();
|
||||||
|
NumberExpression<Long> labelerCnt = labelingAssignmentEntity.workerUid.count();
|
||||||
|
NumberExpression<Long> reviewerCnt = labelingAssignmentEntity.inspectorUid.count();
|
||||||
|
|
||||||
|
return queryFactory
|
||||||
|
.select(
|
||||||
|
Projections.constructor(
|
||||||
|
LabelWorkMngDetail.class,
|
||||||
|
mapSheetAnalInferenceEntity
|
||||||
|
.compareYyyy
|
||||||
|
.stringValue()
|
||||||
|
.concat("-")
|
||||||
|
.concat(mapSheetAnalInferenceEntity.targetYyyy.stringValue()),
|
||||||
|
mapSheetAnalInferenceEntity.stage,
|
||||||
|
mapSheetAnalInferenceEntity.createdDttm,
|
||||||
|
labelTotCnt,
|
||||||
|
labelerCnt,
|
||||||
|
reviewerCnt))
|
||||||
|
.from(mapSheetAnalInferenceEntity)
|
||||||
|
.leftJoin(mapSheetAnalDataInferenceEntity)
|
||||||
|
.on(mapSheetAnalInferenceEntity.id.eq(mapSheetAnalDataInferenceEntity.analUid))
|
||||||
|
.leftJoin(mapSheetAnalDataInferenceGeomEntity)
|
||||||
|
.on(mapSheetAnalDataInferenceEntity.id.eq(mapSheetAnalDataInferenceGeomEntity.dataUid))
|
||||||
|
.leftJoin(labelingAssignmentEntity)
|
||||||
|
.on(
|
||||||
|
mapSheetAnalDataInferenceGeomEntity.geoUid.eq(
|
||||||
|
labelingAssignmentEntity.inferenceGeomUid))
|
||||||
|
.where(mapSheetAnalInferenceEntity.uuid.eq(uuid))
|
||||||
|
.groupBy(
|
||||||
|
mapSheetAnalInferenceEntity.compareYyyy,
|
||||||
|
mapSheetAnalInferenceEntity.targetYyyy,
|
||||||
|
mapSheetAnalInferenceEntity.stage,
|
||||||
|
mapSheetAnalInferenceEntity.createdDttm)
|
||||||
|
.fetchOne();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user