เพิ่มหมายเหตุ
This commit is contained in:
parent
9ac38618df
commit
9e2f87e7b3
7 changed files with 204 additions and 162 deletions
|
|
@ -615,19 +615,19 @@ export class SalaryPeriodEmployeeController extends Controller {
|
|||
salaryProfile.amountSpecial =
|
||||
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
||||
? 0
|
||||
: salaryRankAmountMax.salaryMonth * 0.02;
|
||||
: Math.floor(salaryRankAmountMax.salaryMonth * 0.02);
|
||||
} else if (step - salaryRankAmountMax.step <= 1) {
|
||||
salaryProfile.positionSalaryAmountPer = 0.04;
|
||||
salaryProfile.amountSpecial =
|
||||
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
||||
? 0
|
||||
: salaryRankAmountMax.salaryMonth * 0.04;
|
||||
: Math.floor(salaryRankAmountMax.salaryMonth * 0.04);
|
||||
} else {
|
||||
salaryProfile.positionSalaryAmountPer = 0.06;
|
||||
salaryProfile.amountSpecial =
|
||||
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
||||
? 0
|
||||
: salaryRankAmountMax.salaryMonth * 0.06;
|
||||
: Math.floor(salaryRankAmountMax.salaryMonth * 0.06);
|
||||
}
|
||||
} else {
|
||||
salaryProfile.positionSalaryAmountPer = 0;
|
||||
|
|
@ -674,19 +674,19 @@ export class SalaryPeriodEmployeeController extends Controller {
|
|||
salaryProfile.amountSpecial =
|
||||
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
||||
? 0
|
||||
: salaryRankAmountMax.salaryMonth * 0.02;
|
||||
: Math.floor(salaryRankAmountMax.salaryMonth * 0.02);
|
||||
} else if (step - salaryRankAmountMax.step <= 1) {
|
||||
salaryProfile.positionSalaryAmountPer = 0.04;
|
||||
salaryProfile.amountSpecial =
|
||||
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
||||
? 0
|
||||
: salaryRankAmountMax.salaryMonth * 0.04;
|
||||
: Math.floor(salaryRankAmountMax.salaryMonth * 0.04);
|
||||
} else {
|
||||
salaryProfile.positionSalaryAmountPer = 0.06;
|
||||
salaryProfile.amountSpecial =
|
||||
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
||||
? 0
|
||||
: salaryRankAmountMax.salaryMonth * 0.06;
|
||||
: Math.floor(salaryRankAmountMax.salaryMonth * 0.06);
|
||||
}
|
||||
} else {
|
||||
salaryProfile.positionSalaryAmountPer = 0;
|
||||
|
|
@ -929,7 +929,9 @@ export class SalaryPeriodEmployeeController extends Controller {
|
|||
* @param {string} type ประเภทการเลื่อน NONE->ไม่ได้เลื่อน HAFT->ครึ่งขั้น FULL->1ขั้น FULLHAFT->1.5ขั้น
|
||||
*/
|
||||
@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({
|
||||
relations: ["salaryOrg", "salaryOrg.salaryPeriod"],
|
||||
where: { id: body.profileId },
|
||||
|
|
@ -989,6 +991,8 @@ export class SalaryPeriodEmployeeController extends Controller {
|
|||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบระดับตำแหน่ง");
|
||||
}
|
||||
salaryProfile.type = body.type;
|
||||
let _null: any = null;
|
||||
salaryProfile.remark = body.remark == null ? _null : body.remark;
|
||||
let type = salaryProfile.type;
|
||||
|
||||
if (type == "NONE") {
|
||||
|
|
@ -1216,19 +1220,19 @@ export class SalaryPeriodEmployeeController extends Controller {
|
|||
salaryProfile.amountSpecial =
|
||||
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
||||
? 0
|
||||
: salaryRankAmountMax.salaryMonth * 0.02;
|
||||
: Math.floor(salaryRankAmountMax.salaryMonth * 0.02);
|
||||
} else if (step - salaryRankAmountMax.step <= 1) {
|
||||
salaryProfile.positionSalaryAmountPer = 0.04;
|
||||
salaryProfile.amountSpecial =
|
||||
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
||||
? 0
|
||||
: salaryRankAmountMax.salaryMonth * 0.04;
|
||||
: Math.floor(salaryRankAmountMax.salaryMonth * 0.04);
|
||||
} else {
|
||||
salaryProfile.positionSalaryAmountPer = 0.06;
|
||||
salaryProfile.amountSpecial =
|
||||
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
||||
? 0
|
||||
: salaryRankAmountMax.salaryMonth * 0.06;
|
||||
: Math.floor(salaryRankAmountMax.salaryMonth * 0.06);
|
||||
}
|
||||
} else {
|
||||
salaryProfile.positionSalaryAmountPer = 0;
|
||||
|
|
@ -1278,19 +1282,19 @@ export class SalaryPeriodEmployeeController extends Controller {
|
|||
salaryProfile.amountSpecial =
|
||||
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
||||
? 0
|
||||
: salaryRankAmountMax.salaryMonth * 0.02;
|
||||
: Math.floor(salaryRankAmountMax.salaryMonth * 0.02);
|
||||
} else if (step - salaryRankAmountMax.step <= 1) {
|
||||
salaryProfile.positionSalaryAmountPer = 0.04;
|
||||
salaryProfile.amountSpecial =
|
||||
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
||||
? 0
|
||||
: salaryRankAmountMax.salaryMonth * 0.04;
|
||||
: Math.floor(salaryRankAmountMax.salaryMonth * 0.04);
|
||||
} else {
|
||||
salaryProfile.positionSalaryAmountPer = 0.06;
|
||||
salaryProfile.amountSpecial =
|
||||
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
||||
? 0
|
||||
: salaryRankAmountMax.salaryMonth * 0.06;
|
||||
: Math.floor(salaryRankAmountMax.salaryMonth * 0.06);
|
||||
}
|
||||
} else {
|
||||
salaryProfile.positionSalaryAmountPer = 0;
|
||||
|
|
@ -1866,19 +1870,19 @@ export class SalaryPeriodEmployeeController extends Controller {
|
|||
salaryProfile.amountSpecial =
|
||||
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
||||
? 0
|
||||
: salaryRankAmountMax.salaryMonth * 0.02;
|
||||
: Math.floor(salaryRankAmountMax.salaryMonth * 0.02);
|
||||
} else if (step - salaryRankAmountMax.step <= 1) {
|
||||
salaryProfile.positionSalaryAmountPer = 0.04;
|
||||
salaryProfile.amountSpecial =
|
||||
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
||||
? 0
|
||||
: salaryRankAmountMax.salaryMonth * 0.04;
|
||||
: Math.floor(salaryRankAmountMax.salaryMonth * 0.04);
|
||||
} else {
|
||||
salaryProfile.positionSalaryAmountPer = 0.06;
|
||||
salaryProfile.amountSpecial =
|
||||
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
||||
? 0
|
||||
: salaryRankAmountMax.salaryMonth * 0.06;
|
||||
: Math.floor(salaryRankAmountMax.salaryMonth * 0.06);
|
||||
}
|
||||
} else {
|
||||
salaryProfile.positionSalaryAmountPer = 0;
|
||||
|
|
@ -1927,19 +1931,19 @@ export class SalaryPeriodEmployeeController extends Controller {
|
|||
salaryProfile.amountSpecial =
|
||||
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
||||
? 0
|
||||
: salaryRankAmountMax.salaryMonth * 0.02;
|
||||
: Math.floor(salaryRankAmountMax.salaryMonth * 0.02);
|
||||
} else if (step - salaryRankAmountMax.step <= 1) {
|
||||
salaryProfile.positionSalaryAmountPer = 0.04;
|
||||
salaryProfile.amountSpecial =
|
||||
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
||||
? 0
|
||||
: salaryRankAmountMax.salaryMonth * 0.04;
|
||||
: Math.floor(salaryRankAmountMax.salaryMonth * 0.04);
|
||||
} else {
|
||||
salaryProfile.positionSalaryAmountPer = 0.06;
|
||||
salaryProfile.amountSpecial =
|
||||
salaryRankAmountMax == null || salaryRankAmountMax.salaryMonth == null
|
||||
? 0
|
||||
: salaryRankAmountMax.salaryMonth * 0.06;
|
||||
: Math.floor(salaryRankAmountMax.salaryMonth * 0.06);
|
||||
}
|
||||
} else {
|
||||
salaryProfile.positionSalaryAmountPer = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue