added protocol > QUERY
This commit is contained in:
parent
f88d16de8b
commit
5141de66c1
|
@ -0,0 +1,54 @@
|
|||
import {
|
||||
ProtocolRequest,
|
||||
ProtocolResponse,
|
||||
ProtocolEncoder,
|
||||
PacketBody,
|
||||
ProtocolDecoder,
|
||||
ProtocolMessage,
|
||||
PacketBodyValue
|
||||
} from '@ucap-webmessenger/protocol';
|
||||
import { CallMode } from '@ucap-webmessenger/core';
|
||||
|
||||
export interface DataUserExtRequest extends ProtocolRequest {
|
||||
// DivCD(s)
|
||||
divCd: string;
|
||||
// 사용자SEQ(n)
|
||||
seq: number;
|
||||
}
|
||||
export interface DataUserExtResponse extends ProtocolResponse {
|
||||
// DivCD(s)
|
||||
divCd: string;
|
||||
// 사용자SEQ(n)
|
||||
seq: number;
|
||||
// CallMode(s)
|
||||
callMode: CallMode;
|
||||
// HARDPHONE_SADN
|
||||
hardSadn: string;
|
||||
// FMC_SADN
|
||||
fmcSadn: string;
|
||||
}
|
||||
|
||||
export const encodeDataUserExt: ProtocolEncoder<DataUserExtRequest> = (
|
||||
req: DataUserExtRequest
|
||||
) => {
|
||||
const bodyList: PacketBody[] = [];
|
||||
|
||||
bodyList.push(
|
||||
{ type: PacketBodyValue.String, value: req.divCd },
|
||||
{ type: PacketBodyValue.Integer, value: req.seq }
|
||||
);
|
||||
|
||||
return bodyList;
|
||||
};
|
||||
|
||||
export const decodeDataUserExt: ProtocolDecoder<DataUserExtResponse> = (
|
||||
message: ProtocolMessage
|
||||
) => {
|
||||
return {
|
||||
divCd: message.bodyList[0],
|
||||
seq: message.bodyList[1],
|
||||
callMode: message.bodyList[2] as CallMode,
|
||||
hardSadn: message.bodyList[3],
|
||||
fmcSadn: message.bodyList[4]
|
||||
} as DataUserExtResponse;
|
||||
};
|
|
@ -0,0 +1,90 @@
|
|||
import {
|
||||
ProtocolRequest,
|
||||
ProtocolResponse,
|
||||
ProtocolEncoder,
|
||||
PacketBody,
|
||||
ProtocolDecoder,
|
||||
ProtocolMessage,
|
||||
PacketBodyValue,
|
||||
BodyStringDivider
|
||||
} from '@ucap-webmessenger/protocol';
|
||||
import { EmployeeType } from '@ucap-webmessenger/protocol-room';
|
||||
import { RoleCode } from '@ucap-webmessenger/protocol-authentication';
|
||||
import { UserInfoSS } from './dept-user';
|
||||
|
||||
export interface DataUserRequest extends ProtocolRequest {
|
||||
// DivCD(s)
|
||||
divCd: string;
|
||||
// 사용자SEQ(n)
|
||||
seq: number;
|
||||
// 발신자회사코드(s)
|
||||
senderCompanyCode: string;
|
||||
// 발신자임직원유형(s)
|
||||
senderEmployeeType: EmployeeType;
|
||||
}
|
||||
export interface DataUserResponse extends ProtocolResponse {
|
||||
// DivCD(s)
|
||||
divCd: string;
|
||||
// {사용자정보-SS}
|
||||
userInfo?: UserInfoSS;
|
||||
}
|
||||
|
||||
export const encodeDataUser: ProtocolEncoder<DataUserRequest> = (
|
||||
req: DataUserRequest
|
||||
) => {
|
||||
const bodyList: PacketBody[] = [];
|
||||
|
||||
bodyList.push(
|
||||
{ type: PacketBodyValue.String, value: req.divCd },
|
||||
{ type: PacketBodyValue.Integer, value: req.seq },
|
||||
{ type: PacketBodyValue.String, value: req.senderCompanyCode },
|
||||
{ type: PacketBodyValue.String, value: req.senderEmployeeType }
|
||||
);
|
||||
|
||||
return bodyList;
|
||||
};
|
||||
|
||||
export const decodeDataUser: ProtocolDecoder<DataUserResponse> = (
|
||||
message: ProtocolMessage
|
||||
) => {
|
||||
let userInfo: UserInfoSS;
|
||||
if (message.bodyList.length > 1) {
|
||||
const info = message.bodyList[1].split(BodyStringDivider);
|
||||
let i = 0;
|
||||
userInfo = {
|
||||
seq: info[i],
|
||||
name: info[i++],
|
||||
profileImageFile: info[i++],
|
||||
grade: info[i++],
|
||||
intro: info[i++],
|
||||
companyCode: info[i++],
|
||||
hpNumber: info[i++],
|
||||
lineNumber: info[i++],
|
||||
email: info[i++],
|
||||
isMobile: info[i++] === 'Y' ? true : false,
|
||||
deptName: info[i++],
|
||||
order: info[i++],
|
||||
isActive: info[i++] === 'Y' ? true : false,
|
||||
roleCd: info[i++] as RoleCode,
|
||||
employeeNum: info[i++],
|
||||
madn: info[i++],
|
||||
hardSadn: info[i++],
|
||||
fmcSadn: info[i++],
|
||||
callMode: info[i++],
|
||||
nameEn: info[i++],
|
||||
nameCn: info[i++],
|
||||
gradeEn: info[i++],
|
||||
gradeCn: info[i++],
|
||||
deptNameEn: info[i++],
|
||||
deptNameCn: info[i++],
|
||||
deptSeq: info[i++],
|
||||
isPrivacyAgree: info[i++] === 'Y' ? true : false,
|
||||
isValidLogin: info[i++] === 'Y' ? true : false,
|
||||
employeeType: info[i++] as EmployeeType
|
||||
};
|
||||
}
|
||||
return {
|
||||
divCd: message.bodyList[0],
|
||||
userInfo
|
||||
} as DataUserResponse;
|
||||
};
|
|
@ -9,16 +9,10 @@ import {
|
|||
BodyStringDivider,
|
||||
ProtocolStream
|
||||
} from '@ucap-webmessenger/protocol';
|
||||
import {
|
||||
DeviceType,
|
||||
FileTransferPermissions,
|
||||
OrganizationChartPermissions,
|
||||
DefaultScreen,
|
||||
VideoConferenceType
|
||||
} from '@ucap-webmessenger/core';
|
||||
import { DeptType, DeptSearchType } from '../types/dept.type';
|
||||
import { EmployeeType } from '@ucap-webmessenger/protocol-room';
|
||||
import { RoleCode } from '@ucap-webmessenger/protocol-authentication';
|
||||
import { DeptSearchType } from '../types/dept-search.type';
|
||||
import { CallMode } from '@ucap-webmessenger/core';
|
||||
|
||||
export interface DeptUserRequest extends ProtocolRequest {
|
||||
// DivCD(s)
|
||||
|
@ -79,7 +73,7 @@ export interface UserInfoSS {
|
|||
// FMC_SADN
|
||||
fmcSadn: string;
|
||||
// CALL_MODE
|
||||
callMode: string;
|
||||
callMode: CallMode;
|
||||
// 사용자명(영어)
|
||||
nameEn: string;
|
||||
// 사용자명(중국어)
|
||||
|
@ -168,7 +162,7 @@ export const decodeDeptUserData: ProtocolDecoder<DeptUserData> = (
|
|||
madn: info[i++],
|
||||
hardSadn: info[i++],
|
||||
fmcSadn: info[i++],
|
||||
callMode: info[i++],
|
||||
callMode: info[i++] as CallMode,
|
||||
nameEn: info[i++],
|
||||
nameCn: info[i++],
|
||||
gradeEn: info[i++],
|
||||
|
|
|
@ -0,0 +1,179 @@
|
|||
import {
|
||||
ProtocolRequest,
|
||||
ProtocolResponse,
|
||||
ProtocolEncoder,
|
||||
PacketBody,
|
||||
ProtocolDecoder,
|
||||
ProtocolMessage,
|
||||
PacketBodyValue,
|
||||
BodyStringDivider,
|
||||
ProtocolStream
|
||||
} from '@ucap-webmessenger/protocol';
|
||||
import { EmployeeType } from '@ucap-webmessenger/protocol-room';
|
||||
import { RoleCode } from '@ucap-webmessenger/protocol-authentication';
|
||||
import { UserDnSearchType } from '../types/user-dn-search.type';
|
||||
|
||||
export interface UserDnRequest extends ProtocolRequest {
|
||||
// DivCD(s)
|
||||
divCd: string;
|
||||
// 기관코드(s)
|
||||
companyCode: string;
|
||||
// 부서SEQ(n)
|
||||
seq?: number;
|
||||
// 검색string(s)
|
||||
search?: string;
|
||||
// 검색구분(s)
|
||||
searchType: UserDnSearchType;
|
||||
// 요청리스트(n) 사용안하면 0 최대 200
|
||||
pageListCount?: number;
|
||||
// 요청페이지(n) 사용안하면 0 처음은 1
|
||||
pageCurrent?: number;
|
||||
// 발신자회사코드(s)
|
||||
senderCompanyCode: string;
|
||||
// 발신자임직원유형(s)
|
||||
senderEmployeeType: EmployeeType;
|
||||
}
|
||||
|
||||
export interface UserInfoDN {
|
||||
// 사용자SEQ
|
||||
seq: number;
|
||||
// 사용자명
|
||||
name: string;
|
||||
// 사진파일
|
||||
profileImageFile: string;
|
||||
// 직급
|
||||
grade: string;
|
||||
// 업무소개
|
||||
intro: string;
|
||||
// 기관코드
|
||||
companyCode: string;
|
||||
// 핸드폰번호
|
||||
hpNumber: string;
|
||||
// 내선번호
|
||||
lineNumber: string;
|
||||
// 이메일
|
||||
email: string;
|
||||
// 모바일YN
|
||||
isMobile: boolean;
|
||||
// 조회순서
|
||||
order: string;
|
||||
// ActiveYN
|
||||
isActive: boolean;
|
||||
// 역할코드
|
||||
roleCd: RoleCode;
|
||||
// 사번
|
||||
employeeNum: string;
|
||||
// 부서명
|
||||
deptName: string;
|
||||
// MADN
|
||||
madn: string;
|
||||
// HARDPHONE_SADN
|
||||
hardSadn: string;
|
||||
// FMC_SADN
|
||||
fmcSadn: string;
|
||||
// 사용자명(영어)
|
||||
nameEn: string;
|
||||
// 사용자명(중국어)
|
||||
nameCn: string;
|
||||
// 직급(영어)
|
||||
gradeEn: string;
|
||||
// 직급(중국어)
|
||||
gradeCn: string;
|
||||
// 부서명(영어)
|
||||
deptNameEn: string;
|
||||
// 부서명(중국어)
|
||||
deptNameCn: string;
|
||||
}
|
||||
export interface UserDnData extends ProtocolStream {
|
||||
// DivCD(s)
|
||||
divCd: string;
|
||||
// {부서정보-S}...
|
||||
userDnInfos: UserInfoDN[];
|
||||
}
|
||||
export interface UserDnResponse extends ProtocolResponse {
|
||||
// DivCD(s)
|
||||
divCd: string;
|
||||
// 전체갯수(n)
|
||||
pageTotalCount: number;
|
||||
// 요청리스트(n)
|
||||
pageListCount?: number;
|
||||
// 페이지(n)
|
||||
pageCurrent?: number;
|
||||
}
|
||||
|
||||
export const encodeUserDn: ProtocolEncoder<UserDnRequest> = (
|
||||
req: UserDnRequest
|
||||
) => {
|
||||
const bodyList: PacketBody[] = [];
|
||||
|
||||
bodyList.push(
|
||||
{ type: PacketBodyValue.String, value: req.divCd },
|
||||
{ type: PacketBodyValue.String, value: req.companyCode },
|
||||
{ type: PacketBodyValue.Integer, value: req.seq || 0 },
|
||||
{ type: PacketBodyValue.String, value: req.search || '' },
|
||||
{ type: PacketBodyValue.String, value: req.searchType },
|
||||
{
|
||||
type: PacketBodyValue.Integer,
|
||||
value: req.pageListCount || 0
|
||||
},
|
||||
{ type: PacketBodyValue.Integer, value: req.pageCurrent || 0 },
|
||||
{ type: PacketBodyValue.String, value: req.senderCompanyCode },
|
||||
{
|
||||
type: PacketBodyValue.String,
|
||||
value: req.senderEmployeeType
|
||||
}
|
||||
);
|
||||
|
||||
return bodyList;
|
||||
};
|
||||
|
||||
export const decodeUserDnData: ProtocolDecoder<UserDnData> = (
|
||||
message: ProtocolMessage
|
||||
) => {
|
||||
const userDnInfos: UserInfoDN[] = [];
|
||||
message.bodyList.slice(1).forEach(userDnInfo => {
|
||||
const info = userDnInfo.split(BodyStringDivider);
|
||||
let i = 0;
|
||||
userDnInfos.push({
|
||||
seq: info[i],
|
||||
name: info[i++],
|
||||
profileImageFile: info[i++],
|
||||
grade: info[i++],
|
||||
intro: info[i++],
|
||||
companyCode: info[i++],
|
||||
hpNumber: info[i++],
|
||||
lineNumber: info[i++],
|
||||
email: info[i++],
|
||||
isMobile: info[i++] === 'Y' ? true : false,
|
||||
order: info[i++],
|
||||
isActive: info[i++] === 'Y' ? true : false,
|
||||
roleCd: info[i++] as RoleCode,
|
||||
employeeNum: info[i++],
|
||||
deptName: info[i++],
|
||||
madn: info[i++],
|
||||
hardSadn: info[i++],
|
||||
fmcSadn: info[i++],
|
||||
nameEn: info[i++],
|
||||
nameCn: info[i++],
|
||||
gradeEn: info[i++],
|
||||
gradeCn: info[i++],
|
||||
deptNameEn: info[i++],
|
||||
deptNameCn: info[i++]
|
||||
});
|
||||
});
|
||||
return {
|
||||
divCd: message.bodyList[0],
|
||||
userDnInfos
|
||||
} as UserDnData;
|
||||
};
|
||||
|
||||
export const decodeUserDn: ProtocolDecoder<UserDnResponse> = (
|
||||
message: ProtocolMessage
|
||||
) => {
|
||||
return {
|
||||
divCd: message.bodyList[0],
|
||||
pageTotalCount: message.bodyList[1],
|
||||
pageListCount: message.bodyList[2],
|
||||
pageCurrent: message.bodyList[3]
|
||||
} as UserDnResponse;
|
||||
};
|
|
@ -0,0 +1,83 @@
|
|||
import {
|
||||
ProtocolRequest,
|
||||
ProtocolResponse,
|
||||
ProtocolEncoder,
|
||||
PacketBody,
|
||||
ProtocolDecoder,
|
||||
ProtocolMessage,
|
||||
PacketBodyValue,
|
||||
BodyStringDivider,
|
||||
ProtocolStream
|
||||
} from '@ucap-webmessenger/protocol';
|
||||
import { EmployeeType } from '@ucap-webmessenger/protocol-room';
|
||||
|
||||
export interface UserIdRequest extends ProtocolRequest {
|
||||
// DivCD(s)
|
||||
divCd: string;
|
||||
// 사용자SEQs(s)
|
||||
loginSeqs: number[];
|
||||
// 발신자회사코드(s)
|
||||
senderCompanyCode: string;
|
||||
// 발신자임직원유형(s)
|
||||
senderEmployeeType: EmployeeType;
|
||||
}
|
||||
export interface UserSeqInfo {
|
||||
// 로그인ID
|
||||
id: string;
|
||||
// 사용자SEQ
|
||||
seq: number;
|
||||
// 모바일YN
|
||||
isMobile: boolean;
|
||||
// 회사코드
|
||||
companyCode: string;
|
||||
}
|
||||
export interface UserIdData extends ProtocolStream {
|
||||
// DivCD(s)
|
||||
divCd: string;
|
||||
// {SEQ정보}1...
|
||||
userSeqInfos: UserSeqInfo[];
|
||||
}
|
||||
export interface UserIdResponse extends ProtocolResponse {
|
||||
// DivCD(s)
|
||||
divCd: string;
|
||||
}
|
||||
|
||||
export const encodeUserId: ProtocolEncoder<UserIdRequest> = (
|
||||
req: UserIdRequest
|
||||
) => {
|
||||
const bodyList: PacketBody[] = [];
|
||||
|
||||
bodyList.push(
|
||||
{ type: PacketBodyValue.String, value: req.divCd },
|
||||
{ type: PacketBodyValue.Integer, value: req.loginSeqs.join(',') },
|
||||
{ type: PacketBodyValue.String, value: req.senderCompanyCode },
|
||||
{ type: PacketBodyValue.String, value: req.senderEmployeeType }
|
||||
);
|
||||
|
||||
return bodyList;
|
||||
};
|
||||
|
||||
export const decodeUserIdData: ProtocolDecoder<UserIdData> = (
|
||||
message: ProtocolMessage
|
||||
) => {
|
||||
const userSeqInfos: UserSeqInfo[] = [];
|
||||
message.bodyList.slice(1).forEach(userInfo => {
|
||||
const info = userInfo.split(BodyStringDivider);
|
||||
userSeqInfos.push({
|
||||
id: info[0],
|
||||
seq: info[1],
|
||||
isMobile: info[2] === 'Y' ? true : false,
|
||||
companyCode: info[3]
|
||||
});
|
||||
});
|
||||
return {
|
||||
divCd: message.bodyList[0],
|
||||
userSeqInfos
|
||||
} as UserIdData;
|
||||
};
|
||||
|
||||
export const decodeUserId: ProtocolDecoder<UserIdResponse> = (
|
||||
message: ProtocolMessage
|
||||
) => {
|
||||
return { divCd: message.bodyList[0] } as UserIdResponse;
|
||||
};
|
|
@ -0,0 +1,218 @@
|
|||
import {
|
||||
ProtocolRequest,
|
||||
ProtocolEncoder,
|
||||
PacketBody,
|
||||
ProtocolDecoder,
|
||||
ProtocolMessage,
|
||||
PacketBodyValue,
|
||||
BodyStringDivider,
|
||||
ProtocolStream
|
||||
} from '@ucap-webmessenger/protocol';
|
||||
import { EmployeeType } from '@ucap-webmessenger/protocol-room';
|
||||
import { RoleCode } from '@ucap-webmessenger/protocol-authentication';
|
||||
import { UserInfoSS } from './dept-user';
|
||||
|
||||
export interface UserSeqRequest extends ProtocolRequest {
|
||||
// DivCD(s)
|
||||
divCd: string;
|
||||
// 로그인IDs(s)
|
||||
loginIds: string[];
|
||||
// 기관코드(s)
|
||||
companyCode: string;
|
||||
// 상세정보여부(s)
|
||||
isDetail: boolean;
|
||||
// 발신자회사코드(s)
|
||||
senderCompanyCode: string;
|
||||
// 발신자임직원유형(s)
|
||||
senderEmployeeType: EmployeeType;
|
||||
}
|
||||
export interface UserInfoF {
|
||||
// 사용자SEQ
|
||||
seq: number;
|
||||
// 사용자명
|
||||
name: string;
|
||||
// 사진파일
|
||||
profileImageFile: string;
|
||||
// 직급
|
||||
grade: string;
|
||||
// 업무소개
|
||||
intro: string;
|
||||
// 기관코드
|
||||
companyCode: string;
|
||||
// 핸드폰번호
|
||||
hpNumber: string;
|
||||
// 내선번호
|
||||
lineNumber: string;
|
||||
// 이메일
|
||||
email: string;
|
||||
// 모바일YN
|
||||
isMobile: boolean;
|
||||
// 부서명
|
||||
deptName: string;
|
||||
// 즐.찾 여부
|
||||
isFavorit: boolean;
|
||||
// 친구여부
|
||||
isBuddy: boolean;
|
||||
// ActiveYN
|
||||
isActive: boolean;
|
||||
// 역할코드
|
||||
roleCd: RoleCode;
|
||||
// 사번
|
||||
employeeNum: string;
|
||||
// MADN
|
||||
madn: string;
|
||||
// HARDPHONE_SADN
|
||||
hardSadn: string;
|
||||
// FMC_SADN
|
||||
fmcSadn: string;
|
||||
// 사용자명(영어)
|
||||
nameEn: string;
|
||||
// 사용자명(중국어)
|
||||
nameCn: string;
|
||||
// 직급(영어)
|
||||
gradeEn: string;
|
||||
// 직급(중국어)
|
||||
gradeCn: string;
|
||||
// 부서명(영어)
|
||||
deptNameEn: string;
|
||||
// 부서명(중국어)
|
||||
deptNameCn: string;
|
||||
// 이용약관동의여부YN
|
||||
isPrivacyAgree: boolean;
|
||||
// 유효접속여부YN
|
||||
isValidLogin: boolean;
|
||||
// 임직원유형(s)
|
||||
employeeType: EmployeeType;
|
||||
// 별명
|
||||
nickName: string;
|
||||
}
|
||||
export interface UserSeqData extends ProtocolStream {
|
||||
// DivCD(s)
|
||||
divCd: string;
|
||||
// {사용자정보-F}...
|
||||
userInfos: UserInfoF[];
|
||||
}
|
||||
export interface UserSeqData2 extends ProtocolStream {
|
||||
// DivCD(s)
|
||||
divCd: string;
|
||||
// {사용자정보-SS}...
|
||||
userInfos: UserInfoSS[];
|
||||
}
|
||||
|
||||
export const encodeUserSeq: ProtocolEncoder<UserSeqRequest> = (
|
||||
req: UserSeqRequest
|
||||
) => {
|
||||
const bodyList: PacketBody[] = [];
|
||||
|
||||
bodyList.push(
|
||||
{ type: PacketBodyValue.String, value: req.divCd },
|
||||
{ type: PacketBodyValue.String, value: req.loginIds.join(',') },
|
||||
{ type: PacketBodyValue.String, value: req.companyCode },
|
||||
{ type: PacketBodyValue.String, value: req.isDetail ? 'Y' : 'N' },
|
||||
{ type: PacketBodyValue.String, value: req.senderCompanyCode },
|
||||
{ type: PacketBodyValue.String, value: req.senderEmployeeType }
|
||||
);
|
||||
|
||||
return bodyList;
|
||||
};
|
||||
|
||||
export const decodeUserSeqData: ProtocolDecoder<UserSeqData> = (
|
||||
message: ProtocolMessage
|
||||
) => {
|
||||
const userInfos: UserInfoF[] = [];
|
||||
message.bodyList.slice(1).forEach(userInfo => {
|
||||
const info = userInfo.split(BodyStringDivider);
|
||||
let i = 0;
|
||||
userInfos.push({
|
||||
seq: info[i],
|
||||
name: info[i++],
|
||||
profileImageFile: info[i++],
|
||||
grade: info[i++],
|
||||
intro: info[i++],
|
||||
companyCode: info[i++],
|
||||
hpNumber: info[i++],
|
||||
lineNumber: info[i++],
|
||||
email: info[i++],
|
||||
isMobile: info[i++] === 'Y' ? true : false,
|
||||
deptName: info[i++],
|
||||
isFavorit: info[i++] === 'Y' ? true : false,
|
||||
isBuddy: info[i++] === 'Y' ? true : false,
|
||||
isActive: info[i++] === 'Y' ? true : false,
|
||||
roleCd: info[i++] as RoleCode,
|
||||
employeeNum: info[i++],
|
||||
madn: info[i++],
|
||||
hardSadn: info[i++],
|
||||
fmcSadn: info[i++],
|
||||
nameEn: info[i++],
|
||||
nameCn: info[i++],
|
||||
gradeEn: info[i++],
|
||||
gradeCn: info[i++],
|
||||
deptNameEn: info[i++],
|
||||
deptNameCn: info[i++],
|
||||
isPrivacyAgree: info[i++] === 'Y' ? true : false,
|
||||
isValidLogin: info[i++] === 'Y' ? true : false,
|
||||
employeeType: info[i++] as EmployeeType,
|
||||
nickName: info[i++]
|
||||
} as UserInfoF);
|
||||
});
|
||||
return {
|
||||
divCd: message.bodyList[0],
|
||||
userInfos
|
||||
} as UserSeqData;
|
||||
};
|
||||
|
||||
export const decodeUserSeqData2: ProtocolDecoder<UserSeqData2> = (
|
||||
message: ProtocolMessage
|
||||
) => {
|
||||
const userInfos: UserInfoSS[] = [];
|
||||
message.bodyList.slice(1).forEach(userInfo => {
|
||||
const info = userInfo.split(BodyStringDivider);
|
||||
let i = 0;
|
||||
userInfos.push({
|
||||
seq: info[i],
|
||||
name: info[i++],
|
||||
profileImageFile: info[i++],
|
||||
grade: info[i++],
|
||||
intro: info[i++],
|
||||
companyCode: info[i++],
|
||||
hpNumber: info[i++],
|
||||
lineNumber: info[i++],
|
||||
email: info[i++],
|
||||
isMobile: info[i++] === 'Y' ? true : false,
|
||||
deptName: info[i++],
|
||||
order: info[i++],
|
||||
isActive: info[i++] === 'Y' ? true : false,
|
||||
roleCd: info[i++] as RoleCode,
|
||||
employeeNum: info[i++],
|
||||
madn: info[i++],
|
||||
hardSadn: info[i++],
|
||||
fmcSadn: info[i++],
|
||||
callMode: info[i++],
|
||||
nameEn: info[i++],
|
||||
nameCn: info[i++],
|
||||
gradeEn: info[i++],
|
||||
gradeCn: info[i++],
|
||||
deptNameEn: info[i++],
|
||||
deptNameCn: info[i++],
|
||||
deptSeq: info[i++],
|
||||
isPrivacyAgree: info[i++] === 'Y' ? true : false,
|
||||
isValidLogin: info[i++] === 'Y' ? true : false,
|
||||
employeeType: info[i++] as EmployeeType
|
||||
});
|
||||
});
|
||||
return {
|
||||
divCd: message.bodyList[0],
|
||||
userInfos
|
||||
} as UserSeqData2;
|
||||
};
|
||||
|
||||
// export const decodeDeptUser: ProtocolDecoder<DeptUserResponse> = (
|
||||
// message: ProtocolMessage
|
||||
// ) => {
|
||||
// return {
|
||||
// divCd: message.bodyList[0],
|
||||
// pageTotalCount: message.bodyList[1],
|
||||
// pageListCount: message.bodyList[2],
|
||||
// pageCurrent: message.bodyList[3]
|
||||
// } as DeptUserResponse;
|
||||
// };
|
|
@ -16,7 +16,22 @@ import {
|
|||
SSVC_TYPE_QUERY_DEPT_DATA,
|
||||
SSVC_TYPE_QUERY_DEPT_USER_RES,
|
||||
SSVC_TYPE_QUERY_DEPT_USER_DATA,
|
||||
SSVC_TYPE_QUERY_DEPT_USER_REQ
|
||||
SSVC_TYPE_QUERY_DEPT_USER_REQ,
|
||||
SSVC_TYPE_QUERY_USER_SEQ_REQ,
|
||||
SSVC_TYPE_QUERY_USER_SEQ_RES,
|
||||
SSVC_TYPE_QUERY_USER_SEQ_DATA,
|
||||
SSVC_TYPE_QUERY_USER_SEQ_DATA2,
|
||||
SSVC_TYPE_QUERY_USER_ID_REQ,
|
||||
SSVC_TYPE_QUERY_USER_ID_RES,
|
||||
SSVC_TYPE_QUERY_USER_ID_DATA,
|
||||
SSVC_TYPE_QUERY_USER_BY_DN_REQ,
|
||||
SSVC_TYPE_QUERY_USER_BY_DN_RES,
|
||||
SSVC_TYPE_QUERY_USER_BY_DN_DATA,
|
||||
SSVC_TYPE_QUERY_DATA_USER_REQ,
|
||||
SSVC_TYPE_QUERY_EXT_DATA_USER_REQ,
|
||||
SSVC_TYPE_QUERY_DEPT_USER2_REQ,
|
||||
SSVC_TYPE_QUERY_DEPT_USER2_DATA,
|
||||
SSVC_TYPE_QUERY_DEPT_USER2_RES
|
||||
} from '../types/service';
|
||||
import {
|
||||
DeptRequest,
|
||||
|
@ -34,6 +49,42 @@ import {
|
|||
DeptUserData,
|
||||
DeptUserResponse
|
||||
} from '../models/dept-user';
|
||||
import {
|
||||
UserSeqData,
|
||||
UserSeqData2,
|
||||
encodeUserSeq,
|
||||
decodeUserSeqData,
|
||||
decodeUserSeqData2,
|
||||
UserSeqRequest
|
||||
} from '../models/user-seq';
|
||||
import {
|
||||
UserIdRequest,
|
||||
UserIdResponse,
|
||||
UserIdData,
|
||||
encodeUserId,
|
||||
decodeUserId,
|
||||
decodeUserIdData
|
||||
} from '../models/user-id';
|
||||
import {
|
||||
UserDnRequest,
|
||||
UserDnResponse,
|
||||
UserDnData,
|
||||
encodeUserDn,
|
||||
decodeUserDnData,
|
||||
decodeUserDn
|
||||
} from '../models/user-dn';
|
||||
import {
|
||||
DataUserRequest,
|
||||
DataUserResponse,
|
||||
encodeDataUser,
|
||||
decodeDataUser
|
||||
} from '../models/data-user';
|
||||
import {
|
||||
DataUserExtRequest,
|
||||
DataUserExtResponse,
|
||||
encodeDataUserExt,
|
||||
decodeDataUserExt
|
||||
} from '../models/data-user-ext';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
|
@ -93,4 +144,140 @@ export class QueryProtocolService {
|
|||
})
|
||||
);
|
||||
}
|
||||
public deptUser2(
|
||||
req: DeptUserRequest
|
||||
): Observable<DeptUserResponse | DeptUserData> {
|
||||
return this.protocolService
|
||||
.call(
|
||||
SVC_TYPE_QUERY_DATA,
|
||||
SSVC_TYPE_QUERY_DEPT_USER2_REQ,
|
||||
...encodeDeptUser(req)
|
||||
)
|
||||
.pipe(
|
||||
takeWhile(
|
||||
res => SSVC_TYPE_QUERY_DEPT_USER2_RES !== res.subServiceType,
|
||||
true
|
||||
),
|
||||
map(res => {
|
||||
if (SSVC_TYPE_QUERY_DEPT_USER2_DATA === res.subServiceType) {
|
||||
return {
|
||||
...decodeDeptUserData(res),
|
||||
Type: SSVC_TYPE_QUERY_DEPT_USER2_DATA
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
...decodeDeptUser(res),
|
||||
Type: SSVC_TYPE_QUERY_DEPT_USER2_RES
|
||||
};
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
public userSeq(req: UserSeqRequest): Observable<UserSeqData | UserSeqData2> {
|
||||
return this.protocolService
|
||||
.call(
|
||||
SVC_TYPE_QUERY_DATA,
|
||||
SSVC_TYPE_QUERY_USER_SEQ_REQ,
|
||||
...encodeUserSeq(req)
|
||||
)
|
||||
.pipe(
|
||||
takeWhile(
|
||||
res => SSVC_TYPE_QUERY_USER_SEQ_RES !== res.subServiceType,
|
||||
true
|
||||
),
|
||||
map(res => {
|
||||
if (SSVC_TYPE_QUERY_USER_SEQ_DATA === res.subServiceType) {
|
||||
return {
|
||||
...decodeUserSeqData(res),
|
||||
Type: SSVC_TYPE_QUERY_USER_SEQ_DATA
|
||||
};
|
||||
} else if (SSVC_TYPE_QUERY_USER_SEQ_DATA2 === res.subServiceType) {
|
||||
return {
|
||||
...decodeUserSeqData2(res),
|
||||
Type: SSVC_TYPE_QUERY_USER_SEQ_DATA2
|
||||
};
|
||||
}
|
||||
})
|
||||
);
|
||||
}
|
||||
public userId(req: UserIdRequest): Observable<UserIdResponse | UserIdData> {
|
||||
return this.protocolService
|
||||
.call(
|
||||
SVC_TYPE_QUERY_DATA,
|
||||
SSVC_TYPE_QUERY_USER_ID_REQ,
|
||||
...encodeUserId(req)
|
||||
)
|
||||
.pipe(
|
||||
takeWhile(
|
||||
res => SSVC_TYPE_QUERY_USER_ID_RES !== res.subServiceType,
|
||||
true
|
||||
),
|
||||
map(res => {
|
||||
if (SSVC_TYPE_QUERY_USER_ID_DATA === res.subServiceType) {
|
||||
return {
|
||||
...decodeUserIdData(res),
|
||||
Type: SSVC_TYPE_QUERY_USER_SEQ_DATA
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
...decodeUserId(res),
|
||||
Type: SSVC_TYPE_QUERY_USER_ID_RES
|
||||
};
|
||||
})
|
||||
);
|
||||
}
|
||||
public userDn(req: UserDnRequest): Observable<UserDnResponse | UserDnData> {
|
||||
return this.protocolService
|
||||
.call(
|
||||
SVC_TYPE_QUERY_DATA,
|
||||
SSVC_TYPE_QUERY_USER_BY_DN_REQ,
|
||||
...encodeUserDn(req)
|
||||
)
|
||||
.pipe(
|
||||
takeWhile(
|
||||
res => SSVC_TYPE_QUERY_USER_BY_DN_RES !== res.subServiceType,
|
||||
true
|
||||
),
|
||||
map(res => {
|
||||
if (SSVC_TYPE_QUERY_USER_BY_DN_DATA === res.subServiceType) {
|
||||
return {
|
||||
...decodeUserDnData(res),
|
||||
Type: SSVC_TYPE_QUERY_USER_BY_DN_DATA
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
...decodeUserDn(res),
|
||||
Type: SSVC_TYPE_QUERY_USER_BY_DN_RES
|
||||
};
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
public dataUser(req: DataUserRequest): Observable<DataUserResponse> {
|
||||
return this.protocolService
|
||||
.call(
|
||||
SVC_TYPE_QUERY_DATA,
|
||||
SSVC_TYPE_QUERY_DATA_USER_REQ,
|
||||
...encodeDataUser(req)
|
||||
)
|
||||
.pipe(
|
||||
take(1),
|
||||
map(res => decodeDataUser(res))
|
||||
);
|
||||
}
|
||||
public dataUserExt(req: DataUserExtRequest): Observable<DataUserExtResponse> {
|
||||
return this.protocolService
|
||||
.call(
|
||||
SVC_TYPE_QUERY_DATA,
|
||||
SSVC_TYPE_QUERY_EXT_DATA_USER_REQ,
|
||||
...encodeDataUserExt(req)
|
||||
)
|
||||
.pipe(
|
||||
take(1),
|
||||
map(res => decodeDataUserExt(res))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
export enum DeptSearchType {
|
||||
// A: 부서, 인원
|
||||
All = 'A',
|
||||
// U: 인원
|
||||
User = 'U',
|
||||
// D: 부서
|
||||
Department = 'D',
|
||||
// M: 다중부서 cf) 여러 부서(하위전체)를 쿼리할 때 1, 2, 3, 4..이렇게 부서SEQ들을, 로 연결해서 보냄 (검색string 필드를 사용함)
|
||||
MultiDepartment = 'M'
|
||||
}
|
|
@ -6,14 +6,3 @@ export enum DeptType {
|
|||
// T: 부서
|
||||
Team = 'T'
|
||||
}
|
||||
|
||||
export enum DeptSearchType {
|
||||
// A: 부서, 인원
|
||||
All = 'A',
|
||||
// U: 인원
|
||||
User = 'U',
|
||||
// D: 부서
|
||||
Department = 'D',
|
||||
// M: 다중부서 cf) 여러 부서(하위전체)를 쿼리할 때 1, 2, 3, 4..이렇게 부서SEQ들을, 로 연결해서 보냄 (검색string 필드를 사용함)
|
||||
MultiDepartment = 'M'
|
||||
}
|
||||
|
|
|
@ -8,8 +8,11 @@ export const SSVC_TYPE_QUERY_DEPT_REQ = 11; // 부서 정보 쿼리 요청
|
|||
export const SSVC_TYPE_QUERY_DEPT_DATA = 12; //
|
||||
export const SSVC_TYPE_QUERY_DEPT_RES = 13; //
|
||||
export const SSVC_TYPE_QUERY_DEPT_USER_REQ = 14; // 사용자 검색 쿼리 요청
|
||||
export const SSVC_TYPE_QUERY_DEPT_USER_DATA = 15; //
|
||||
export const SSVC_TYPE_QUERY_DEPT_USER_RES = 16; //
|
||||
export const SSVC_TYPE_QUERY_DEPT_USER_DATA = 15;
|
||||
export const SSVC_TYPE_QUERY_DEPT_USER_RES = 16;
|
||||
export const SSVC_TYPE_QUERY_DEPT_USER2_REQ = 54; // 사용자 검색 쿼리 요청2 (부서 LIKE 검색)
|
||||
export const SSVC_TYPE_QUERY_DEPT_USER2_DATA = 55;
|
||||
export const SSVC_TYPE_QUERY_DEPT_USER2_RES = 56;
|
||||
export const SSVC_TYPE_QUERY_TEAM_CONTACT_USER_REQ = 17; // 공용 주소록 검색 쿼리 요청
|
||||
export const SSVC_TYPE_QUERY_TEAM_CONTACT_USER_DATA = 18; //
|
||||
export const SSVC_TYPE_QUERY_TEAM_CONTACT_USER_RES = 19; //
|
||||
|
@ -25,10 +28,10 @@ export const SSVC_TYPE_QUERY_USER_BY_DN_DATA = 32; //
|
|||
export const SSVC_TYPE_QUERY_USER_BY_DN_RES = 33; // 사용자 정보 검색 응답(DN으로)
|
||||
export const SSVC_TYPE_QUERY_MY_GROUP_REQ = 41; // 정렬된 그룹 SEQs 정보 요청
|
||||
export const SSVC_TYPE_QUERY_MY_GROUP_RES = 42; // 정렬된 그룹 SEQs 정보 응답
|
||||
export const SSVC_TYPE_QUERY_CONFIRM_USER_REQ = 51; // 사용자 확인 요청
|
||||
export const SSVC_TYPE_QUERY_CONFIRM_USER_RES = 52; // 사용자 확인 응답
|
||||
export const SSVC_TYPE_QUERY_MY_GROUP_REQ2 = 43; // 정렬된 그룹 SEQs 정보 요청
|
||||
export const SSVC_TYPE_QUERY_MY_GROUP_RES2 = 44; // 정렬된 그룹 SEQs 정보 응답
|
||||
export const SSVC_TYPE_QUERY_AUTH_REQ = 91; // 사용자 권한 정보 요청
|
||||
export const SSVC_TYPE_QUERY_AUTH_RES = 92; // 사용자 권한 정보 응답
|
||||
export const SSVC_TYPE_QUERY_CONTACT_VCARD_REQ = 101; // 명함주소록(거래처) 검색 요청
|
||||
export const SSVC_TYPE_QUERY_CONTACT_VCARD_DATA = 102; // 명함주소록(거래처) 데이터
|
||||
export const SSVC_TYPE_QUERY_CONTACT_VCARD_RES = 103; // 명함주소록(거래처) 검색 요청 응답
|
||||
export const SSVC_TYPE_QUERY_VALID_USER_REQ = 93;
|
||||
export const SSVC_TYPE_QUERY_VALID_USER_DATA = 94;
|
||||
export const SSVC_TYPE_QUERY_VALID_USER_RES = 95;
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
export enum UserDnSearchType {
|
||||
// D: 전화번호검색(HP_NUMBER, HARDPHONE_SADN, FMC_SADN)
|
||||
Number = 'D',
|
||||
// C: 이름검색(사용자명, 부서명)
|
||||
Character = 'C'
|
||||
}
|
|
@ -3,12 +3,19 @@
|
|||
*/
|
||||
|
||||
export * from './lib/models/auth';
|
||||
export * from './lib/models/dept';
|
||||
export * from './lib/models/data-user-ext';
|
||||
export * from './lib/models/data-user';
|
||||
export * from './lib/models/dept-user';
|
||||
export * from './lib/models/dept';
|
||||
export * from './lib/models/user-dn';
|
||||
export * from './lib/models/user-id';
|
||||
export * from './lib/models/user-seq';
|
||||
|
||||
export * from './lib/services/query-protocol.service';
|
||||
|
||||
export * from './lib/types/dept-search.type';
|
||||
export * from './lib/types/dept.type';
|
||||
export * from './lib/types/service';
|
||||
export * from './lib/types/user-dn-search.type';
|
||||
|
||||
export * from './lib/ucap-query-protocol.module';
|
||||
|
|
Loading…
Reference in New Issue
Block a user