260722_01_ENH: 버그 수정 및 개선 사항 수정
This commit is contained in:
@@ -11,23 +11,23 @@ import lombok.Setter;
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@Schema(description = "설문 결과 입력 Dto")
|
||||
@Schema(description = "설문 결과 입력 DTO")
|
||||
public class ListEventHistFromSurveyDto {
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "입력 action 코드")
|
||||
@Schema(description = "설문 action 코드")
|
||||
private ListEventHistorySurveyType action;
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "프로젝트 고유 번호")
|
||||
private Long prjctIdx;
|
||||
@Schema(description = "프로젝트 설문 고유번호")
|
||||
private Long prjctSurveyIdx;
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "리스트 고유 번호")
|
||||
@Schema(description = "리스트 고유번호")
|
||||
private Integer sid;
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "메타 데이터")
|
||||
@Valid
|
||||
@Schema(description = "메타 데이터")
|
||||
private ListEventHistSurveyMetaDto meta;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,8 @@ import com.kri.contact.server.common.enums.ListEventHistoryExternalEntryType;
|
||||
import com.kri.contact.server.common.enums.ListEventHistorySurveyType;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
@@ -13,6 +15,7 @@ import lombok.Setter;
|
||||
@NoArgsConstructor
|
||||
@Schema(description = "ListEventHistSurveyMetaDto")
|
||||
public class ListEventHistSurveyMetaDto {
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "진입 유형")
|
||||
private ListEventHistoryExternalEntryType entryType;
|
||||
@@ -21,10 +24,10 @@ public class ListEventHistSurveyMetaDto {
|
||||
@Schema(description = "입력 action 코드")
|
||||
private ListEventHistorySurveyType action;
|
||||
|
||||
@Schema(description = "프로젝트 고유 번호")
|
||||
@Schema(description = "프로젝트 고유번호")
|
||||
private String pid;
|
||||
|
||||
@Schema(description = "리스트 고유 번호")
|
||||
@Schema(description = "리스트 고유번호")
|
||||
private String sid;
|
||||
|
||||
@Schema(description = "요청 클라이언트 IP 주소")
|
||||
@@ -45,9 +48,24 @@ public class ListEventHistSurveyMetaDto {
|
||||
@Schema(description = "요청 Origin 헤더")
|
||||
private String origin;
|
||||
|
||||
@Schema(description = "프록시 또는 로드밸런서를 통해 전달된 X-Forwarded-For 헤더")
|
||||
@Schema(description = "X-Forwarded-For 헤더")
|
||||
private String xForwardedFor;
|
||||
|
||||
@Schema(description = "프록시 표준 전달 정보인 Forwarded 헤더")
|
||||
@Schema(description = "Forwarded 헤더")
|
||||
private String forwarded;
|
||||
|
||||
@Schema(description = "설문 snapshot")
|
||||
private SurveySnapshot survey;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class SurveySnapshot {
|
||||
private Long prjctSurveyIdx;
|
||||
private String surveyName;
|
||||
private Short surveyTy;
|
||||
private String surveyPrjctCd;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
package com.kri.contact.server.dto.list;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import com.kri.contact.server.persistence.entity.TListEventHistEntity;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
@@ -18,6 +17,8 @@ public class ListEventHistoryDto {
|
||||
private Short eventTy;
|
||||
@Schema(description = "prjctIdx")
|
||||
private Long prjctIdx;
|
||||
@Schema(description = "prjctSurveyIdx")
|
||||
private Long prjctSurveyIdx;
|
||||
@Schema(description = "sid")
|
||||
private Integer sid;
|
||||
@Schema(description = "resultCd")
|
||||
@@ -38,6 +39,7 @@ public class ListEventHistoryDto {
|
||||
.listEventHistIdx(entity.getListEventHistIdx())
|
||||
.eventTy(entity.getEventTy())
|
||||
.prjctIdx(entity.getPrjctIdx())
|
||||
.prjctSurveyIdx(entity.getPrjctSurveyIdx())
|
||||
.sid(entity.getSid())
|
||||
.resultCd(entity.getResultCd())
|
||||
.metaData(entity.getMetaData())
|
||||
|
||||
@@ -20,7 +20,7 @@ import lombok.Setter;
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Schema(description = "리스트 필터 Dto")
|
||||
@Schema(description = "리스트 필터 DTO")
|
||||
public class ListFilterDto {
|
||||
|
||||
@NotNull
|
||||
@@ -47,6 +47,9 @@ public class ListFilterDto {
|
||||
@Schema(description = "List 결과값 필터 key: ResultCodeType code, value: result code list")
|
||||
private Map<ResultCodeType, Set<Integer>> resultCodeMap;
|
||||
|
||||
@Schema(description = "설문별 결과 필터 조건")
|
||||
private List<@Valid ListSurveyResultFilterConditionDto> surveyResultConditions;
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "메모 필터 조건")
|
||||
private List<@Valid ListFilterConditionDto> memoConditions;
|
||||
@@ -63,6 +66,7 @@ public class ListFilterDto {
|
||||
.assignUserMap(Map.of())
|
||||
.assignConditions(List.of())
|
||||
.resultCodeMap(Map.of())
|
||||
.surveyResultConditions(List.of())
|
||||
.memoConditions(List.of())
|
||||
.otherItemConditions(List.of())
|
||||
.build();
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.kri.contact.server.common.enums.ListIsUse;
|
||||
import com.kri.contact.server.persistence.entity.TListEntity;
|
||||
import com.kri.contact.server.service.ListSearchService.AssignValues;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
@@ -31,7 +32,7 @@ public class ListSearchWithFullResultDto extends ListSearchWithResultDto {
|
||||
AssignValues assignValues,
|
||||
ListContactResultDto contactResult,
|
||||
ListContactResultDto interviewResult,
|
||||
ListResultBaseDto surveyResult,
|
||||
List<ListSurveyResultDto> surveyResults,
|
||||
ListSendResultDto mailSendResult,
|
||||
ListSendResultDto smsSendResult
|
||||
) {
|
||||
@@ -49,7 +50,7 @@ public class ListSearchWithFullResultDto extends ListSearchWithResultDto {
|
||||
.itemList(itemList)
|
||||
.contactResult(contactResult)
|
||||
.interviewResult(interviewResult)
|
||||
.surveyResult(surveyResult)
|
||||
.surveyResults(surveyResults)
|
||||
.mailSendResult(mailSendResult)
|
||||
.smsSendResult(smsSendResult)
|
||||
.build();
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.kri.contact.server.common.enums.ListIsUse;
|
||||
import com.kri.contact.server.persistence.entity.TListEntity;
|
||||
import com.kri.contact.server.service.ListSearchService.AssignValues;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
@@ -18,14 +19,15 @@ import lombok.experimental.SuperBuilder;
|
||||
@AllArgsConstructor
|
||||
@Schema(description = "리스트 조회 기본 + 결과")
|
||||
public class ListSearchWithResultDto extends ListSearchBaseDto {
|
||||
|
||||
@Schema(description = "컨택 결과")
|
||||
private ListContactResultDto contactResult;
|
||||
|
||||
@Schema(description = "대면 면접 결과")
|
||||
private ListContactResultDto interviewResult;
|
||||
|
||||
@Schema(description = "온라인 설문 결과")
|
||||
private ListResultBaseDto surveyResult;
|
||||
@Schema(description = "설문 결과 목록")
|
||||
private List<ListSurveyResultDto> surveyResults;
|
||||
|
||||
public static ListSearchWithResultDto from(
|
||||
TListEntity entity,
|
||||
@@ -33,7 +35,7 @@ public class ListSearchWithResultDto extends ListSearchBaseDto {
|
||||
AssignValues assignValues,
|
||||
ListContactResultDto contactResult,
|
||||
ListContactResultDto interviewResult,
|
||||
ListResultBaseDto surveyResult
|
||||
List<ListSurveyResultDto> surveyResults
|
||||
) {
|
||||
if (entity == null) {
|
||||
return null;
|
||||
@@ -49,7 +51,7 @@ public class ListSearchWithResultDto extends ListSearchBaseDto {
|
||||
.itemList(itemList)
|
||||
.contactResult(contactResult)
|
||||
.interviewResult(interviewResult)
|
||||
.surveyResult(surveyResult)
|
||||
.surveyResults(surveyResults)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.kri.contact.server.dto.list;
|
||||
|
||||
import com.kri.contact.server.persistence.entity.TListEventHistEntity;
|
||||
import com.kri.contact.server.common.external.notihub.NotiHubSendResultLastWithSidDto;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
@@ -16,21 +16,23 @@ import lombok.experimental.SuperBuilder;
|
||||
@Schema(description = "발송 결과")
|
||||
public class ListSendResultDto extends ListResultBaseDto {
|
||||
|
||||
@Schema(description = "마지막 컨택/방문면접원")
|
||||
@Schema(description = "마지막 발송 결과 라벨")
|
||||
private String lastResultLabel;
|
||||
|
||||
/* Todo Noti hub로 부터 받아서 생성하는 static 메소드 필요
|
||||
public static ListSendResultDto from(TListEventHistEntity entity, String resultLabel, Integer attemptCount) {
|
||||
if (entity == null) {
|
||||
@Schema(description = "마지막 발송 결과 표시 라벨")
|
||||
private String lastResultViewLabel;
|
||||
|
||||
public static ListSendResultDto from(NotiHubSendResultLastWithSidDto dto) {
|
||||
if (dto == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return ListSendResultDto.builder()
|
||||
.lastResultCd(entity.getResultCd() == null ? null : entity.getResultCd().shortValue())
|
||||
.lastResultDt(entity.getRegDt())
|
||||
.attemptCount(attemptCount)
|
||||
.lastResultLabel(resultLabel)
|
||||
.lastResultCd(dto.getLastResultCode() == null ? null : dto.getLastResultCode().shortValue())
|
||||
.lastResultDt(dto.getLastSendDt())
|
||||
.attemptCount(dto.getTotalSendCount())
|
||||
.lastResultLabel(dto.getLastResultLabel())
|
||||
.lastResultViewLabel(dto.getLastResultViewLabel())
|
||||
.build();
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.kri.contact.server.dto.list;
|
||||
|
||||
import com.kri.contact.server.common.enums.SurveyType;
|
||||
import com.kri.contact.server.persistence.entity.TListEventHistEntity;
|
||||
import com.kri.contact.server.persistence.entity.TPrjctSurveyEntity;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@Schema(description = "설문 결과 정보")
|
||||
public class ListSurveyResultDto extends ListResultBaseDto {
|
||||
|
||||
@Schema(description = "프로젝트 설문 고유번호")
|
||||
private Long prjctSurveyIdx;
|
||||
|
||||
@Schema(description = "설문명")
|
||||
private String surveyName;
|
||||
|
||||
@Schema(description = "설문 타입")
|
||||
private SurveyType surveyTy;
|
||||
|
||||
public static ListSurveyResultDto from(
|
||||
TPrjctSurveyEntity survey,
|
||||
TListEventHistEntity entity,
|
||||
Integer attemptCount
|
||||
) {
|
||||
if (survey == null || entity == null) {
|
||||
return null;
|
||||
}
|
||||
return ListSurveyResultDto.builder()
|
||||
.prjctSurveyIdx(survey.getPrjctSurveyIdx())
|
||||
.surveyName(survey.getSurveyNm())
|
||||
.surveyTy(SurveyType.fromCode(survey.getSurveyTy()))
|
||||
.lastResultCd(entity.getResultCd() == null ? null : entity.getResultCd().shortValue())
|
||||
.lastResultDt(entity.getRegDt())
|
||||
.attemptCount(attemptCount)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.kri.contact.server.dto.list;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.util.Set;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@Schema(description = "설문별 결과 필터 조건")
|
||||
public class ListSurveyResultFilterConditionDto {
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "프로젝트 설문 고유번호")
|
||||
private Long prjctSurveyIdx;
|
||||
|
||||
@NotEmpty
|
||||
@Schema(description = "설문 결과 코드 목록")
|
||||
private Set<Integer> resultCodes;
|
||||
}
|
||||
@@ -2,13 +2,15 @@ package com.kri.contact.server.dto.project;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.kri.contact.server.common.enums.ProjectStatus;
|
||||
import com.kri.contact.server.common.enums.SurveyType;
|
||||
import com.kri.contact.server.persistence.entity.TPrjctEntity;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
@@ -24,7 +26,7 @@ import lombok.Setter;
|
||||
public class ProjectInfoDto {
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "프로젝트 고유 번호")
|
||||
@Schema(description = "프로젝트 고유번호")
|
||||
private Long prjctIdx;
|
||||
|
||||
@Size(max = 32)
|
||||
@@ -38,7 +40,7 @@ public class ProjectInfoDto {
|
||||
|
||||
@Size(max = 128)
|
||||
@NotBlank
|
||||
@Schema(description = "프로젝트 명")
|
||||
@Schema(description = "프로젝트명")
|
||||
private String prjctName;
|
||||
|
||||
@Size(max = 32)
|
||||
@@ -61,21 +63,10 @@ public class ProjectInfoDto {
|
||||
@Schema(description = "발신번호")
|
||||
private String callerTelNum;
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "설문지 타입")
|
||||
private SurveyType surveyTy;
|
||||
|
||||
@Size(max = 32)
|
||||
@Schema(description = "내부 설문 시스템 프로젝트 코드")
|
||||
private String surveyPrjctCd;
|
||||
|
||||
@Size(max = 128)
|
||||
@Schema(description = "설문 URL")
|
||||
private String surveyUrl;
|
||||
|
||||
@Size(max = 128)
|
||||
@Schema(description = "외부 설문 대시보드 URL. surveyTy가 99(EXTERNAL)일 때만 사용")
|
||||
private String surveyDashboardUrl;
|
||||
@Valid
|
||||
@Builder.Default
|
||||
@Schema(description = "프로젝트 설문 목록")
|
||||
private List<ProjectSurveyDto> surveys = new ArrayList<>();
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "면접원 확인사항 여부")
|
||||
@@ -107,6 +98,9 @@ public class ProjectInfoDto {
|
||||
private LocalDateTime modDt;
|
||||
|
||||
public static ProjectInfoDto from(TPrjctEntity entity) {
|
||||
if (entity == null) {
|
||||
return null;
|
||||
}
|
||||
return ProjectInfoDto.builder()
|
||||
.prjctIdx(entity.getPrjctIdx())
|
||||
.prjctCd(entity.getPrjctCd())
|
||||
@@ -116,10 +110,7 @@ public class ProjectInfoDto {
|
||||
.ownerDept(entity.getOwnerDept())
|
||||
.ownerFw(entity.getOwnerFw())
|
||||
.callerTelNum(entity.getCallerTelNum())
|
||||
.surveyTy(SurveyType.fromCode(entity.getSurveyTy()))
|
||||
.surveyPrjctCd(entity.getSurveyPrjctCd())
|
||||
.surveyUrl(entity.getSurveyUrl())
|
||||
.surveyDashboardUrl(entity.getSurveyDashboardUrl())
|
||||
.surveys(new ArrayList<>())
|
||||
.ff(entity.getFf())
|
||||
.useContactSenario(entity.getUseContactSenario())
|
||||
.contactSenario(entity.getContactSenario())
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.kri.contact.server.dto.project;
|
||||
|
||||
import com.kri.contact.server.common.enums.SurveyType;
|
||||
import com.kri.contact.server.persistence.entity.TPrjctSurveyEntity;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Schema(description = "프로젝트 설문 정보")
|
||||
public class ProjectSurveyDto {
|
||||
|
||||
@Schema(description = "프로젝트 설문 고유번호")
|
||||
private Long prjctSurveyIdx;
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "프로젝트 내 설문 표시 순서")
|
||||
private Short surveyOrder;
|
||||
|
||||
@Size(max = 128)
|
||||
@NotBlank
|
||||
@Schema(description = "설문명")
|
||||
private String surveyName;
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "설문 타입")
|
||||
private SurveyType surveyTy;
|
||||
|
||||
@Size(max = 32)
|
||||
@Schema(description = "설문 시스템 프로젝트 코드")
|
||||
private String surveyPrjctCd;
|
||||
|
||||
@Size(max = 1024)
|
||||
@Schema(description = "설문 URL")
|
||||
private String surveyUrl;
|
||||
|
||||
@Size(max = 1024)
|
||||
@Schema(description = "설문 Full URL")
|
||||
private String surveyFullUrl;
|
||||
|
||||
@Size(max = 1024)
|
||||
@Schema(description = "설문 Short URL")
|
||||
private String surveyShortUrl;
|
||||
|
||||
@Size(max = 1024)
|
||||
@Schema(description = "외부 설문 대시보드 URL. surveyTy가 99(EXTERNAL)일 때만 사용")
|
||||
private String surveyDashboardUrl;
|
||||
|
||||
public static ProjectSurveyDto from(TPrjctSurveyEntity entity) {
|
||||
if (entity == null) {
|
||||
return null;
|
||||
}
|
||||
return ProjectSurveyDto.builder()
|
||||
.prjctSurveyIdx(entity.getPrjctSurveyIdx())
|
||||
.surveyOrder(entity.getSurveyOrder())
|
||||
.surveyName(entity.getSurveyNm())
|
||||
.surveyTy(SurveyType.fromCode(entity.getSurveyTy()))
|
||||
.surveyPrjctCd(entity.getSurveyPrjctCd())
|
||||
.surveyUrl(entity.getSurveyUrl())
|
||||
.surveyFullUrl(entity.getSurveyFullUrl())
|
||||
.surveyShortUrl(entity.getSurveyShortUrl())
|
||||
.surveyDashboardUrl(entity.getSurveyDashboardUrl())
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user