diff --git a/package.json b/package.json
index cbf09012..8b45d702 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "ucap-webmessenger",
- "version": "1.0.16",
+ "version": "1.0.0",
"author": {
"name": "LG CNS",
"email": "lgucap@lgcns.com"
@@ -137,6 +137,7 @@
"moment": "^2.24.0",
"moment-timezone": "^0.5.27",
"ng-packagr": "^5.7.1",
+ "ng-table-virtual-scroll": "^1.3.1",
"ngrx-store-freeze": "^0.2.4",
"ngx-logger": "^4.0.8",
"ngx-perfect-scrollbar": "^8.0.0",
diff --git a/projects/ucap-webmessenger-app/src/app/store/messenger/query/actions.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/query/actions.ts
index 61d88ab4..909cc542 100644
--- a/projects/ucap-webmessenger-app/src/app/store/messenger/query/actions.ts
+++ b/projects/ucap-webmessenger-app/src/app/store/messenger/query/actions.ts
@@ -95,6 +95,8 @@ export const searchDeptUser = createAction(
props<{
companyCode: string;
search: string;
+ pageCurrent?: number;
+ userList?: UserInfoSS[];
}>()
);
@@ -119,6 +121,8 @@ export const integrateSearchDeptUser = createAction(
props<{
companyCode: string;
search: string;
+ pageCurrent?: number;
+ userList?: UserInfoSS[];
}>()
);
diff --git a/projects/ucap-webmessenger-app/src/app/store/messenger/query/effects.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/query/effects.ts
index a4ce8abd..fe02f4ae 100644
--- a/projects/ucap-webmessenger-app/src/app/store/messenger/query/effects.ts
+++ b/projects/ucap-webmessenger-app/src/app/store/messenger/query/effects.ts
@@ -10,8 +10,7 @@ import {
map,
tap,
switchMap,
- withLatestFrom,
- take
+ withLatestFrom
} from 'rxjs/operators';
import {
@@ -28,7 +27,6 @@ import {
selectedDeptSuccess,
searchDeptUser,
searchDeptUserSuccess,
- clearSearchDeptUser,
integrateSearchDeptUser,
integrateSearchDeptUserSuccess,
integrateSearchDeptUserFailure,
@@ -45,13 +43,12 @@ import {
SSVC_TYPE_QUERY_DEPT_USER_DATA,
DeptUserData,
SSVC_TYPE_QUERY_DEPT_USER_RES,
- DeptUserResponse,
- DeptSearchType
+ DeptSearchType,
+ DeptUserRequest
} from '@ucap-webmessenger/protocol-query';
import { Store, select } from '@ngrx/store';
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
-import { KEY_LOGIN_RES_INFO } from '@app/types';
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
import { OrganizationService } from '@ucap-webmessenger/ui-organization';
import { NGXLogger } from 'ngx-logger';
@@ -171,38 +168,106 @@ export class Effects {
)
),
switchMap(([req, loginResInfo]) => {
- return this.organizationService
- .getDeptUser({
- divCd: 'INT_SRCH',
- companyCode: req.companyCode,
- search: req.search,
- searchRange: DeptSearchType.All,
- senderCompanyCode: loginResInfo.companyCode,
- senderEmployeeType: loginResInfo.userInfo.employeeType
- })
- .pipe(
- map(datas => {
- const userInfos: UserInfoSS[] = datas.userInfos;
- this.store.dispatch(
- integrateSearchDeptUserSuccess({
- userInfos
- })
- );
+ const pageListCount = 180;
+ const pageCurrent = !!req.pageCurrent ? req.pageCurrent : 1;
+ const request = {
+ divCd: 'INT_SRCH',
+ companyCode: req.companyCode,
+ search: req.search,
+ searchRange: DeptSearchType.All,
+ senderCompanyCode: loginResInfo.companyCode,
+ senderEmployeeType: loginResInfo.userInfo.employeeType,
+ pageListCount,
+ pageCurrent
+ } as DeptUserRequest;
- // 검색 결과에 따른 프레즌스 조회.
- const userSeqList: number[] = [];
- userInfos.map(user => userSeqList.push(user.seq));
- if (userSeqList.length > 0) {
- this.store.dispatch(
- StatusStore.bulkInfo({
- divCd: 'inttrSrch',
- userSeqs: userSeqList
- })
- );
- }
- }),
- catchError(error => of(integrateSearchDeptUserFailure({ error })))
- );
+ let mergedUserList: UserInfoSS[] = !!req.userList ? req.userList : [];
+
+ const userInfos: UserInfoSS[] = [];
+ return this.queryProtocolService.deptUser(request).pipe(
+ map(res => {
+ switch (res.SSVC_TYPE) {
+ case SSVC_TYPE_QUERY_DEPT_USER_DATA:
+ userInfos.push(...(res as DeptUserData).userInfos);
+ break;
+ case SSVC_TYPE_QUERY_DEPT_USER_RES:
+ if (!!userInfos && userInfos.length > 0) {
+ mergedUserList = [...mergedUserList, ...userInfos];
+ }
+
+ // 검색 결과에 따른 프레즌스 조회.
+ const userSeqList: number[] = [];
+ userInfos.map(user => userSeqList.push(user.seq));
+ if (userSeqList.length > 0) {
+ this.store.dispatch(
+ StatusStore.bulkInfo({
+ divCd: 'inttrSrch',
+ userSeqs: userSeqList
+ })
+ );
+ }
+
+ // 재귀 할지 판단.
+ if (!!userInfos && userInfos.length >= pageListCount) {
+ // 추가 조회.
+ this.store.dispatch(
+ integrateSearchDeptUser({
+ ...req,
+ pageCurrent: pageCurrent + 1,
+ userList: mergedUserList
+ })
+ );
+ } else {
+ mergedUserList.sort((a, b) =>
+ a.order < b.order
+ ? -1
+ : a.order > b.order
+ ? 1
+ : a.name < b.name
+ ? -1
+ : a.name > b.name
+ ? 1
+ : 0
+ );
+
+ // 최종 조회건.
+ this.store.dispatch(
+ integrateSearchDeptUserSuccess({
+ userInfos: mergedUserList
+ })
+ );
+ }
+ break;
+ }
+ }),
+ catchError(error => of(integrateSearchDeptUserFailure({ error })))
+ );
+
+ // return this.organizationService
+ // .getDeptUser(request)
+ // .pipe(
+ // map(datas => {
+ // const userInfos: UserInfoSS[] = datas.userInfos;
+ // this.store.dispatch(
+ // integrateSearchDeptUserSuccess({
+ // userInfos
+ // })
+ // );
+
+ // // 검색 결과에 따른 프레즌스 조회.
+ // const userSeqList: number[] = [];
+ // userInfos.map(user => userSeqList.push(user.seq));
+ // if (userSeqList.length > 0) {
+ // this.store.dispatch(
+ // StatusStore.bulkInfo({
+ // divCd: 'inttrSrch',
+ // userSeqs: userSeqList
+ // })
+ // );
+ // }
+ // }),
+ // catchError(error => of(integrateSearchDeptUserFailure({ error })))
+ // );
})
);
},
@@ -222,38 +287,80 @@ export class Effects {
)
),
switchMap(([req, loginResInfo]) => {
- return this.organizationService
- .getDeptUser({
- divCd: 'ORG_SRCH',
- companyCode: req.companyCode,
- search: req.search,
- searchRange: DeptSearchType.All,
- senderCompanyCode: loginResInfo.companyCode,
- senderEmployeeType: loginResInfo.userInfo.employeeType
- })
- .pipe(
- map(datas => {
- const userInfos: UserInfoSS[] = datas.userInfos;
- this.store.dispatch(
- searchDeptUserSuccess({
- userInfos
- })
- );
+ const pageListCount = 180;
+ const pageCurrent = !!req.pageCurrent ? req.pageCurrent : 1;
+ const request = {
+ divCd: 'ORG_SRCH',
+ companyCode: req.companyCode,
+ search: req.search,
+ searchRange: DeptSearchType.All,
+ senderCompanyCode: loginResInfo.companyCode,
+ senderEmployeeType: loginResInfo.userInfo.employeeType,
+ pageListCount,
+ pageCurrent
+ } as DeptUserRequest;
- // 검색 결과에 따른 프레즌스 조회.
- const userSeqList: number[] = [];
- userInfos.map(user => userSeqList.push(user.seq));
- if (userSeqList.length > 0) {
- this.store.dispatch(
- StatusStore.bulkInfo({
- divCd: 'orgtrSrch',
- userSeqs: userSeqList
- })
- );
- }
- }),
- catchError(error => of(deptUserFailure({ error })))
- );
+ let mergedUserList: UserInfoSS[] = !!req.userList ? req.userList : [];
+
+ const userInfos: UserInfoSS[] = [];
+ return this.queryProtocolService.deptUser(request).pipe(
+ map(res => {
+ switch (res.SSVC_TYPE) {
+ case SSVC_TYPE_QUERY_DEPT_USER_DATA:
+ userInfos.push(...(res as DeptUserData).userInfos);
+ break;
+ case SSVC_TYPE_QUERY_DEPT_USER_RES:
+ if (!!userInfos && userInfos.length > 0) {
+ mergedUserList = [...mergedUserList, ...userInfos];
+ }
+
+ // 검색 결과에 따른 프레즌스 조회.
+ const userSeqList: number[] = [];
+ userInfos.map(user => userSeqList.push(user.seq));
+ if (userSeqList.length > 0) {
+ this.store.dispatch(
+ StatusStore.bulkInfo({
+ divCd: 'orgtrSrch',
+ userSeqs: userSeqList
+ })
+ );
+ }
+
+ // 재귀 할지 판단.
+ if (!!userInfos && userInfos.length >= pageListCount) {
+ // 추가 조회.
+ this.store.dispatch(
+ searchDeptUser({
+ ...req,
+ pageCurrent: pageCurrent + 1,
+ userList: mergedUserList
+ })
+ );
+ } else {
+ mergedUserList.sort((a, b) =>
+ a.order < b.order
+ ? -1
+ : a.order > b.order
+ ? 1
+ : a.name < b.name
+ ? -1
+ : a.name > b.name
+ ? 1
+ : 0
+ );
+
+ // 최종 조회건.
+ this.store.dispatch(
+ searchDeptUserSuccess({
+ userInfos: mergedUserList
+ })
+ );
+ }
+ break;
+ }
+ }),
+ catchError(error => of(deptUserFailure({ error })))
+ );
})
);
},
diff --git a/projects/ucap-webmessenger-ui-organization/src/lib/components/detail-table.component.html b/projects/ucap-webmessenger-ui-organization/src/lib/components/detail-table.component.html
index db74d489..b53a31f8 100644
--- a/projects/ucap-webmessenger-ui-organization/src/lib/components/detail-table.component.html
+++ b/projects/ucap-webmessenger-ui-organization/src/lib/components/detail-table.component.html
@@ -1,11 +1,13 @@
-
-