파라미터 yyyy기준으로 변경

This commit is contained in:
2026-01-02 22:17:42 +09:00
parent c85dc1a070
commit a7b04d0be8
6 changed files with 608 additions and 551 deletions

View File

@@ -162,7 +162,9 @@ public class LabelAllocateApiController {
dto.getStage(),
dto.getLabelers(),
dto.getInspectors(),
dto.getAnalUid());
dto.getCompareYyyy(),
dto.getTargetYyyy()
);
return ApiResponseDto.ok(null);
}
@@ -176,17 +178,21 @@ public class LabelAllocateApiController {
})
@GetMapping("/stage-detail")
public ApiResponseDto<InferenceDetail> findInferenceDetail(
@Parameter(description = "분석 ID", required = true, example = "3") @RequestParam
Long analUid) {
return ApiResponseDto.ok(labelAllocateService.findInferenceDetail(analUid));
@Parameter(description = "비교년도", required = true, example = "2022") @RequestParam Integer compareYyyy,
@Parameter(description = "기준년도", required = true, example = "2024") @RequestParam Integer targetYyyy,
@Parameter(description = "회차", required = true, example = "4") @RequestParam Integer stage
) {
return ApiResponseDto.ok(labelAllocateService.findInferenceDetail(compareYyyy, targetYyyy, stage));
}
@Operation(summary = "작업이관 > 라벨러 상세 정보", description = "작업이관 > 라벨러 상세 정보")
@GetMapping("/labeler-detail")
public ApiResponseDto<LabelerDetail> findLabelerDetail(
@RequestParam(defaultValue = "01022223333") String userId,
@RequestParam(defaultValue = "3") Long analUid) {
return ApiResponseDto.ok(labelAllocateService.findLabelerDetail(userId, analUid));
@Parameter(description = "비교년도", required = true, example = "2022") @RequestParam Integer compareYyyy,
@Parameter(description = "기준년도", required = true, example = "2024") @RequestParam Integer targetYyyy,
@Parameter(description = "회차", required = true, example = "4") @RequestParam Integer stage) {
return ApiResponseDto.ok(labelAllocateService.findLabelerDetail(userId, compareYyyy, targetYyyy, stage));
}
@Operation(summary = "작업 이관", description = "작업 이관")
@@ -237,7 +243,7 @@ public class LabelAllocateApiController {
@RequestBody
LabelAllocateDto.AllocateMoveDto dto) {
labelAllocateService.allocateMove(dto.getAutoType(), dto.getStage(), dto.getLabelers());
labelAllocateService.allocateMove(dto.getAutoType(), dto.getStage(), dto.getLabelers(), dto.getCompareYyyy(), dto.getTargetYyyy());
return ApiResponseDto.ok(null);
}

View File

@@ -87,9 +87,15 @@ public class LabelAllocateDto {
@AllArgsConstructor
public static class AllocateDto {
@Schema(description = "분석 ID", example = "3", required = true)
@Schema(description = "분석 ID", example = "3")
private Long analUid;
@Schema(description = "비교년도", example = "2022", required = true)
private Integer compareYyyy;
@Schema(description = "기준년도", example = "2024", required = true)
private Integer targetYyyy;
@Schema(description = "자동/수동여부(AUTO/MANUAL)", example = "AUTO")
private String autoType;
@@ -197,5 +203,11 @@ public class LabelAllocateDto {
@Schema(description = "라벨러 할당 목록")
private List<TargetUser> labelers;
@Schema(description = "비교년도", example = "2022")
private Integer compareYyyy;
@Schema(description = "기준년도", example = "2024")
private Integer targetYyyy;
}
}

View File

@@ -38,7 +38,6 @@ public class LabelAllocateService {
* @param stage 회차
* @param targetUsers 라벨러 목록
* @param targetInspectors 검수자 목록
* @param analUid 분석 ID
*/
@Transactional
public void allocateAsc(
@@ -46,11 +45,13 @@ public class LabelAllocateService {
Integer stage,
List<TargetUser> targetUsers,
List<TargetInspector> targetInspectors,
Long analUid) {
Integer compareYyyy,
Integer targetYyyy
) {
Long lastId = null;
// geom 잔여건수 조회
Long chargeCnt = labelAllocateCoreService.findLabelUnAssignedCnt(analUid, stage);
Long chargeCnt = labelAllocateCoreService.findLabelUnAssignedCnt(stage, compareYyyy, targetYyyy);
// Long totalDemand = targetUsers.stream().mapToLong(TargetUser::getDemand).sum();
// if (!Objects.equals(chargeCnt, totalDemand)) {
// log.info("chargeCnt != totalDemand");
@@ -61,18 +62,18 @@ public class LabelAllocateService {
return;
}
List<Long> allIds = labelAllocateCoreService.fetchNextIds(lastId, chargeCnt, analUid);
List<Long> allIds = labelAllocateCoreService.fetchNextIds(lastId, chargeCnt, compareYyyy, targetYyyy, stage);
int index = 0;
for (TargetUser target : targetUsers) {
int end = index + target.getDemand();
List<Long> sub = allIds.subList(index, end);
labelAllocateCoreService.assignOwner(sub, target.getUserId(), analUid);
labelAllocateCoreService.assignOwner(sub, target.getUserId(), compareYyyy, targetYyyy, stage);
index = end;
}
// 검수자에게 userCount명 만큼 할당
List<LabelAllocateDto.Basic> list = labelAllocateCoreService.findAssignedLabelerList(analUid);
List<LabelAllocateDto.Basic> list = labelAllocateCoreService.findAssignedLabelerList(compareYyyy, targetYyyy, stage);
int from = 0;
for (TargetInspector inspector : targetInspectors) {
@@ -154,11 +155,12 @@ public class LabelAllocateService {
return WorkerListResponse.builder().progressInfo(progressInfo).workers(workers).build();
}
public InferenceDetail findInferenceDetail(Long analUid) {
return labelAllocateCoreService.findInferenceDetail(analUid);
public InferenceDetail findInferenceDetail(Integer compareYyyy, Integer targetYyyy, Integer stage) {
return labelAllocateCoreService.findInferenceDetail(compareYyyy, targetYyyy, stage);
}
public void allocateMove(String autoType, Integer stage, List<TargetUser> targetUsers) {
public void allocateMove(String autoType, Integer stage, List<TargetUser> targetUsers, Integer compareYyyy,
Integer targetYyyy) {
Long lastId = null;
Long chargeCnt = targetUsers.stream().mapToLong(TargetUser::getDemand).sum();
@@ -167,7 +169,7 @@ public class LabelAllocateService {
return;
}
List<Long> allIds = labelAllocateCoreService.fetchNextMoveIds(lastId, chargeCnt);
List<Long> allIds = labelAllocateCoreService.fetchNextMoveIds(lastId, chargeCnt, compareYyyy, targetYyyy, stage);
int index = 0;
for (TargetUser target : targetUsers) {
int end = index + target.getDemand();
@@ -178,7 +180,7 @@ public class LabelAllocateService {
}
}
public LabelerDetail findLabelerDetail(String userId, Long analUid) {
return labelAllocateCoreService.findLabelerDetail(userId, analUid);
public LabelerDetail findLabelerDetail(String userId, Integer compareYyyy, Integer targetYyyy, Integer stage) {
return labelAllocateCoreService.findLabelerDetail(userId, compareYyyy, targetYyyy, stage);
}
}

View File

@@ -20,22 +20,22 @@ public class LabelAllocateCoreService {
private final LabelAllocateRepository labelAllocateRepository;
public List<Long> fetchNextIds(Long lastId, Long batchSize, Long analUid) {
return labelAllocateRepository.fetchNextIds(lastId, batchSize, analUid);
public List<Long> fetchNextIds(Long lastId, Long batchSize, Integer compareYyyy, Integer targetYyyy, Integer stage) {
return labelAllocateRepository.fetchNextIds(lastId, batchSize, compareYyyy, targetYyyy, stage);
}
public void assignOwner(List<Long> ids, String userId, Long analUid) {
labelAllocateRepository.assignOwner(ids, userId, analUid);
public void assignOwner(List<Long> ids, String userId, Integer compareYyyy, Integer targetYyyy, Integer stage) {
labelAllocateRepository.assignOwner(ids, userId, compareYyyy, targetYyyy, stage);
}
public List<LabelAllocateDto.Basic> findAssignedLabelerList(Long analUid) {
return labelAllocateRepository.findAssignedLabelerList(analUid).stream()
public List<LabelAllocateDto.Basic> findAssignedLabelerList(Integer compareYyyy, Integer targetYyyy, Integer stage) {
return labelAllocateRepository.findAssignedLabelerList(compareYyyy, targetYyyy, stage).stream()
.map(LabelingAssignmentEntity::toDto)
.toList();
}
public Long findLabelUnAssignedCnt(Long analUid, Integer stage) {
return labelAllocateRepository.findLabelUnAssignedCnt(analUid, stage);
public Long findLabelUnAssignedCnt(Integer stage, Integer compareYyyy, Integer targetYyyy) {
return labelAllocateRepository.findLabelUnAssignedCnt(stage, compareYyyy, targetYyyy);
}
public void assignInspector(UUID assignmentUid, String inspectorUid) {
@@ -69,23 +69,23 @@ public class LabelAllocateCoreService {
labelAllocateRepository.assignInspectorBulk(assignmentUids, inspectorUid);
}
public InferenceDetail findInferenceDetail(Long analUid) {
return labelAllocateRepository.findInferenceDetail(analUid);
public InferenceDetail findInferenceDetail(Integer compareYyyy, Integer targetYyyy, Integer stage) {
return labelAllocateRepository.findInferenceDetail(compareYyyy, targetYyyy, stage);
}
public Long findLabelUnCompleteCnt(Long analUid) {
return labelAllocateRepository.findLabelUnCompleteCnt(analUid);
}
public List<Long> fetchNextMoveIds(Long lastId, Long chargeCnt) {
return labelAllocateRepository.fetchNextMoveIds(lastId, chargeCnt);
public List<Long> fetchNextMoveIds(Long lastId, Long batchSize, Integer compareYyyy, Integer targetYyyy, Integer stage) {
return labelAllocateRepository.fetchNextMoveIds(lastId, batchSize, compareYyyy, targetYyyy, stage);
}
public void assignOwnerMove(List<Long> sub, String userId) {
labelAllocateRepository.assignOwnerMove(sub, userId);
}
public LabelerDetail findLabelerDetail(String userId, Long analUid) {
return labelAllocateRepository.findLabelerDetail(userId, analUid);
public LabelerDetail findLabelerDetail(String userId, Integer compareYyyy, Integer targetYyyy, Integer stage) {
return labelAllocateRepository.findLabelerDetail(userId, compareYyyy, targetYyyy, stage);
}
}

View File

@@ -12,13 +12,13 @@ import java.util.UUID;
public interface LabelAllocateRepositoryCustom {
List<Long> fetchNextIds(Long lastId, Long batchSize, Long analUid);
List<Long> fetchNextIds(Long lastId, Long batchSize, Integer compareYyyy, Integer targetYyyy, Integer stage);
void assignOwner(List<Long> ids, String userId, Long analUid);
void assignOwner(List<Long> ids, String userId, Integer compareYyyy, Integer targetYyyy, Integer stage);
List<LabelingAssignmentEntity> findAssignedLabelerList(Long analUid);
List<LabelingAssignmentEntity> findAssignedLabelerList(Integer compareYyyy, Integer targetYyyy, Integer stage);
Long findLabelUnAssignedCnt(Long analUid, Integer stage);
Long findLabelUnAssignedCnt(Integer stage, Integer compareYyyy, Integer targetYyyy);
void assignInspector(UUID assignmentUid, String userId);
@@ -36,13 +36,13 @@ public interface LabelAllocateRepositoryCustom {
void assignInspectorBulk(List<UUID> assignmentUids, String inspectorUid);
InferenceDetail findInferenceDetail(Long analUid);
InferenceDetail findInferenceDetail(Integer compareYyyy, Integer targetYyyy, Integer stage);
List<Long> fetchNextMoveIds(Long lastId, Long batchSize);
public List<Long> fetchNextMoveIds(Long lastId, Long batchSize, Integer compareYyyy, Integer targetYyyy, Integer stage);
Long findLabelUnCompleteCnt(Long analUid);
void assignOwnerMove(List<Long> sub, String userId);
LabelerDetail findLabelerDetail(String userId, Long analUid);
LabelerDetail findLabelerDetail(String userId, Integer compareYyyy, Integer targetYyyy, Integer stage);
}

View File

@@ -1,6 +1,7 @@
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.QMapSheetAnalDataInferenceGeomEntity.mapSheetAnalDataInferenceGeomEntity;
import static com.kamco.cd.kamcoback.postgres.entity.QMapSheetAnalEntity.mapSheetAnalEntity;
import static com.kamco.cd.kamcoback.postgres.entity.QMemberEntity.memberEntity;
@@ -14,6 +15,7 @@ import com.kamco.cd.kamcoback.label.dto.LabelAllocateDto.UserList;
import com.kamco.cd.kamcoback.label.dto.WorkerStatsDto.WorkProgressInfo;
import com.kamco.cd.kamcoback.label.dto.WorkerStatsDto.WorkerStatistics;
import com.kamco.cd.kamcoback.postgres.entity.LabelingAssignmentEntity;
import com.kamco.cd.kamcoback.postgres.entity.MapSheetAnalDataInferenceEntity;
import com.kamco.cd.kamcoback.postgres.entity.MapSheetAnalEntity;
import com.querydsl.core.types.Projections;
import com.querydsl.core.types.dsl.BooleanExpression;
@@ -44,28 +46,20 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
private final JPAQueryFactory queryFactory;
@PersistenceContext private EntityManager em;
@PersistenceContext
private EntityManager em;
@Override
public List<Long> fetchNextIds(Long lastId, Long batchSize, Long analUid) {
// analUid로 분석 정보 조회
MapSheetAnalEntity analEntity =
queryFactory
.selectFrom(mapSheetAnalEntity)
.where(mapSheetAnalEntity.id.eq(analUid))
.fetchOne();
if (Objects.isNull(analEntity)) {
throw new EntityNotFoundException("MapSheetAnalEntity not found for analUid: " + analUid);
}
public List<Long> fetchNextIds(Long lastId, Long batchSize, Integer compareYyyy, Integer targetYyyy, Integer stage) {
return queryFactory
.select(mapSheetAnalDataInferenceGeomEntity.geoUid)
.from(mapSheetAnalDataInferenceGeomEntity)
.where(
lastId == null ? null : mapSheetAnalDataInferenceGeomEntity.geoUid.gt(lastId),
mapSheetAnalDataInferenceGeomEntity.compareYyyy.eq(analEntity.getCompareYyyy()),
mapSheetAnalDataInferenceGeomEntity.targetYyyy.eq(analEntity.getTargetYyyy()),
mapSheetAnalDataInferenceGeomEntity.compareYyyy.eq(compareYyyy),
mapSheetAnalDataInferenceGeomEntity.targetYyyy.eq(targetYyyy),
mapSheetAnalDataInferenceGeomEntity.stage.eq(stage),
mapSheetAnalDataInferenceGeomEntity.labelState.isNull())
.orderBy(mapSheetAnalDataInferenceGeomEntity.mapSheetNum.asc())
.limit(batchSize)
@@ -73,7 +67,23 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
}
@Override
public void assignOwner(List<Long> ids, String userId, Long analUid) {
public void assignOwner(List<Long> ids, String userId, Integer compareYyyy, Integer targetYyyy, Integer stage) {
// analUid로 분석 정보 조회
MapSheetAnalDataInferenceEntity analEntity =
queryFactory
.selectFrom(mapSheetAnalDataInferenceEntity)
.where(mapSheetAnalDataInferenceEntity.compareYyyy.eq(compareYyyy),
mapSheetAnalDataInferenceEntity.targetYyyy.eq(targetYyyy),
mapSheetAnalDataInferenceEntity.stage.eq(stage)
)
.orderBy(mapSheetAnalDataInferenceEntity.analUid.asc())
.limit(1)
.fetchOne();
if (Objects.isNull(analEntity)) {
throw new EntityNotFoundException("MapSheetAnalEntity not found for analUid: ");
}
// data_geom 테이블에 label state 를 ASSIGNED 로 update
queryFactory
@@ -101,7 +111,7 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
.setParameter(3, userId)
.setParameter(4, LabelState.ASSIGNED.getId())
.setParameter(5, "")
.setParameter(6, analUid)
.setParameter(6, analEntity.getAnalUid())
.executeUpdate();
}
@@ -110,11 +120,27 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
}
@Override
public List<LabelingAssignmentEntity> findAssignedLabelerList(Long analUid) {
public List<LabelingAssignmentEntity> findAssignedLabelerList(Integer compareYyyy, Integer targetYyyy, Integer stage) {
// analUid로 분석 정보 조회
MapSheetAnalDataInferenceEntity analEntity =
queryFactory
.selectFrom(mapSheetAnalDataInferenceEntity)
.where(mapSheetAnalDataInferenceEntity.compareYyyy.eq(compareYyyy),
mapSheetAnalDataInferenceEntity.targetYyyy.eq(targetYyyy),
mapSheetAnalDataInferenceEntity.stage.eq(stage)
)
.orderBy(mapSheetAnalDataInferenceEntity.analUid.asc())
.limit(1)
.fetchOne();
if (Objects.isNull(analEntity)) {
throw new EntityNotFoundException("MapSheetAnalEntity not found for analUid: ");
}
return queryFactory
.selectFrom(labelingAssignmentEntity)
.where(
labelingAssignmentEntity.analUid.eq(analUid),
labelingAssignmentEntity.analUid.eq(analEntity.getAnalUid()),
labelingAssignmentEntity.workState.eq(LabelState.ASSIGNED.getId()),
labelingAssignmentEntity.inspectorUid.isNull())
.orderBy(labelingAssignmentEntity.workerUid.asc())
@@ -122,23 +148,14 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
}
@Override
public Long findLabelUnAssignedCnt(Long analUid, Integer stage) {
MapSheetAnalEntity entity =
queryFactory
.selectFrom(mapSheetAnalEntity)
.where(mapSheetAnalEntity.id.eq(analUid))
.fetchOne();
if (Objects.isNull(entity)) {
throw new EntityNotFoundException("MapSheetAnalEntity not found for analUid: " + analUid);
}
public Long findLabelUnAssignedCnt(Integer stage, Integer compareYyyy, Integer targetYyyy) {
return queryFactory
.select(mapSheetAnalDataInferenceGeomEntity.geoUid.count())
.from(mapSheetAnalDataInferenceGeomEntity)
.where(
mapSheetAnalDataInferenceGeomEntity.compareYyyy.eq(entity.getCompareYyyy()),
mapSheetAnalDataInferenceGeomEntity.targetYyyy.eq(entity.getTargetYyyy()),
mapSheetAnalDataInferenceGeomEntity.compareYyyy.eq(compareYyyy),
mapSheetAnalDataInferenceGeomEntity.targetYyyy.eq(targetYyyy),
mapSheetAnalDataInferenceGeomEntity.stage.eq(stage),
mapSheetAnalDataInferenceGeomEntity.labelState.isNull())
.fetchOne();
@@ -411,7 +428,19 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
}
@Override
public InferenceDetail findInferenceDetail(Long analUid) {
public InferenceDetail findInferenceDetail(Integer compareYyyy, Integer targetYyyy, Integer stage) {
// analUid로 분석 정보 조회
MapSheetAnalDataInferenceEntity analEntity =
queryFactory
.selectFrom(mapSheetAnalDataInferenceEntity)
.where(mapSheetAnalDataInferenceEntity.compareYyyy.eq(compareYyyy),
mapSheetAnalDataInferenceEntity.targetYyyy.eq(targetYyyy),
mapSheetAnalDataInferenceEntity.stage.eq(stage)
)
.orderBy(mapSheetAnalDataInferenceEntity.analUid.asc())
.limit(1)
.fetchOne();
return queryFactory
.select(
Projections.constructor(
@@ -425,7 +454,7 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
.from(mapSheetAnalEntity)
.innerJoin(labelingAssignmentEntity)
.on(mapSheetAnalEntity.id.eq(labelingAssignmentEntity.analUid))
.where(mapSheetAnalEntity.id.eq(analUid))
.where(mapSheetAnalEntity.id.eq(analEntity.getAnalUid()))
.groupBy(
mapSheetAnalEntity.analTitle,
mapSheetAnalEntity.gukyuinApplyDttm,
@@ -434,16 +463,7 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
}
@Override
public List<Long> fetchNextMoveIds(Long lastId, Long batchSize) {
MapSheetAnalEntity entity =
queryFactory
.selectFrom(mapSheetAnalEntity)
.where(mapSheetAnalEntity.id.eq(3L)) // TODO
.fetchOne();
if (Objects.isNull(entity)) {
throw new EntityNotFoundException();
}
public List<Long> fetchNextMoveIds(Long lastId, Long batchSize, Integer compareYyyy, Integer targetYyyy, Integer stage) {
return queryFactory
.select(mapSheetAnalDataInferenceGeomEntity.geoUid)
@@ -451,8 +471,9 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
.where(
// mapSheetAnalDataGeomEntity.pnu.isNotNull(), //TODO: Mockup 진행 이후 확인하기
lastId == null ? null : mapSheetAnalDataInferenceGeomEntity.geoUid.gt(lastId),
mapSheetAnalDataInferenceGeomEntity.compareYyyy.eq(entity.getCompareYyyy()),
mapSheetAnalDataInferenceGeomEntity.targetYyyy.eq(entity.getTargetYyyy()),
mapSheetAnalDataInferenceGeomEntity.compareYyyy.eq(compareYyyy),
mapSheetAnalDataInferenceGeomEntity.targetYyyy.eq(targetYyyy),
mapSheetAnalDataInferenceGeomEntity.stage.eq(stage),
mapSheetAnalDataInferenceGeomEntity.labelState.in(
LabelState.ASSIGNED.getId(), LabelState.SKIP.getId()))
.orderBy(mapSheetAnalDataInferenceGeomEntity.mapSheetNum.asc())
@@ -497,7 +518,7 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
}
@Override
public LabelerDetail findLabelerDetail(String userId, Long analUid) {
public LabelerDetail findLabelerDetail(String userId, Integer compareYyyy, Integer targetYyyy, Integer stage) {
NumberExpression<Long> assignedCnt =
new CaseBuilder()
.when(labelingAssignmentEntity.workState.eq(LabelState.ASSIGNED.getId()))
@@ -530,6 +551,22 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
labelingAssignmentEntity.count(),
completeCnt));
// analUid로 분석 정보 조회
MapSheetAnalDataInferenceEntity analEntity =
queryFactory
.selectFrom(mapSheetAnalDataInferenceEntity)
.where(mapSheetAnalDataInferenceEntity.compareYyyy.eq(compareYyyy),
mapSheetAnalDataInferenceEntity.targetYyyy.eq(targetYyyy),
mapSheetAnalDataInferenceEntity.stage.eq(stage)
)
.orderBy(mapSheetAnalDataInferenceEntity.analUid.asc())
.limit(1)
.fetchOne();
if (Objects.isNull(analEntity)) {
throw new EntityNotFoundException("MapSheetAnalEntity not found for analUid: ");
}
return queryFactory
.select(
Projections.constructor(
@@ -545,7 +582,7 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
.innerJoin(labelingAssignmentEntity)
.on(
memberEntity.employeeNo.eq(labelingAssignmentEntity.workerUid),
labelingAssignmentEntity.analUid.eq(analUid))
labelingAssignmentEntity.analUid.eq(analEntity.getAnalUid()))
.where(memberEntity.employeeNo.eq(userId))
.groupBy(memberEntity.userRole, memberEntity.name, memberEntity.employeeNo)
.fetchOne();