#1002,#1004,#1006,#1008,#1013,#1015,#1024,#1028,#1036,#1038,#1044,#1047,#1050
This commit is contained in:
parent
53bd4e09c2
commit
35b06d8c67
1 changed files with 154 additions and 86 deletions
|
|
@ -34,6 +34,7 @@ import { setLogDataDiff } from "../interfaces/utils";
|
|||
import { RequestWithUser } from "../middlewares/user";
|
||||
|
||||
import CallAPI from "../interfaces/call-api";
|
||||
import { isNotEmittedStatement } from "typescript";
|
||||
@Route("api/v1/salary/report")
|
||||
@Tags("Report")
|
||||
@Security("bearerAuth")
|
||||
|
|
@ -1715,7 +1716,7 @@ export class ReportController extends Controller {
|
|||
profile.amountSpecial == 0
|
||||
? ""
|
||||
: `(${Extension.ToThaiNumber(String(profile.amountSpecial.toLocaleString()))})`),
|
||||
score: profile.result?Extension.ToThaiNumber(profile.result):"-", //สรุปผลการประเมินฯ ระดับและคะแนน
|
||||
score: profile.result ? Extension.ToThaiNumber(profile.result) : "-", //สรุปผลการประเมินฯ ระดับและคะแนน
|
||||
remark:
|
||||
`${profile.type === "FULL" ? "หนึ่งขั้น" : ""}\n` +
|
||||
`${profile.type === "FULLHAFT" ? "หนึ่งขั้นครึ่ง" : ""}\n` +
|
||||
|
|
@ -1824,7 +1825,7 @@ export class ReportController extends Controller {
|
|||
profile.amountSpecial == 0
|
||||
? ""
|
||||
: `(${Extension.ToThaiNumber(String(profile.amountSpecial.toLocaleString()))})`),
|
||||
score: profile.result?Extension.ToThaiNumber(profile.result):"-", //สรุปผลการประเมินฯ ระดับและคะแนน
|
||||
score: profile.result ? Extension.ToThaiNumber(profile.result) : "-", //สรุปผลการประเมินฯ ระดับและคะแนน
|
||||
remark:
|
||||
`${profile.type === "FULL" ? "หนึ่งขั้น" : ""}\n` +
|
||||
`${profile.type === "FULLHAFT" ? "หนึ่งขั้นครึ่ง" : ""}\n` +
|
||||
|
|
@ -1922,7 +1923,7 @@ export class ReportController extends Controller {
|
|||
Extension.ToThaiNumber(profile.posMasterNo.toLocaleString()),
|
||||
amount: profile.amount ? Extension.ToThaiNumber(profile.amount.toLocaleString()) : null,
|
||||
reason: profile.remark, //เหตุผล
|
||||
score: profile.result?Extension.ToThaiNumber(profile.result):"-", //สรุปผลการประเมินฯ ระดับและคะแนน
|
||||
score: profile.result ? Extension.ToThaiNumber(profile.result) : "-", //สรุปผลการประเมินฯ ระดับและคะแนน
|
||||
remark: null, //หมายเหตุ
|
||||
};
|
||||
});
|
||||
|
|
@ -2016,7 +2017,7 @@ export class ReportController extends Controller {
|
|||
Extension.ToThaiNumber(profile.posMasterNo.toLocaleString()),
|
||||
amount: profile.amount ? Extension.ToThaiNumber(profile.amount.toLocaleString()) : null,
|
||||
reason: null, //เหตุผล
|
||||
score: profile.result?Extension.ToThaiNumber(profile.result):"-", //สรุปผลการประเมินฯ ระดับและคะแนน
|
||||
score: profile.result ? Extension.ToThaiNumber(profile.result) : "-", //สรุปผลการประเมินฯ ระดับและคะแนน
|
||||
remark: profile.remark, //หมายเหตุ
|
||||
};
|
||||
});
|
||||
|
|
@ -2072,6 +2073,7 @@ export class ReportController extends Controller {
|
|||
const convertGroup = group.toUpperCase();
|
||||
const salaryProfile = await this.salaryProfileRepository.find({
|
||||
where: {
|
||||
type: Not(In(["NONE","PENDING"])),
|
||||
salaryOrg: {
|
||||
snapshot: "SNAP2",
|
||||
rootId: rootId,
|
||||
|
|
@ -2305,6 +2307,10 @@ export class ReportController extends Controller {
|
|||
"firstName",
|
||||
"lastName",
|
||||
"root",
|
||||
"child1",
|
||||
"child2",
|
||||
"child3",
|
||||
"child4",
|
||||
"position",
|
||||
"posType",
|
||||
"posLevel",
|
||||
|
|
@ -2336,6 +2342,10 @@ export class ReportController extends Controller {
|
|||
"firstName",
|
||||
"lastName",
|
||||
"root",
|
||||
"child1",
|
||||
"child2",
|
||||
"child3",
|
||||
"child4",
|
||||
"position",
|
||||
"posType",
|
||||
"posLevel",
|
||||
|
|
@ -2351,7 +2361,7 @@ export class ReportController extends Controller {
|
|||
posMasterNo: "ASC",
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
const profileSpecial = salaryProfileSpecial.map((item, index) => ({
|
||||
no: Extension.ToThaiNumber(String(index + 1)),
|
||||
fullname: item.prefix + item.firstName + " " + item.lastName,
|
||||
|
|
@ -2613,14 +2623,14 @@ export class ReportController extends Controller {
|
|||
profile.child2,
|
||||
profile.child1,
|
||||
profile.root,
|
||||
fullName
|
||||
fullName,
|
||||
];
|
||||
const affiliationParts = [
|
||||
profile.child4,
|
||||
profile.child3,
|
||||
profile.child2,
|
||||
profile.child1,
|
||||
profile.root
|
||||
profile.root,
|
||||
];
|
||||
|
||||
const affiliation = affiliationParts
|
||||
|
|
@ -2643,7 +2653,7 @@ export class ReportController extends Controller {
|
|||
Extension.ToThaiNumber(profile.orgShortName) +
|
||||
Extension.ToThaiNumber(profile.posMasterNo.toLocaleString()),
|
||||
amount: profile.amount ? Extension.ToThaiNumber(profile.amount.toLocaleString()) : null,
|
||||
score: profile.result?Extension.ToThaiNumber(profile.result):"-",
|
||||
score: profile.result ? Extension.ToThaiNumber(profile.result) : "-",
|
||||
reason: profile.remark,
|
||||
};
|
||||
});
|
||||
|
|
@ -2724,14 +2734,16 @@ export class ReportController extends Controller {
|
|||
posLevel: profile.posLevel
|
||||
? `${profile.posTypeShort} ${Extension.ToThaiNumber(profile.posLevel.toLocaleString())}`
|
||||
: "-",
|
||||
posNumber: profile.orgShortName || profile.amount?
|
||||
Extension.ToThaiNumber(profile.orgShortName) +
|
||||
Extension.ToThaiNumber(profile.posMasterNo.toLocaleString()):"-",
|
||||
posNumber:
|
||||
profile.orgShortName || profile.amount
|
||||
? Extension.ToThaiNumber(profile.orgShortName) +
|
||||
Extension.ToThaiNumber(profile.posMasterNo.toLocaleString())
|
||||
: "-",
|
||||
amount: profile.amount ? Extension.ToThaiNumber(profile.amount.toLocaleString()) : "-",
|
||||
positionSalaryAmount: profile.positionSalaryAmount
|
||||
? Extension.ToThaiNumber(profile.positionSalaryAmount.toLocaleString())
|
||||
: "-",
|
||||
score: profile.result?Extension.ToThaiNumber(profile.result):"-", //สรุปผลการประเมินฯ ระดับและคะแนน
|
||||
score: profile.result ? Extension.ToThaiNumber(profile.result) : "-", //สรุปผลการประเมินฯ ระดับและคะแนน
|
||||
reason: profile.remark,
|
||||
};
|
||||
});
|
||||
|
|
@ -2818,8 +2830,10 @@ export class ReportController extends Controller {
|
|||
? "(" + Extension.ToThaiNumber(profile.amountSpecial.toString()) + ")"
|
||||
: "",
|
||||
amountSpecial:
|
||||
profile.amountSpecial > 0 ? Extension.ToThaiNumber(profile.amountSpecial.toLocaleString()) : "",
|
||||
score: profile.result?Extension.ToThaiNumber(profile.result):"-", //สรุปผลการประเมินฯ ระดับและคะแนน
|
||||
profile.amountSpecial > 0
|
||||
? Extension.ToThaiNumber(profile.amountSpecial.toLocaleString())
|
||||
: "",
|
||||
score: profile.result ? Extension.ToThaiNumber(profile.result) : "-", //สรุปผลการประเมินฯ ระดับและคะแนน
|
||||
reason: profile.remark,
|
||||
};
|
||||
});
|
||||
|
|
@ -2900,7 +2914,7 @@ export class ReportController extends Controller {
|
|||
? Extension.ToThaiNumber(profile.positionSalaryAmount.toLocaleString())
|
||||
: "-",
|
||||
reasonSign: "-",
|
||||
score: profile.result?Extension.ToThaiNumber(profile.result):"-", //สรุปผลการประเมินฯ ระดับและคะแนน
|
||||
score: profile.result ? Extension.ToThaiNumber(profile.result) : "-", //สรุปผลการประเมินฯ ระดับและคะแนน
|
||||
reason: profile.remark, //เหตุผลที่ไม่สมควรหรือไม่อาจเลื่อนขั้นค่าจ้าง
|
||||
};
|
||||
});
|
||||
|
|
@ -2974,15 +2988,17 @@ export class ReportController extends Controller {
|
|||
posLevel: profile.posLevel
|
||||
? `${profile.posTypeShort} ${Extension.ToThaiNumber(profile.posLevel.toLocaleString())}`
|
||||
: "-",
|
||||
posNumber: profile.orgShortName || profile.posMasterNo ?
|
||||
Extension.ToThaiNumber(profile.orgShortName) +
|
||||
Extension.ToThaiNumber(profile.posMasterNo.toLocaleString()):"-",
|
||||
posNumber:
|
||||
profile.orgShortName || profile.posMasterNo
|
||||
? Extension.ToThaiNumber(profile.orgShortName) +
|
||||
Extension.ToThaiNumber(profile.posMasterNo.toLocaleString())
|
||||
: "-",
|
||||
amount: profile.amount ? Extension.ToThaiNumber(profile.amount.toLocaleString()) : "-",
|
||||
positionSalaryAmount: profile.positionSalaryAmount
|
||||
? Extension.ToThaiNumber(profile.positionSalaryAmount.toLocaleString())
|
||||
: "-",
|
||||
reasonSign: "-",
|
||||
score: profile.result?Extension.ToThaiNumber(profile.result):"-", //สรุปผลการประเมินฯ ระดับและคะแนน
|
||||
score: profile.result ? Extension.ToThaiNumber(profile.result) : "-", //สรุปผลการประเมินฯ ระดับและคะแนน
|
||||
reason: profile.remark, //เหตุผลที่ไม่สมควรหรือไม่อาจเลื่อนขั้นค่าจ้าง
|
||||
};
|
||||
});
|
||||
|
|
@ -3174,7 +3190,7 @@ export class ReportController extends Controller {
|
|||
: profile.type === "FULL"
|
||||
? "๑ ขั้น"
|
||||
: "ไม่ได้เลื่อนขั้นฯ",
|
||||
score: profile.result?Extension.ToThaiNumber(profile.result):"-", //ผลการประเมิน
|
||||
score: profile.result ? Extension.ToThaiNumber(profile.result) : "-", //ผลการประเมิน
|
||||
remark: profile.remark, //หมายเหตุ
|
||||
};
|
||||
});
|
||||
|
|
@ -3250,7 +3266,7 @@ export class ReportController extends Controller {
|
|||
no: Extension.ToThaiNumber((index + 1).toLocaleString()),
|
||||
fullName: fullName,
|
||||
affiliation: affiliation,
|
||||
position: profile.position??"-",
|
||||
position: profile.position ?? "-",
|
||||
posLevel: profile.posLevel
|
||||
? Extension.ToThaiNumber(String(profile.posLevel.toLocaleString()))
|
||||
: "-",
|
||||
|
|
@ -3261,8 +3277,12 @@ export class ReportController extends Controller {
|
|||
template: "emp1-10",
|
||||
reportName: "emp1-10",
|
||||
data: {
|
||||
yearOld: salaryPeriod.year?Extension.ToThaiNumber(String(Extension.ToThaiYear(salaryPeriod.year - 1))):"",
|
||||
year: salaryPeriod.year?Extension.ToThaiNumber(String(Extension.ToThaiYear(salaryPeriod.year))):"",
|
||||
yearOld: salaryPeriod.year
|
||||
? Extension.ToThaiNumber(String(Extension.ToThaiYear(salaryPeriod.year - 1)))
|
||||
: "",
|
||||
year: salaryPeriod.year
|
||||
? Extension.ToThaiNumber(String(Extension.ToThaiYear(salaryPeriod.year)))
|
||||
: "",
|
||||
agency: agency,
|
||||
data: formattedData,
|
||||
},
|
||||
|
|
@ -3402,14 +3422,16 @@ export class ReportController extends Controller {
|
|||
posLevel: profile.posLevel
|
||||
? `${profile.posTypeShort} ${Extension.ToThaiNumber(profile.posLevel.toLocaleString())}`
|
||||
: "-",
|
||||
posNumber: profile.orgShortName || profile.posMasterNo ?
|
||||
Extension.ToThaiNumber(profile.orgShortName) +
|
||||
Extension.ToThaiNumber(profile.posMasterNo.toLocaleString()):"-",
|
||||
posNumber:
|
||||
profile.orgShortName || profile.posMasterNo
|
||||
? Extension.ToThaiNumber(profile.orgShortName) +
|
||||
Extension.ToThaiNumber(profile.posMasterNo.toLocaleString())
|
||||
: "-",
|
||||
amount: profile.amount ? Extension.ToThaiNumber(profile.amount.toLocaleString()) : "-",
|
||||
positionSalaryAmount: profile.positionSalaryAmount
|
||||
? Extension.ToThaiNumber(profile.positionSalaryAmount.toLocaleString())
|
||||
: "-",
|
||||
score: profile.result?Extension.ToThaiNumber(profile.result):"-", //สรุปผลการประเมินฯ ระดับและคะแนน
|
||||
score: profile.result ? Extension.ToThaiNumber(profile.result) : "-", //สรุปผลการประเมินฯ ระดับและคะแนน
|
||||
remark:
|
||||
`${profile.type === "FULL" ? "หนึ่งขั้น" : ""}\n` +
|
||||
`${profile.type === "FULLHAFT" ? "หนึ่งขั้นครึ่ง" : ""}\n` +
|
||||
|
|
@ -3483,15 +3505,17 @@ export class ReportController extends Controller {
|
|||
no: Extension.ToThaiNumber((index + 1).toLocaleString()),
|
||||
fullName: fullName,
|
||||
affiliation: affiliation,
|
||||
position: profile.position,
|
||||
position: profile.position??"-",
|
||||
posLevel: profile.posLevel
|
||||
? `${profile.posTypeShort} ${Extension.ToThaiNumber(profile.posLevel.toLocaleString())}`
|
||||
: "-",
|
||||
posNumber:profile.orgShortName || profile.posMasterNo ?
|
||||
Extension.ToThaiNumber(profile.orgShortName) +
|
||||
Extension.ToThaiNumber(profile.posMasterNo.toLocaleString()):"-",
|
||||
posNumber:
|
||||
profile.orgShortName || profile.posMasterNo
|
||||
? Extension.ToThaiNumber(profile.orgShortName) +
|
||||
Extension.ToThaiNumber(profile.posMasterNo.toLocaleString())
|
||||
: "-",
|
||||
amount: profile.amount ? Extension.ToThaiNumber(profile.amount.toLocaleString()) : "-",
|
||||
score: profile.result?Extension.ToThaiNumber(profile.result):"-", //สรุปผลการประเมินฯ ระดับและคะแนน
|
||||
score: profile.result ? Extension.ToThaiNumber(profile.result) : "-", //สรุปผลการประเมินฯ ระดับและคะแนน
|
||||
reason: profile.remark, // หมายเหตุ
|
||||
};
|
||||
});
|
||||
|
|
@ -3562,13 +3586,15 @@ export class ReportController extends Controller {
|
|||
no: Extension.ToThaiNumber((index + 1).toLocaleString()),
|
||||
fullName: fullName,
|
||||
affiliation: affiliation,
|
||||
position: profile.position?? "-",
|
||||
position: profile.position ?? "-",
|
||||
posLevel: profile.posLevel
|
||||
? `${profile.posTypeShort} ${Extension.ToThaiNumber(profile.posLevel.toLocaleString())}`
|
||||
: "-",
|
||||
posNumber:profile.orgShortName || profile.posMasterNo ?
|
||||
Extension.ToThaiNumber(profile.orgShortName) +
|
||||
Extension.ToThaiNumber(profile.posMasterNo.toLocaleString()):"-",
|
||||
posNumber:
|
||||
profile.orgShortName || profile.posMasterNo
|
||||
? Extension.ToThaiNumber(profile.orgShortName) +
|
||||
Extension.ToThaiNumber(profile.posMasterNo.toLocaleString())
|
||||
: "-",
|
||||
amount: profile.amount ? Extension.ToThaiNumber(profile.amount.toLocaleString()) : "-",
|
||||
reason: null, // หมายเหตุ
|
||||
};
|
||||
|
|
@ -3639,23 +3665,29 @@ export class ReportController extends Controller {
|
|||
no: Extension.ToThaiNumber((index + 1).toLocaleString()),
|
||||
fullName: fullName,
|
||||
affiliation: affiliation,
|
||||
position: profile.position?? "-",
|
||||
position: profile.position ?? "-",
|
||||
posLevel: profile.posLevel
|
||||
? `${profile.posTypeShort} ${Extension.ToThaiNumber(profile.posLevel.toLocaleString())}`
|
||||
: "-",
|
||||
posNumber:profile.orgShortName || profile.posMasterNo ?
|
||||
Extension.ToThaiNumber(profile.orgShortName) +
|
||||
Extension.ToThaiNumber(profile.posMasterNo.toLocaleString()):"-",
|
||||
posNumber:
|
||||
profile.orgShortName || profile.posMasterNo
|
||||
? Extension.ToThaiNumber(profile.orgShortName) +
|
||||
Extension.ToThaiNumber(profile.posMasterNo.toLocaleString())
|
||||
: "-",
|
||||
amount: profile.positionSalaryAmount
|
||||
? Extension.ToThaiNumber(profile.positionSalaryAmount.toLocaleString())
|
||||
: "-",
|
||||
precentTwo:
|
||||
profile.positionSalaryAmountPer == 0.02
|
||||
? Extension.ToThaiNumber((profile.positionSalaryAmount * profile.positionSalaryAmountPer).toLocaleString())
|
||||
? Extension.ToThaiNumber(
|
||||
(profile.positionSalaryAmount * profile.positionSalaryAmountPer).toLocaleString(),
|
||||
)
|
||||
: "-", //ร้อยละ 2
|
||||
precentFour:
|
||||
profile.positionSalaryAmountPer == 0.04
|
||||
? Extension.ToThaiNumber((profile.positionSalaryAmount * profile.positionSalaryAmountPer).toLocaleString())
|
||||
? Extension.ToThaiNumber(
|
||||
(profile.positionSalaryAmount * profile.positionSalaryAmountPer).toLocaleString(),
|
||||
)
|
||||
: "-", //ร้อยละ 4
|
||||
reason: null, // หมายเหตุ
|
||||
};
|
||||
|
|
@ -4027,6 +4059,16 @@ export class ReportController extends Controller {
|
|||
},
|
||||
},
|
||||
});
|
||||
const salaryPeriodOCTProfile = await this.salaryProfileEmployeeRepository.find({
|
||||
relations: ["salaryOrg"],
|
||||
where: {
|
||||
salaryOrg: {
|
||||
snapshot: "SNAP2",
|
||||
rootId: rootId,
|
||||
salaryPeriodId: salaryPeriod?.id,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
const octPreviousYear = await this.salaryPeriodRepository.findOne({
|
||||
where: {
|
||||
|
|
@ -4117,14 +4159,14 @@ export class ReportController extends Controller {
|
|||
no: Extension.ToThaiNumber((index + 1).toLocaleString()),
|
||||
fullName: fullName,
|
||||
affiliation: affiliation,
|
||||
position: profile.position,
|
||||
position: profile.position??"-",
|
||||
posNumber:
|
||||
Extension.ToThaiNumber(profile.orgShortName) +
|
||||
Extension.ToThaiNumber(profile.posMasterNo.toLocaleString()),
|
||||
amount: profile.amount ? Extension.ToThaiNumber(profile.amount.toLocaleString()) : null,
|
||||
amount: profile.amount ? Extension.ToThaiNumber(profile.amount.toLocaleString()) : "-",
|
||||
yearOld2:
|
||||
octPreviousYear2 == null
|
||||
? null
|
||||
? "-"
|
||||
: Extension.ToThaiNumber(octPreviousYear2.year.toString()),
|
||||
typeOld2:
|
||||
octPreviousYear2 && octPreviousYearProfile2.length > 0
|
||||
|
|
@ -4143,9 +4185,9 @@ export class ReportController extends Controller {
|
|||
}
|
||||
return null;
|
||||
})()
|
||||
: null,
|
||||
: "-",
|
||||
yearOld:
|
||||
octPreviousYear == null ? null : Extension.ToThaiNumber(octPreviousYear.year.toString()),
|
||||
octPreviousYear == null ? "-" : Extension.ToThaiNumber(octPreviousYear.year.toString()),
|
||||
typeOld1:
|
||||
octPreviousYear && octPreviousYearProfile.length > 0
|
||||
? (() => {
|
||||
|
|
@ -4163,7 +4205,7 @@ export class ReportController extends Controller {
|
|||
}
|
||||
return null;
|
||||
})()
|
||||
: null,
|
||||
: "-",
|
||||
typeOld:
|
||||
salaryPeriodAPRProfile.length > 0
|
||||
? (() => {
|
||||
|
|
@ -4180,15 +4222,24 @@ export class ReportController extends Controller {
|
|||
? "๑.๕ ขั้น"
|
||||
: "ไม่ได้เลื่อนขั้นฯ";
|
||||
})()
|
||||
: null, //เมษา ปีเดียวกัน
|
||||
: "-", //เมษา ปีเดียวกัน
|
||||
type:
|
||||
profile.type === "HAFT"
|
||||
? "๐.๕ ขั้น"
|
||||
: profile.type === "FULL"
|
||||
? "๑ ขั้น"
|
||||
: profile.type === "FULLHAFT"
|
||||
? "๑.๕ ขั้น"
|
||||
: "ไม่ได้เลื่อนขั้นฯ", //หน่วยงานพิจารณาเลื่อนขั้นค่าจ้าง 1 ต.ค. (จำนวนขั้น)
|
||||
salaryPeriodOCTProfile.length > 0
|
||||
? (() => {
|
||||
const _profile = salaryPeriodOCTProfile
|
||||
.filter((profileOCT) => profileOCT.citizenId === profile.citizenId)
|
||||
.map((profile) => ({
|
||||
type: profile.type,
|
||||
}));
|
||||
return _profile[0]?.type === "HAFT"
|
||||
? "๐.๕ ขั้น"
|
||||
: _profile[0]?.type === "FULL"
|
||||
? "๑ ขั้น"
|
||||
: _profile[0]?.type === "FULLHAFT"
|
||||
? "๑.๕ ขั้น"
|
||||
: "ไม่ได้เลื่อนขั้นฯ";
|
||||
})()
|
||||
: "-", //ตุลา ปีเดียวกัน
|
||||
};
|
||||
});
|
||||
|
||||
|
|
@ -4513,20 +4564,25 @@ export class ReportController extends Controller {
|
|||
(profile.child2 == undefined && profile.child2 == null ? "" : profile.child2 + "/") +
|
||||
(profile.child1 == undefined && profile.child1 == null ? "" : profile.child1 + "/") +
|
||||
(profile.root == undefined && profile.root == null ? "" : profile.root),
|
||||
posLevel: profile.posLevel? Extension.ToThaiNumber(profile.posLevel.toLocaleString()): "-",
|
||||
posNumber:profile.orgShortName || profile.posMasterNo?
|
||||
Extension.ToThaiNumber(profile.orgShortName) +
|
||||
Extension.ToThaiNumber(profile.posMasterNo.toLocaleString()): "-",
|
||||
posLevel: profile.posLevel
|
||||
? Extension.ToThaiNumber(profile.posLevel.toLocaleString())
|
||||
: "-",
|
||||
posNumber:
|
||||
profile.orgShortName || profile.posMasterNo
|
||||
? Extension.ToThaiNumber(profile.orgShortName) +
|
||||
Extension.ToThaiNumber(profile.posMasterNo.toLocaleString())
|
||||
: "-",
|
||||
amount: profile.amount ? Extension.ToThaiNumber(profile.amount.toLocaleString()) : "-",
|
||||
positionSalaryAmount: profile.positionSalaryAmount
|
||||
? Extension.ToThaiNumber(profile.positionSalaryAmount.toLocaleString())
|
||||
: "-",
|
||||
score: profile.result?Extension.ToThaiNumber(profile.result):"-",
|
||||
score: profile.result ? Extension.ToThaiNumber(profile.result) : "-",
|
||||
// reason: profile.remark,
|
||||
reason:`${profile.type === "FULL" ? "หนึ่งขั้น" : ""}\n` +
|
||||
`${profile.type === "FULLHAFT" ? "หนึ่งขั้นครึ่ง" : ""}\n` +
|
||||
`${profile.amountSpecial > 0 ? "ได้รับค่าตอบแทนพิเศษ\n" : ""}` +
|
||||
`${profile.isNext === true ? "(ได้รับเงินเดือนสูงกว่าขั้นสูงฯ)" : ""}`, // หมายเหตุ
|
||||
reason:
|
||||
`${profile.type === "FULL" ? "หนึ่งขั้น" : ""}\n` +
|
||||
`${profile.type === "FULLHAFT" ? "หนึ่งขั้นครึ่ง" : ""}\n` +
|
||||
`${profile.amountSpecial > 0 ? "ได้รับค่าตอบแทนพิเศษ\n" : ""}` +
|
||||
`${profile.isNext === true ? "(ได้รับเงินเดือนสูงกว่าขั้นสูงฯ)" : ""}`, // หมายเหตุ
|
||||
};
|
||||
});
|
||||
|
||||
|
|
@ -4693,15 +4749,19 @@ export class ReportController extends Controller {
|
|||
fullName: fullName,
|
||||
affiliation: affiliation,
|
||||
position: profile.position ?? "-",
|
||||
posLevel: profile.posLevel?Extension.ToThaiNumber(profile.posLevel.toLocaleString()) : "-",
|
||||
posNumber:profile.orgShortName || profile.posMasterNo ?
|
||||
Extension.ToThaiNumber(profile.orgShortName) +
|
||||
Extension.ToThaiNumber(profile.posMasterNo.toLocaleString()):"-",
|
||||
posLevel: profile.posLevel
|
||||
? Extension.ToThaiNumber(profile.posLevel.toLocaleString())
|
||||
: "-",
|
||||
posNumber:
|
||||
profile.orgShortName || profile.posMasterNo
|
||||
? Extension.ToThaiNumber(profile.orgShortName) +
|
||||
Extension.ToThaiNumber(profile.posMasterNo.toLocaleString())
|
||||
: "-",
|
||||
amount: profile.amount ? Extension.ToThaiNumber(profile.amount.toLocaleString()) : "-",
|
||||
positionSalaryAmount: profile.positionSalaryAmount
|
||||
? Extension.ToThaiNumber(profile.positionSalaryAmount.toLocaleString())
|
||||
: "-",
|
||||
score: profile.result?Extension.ToThaiNumber(profile.result):"-",
|
||||
score: profile.result ? Extension.ToThaiNumber(profile.result) : "-",
|
||||
reason: profile.remark,
|
||||
remark: null,
|
||||
};
|
||||
|
|
@ -4779,14 +4839,18 @@ export class ReportController extends Controller {
|
|||
no: Extension.ToThaiNumber((index + 1).toLocaleString()),
|
||||
fullName: fullName,
|
||||
affiliation: affiliation,
|
||||
position: profile.position??"-",
|
||||
posLevel: profile.posLevel? Extension.ToThaiNumber(profile.posLevel.toLocaleString()):"-",
|
||||
posNumber: profile.orgShortName || profile.posMasterNo ?
|
||||
Extension.ToThaiNumber(profile.orgShortName) +
|
||||
Extension.ToThaiNumber(profile.posMasterNo.toLocaleString()):"-",
|
||||
position: profile.position ?? "-",
|
||||
posLevel: profile.posLevel
|
||||
? Extension.ToThaiNumber(profile.posLevel.toLocaleString())
|
||||
: "-",
|
||||
posNumber:
|
||||
profile.orgShortName || profile.posMasterNo
|
||||
? Extension.ToThaiNumber(profile.orgShortName) +
|
||||
Extension.ToThaiNumber(profile.posMasterNo.toLocaleString())
|
||||
: "-",
|
||||
amount: profile.amount ? Extension.ToThaiNumber(profile.amount.toLocaleString()) : "-",
|
||||
reason: profile.remark,
|
||||
score: profile.result?Extension.ToThaiNumber(profile.result):"-",
|
||||
score: profile.result ? Extension.ToThaiNumber(profile.result) : "-",
|
||||
signature: null,
|
||||
};
|
||||
});
|
||||
|
|
@ -5159,7 +5223,7 @@ export class ReportController extends Controller {
|
|||
reason1: null, //เหตุผลที่ไม่ได้เลื่อนขั้น
|
||||
reason2: null, //เหตุผลที่ไม่ได้เลื่อนขั้น
|
||||
reason3: null, //เหตุผลที่ไม่ได้เลื่อนขั้น
|
||||
score: profile.result?Extension.ToThaiNumber(profile.result):"-",
|
||||
score: profile.result ? Extension.ToThaiNumber(profile.result) : "-",
|
||||
reason: profile.remark,
|
||||
};
|
||||
});
|
||||
|
|
@ -5683,10 +5747,11 @@ export class ReportController extends Controller {
|
|||
rootId: rootId,
|
||||
salaryPeriodId: salaryPeriodId,
|
||||
},
|
||||
type: "NONE",
|
||||
type: In(["NONE","PENDING"]),
|
||||
isRetired: false,
|
||||
},
|
||||
order: {
|
||||
type: "DESC",
|
||||
orgShortName: "ASC",
|
||||
posMasterNo: "ASC",
|
||||
},
|
||||
|
|
@ -5740,7 +5805,7 @@ export class ReportController extends Controller {
|
|||
positionSalaryAmount: profile.positionSalaryAmount
|
||||
? Extension.ToThaiNumber(profile.positionSalaryAmount.toLocaleString())
|
||||
: "-",
|
||||
reason: profile.remark??null,
|
||||
reason: profile.remark ?? null,
|
||||
};
|
||||
});
|
||||
|
||||
|
|
@ -5876,7 +5941,8 @@ export class ReportController extends Controller {
|
|||
const _salaryPeriod = await this.salaryProfileEmployeeRepository.find({
|
||||
relations: ["salaryOrg", "salaryOrg.salaryPeriod"],
|
||||
where: {
|
||||
type: "NONE",
|
||||
type: Not(In(["NONE","PENDING"])),
|
||||
amountSpecial: 0,
|
||||
salaryOrg: {
|
||||
snapshot: "SNAP2",
|
||||
rootId: rootId,
|
||||
|
|
@ -5913,13 +5979,15 @@ export class ReportController extends Controller {
|
|||
no: Extension.ToThaiNumber((index + 1).toLocaleString()),
|
||||
fullName: fullName,
|
||||
affiliation: affiliation,
|
||||
position: profile.position??"-",
|
||||
position: profile.position ?? "-",
|
||||
posLevel: profile.posLevel
|
||||
? Extension.ToThaiNumber(profile.posLevel.toLocaleString())
|
||||
: "-",
|
||||
posNumber:
|
||||
profile.orgShortName || profile.posMasterNo? Extension.ToThaiNumber(profile.orgShortName) +
|
||||
Extension.ToThaiNumber(profile.posMasterNo.toLocaleString()):"-",
|
||||
profile.orgShortName || profile.posMasterNo
|
||||
? Extension.ToThaiNumber(profile.orgShortName) +
|
||||
Extension.ToThaiNumber(profile.posMasterNo.toLocaleString())
|
||||
: "-",
|
||||
amount: profile.amount ? Extension.ToThaiNumber(profile.amount.toLocaleString()) : "-",
|
||||
reason: null,
|
||||
};
|
||||
|
|
@ -6245,9 +6313,9 @@ export class ReportController extends Controller {
|
|||
|
||||
return {
|
||||
no: Extension.ToThaiNumber((index + 1).toLocaleString()),
|
||||
fullName: fullName??"-",
|
||||
affiliation: affiliation??"-",
|
||||
position: profile.position??"-",
|
||||
fullName: fullName ?? "-",
|
||||
affiliation: affiliation ?? "-",
|
||||
position: profile.position ?? "-",
|
||||
posLevel: profile.posLevel
|
||||
? Extension.ToThaiNumber(profile.posLevel.toLocaleString())
|
||||
: "-",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue