บันทึกประวัติตำแหน่ง
This commit is contained in:
parent
7020908d66
commit
7a01067222
1 changed files with 230 additions and 61 deletions
|
|
@ -6268,7 +6268,16 @@ export class ReportController extends Controller {
|
|||
@Post("command/33/resume")
|
||||
async SalaryReport33Resume(
|
||||
@Body()
|
||||
body: { result: { id: string; refCommandNo: string; templateDoc: string }[] },
|
||||
body: {
|
||||
result: {
|
||||
id: string;
|
||||
refCommandNo: string;
|
||||
templateDoc: string;
|
||||
mpCee?: string | null;
|
||||
refCommandCode?: string | null;
|
||||
refCommandName?: string | null;
|
||||
}[];
|
||||
},
|
||||
@Request() request: RequestWithUser,
|
||||
) {
|
||||
await Promise.all(
|
||||
|
|
@ -6296,6 +6305,8 @@ export class ReportController extends Controller {
|
|||
positionLevel: salary.posLevel,
|
||||
refCommandNo: v.refCommandNo,
|
||||
templateDoc: v.templateDoc,
|
||||
refCommandCode: v.refCommandCode,
|
||||
refCommandName: v.refCommandName,
|
||||
})
|
||||
.then(async () => {
|
||||
const before = null;
|
||||
|
|
@ -6322,7 +6333,16 @@ export class ReportController extends Controller {
|
|||
@Post("command/34/resume")
|
||||
async SalaryReport34Resume(
|
||||
@Body()
|
||||
body: { result: { id: string; refCommandNo: string; templateDoc: string }[] },
|
||||
body: {
|
||||
result: {
|
||||
id: string;
|
||||
refCommandNo: string;
|
||||
templateDoc: string;
|
||||
mpCee?: string | null;
|
||||
refCommandCode?: string | null;
|
||||
refCommandName?: string | null;
|
||||
}[];
|
||||
},
|
||||
@Request() request: RequestWithUser,
|
||||
) {
|
||||
await Promise.all(
|
||||
|
|
@ -6349,6 +6369,8 @@ export class ReportController extends Controller {
|
|||
positionLevel: salary.posLevel,
|
||||
refCommandNo: v.refCommandNo,
|
||||
templateDoc: v.templateDoc,
|
||||
refCommandCode: v.refCommandCode,
|
||||
refCommandName: v.refCommandName,
|
||||
})
|
||||
.then(async () => {
|
||||
const before = null;
|
||||
|
|
@ -6375,7 +6397,16 @@ export class ReportController extends Controller {
|
|||
@Post("command/35/resume")
|
||||
async SalaryReport35Resume(
|
||||
@Body()
|
||||
body: { result: { id: string; refCommandNo: string; templateDoc: string }[] },
|
||||
body: {
|
||||
result: {
|
||||
id: string;
|
||||
refCommandNo: string;
|
||||
templateDoc: string;
|
||||
mpCee?: string | null;
|
||||
refCommandCode?: string | null;
|
||||
refCommandName?: string | null;
|
||||
}[];
|
||||
},
|
||||
@Request() request: RequestWithUser,
|
||||
) {
|
||||
await Promise.all(
|
||||
|
|
@ -6402,6 +6433,8 @@ export class ReportController extends Controller {
|
|||
positionLevel: salary.posLevel,
|
||||
refCommandNo: v.refCommandNo,
|
||||
templateDoc: v.templateDoc,
|
||||
refCommandCode: v.refCommandCode,
|
||||
refCommandName: v.refCommandName,
|
||||
})
|
||||
.then(async () => {
|
||||
const before = null;
|
||||
|
|
@ -6428,7 +6461,16 @@ export class ReportController extends Controller {
|
|||
@Post("command/36/resume")
|
||||
async SalaryReport36Resume(
|
||||
@Body()
|
||||
body: { result: { id: string; refCommandNo: string; templateDoc: string }[] },
|
||||
body: {
|
||||
result: {
|
||||
id: string;
|
||||
refCommandNo: string;
|
||||
templateDoc: string;
|
||||
mpCee?: string | null;
|
||||
refCommandCode?: string | null;
|
||||
refCommandName?: string | null;
|
||||
}[];
|
||||
},
|
||||
@Request() request: RequestWithUser,
|
||||
) {
|
||||
await Promise.all(
|
||||
|
|
@ -6455,6 +6497,8 @@ export class ReportController extends Controller {
|
|||
positionLevel: salary.posLevel ? String(salary.posLevel) : null,
|
||||
refCommandNo: v.refCommandNo,
|
||||
templateDoc: v.templateDoc,
|
||||
refCommandCode: v.refCommandCode,
|
||||
refCommandName: v.refCommandName,
|
||||
})
|
||||
.then(async () => {
|
||||
const before = null;
|
||||
|
|
@ -6481,7 +6525,16 @@ export class ReportController extends Controller {
|
|||
@Post("command/37/resume")
|
||||
async SalaryReport37Resume(
|
||||
@Body()
|
||||
body: { result: { id: string; refCommandNo: string; templateDoc: string }[] },
|
||||
body: {
|
||||
result: {
|
||||
id: string;
|
||||
refCommandNo: string;
|
||||
templateDoc: string;
|
||||
mpCee?: string | null;
|
||||
refCommandCode?: string | null;
|
||||
refCommandName?: string | null;
|
||||
}[];
|
||||
},
|
||||
@Request() request: RequestWithUser,
|
||||
) {
|
||||
await Promise.all(
|
||||
|
|
@ -6508,6 +6561,8 @@ export class ReportController extends Controller {
|
|||
positionLevel: salary.posLevel,
|
||||
refCommandNo: v.refCommandNo,
|
||||
templateDoc: v.templateDoc,
|
||||
refCommandCode: v.refCommandCode,
|
||||
refCommandName: v.refCommandName,
|
||||
})
|
||||
.then(async () => {
|
||||
const before = null;
|
||||
|
|
@ -6892,7 +6947,7 @@ export class ReportController extends Controller {
|
|||
amountSpecial: MoreThan(0),
|
||||
type: Not("NONE"),
|
||||
status: "PENDING",
|
||||
})/*.orWhere({
|
||||
}); /*.orWhere({
|
||||
salaryOrgId: In(salaryOrgs.map((x) => x.id)),
|
||||
type: "NONE",
|
||||
status: "PENDING",
|
||||
|
|
@ -7228,7 +7283,7 @@ export class ReportController extends Controller {
|
|||
|
||||
return new HttpSuccess(_salaryRank);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* API ออกคำสั่ง
|
||||
*
|
||||
|
|
@ -7321,37 +7376,89 @@ export class ReportController extends Controller {
|
|||
const _data = {
|
||||
no: Extension.ToThaiNumber((data.length + 1).toString()),
|
||||
fullName: `${v.Prefix}${v.FirstName} ${v.LastName}`,
|
||||
oc: salary.rootId == null ? salary.position == null ? "-" : salary.position :
|
||||
salary.child4 != null
|
||||
? salary.position == null ? salary.child4+"/"+salary.child3+"/"+salary.child2+"/"+salary.child1+"/"+salary.root
|
||||
: salary.position+"/"+salary.child4+"/"+salary.child3+"/"+salary.child2+"/"+salary.child1+"/"+salary.root :
|
||||
salary.child3 != null
|
||||
? salary.position == null ? salary.child3+"/"+salary.child2+"/"+salary.child1+"/"+salary.root
|
||||
: salary.position+"/"+salary.child3+"/"+salary.child2+"/"+salary.child1+"/"+salary.root :
|
||||
salary.child2 != null
|
||||
? salary.position == null ? salary.child2+"/"+salary.child1+"/"+salary.root
|
||||
: salary.position+"/"+salary.child2+"/"+salary.child1+"/"+salary.root :
|
||||
salary.child1 != null
|
||||
? salary.position == null ? salary.child1+"/"+salary.root
|
||||
: salary.position+"/"+salary.child1+"/"+salary.root :
|
||||
salary.root != null
|
||||
? salary.position == null ? salary.root
|
||||
: salary.position+"/"+salary.root : "-",
|
||||
oc:
|
||||
salary.rootId == null
|
||||
? salary.position == null
|
||||
? "-"
|
||||
: salary.position
|
||||
: salary.child4 != null
|
||||
? salary.position == null
|
||||
? salary.child4 +
|
||||
"/" +
|
||||
salary.child3 +
|
||||
"/" +
|
||||
salary.child2 +
|
||||
"/" +
|
||||
salary.child1 +
|
||||
"/" +
|
||||
salary.root
|
||||
: salary.position +
|
||||
"/" +
|
||||
salary.child4 +
|
||||
"/" +
|
||||
salary.child3 +
|
||||
"/" +
|
||||
salary.child2 +
|
||||
"/" +
|
||||
salary.child1 +
|
||||
"/" +
|
||||
salary.root
|
||||
: salary.child3 != null
|
||||
? salary.position == null
|
||||
? salary.child3 +
|
||||
"/" +
|
||||
salary.child2 +
|
||||
"/" +
|
||||
salary.child1 +
|
||||
"/" +
|
||||
salary.root
|
||||
: salary.position +
|
||||
"/" +
|
||||
salary.child3 +
|
||||
"/" +
|
||||
salary.child2 +
|
||||
"/" +
|
||||
salary.child1 +
|
||||
"/" +
|
||||
salary.root
|
||||
: salary.child2 != null
|
||||
? salary.position == null
|
||||
? salary.child2 + "/" + salary.child1 + "/" + salary.root
|
||||
: salary.position +
|
||||
"/" +
|
||||
salary.child2 +
|
||||
"/" +
|
||||
salary.child1 +
|
||||
"/" +
|
||||
salary.root
|
||||
: salary.child1 != null
|
||||
? salary.position == null
|
||||
? salary.child1 + "/" + salary.root
|
||||
: salary.position + "/" + salary.child1 + "/" + salary.root
|
||||
: salary.root != null
|
||||
? salary.position == null
|
||||
? salary.root
|
||||
: salary.position + "/" + salary.root
|
||||
: "-",
|
||||
positionType: salary.posType ? salary.posType : "-",
|
||||
positionLevel: salary.posLevel ? Extension.ToThaiNumber(salary.posLevel.toString()) : "-",
|
||||
positionNumber: salary.orgShortName != null && salary.posMasterNo != null
|
||||
? Extension.ToThaiNumber(salary.orgShortName + salary.posMasterNo)
|
||||
positionLevel: salary.posLevel
|
||||
? Extension.ToThaiNumber(salary.posLevel.toString())
|
||||
: "-",
|
||||
positionNumber:
|
||||
salary.orgShortName != null && salary.posMasterNo != null
|
||||
? Extension.ToThaiNumber(salary.orgShortName + salary.posMasterNo)
|
||||
: "-",
|
||||
amount: salary.amount ? Extension.ToThaiNumber(salary.amount.toLocaleString()) : "-",
|
||||
positionSalaryAmount: salary.positionSalaryAmount
|
||||
? Extension.ToThaiNumber(salary.positionSalaryAmount.toLocaleString())
|
||||
: "-",
|
||||
amountSpecial: salary.amountSpecial
|
||||
? Extension.ToThaiNumber(salary.amountSpecial.toLocaleString())
|
||||
: "-",
|
||||
amount: salary.amount
|
||||
? Extension.ToThaiNumber(salary.amount.toLocaleString()) : "-",
|
||||
positionSalaryAmount: salary.positionSalaryAmount
|
||||
? Extension.ToThaiNumber(salary.positionSalaryAmount.toLocaleString()) : "-",
|
||||
amountSpecial: salary.amountSpecial
|
||||
? Extension.ToThaiNumber(salary.amountSpecial.toLocaleString()) : "-",
|
||||
remark: salary.remark ? salary.remark : "-",
|
||||
remarkVertical: v.RemarkVertical,
|
||||
remarkHorizontal: v.RemarkHorizontal
|
||||
}
|
||||
remarkHorizontal: v.RemarkHorizontal,
|
||||
};
|
||||
data.push(_data);
|
||||
}
|
||||
}),
|
||||
|
|
@ -7399,37 +7506,89 @@ export class ReportController extends Controller {
|
|||
const _data = {
|
||||
no: Extension.ToThaiNumber((data.length + 1).toString()),
|
||||
fullName: `${v.Prefix}${v.FirstName} ${v.LastName}`,
|
||||
oc: salary.rootId == null ? salary.position == null ? "-" : salary.position :
|
||||
salary.child4 != null
|
||||
? salary.position == null ? salary.child4+"/"+salary.child3+"/"+salary.child2+"/"+salary.child1+"/"+salary.root
|
||||
: salary.position+"/"+salary.child4+"/"+salary.child3+"/"+salary.child2+"/"+salary.child1+"/"+salary.root :
|
||||
salary.child3 != null
|
||||
? salary.position == null ? salary.child3+"/"+salary.child2+"/"+salary.child1+"/"+salary.root
|
||||
: salary.position+"/"+salary.child3+"/"+salary.child2+"/"+salary.child1+"/"+salary.root :
|
||||
salary.child2 != null
|
||||
? salary.position == null ? salary.child2+"/"+salary.child1+"/"+salary.root
|
||||
: salary.position+"/"+salary.child2+"/"+salary.child1+"/"+salary.root :
|
||||
salary.child1 != null
|
||||
? salary.position == null ? salary.child1+"/"+salary.root
|
||||
: salary.position+"/"+salary.child1+"/"+salary.root :
|
||||
salary.root != null
|
||||
? salary.position == null ? salary.root
|
||||
: salary.position+"/"+salary.root : "-",
|
||||
oc:
|
||||
salary.rootId == null
|
||||
? salary.position == null
|
||||
? "-"
|
||||
: salary.position
|
||||
: salary.child4 != null
|
||||
? salary.position == null
|
||||
? salary.child4 +
|
||||
"/" +
|
||||
salary.child3 +
|
||||
"/" +
|
||||
salary.child2 +
|
||||
"/" +
|
||||
salary.child1 +
|
||||
"/" +
|
||||
salary.root
|
||||
: salary.position +
|
||||
"/" +
|
||||
salary.child4 +
|
||||
"/" +
|
||||
salary.child3 +
|
||||
"/" +
|
||||
salary.child2 +
|
||||
"/" +
|
||||
salary.child1 +
|
||||
"/" +
|
||||
salary.root
|
||||
: salary.child3 != null
|
||||
? salary.position == null
|
||||
? salary.child3 +
|
||||
"/" +
|
||||
salary.child2 +
|
||||
"/" +
|
||||
salary.child1 +
|
||||
"/" +
|
||||
salary.root
|
||||
: salary.position +
|
||||
"/" +
|
||||
salary.child3 +
|
||||
"/" +
|
||||
salary.child2 +
|
||||
"/" +
|
||||
salary.child1 +
|
||||
"/" +
|
||||
salary.root
|
||||
: salary.child2 != null
|
||||
? salary.position == null
|
||||
? salary.child2 + "/" + salary.child1 + "/" + salary.root
|
||||
: salary.position +
|
||||
"/" +
|
||||
salary.child2 +
|
||||
"/" +
|
||||
salary.child1 +
|
||||
"/" +
|
||||
salary.root
|
||||
: salary.child1 != null
|
||||
? salary.position == null
|
||||
? salary.child1 + "/" + salary.root
|
||||
: salary.position + "/" + salary.child1 + "/" + salary.root
|
||||
: salary.root != null
|
||||
? salary.position == null
|
||||
? salary.root
|
||||
: salary.position + "/" + salary.root
|
||||
: "-",
|
||||
positionType: salary.posType ? salary.posType : "-",
|
||||
positionLevel: salary.posLevel ? Extension.ToThaiNumber(salary.posLevel.toString()) : "-",
|
||||
positionNumber: salary.orgShortName != null && salary.posMasterNo != null
|
||||
? Extension.ToThaiNumber(salary.orgShortName + salary.posMasterNo)
|
||||
positionLevel: salary.posLevel
|
||||
? Extension.ToThaiNumber(salary.posLevel.toString())
|
||||
: "-",
|
||||
positionNumber:
|
||||
salary.orgShortName != null && salary.posMasterNo != null
|
||||
? Extension.ToThaiNumber(salary.orgShortName + salary.posMasterNo)
|
||||
: "-",
|
||||
amount: salary.amount ? Extension.ToThaiNumber(salary.amount.toLocaleString()) : "-",
|
||||
positionSalaryAmount: salary.positionSalaryAmount
|
||||
? Extension.ToThaiNumber(salary.positionSalaryAmount.toLocaleString())
|
||||
: "-",
|
||||
amountSpecial: salary.amountSpecial
|
||||
? Extension.ToThaiNumber(salary.amountSpecial.toLocaleString())
|
||||
: "-",
|
||||
amount: salary.amount
|
||||
? Extension.ToThaiNumber(salary.amount.toLocaleString()) : "-",
|
||||
positionSalaryAmount: salary.positionSalaryAmount
|
||||
? Extension.ToThaiNumber(salary.positionSalaryAmount.toLocaleString()) : "-",
|
||||
amountSpecial: salary.amountSpecial
|
||||
? Extension.ToThaiNumber(salary.amountSpecial.toLocaleString()) : "-",
|
||||
remark: salary.remark ? salary.remark : "-",
|
||||
remarkVertical: v.RemarkVertical,
|
||||
remarkHorizontal: v.RemarkHorizontal
|
||||
}
|
||||
remarkHorizontal: v.RemarkHorizontal,
|
||||
};
|
||||
data.push(_data);
|
||||
}
|
||||
}),
|
||||
|
|
@ -7459,6 +7618,9 @@ export class ReportController extends Controller {
|
|||
amountSpecial: Double | null;
|
||||
positionSalaryAmount: Double | null;
|
||||
mouthSalaryAmount: Double | null;
|
||||
mpCee?: string | null;
|
||||
refCommandCode?: string | null;
|
||||
refCommandName?: string | null;
|
||||
}[];
|
||||
},
|
||||
@Request() request: RequestWithUser,
|
||||
|
|
@ -7490,6 +7652,8 @@ export class ReportController extends Controller {
|
|||
positionLevel: salary.posLevel,
|
||||
refCommandNo: `${v.commandNo}/${Extension.ToThaiYear(v.commandYear)}`,
|
||||
templateDoc: v.templateDoc,
|
||||
refCommandCode: v.refCommandCode,
|
||||
refCommandName: v.refCommandName,
|
||||
})
|
||||
.then(async () => {
|
||||
const before = null;
|
||||
|
|
@ -7528,6 +7692,9 @@ export class ReportController extends Controller {
|
|||
amountSpecial: Double | null;
|
||||
positionSalaryAmount: Double | null;
|
||||
mouthSalaryAmount: Double | null;
|
||||
mpCee?: string | null;
|
||||
refCommandCode?: string | null;
|
||||
refCommandName?: string | null;
|
||||
}[];
|
||||
},
|
||||
@Request() request: RequestWithUser,
|
||||
|
|
@ -7554,6 +7721,8 @@ export class ReportController extends Controller {
|
|||
positionLevel: salary.posLevel ? String(salary.posLevel) : null,
|
||||
refCommandNo: `${v.commandNo}/${Extension.ToThaiYear(v.commandYear)}`,
|
||||
templateDoc: v.templateDoc,
|
||||
refCommandCode: v.refCommandCode,
|
||||
refCommandName: v.refCommandName,
|
||||
})
|
||||
.then(async () => {
|
||||
const before = null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue