Merge pull request '상태값 enum 변경, 영상관리 목록, 조회 수정' (#63) from feat/dev_251201 into develop
Reviewed-on: https://kamco.gitea.gs.dabeeo.com/dabeeo/kamco-dabeeo-backoffice/pulls/63
This commit is contained in:
@@ -7,9 +7,9 @@ import lombok.Getter;
|
|||||||
@Getter
|
@Getter
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public enum StatusType implements EnumType {
|
public enum StatusType implements EnumType {
|
||||||
ACTIVE("활성"),
|
ACTIVE("사용"),
|
||||||
INACTIVE("미사용"),
|
INACTIVE("미사용"),
|
||||||
PENDING("보류");
|
PENDING("계정등록");
|
||||||
|
|
||||||
private final String desc;
|
private final String desc;
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ public class CommonStringUtils {
|
|||||||
*/
|
*/
|
||||||
public static boolean isValidPassword(String password) {
|
public static boolean isValidPassword(String password) {
|
||||||
String passwordPattern =
|
String passwordPattern =
|
||||||
"^(?=.*[A-Za-z])(?=.*\\d)(?=.*[!@#$%^&*()_+\\-\\[\\]{};':\"\\\\|,.<>/?]).{8,20}$";
|
"^(?=.*[A-Za-z])(?=.*\\d)(?=.*[!@#$%^&*()_+\\-\\[\\]{};':\"\\\\|,.<>/?=]).{8,20}$";
|
||||||
return Pattern.matches(passwordPattern, password);
|
return Pattern.matches(passwordPattern, password);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -253,8 +253,8 @@ public class FIleChecker {
|
|||||||
List<Basic> fileList = new ArrayList<>();
|
List<Basic> fileList = new ArrayList<>();
|
||||||
SimpleDateFormat dttmFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
SimpleDateFormat dttmFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
|
||||||
int fileTotCnt = 0;
|
// int fileTotCnt = 0;
|
||||||
long fileTotSize = 0;
|
// long fileTotSize = 0;
|
||||||
|
|
||||||
try (Stream<Path> stream = Files.walk(startPath, maxDepth)) {
|
try (Stream<Path> stream = Files.walk(startPath, maxDepth)) {
|
||||||
|
|
||||||
|
|||||||
@@ -42,6 +42,9 @@ public class MapSheetMngApiController {
|
|||||||
@PostMapping("/mng-list")
|
@PostMapping("/mng-list")
|
||||||
public ApiResponseDto<Page<MapSheetMngDto.MngDto>> findMapSheetMngList(
|
public ApiResponseDto<Page<MapSheetMngDto.MngDto>> findMapSheetMngList(
|
||||||
@RequestBody MapSheetMngDto.MngSearchReq searchReq) {
|
@RequestBody MapSheetMngDto.MngSearchReq searchReq) {
|
||||||
|
|
||||||
|
System.out.println("kkkkkkkkkkkkkkkkkkkkkkkkk");
|
||||||
|
|
||||||
return ApiResponseDto.ok(mapSheetMngService.findMapSheetMngList(searchReq));
|
return ApiResponseDto.ok(mapSheetMngService.findMapSheetMngList(searchReq));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -69,15 +69,40 @@ public class MapSheetMngDto {
|
|||||||
private int mngYyyy;
|
private int mngYyyy;
|
||||||
private String mngState;
|
private String mngState;
|
||||||
private String syncState;
|
private String syncState;
|
||||||
private String syncCheckState;
|
private String syncDataCheckState;
|
||||||
private Long syncTotCnt;
|
private Long syncTotCnt;
|
||||||
private Long syncStateDoneCnt;
|
private Long syncStateDoneCnt;
|
||||||
private Long syncCheckStateDoneCnt;
|
private Long syncDataCheckDoneCnt;
|
||||||
private Long syncNotFileCnt;
|
private Long syncNotPaireCnt;
|
||||||
private Long syncTypeErrorCnt;
|
private Long syncNotPaireExecCnt;
|
||||||
private Long syncSizeErrorCnt;
|
private Long syncDuplicateCnt;
|
||||||
|
private Long syncDuplicateExecCnt;
|
||||||
|
private Long syncFaultCnt;
|
||||||
|
private Long syncFaultExecCnt;
|
||||||
@JsonFormatDttm private ZonedDateTime rgstStrtDttm;
|
@JsonFormatDttm private ZonedDateTime rgstStrtDttm;
|
||||||
@JsonFormatDttm private ZonedDateTime rgstEndDttm;
|
@JsonFormatDttm private ZonedDateTime rgstEndDttm;
|
||||||
|
|
||||||
|
public double getSyncStateDoneRate() {
|
||||||
|
if (this.syncTotCnt == null || this.syncTotCnt == 0) {
|
||||||
|
return 0.0;
|
||||||
|
}
|
||||||
|
return (double) this.syncStateDoneCnt / this.syncTotCnt * 100.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getSyncDataCheckDoneRate() {
|
||||||
|
if (this.syncTotCnt == null || this.syncTotCnt == 0) {
|
||||||
|
return 0.0;
|
||||||
|
}
|
||||||
|
return (double) this.syncDataCheckDoneCnt / this.syncTotCnt * 100.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getSyncErrorTotCnt() {
|
||||||
|
return this.syncNotPaireCnt + this.syncDuplicateCnt + this.syncFaultCnt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getSyncErrorExecTotCnt() {
|
||||||
|
return this.syncNotPaireExecCnt + this.syncDuplicateExecCnt + this.syncFaultExecCnt;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Schema(name = "ErrorSearchReq", description = "영상관리 오류데이터 검색 요청")
|
@Schema(name = "ErrorSearchReq", description = "영상관리 오류데이터 검색 요청")
|
||||||
|
|||||||
@@ -46,7 +46,8 @@ public class MembersDto {
|
|||||||
ZonedDateTime createdDttm,
|
ZonedDateTime createdDttm,
|
||||||
ZonedDateTime firstLoginDttm,
|
ZonedDateTime firstLoginDttm,
|
||||||
ZonedDateTime lastLoginDttm,
|
ZonedDateTime lastLoginDttm,
|
||||||
ZonedDateTime statusChgDttm) {
|
ZonedDateTime statusChgDttm,
|
||||||
|
Boolean pwdResetYn) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.uuid = uuid;
|
this.uuid = uuid;
|
||||||
this.userRole = userRole;
|
this.userRole = userRole;
|
||||||
@@ -54,7 +55,7 @@ public class MembersDto {
|
|||||||
this.name = name;
|
this.name = name;
|
||||||
this.employeeNo = employeeNo;
|
this.employeeNo = employeeNo;
|
||||||
this.status = status;
|
this.status = status;
|
||||||
this.statusName = getStatusName(status);
|
this.statusName = getStatusName(status, pwdResetYn);
|
||||||
this.createdDttm = createdDttm;
|
this.createdDttm = createdDttm;
|
||||||
this.firstLoginDttm = firstLoginDttm;
|
this.firstLoginDttm = firstLoginDttm;
|
||||||
this.lastLoginDttm = lastLoginDttm;
|
this.lastLoginDttm = lastLoginDttm;
|
||||||
@@ -66,8 +67,12 @@ public class MembersDto {
|
|||||||
return type.getText();
|
return type.getText();
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getStatusName(String status) {
|
private String getStatusName(String status, Boolean pwdResetYn) {
|
||||||
StatusType type = Enums.fromId(StatusType.class, status);
|
StatusType type = Enums.fromId(StatusType.class, status);
|
||||||
|
pwdResetYn = pwdResetYn != null && pwdResetYn;
|
||||||
|
if (type.equals(StatusType.PENDING) && pwdResetYn) {
|
||||||
|
type = StatusType.ACTIVE;
|
||||||
|
}
|
||||||
return type.getText();
|
return type.getText();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,6 +52,16 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
|
|||||||
whereBuilder.and(mapSheetMngEntity.mngYyyy.eq(searchReq.getMngYyyy()));
|
whereBuilder.and(mapSheetMngEntity.mngYyyy.eq(searchReq.getMngYyyy()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NumberExpression<Long> totalCount = mapSheetMngHstEntity.count().as("syncTotCnt");
|
||||||
|
|
||||||
|
NumberExpression<Long> doneCount =
|
||||||
|
new CaseBuilder()
|
||||||
|
.when(mapSheetMngHstEntity.dataState.eq("DONE"))
|
||||||
|
.then(1L)
|
||||||
|
.otherwise(0L)
|
||||||
|
.sum()
|
||||||
|
.as("syncStateDoneCnt");
|
||||||
|
|
||||||
List<MapSheetMngDto.MngDto> foundContent =
|
List<MapSheetMngDto.MngDto> foundContent =
|
||||||
queryFactory
|
queryFactory
|
||||||
.select(
|
.select(
|
||||||
@@ -67,33 +77,76 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
|
|||||||
mapSheetMngEntity.syncCheckState,
|
mapSheetMngEntity.syncCheckState,
|
||||||
mapSheetMngHstEntity.count(),
|
mapSheetMngHstEntity.count(),
|
||||||
new CaseBuilder()
|
new CaseBuilder()
|
||||||
.when(mapSheetMngHstEntity.syncState.eq("DONE"))
|
.when(mapSheetMngHstEntity.dataState.eq("DONE"))
|
||||||
.then(1L)
|
.then(1L)
|
||||||
.otherwise(0L)
|
.otherwise(0L)
|
||||||
.sum()
|
.sum()
|
||||||
.as("syncStateDoneCnt"),
|
.as("syncStateDoneCnt"),
|
||||||
new CaseBuilder()
|
new CaseBuilder()
|
||||||
.when(mapSheetMngHstEntity.syncCheckState.eq("DONE"))
|
.when(mapSheetMngHstEntity.syncState.ne("NOTYET"))
|
||||||
.then(1L)
|
.then(1L)
|
||||||
.otherwise(0L)
|
.otherwise(0L)
|
||||||
.sum(),
|
.sum(),
|
||||||
new CaseBuilder()
|
new CaseBuilder()
|
||||||
.when(mapSheetMngHstEntity.dataState.eq("NOT"))
|
.when(
|
||||||
|
mapSheetMngHstEntity
|
||||||
|
.syncState
|
||||||
|
.eq("NOFILE")
|
||||||
|
.or(mapSheetMngHstEntity.syncState.eq("NOTPAIR")))
|
||||||
.then(1L)
|
.then(1L)
|
||||||
.otherwise(0L)
|
.otherwise(0L)
|
||||||
.sum(),
|
.sum(),
|
||||||
new CaseBuilder()
|
new CaseBuilder()
|
||||||
.when(mapSheetMngHstEntity.dataState.eq("TYPEERROR"))
|
.when(
|
||||||
|
mapSheetMngHstEntity
|
||||||
|
.syncCheckState
|
||||||
|
.eq("DONE")
|
||||||
|
.and(
|
||||||
|
mapSheetMngHstEntity
|
||||||
|
.syncState
|
||||||
|
.eq("NOFILE")
|
||||||
|
.or(mapSheetMngHstEntity.syncState.eq("NOTPAIR"))))
|
||||||
.then(1L)
|
.then(1L)
|
||||||
.otherwise(0L)
|
.otherwise(0L)
|
||||||
.sum(),
|
.sum(),
|
||||||
new CaseBuilder()
|
new CaseBuilder()
|
||||||
.when(mapSheetMngHstEntity.dataState.eq("SIZEERROR"))
|
.when(mapSheetMngHstEntity.syncState.eq("DUPLICATE"))
|
||||||
.then(1L)
|
.then(1L)
|
||||||
.otherwise(0L)
|
.otherwise(0L)
|
||||||
.sum(),
|
.sum(),
|
||||||
mapSheetMngHstEntity.syncStrtDttm.min(),
|
new CaseBuilder()
|
||||||
mapSheetMngHstEntity.syncCheckEndDttm.max()))
|
.when(
|
||||||
|
mapSheetMngHstEntity
|
||||||
|
.syncCheckState
|
||||||
|
.eq("DONE")
|
||||||
|
.and(mapSheetMngHstEntity.syncState.eq("DUPLICATE")))
|
||||||
|
.then(1L)
|
||||||
|
.otherwise(0L)
|
||||||
|
.sum(),
|
||||||
|
new CaseBuilder()
|
||||||
|
.when(
|
||||||
|
mapSheetMngHstEntity
|
||||||
|
.syncState
|
||||||
|
.eq("TYPEERROR")
|
||||||
|
.or(mapSheetMngHstEntity.syncState.eq("SIZEERROR")))
|
||||||
|
.then(1L)
|
||||||
|
.otherwise(0L)
|
||||||
|
.sum(),
|
||||||
|
new CaseBuilder()
|
||||||
|
.when(
|
||||||
|
mapSheetMngHstEntity
|
||||||
|
.syncCheckState
|
||||||
|
.eq("DONE")
|
||||||
|
.and(
|
||||||
|
mapSheetMngHstEntity
|
||||||
|
.syncState
|
||||||
|
.eq("TYPEERROR")
|
||||||
|
.or(mapSheetMngHstEntity.syncState.eq("SIZEERROR"))))
|
||||||
|
.then(1L)
|
||||||
|
.otherwise(0L)
|
||||||
|
.sum(),
|
||||||
|
mapSheetMngEntity.createdDttm,
|
||||||
|
mapSheetMngHstEntity.syncEndDttm.max()))
|
||||||
.from(mapSheetMngEntity)
|
.from(mapSheetMngEntity)
|
||||||
.leftJoin(mapSheetMngHstEntity)
|
.leftJoin(mapSheetMngHstEntity)
|
||||||
.on(mapSheetMngEntity.mngYyyy.eq(mapSheetMngHstEntity.mngYyyy))
|
.on(mapSheetMngEntity.mngYyyy.eq(mapSheetMngHstEntity.mngYyyy))
|
||||||
|
|||||||
@@ -125,7 +125,8 @@ public class MembersRepositoryImpl implements MembersRepositoryCustom {
|
|||||||
memberEntity.createdDttm,
|
memberEntity.createdDttm,
|
||||||
memberEntity.firstLoginDttm,
|
memberEntity.firstLoginDttm,
|
||||||
memberEntity.lastLoginDttm,
|
memberEntity.lastLoginDttm,
|
||||||
memberEntity.statusChgDttm))
|
memberEntity.statusChgDttm,
|
||||||
|
memberEntity.pwdResetYn))
|
||||||
.from(memberEntity)
|
.from(memberEntity)
|
||||||
.where(builder)
|
.where(builder)
|
||||||
.offset(pageable.getOffset())
|
.offset(pageable.getOffset())
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ public class MapSheetMngFileJobRepositoryImpl extends QuerydslRepositorySupport
|
|||||||
|
|
||||||
public void mngHstDataSyncStateUpdate(MapSheetMngDto.MngHstDto updateReq) {
|
public void mngHstDataSyncStateUpdate(MapSheetMngDto.MngHstDto updateReq) {
|
||||||
|
|
||||||
if (updateReq.getSyncState().equals("DONE")) {
|
if (updateReq.getDataState().equals("DONE")) {
|
||||||
long updateCount =
|
long updateCount =
|
||||||
queryFactory
|
queryFactory
|
||||||
.update(mapSheetMngHstEntity)
|
.update(mapSheetMngHstEntity)
|
||||||
|
|||||||
Reference in New Issue
Block a user