bug fixed

This commit is contained in:
병준 박 2019-09-25 16:12:28 +09:00
parent 1c2c457187
commit 41890118e3

View File

@ -80,6 +80,7 @@ export const decodeBuddyDetailData: ProtocolDecoder<BuddyDetailData> = (
const buddyInfos: UserInfo[] = [];
message.bodyList.forEach(buddyinfo => {
const info = buddyinfo.split(BodyStringDivider);
console.log('buddyinfo', info);
let i = 0;
buddyInfos.push({
seq: info[i],
@ -91,11 +92,11 @@ export const decodeBuddyDetailData: ProtocolDecoder<BuddyDetailData> = (
hpNumber: info[i++],
lineNumber: info[i++],
email: info[i++],
isMobile: info[i++],
isMobile: info[i++] === 'Y' ? true : false,
deptName: info[i++],
isFavorit: info[i++],
isBuddy: info[i++],
isActive: info[i++],
isFavorit: info[i++] === 'Y' ? true : false,
isBuddy: info[i++] === 'Y' ? true : false,
isActive: info[i++] === 'Y' ? true : false,
roleCd: info[i++],
employeeNum: info[i++],
madn: info[i++],
@ -107,8 +108,8 @@ export const decodeBuddyDetailData: ProtocolDecoder<BuddyDetailData> = (
gradeCn: info[i++],
deptNameEn: info[i++],
deptNameCn: info[i++],
isPrivacyAgree: info[i++],
isValidLogin: info[i++],
isPrivacyAgree: info[i++] === 'Y' ? true : false,
isValidLogin: info[i++] === 'Y' ? true : false,
employeeType: info[i++],
nickName: info[i++]
});