[대상향] 업무상태 표시를 위한 데이터 선작업 >? 디자인 완료되면 마저 작업필요.

This commit is contained in:
leejinho 2020-01-03 09:08:47 +09:00
parent 6e44f69c0f
commit 35f868c25c
9 changed files with 81 additions and 23 deletions

View File

@ -17,6 +17,7 @@ import { EventType, Info, EventJson } from '@ucap-webmessenger/protocol-event';
import { VersionInfo2Response } from '@ucap-webmessenger/api-public'; import { VersionInfo2Response } from '@ucap-webmessenger/api-public';
import { StatusCode as ApiStatusCode } from '@ucap-webmessenger/api'; import { StatusCode as ApiStatusCode } from '@ucap-webmessenger/api';
import { StatusCode } from '@ucap-webmessenger/core'; import { StatusCode } from '@ucap-webmessenger/core';
import { WorkStatusType } from 'projects/ucap-webmessenger-protocol-status/src/lib/types/work-status.type';
@Component({ @Component({
selector: 'app-template.page', selector: 'app-template.page',
@ -73,7 +74,8 @@ export const status: StatusBulkInfo = {
// 단말상태정보(s) // 단말상태정보(s)
terminalStatus: TerminalStatusInfo.Idle, terminalStatus: TerminalStatusInfo.Idle,
// 단말상태번호(n) // 단말상태번호(n)
terminalStatusNumber: TerminalStatusNumber.Idle terminalStatusNumber: TerminalStatusNumber.Idle,
workstatus: WorkStatusType.Work
}; };
export const buddyData: UserInfo = { export const buddyData: UserInfo = {
seq: 15, seq: 15,

View File

@ -11,6 +11,7 @@ import {
UserInfoSS, UserInfoSS,
DataUserResponse DataUserResponse
} from '@ucap-webmessenger/protocol-query'; } from '@ucap-webmessenger/protocol-query';
import { WorkStatusType } from 'projects/ucap-webmessenger-protocol-status/src/lib/types/work-status.type';
// export interface UserInfoSSForDaesang extends UserInfoSS { // export interface UserInfoSSForDaesang extends UserInfoSS {
// /****** For daesang ******/ // /****** For daesang ******/
@ -69,7 +70,7 @@ export const decodeDataUser: ProtocolDecoder<DataUserResponse> = (
// [daesang] // [daesang]
companyName: info[29], companyName: info[29],
responsibilities: info[30], responsibilities: info[30],
workstatus: info[31], workstatus: info[31] as WorkStatusType,
job: info[32], job: info[32],
customerInfo: info[33], customerInfo: info[33],
workplace: info[34] workplace: info[34]

View File

@ -1,6 +1,7 @@
import { RoleCode } from '@ucap-webmessenger/protocol-authentication'; import { RoleCode } from '@ucap-webmessenger/protocol-authentication';
import { CallMode } from '@ucap-webmessenger/core'; import { CallMode } from '@ucap-webmessenger/core';
import { EmployeeType } from '@ucap-webmessenger/protocol-room'; import { EmployeeType } from '@ucap-webmessenger/protocol-room';
import { WorkStatusType } from 'projects/ucap-webmessenger-protocol-status/src/lib/types/work-status.type';
export interface UserInfoSS { export interface UserInfoSS {
/** 사용자SEQ */ /** 사용자SEQ */
@ -67,7 +68,7 @@ export interface UserInfoSS {
/** 담당업무 */ /** 담당업무 */
responsibilities?: string; responsibilities?: string;
/** 업무 상태 */ /** 업무 상태 */
workstatus?: string; workstatus?: WorkStatusType;
/** SC직무 */ /** SC직무 */
job?: string; job?: string;
/** 거래처정보 */ /** 거래처정보 */

View File

@ -3,6 +3,7 @@ import {
TerminalStatusInfo, TerminalStatusInfo,
TerminalStatusNumber TerminalStatusNumber
} from '../types/terminal-status.type'; } from '../types/terminal-status.type';
import { WorkStatusType } from '../types/work-status.type';
export interface StatusBulkInfo extends StatusInfo { export interface StatusBulkInfo extends StatusInfo {
// 사용자SEQ // 사용자SEQ
@ -18,4 +19,7 @@ export interface StatusBulkInfo extends StatusInfo {
terminalStatus: TerminalStatusInfo; terminalStatus: TerminalStatusInfo;
/** 단말상태번호(n) */ /** 단말상태번호(n) */
terminalStatusNumber: TerminalStatusNumber; terminalStatusNumber: TerminalStatusNumber;
/** 업무상태정보(s) */
workstatus: WorkStatusType;
} }

View File

@ -1,20 +1,24 @@
import { StatusCode } from '@ucap-webmessenger/core'; import { StatusCode } from '@ucap-webmessenger/core';
import { WorkStatusType } from '../types/work-status.type';
export interface StatusInfo { export interface StatusInfo {
// 사용자SEQ /** 사용자SEQ */
userSeq: number; userSeq: number;
// 상태코드(PC) /** 상태코드(PC) */
pcStatus: StatusCode; pcStatus: StatusCode;
// 상태코드(통화) /** 상태코드(통화) */
phoneStatus: StatusCode; phoneStatus: StatusCode;
// 상태코드(모바일) /** 상태코드(모바일) */
mobileStatus: StatusCode; mobileStatus: StatusCode;
// 상태코드(PC화상) /** 상태코드(PC화상) */
conferenceStatus: StatusCode; conferenceStatus: StatusCode;
// 상태메시지 /** 상태메시지 */
statusMessage: string; statusMessage: string;
// 상태코드(Mobile화상) /** 상태코드(Mobile화상) */
mobileConferenceStatus: StatusCode; mobileConferenceStatus: StatusCode;
// 상태코드(iMessenger) /** 상태코드(iMessenger) */
imessengerStatus: StatusCode; imessengerStatus: StatusCode;
/** 업무상태 */
workstatus?: WorkStatusType;
} }

View File

@ -17,6 +17,7 @@ import {
} from '../types/terminal-status.type'; } from '../types/terminal-status.type';
import { StatusInfo } from '../models/status-info'; import { StatusInfo } from '../models/status-info';
import { StatusBulkInfo } from '../models/status-bulk-info'; import { StatusBulkInfo } from '../models/status-bulk-info';
import { WorkStatusType } from '../types/work-status.type';
export interface BulkInfoRequest extends ProtocolRequest { export interface BulkInfoRequest extends ProtocolRequest {
/** DivCD(s) */ /** DivCD(s) */
@ -72,7 +73,8 @@ export const decodeBulkInfoData: ProtocolDecoder<BulkInfoData> = (
mobileConferenceStatus: info[6] as StatusCode, mobileConferenceStatus: info[6] as StatusCode,
imessengerStatus: info[7] as StatusCode, imessengerStatus: info[7] as StatusCode,
terminalStatus: info[8] as TerminalStatusInfo, 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, { return decodeProtocolMessage(message, {

View File

@ -12,6 +12,7 @@ import {
} from '@ucap-webmessenger/protocol'; } from '@ucap-webmessenger/protocol';
import { StatusType, StatusCode } from '@ucap-webmessenger/core'; import { StatusType, StatusCode } from '@ucap-webmessenger/core';
import { StatusInfo } from '../models/status-info'; import { StatusInfo } from '../models/status-info';
import { WorkStatusType } from '../types/work-status.type';
export interface StatusRequest extends ProtocolRequest { export interface StatusRequest extends ProtocolRequest {
// 상태타입(s) // 상태타입(s)
@ -74,6 +75,7 @@ export const decodeStatusNotification: ProtocolDecoder<StatusNotification> = (
conferenceStatus: info[4] as StatusCode, conferenceStatus: info[4] as StatusCode,
statusMessage: info[5], statusMessage: info[5],
mobileConferenceStatus: info[6] as StatusCode, mobileConferenceStatus: info[6] as StatusCode,
imessengerStatus: info[7] as StatusCode imessengerStatus: info[7] as StatusCode,
workstatus: info[8] as WorkStatusType
} as StatusNotification); } as StatusNotification);
}; };

View File

@ -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',
}

View File

@ -16,6 +16,7 @@ import { FormControl } from '@angular/forms';
import { SmsUtils } from '@ucap-webmessenger/daesang'; import { SmsUtils } from '@ucap-webmessenger/daesang';
import { SessionStorageService } from '@ucap-webmessenger/web-storage'; import { SessionStorageService } from '@ucap-webmessenger/web-storage';
import { NativeService, UCAP_NATIVE_SERVICE } from '@ucap-webmessenger/native'; import { NativeService, UCAP_NATIVE_SERVICE } from '@ucap-webmessenger/native';
import { WorkStatusType } from 'projects/ucap-webmessenger-protocol-status/src/lib/types/work-status.type';
@Component({ @Component({
selector: 'ucap-profile-profile', selector: 'ucap-profile-profile',
@ -138,20 +139,20 @@ export class ProfileComponent implements OnInit {
let workstatus = ''; let workstatus = '';
if (!!userInfo && !!userInfo.workstatus) { if (!!userInfo && !!userInfo.workstatus) {
switch (userInfo.workstatus) { switch (userInfo.workstatus) {
case 'V01': case WorkStatusType.VacationAM:
workstatus = '오전휴가'; workstatus = '오전';
break; break;
case 'V02': case WorkStatusType.VacationPM:
workstatus = '오후휴가'; workstatus = '오후';
break; break;
case 'V03': case WorkStatusType.VacationAll:
workstatus = '종일휴가'; workstatus = '휴가';
break; break;
case 'V04': case WorkStatusType.LeaveOfAbsence:
workstatus = '장기휴가'; workstatus = '휴직';
break; break;
case 'V05': case WorkStatusType.LongtermRefresh:
workstatus = '장기 리프레쉬'; workstatus = '장기';
break; break;
} }
} }