260212_01_DOC: 프로젝트 전체에 구글 java 스타일 적용
This commit is contained in:
@@ -12,18 +12,19 @@ import lombok.Setter;
|
||||
@AllArgsConstructor
|
||||
@Schema(description = "데이터 검증에 대한 공용 Dto")
|
||||
public class DataVerificationDto {
|
||||
@Schema(description = "데이터 검증 통과 여부")
|
||||
private boolean success;
|
||||
|
||||
@Schema(description = "검증 필드명")
|
||||
private String fieldName;
|
||||
@Schema(description = "데이터 검증 통과 여부")
|
||||
private boolean success;
|
||||
|
||||
@Schema(description = "검증 메시지(error)")
|
||||
private String errMessage;
|
||||
@Schema(description = "검증 필드명")
|
||||
private String fieldName;
|
||||
|
||||
public DataVerificationDto() {
|
||||
this.success = true;
|
||||
this.fieldName = "";
|
||||
this.errMessage = "";
|
||||
}
|
||||
@Schema(description = "검증 메시지(error)")
|
||||
private String errMessage;
|
||||
|
||||
public DataVerificationDto() {
|
||||
this.success = true;
|
||||
this.fieldName = "";
|
||||
this.errMessage = "";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,21 +10,21 @@ import lombok.Setter;
|
||||
@Builder
|
||||
public class ExcelUploadResponseDto {
|
||||
|
||||
@Schema(description = "전체 읽은 행 수 (헤더 제외)")
|
||||
private int totalCount;
|
||||
@Schema(description = "전체 읽은 행 수 (헤더 제외)")
|
||||
private int totalCount;
|
||||
|
||||
@Schema(description = "DB에 실제로 insert/update 성공한 개수")
|
||||
private int successCount;
|
||||
@Schema(description = "DB에 실제로 insert/update 성공한 개수")
|
||||
private int successCount;
|
||||
|
||||
@Schema(description = "실패(에러) 개수")
|
||||
private int failCount;
|
||||
@Schema(description = "실패(에러) 개수")
|
||||
private int failCount;
|
||||
|
||||
@Schema(description = "에러 엑셀 파일이 있는지 여부")
|
||||
private boolean hasErrorFile;
|
||||
@Schema(description = "에러 엑셀 파일이 있는지 여부")
|
||||
private boolean hasErrorFile;
|
||||
|
||||
@Schema(description = "프론트가 저장용으로 쓸 파일명")
|
||||
private String errorFileName;
|
||||
@Schema(description = "프론트가 저장용으로 쓸 파일명")
|
||||
private String errorFileName;
|
||||
|
||||
@Schema(description = "에러 엑셀 파일 (xlsx)의 Base64 문자열 (hasErrorFile == true일 때만 세팅)")
|
||||
private String errorFileBase64;
|
||||
@Schema(description = "에러 엑셀 파일 (xlsx)의 Base64 문자열 (hasErrorFile == true일 때만 세팅)")
|
||||
private String errorFileBase64;
|
||||
}
|
||||
@@ -8,9 +8,10 @@ import lombok.Setter;
|
||||
@Setter
|
||||
@Schema(description = "사용자 로그인 요청")
|
||||
public class LoginRequestDto {
|
||||
@Schema(description = "사용자 ID")
|
||||
private String userId;
|
||||
|
||||
@Schema(description = "사용자 PW")
|
||||
private String userPw;
|
||||
@Schema(description = "사용자 ID")
|
||||
private String userId;
|
||||
|
||||
@Schema(description = "사용자 PW")
|
||||
private String userPw;
|
||||
}
|
||||
|
||||
@@ -10,16 +10,17 @@ import lombok.Getter;
|
||||
@Builder
|
||||
@Schema(description = "로그인 응답")
|
||||
public class LoginResponseDto {
|
||||
@Schema(description = "jwt access 토큰")
|
||||
private String accessToken;
|
||||
|
||||
@Schema(description = "사용자 정보")
|
||||
private JwtUserClaimsDto user;
|
||||
@Schema(description = "jwt access 토큰")
|
||||
private String accessToken;
|
||||
|
||||
public static LoginResponseDto from(String accessToken, JwtUserClaimsDto jwtUserClaims) {
|
||||
return LoginResponseDto.builder()
|
||||
.accessToken(accessToken)
|
||||
.user(jwtUserClaims)
|
||||
.build();
|
||||
}
|
||||
@Schema(description = "사용자 정보")
|
||||
private JwtUserClaimsDto user;
|
||||
|
||||
public static LoginResponseDto from(String accessToken, JwtUserClaimsDto jwtUserClaims) {
|
||||
return LoginResponseDto.builder()
|
||||
.accessToken(accessToken)
|
||||
.user(jwtUserClaims)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,10 @@ package com.kri.contact.server.dto;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@@ -11,23 +14,24 @@ import lombok.*;
|
||||
@AllArgsConstructor
|
||||
@Schema(description = "프로젝트 생성 요청")
|
||||
public class ProjectCreateRequestDto {
|
||||
@Size(max = 128)
|
||||
@NotBlank
|
||||
@Schema(description = "프로젝트 명")
|
||||
private String prjctName;
|
||||
|
||||
@Size(max = 32)
|
||||
@NotBlank
|
||||
@Schema(description = "인트라넷 프로젝트 코드")
|
||||
private String itrntPrjctCd;
|
||||
@Size(max = 128)
|
||||
@NotBlank
|
||||
@Schema(description = "프로젝트 명")
|
||||
private String prjctName;
|
||||
|
||||
@Size(max = 32)
|
||||
@NotBlank
|
||||
@Schema(description = "담당 그룹")
|
||||
private String ownerDept;
|
||||
@Size(max = 32)
|
||||
@NotBlank
|
||||
@Schema(description = "인트라넷 프로젝트 코드")
|
||||
private String itrntPrjctCd;
|
||||
|
||||
@Size(max = 16)
|
||||
@NotBlank
|
||||
@Schema(description = "담당 실사")
|
||||
private String ownerFw;
|
||||
@Size(max = 32)
|
||||
@NotBlank
|
||||
@Schema(description = "담당 그룹")
|
||||
private String ownerDept;
|
||||
|
||||
@Size(max = 16)
|
||||
@NotBlank
|
||||
@Schema(description = "담당 실사")
|
||||
private String ownerFw;
|
||||
}
|
||||
|
||||
@@ -8,9 +8,12 @@ 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.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@@ -19,99 +22,100 @@ import java.time.LocalDateTime;
|
||||
@AllArgsConstructor
|
||||
@Schema(description = "프로젝트 정보")
|
||||
public class ProjectInfoDto {
|
||||
@NotNull
|
||||
@Schema(description = "프로젝트 고유 번호")
|
||||
private Long prjctIdx;
|
||||
|
||||
@Size(max = 32)
|
||||
@NotBlank
|
||||
@Schema(description = "프로젝트 코드")
|
||||
private String prjctCd;
|
||||
@NotNull
|
||||
@Schema(description = "프로젝트 고유 번호")
|
||||
private Long prjctIdx;
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "프로젝트 진행 상태")
|
||||
private ProjectStatus prjctStatus;
|
||||
@Size(max = 32)
|
||||
@NotBlank
|
||||
@Schema(description = "프로젝트 코드")
|
||||
private String prjctCd;
|
||||
|
||||
@Size(max = 128)
|
||||
@NotBlank
|
||||
@Schema(description = "프로젝트 명")
|
||||
private String prjctName;
|
||||
@NotNull
|
||||
@Schema(description = "프로젝트 진행 상태")
|
||||
private ProjectStatus prjctStatus;
|
||||
|
||||
@Size(max = 32)
|
||||
@NotBlank
|
||||
@Schema(description = "인트라넷 프로젝트 코드")
|
||||
private String itrntPrjctCd;
|
||||
@Size(max = 128)
|
||||
@NotBlank
|
||||
@Schema(description = "프로젝트 명")
|
||||
private String prjctName;
|
||||
|
||||
@Size(max = 32)
|
||||
@NotBlank
|
||||
@Schema(description = "담당 그룹")
|
||||
private String ownerDept;
|
||||
@Size(max = 32)
|
||||
@NotBlank
|
||||
@Schema(description = "인트라넷 프로젝트 코드")
|
||||
private String itrntPrjctCd;
|
||||
|
||||
@Size(max = 16)
|
||||
@NotBlank
|
||||
@Schema(description = "담당 실사")
|
||||
private String ownerFw;
|
||||
@Size(max = 32)
|
||||
@NotBlank
|
||||
@Schema(description = "담당 그룹")
|
||||
private String ownerDept;
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "설문지 타입")
|
||||
private SurveyType surveyTy;
|
||||
@Size(max = 16)
|
||||
@NotBlank
|
||||
@Schema(description = "담당 실사")
|
||||
private String ownerFw;
|
||||
|
||||
@Size(max = 32)
|
||||
@Schema(description = "내부 설문 시스템 프로젝트 코드")
|
||||
private String surveyPrjctCd;
|
||||
@NotNull
|
||||
@Schema(description = "설문지 타입")
|
||||
private SurveyType surveyTy;
|
||||
|
||||
@Size(max = 128)
|
||||
@Schema(description = "설문 URL")
|
||||
private String surveyUrl;
|
||||
@Size(max = 32)
|
||||
@Schema(description = "내부 설문 시스템 프로젝트 코드")
|
||||
private String surveyPrjctCd;
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "면접원 확인사항 여부")
|
||||
private Boolean ff;
|
||||
@Size(max = 128)
|
||||
@Schema(description = "설문 URL")
|
||||
private String surveyUrl;
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "컨택 시나리오 사용 여부")
|
||||
private Boolean useContactSenario;
|
||||
@NotNull
|
||||
@Schema(description = "면접원 확인사항 여부")
|
||||
private Boolean ff;
|
||||
|
||||
@Schema(description = "컨택 시나리오")
|
||||
private String contactSenario;
|
||||
@NotNull
|
||||
@Schema(description = "컨택 시나리오 사용 여부")
|
||||
private Boolean useContactSenario;
|
||||
|
||||
@Size(max = 32)
|
||||
@Schema(description = "등록자", accessMode = Schema.AccessMode.READ_ONLY)
|
||||
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
|
||||
private String regUser;
|
||||
@Schema(description = "컨택 시나리오")
|
||||
private String contactSenario;
|
||||
|
||||
@Schema(description = "등록일시", accessMode = Schema.AccessMode.READ_ONLY)
|
||||
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
|
||||
private LocalDateTime regDt;
|
||||
@Size(max = 32)
|
||||
@Schema(description = "등록자", accessMode = Schema.AccessMode.READ_ONLY)
|
||||
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
|
||||
private String regUser;
|
||||
|
||||
@Size(max = 32)
|
||||
@Schema(description = "수정자", accessMode = Schema.AccessMode.READ_ONLY)
|
||||
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
|
||||
private String modUser;
|
||||
@Schema(description = "등록일시", accessMode = Schema.AccessMode.READ_ONLY)
|
||||
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
|
||||
private LocalDateTime regDt;
|
||||
|
||||
@Schema(description = "수정일시", accessMode = Schema.AccessMode.READ_ONLY)
|
||||
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
|
||||
private LocalDateTime modDt;
|
||||
@Size(max = 32)
|
||||
@Schema(description = "수정자", accessMode = Schema.AccessMode.READ_ONLY)
|
||||
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
|
||||
private String modUser;
|
||||
|
||||
public static ProjectInfoDto from(TPrjctEntity entity) {
|
||||
return ProjectInfoDto.builder()
|
||||
.prjctIdx(entity.getPrjctIdx())
|
||||
.prjctCd(entity.getPrjctCd())
|
||||
.prjctStatus(ProjectStatus.fromCode(entity.getPrjctStatus()))
|
||||
.prjctName(entity.getPrjctNm())
|
||||
.itrntPrjctCd(entity.getItrntPrjctCd())
|
||||
.ownerDept(entity.getOwnerDept())
|
||||
.ownerFw(entity.getOwnerFw())
|
||||
.surveyTy(SurveyType.fromCode(entity.getSurveyTy()))
|
||||
.surveyPrjctCd(entity.getSurveyPrjctCd())
|
||||
.surveyUrl(entity.getSurveyUrl())
|
||||
.ff(entity.getFf())
|
||||
.useContactSenario(entity.getUseContactSenario())
|
||||
.contactSenario(entity.getContactSenario())
|
||||
.regUser(entity.getRegUser())
|
||||
.regDt(entity.getRegDt())
|
||||
.modUser(entity.getModUser())
|
||||
.modDt(entity.getModDt())
|
||||
.build();
|
||||
}
|
||||
@Schema(description = "수정일시", accessMode = Schema.AccessMode.READ_ONLY)
|
||||
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
|
||||
private LocalDateTime modDt;
|
||||
|
||||
public static ProjectInfoDto from(TPrjctEntity entity) {
|
||||
return ProjectInfoDto.builder()
|
||||
.prjctIdx(entity.getPrjctIdx())
|
||||
.prjctCd(entity.getPrjctCd())
|
||||
.prjctStatus(ProjectStatus.fromCode(entity.getPrjctStatus()))
|
||||
.prjctName(entity.getPrjctNm())
|
||||
.itrntPrjctCd(entity.getItrntPrjctCd())
|
||||
.ownerDept(entity.getOwnerDept())
|
||||
.ownerFw(entity.getOwnerFw())
|
||||
.surveyTy(SurveyType.fromCode(entity.getSurveyTy()))
|
||||
.surveyPrjctCd(entity.getSurveyPrjctCd())
|
||||
.surveyUrl(entity.getSurveyUrl())
|
||||
.ff(entity.getFf())
|
||||
.useContactSenario(entity.getUseContactSenario())
|
||||
.contactSenario(entity.getContactSenario())
|
||||
.regUser(entity.getRegUser())
|
||||
.regDt(entity.getRegDt())
|
||||
.modUser(entity.getModUser())
|
||||
.modDt(entity.getModDt())
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,16 +15,16 @@ import lombok.Setter;
|
||||
@Schema(description = "프로젝트 생성 요청")
|
||||
public class ProjectMainTemplateUpdateRequestDto {
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "프로젝트 명")
|
||||
private Long prjctIdx;
|
||||
@NotNull
|
||||
@Schema(description = "프로젝트 명")
|
||||
private Long prjctIdx;
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "템플릿 채널 타입")
|
||||
private ChannelType chnnlTy;
|
||||
@NotNull
|
||||
@Schema(description = "템플릿 채널 타입")
|
||||
private ChannelType chnnlTy;
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "프로젝트 명")
|
||||
private Long tmplatIdx;
|
||||
@NotNull
|
||||
@Schema(description = "프로젝트 명")
|
||||
private Long tmplatIdx;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
package com.kri.contact.server.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.util.List;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@@ -11,8 +13,9 @@ import java.util.List;
|
||||
@AllArgsConstructor
|
||||
@Schema(description = "프로젝트 담당들 정보")
|
||||
public class ProjectOwnerResponseDto {
|
||||
@Schema(description = "담당 연구 부서")
|
||||
List<String> ownerDeptList;
|
||||
@Schema(description = "담당 실사 인원")
|
||||
List<String> ownerFwList;
|
||||
|
||||
@Schema(description = "담당 연구 부서")
|
||||
List<String> ownerDeptList;
|
||||
@Schema(description = "담당 실사 인원")
|
||||
List<String> ownerFwList;
|
||||
}
|
||||
|
||||
@@ -2,23 +2,23 @@ package com.kri.contact.server.dto;
|
||||
|
||||
import com.kri.common.webmvc.page.PageRequestDto;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import java.util.List;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Schema(description = "프로젝트 검색 조건")
|
||||
public class ProjectSearchRequestDto {
|
||||
@Schema(description = "검색 텍스트")
|
||||
private String prjctText; // like 대상
|
||||
@Schema(description = "프로젝트 상태 리스트")
|
||||
private List<Short> prjctStatusList; // in (0,1,10)
|
||||
@Schema(description = "담당 부서 리스트")
|
||||
private List<String> ownerDeptList; // in ('S101','P101')
|
||||
@Schema(description = "담당 실사 리스트")
|
||||
private List<String> ownerFwList; // in ('jspark','jhchae')
|
||||
|
||||
private PageRequestDto pageRequest;
|
||||
@Schema(description = "검색 텍스트")
|
||||
private String prjctText; // like 대상
|
||||
@Schema(description = "프로젝트 상태 리스트")
|
||||
private List<Short> prjctStatusList; // in (0,1,10)
|
||||
@Schema(description = "담당 부서 리스트")
|
||||
private List<String> ownerDeptList; // in ('S101','P101')
|
||||
@Schema(description = "담당 실사 리스트")
|
||||
private List<String> ownerFwList; // in ('jspark','jhchae')
|
||||
|
||||
private PageRequestDto pageRequest;
|
||||
}
|
||||
@@ -2,23 +2,22 @@ package com.kri.contact.server.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Schema(description = "프로젝트 수정 요청")
|
||||
public class ProjectUpdateRequestDto {
|
||||
@NotNull
|
||||
@Schema(description = "프로젝트 정보")
|
||||
private ProjectInfoDto projectInfo;
|
||||
|
||||
@Schema(description = "프로젝트 수정 되야 할 결과코드")
|
||||
private List<ResultCodeDto> resultCodeList;
|
||||
@NotNull
|
||||
@Schema(description = "프로젝트 정보")
|
||||
private ProjectInfoDto projectInfo;
|
||||
|
||||
@Schema(description = "배정될 외주 업체 목록")
|
||||
private List<String> assignUserIdList;
|
||||
@Schema(description = "프로젝트 수정 되야 할 결과코드")
|
||||
private List<ResultCodeDto> resultCodeList;
|
||||
|
||||
@Schema(description = "배정될 외주 업체 목록")
|
||||
private List<String> assignUserIdList;
|
||||
}
|
||||
|
||||
@@ -3,39 +3,39 @@ package com.kri.contact.server.dto;
|
||||
import com.kri.contact.server.common.enums.ResultCodeType;
|
||||
import com.kri.contact.server.persistence.entity.TResultCodeEntity;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import java.util.UUID;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Builder
|
||||
@Schema(description = "결과 코드")
|
||||
public class ResultCodeDto {
|
||||
@Schema(description = "결과 코드 고유 키")
|
||||
private String resultCdUUID;
|
||||
|
||||
@Schema(description = "프로젝트 인덱스")
|
||||
private Long prjctIdx;
|
||||
@Schema(description = "결과 코드 고유 키")
|
||||
private String resultCdUUID;
|
||||
|
||||
@Schema(description = "결과 코드 타입")
|
||||
private ResultCodeType resultCdTy;
|
||||
@Schema(description = "프로젝트 인덱스")
|
||||
private Long prjctIdx;
|
||||
|
||||
@Schema(description = "결과 코드")
|
||||
private Short resultCd;
|
||||
@Schema(description = "결과 코드 타입")
|
||||
private ResultCodeType resultCdTy;
|
||||
|
||||
@Schema(description = "결과 코드 라벨")
|
||||
private String resultCdLbl;
|
||||
@Schema(description = "결과 코드")
|
||||
private Short resultCd;
|
||||
|
||||
public static ResultCodeDto from(TResultCodeEntity entity) {
|
||||
return ResultCodeDto.builder()
|
||||
.resultCdUUID(UUID.randomUUID().toString())
|
||||
.prjctIdx(entity.getPrjctIdx())
|
||||
.resultCdTy(entity.getResultCdTy())
|
||||
.resultCd(entity.getResultCd())
|
||||
.resultCdLbl(entity.getResultCdLbl())
|
||||
.build();
|
||||
}
|
||||
@Schema(description = "결과 코드 라벨")
|
||||
private String resultCdLbl;
|
||||
|
||||
public static ResultCodeDto from(TResultCodeEntity entity) {
|
||||
return ResultCodeDto.builder()
|
||||
.resultCdUUID(UUID.randomUUID().toString())
|
||||
.prjctIdx(entity.getPrjctIdx())
|
||||
.resultCdTy(entity.getResultCdTy())
|
||||
.resultCd(entity.getResultCd())
|
||||
.resultCdLbl(entity.getResultCdLbl())
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,52 +3,52 @@ package com.kri.contact.server.dto;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.kri.contact.server.persistence.entity.TRoleEntity;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Builder
|
||||
@Schema(description = "권한 정보")
|
||||
public class RoleInfoDto {
|
||||
@Schema(description = "권한 코드")
|
||||
private Integer roleCd;
|
||||
|
||||
@Schema(description = "권한 명")
|
||||
private String roleNm;
|
||||
@Schema(description = "권한 코드")
|
||||
private Integer roleCd;
|
||||
|
||||
@Schema(description = "메모")
|
||||
private String memo;
|
||||
@Schema(description = "권한 명")
|
||||
private String roleNm;
|
||||
|
||||
@Schema(description = "등록자", accessMode = Schema.AccessMode.READ_ONLY)
|
||||
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
|
||||
private String regUser;
|
||||
@Schema(description = "메모")
|
||||
private String memo;
|
||||
|
||||
@Schema(description = "등록일시", accessMode = Schema.AccessMode.READ_ONLY)
|
||||
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
|
||||
private LocalDateTime regDt;
|
||||
@Schema(description = "등록자", accessMode = Schema.AccessMode.READ_ONLY)
|
||||
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
|
||||
private String regUser;
|
||||
|
||||
@Schema(description = "수정자", accessMode = Schema.AccessMode.READ_ONLY)
|
||||
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
|
||||
private String modUser;
|
||||
@Schema(description = "등록일시", accessMode = Schema.AccessMode.READ_ONLY)
|
||||
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
|
||||
private LocalDateTime regDt;
|
||||
|
||||
@Schema(description = "수정일시", accessMode = Schema.AccessMode.READ_ONLY)
|
||||
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
|
||||
private LocalDateTime modDt;
|
||||
@Schema(description = "수정자", accessMode = Schema.AccessMode.READ_ONLY)
|
||||
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
|
||||
private String modUser;
|
||||
|
||||
@Schema(description = "수정일시", accessMode = Schema.AccessMode.READ_ONLY)
|
||||
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
|
||||
private LocalDateTime modDt;
|
||||
|
||||
|
||||
public static RoleInfoDto from(TRoleEntity roleEntity) {
|
||||
return RoleInfoDto.builder()
|
||||
.roleCd(roleEntity.getRoleCd())
|
||||
.roleNm(roleEntity.getRoleNm())
|
||||
.memo(roleEntity.getMemo())
|
||||
.regUser(roleEntity.getRegUser())
|
||||
.regDt(roleEntity.getRegDt())
|
||||
.modUser(roleEntity.getModUser())
|
||||
.modDt(roleEntity.getModDt())
|
||||
.build();
|
||||
}
|
||||
public static RoleInfoDto from(TRoleEntity roleEntity) {
|
||||
return RoleInfoDto.builder()
|
||||
.roleCd(roleEntity.getRoleCd())
|
||||
.roleNm(roleEntity.getRoleNm())
|
||||
.memo(roleEntity.getMemo())
|
||||
.regUser(roleEntity.getRegUser())
|
||||
.regDt(roleEntity.getRegDt())
|
||||
.modUser(roleEntity.getModUser())
|
||||
.modDt(roleEntity.getModDt())
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,9 +8,12 @@ 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.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@@ -19,82 +22,83 @@ import java.time.LocalDateTime;
|
||||
@AllArgsConstructor
|
||||
@Schema(description = "사용자 정보")
|
||||
public class UserInfoDto {
|
||||
@Size(max = 32)
|
||||
@NotBlank
|
||||
@Schema(description = "사용자 ID")
|
||||
private String userId;
|
||||
|
||||
@Size(max = 128)
|
||||
@NotBlank
|
||||
@Schema(description = "사용자 PW")
|
||||
private String userPw;
|
||||
@Size(max = 32)
|
||||
@NotBlank
|
||||
@Schema(description = "사용자 ID")
|
||||
private String userId;
|
||||
|
||||
@Size(max = 32)
|
||||
@NotBlank
|
||||
@Schema(description = "사용자 이름")
|
||||
private String userName;
|
||||
@Size(max = 128)
|
||||
@NotBlank
|
||||
@Schema(description = "사용자 PW")
|
||||
private String userPw;
|
||||
|
||||
@Size(max = 32)
|
||||
@NotBlank
|
||||
@Schema(description = "사용자 소속 회사")
|
||||
private String userCmpn;
|
||||
@Size(max = 32)
|
||||
@NotBlank
|
||||
@Schema(description = "사용자 이름")
|
||||
private String userName;
|
||||
|
||||
@Size(max = 32)
|
||||
@NotBlank
|
||||
@Schema(description = "사용자 소속 팀")
|
||||
private String userTeam = "S101";
|
||||
@Size(max = 32)
|
||||
@NotBlank
|
||||
@Schema(description = "사용자 소속 회사")
|
||||
private String userCmpn;
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "사용자 권한")
|
||||
private Integer userRole;
|
||||
@Size(max = 32)
|
||||
@NotBlank
|
||||
@Schema(description = "사용자 소속 팀")
|
||||
private String userTeam = "S101";
|
||||
|
||||
@Schema(description = "메모")
|
||||
private String memo;
|
||||
@NotNull
|
||||
@Schema(description = "사용자 권한")
|
||||
private Integer userRole;
|
||||
|
||||
@Size(max = 32)
|
||||
@Schema(description = "등록자", accessMode = Schema.AccessMode.READ_ONLY)
|
||||
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
|
||||
private String regUser;
|
||||
@Schema(description = "메모")
|
||||
private String memo;
|
||||
|
||||
@Schema(description = "등록일시", accessMode = Schema.AccessMode.READ_ONLY)
|
||||
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
|
||||
private LocalDateTime regDt;
|
||||
@Size(max = 32)
|
||||
@Schema(description = "등록자", accessMode = Schema.AccessMode.READ_ONLY)
|
||||
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
|
||||
private String regUser;
|
||||
|
||||
@Size(max = 32)
|
||||
@Schema(description = "수정자", accessMode = Schema.AccessMode.READ_ONLY)
|
||||
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
|
||||
private String modUser;
|
||||
@Schema(description = "등록일시", accessMode = Schema.AccessMode.READ_ONLY)
|
||||
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
|
||||
private LocalDateTime regDt;
|
||||
|
||||
@Schema(description = "수정일시", accessMode = Schema.AccessMode.READ_ONLY)
|
||||
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
|
||||
private LocalDateTime modDt;
|
||||
@Size(max = 32)
|
||||
@Schema(description = "수정자", accessMode = Schema.AccessMode.READ_ONLY)
|
||||
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
|
||||
private String modUser;
|
||||
|
||||
public static UserInfoDto from(TUserEntity entity) {
|
||||
return UserInfoDto.builder()
|
||||
.userId(entity.getUserId())
|
||||
.userName(entity.getUserNm())
|
||||
.userCmpn(entity.getUserCmpn())
|
||||
.userTeam(entity.getUserTeam())
|
||||
.userRole(entity.getUserRole())
|
||||
.memo(entity.getMemo())
|
||||
.regUser(entity.getRegUser())
|
||||
.regDt(entity.getRegDt())
|
||||
.modUser(entity.getModUser())
|
||||
.modDt(entity.getModDt())
|
||||
.build();
|
||||
}
|
||||
@Schema(description = "수정일시", accessMode = Schema.AccessMode.READ_ONLY)
|
||||
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
|
||||
private LocalDateTime modDt;
|
||||
|
||||
public static UserInfoDto from(UserUploadDto dto, Integer userRole, String regUser) {
|
||||
return UserInfoDto.builder()
|
||||
.userId(dto.getUserId())
|
||||
.userPw(dto.getUserPw())
|
||||
.userName(dto.getUserName())
|
||||
.userCmpn(dto.getUserCmpn())
|
||||
.userTeam("S101")
|
||||
.userRole(userRole)
|
||||
.memo(dto.getMemo())
|
||||
.regUser(regUser)
|
||||
.regDt(DateTimeUtil.nowKstLocalDateTime())
|
||||
.build();
|
||||
}
|
||||
public static UserInfoDto from(TUserEntity entity) {
|
||||
return UserInfoDto.builder()
|
||||
.userId(entity.getUserId())
|
||||
.userName(entity.getUserNm())
|
||||
.userCmpn(entity.getUserCmpn())
|
||||
.userTeam(entity.getUserTeam())
|
||||
.userRole(entity.getUserRole())
|
||||
.memo(entity.getMemo())
|
||||
.regUser(entity.getRegUser())
|
||||
.regDt(entity.getRegDt())
|
||||
.modUser(entity.getModUser())
|
||||
.modDt(entity.getModDt())
|
||||
.build();
|
||||
}
|
||||
|
||||
public static UserInfoDto from(UserUploadDto dto, Integer userRole, String regUser) {
|
||||
return UserInfoDto.builder()
|
||||
.userId(dto.getUserId())
|
||||
.userPw(dto.getUserPw())
|
||||
.userName(dto.getUserName())
|
||||
.userCmpn(dto.getUserCmpn())
|
||||
.userTeam("S101")
|
||||
.userRole(userRole)
|
||||
.memo(dto.getMemo())
|
||||
.regUser(regUser)
|
||||
.regDt(DateTimeUtil.nowKstLocalDateTime())
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,20 +10,20 @@ import lombok.experimental.SuperBuilder;
|
||||
@Setter
|
||||
public class ExcelErrorDto {
|
||||
|
||||
@ExcelColumn(header = "행 번호", order = 0)
|
||||
private int rowNumber;
|
||||
@ExcelColumn(header = "행 번호", order = 0)
|
||||
private int rowNumber;
|
||||
|
||||
@ExcelColumn(header = "필드명", order = 1)
|
||||
private String fieldName;
|
||||
@ExcelColumn(header = "필드명", order = 1)
|
||||
private String fieldName;
|
||||
|
||||
@ExcelColumn(header = "에러 메시지", order = 2)
|
||||
private String errorMessage;
|
||||
@ExcelColumn(header = "에러 메시지", order = 2)
|
||||
private String errorMessage;
|
||||
|
||||
public static ExcelErrorDto of(int rowNumber, String fieldName, String errorMessage) {
|
||||
return ExcelErrorDto.builder()
|
||||
.rowNumber(rowNumber)
|
||||
.fieldName(fieldName)
|
||||
.errorMessage(errorMessage)
|
||||
.build();
|
||||
}
|
||||
public static ExcelErrorDto of(int rowNumber, String fieldName, String errorMessage) {
|
||||
return ExcelErrorDto.builder()
|
||||
.rowNumber(rowNumber)
|
||||
.fieldName(fieldName)
|
||||
.errorMessage(errorMessage)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,11 @@ package com.kri.contact.server.dto.excel;
|
||||
|
||||
import com.kri.common.excel.ExcelColumn;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@@ -10,27 +14,28 @@ import lombok.*;
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class UserUploadDto {
|
||||
@ExcelColumn(header = "사용자 ID", order = 0, width = 11)
|
||||
@Schema(description = "사용자 ID")
|
||||
private String userId;
|
||||
|
||||
@ExcelColumn(header = "사용자 PW", order = 1, width = 11)
|
||||
@Schema(description = "사용자 PW")
|
||||
private String userPw;
|
||||
@ExcelColumn(header = "사용자 ID", order = 0, width = 11)
|
||||
@Schema(description = "사용자 ID")
|
||||
private String userId;
|
||||
|
||||
@ExcelColumn(header = "사용자 이름", order = 2, width = 11)
|
||||
@Schema(description = "사용자 이름")
|
||||
private String userName;
|
||||
@ExcelColumn(header = "사용자 PW", order = 1, width = 11)
|
||||
@Schema(description = "사용자 PW")
|
||||
private String userPw;
|
||||
|
||||
@ExcelColumn(header = "사용자 소속 회사", order = 3, width = 16)
|
||||
@Schema(description = "사용자 소속 회사")
|
||||
private String userCmpn;
|
||||
@ExcelColumn(header = "사용자 이름", order = 2, width = 11)
|
||||
@Schema(description = "사용자 이름")
|
||||
private String userName;
|
||||
|
||||
@ExcelColumn(header = "사용자 권한", order = 4, width = 11)
|
||||
@Schema(description = "사용자 권한")
|
||||
private String userRoleStr;
|
||||
@ExcelColumn(header = "사용자 소속 회사", order = 3, width = 16)
|
||||
@Schema(description = "사용자 소속 회사")
|
||||
private String userCmpn;
|
||||
|
||||
@ExcelColumn(header = "메모", order = 5, width = 20)
|
||||
@Schema(description = "메모")
|
||||
private String memo;
|
||||
@ExcelColumn(header = "사용자 권한", order = 4, width = 11)
|
||||
@Schema(description = "사용자 권한")
|
||||
private String userRoleStr;
|
||||
|
||||
@ExcelColumn(header = "메모", order = 5, width = 20)
|
||||
@Schema(description = "메모")
|
||||
private String memo;
|
||||
}
|
||||
|
||||
@@ -9,11 +9,11 @@ import lombok.experimental.SuperBuilder;
|
||||
@Setter
|
||||
public class UserUploadErrorDto extends ExcelErrorDto {
|
||||
|
||||
public static UserUploadErrorDto of(int rowNumber, String fieldName, String errorMessage) {
|
||||
return UserUploadErrorDto.builder()
|
||||
.rowNumber(rowNumber)
|
||||
.fieldName(fieldName)
|
||||
.errorMessage(errorMessage)
|
||||
.build();
|
||||
}
|
||||
public static UserUploadErrorDto of(int rowNumber, String fieldName, String errorMessage) {
|
||||
return UserUploadErrorDto.builder()
|
||||
.rowNumber(rowNumber)
|
||||
.fieldName(fieldName)
|
||||
.errorMessage(errorMessage)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,8 +8,9 @@ import lombok.Setter;
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public class UploadUserContentDto {
|
||||
String fileName;
|
||||
String fileType;
|
||||
Long fileSize;
|
||||
|
||||
String fileName;
|
||||
String fileType;
|
||||
Long fileSize;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user