From bc231b0db28d5489f45dcf28323acb64f856cedc Mon Sep 17 00:00:00 2001 From: AnandaTon Date: Fri, 7 Jun 2024 15:40:33 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88=E0=B8=A1?= =?UTF-8?q?=20ToThaiNumber=20=E0=B9=83=E0=B8=99=20report?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/ReportController.ts | 968 ++++++++++++++++++++-------- 1 file changed, 693 insertions(+), 275 deletions(-) diff --git a/src/controllers/ReportController.ts b/src/controllers/ReportController.ts index 539b380a..40c1dcee 100644 --- a/src/controllers/ReportController.ts +++ b/src/controllers/ReportController.ts @@ -179,8 +179,8 @@ export class ReportController extends Controller { }; if (_node == null) { const head = { - posMasterNo: node.orgTreeShortName, - posExecutive: node.orgTreeName, + posMasterNo: Extension.ToThaiNumber(node.orgTreeShortName.toString()), + posExecutive: Extension.ToThaiNumber(node.orgTreeName.toString()), positionName: "", posType: "", posLevel: "", @@ -193,11 +193,11 @@ export class ReportController extends Controller { node.posMasterNo == null ? "" : Extension.ToThaiNumber(node.posMasterNo.toString()), - posExecutive: node.posExecutive, - positionName: node.positionName, - posType: node.posType, - posLevel: node.posLevel, - reason: node.reason, + posExecutive: Extension.ToThaiNumber(node.posExecutive.toString()), + positionName: Extension.ToThaiNumber(node.positionName.toString()), + posType: Extension.ToThaiNumber(node.posType.toString()), + posLevel: Extension.ToThaiNumber(node.posLevel.toString()), + reason: Extension.ToThaiNumber(node.reason.toString()), }; data.push(_head); } else { @@ -208,7 +208,10 @@ export class ReportController extends Controller { const head = { posMasterNo: node.orgTreeShortName == _node.orgTreeShortName ? "" : node.orgTreeShortName, - posExecutive: node.orgTreeName == _node.orgTreeName ? "" : node.orgTreeName, + posExecutive: + node.orgTreeName == _node.orgTreeName + ? "" + : Extension.ToThaiNumber(node.orgTreeName.toString()), positionName: "", posType: "", posLevel: "", @@ -223,11 +226,14 @@ export class ReportController extends Controller { node.posMasterNo == null ? "" : Extension.ToThaiNumber(node.posMasterNo.toString()), - posExecutive: node.posExecutive == _node.posExecutive ? "" : node.posExecutive, - positionName: node.positionName, - posType: node.posType, - posLevel: node.posLevel, - reason: node.reason, + posExecutive: + node.posExecutive == _node.posExecutive + ? "" + : Extension.ToThaiNumber(node.posExecutive.toString()), + positionName: Extension.ToThaiNumber(node.positionName.toString()), + posType: Extension.ToThaiNumber(node.posType.toString()), + posLevel: Extension.ToThaiNumber(node.posLevel.toString()), + reason: Extension.ToThaiNumber(node.reason.toString()), }; data.push(head); } @@ -282,8 +288,8 @@ export class ReportController extends Controller { }; if (_node == null) { const head = { - posMasterNo: node.orgTreeShortName, - posExecutive: node.orgTreeName, + posMasterNo: Extension.ToThaiNumber(node.orgTreeShortName.toString()), + posExecutive: Extension.ToThaiNumber(node.orgTreeName.toString()), positionName: "", posType: "", posLevel: "", @@ -296,11 +302,11 @@ export class ReportController extends Controller { node.posMasterNo == null ? "" : Extension.ToThaiNumber(node.posMasterNo.toString()), - posExecutive: node.posExecutive, - positionName: node.positionName, - posType: node.posType, - posLevel: node.posLevel, - reason: node.reason, + posExecutive: Extension.ToThaiNumber(node.posExecutive.toString()), + positionName: Extension.ToThaiNumber(node.positionName.toString()), + posType: Extension.ToThaiNumber(node.posType.toString()), + posLevel: Extension.ToThaiNumber(node.posLevel.toString()), + reason: Extension.ToThaiNumber(node.reason.toString()), }; data.push(_head); } else { @@ -313,7 +319,10 @@ export class ReportController extends Controller { node.orgTreeShortName == _node.orgTreeShortName ? "" : node.orgTreeShortName, - posExecutive: node.orgTreeName == _node.orgTreeName ? "" : node.orgTreeName, + posExecutive: + node.orgTreeName == _node.orgTreeName + ? "" + : Extension.ToThaiNumber(node.orgTreeName.toString()), positionName: "", posType: "", posLevel: "", @@ -328,11 +337,14 @@ export class ReportController extends Controller { node.posMasterNo == null ? "" : Extension.ToThaiNumber(node.posMasterNo.toString()), - posExecutive: node.posExecutive == _node.posExecutive ? "" : node.posExecutive, - positionName: node.positionName, - posType: node.posType, - posLevel: node.posLevel, - reason: node.reason, + posExecutive: + node.posExecutive == _node.posExecutive + ? "" + : Extension.ToThaiNumber(node.posExecutive.toString()), + positionName: Extension.ToThaiNumber(node.positionName.toString()), + posType: Extension.ToThaiNumber(node.posType.toString()), + posLevel: Extension.ToThaiNumber(node.posLevel.toString()), + reason: Extension.ToThaiNumber(node.reason.toString()), }; data.push(head); } @@ -387,8 +399,8 @@ export class ReportController extends Controller { }; if (_node == null) { const head = { - posMasterNo: node.orgTreeShortName, - posExecutive: node.orgTreeName, + posMasterNo: Extension.ToThaiNumber(node.orgTreeShortName.toString()), + posExecutive: Extension.ToThaiNumber(node.orgTreeName.toString()), positionName: "", posType: "", posLevel: "", @@ -401,11 +413,11 @@ export class ReportController extends Controller { node.posMasterNo == null ? "" : Extension.ToThaiNumber(node.posMasterNo.toString()), - posExecutive: node.posExecutive, - positionName: node.positionName, - posType: node.posType, - posLevel: node.posLevel, - reason: node.reason, + posExecutive: Extension.ToThaiNumber(node.posExecutive.toString()), + positionName: Extension.ToThaiNumber(node.positionName.toString()), + posType: Extension.ToThaiNumber(node.posType.toString()), + posLevel: Extension.ToThaiNumber(node.posLevel.toString()), + reason: Extension.ToThaiNumber(node.reason.toString()), }; data.push(_head); } else { @@ -434,11 +446,13 @@ export class ReportController extends Controller { ? "" : Extension.ToThaiNumber(node.posMasterNo.toString()), posExecutive: - node.posExecutive == _node.posExecutive ? "" : node.posExecutive, - positionName: node.positionName, - posType: node.posType, - posLevel: node.posLevel, - reason: node.reason, + node.posExecutive == _node.posExecutive + ? "" + : Extension.ToThaiNumber(node.posExecutive.toString()), + positionName: Extension.ToThaiNumber(node.positionName.toString()), + posType: Extension.ToThaiNumber(node.posType.toString()), + posLevel: Extension.ToThaiNumber(node.posLevel.toString()), + reason: Extension.ToThaiNumber(node.reason.toString()), }; data.push(head); } @@ -495,8 +509,8 @@ export class ReportController extends Controller { }; if (_node == null) { const head = { - posMasterNo: node.orgTreeShortName, - posExecutive: node.orgTreeName, + posMasterNo: Extension.ToThaiNumber(node.orgTreeShortName.toString()), + posExecutive: Extension.ToThaiNumber(node.orgTreeName.toString()), positionName: "", posType: "", posLevel: "", @@ -509,11 +523,11 @@ export class ReportController extends Controller { node.posMasterNo == null ? "" : Extension.ToThaiNumber(node.posMasterNo.toString()), - posExecutive: node.posExecutive, - positionName: node.positionName, - posType: node.posType, - posLevel: node.posLevel, - reason: node.reason, + posExecutive: Extension.ToThaiNumber(node.posExecutive.toString()), + positionName: Extension.ToThaiNumber(node.positionName.toString()), + posType: Extension.ToThaiNumber(node.posType.toString()), + posLevel: Extension.ToThaiNumber(node.posLevel.toString()), + reason: Extension.ToThaiNumber(node.reason.toString()), }; data.push(_head); } else { @@ -543,11 +557,13 @@ export class ReportController extends Controller { ? "" : Extension.ToThaiNumber(node.posMasterNo.toString()), posExecutive: - node.posExecutive == _node.posExecutive ? "" : node.posExecutive, - positionName: node.positionName, - posType: node.posType, - posLevel: node.posLevel, - reason: node.reason, + node.posExecutive == _node.posExecutive + ? "" + : Extension.ToThaiNumber(node.posExecutive.toString()), + positionName: Extension.ToThaiNumber(node.positionName.toString()), + posType: Extension.ToThaiNumber(node.posType.toString()), + posLevel: Extension.ToThaiNumber(node.posLevel.toString()), + reason: Extension.ToThaiNumber(node.reason.toString()), }; data.push(head); } @@ -602,8 +618,8 @@ export class ReportController extends Controller { }; if (_node == null) { const head = { - posMasterNo: node.orgTreeShortName, - posExecutive: node.orgTreeName, + posMasterNo: Extension.ToThaiNumber(node.orgTreeShortName.toString()), + posExecutive: Extension.ToThaiNumber(node.orgTreeName.toString()), positionName: "", posType: "", posLevel: "", @@ -616,11 +632,11 @@ export class ReportController extends Controller { node.posMasterNo == null ? "" : Extension.ToThaiNumber(node.posMasterNo.toString()), - posExecutive: node.posExecutive, - positionName: node.positionName, - posType: node.posType, - posLevel: node.posLevel, - reason: node.reason, + posExecutive: Extension.ToThaiNumber(node.posExecutive.toString()), + positionName: Extension.ToThaiNumber(node.positionName.toString()), + posType: Extension.ToThaiNumber(node.posType.toString()), + posLevel: Extension.ToThaiNumber(node.posLevel.toString()), + reason: Extension.ToThaiNumber(node.reason.toString()), }; data.push(_head); } else { @@ -650,11 +666,16 @@ export class ReportController extends Controller { ? "" : Extension.ToThaiNumber(node.posMasterNo.toString()), posExecutive: - node.posExecutive == _node.posExecutive ? "" : node.posExecutive, - positionName: node.positionName, - posType: node.posType, - posLevel: node.posLevel, - reason: node.reason, + node.posExecutive == _node.posExecutive + ? "" + : Extension.ToThaiNumber(node.posExecutive.toString()), + positionName: + node.positionName == null + ? "" + : Extension.ToThaiNumber(node.positionName.toString()), + posType: Extension.ToThaiNumber(node.posType.toString()), + posLevel: Extension.ToThaiNumber(node.posLevel.toString()), + reason: Extension.ToThaiNumber(node.reason.toString()), }; data.push(head); } @@ -668,6 +689,7 @@ export class ReportController extends Controller { } } } + console.log(data); return new HttpSuccess({ template: "report1", reportName: "report1", data: { data } }); } @@ -1103,13 +1125,13 @@ export class ReportController extends Controller { }; if (_node == null) { const head = { - posMasterNo: node.orgTreeShortName, - profileFullname: node.profileOrgName, - posExecutive: node.orgTreeName, + posMasterNo: Extension.ToThaiNumber(node.orgTreeShortName.toString()), + profileFullname: Extension.ToThaiNumber(node.profileOrgName.toString()), + posExecutive: Extension.ToThaiNumber(node.orgTreeName.toString()), positionName: "", posType: "", posLevel: "", - profilePosMasterNo: node.profileOrgShortName, + profilePosMasterNo: Extension.ToThaiNumber(node.profileOrgShortName.toString()), profilePosExecutive: "", profilePositionName: "", profilePosType: "", @@ -1124,17 +1146,41 @@ export class ReportController extends Controller { node.posMasterNo == null ? "" : Extension.ToThaiNumber(node.posMasterNo.toString()), - profileFullname: node.profileFullname, - posExecutive: node.posExecutive, - positionName: node.positionName, - posType: node.posType, - posLevel: node.posLevel, + profileFullname: + node.profileFullname == null + ? "" + : Extension.ToThaiNumber(node.profileFullname.toString()), + posExecutive: + node.posExecutive == null + ? "" + : Extension.ToThaiNumber(node.posExecutive.toString()), + positionName: + node.positionName == null + ? "" + : Extension.ToThaiNumber(node.positionName.toString()), + posType: + node.posType == null ? "" : Extension.ToThaiNumber(node.posType.toString()), + posLevel: + node.posLevel == null ? "" : Extension.ToThaiNumber(node.posLevel.toString()), profilePosMasterNo: Extension.ToThaiNumber(node.profilePosMasterNo.toString()), - profilePosExecutive: node.profilePosExecutive, - profilePositionName: node.profilePositionName, - profilePosType: node.profilePosType, - profilePosLevel: node.profilePosLevel, - education: node.education, + profilePosExecutive: + node.profilePosExecutive == null + ? "" + : Extension.ToThaiNumber(node.profilePosExecutive.toString()), + profilePositionName: + node.profilePositionName == null + ? "" + : Extension.ToThaiNumber(node.profilePositionName.toString()), + profilePosType: + node.profilePosType == null + ? "" + : Extension.ToThaiNumber(node.profilePosType.toString()), + profilePosLevel: + node.profilePosLevel == null + ? "" + : Extension.ToThaiNumber(node.profilePosLevel.toString()), + education: + node.education == null ? "" : Extension.ToThaiNumber(node.education.toString()), salary: Extension.ToThaiNumber(node.salary.toLocaleString()), }; data.push(_head); @@ -1174,20 +1220,41 @@ export class ReportController extends Controller { node.posMasterNo == null ? "" : Extension.ToThaiNumber(node.posMasterNo.toString()), - profileFullname: node.profileFullname, - posExecutive: node.posExecutive == _node.posExecutive ? "" : node.posExecutive, - positionName: node.positionName, - posType: node.posType, - posLevel: node.posLevel, + profileFullname: + node.profileFullname == null + ? "" + : Extension.ToThaiNumber(node.profileFullname.toString()), + posExecutive: + node.posExecutive == null + ? "" + : Extension.ToThaiNumber(node.posExecutive.toString()), + positionName: + node.positionName == null + ? "" + : Extension.ToThaiNumber(node.positionName.toString()), + posType: + node.posType == null ? "" : Extension.ToThaiNumber(node.posType.toString()), + posLevel: + node.posLevel == null ? "" : Extension.ToThaiNumber(node.posLevel.toString()), profilePosMasterNo: Extension.ToThaiNumber(node.profilePosMasterNo.toString()), profilePosExecutive: - node.profilePosExecutive == _node.profilePosExecutive + node.profilePosExecutive == null ? "" - : node.profilePosExecutive, - profilePositionName: node.profilePositionName, - profilePosType: node.profilePosType, - profilePosLevel: node.profilePosLevel, - education: node.education, + : Extension.ToThaiNumber(node.profilePosExecutive.toString()), + profilePositionName: + node.profilePositionName == null + ? "" + : Extension.ToThaiNumber(node.profilePositionName.toString()), + profilePosType: + node.profilePosType == null + ? "" + : Extension.ToThaiNumber(node.profilePosType.toString()), + profilePosLevel: + node.profilePosLevel == null + ? "" + : Extension.ToThaiNumber(node.profilePosLevel.toString()), + education: + node.education == null ? "" : Extension.ToThaiNumber(node.education.toString()), salary: Extension.ToThaiNumber(node.salary.toLocaleString()), }; data.push(head); @@ -1427,13 +1494,13 @@ export class ReportController extends Controller { }; if (_node == null) { const head = { - posMasterNo: node.orgTreeShortName, - profileFullname: node.profileOrgName, - posExecutive: node.orgTreeName, + posMasterNo: Extension.ToThaiNumber(node.orgTreeShortName.toString()), + profileFullname: Extension.ToThaiNumber(node.profileOrgName.toString()), + posExecutive: Extension.ToThaiNumber(node.orgTreeName.toString()), positionName: "", posType: "", posLevel: "", - profilePosMasterNo: node.profileOrgShortName, + profilePosMasterNo: Extension.ToThaiNumber(node.profileOrgShortName.toString()), profilePosExecutive: "", profilePositionName: "", profilePosType: "", @@ -1448,17 +1515,43 @@ export class ReportController extends Controller { node.posMasterNo == null ? "" : Extension.ToThaiNumber(node.posMasterNo.toString()), - profileFullname: node.profileFullname, - posExecutive: node.posExecutive, - positionName: node.positionName, - posType: node.posType, - posLevel: node.posLevel, + profileFullname: + node.profileFullname == null + ? "" + : Extension.ToThaiNumber(node.profileFullname.toString()), + posExecutive: + node.posExecutive == null + ? "" + : Extension.ToThaiNumber(node.posExecutive.toString()), + positionName: + node.positionName == null + ? "" + : Extension.ToThaiNumber(node.positionName.toString()), + posType: + node.posType == null ? "" : Extension.ToThaiNumber(node.posType.toString()), + posLevel: + node.posLevel == null ? "" : Extension.ToThaiNumber(node.posLevel.toString()), profilePosMasterNo: Extension.ToThaiNumber(node.profilePosMasterNo.toString()), - profilePosExecutive: node.profilePosExecutive, - profilePositionName: node.profilePositionName, - profilePosType: node.profilePosType, - profilePosLevel: node.profilePosLevel, - education: node.education, + profilePosExecutive: + node.profilePosExecutive == null + ? "" + : Extension.ToThaiNumber(node.profilePosExecutive.toString()), + profilePositionName: + node.profilePositionName == null + ? "" + : Extension.ToThaiNumber(node.profilePositionName.toString()), + profilePosType: + node.profilePosType == null + ? "" + : Extension.ToThaiNumber(node.profilePosType.toString()), + profilePosLevel: + node.profilePosLevel == null + ? "" + : Extension.ToThaiNumber(node.profilePosLevel.toString()), + education: + node.education == null + ? "" + : Extension.ToThaiNumber(node.education.toString()), salary: Extension.ToThaiNumber(node.salary.toLocaleString()), }; data.push(_head); @@ -1500,20 +1593,43 @@ export class ReportController extends Controller { node.posMasterNo == null ? "" : Extension.ToThaiNumber(node.posMasterNo.toString()), - profileFullname: node.profileFullname, - posExecutive: node.posExecutive == _node.posExecutive ? "" : node.posExecutive, - positionName: node.positionName, - posType: node.posType, - posLevel: node.posLevel, + profileFullname: + node.profileFullname == null + ? "" + : Extension.ToThaiNumber(node.profileFullname.toString()), + posExecutive: + node.posExecutive == null + ? "" + : Extension.ToThaiNumber(node.posExecutive.toString()), + positionName: + node.positionName == null + ? "" + : Extension.ToThaiNumber(node.positionName.toString()), + posType: + node.posType == null ? "" : Extension.ToThaiNumber(node.posType.toString()), + posLevel: + node.posLevel == null ? "" : Extension.ToThaiNumber(node.posLevel.toString()), profilePosMasterNo: Extension.ToThaiNumber(node.profilePosMasterNo.toString()), profilePosExecutive: - node.profilePosExecutive == _node.profilePosExecutive + node.profilePosExecutive == null ? "" - : node.profilePosExecutive, - profilePositionName: node.profilePositionName, - profilePosType: node.profilePosType, - profilePosLevel: node.profilePosLevel, - education: node.education, + : Extension.ToThaiNumber(node.profilePosExecutive.toString()), + profilePositionName: + node.profilePositionName == null + ? "" + : Extension.ToThaiNumber(node.profilePositionName.toString()), + profilePosType: + node.profilePosType == null + ? "" + : Extension.ToThaiNumber(node.profilePosType.toString()), + profilePosLevel: + node.profilePosLevel == null + ? "" + : Extension.ToThaiNumber(node.profilePosLevel.toString()), + education: + node.education == null + ? "" + : Extension.ToThaiNumber(node.education.toString()), salary: Extension.ToThaiNumber(node.salary.toLocaleString()), }; data.push(head); @@ -1753,13 +1869,15 @@ export class ReportController extends Controller { }; if (_node == null) { const head = { - posMasterNo: node.orgTreeShortName, - profileFullname: node.profileOrgName, - posExecutive: node.orgTreeName, + posMasterNo: Extension.ToThaiNumber(node.orgTreeShortName.toString()), + profileFullname: Extension.ToThaiNumber(node.profileOrgName.toString()), + posExecutive: Extension.ToThaiNumber(node.orgTreeName.toString()), positionName: "", posType: "", posLevel: "", - profilePosMasterNo: node.profileOrgShortName, + profilePosMasterNo: Extension.ToThaiNumber( + node.profileOrgShortName.toString(), + ), profilePosExecutive: "", profilePositionName: "", profilePosType: "", @@ -1774,20 +1892,47 @@ export class ReportController extends Controller { node.posMasterNo == null ? "" : Extension.ToThaiNumber(node.posMasterNo.toString()), - profileFullname: node.profileFullname, - posExecutive: node.posExecutive, - positionName: node.positionName, - posType: node.posType, - posLevel: node.posLevel, - profilePosMasterNo: - node.profilePosMasterNo == null + profileFullname: + node.profileFullname == null ? "" - : Extension.ToThaiNumber(node.profilePosMasterNo.toString()), - profilePosExecutive: node.profilePosExecutive, - profilePositionName: node.profilePositionName, - profilePosType: node.profilePosType, - profilePosLevel: node.profilePosLevel, - education: node.education, + : Extension.ToThaiNumber(node.profileFullname.toString()), + posExecutive: + node.posExecutive == null + ? "" + : Extension.ToThaiNumber(node.posExecutive.toString()), + positionName: + node.positionName == null + ? "" + : Extension.ToThaiNumber(node.positionName.toString()), + posType: + node.posType == null ? "" : Extension.ToThaiNumber(node.posType.toString()), + posLevel: + node.posLevel == null + ? "" + : Extension.ToThaiNumber(node.posLevel.toString()), + profilePosMasterNo: Extension.ToThaiNumber( + node.profilePosMasterNo.toString(), + ), + profilePosExecutive: + node.profilePosExecutive == null + ? "" + : Extension.ToThaiNumber(node.profilePosExecutive.toString()), + profilePositionName: + node.profilePositionName == null + ? "" + : Extension.ToThaiNumber(node.profilePositionName.toString()), + profilePosType: + node.profilePosType == null + ? "" + : Extension.ToThaiNumber(node.profilePosType.toString()), + profilePosLevel: + node.profilePosLevel == null + ? "" + : Extension.ToThaiNumber(node.profilePosLevel.toString()), + education: + node.education == null + ? "" + : Extension.ToThaiNumber(node.education.toString()), salary: Extension.ToThaiNumber(node.salary.toLocaleString()), }; data.push(_head); @@ -1829,24 +1974,47 @@ export class ReportController extends Controller { node.posMasterNo == null ? "" : Extension.ToThaiNumber(node.posMasterNo.toString()), - profileFullname: node.profileFullname, + profileFullname: + node.profileFullname == null + ? "" + : Extension.ToThaiNumber(node.profileFullname.toString()), posExecutive: - node.posExecutive == _node.posExecutive ? "" : node.posExecutive, - positionName: node.positionName, - posType: node.posType, - posLevel: node.posLevel, - profilePosMasterNo: - node.profilePosMasterNo == null + node.posExecutive == null ? "" - : Extension.ToThaiNumber(node.profilePosMasterNo.toString()), + : Extension.ToThaiNumber(node.posExecutive.toString()), + positionName: + node.positionName == null + ? "" + : Extension.ToThaiNumber(node.positionName.toString()), + posType: + node.posType == null ? "" : Extension.ToThaiNumber(node.posType.toString()), + posLevel: + node.posLevel == null + ? "" + : Extension.ToThaiNumber(node.posLevel.toString()), + profilePosMasterNo: Extension.ToThaiNumber( + node.profilePosMasterNo.toString(), + ), profilePosExecutive: - node.profilePosExecutive == _node.profilePosExecutive + node.profilePosExecutive == null ? "" - : node.profilePosExecutive, - profilePositionName: node.profilePositionName, - profilePosType: node.profilePosType, - profilePosLevel: node.profilePosLevel, - education: node.education, + : Extension.ToThaiNumber(node.profilePosExecutive.toString()), + profilePositionName: + node.profilePositionName == null + ? "" + : Extension.ToThaiNumber(node.profilePositionName.toString()), + profilePosType: + node.profilePosType == null + ? "" + : Extension.ToThaiNumber(node.profilePosType.toString()), + profilePosLevel: + node.profilePosLevel == null + ? "" + : Extension.ToThaiNumber(node.profilePosLevel.toString()), + education: + node.education == null + ? "" + : Extension.ToThaiNumber(node.education.toString()), salary: Extension.ToThaiNumber(node.salary.toLocaleString()), }; data.push(head); @@ -2088,13 +2256,15 @@ export class ReportController extends Controller { }; if (_node == null) { const head = { - posMasterNo: node.orgTreeShortName, - profileFullname: node.profileOrgName, - posExecutive: node.orgTreeName, + posMasterNo: Extension.ToThaiNumber(node.orgTreeShortName.toString()), + profileFullname: Extension.ToThaiNumber(node.profileOrgName.toString()), + posExecutive: Extension.ToThaiNumber(node.orgTreeName.toString()), positionName: "", posType: "", posLevel: "", - profilePosMasterNo: node.profileOrgShortName, + profilePosMasterNo: Extension.ToThaiNumber( + node.profileOrgShortName.toString(), + ), profilePosExecutive: "", profilePositionName: "", profilePosType: "", @@ -2109,20 +2279,49 @@ export class ReportController extends Controller { node.posMasterNo == null ? "" : Extension.ToThaiNumber(node.posMasterNo.toString()), - profileFullname: node.profileFullname, - posExecutive: node.posExecutive, - positionName: node.positionName, - posType: node.posType, - posLevel: node.posLevel, - profilePosMasterNo: - node.profilePosMasterNo == null + profileFullname: + node.profileFullname == null ? "" - : Extension.ToThaiNumber(node.profilePosMasterNo.toString()), - profilePosExecutive: node.profilePosExecutive, - profilePositionName: node.profilePositionName, - profilePosType: node.profilePosType, - profilePosLevel: node.profilePosLevel, - education: node.education, + : Extension.ToThaiNumber(node.profileFullname.toString()), + posExecutive: + node.posExecutive == null + ? "" + : Extension.ToThaiNumber(node.posExecutive.toString()), + positionName: + node.positionName == null + ? "" + : Extension.ToThaiNumber(node.positionName.toString()), + posType: + node.posType == null + ? "" + : Extension.ToThaiNumber(node.posType.toString()), + posLevel: + node.posLevel == null + ? "" + : Extension.ToThaiNumber(node.posLevel.toString()), + profilePosMasterNo: Extension.ToThaiNumber( + node.profilePosMasterNo.toString(), + ), + profilePosExecutive: + node.profilePosExecutive == null + ? "" + : Extension.ToThaiNumber(node.profilePosExecutive.toString()), + profilePositionName: + node.profilePositionName == null + ? "" + : Extension.ToThaiNumber(node.profilePositionName.toString()), + profilePosType: + node.profilePosType == null + ? "" + : Extension.ToThaiNumber(node.profilePosType.toString()), + profilePosLevel: + node.profilePosLevel == null + ? "" + : Extension.ToThaiNumber(node.profilePosLevel.toString()), + education: + node.education == null + ? "" + : Extension.ToThaiNumber(node.education.toString()), salary: Extension.ToThaiNumber(node.salary.toLocaleString()), }; data.push(_head); @@ -2165,24 +2364,49 @@ export class ReportController extends Controller { node.posMasterNo == null ? "" : Extension.ToThaiNumber(node.posMasterNo.toString()), - profileFullname: node.profileFullname, + profileFullname: + node.profileFullname == null + ? "" + : Extension.ToThaiNumber(node.profileFullname.toString()), posExecutive: - node.posExecutive == _node.posExecutive ? "" : node.posExecutive, - positionName: node.positionName, - posType: node.posType, - posLevel: node.posLevel, - profilePosMasterNo: - node.profilePosMasterNo == null + node.posExecutive == null ? "" - : Extension.ToThaiNumber(node.profilePosMasterNo.toString()), + : Extension.ToThaiNumber(node.posExecutive.toString()), + positionName: + node.positionName == null + ? "" + : Extension.ToThaiNumber(node.positionName.toString()), + posType: + node.posType == null + ? "" + : Extension.ToThaiNumber(node.posType.toString()), + posLevel: + node.posLevel == null + ? "" + : Extension.ToThaiNumber(node.posLevel.toString()), + profilePosMasterNo: Extension.ToThaiNumber( + node.profilePosMasterNo.toString(), + ), profilePosExecutive: - node.profilePosExecutive == _node.profilePosExecutive + node.profilePosExecutive == null ? "" - : node.profilePosExecutive, - profilePositionName: node.profilePositionName, - profilePosType: node.profilePosType, - profilePosLevel: node.profilePosLevel, - education: node.education, + : Extension.ToThaiNumber(node.profilePosExecutive.toString()), + profilePositionName: + node.profilePositionName == null + ? "" + : Extension.ToThaiNumber(node.profilePositionName.toString()), + profilePosType: + node.profilePosType == null + ? "" + : Extension.ToThaiNumber(node.profilePosType.toString()), + profilePosLevel: + node.profilePosLevel == null + ? "" + : Extension.ToThaiNumber(node.profilePosLevel.toString()), + education: + node.education == null + ? "" + : Extension.ToThaiNumber(node.education.toString()), salary: Extension.ToThaiNumber(node.salary.toLocaleString()), }; data.push(head); @@ -2423,13 +2647,15 @@ export class ReportController extends Controller { }; if (_node == null) { const head = { - posMasterNo: node.orgTreeShortName, - profileFullname: node.profileOrgName, - posExecutive: node.orgTreeName, + posMasterNo: Extension.ToThaiNumber(node.orgTreeShortName.toString()), + profileFullname: Extension.ToThaiNumber(node.profileOrgName.toString()), + posExecutive: Extension.ToThaiNumber(node.orgTreeName.toString()), positionName: "", posType: "", posLevel: "", - profilePosMasterNo: node.profileOrgShortName, + profilePosMasterNo: Extension.ToThaiNumber( + node.profileOrgShortName.toString(), + ), profilePosExecutive: "", profilePositionName: "", profilePosType: "", @@ -2444,20 +2670,49 @@ export class ReportController extends Controller { node.posMasterNo == null ? "" : Extension.ToThaiNumber(node.posMasterNo.toString()), - profileFullname: node.profileFullname, - posExecutive: node.posExecutive, - positionName: node.positionName, - posType: node.posType, - posLevel: node.posLevel, - profilePosMasterNo: - node.profilePosMasterNo == null + profileFullname: + node.profileFullname == null ? "" - : Extension.ToThaiNumber(node.profilePosMasterNo.toString()), - profilePosExecutive: node.profilePosExecutive, - profilePositionName: node.profilePositionName, - profilePosType: node.profilePosType, - profilePosLevel: node.profilePosLevel, - education: node.education, + : Extension.ToThaiNumber(node.profileFullname.toString()), + posExecutive: + node.posExecutive == null + ? "" + : Extension.ToThaiNumber(node.posExecutive.toString()), + positionName: + node.positionName == null + ? "" + : Extension.ToThaiNumber(node.positionName.toString()), + posType: + node.posType == null + ? "" + : Extension.ToThaiNumber(node.posType.toString()), + posLevel: + node.posLevel == null + ? "" + : Extension.ToThaiNumber(node.posLevel.toString()), + profilePosMasterNo: Extension.ToThaiNumber( + node.profilePosMasterNo.toString(), + ), + profilePosExecutive: + node.profilePosExecutive == null + ? "" + : Extension.ToThaiNumber(node.profilePosExecutive.toString()), + profilePositionName: + node.profilePositionName == null + ? "" + : Extension.ToThaiNumber(node.profilePositionName.toString()), + profilePosType: + node.profilePosType == null + ? "" + : Extension.ToThaiNumber(node.profilePosType.toString()), + profilePosLevel: + node.profilePosLevel == null + ? "" + : Extension.ToThaiNumber(node.profilePosLevel.toString()), + education: + node.education == null + ? "" + : Extension.ToThaiNumber(node.education.toString()), salary: Extension.ToThaiNumber(node.salary.toLocaleString()), }; data.push(_head); @@ -2500,24 +2755,49 @@ export class ReportController extends Controller { node.posMasterNo == null ? "" : Extension.ToThaiNumber(node.posMasterNo.toString()), - profileFullname: node.profileFullname, + profileFullname: + node.profileFullname == null + ? "" + : Extension.ToThaiNumber(node.profileFullname.toString()), posExecutive: - node.posExecutive == _node.posExecutive ? "" : node.posExecutive, - positionName: node.positionName, - posType: node.posType, - posLevel: node.posLevel, - profilePosMasterNo: - node.profilePosMasterNo == null + node.posExecutive == null ? "" - : Extension.ToThaiNumber(node.profilePosMasterNo.toString()), + : Extension.ToThaiNumber(node.posExecutive.toString()), + positionName: + node.positionName == null + ? "" + : Extension.ToThaiNumber(node.positionName.toString()), + posType: + node.posType == null + ? "" + : Extension.ToThaiNumber(node.posType.toString()), + posLevel: + node.posLevel == null + ? "" + : Extension.ToThaiNumber(node.posLevel.toString()), + profilePosMasterNo: Extension.ToThaiNumber( + node.profilePosMasterNo.toString(), + ), profilePosExecutive: - node.profilePosExecutive == _node.profilePosExecutive + node.profilePosExecutive == null ? "" - : node.profilePosExecutive, - profilePositionName: node.profilePositionName, - profilePosType: node.profilePosType, - profilePosLevel: node.profilePosLevel, - education: node.education, + : Extension.ToThaiNumber(node.profilePosExecutive.toString()), + profilePositionName: + node.profilePositionName == null + ? "" + : Extension.ToThaiNumber(node.profilePositionName.toString()), + profilePosType: + node.profilePosType == null + ? "" + : Extension.ToThaiNumber(node.profilePosType.toString()), + profilePosLevel: + node.profilePosLevel == null + ? "" + : Extension.ToThaiNumber(node.profilePosLevel.toString()), + education: + node.education == null + ? "" + : Extension.ToThaiNumber(node.education.toString()), salary: Extension.ToThaiNumber(node.salary.toLocaleString()), }; data.push(head); @@ -2825,9 +3105,9 @@ export class ReportController extends Controller { }; if (_node == null) { const head = { - posMasterNo: node.orgTreeShortName, + posMasterNo: Extension.ToThaiNumber(node.orgTreeShortName.toString()), profileFullname: "", - posExecutive: node.orgTreeName, + posExecutive: Extension.ToThaiNumber(node.orgTreeName.toString()), positionName: "", posType: "", posLevel: "", @@ -2844,12 +3124,21 @@ export class ReportController extends Controller { node.posMasterNo == null ? "" : Extension.ToThaiNumber(node.posMasterNo.toString()), - profileFullname: node.profileFullname, + profileFullname: + node.profileFullname == null + ? "" + : Extension.ToThaiNumber(node.profileFullname.toString()), posExecutive: node.posExecutive == undefined ? "" : node.posExecutive, - positionName: node.positionName, - posType: node.posType, - posLevel: node.posLevel, - education: node.education, + positionName: + node.positionName == null + ? "" + : Extension.ToThaiNumber(node.positionName.toString()), + posType: + node.posType == null ? "" : Extension.ToThaiNumber(node.posType.toString()), + posLevel: + node.posLevel == null ? "" : Extension.ToThaiNumber(node.posLevel.toString()), + education: + node.education == null ? "" : Extension.ToThaiNumber(node.education.toString()), salary: Extension.ToThaiNumber(node.salary.toLocaleString()), positionSalaryAmount: Extension.ToThaiNumber( node.positionSalaryAmount.toLocaleString(), @@ -2857,7 +3146,7 @@ export class ReportController extends Controller { mouthSalaryAmount: Extension.ToThaiNumber( node.mouthSalaryAmount.toLocaleString(), ), - reason: node.reason, + reason: node.reason == null ? "" : Extension.ToThaiNumber(node.reason.toString()), }; data.push(_head); } else { @@ -2888,12 +3177,21 @@ export class ReportController extends Controller { node.posMasterNo == null ? "" : Extension.ToThaiNumber(node.posMasterNo.toString()), - profileFullname: node.profileFullname, + profileFullname: + node.profileFullname == null + ? "" + : Extension.ToThaiNumber(node.profileFullname.toString()), posExecutive: node.posExecutive == _node.posExecutive ? "" : node.posExecutive, - positionName: node.positionName, - posType: node.posType, - posLevel: node.posLevel, - education: node.education, + positionName: + node.positionName == null + ? "" + : Extension.ToThaiNumber(node.positionName.toString()), + posType: + node.posType == null ? "" : Extension.ToThaiNumber(node.posType.toString()), + posLevel: + node.posLevel == null ? "" : Extension.ToThaiNumber(node.posLevel.toString()), + education: + node.education == null ? "" : Extension.ToThaiNumber(node.education.toString()), salary: Extension.ToThaiNumber(node.salary.toLocaleString()), positionSalaryAmount: Extension.ToThaiNumber( node.positionSalaryAmount.toLocaleString(), @@ -2901,7 +3199,7 @@ export class ReportController extends Controller { mouthSalaryAmount: Extension.ToThaiNumber( node.mouthSalaryAmount.toLocaleString(), ), - reason: node.reason, + reason: node.reason == null ? "" : Extension.ToThaiNumber(node.reason.toString()), }; data.push(head); } @@ -2999,9 +3297,9 @@ export class ReportController extends Controller { }; if (_node == null) { const head = { - posMasterNo: node.orgTreeShortName, + posMasterNo: Extension.ToThaiNumber(node.orgTreeShortName.toString()), profileFullname: "", - posExecutive: node.orgTreeName, + posExecutive: Extension.ToThaiNumber(node.orgTreeName.toString()), positionName: "", posType: "", posLevel: "", @@ -3018,12 +3316,23 @@ export class ReportController extends Controller { node.posMasterNo == null ? "" : Extension.ToThaiNumber(node.posMasterNo.toString()), - profileFullname: node.profileFullname, + profileFullname: + node.profileFullname == null + ? "" + : Extension.ToThaiNumber(node.profileFullname.toString()), posExecutive: node.posExecutive, - positionName: node.positionName, - posType: node.posType, - posLevel: node.posLevel, - education: node.education, + positionName: + node.positionName == null + ? "" + : Extension.ToThaiNumber(node.positionName.toString()), + posType: + node.posType == null ? "" : Extension.ToThaiNumber(node.posType.toString()), + posLevel: + node.posLevel == null ? "" : Extension.ToThaiNumber(node.posLevel.toString()), + education: + node.education == null + ? "" + : Extension.ToThaiNumber(node.education.toString()), salary: Extension.ToThaiNumber(node.salary.toLocaleString()), positionSalaryAmount: Extension.ToThaiNumber( node.positionSalaryAmount.toLocaleString(), @@ -3031,7 +3340,8 @@ export class ReportController extends Controller { mouthSalaryAmount: Extension.ToThaiNumber( node.mouthSalaryAmount.toLocaleString(), ), - reason: node.reason, + reason: + node.reason == null ? "" : Extension.ToThaiNumber(node.reason.toString()), }; data.push(_head); } else { @@ -3064,12 +3374,23 @@ export class ReportController extends Controller { node.posMasterNo == null ? "" : Extension.ToThaiNumber(node.posMasterNo.toString()), - profileFullname: node.profileFullname, + profileFullname: + node.profileFullname == null + ? "" + : Extension.ToThaiNumber(node.profileFullname.toString()), posExecutive: node.posExecutive == _node.posExecutive ? "" : node.posExecutive, - positionName: node.positionName, - posType: node.posType, - posLevel: node.posLevel, - education: node.education, + positionName: + node.positionName == null + ? "" + : Extension.ToThaiNumber(node.positionName.toString()), + posType: + node.posType == null ? "" : Extension.ToThaiNumber(node.posType.toString()), + posLevel: + node.posLevel == null ? "" : Extension.ToThaiNumber(node.posLevel.toString()), + education: + node.education == null + ? "" + : Extension.ToThaiNumber(node.education.toString()), salary: Extension.ToThaiNumber(node.salary.toLocaleString()), positionSalaryAmount: Extension.ToThaiNumber( node.positionSalaryAmount.toLocaleString(), @@ -3077,7 +3398,8 @@ export class ReportController extends Controller { mouthSalaryAmount: Extension.ToThaiNumber( node.mouthSalaryAmount.toLocaleString(), ), - reason: node.reason, + reason: + node.reason == null ? "" : Extension.ToThaiNumber(node.reason.toString()), }; data.push(head); } @@ -3174,9 +3496,9 @@ export class ReportController extends Controller { }; if (_node == null) { const head = { - posMasterNo: node.orgTreeShortName, + posMasterNo: Extension.ToThaiNumber(node.orgTreeShortName.toString()), profileFullname: "", - posExecutive: node.orgTreeName, + posExecutive: Extension.ToThaiNumber(node.orgTreeName.toString()), positionName: "", posType: "", posLevel: "", @@ -3193,12 +3515,25 @@ export class ReportController extends Controller { node.posMasterNo == null ? "" : Extension.ToThaiNumber(node.posMasterNo.toString()), - profileFullname: node.profileFullname, + profileFullname: + node.profileFullname == null + ? "" + : Extension.ToThaiNumber(node.profileFullname.toString()), posExecutive: node.posExecutive, - positionName: node.positionName, - posType: node.posType, - posLevel: node.posLevel, - education: node.education, + positionName: + node.positionName == null + ? "" + : Extension.ToThaiNumber(node.positionName.toString()), + posType: + node.posType == null ? "" : Extension.ToThaiNumber(node.posType.toString()), + posLevel: + node.posLevel == null + ? "" + : Extension.ToThaiNumber(node.posLevel.toString()), + education: + node.education == null + ? "" + : Extension.ToThaiNumber(node.education.toString()), salary: Extension.ToThaiNumber(node.salary.toLocaleString()), positionSalaryAmount: Extension.ToThaiNumber( node.positionSalaryAmount.toLocaleString(), @@ -3206,7 +3541,8 @@ export class ReportController extends Controller { mouthSalaryAmount: Extension.ToThaiNumber( node.mouthSalaryAmount.toLocaleString(), ), - reason: node.reason, + reason: + node.reason == null ? "" : Extension.ToThaiNumber(node.reason.toString()), }; data.push(_head); } else { @@ -3239,13 +3575,26 @@ export class ReportController extends Controller { node.posMasterNo == null ? "" : Extension.ToThaiNumber(node.posMasterNo.toString()), - profileFullname: node.profileFullname, + profileFullname: + node.profileFullname == null + ? "" + : Extension.ToThaiNumber(node.profileFullname.toString()), posExecutive: node.posExecutive == _node.posExecutive ? "" : node.posExecutive, - positionName: node.positionName, - posType: node.posType, - posLevel: node.posLevel, - education: node.education, + positionName: + node.positionName == null + ? "" + : Extension.ToThaiNumber(node.positionName.toString()), + posType: + node.posType == null ? "" : Extension.ToThaiNumber(node.posType.toString()), + posLevel: + node.posLevel == null + ? "" + : Extension.ToThaiNumber(node.posLevel.toString()), + education: + node.education == null + ? "" + : Extension.ToThaiNumber(node.education.toString()), salary: Extension.ToThaiNumber(node.salary.toLocaleString()), positionSalaryAmount: Extension.ToThaiNumber( node.positionSalaryAmount.toLocaleString(), @@ -3253,7 +3602,8 @@ export class ReportController extends Controller { mouthSalaryAmount: Extension.ToThaiNumber( node.mouthSalaryAmount.toLocaleString(), ), - reason: node.reason, + reason: + node.reason == null ? "" : Extension.ToThaiNumber(node.reason.toString()), }; data.push(head); } @@ -3350,9 +3700,9 @@ export class ReportController extends Controller { }; if (_node == null) { const head = { - posMasterNo: node.orgTreeShortName, + posMasterNo: Extension.ToThaiNumber(node.orgTreeShortName.toString()), profileFullname: "", - posExecutive: node.orgTreeName, + posExecutive: Extension.ToThaiNumber(node.orgTreeName.toString()), positionName: "", posType: "", posLevel: "", @@ -3369,12 +3719,27 @@ export class ReportController extends Controller { node.posMasterNo == null ? "" : Extension.ToThaiNumber(node.posMasterNo.toString()), - profileFullname: node.profileFullname, + profileFullname: + node.profileFullname == null + ? "" + : Extension.ToThaiNumber(node.profileFullname.toString()), posExecutive: node.posExecutive, - positionName: node.positionName, - posType: node.posType, - posLevel: node.posLevel, - education: node.education, + positionName: + node.positionName == null + ? "" + : Extension.ToThaiNumber(node.positionName.toString()), + posType: + node.posType == null + ? "" + : Extension.ToThaiNumber(node.posType.toString()), + posLevel: + node.posLevel == null + ? "" + : Extension.ToThaiNumber(node.posLevel.toString()), + education: + node.education == null + ? "" + : Extension.ToThaiNumber(node.education.toString()), salary: Extension.ToThaiNumber(node.salary.toLocaleString()), positionSalaryAmount: Extension.ToThaiNumber( node.positionSalaryAmount.toLocaleString(), @@ -3382,7 +3747,8 @@ export class ReportController extends Controller { mouthSalaryAmount: Extension.ToThaiNumber( node.mouthSalaryAmount.toLocaleString(), ), - reason: node.reason, + reason: + node.reason == null ? "" : Extension.ToThaiNumber(node.reason.toString()), }; data.push(_head); } else { @@ -3416,13 +3782,28 @@ export class ReportController extends Controller { node.posMasterNo == null ? "" : Extension.ToThaiNumber(node.posMasterNo.toString()), - profileFullname: node.profileFullname, + profileFullname: + node.profileFullname == null + ? "" + : Extension.ToThaiNumber(node.profileFullname.toString()), posExecutive: node.posExecutive == _node.posExecutive ? "" : node.posExecutive, - positionName: node.positionName, - posType: node.posType, - posLevel: node.posLevel, - education: node.education, + positionName: + node.positionName == null + ? "" + : Extension.ToThaiNumber(node.positionName.toString()), + posType: + node.posType == null + ? "" + : Extension.ToThaiNumber(node.posType.toString()), + posLevel: + node.posLevel == null + ? "" + : Extension.ToThaiNumber(node.posLevel.toString()), + education: + node.education == null + ? "" + : Extension.ToThaiNumber(node.education.toString()), salary: Extension.ToThaiNumber(node.salary.toLocaleString()), positionSalaryAmount: Extension.ToThaiNumber( node.positionSalaryAmount.toLocaleString(), @@ -3430,7 +3811,8 @@ export class ReportController extends Controller { mouthSalaryAmount: Extension.ToThaiNumber( node.mouthSalaryAmount.toLocaleString(), ), - reason: node.reason, + reason: + node.reason == null ? "" : Extension.ToThaiNumber(node.reason.toString()), }; data.push(head); } @@ -3529,9 +3911,9 @@ export class ReportController extends Controller { }; if (_node == null) { const head = { - posMasterNo: node.orgTreeShortName, + posMasterNo: Extension.ToThaiNumber(node.orgTreeShortName.toString()), profileFullname: "", - posExecutive: node.orgTreeName, + posExecutive: Extension.ToThaiNumber(node.orgTreeName.toString()), positionName: "", posType: "", posLevel: "", @@ -3548,12 +3930,27 @@ export class ReportController extends Controller { node.posMasterNo == null ? "" : Extension.ToThaiNumber(node.posMasterNo.toString()), - profileFullname: node.profileFullname, + profileFullname: + node.profileFullname == null + ? "" + : Extension.ToThaiNumber(node.profileFullname.toString()), posExecutive: node.posExecutive, - positionName: node.positionName, - posType: node.posType, - posLevel: node.posLevel, - education: node.education, + positionName: + node.positionName == null + ? "" + : Extension.ToThaiNumber(node.positionName.toString()), + posType: + node.posType == null + ? "" + : Extension.ToThaiNumber(node.posType.toString()), + posLevel: + node.posLevel == null + ? "" + : Extension.ToThaiNumber(node.posLevel.toString()), + education: + node.education == null + ? "" + : Extension.ToThaiNumber(node.education.toString()), salary: Extension.ToThaiNumber(node.salary.toLocaleString()), positionSalaryAmount: Extension.ToThaiNumber( node.positionSalaryAmount.toLocaleString(), @@ -3561,7 +3958,10 @@ export class ReportController extends Controller { mouthSalaryAmount: Extension.ToThaiNumber( node.mouthSalaryAmount.toLocaleString(), ), - reason: node.reason, + reason: + node.reason == null + ? "" + : Extension.ToThaiNumber(node.reason.toString()), }; data.push(_head); } else { @@ -3595,13 +3995,28 @@ export class ReportController extends Controller { node.posMasterNo == null ? "" : Extension.ToThaiNumber(node.posMasterNo.toString()), - profileFullname: node.profileFullname, + profileFullname: + node.profileFullname == null + ? "" + : Extension.ToThaiNumber(node.profileFullname.toString()), posExecutive: node.posExecutive == _node.posExecutive ? "" : node.posExecutive, - positionName: node.positionName, - posType: node.posType, - posLevel: node.posLevel, - education: node.education, + positionName: + node.positionName == null + ? "" + : Extension.ToThaiNumber(node.positionName.toString()), + posType: + node.posType == null + ? "" + : Extension.ToThaiNumber(node.posType.toString()), + posLevel: + node.posLevel == null + ? "" + : Extension.ToThaiNumber(node.posLevel.toString()), + education: + node.education == null + ? "" + : Extension.ToThaiNumber(node.education.toString()), salary: Extension.ToThaiNumber(node.salary.toLocaleString()), positionSalaryAmount: Extension.ToThaiNumber( node.positionSalaryAmount.toLocaleString(), @@ -3609,7 +4024,10 @@ export class ReportController extends Controller { mouthSalaryAmount: Extension.ToThaiNumber( node.mouthSalaryAmount.toLocaleString(), ), - reason: node.reason, + reason: + node.reason == null + ? "" + : Extension.ToThaiNumber(node.reason.toString()), }; data.push(head); }