เพิ่มหมายเหตุ
This commit is contained in:
parent
9ac38618df
commit
9e2f87e7b3
7 changed files with 204 additions and 162 deletions
|
|
@ -1057,7 +1057,11 @@ export class ReportController extends Controller {
|
||||||
* @param {string} salaryPeriodId Guid, *Id Period
|
* @param {string} salaryPeriodId Guid, *Id Period
|
||||||
*/
|
*/
|
||||||
@Get("gov-03/{rootId}/{salaryPeriodId}/{group}")
|
@Get("gov-03/{rootId}/{salaryPeriodId}/{group}")
|
||||||
async SalaryReport3(@Path() rootId: string, @Path() salaryPeriodId: string, @Path() group: string) {
|
async SalaryReport3(
|
||||||
|
@Path() rootId: string,
|
||||||
|
@Path() salaryPeriodId: string,
|
||||||
|
@Path() group: string,
|
||||||
|
) {
|
||||||
const salaryPeriod = await this.salaryPeriodRepository.findOne({
|
const salaryPeriod = await this.salaryPeriodRepository.findOne({
|
||||||
where: {
|
where: {
|
||||||
id: salaryPeriodId,
|
id: salaryPeriodId,
|
||||||
|
|
@ -1129,7 +1133,6 @@ export class ReportController extends Controller {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
//รอบปีก่อนหน้า
|
//รอบปีก่อนหน้า
|
||||||
const salaryPeriodIncrease2_APR = await this.salaryPeriodRepository.findOne({
|
const salaryPeriodIncrease2_APR = await this.salaryPeriodRepository.findOne({
|
||||||
where: {
|
where: {
|
||||||
|
|
@ -1252,8 +1255,8 @@ export class ReportController extends Controller {
|
||||||
: "ไม่ได้เลื่อนขั้น";
|
: "ไม่ได้เลื่อนขั้น";
|
||||||
})()
|
})()
|
||||||
: null, //การเลื่อนเงินเดือนปีก่อนหน้า
|
: null, //การเลื่อนเงินเดือนปีก่อนหน้า
|
||||||
score: null, //ผลการประเมินฯ
|
score: item.result, //ผลการประเมินฯ
|
||||||
remark: null, //หมายเหตุ
|
remark: item.remark, //หมายเหตุ
|
||||||
}))
|
}))
|
||||||
: null,
|
: null,
|
||||||
profileGroup2: salaryProfileGroup2
|
profileGroup2: salaryProfileGroup2
|
||||||
|
|
@ -1303,8 +1306,8 @@ export class ReportController extends Controller {
|
||||||
: "ไม่ได้เลื่อนขั้น";
|
: "ไม่ได้เลื่อนขั้น";
|
||||||
})()
|
})()
|
||||||
: null, //การเลื่อนเงินเดือนปีก่อนหน้า
|
: null, //การเลื่อนเงินเดือนปีก่อนหน้า
|
||||||
score: null, //ผลการประเมินฯ
|
score: item.result, //ผลการประเมินฯ
|
||||||
remark: null, //หมายเหตุ
|
remark: item.remark, //หมายเหตุ
|
||||||
}))
|
}))
|
||||||
: null,
|
: null,
|
||||||
},
|
},
|
||||||
|
|
@ -1389,7 +1392,6 @@ export class ReportController extends Controller {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
//รอบปีก่อนหน้า
|
//รอบปีก่อนหน้า
|
||||||
const salaryPeriodIncrease2_APR = await this.salaryPeriodRepository.findOne({
|
const salaryPeriodIncrease2_APR = await this.salaryPeriodRepository.findOne({
|
||||||
where: {
|
where: {
|
||||||
|
|
@ -1541,7 +1543,7 @@ export class ReportController extends Controller {
|
||||||
: item.type === "FULLHAFT"
|
: item.type === "FULLHAFT"
|
||||||
? "หนึ่งขั้นครึ่ง"
|
? "หนึ่งขั้นครึ่ง"
|
||||||
: null,
|
: null,
|
||||||
score1: null, //ผลการประเมินฯ ครั้งที่ 1
|
score1: item.result, //ผลการประเมินฯ ครั้งที่ 1
|
||||||
score2: null, //ผลการประเมินฯ ครั้งที่ 2
|
score2: null, //ผลการประเมินฯ ครั้งที่ 2
|
||||||
}))
|
}))
|
||||||
: null,
|
: null,
|
||||||
|
|
@ -1621,7 +1623,7 @@ export class ReportController extends Controller {
|
||||||
: item.type === "FULLHAFT"
|
: item.type === "FULLHAFT"
|
||||||
? "หนึ่งขั้นครึ่ง"
|
? "หนึ่งขั้นครึ่ง"
|
||||||
: null,
|
: null,
|
||||||
score1: null, //ผลการประเมินฯ ครั้งที่ 1
|
score1: item.result, //ผลการประเมินฯ ครั้งที่ 1
|
||||||
score2: null, //ผลการประเมินฯ ครั้งที่ 2
|
score2: null, //ผลการประเมินฯ ครั้งที่ 2
|
||||||
}))
|
}))
|
||||||
: null,
|
: null,
|
||||||
|
|
@ -1725,7 +1727,7 @@ export class ReportController extends Controller {
|
||||||
profile.amountSpecial == 0
|
profile.amountSpecial == 0
|
||||||
? ""
|
? ""
|
||||||
: `(${Extension.ToThaiNumber(String(profile.amountSpecial.toLocaleString()))})`),
|
: `(${Extension.ToThaiNumber(String(profile.amountSpecial.toLocaleString()))})`),
|
||||||
score: null, //สรุปผลการประเมินฯ ระดับและคะแนน
|
score: profile.result, //สรุปผลการประเมินฯ ระดับและคะแนน
|
||||||
remark:
|
remark:
|
||||||
`${profile.type === "FULL" ? "หนึ่งขั้น" : ""}\n` +
|
`${profile.type === "FULL" ? "หนึ่งขั้น" : ""}\n` +
|
||||||
`${profile.type === "FULLHAFT" ? "หนึ่งขั้นครึ่ง" : ""}\n` +
|
`${profile.type === "FULLHAFT" ? "หนึ่งขั้นครึ่ง" : ""}\n` +
|
||||||
|
|
@ -1755,7 +1757,11 @@ export class ReportController extends Controller {
|
||||||
* @param {string} salaryPeriodId Guid, *Id Period
|
* @param {string} salaryPeriodId Guid, *Id Period
|
||||||
*/
|
*/
|
||||||
@Get("gov-04-01/{rootId}/{salaryPeriodId}/{group}")
|
@Get("gov-04-01/{rootId}/{salaryPeriodId}/{group}")
|
||||||
async SalaryReport4Retire(@Path() rootId: string, @Path() salaryPeriodId: string, @Path() group: string) {
|
async SalaryReport4Retire(
|
||||||
|
@Path() rootId: string,
|
||||||
|
@Path() salaryPeriodId: string,
|
||||||
|
@Path() group: string,
|
||||||
|
) {
|
||||||
const salaryPeriod = await this.salaryPeriodRepository.findOne({
|
const salaryPeriod = await this.salaryPeriodRepository.findOne({
|
||||||
where: {
|
where: {
|
||||||
id: salaryPeriodId,
|
id: salaryPeriodId,
|
||||||
|
|
@ -1830,7 +1836,7 @@ export class ReportController extends Controller {
|
||||||
profile.amountSpecial == 0
|
profile.amountSpecial == 0
|
||||||
? ""
|
? ""
|
||||||
: `(${Extension.ToThaiNumber(String(profile.amountSpecial.toLocaleString()))})`),
|
: `(${Extension.ToThaiNumber(String(profile.amountSpecial.toLocaleString()))})`),
|
||||||
score: null, //สรุปผลการประเมินฯ ระดับและคะแนน
|
score: profile.result, //สรุปผลการประเมินฯ ระดับและคะแนน
|
||||||
remark:
|
remark:
|
||||||
`${profile.type === "FULL" ? "หนึ่งขั้น" : ""}\n` +
|
`${profile.type === "FULL" ? "หนึ่งขั้น" : ""}\n` +
|
||||||
`${profile.type === "FULLHAFT" ? "หนึ่งขั้นครึ่ง" : ""}\n` +
|
`${profile.type === "FULLHAFT" ? "หนึ่งขั้นครึ่ง" : ""}\n` +
|
||||||
|
|
@ -1929,8 +1935,8 @@ export class ReportController extends Controller {
|
||||||
Extension.ToThaiNumber(profile.posMasterNo.toLocaleString()),
|
Extension.ToThaiNumber(profile.posMasterNo.toLocaleString()),
|
||||||
amount: profile.amount ? Extension.ToThaiNumber(profile.amount.toLocaleString()) : null,
|
amount: profile.amount ? Extension.ToThaiNumber(profile.amount.toLocaleString()) : null,
|
||||||
reason: null, //เหตุผล
|
reason: null, //เหตุผล
|
||||||
score: null, //สรุปผลการประเมินฯ ระดับและคะแนน
|
score: profile.result, //สรุปผลการประเมินฯ ระดับและคะแนน
|
||||||
remark: null, //หมายเหตุ
|
remark: profile.remark, //หมายเหตุ
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -1954,7 +1960,11 @@ export class ReportController extends Controller {
|
||||||
* @param {string} salaryPeriodId Guid, *Id Period
|
* @param {string} salaryPeriodId Guid, *Id Period
|
||||||
*/
|
*/
|
||||||
@Get("gov-05-01/{rootId}/{salaryPeriodId}/{group}")
|
@Get("gov-05-01/{rootId}/{salaryPeriodId}/{group}")
|
||||||
async SalaryReport5retire(@Path() rootId: string, @Path() salaryPeriodId: string, @Path() group: string) {
|
async SalaryReport5retire(
|
||||||
|
@Path() rootId: string,
|
||||||
|
@Path() salaryPeriodId: string,
|
||||||
|
@Path() group: string,
|
||||||
|
) {
|
||||||
const salaryPeriod = await this.salaryPeriodRepository.findOne({
|
const salaryPeriod = await this.salaryPeriodRepository.findOne({
|
||||||
where: {
|
where: {
|
||||||
id: salaryPeriodId,
|
id: salaryPeriodId,
|
||||||
|
|
@ -2020,8 +2030,8 @@ export class ReportController extends Controller {
|
||||||
Extension.ToThaiNumber(profile.posMasterNo.toLocaleString()),
|
Extension.ToThaiNumber(profile.posMasterNo.toLocaleString()),
|
||||||
amount: profile.amount ? Extension.ToThaiNumber(profile.amount.toLocaleString()) : null,
|
amount: profile.amount ? Extension.ToThaiNumber(profile.amount.toLocaleString()) : null,
|
||||||
reason: null, //เหตุผล
|
reason: null, //เหตุผล
|
||||||
score: null, //สรุปผลการประเมินฯ ระดับและคะแนน
|
score: profile.result, //สรุปผลการประเมินฯ ระดับและคะแนน
|
||||||
remark: null, //หมายเหตุ
|
remark: profile.remark, //หมายเหตุ
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -2164,7 +2174,11 @@ export class ReportController extends Controller {
|
||||||
* @param {string} salaryPeriodId Guid, *Id Period
|
* @param {string} salaryPeriodId Guid, *Id Period
|
||||||
*/
|
*/
|
||||||
@Get("gov-07-01/{rootId}/{salaryPeriodId}/{group}")
|
@Get("gov-07-01/{rootId}/{salaryPeriodId}/{group}")
|
||||||
async SalaryReport7retire(@Path() rootId: string, @Path() salaryPeriodId: string, @Path() group: string) {
|
async SalaryReport7retire(
|
||||||
|
@Path() rootId: string,
|
||||||
|
@Path() salaryPeriodId: string,
|
||||||
|
@Path() group: string,
|
||||||
|
) {
|
||||||
const salaryPeriod = await this.salaryPeriodRepository.findOne({
|
const salaryPeriod = await this.salaryPeriodRepository.findOne({
|
||||||
where: {
|
where: {
|
||||||
id: salaryPeriodId,
|
id: salaryPeriodId,
|
||||||
|
|
@ -2262,7 +2276,11 @@ export class ReportController extends Controller {
|
||||||
* @param {string} salaryPeriodId Guid, *Id Period
|
* @param {string} salaryPeriodId Guid, *Id Period
|
||||||
*/
|
*/
|
||||||
@Get("gov-08/{rootId}/{salaryPeriodId}/{group}")
|
@Get("gov-08/{rootId}/{salaryPeriodId}/{group}")
|
||||||
async SalaryReport8(@Path() rootId: string, @Path() salaryPeriodId: string, @Path() group: string) {
|
async SalaryReport8(
|
||||||
|
@Path() rootId: string,
|
||||||
|
@Path() salaryPeriodId: string,
|
||||||
|
@Path() group: string,
|
||||||
|
) {
|
||||||
const salaryPeriod = await this.salaryPeriodRepository.findOne({
|
const salaryPeriod = await this.salaryPeriodRepository.findOne({
|
||||||
where: {
|
where: {
|
||||||
id: salaryPeriodId,
|
id: salaryPeriodId,
|
||||||
|
|
@ -2285,7 +2303,6 @@ export class ReportController extends Controller {
|
||||||
relations: ["salaryProfiles"],
|
relations: ["salaryProfiles"],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
const salaryProfileSpecial = await this.salaryProfileRepository.find({
|
const salaryProfileSpecial = await this.salaryProfileRepository.find({
|
||||||
relations: ["salaryOrg"],
|
relations: ["salaryOrg"],
|
||||||
where: {
|
where: {
|
||||||
|
|
@ -2619,8 +2636,8 @@ export class ReportController extends Controller {
|
||||||
Extension.ToThaiNumber(profile.orgShortName) +
|
Extension.ToThaiNumber(profile.orgShortName) +
|
||||||
Extension.ToThaiNumber(profile.posMasterNo.toLocaleString()),
|
Extension.ToThaiNumber(profile.posMasterNo.toLocaleString()),
|
||||||
amount: profile.amount ? Extension.ToThaiNumber(profile.amount.toLocaleString()) : null,
|
amount: profile.amount ? Extension.ToThaiNumber(profile.amount.toLocaleString()) : null,
|
||||||
score: null,
|
score: profile.result,
|
||||||
reason: null,
|
reason: profile.remark,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -2706,8 +2723,8 @@ export class ReportController extends Controller {
|
||||||
positionSalaryAmount: profile.positionSalaryAmount
|
positionSalaryAmount: profile.positionSalaryAmount
|
||||||
? Extension.ToThaiNumber(profile.positionSalaryAmount.toLocaleString())
|
? Extension.ToThaiNumber(profile.positionSalaryAmount.toLocaleString())
|
||||||
: null,
|
: null,
|
||||||
score: null, //สรุปผลการประเมินฯ ระดับและคะแนน
|
score: profile.result, //สรุปผลการประเมินฯ ระดับและคะแนน
|
||||||
reason: null,
|
reason: profile.remark,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -2793,8 +2810,8 @@ export class ReportController extends Controller {
|
||||||
: "",
|
: "",
|
||||||
amountSpecial:
|
amountSpecial:
|
||||||
profile.amountSpecial > 0 ? Extension.ToThaiNumber(profile.amountSpecial.toString()) : "",
|
profile.amountSpecial > 0 ? Extension.ToThaiNumber(profile.amountSpecial.toString()) : "",
|
||||||
score: null, //สรุปผลการประเมินฯ ระดับและคะแนน
|
score: profile.result, //สรุปผลการประเมินฯ ระดับและคะแนน
|
||||||
reason: null,
|
reason: profile.remark,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -2874,8 +2891,8 @@ export class ReportController extends Controller {
|
||||||
? Extension.ToThaiNumber(profile.positionSalaryAmount.toLocaleString())
|
? Extension.ToThaiNumber(profile.positionSalaryAmount.toLocaleString())
|
||||||
: null,
|
: null,
|
||||||
reasonSign: null,
|
reasonSign: null,
|
||||||
score: null, //สรุปผลการประเมินฯ ระดับและคะแนน
|
score: profile.result, //สรุปผลการประเมินฯ ระดับและคะแนน
|
||||||
reason: null, //เหตุผลที่ไม่สมควรหรือไม่อาจเลื่อนขั้นค่าจ้าง
|
reason: profile.remark, //เหตุผลที่ไม่สมควรหรือไม่อาจเลื่อนขั้นค่าจ้าง
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -2955,8 +2972,8 @@ export class ReportController extends Controller {
|
||||||
? Extension.ToThaiNumber(profile.positionSalaryAmount.toLocaleString())
|
? Extension.ToThaiNumber(profile.positionSalaryAmount.toLocaleString())
|
||||||
: null,
|
: null,
|
||||||
reasonSign: null,
|
reasonSign: null,
|
||||||
score: null, //สรุปผลการประเมินฯ ระดับและคะแนน
|
score: profile.result, //สรุปผลการประเมินฯ ระดับและคะแนน
|
||||||
reason: null, //เหตุผลที่ไม่สมควรหรือไม่อาจเลื่อนขั้นค่าจ้าง
|
reason: profile.remark, //เหตุผลที่ไม่สมควรหรือไม่อาจเลื่อนขั้นค่าจ้าง
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -3146,8 +3163,8 @@ export class ReportController extends Controller {
|
||||||
: profile.type === "FULL"
|
: profile.type === "FULL"
|
||||||
? "๑ ขั้น"
|
? "๑ ขั้น"
|
||||||
: "ไม่ได้เลื่อนขั้นฯ",
|
: "ไม่ได้เลื่อนขั้นฯ",
|
||||||
score: null, //ผลการประเมิน
|
score: profile.result, //ผลการประเมิน
|
||||||
remark: null, //หมายเหตุ
|
remark: profile.remark, //หมายเหตุ
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -3378,7 +3395,7 @@ export class ReportController extends Controller {
|
||||||
positionSalaryAmount: profile.positionSalaryAmount
|
positionSalaryAmount: profile.positionSalaryAmount
|
||||||
? Extension.ToThaiNumber(profile.positionSalaryAmount.toLocaleString())
|
? Extension.ToThaiNumber(profile.positionSalaryAmount.toLocaleString())
|
||||||
: null,
|
: null,
|
||||||
score: null, //สรุปผลการประเมินฯ ระดับและคะแนน
|
score: profile.result, //สรุปผลการประเมินฯ ระดับและคะแนน
|
||||||
remark:
|
remark:
|
||||||
`${profile.type === "FULL" ? "หนึ่งขั้น" : ""}\n` +
|
`${profile.type === "FULL" ? "หนึ่งขั้น" : ""}\n` +
|
||||||
`${profile.type === "FULLHAFT" ? "หนึ่งขั้นครึ่ง" : ""}\n` +
|
`${profile.type === "FULLHAFT" ? "หนึ่งขั้นครึ่ง" : ""}\n` +
|
||||||
|
|
@ -3459,8 +3476,8 @@ export class ReportController extends Controller {
|
||||||
Extension.ToThaiNumber(profile.orgShortName) +
|
Extension.ToThaiNumber(profile.orgShortName) +
|
||||||
Extension.ToThaiNumber(profile.posMasterNo.toLocaleString()),
|
Extension.ToThaiNumber(profile.posMasterNo.toLocaleString()),
|
||||||
amount: profile.amount ? Extension.ToThaiNumber(profile.amount.toLocaleString()) : null,
|
amount: profile.amount ? Extension.ToThaiNumber(profile.amount.toLocaleString()) : null,
|
||||||
score: null, //สรุปผลการประเมินฯ ระดับและคะแนน
|
score: profile.result, //สรุปผลการประเมินฯ ระดับและคะแนน
|
||||||
reason: null, // หมายเหตุ
|
reason: profile.remark, // หมายเหตุ
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -4380,7 +4397,7 @@ export class ReportController extends Controller {
|
||||||
: profile.type === "FULLHAFT"
|
: profile.type === "FULLHAFT"
|
||||||
? "๑.๕ ขั้น"
|
? "๑.๕ ขั้น"
|
||||||
: "ไม่ได้เลื่อนขั้นฯ",
|
: "ไม่ได้เลื่อนขั้นฯ",
|
||||||
score1: null,
|
score1: profile.result,
|
||||||
score2: null,
|
score2: null,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
@ -4482,8 +4499,8 @@ export class ReportController extends Controller {
|
||||||
positionSalaryAmount: profile.positionSalaryAmount
|
positionSalaryAmount: profile.positionSalaryAmount
|
||||||
? Extension.ToThaiNumber(profile.positionSalaryAmount.toLocaleString())
|
? Extension.ToThaiNumber(profile.positionSalaryAmount.toLocaleString())
|
||||||
: null,
|
: null,
|
||||||
score: null,
|
score: profile.result,
|
||||||
reason: null,
|
reason: profile.remark,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -4662,8 +4679,8 @@ export class ReportController extends Controller {
|
||||||
positionSalaryAmount: profile.positionSalaryAmount
|
positionSalaryAmount: profile.positionSalaryAmount
|
||||||
? Extension.ToThaiNumber(profile.positionSalaryAmount.toLocaleString())
|
? Extension.ToThaiNumber(profile.positionSalaryAmount.toLocaleString())
|
||||||
: null,
|
: null,
|
||||||
score: null,
|
score: profile.result,
|
||||||
reason: null,
|
reason: profile.remark,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -4745,8 +4762,8 @@ export class ReportController extends Controller {
|
||||||
Extension.ToThaiNumber(profile.posMasterNo.toLocaleString()),
|
Extension.ToThaiNumber(profile.posMasterNo.toLocaleString()),
|
||||||
amount: profile.amount ? Extension.ToThaiNumber(profile.amount.toLocaleString()) : null,
|
amount: profile.amount ? Extension.ToThaiNumber(profile.amount.toLocaleString()) : null,
|
||||||
reason: null,
|
reason: null,
|
||||||
score: null,
|
score: profile.result,
|
||||||
signature: null,
|
signature: profile.remark,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -5012,9 +5029,9 @@ export class ReportController extends Controller {
|
||||||
: profile.type === "FULLHAFT"
|
: profile.type === "FULLHAFT"
|
||||||
? "๑.๕ ขั้น"
|
? "๑.๕ ขั้น"
|
||||||
: "ไม่ได้เลื่อนขั้นฯ",
|
: "ไม่ได้เลื่อนขั้นฯ",
|
||||||
score1: null,
|
score1: profile.result,
|
||||||
score2: null,
|
score2: null,
|
||||||
reason: null,
|
reason: profile.remark,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -5115,8 +5132,8 @@ export class ReportController extends Controller {
|
||||||
reason1: null, //เหตุผลที่ไม่ได้เลื่อนขั้น
|
reason1: null, //เหตุผลที่ไม่ได้เลื่อนขั้น
|
||||||
reason2: null, //เหตุผลที่ไม่ได้เลื่อนขั้น
|
reason2: null, //เหตุผลที่ไม่ได้เลื่อนขั้น
|
||||||
reason3: null, //เหตุผลที่ไม่ได้เลื่อนขั้น
|
reason3: null, //เหตุผลที่ไม่ได้เลื่อนขั้น
|
||||||
score: null,
|
score: profile.result,
|
||||||
reason: null,
|
reason: profile.remark,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
const year = Extension.ToThaiNumber(String(Extension.ToThaiYear(salaryPeriod.year)));
|
const year = Extension.ToThaiNumber(String(Extension.ToThaiYear(salaryPeriod.year)));
|
||||||
|
|
@ -6225,7 +6242,8 @@ export class ReportController extends Controller {
|
||||||
*/
|
*/
|
||||||
@Post("command/33/resume")
|
@Post("command/33/resume")
|
||||||
async SalaryReport33Resume(
|
async SalaryReport33Resume(
|
||||||
@Body() body: { result: { id: string; personId: string }[] },
|
@Body()
|
||||||
|
body: { result: { id: string; refCommandNo: string; templateDoc: string; personId: string }[] },
|
||||||
@Request() request: { user: Record<string, any> },
|
@Request() request: { user: Record<string, any> },
|
||||||
) {
|
) {
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
|
|
@ -6241,7 +6259,7 @@ export class ReportController extends Controller {
|
||||||
profileId: salary.profileId,
|
profileId: salary.profileId,
|
||||||
date: new Date(),
|
date: new Date(),
|
||||||
amount: salary.positionSalaryAmount,
|
amount: salary.positionSalaryAmount,
|
||||||
positionSalaryAmount: null,
|
positionSalaryAmount: salary.amountSpecial,
|
||||||
mouthSalaryAmount: null,
|
mouthSalaryAmount: null,
|
||||||
posNo: salary.orgShortName + salary.posMasterNo,
|
posNo: salary.orgShortName + salary.posMasterNo,
|
||||||
position: salary.position,
|
position: salary.position,
|
||||||
|
|
@ -6250,8 +6268,8 @@ export class ReportController extends Controller {
|
||||||
positionExecutive: salary.posExecutive,
|
positionExecutive: salary.posExecutive,
|
||||||
positionType: salary.posType,
|
positionType: salary.posType,
|
||||||
positionLevel: salary.posLevel,
|
positionLevel: salary.posLevel,
|
||||||
refCommandNo: null,
|
refCommandNo: v.refCommandNo,
|
||||||
templateDoc: null,
|
templateDoc: v.templateDoc,
|
||||||
})
|
})
|
||||||
.then(async (x) => {
|
.then(async (x) => {
|
||||||
salary.status = "DONE";
|
salary.status = "DONE";
|
||||||
|
|
@ -6272,7 +6290,8 @@ export class ReportController extends Controller {
|
||||||
*/
|
*/
|
||||||
@Post("command/34/resume")
|
@Post("command/34/resume")
|
||||||
async SalaryReport34Resume(
|
async SalaryReport34Resume(
|
||||||
@Body() body: { result: { id: string; personId: string }[] },
|
@Body()
|
||||||
|
body: { result: { id: string; refCommandNo: string; templateDoc: string; personId: string }[] },
|
||||||
@Request() request: { user: Record<string, any> },
|
@Request() request: { user: Record<string, any> },
|
||||||
) {
|
) {
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
|
|
@ -6288,7 +6307,7 @@ export class ReportController extends Controller {
|
||||||
profileId: salary.profileId,
|
profileId: salary.profileId,
|
||||||
date: new Date(),
|
date: new Date(),
|
||||||
amount: salary.positionSalaryAmount,
|
amount: salary.positionSalaryAmount,
|
||||||
positionSalaryAmount: null,
|
positionSalaryAmount: salary.amountSpecial,
|
||||||
mouthSalaryAmount: null,
|
mouthSalaryAmount: null,
|
||||||
posNo: salary.orgShortName + salary.posMasterNo,
|
posNo: salary.orgShortName + salary.posMasterNo,
|
||||||
position: salary.position,
|
position: salary.position,
|
||||||
|
|
@ -6297,8 +6316,8 @@ export class ReportController extends Controller {
|
||||||
positionExecutive: salary.posExecutive,
|
positionExecutive: salary.posExecutive,
|
||||||
positionType: salary.posType,
|
positionType: salary.posType,
|
||||||
positionLevel: salary.posLevel,
|
positionLevel: salary.posLevel,
|
||||||
refCommandNo: null,
|
refCommandNo: v.refCommandNo,
|
||||||
templateDoc: null,
|
templateDoc: v.templateDoc,
|
||||||
})
|
})
|
||||||
.then(async (x) => {
|
.then(async (x) => {
|
||||||
salary.status = "DONE";
|
salary.status = "DONE";
|
||||||
|
|
@ -6319,7 +6338,8 @@ export class ReportController extends Controller {
|
||||||
*/
|
*/
|
||||||
@Post("command/35/resume")
|
@Post("command/35/resume")
|
||||||
async SalaryReport35Resume(
|
async SalaryReport35Resume(
|
||||||
@Body() body: { result: { id: string; personId: string }[] },
|
@Body()
|
||||||
|
body: { result: { id: string; refCommandNo: string; templateDoc: string; personId: string }[] },
|
||||||
@Request() request: { user: Record<string, any> },
|
@Request() request: { user: Record<string, any> },
|
||||||
) {
|
) {
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
|
|
@ -6335,7 +6355,7 @@ export class ReportController extends Controller {
|
||||||
profileId: salary.profileId,
|
profileId: salary.profileId,
|
||||||
date: new Date(),
|
date: new Date(),
|
||||||
amount: salary.positionSalaryAmount,
|
amount: salary.positionSalaryAmount,
|
||||||
positionSalaryAmount: null,
|
positionSalaryAmount: salary.amountSpecial,
|
||||||
mouthSalaryAmount: null,
|
mouthSalaryAmount: null,
|
||||||
posNo: salary.orgShortName + salary.posMasterNo,
|
posNo: salary.orgShortName + salary.posMasterNo,
|
||||||
position: salary.position,
|
position: salary.position,
|
||||||
|
|
@ -6344,8 +6364,8 @@ export class ReportController extends Controller {
|
||||||
positionExecutive: salary.posExecutive,
|
positionExecutive: salary.posExecutive,
|
||||||
positionType: salary.posType,
|
positionType: salary.posType,
|
||||||
positionLevel: salary.posLevel,
|
positionLevel: salary.posLevel,
|
||||||
refCommandNo: null,
|
refCommandNo: v.refCommandNo,
|
||||||
templateDoc: null,
|
templateDoc: v.templateDoc,
|
||||||
})
|
})
|
||||||
.then(async (x) => {
|
.then(async (x) => {
|
||||||
salary.status = "DONE";
|
salary.status = "DONE";
|
||||||
|
|
@ -6366,7 +6386,8 @@ export class ReportController extends Controller {
|
||||||
*/
|
*/
|
||||||
@Post("command/36/resume")
|
@Post("command/36/resume")
|
||||||
async SalaryReport36Resume(
|
async SalaryReport36Resume(
|
||||||
@Body() body: { result: { id: string; personId: string }[] },
|
@Body()
|
||||||
|
body: { result: { id: string; refCommandNo: string; templateDoc: string; personId: string }[] },
|
||||||
@Request() request: { user: Record<string, any> },
|
@Request() request: { user: Record<string, any> },
|
||||||
) {
|
) {
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
|
|
@ -6377,27 +6398,27 @@ export class ReportController extends Controller {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
if (salary != null) {
|
if (salary != null) {
|
||||||
// await new CallAPI()
|
await new CallAPI()
|
||||||
// .PostData(request, "org/profile/salary", {
|
.PostData(request, "org/profile/salary", {
|
||||||
// profileId: salary.profileId,
|
profileId: salary.profileId,
|
||||||
// date: new Date(),
|
date: new Date(),
|
||||||
// amount: salary.positionSalaryAmount,
|
amount: salary.positionSalaryAmount,
|
||||||
// positionSalaryAmount: null,
|
positionSalaryAmount: salary.amountSpecial,
|
||||||
// mouthSalaryAmount: null,
|
mouthSalaryAmount: null,
|
||||||
// posNo: salary.orgShortName + salary.posMasterNo,
|
posNo: salary.orgShortName + salary.posMasterNo,
|
||||||
// position: salary.position,
|
position: salary.position,
|
||||||
// positionLine: null,
|
positionLine: null,
|
||||||
// positionPathSide: null,
|
positionPathSide: null,
|
||||||
// positionExecutive: null,
|
positionExecutive: null,
|
||||||
// positionType: salary.posType,
|
positionType: salary.posType,
|
||||||
// positionLevel: salary.posLevel,
|
positionLevel: salary.posLevel,
|
||||||
// refCommandNo: null,
|
refCommandNo: v.refCommandNo,
|
||||||
// templateDoc: null,
|
templateDoc: v.templateDoc,
|
||||||
// })
|
})
|
||||||
// .then(async (x) => {
|
.then(async (x) => {
|
||||||
salary.status = "DONE";
|
salary.status = "DONE";
|
||||||
await this.salaryProfileEmployeeRepository.save(salary);
|
await this.salaryProfileEmployeeRepository.save(salary);
|
||||||
// });
|
});
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
@ -6413,7 +6434,8 @@ export class ReportController extends Controller {
|
||||||
*/
|
*/
|
||||||
@Post("command/37/resume")
|
@Post("command/37/resume")
|
||||||
async SalaryReport37Resume(
|
async SalaryReport37Resume(
|
||||||
@Body() body: { result: { id: string; personId: string }[] },
|
@Body()
|
||||||
|
body: { result: { id: string; refCommandNo: string; templateDoc: string; personId: string }[] },
|
||||||
@Request() request: { user: Record<string, any> },
|
@Request() request: { user: Record<string, any> },
|
||||||
) {
|
) {
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
|
|
@ -6424,27 +6446,27 @@ export class ReportController extends Controller {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
if (salary != null) {
|
if (salary != null) {
|
||||||
// await new CallAPI()
|
await new CallAPI()
|
||||||
// .PostData(request, "org/profile/salary", {
|
.PostData(request, "org/profile-employee/salary", {
|
||||||
// profileId: salary.profileId,
|
profileEmployeeId: salary.profileId,
|
||||||
// date: new Date(),
|
date: new Date(),
|
||||||
// amount: salary.positionSalaryAmount,
|
amount: salary.positionSalaryAmount,
|
||||||
// positionSalaryAmount: null,
|
positionSalaryAmount: salary.amountSpecial,
|
||||||
// mouthSalaryAmount: null,
|
mouthSalaryAmount: null,
|
||||||
// posNo: salary.orgShortName + salary.posMasterNo,
|
posNo: salary.orgShortName + salary.posMasterNo,
|
||||||
// position: salary.position,
|
position: salary.position,
|
||||||
// positionLine: null,
|
positionLine: null,
|
||||||
// positionPathSide: null,
|
positionPathSide: null,
|
||||||
// positionExecutive: null,
|
positionExecutive: null,
|
||||||
// positionType: salary.posType,
|
positionType: salary.posType,
|
||||||
// positionLevel: salary.posLevel,
|
positionLevel: salary.posLevel,
|
||||||
// refCommandNo: null,
|
refCommandNo: v.refCommandNo,
|
||||||
// templateDoc: null,
|
templateDoc: v.templateDoc,
|
||||||
// })
|
})
|
||||||
// .then(async (x) => {
|
.then(async (x) => {
|
||||||
salary.status = "DONE";
|
salary.status = "DONE";
|
||||||
await this.salaryProfileEmployeeRepository.save(salary);
|
await this.salaryProfileEmployeeRepository.save(salary);
|
||||||
// });
|
});
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -251,19 +251,19 @@ export class SalaryController extends Controller {
|
||||||
where: { id: id },
|
where: { id: id },
|
||||||
});
|
});
|
||||||
|
|
||||||
const formattedData = {
|
const formattedData = {
|
||||||
name: salary?.name ?? null,
|
name: salary?.name ?? null,
|
||||||
isSpecial: salary?.isSpecial ?? null,
|
isSpecial: salary?.isSpecial ?? null,
|
||||||
posTypeId: salary?.posTypeId ?? null,
|
posTypeId: salary?.posTypeId ?? null,
|
||||||
posTypeName: salary?.posType_.posTypeName ?? null,
|
posTypeName: salary?.posType_.posTypeName ?? null,
|
||||||
posLevelId: salary?.posLevelId ?? null,
|
posLevelId: salary?.posLevelId ?? null,
|
||||||
posLevelName: salary?.posLevel_.posLevelName ?? null,
|
posLevelName: salary?.posLevel_.posLevelName ?? null,
|
||||||
isActive: salary?.isActive ?? null,
|
isActive: salary?.isActive ?? null,
|
||||||
date: salary?.date ?? null,
|
date: salary?.date ?? null,
|
||||||
startDate: salary?.startDate ?? null,
|
startDate: salary?.startDate ?? null,
|
||||||
endDate: salary?.endDate ?? null,
|
endDate: salary?.endDate ?? null,
|
||||||
details: salary?.details ?? null,
|
details: salary?.details ?? null,
|
||||||
};
|
};
|
||||||
if (!salary) {
|
if (!salary) {
|
||||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลผังเงินเดือนนี้");
|
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลผังเงินเดือนนี้");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -615,19 +615,19 @@ export class SalaryPeriodEmployeeController extends Controller {
|
||||||
salaryProfile.amountSpecial =
|
salaryProfile.amountSpecial =
|
||||||
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
||||||
? 0
|
? 0
|
||||||
: salaryRankAmountMax.salaryMonth * 0.02;
|
: Math.floor(salaryRankAmountMax.salaryMonth * 0.02);
|
||||||
} else if (step - salaryRankAmountMax.step <= 1) {
|
} else if (step - salaryRankAmountMax.step <= 1) {
|
||||||
salaryProfile.positionSalaryAmountPer = 0.04;
|
salaryProfile.positionSalaryAmountPer = 0.04;
|
||||||
salaryProfile.amountSpecial =
|
salaryProfile.amountSpecial =
|
||||||
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
||||||
? 0
|
? 0
|
||||||
: salaryRankAmountMax.salaryMonth * 0.04;
|
: Math.floor(salaryRankAmountMax.salaryMonth * 0.04);
|
||||||
} else {
|
} else {
|
||||||
salaryProfile.positionSalaryAmountPer = 0.06;
|
salaryProfile.positionSalaryAmountPer = 0.06;
|
||||||
salaryProfile.amountSpecial =
|
salaryProfile.amountSpecial =
|
||||||
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
||||||
? 0
|
? 0
|
||||||
: salaryRankAmountMax.salaryMonth * 0.06;
|
: Math.floor(salaryRankAmountMax.salaryMonth * 0.06);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
salaryProfile.positionSalaryAmountPer = 0;
|
salaryProfile.positionSalaryAmountPer = 0;
|
||||||
|
|
@ -674,19 +674,19 @@ export class SalaryPeriodEmployeeController extends Controller {
|
||||||
salaryProfile.amountSpecial =
|
salaryProfile.amountSpecial =
|
||||||
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
||||||
? 0
|
? 0
|
||||||
: salaryRankAmountMax.salaryMonth * 0.02;
|
: Math.floor(salaryRankAmountMax.salaryMonth * 0.02);
|
||||||
} else if (step - salaryRankAmountMax.step <= 1) {
|
} else if (step - salaryRankAmountMax.step <= 1) {
|
||||||
salaryProfile.positionSalaryAmountPer = 0.04;
|
salaryProfile.positionSalaryAmountPer = 0.04;
|
||||||
salaryProfile.amountSpecial =
|
salaryProfile.amountSpecial =
|
||||||
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
||||||
? 0
|
? 0
|
||||||
: salaryRankAmountMax.salaryMonth * 0.04;
|
: Math.floor(salaryRankAmountMax.salaryMonth * 0.04);
|
||||||
} else {
|
} else {
|
||||||
salaryProfile.positionSalaryAmountPer = 0.06;
|
salaryProfile.positionSalaryAmountPer = 0.06;
|
||||||
salaryProfile.amountSpecial =
|
salaryProfile.amountSpecial =
|
||||||
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
||||||
? 0
|
? 0
|
||||||
: salaryRankAmountMax.salaryMonth * 0.06;
|
: Math.floor(salaryRankAmountMax.salaryMonth * 0.06);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
salaryProfile.positionSalaryAmountPer = 0;
|
salaryProfile.positionSalaryAmountPer = 0;
|
||||||
|
|
@ -929,7 +929,9 @@ export class SalaryPeriodEmployeeController extends Controller {
|
||||||
* @param {string} type ประเภทการเลื่อน NONE->ไม่ได้เลื่อน HAFT->ครึ่งขั้น FULL->1ขั้น FULLHAFT->1.5ขั้น
|
* @param {string} type ประเภทการเลื่อน NONE->ไม่ได้เลื่อน HAFT->ครึ่งขั้น FULL->1ขั้น FULLHAFT->1.5ขั้น
|
||||||
*/
|
*/
|
||||||
@Post("change/type")
|
@Post("change/type")
|
||||||
async changeType(@Body() body: { profileId: string; type: string; isReserve: boolean }) {
|
async changeType(
|
||||||
|
@Body() body: { profileId: string; type: string; isReserve: boolean; remark?: string | null },
|
||||||
|
) {
|
||||||
const salaryProfile = await this.salaryProfileRepository.findOne({
|
const salaryProfile = await this.salaryProfileRepository.findOne({
|
||||||
relations: ["salaryOrg", "salaryOrg.salaryPeriod"],
|
relations: ["salaryOrg", "salaryOrg.salaryPeriod"],
|
||||||
where: { id: body.profileId },
|
where: { id: body.profileId },
|
||||||
|
|
@ -989,6 +991,8 @@ export class SalaryPeriodEmployeeController extends Controller {
|
||||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบระดับตำแหน่ง");
|
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบระดับตำแหน่ง");
|
||||||
}
|
}
|
||||||
salaryProfile.type = body.type;
|
salaryProfile.type = body.type;
|
||||||
|
let _null: any = null;
|
||||||
|
salaryProfile.remark = body.remark == null ? _null : body.remark;
|
||||||
let type = salaryProfile.type;
|
let type = salaryProfile.type;
|
||||||
|
|
||||||
if (type == "NONE") {
|
if (type == "NONE") {
|
||||||
|
|
@ -1216,19 +1220,19 @@ export class SalaryPeriodEmployeeController extends Controller {
|
||||||
salaryProfile.amountSpecial =
|
salaryProfile.amountSpecial =
|
||||||
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
||||||
? 0
|
? 0
|
||||||
: salaryRankAmountMax.salaryMonth * 0.02;
|
: Math.floor(salaryRankAmountMax.salaryMonth * 0.02);
|
||||||
} else if (step - salaryRankAmountMax.step <= 1) {
|
} else if (step - salaryRankAmountMax.step <= 1) {
|
||||||
salaryProfile.positionSalaryAmountPer = 0.04;
|
salaryProfile.positionSalaryAmountPer = 0.04;
|
||||||
salaryProfile.amountSpecial =
|
salaryProfile.amountSpecial =
|
||||||
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
||||||
? 0
|
? 0
|
||||||
: salaryRankAmountMax.salaryMonth * 0.04;
|
: Math.floor(salaryRankAmountMax.salaryMonth * 0.04);
|
||||||
} else {
|
} else {
|
||||||
salaryProfile.positionSalaryAmountPer = 0.06;
|
salaryProfile.positionSalaryAmountPer = 0.06;
|
||||||
salaryProfile.amountSpecial =
|
salaryProfile.amountSpecial =
|
||||||
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
||||||
? 0
|
? 0
|
||||||
: salaryRankAmountMax.salaryMonth * 0.06;
|
: Math.floor(salaryRankAmountMax.salaryMonth * 0.06);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
salaryProfile.positionSalaryAmountPer = 0;
|
salaryProfile.positionSalaryAmountPer = 0;
|
||||||
|
|
@ -1278,19 +1282,19 @@ export class SalaryPeriodEmployeeController extends Controller {
|
||||||
salaryProfile.amountSpecial =
|
salaryProfile.amountSpecial =
|
||||||
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
||||||
? 0
|
? 0
|
||||||
: salaryRankAmountMax.salaryMonth * 0.02;
|
: Math.floor(salaryRankAmountMax.salaryMonth * 0.02);
|
||||||
} else if (step - salaryRankAmountMax.step <= 1) {
|
} else if (step - salaryRankAmountMax.step <= 1) {
|
||||||
salaryProfile.positionSalaryAmountPer = 0.04;
|
salaryProfile.positionSalaryAmountPer = 0.04;
|
||||||
salaryProfile.amountSpecial =
|
salaryProfile.amountSpecial =
|
||||||
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
||||||
? 0
|
? 0
|
||||||
: salaryRankAmountMax.salaryMonth * 0.04;
|
: Math.floor(salaryRankAmountMax.salaryMonth * 0.04);
|
||||||
} else {
|
} else {
|
||||||
salaryProfile.positionSalaryAmountPer = 0.06;
|
salaryProfile.positionSalaryAmountPer = 0.06;
|
||||||
salaryProfile.amountSpecial =
|
salaryProfile.amountSpecial =
|
||||||
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
||||||
? 0
|
? 0
|
||||||
: salaryRankAmountMax.salaryMonth * 0.06;
|
: Math.floor(salaryRankAmountMax.salaryMonth * 0.06);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
salaryProfile.positionSalaryAmountPer = 0;
|
salaryProfile.positionSalaryAmountPer = 0;
|
||||||
|
|
@ -1866,19 +1870,19 @@ export class SalaryPeriodEmployeeController extends Controller {
|
||||||
salaryProfile.amountSpecial =
|
salaryProfile.amountSpecial =
|
||||||
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
||||||
? 0
|
? 0
|
||||||
: salaryRankAmountMax.salaryMonth * 0.02;
|
: Math.floor(salaryRankAmountMax.salaryMonth * 0.02);
|
||||||
} else if (step - salaryRankAmountMax.step <= 1) {
|
} else if (step - salaryRankAmountMax.step <= 1) {
|
||||||
salaryProfile.positionSalaryAmountPer = 0.04;
|
salaryProfile.positionSalaryAmountPer = 0.04;
|
||||||
salaryProfile.amountSpecial =
|
salaryProfile.amountSpecial =
|
||||||
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
||||||
? 0
|
? 0
|
||||||
: salaryRankAmountMax.salaryMonth * 0.04;
|
: Math.floor(salaryRankAmountMax.salaryMonth * 0.04);
|
||||||
} else {
|
} else {
|
||||||
salaryProfile.positionSalaryAmountPer = 0.06;
|
salaryProfile.positionSalaryAmountPer = 0.06;
|
||||||
salaryProfile.amountSpecial =
|
salaryProfile.amountSpecial =
|
||||||
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
||||||
? 0
|
? 0
|
||||||
: salaryRankAmountMax.salaryMonth * 0.06;
|
: Math.floor(salaryRankAmountMax.salaryMonth * 0.06);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
salaryProfile.positionSalaryAmountPer = 0;
|
salaryProfile.positionSalaryAmountPer = 0;
|
||||||
|
|
@ -1927,19 +1931,19 @@ export class SalaryPeriodEmployeeController extends Controller {
|
||||||
salaryProfile.amountSpecial =
|
salaryProfile.amountSpecial =
|
||||||
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
||||||
? 0
|
? 0
|
||||||
: salaryRankAmountMax.salaryMonth * 0.02;
|
: Math.floor(salaryRankAmountMax.salaryMonth * 0.02);
|
||||||
} else if (step - salaryRankAmountMax.step <= 1) {
|
} else if (step - salaryRankAmountMax.step <= 1) {
|
||||||
salaryProfile.positionSalaryAmountPer = 0.04;
|
salaryProfile.positionSalaryAmountPer = 0.04;
|
||||||
salaryProfile.amountSpecial =
|
salaryProfile.amountSpecial =
|
||||||
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
||||||
? 0
|
? 0
|
||||||
: salaryRankAmountMax.salaryMonth * 0.04;
|
: Math.floor(salaryRankAmountMax.salaryMonth * 0.04);
|
||||||
} else {
|
} else {
|
||||||
salaryProfile.positionSalaryAmountPer = 0.06;
|
salaryProfile.positionSalaryAmountPer = 0.06;
|
||||||
salaryProfile.amountSpecial =
|
salaryProfile.amountSpecial =
|
||||||
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
||||||
? 0
|
? 0
|
||||||
: salaryRankAmountMax.salaryMonth * 0.06;
|
: Math.floor(salaryRankAmountMax.salaryMonth * 0.06);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
salaryProfile.positionSalaryAmountPer = 0;
|
salaryProfile.positionSalaryAmountPer = 0;
|
||||||
|
|
|
||||||
|
|
@ -251,10 +251,18 @@ export class SalaryProfile extends EntityBase {
|
||||||
nullable: true,
|
nullable: true,
|
||||||
default: null,
|
default: null,
|
||||||
length: 255,
|
length: 255,
|
||||||
comment: "ผลการประเมินผลการปฏิบัติราชการ",//คะแนนประเมิน
|
comment: "ผลการประเมินผลการปฏิบัติราชการ", //คะแนนประเมิน
|
||||||
})
|
})
|
||||||
result: string;
|
result: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
default: null,
|
||||||
|
type: "text",
|
||||||
|
comment: "หมายเหตุ",
|
||||||
|
})
|
||||||
|
remark: string;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: "ระยะเวลาการปฏิบัติราชการในรอบครึ่งปี",
|
comment: "ระยะเวลาการปฏิบัติราชการในรอบครึ่งปี",
|
||||||
|
|
|
||||||
|
|
@ -306,6 +306,14 @@ export class SalaryProfileEmployee extends EntityBase {
|
||||||
})
|
})
|
||||||
result: string;
|
result: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
default: null,
|
||||||
|
type: "text",
|
||||||
|
comment: "หมายเหตุ",
|
||||||
|
})
|
||||||
|
remark: string;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: "ระยะเวลาการปฏิบัติราชการในรอบครึ่งปี",
|
comment: "ระยะเวลาการปฏิบัติราชการในรอบครึ่งปี",
|
||||||
|
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
||||||
|
|
||||||
export class AddTableSalary11720153855533 implements MigrationInterface {
|
|
||||||
name = 'AddTableSalary11720153855533'
|
|
||||||
|
|
||||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
||||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` DROP COLUMN \`result\``);
|
|
||||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` ADD \`result\` varchar(255) NULL COMMENT 'ผลการประเมินผลการปฏิบัติราชการ'`);
|
|
||||||
}
|
|
||||||
|
|
||||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
||||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` DROP COLUMN \`result\``);
|
|
||||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` ADD \`result\` double NULL COMMENT 'ผลการประเมินผลการปฏิบัติราชการ'`);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
16
src/migration/1720405140572-add_table_kpi_add_salary1.ts
Normal file
16
src/migration/1720405140572-add_table_kpi_add_salary1.ts
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
|
||||||
|
export class AddTableKpiAddSalary11720405140572 implements MigrationInterface {
|
||||||
|
name = 'AddTableKpiAddSalary11720405140572'
|
||||||
|
|
||||||
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE \`salaryProfileEmployee\` ADD \`remark\` text NULL COMMENT 'หมายเหตุ'`);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`salaryProfile\` ADD \`remark\` text NULL COMMENT 'หมายเหตุ'`);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE \`salaryProfile\` DROP COLUMN \`remark\``);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`salaryProfileEmployee\` DROP COLUMN \`remark\``);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue