แก้รายงานแบบย่อ
This commit is contained in:
parent
1a39c0bfb1
commit
cf03109db1
3 changed files with 83 additions and 59 deletions
|
|
@ -236,23 +236,23 @@ export class ProfileController extends Controller {
|
|||
let _child4 = child4 == null || child4 == undefined ? "" : `${child4.orgChild4Name}/`;
|
||||
|
||||
const salary_raw = await this.salaryRepo.find({
|
||||
select: [
|
||||
"commandDateAffect",
|
||||
"positionName",
|
||||
"posNo",
|
||||
"positionType",
|
||||
"positionLevel",
|
||||
"positionSalaryAmount",
|
||||
"commandNo",
|
||||
"amount",
|
||||
"remark",
|
||||
"orgRoot",
|
||||
"orgChild1",
|
||||
"orgChild2",
|
||||
"orgChild3",
|
||||
"orgChild4",
|
||||
"positionExecutive",
|
||||
],
|
||||
// select: [
|
||||
// "commandDateAffect",
|
||||
// "positionName",
|
||||
// "posNo",
|
||||
// "positionType",
|
||||
// "positionLevel",
|
||||
// "positionSalaryAmount",
|
||||
// "commandNo",
|
||||
// "amount",
|
||||
// "remark",
|
||||
// "orgRoot",
|
||||
// "orgChild1",
|
||||
// "orgChild2",
|
||||
// "orgChild3",
|
||||
// "orgChild4",
|
||||
// "positionExecutive",
|
||||
// ],
|
||||
where: {
|
||||
profileId: id,
|
||||
commandCode: In(["1", "2", "3", "4", "8", "10", "11", "12", "15", "16"]),
|
||||
|
|
@ -266,7 +266,11 @@ export class ProfileController extends Controller {
|
|||
date: item.commandDateAffect
|
||||
? Extension.ToThaiNumber(Extension.ToThaiShortDate(item.commandDateAffect))
|
||||
: null,
|
||||
position: item.positionName != null ? item.positionName : "-",
|
||||
position: Extension.ToThaiNumber(
|
||||
Extension.ToThaiNumber(
|
||||
`${item.positionName != null ? item.positionName : "-"} ${item.positionType == null ? item.positionCee : (item.positionType == "อำนวยการ" || item.positionType == "บริหาร" ? item.positionType : "") + item.positionLevel}`,
|
||||
),
|
||||
),
|
||||
posNo: item.posNo != null ? Extension.ToThaiNumber(item.posNo) : null,
|
||||
orgRoot: item.orgRoot,
|
||||
orgChild1: item.orgChild1,
|
||||
|
|
@ -349,7 +353,11 @@ export class ProfileController extends Controller {
|
|||
: "",
|
||||
position:
|
||||
salary_raw.length > 0 && salary_raw[0].positionName != null
|
||||
? Extension.ToThaiNumber(Extension.ToThaiNumber(salary_raw[0].positionName))
|
||||
? Extension.ToThaiNumber(
|
||||
Extension.ToThaiNumber(
|
||||
`${salary_raw[0].positionName != null ? salary_raw[0].positionName : "-"} ${salary_raw[0].positionType == null ? salary_raw[0].positionCee : (salary_raw[0].positionType == "อำนวยการ" || salary_raw[0].positionType == "บริหาร" ? salary_raw[0].positionType : "") + salary_raw[0].positionLevel}`,
|
||||
),
|
||||
)
|
||||
: "",
|
||||
positionCee:
|
||||
salary_raw.length > 0 && salary_raw[0].positionCee != null
|
||||
|
|
|
|||
|
|
@ -228,24 +228,24 @@ export class ProfileEmployeeController extends Controller {
|
|||
let _child4 = child4 == null || child4 == undefined ? "" : `${child4.orgChild4Name}/`;
|
||||
|
||||
const salary_raw = await this.salaryRepo.find({
|
||||
select: [
|
||||
"commandDateAffect",
|
||||
"posNo",
|
||||
"positionType",
|
||||
"positionLevel",
|
||||
"positionSalaryAmount",
|
||||
"commandNo",
|
||||
"amount",
|
||||
"remark",
|
||||
"positionName",
|
||||
"orgRoot",
|
||||
"orgChild1",
|
||||
"orgChild2",
|
||||
"orgChild3",
|
||||
"orgChild4",
|
||||
"positionCee",
|
||||
"positionExecutive",
|
||||
],
|
||||
// select: [
|
||||
// "commandDateAffect",
|
||||
// "posNo",
|
||||
// "positionType",
|
||||
// "positionLevel",
|
||||
// "positionSalaryAmount",
|
||||
// "commandNo",
|
||||
// "amount",
|
||||
// "remark",
|
||||
// "positionName",
|
||||
// "orgRoot",
|
||||
// "orgChild1",
|
||||
// "orgChild2",
|
||||
// "orgChild3",
|
||||
// "orgChild4",
|
||||
// "positionCee",
|
||||
// "positionExecutive",
|
||||
// ],
|
||||
where: {
|
||||
profileEmployeeId: id,
|
||||
commandCode: In(["1", "2", "3", "4", "8", "10", "11", "12", "15", "16"]),
|
||||
|
|
@ -258,7 +258,11 @@ export class ProfileEmployeeController extends Controller {
|
|||
date: item.commandDateAffect
|
||||
? Extension.ToThaiNumber(Extension.ToThaiShortDate(item.commandDateAffect))
|
||||
: null,
|
||||
position: item.positionName != null ? item.positionName : "-",
|
||||
position: Extension.ToThaiNumber(
|
||||
Extension.ToThaiNumber(
|
||||
`${item.positionName != null ? item.positionName : "-"} ${item.positionType == null ? item.positionCee : (item.positionType == "อำนวยการ" || item.positionType == "บริหาร" ? item.positionType : "") + item.positionLevel}`,
|
||||
),
|
||||
),
|
||||
posNo: item.posNo != null ? Extension.ToThaiNumber(item.posNo) : null,
|
||||
orgRoot: item.orgRoot,
|
||||
orgChild1: item.orgChild1,
|
||||
|
|
@ -341,7 +345,11 @@ export class ProfileEmployeeController extends Controller {
|
|||
: "",
|
||||
position:
|
||||
salary_raw.length > 0 && salary_raw[0].positionName != null
|
||||
? Extension.ToThaiNumber(Extension.ToThaiNumber(salary_raw[0].positionName))
|
||||
? Extension.ToThaiNumber(
|
||||
Extension.ToThaiNumber(
|
||||
`${salary_raw[0].positionName != null ? salary_raw[0].positionName : "-"} ${salary_raw[0].positionType == null ? salary_raw[0].positionCee : (salary_raw[0].positionType == "อำนวยการ" || salary_raw[0].positionType == "บริหาร" ? salary_raw[0].positionType : "") + salary_raw[0].positionLevel}`,
|
||||
),
|
||||
)
|
||||
: "",
|
||||
positionCee:
|
||||
salary_raw.length > 0 && salary_raw[0].positionCee != null
|
||||
|
|
|
|||
|
|
@ -223,24 +223,24 @@ export class ProfileEmployeeTempController extends Controller {
|
|||
let _child4 = child4 == null || child4 == undefined ? "" : `${child4.orgChild4Name}/`;
|
||||
|
||||
const salary_raw = await this.salaryRepo.find({
|
||||
select: [
|
||||
"commandDateAffect",
|
||||
"positionName",
|
||||
"posNo",
|
||||
"positionType",
|
||||
"positionLevel",
|
||||
"positionSalaryAmount",
|
||||
"commandNo",
|
||||
"amount",
|
||||
"remark",
|
||||
"orgRoot",
|
||||
"orgChild1",
|
||||
"orgChild2",
|
||||
"orgChild3",
|
||||
"orgChild4",
|
||||
"positionCee",
|
||||
"positionExecutive",
|
||||
],
|
||||
// select: [
|
||||
// "commandDateAffect",
|
||||
// "positionName",
|
||||
// "posNo",
|
||||
// "positionType",
|
||||
// "positionLevel",
|
||||
// "positionSalaryAmount",
|
||||
// "commandNo",
|
||||
// "amount",
|
||||
// "remark",
|
||||
// "orgRoot",
|
||||
// "orgChild1",
|
||||
// "orgChild2",
|
||||
// "orgChild3",
|
||||
// "orgChild4",
|
||||
// "positionCee",
|
||||
// "positionExecutive",
|
||||
// ],
|
||||
where: {
|
||||
profileEmployeeId: id,
|
||||
commandCode: In(["1", "2", "3", "4", "8", "10", "11", "12", "15", "16"]),
|
||||
|
|
@ -253,7 +253,11 @@ export class ProfileEmployeeTempController extends Controller {
|
|||
date: item.commandDateAffect
|
||||
? Extension.ToThaiNumber(Extension.ToThaiShortDate(item.commandDateAffect))
|
||||
: null,
|
||||
position: item.positionName != null ? item.positionName : "-",
|
||||
position: Extension.ToThaiNumber(
|
||||
Extension.ToThaiNumber(
|
||||
`${item.positionName != null ? item.positionName : "-"} ${item.positionType == null ? item.positionCee : (item.positionType == "อำนวยการ" || item.positionType == "บริหาร" ? item.positionType : "") + item.positionLevel}`,
|
||||
),
|
||||
),
|
||||
posNo: item.posNo != null ? Extension.ToThaiNumber(item.posNo) : null,
|
||||
orgRoot: item.orgRoot,
|
||||
orgChild1: item.orgChild1,
|
||||
|
|
@ -335,7 +339,11 @@ export class ProfileEmployeeTempController extends Controller {
|
|||
: "",
|
||||
position:
|
||||
salary_raw.length > 0 && salary_raw[0].positionName != null
|
||||
? Extension.ToThaiNumber(Extension.ToThaiNumber(salary_raw[0].positionName))
|
||||
? Extension.ToThaiNumber(
|
||||
Extension.ToThaiNumber(
|
||||
`${salary_raw[0].positionName != null ? salary_raw[0].positionName : "-"} ${salary_raw[0].positionType == null ? salary_raw[0].positionCee : (salary_raw[0].positionType == "อำนวยการ" || salary_raw[0].positionType == "บริหาร" ? salary_raw[0].positionType : "") + salary_raw[0].positionLevel}`,
|
||||
),
|
||||
)
|
||||
: "",
|
||||
positionCee:
|
||||
salary_raw.length > 0 && salary_raw[0].positionCee != null
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue