From 35f868c25c05139903ef5b33ab1b638ae17f9886 Mon Sep 17 00:00:00 2001 From: leejinho Date: Fri, 3 Jan 2020 09:08:47 +0900 Subject: [PATCH] =?UTF-8?q?[=EB=8C=80=EC=83=81=ED=96=A5]=20=EC=97=85?= =?UTF-8?q?=EB=AC=B4=EC=83=81=ED=83=9C=20=ED=91=9C=EC=8B=9C=EB=A5=BC=20?= =?UTF-8?q?=EC=9C=84=ED=95=9C=20=EB=8D=B0=EC=9D=B4=ED=84=B0=20=EC=84=A0?= =?UTF-8?q?=EC=9E=91=EC=97=85=20>=3F=20=EB=94=94=EC=9E=90=EC=9D=B8=20?= =?UTF-8?q?=EC=99=84=EB=A3=8C=EB=90=98=EB=A9=B4=20=EB=A7=88=EC=A0=80=20?= =?UTF-8?q?=EC=9E=91=EC=97=85=ED=95=84=EC=9A=94.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/template.page.component.ts | 4 +- .../src/lib/protocols/data-user.ts | 3 +- .../src/lib/models/user-info-ss.ts | 3 +- .../src/lib/models/status-bulk-info.ts | 4 ++ .../src/lib/models/status-info.ts | 20 +++++---- .../src/lib/protocols/bulk-info.ts | 4 +- .../src/lib/protocols/status.ts | 4 +- .../src/lib/types/work-status.type.ts | 41 +++++++++++++++++++ .../src/lib/components/profile.component.ts | 21 +++++----- 9 files changed, 81 insertions(+), 23 deletions(-) create mode 100644 projects/ucap-webmessenger-protocol-status/src/lib/types/work-status.type.ts diff --git a/projects/ucap-webmessenger-app/src/app/pages/template/components/template.page.component.ts b/projects/ucap-webmessenger-app/src/app/pages/template/components/template.page.component.ts index cb25ae6e..f07a9226 100644 --- a/projects/ucap-webmessenger-app/src/app/pages/template/components/template.page.component.ts +++ b/projects/ucap-webmessenger-app/src/app/pages/template/components/template.page.component.ts @@ -17,6 +17,7 @@ import { EventType, Info, EventJson } from '@ucap-webmessenger/protocol-event'; import { VersionInfo2Response } from '@ucap-webmessenger/api-public'; import { StatusCode as ApiStatusCode } from '@ucap-webmessenger/api'; import { StatusCode } from '@ucap-webmessenger/core'; +import { WorkStatusType } from 'projects/ucap-webmessenger-protocol-status/src/lib/types/work-status.type'; @Component({ selector: 'app-template.page', @@ -73,7 +74,8 @@ export const status: StatusBulkInfo = { // 단말상태정보(s) terminalStatus: TerminalStatusInfo.Idle, // 단말상태번호(n) - terminalStatusNumber: TerminalStatusNumber.Idle + terminalStatusNumber: TerminalStatusNumber.Idle, + workstatus: WorkStatusType.Work }; export const buddyData: UserInfo = { seq: 15, diff --git a/projects/ucap-webmessenger-daesang/src/lib/protocols/data-user.ts b/projects/ucap-webmessenger-daesang/src/lib/protocols/data-user.ts index 87b1febb..dfd487b3 100644 --- a/projects/ucap-webmessenger-daesang/src/lib/protocols/data-user.ts +++ b/projects/ucap-webmessenger-daesang/src/lib/protocols/data-user.ts @@ -11,6 +11,7 @@ import { UserInfoSS, DataUserResponse } from '@ucap-webmessenger/protocol-query'; +import { WorkStatusType } from 'projects/ucap-webmessenger-protocol-status/src/lib/types/work-status.type'; // export interface UserInfoSSForDaesang extends UserInfoSS { // /****** For daesang ******/ @@ -69,7 +70,7 @@ export const decodeDataUser: ProtocolDecoder = ( // [daesang] companyName: info[29], responsibilities: info[30], - workstatus: info[31], + workstatus: info[31] as WorkStatusType, job: info[32], customerInfo: info[33], workplace: info[34] diff --git a/projects/ucap-webmessenger-protocol-query/src/lib/models/user-info-ss.ts b/projects/ucap-webmessenger-protocol-query/src/lib/models/user-info-ss.ts index da6d1a4f..0554c9c9 100644 --- a/projects/ucap-webmessenger-protocol-query/src/lib/models/user-info-ss.ts +++ b/projects/ucap-webmessenger-protocol-query/src/lib/models/user-info-ss.ts @@ -1,6 +1,7 @@ import { RoleCode } from '@ucap-webmessenger/protocol-authentication'; import { CallMode } from '@ucap-webmessenger/core'; import { EmployeeType } from '@ucap-webmessenger/protocol-room'; +import { WorkStatusType } from 'projects/ucap-webmessenger-protocol-status/src/lib/types/work-status.type'; export interface UserInfoSS { /** 사용자SEQ */ @@ -67,7 +68,7 @@ export interface UserInfoSS { /** 담당업무 */ responsibilities?: string; /** 업무 상태 */ - workstatus?: string; + workstatus?: WorkStatusType; /** SC직무 */ job?: string; /** 거래처정보 */ diff --git a/projects/ucap-webmessenger-protocol-status/src/lib/models/status-bulk-info.ts b/projects/ucap-webmessenger-protocol-status/src/lib/models/status-bulk-info.ts index 51b1cb14..5ea6534b 100644 --- a/projects/ucap-webmessenger-protocol-status/src/lib/models/status-bulk-info.ts +++ b/projects/ucap-webmessenger-protocol-status/src/lib/models/status-bulk-info.ts @@ -3,6 +3,7 @@ import { TerminalStatusInfo, TerminalStatusNumber } from '../types/terminal-status.type'; +import { WorkStatusType } from '../types/work-status.type'; export interface StatusBulkInfo extends StatusInfo { // 사용자SEQ @@ -18,4 +19,7 @@ export interface StatusBulkInfo extends StatusInfo { terminalStatus: TerminalStatusInfo; /** 단말상태번호(n) */ terminalStatusNumber: TerminalStatusNumber; + + /** 업무상태정보(s) */ + workstatus: WorkStatusType; } diff --git a/projects/ucap-webmessenger-protocol-status/src/lib/models/status-info.ts b/projects/ucap-webmessenger-protocol-status/src/lib/models/status-info.ts index 27dc2aef..3a3f86b6 100644 --- a/projects/ucap-webmessenger-protocol-status/src/lib/models/status-info.ts +++ b/projects/ucap-webmessenger-protocol-status/src/lib/models/status-info.ts @@ -1,20 +1,24 @@ import { StatusCode } from '@ucap-webmessenger/core'; +import { WorkStatusType } from '../types/work-status.type'; export interface StatusInfo { - // 사용자SEQ + /** 사용자SEQ */ userSeq: number; - // 상태코드(PC) + /** 상태코드(PC) */ pcStatus: StatusCode; - // 상태코드(통화) + /** 상태코드(통화) */ phoneStatus: StatusCode; - // 상태코드(모바일) + /** 상태코드(모바일) */ mobileStatus: StatusCode; - // 상태코드(PC화상) + /** 상태코드(PC화상) */ conferenceStatus: StatusCode; - // 상태메시지 + /** 상태메시지 */ statusMessage: string; - // 상태코드(Mobile화상) + /** 상태코드(Mobile화상) */ mobileConferenceStatus: StatusCode; - // 상태코드(iMessenger) + /** 상태코드(iMessenger) */ imessengerStatus: StatusCode; + + /** 업무상태 */ + workstatus?: WorkStatusType; } diff --git a/projects/ucap-webmessenger-protocol-status/src/lib/protocols/bulk-info.ts b/projects/ucap-webmessenger-protocol-status/src/lib/protocols/bulk-info.ts index c9acdc8b..358ff255 100644 --- a/projects/ucap-webmessenger-protocol-status/src/lib/protocols/bulk-info.ts +++ b/projects/ucap-webmessenger-protocol-status/src/lib/protocols/bulk-info.ts @@ -17,6 +17,7 @@ import { } from '../types/terminal-status.type'; import { StatusInfo } from '../models/status-info'; import { StatusBulkInfo } from '../models/status-bulk-info'; +import { WorkStatusType } from '../types/work-status.type'; export interface BulkInfoRequest extends ProtocolRequest { /** DivCD(s) */ @@ -72,7 +73,8 @@ export const decodeBulkInfoData: ProtocolDecoder = ( mobileConferenceStatus: info[6] as StatusCode, imessengerStatus: info[7] as StatusCode, terminalStatus: info[8] as TerminalStatusInfo, - terminalStatusNumber: Number(info[9]) as TerminalStatusNumber + terminalStatusNumber: Number(info[9]) as TerminalStatusNumber, + workstatus: info[10] as WorkStatusType }); }); return decodeProtocolMessage(message, { diff --git a/projects/ucap-webmessenger-protocol-status/src/lib/protocols/status.ts b/projects/ucap-webmessenger-protocol-status/src/lib/protocols/status.ts index 76e6d89b..08e4d892 100644 --- a/projects/ucap-webmessenger-protocol-status/src/lib/protocols/status.ts +++ b/projects/ucap-webmessenger-protocol-status/src/lib/protocols/status.ts @@ -12,6 +12,7 @@ import { } from '@ucap-webmessenger/protocol'; import { StatusType, StatusCode } from '@ucap-webmessenger/core'; import { StatusInfo } from '../models/status-info'; +import { WorkStatusType } from '../types/work-status.type'; export interface StatusRequest extends ProtocolRequest { // 상태타입(s) @@ -74,6 +75,7 @@ export const decodeStatusNotification: ProtocolDecoder = ( conferenceStatus: info[4] as StatusCode, statusMessage: info[5], mobileConferenceStatus: info[6] as StatusCode, - imessengerStatus: info[7] as StatusCode + imessengerStatus: info[7] as StatusCode, + workstatus: info[8] as WorkStatusType } as StatusNotification); }; diff --git a/projects/ucap-webmessenger-protocol-status/src/lib/types/work-status.type.ts b/projects/ucap-webmessenger-protocol-status/src/lib/types/work-status.type.ts new file mode 100644 index 00000000..c197a3a5 --- /dev/null +++ b/projects/ucap-webmessenger-protocol-status/src/lib/types/work-status.type.ts @@ -0,0 +1,41 @@ +export enum WorkStatusType { + /** 근무중 */ + Work = 'W01', + + /** 휴가 */ + /** 오전 */ + VacationAM = 'V01', + /** 오후 */ + VacationPM = 'V02', + /** 휴가 */ + VacationAll = 'V03', + /** 휴직 */ + LeaveOfAbsence = 'V04', + /** 장기 리프레쉬 */ + LongtermRefresh = 'V05' + // /** 교육 */ + // /** 오전교육 */ + // EducationAm = 'E01', + // /** 오후교육 */ + // EducationPm = 'E02', + // /** 종일교육 */ + // EducationAll = 'E03', + // /** 장기교육 */ + // EducationLongterm = 'E04', + // /** 휴직 */ + // /** 일반휴직 */ + // LTRNormal = 'R01', + // /** 육아휴직 */ + // LTRBaby = 'R02', + // /** 기타휴직 */ + // LTREtc = 'R03', + // /** 일반출장 */ + // /** 출장 */ + // BusinessTrip = 'T01', + // /** 해외출장 */ + // BusinessTripOverseas = 'T02', + // /** 국내출장 */ + // BusinessTripLocal = 'T03', + // /** 장기출장 */ + // BusinessLongterm = 'T04', +} diff --git a/projects/ucap-webmessenger-ui-profile/src/lib/components/profile.component.ts b/projects/ucap-webmessenger-ui-profile/src/lib/components/profile.component.ts index a8a58b80..0c63fdd5 100644 --- a/projects/ucap-webmessenger-ui-profile/src/lib/components/profile.component.ts +++ b/projects/ucap-webmessenger-ui-profile/src/lib/components/profile.component.ts @@ -16,6 +16,7 @@ import { FormControl } from '@angular/forms'; import { SmsUtils } from '@ucap-webmessenger/daesang'; import { SessionStorageService } from '@ucap-webmessenger/web-storage'; import { NativeService, UCAP_NATIVE_SERVICE } from '@ucap-webmessenger/native'; +import { WorkStatusType } from 'projects/ucap-webmessenger-protocol-status/src/lib/types/work-status.type'; @Component({ selector: 'ucap-profile-profile', @@ -138,20 +139,20 @@ export class ProfileComponent implements OnInit { let workstatus = ''; if (!!userInfo && !!userInfo.workstatus) { switch (userInfo.workstatus) { - case 'V01': - workstatus = '오전휴가'; + case WorkStatusType.VacationAM: + workstatus = '오전'; break; - case 'V02': - workstatus = '오후휴가'; + case WorkStatusType.VacationPM: + workstatus = '오후'; break; - case 'V03': - workstatus = '종일휴가'; + case WorkStatusType.VacationAll: + workstatus = '휴가'; break; - case 'V04': - workstatus = '장기휴가'; + case WorkStatusType.LeaveOfAbsence: + workstatus = '휴직'; break; - case 'V05': - workstatus = '장기 리프레쉬'; + case WorkStatusType.LongtermRefresh: + workstatus = '장기'; break; } }