Merge branch 'develop' of github.com:Frappet/bma-ehr-salary into develop

This commit is contained in:
Kittapath 2024-03-20 11:04:55 +07:00
commit 9404c61b5e

View file

@ -534,31 +534,34 @@ export class ReportController extends Controller {
], ],
}); });
const mapData = { return new HttpSuccess({
effectiveDate: salaryPeriod?.effectiveDate, template: "gov1-03",
// root: salaryProfile[0]?.root, reportName: "gov1-03",
profile: salaryProfile.map((item, index) => ({ data: {
no: Extension.ToThaiNumber(String(index + 1)), year: Extension.ToThaiNumber(String(salaryPeriod.year)),
fullname: item.prefix + item.firstName + " " + item.lastName, root: salaryProfile[0]?.root,
position: profile: salaryProfile.map((item, index) => ({
item.position + no: Extension.ToThaiNumber(String(index + 1)),
"/" + fullname:
(item.child4 == undefined && item.child4 == null ? "" : item.child4 + "/") + (item.child4 == undefined && item.child4 == null ? "" : item.child4 + "/") +
(item.child3 == undefined && item.child3 == null ? "" : item.child3 + "/") + (item.child3 == undefined && item.child3 == null ? "" : item.child3 + "/") +
(item.child2 == undefined && item.child2 == null ? "" : item.child2 + "/") + (item.child2 == undefined && item.child2 == null ? "" : item.child2 + "/") +
(item.child1 == undefined && item.child1 == null ? "" : item.child1 + "/") + (item.child1 == undefined && item.child1 == null ? "" : item.child1 + "/") +
(item.root == undefined && item.root == null ? "" : item.root), (item.root == undefined && item.root == null ? "" : item.root)+
posLevel: item.posLevel, "/" + item.prefix + item.firstName + " " + item.lastName, // สังกัด/ชื่อ-นามสกุล
posMasterNo: Extension.ToThaiNumber(String(item.posMasterNo)), posLevel: item.posLevel,
amount: posMasterNo: Extension.ToThaiNumber(String(item.posMasterNo)),
item.amount == undefined || item.amount == null amount:
? "" item.amount == undefined || item.amount == null
: Extension.ToThaiNumber(String(item.amount)), ? ""
score: null, //สรุปผลการประเมินฯ ระดับและคะแนน : Extension.ToThaiNumber(String(item.amount.toLocaleString())),
remark: null, //หมายเหตุ salaryIncrease1: null, //การเลื่อนเงินเดือนปีก่อนๆหน้า
})), salaryIncrease2: null, //การเลื่อนเงินเดือนปีก่อนหน้า
}; score: null, //ผลการประเมินฯ
return mapData; remark: null, //หมายเหตุ
}))
}
});
} }
/** /**