fix report gov1-04
This commit is contained in:
parent
d5f40373a8
commit
2fc8c3d459
1 changed files with 37 additions and 30 deletions
|
|
@ -486,37 +486,44 @@ export class ReportController extends Controller {
|
||||||
"amount",
|
"amount",
|
||||||
"amountSpecial",
|
"amountSpecial",
|
||||||
],
|
],
|
||||||
|
order: {
|
||||||
|
"posMasterNo": "ASC",
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return new HttpSuccess({
|
||||||
|
template: "gov1-04",
|
||||||
|
reportName: "gov1-04",
|
||||||
|
data: {
|
||||||
|
year: Extension.ToThaiNumber(String(Extension.ToThaiYear(salaryPeriod?.year))),
|
||||||
|
effectiveDate: salaryPeriod?.effectiveDate,
|
||||||
|
root: salaryProfile[0]?.root,
|
||||||
|
profile: salaryProfile.map((item, index) => ({
|
||||||
|
no: Extension.ToThaiNumber(String(index + 1)),
|
||||||
|
fullname: item.prefix + item.firstName + " " + item.lastName,
|
||||||
|
position:
|
||||||
|
item.position +
|
||||||
|
"/" +
|
||||||
|
(item.child4 == undefined && item.child4 == null ? "" : item.child4 + "/") +
|
||||||
|
(item.child3 == undefined && item.child3 == null ? "" : item.child3 + "/") +
|
||||||
|
(item.child2 == undefined && item.child2 == null ? "" : item.child2 + "/") +
|
||||||
|
(item.child1 == undefined && item.child1 == null ? "" : item.child1 + "/") +
|
||||||
|
(item.root == undefined && item.root == null ? "" : item.root),
|
||||||
|
posLevel: item.posLevel,
|
||||||
|
orgShortName: item.orgShortName + Extension.ToThaiNumber(String(item.posMasterNo)),
|
||||||
|
amount:
|
||||||
|
item.amount == undefined || item.amount == null
|
||||||
|
? "๐"
|
||||||
|
: Extension.ToThaiNumber(String(item.amount)),
|
||||||
|
amountSpecial:
|
||||||
|
item.amountSpecial == undefined || item.amountSpecial == null
|
||||||
|
? "๐"
|
||||||
|
: Extension.ToThaiNumber(String(item.amountSpecial)),
|
||||||
|
score: null, //สรุปผลการประเมินฯ ระดับและคะแนน
|
||||||
|
remark: null, //หมายเหตุ
|
||||||
|
})),
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const mapData = {
|
|
||||||
effectiveDate: salaryPeriod?.effectiveDate,
|
|
||||||
root: salaryProfile[0]?.root,
|
|
||||||
profile: salaryProfile.map((item, index) => ({
|
|
||||||
no: Extension.ToThaiNumber(String(index + 1)),
|
|
||||||
fullname: item.prefix + item.firstName + " " + item.lastName,
|
|
||||||
position:
|
|
||||||
item.position +
|
|
||||||
"/" +
|
|
||||||
(item.child4 == undefined && item.child4 == null ? "" : item.child4 + "/") +
|
|
||||||
(item.child3 == undefined && item.child3 == null ? "" : item.child3 + "/") +
|
|
||||||
(item.child2 == undefined && item.child2 == null ? "" : item.child2 + "/") +
|
|
||||||
(item.child1 == undefined && item.child1 == null ? "" : item.child1 + "/") +
|
|
||||||
(item.root == undefined && item.root == null ? "" : item.root),
|
|
||||||
posLevel: item.posLevel,
|
|
||||||
orgShortName: item.orgShortName + Extension.ToThaiNumber(String(item.posMasterNo)),
|
|
||||||
amount:
|
|
||||||
item.amount == undefined || item.amount == null
|
|
||||||
? "๐"
|
|
||||||
: Extension.ToThaiNumber(String(item.amount)),
|
|
||||||
amountSpecial:
|
|
||||||
item.amountSpecial == undefined || item.amountSpecial == null
|
|
||||||
? "๐"
|
|
||||||
: Extension.ToThaiNumber(String(item.amountSpecial)),
|
|
||||||
score: null, //สรุปผลการประเมินฯ ระดับและคะแนน
|
|
||||||
remark: null, //หมายเหตุ
|
|
||||||
})),
|
|
||||||
};
|
|
||||||
return mapData;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue