update
This commit is contained in:
parent
f5fd33f7f7
commit
3b067ef714
2 changed files with 52 additions and 28 deletions
|
|
@ -1760,10 +1760,10 @@ export class ReportController extends Controller {
|
||||||
// (profile.child1 == undefined && profile.child1 == null ? "" : profile.child1 + " ") +
|
// (profile.child1 == undefined && profile.child1 == null ? "" : profile.child1 + " ") +
|
||||||
// (profile.root == undefined && profile.root == null ? "" : profile.root),
|
// (profile.root == undefined && profile.root == null ? "" : profile.root),
|
||||||
position:
|
position:
|
||||||
(profile.position ? profile.position : "-") +
|
(profile.position ? profile.position : "-") +
|
||||||
(profile.posExecutive != null && profile.posExecutive != ""
|
(profile.posExecutive
|
||||||
? "\n" + profile.posExecutive
|
? `\n${profile.positionExecutiveField ? `${profile.posExecutive}(${profile.positionExecutiveField})` : profile.posExecutive}`
|
||||||
: ""),
|
: ""),
|
||||||
affiliation:
|
affiliation:
|
||||||
(profile.child4 == undefined && profile.child4 == null ? "" : profile.child4 + "\n") +
|
(profile.child4 == undefined && profile.child4 == null ? "" : profile.child4 + "\n") +
|
||||||
(profile.child3 == undefined && profile.child3 == null ? "" : profile.child3 + "\n") +
|
(profile.child3 == undefined && profile.child3 == null ? "" : profile.child3 + "\n") +
|
||||||
|
|
@ -1874,10 +1874,10 @@ export class ReportController extends Controller {
|
||||||
log_type: profile.type,
|
log_type: profile.type,
|
||||||
log_isNext: profile.isNext,
|
log_isNext: profile.isNext,
|
||||||
position:
|
position:
|
||||||
(profile.position ? profile.position : "-") +
|
(profile.position ? profile.position : "-") +
|
||||||
(profile.posExecutive != null && profile.posExecutive != ""
|
(profile.posExecutive
|
||||||
? "\n" + profile.posExecutive
|
? `\n${profile.positionExecutiveField ? `${profile.posExecutive}(${profile.positionExecutiveField})` : profile.posExecutive}`
|
||||||
: ""),
|
: ""),
|
||||||
affiliation:
|
affiliation:
|
||||||
(profile.child4 == undefined && profile.child4 == null ? "" : profile.child4 + "\n") +
|
(profile.child4 == undefined && profile.child4 == null ? "" : profile.child4 + "\n") +
|
||||||
(profile.child3 == undefined && profile.child3 == null ? "" : profile.child3 + "\n") +
|
(profile.child3 == undefined && profile.child3 == null ? "" : profile.child3 + "\n") +
|
||||||
|
|
@ -1995,10 +1995,10 @@ export class ReportController extends Controller {
|
||||||
no: Extension.ToThaiNumber((index + 1).toLocaleString()),
|
no: Extension.ToThaiNumber((index + 1).toLocaleString()),
|
||||||
fullname: profile.prefix + profile.firstName + " " + profile.lastName,
|
fullname: profile.prefix + profile.firstName + " " + profile.lastName,
|
||||||
position:
|
position:
|
||||||
(profile.position ? profile.position : "-") +
|
(profile.position ? profile.position : "-") +
|
||||||
(profile.posExecutive != null && profile.posExecutive != ""
|
(profile.posExecutive
|
||||||
? "\n" + profile.posExecutive
|
? `\n${profile.positionExecutiveField ? `${profile.posExecutive}(${profile.positionExecutiveField})` : profile.posExecutive}`
|
||||||
: ""),
|
: ""),
|
||||||
affiliation: affiliation,
|
affiliation: affiliation,
|
||||||
posLevel: profile.posLevel,
|
posLevel: profile.posLevel,
|
||||||
posNumber:
|
posNumber:
|
||||||
|
|
@ -2094,10 +2094,10 @@ export class ReportController extends Controller {
|
||||||
no: Extension.ToThaiNumber((index + 1).toLocaleString()),
|
no: Extension.ToThaiNumber((index + 1).toLocaleString()),
|
||||||
fullname: profile.prefix + profile.firstName + " " + profile.lastName,
|
fullname: profile.prefix + profile.firstName + " " + profile.lastName,
|
||||||
position:
|
position:
|
||||||
(profile.position ? profile.position : "-") +
|
(profile.position ? profile.position : "-") +
|
||||||
(profile.posExecutive != null && profile.posExecutive != ""
|
(profile.posExecutive
|
||||||
? "\n" + profile.posExecutive
|
? `\n${profile.positionExecutiveField ? `${profile.posExecutive}(${profile.positionExecutiveField})` : profile.posExecutive}`
|
||||||
: ""),
|
: ""),
|
||||||
affiliation: affiliation,
|
affiliation: affiliation,
|
||||||
posLevel: profile.posLevel,
|
posLevel: profile.posLevel,
|
||||||
posNumber:
|
posNumber:
|
||||||
|
|
@ -2196,8 +2196,10 @@ export class ReportController extends Controller {
|
||||||
no: Extension.ToThaiNumber(String(index + 1)),
|
no: Extension.ToThaiNumber(String(index + 1)),
|
||||||
fullname: item.prefix + item.firstName + " " + item.lastName,
|
fullname: item.prefix + item.firstName + " " + item.lastName,
|
||||||
position:
|
position:
|
||||||
(item.position ? item.position : "-") +
|
(item.position ? item.position : "-") +
|
||||||
(item.posExecutive != null && item.posExecutive != "" ? "\n" + item.posExecutive : ""),
|
(item.posExecutive
|
||||||
|
? `\n${item.positionExecutiveField ? `${item.posExecutive}(${item.positionExecutiveField})` : item.posExecutive}`
|
||||||
|
: ""),
|
||||||
affiliation:
|
affiliation:
|
||||||
(item.child4 == undefined && item.child4 == null ? "" : item.child4 + "\n") +
|
(item.child4 == undefined && item.child4 == null ? "" : item.child4 + "\n") +
|
||||||
(item.child3 == undefined && item.child3 == null ? "" : item.child3 + "\n") +
|
(item.child3 == undefined && item.child3 == null ? "" : item.child3 + "\n") +
|
||||||
|
|
@ -2314,8 +2316,10 @@ export class ReportController extends Controller {
|
||||||
no: Extension.ToThaiNumber(String(index + 1)),
|
no: Extension.ToThaiNumber(String(index + 1)),
|
||||||
fullname: item.prefix + item.firstName + " " + item.lastName,
|
fullname: item.prefix + item.firstName + " " + item.lastName,
|
||||||
position:
|
position:
|
||||||
(item.position ? item.position : "-") +
|
(item.position ? item.position : "-") +
|
||||||
(item.posExecutive != null && item.posExecutive != "" ? "\n" + item.posExecutive : ""),
|
(item.posExecutive
|
||||||
|
? `\n${item.positionExecutiveField ? `${item.posExecutive}(${item.positionExecutiveField})` : item.posExecutive}`
|
||||||
|
: ""),
|
||||||
affiliation:
|
affiliation:
|
||||||
(item.child4 == undefined && item.child4 == null ? "" : item.child4 + "\n") +
|
(item.child4 == undefined && item.child4 == null ? "" : item.child4 + "\n") +
|
||||||
(item.child3 == undefined && item.child3 == null ? "" : item.child3 + "\n") +
|
(item.child3 == undefined && item.child3 == null ? "" : item.child3 + "\n") +
|
||||||
|
|
@ -2468,8 +2472,10 @@ export class ReportController extends Controller {
|
||||||
no: Extension.ToThaiNumber(String(index + 1)),
|
no: Extension.ToThaiNumber(String(index + 1)),
|
||||||
fullname: item.prefix + item.firstName + " " + item.lastName,
|
fullname: item.prefix + item.firstName + " " + item.lastName,
|
||||||
position:
|
position:
|
||||||
(item.position ? item.position : "-") +
|
(item.position ? item.position : "-") +
|
||||||
(item.posExecutive != null && item.posExecutive != "" ? "\n" + item.posExecutive : ""),
|
(item.posExecutive
|
||||||
|
? `\n${item.positionExecutiveField ? `${item.posExecutive}(${item.positionExecutiveField})` : item.posExecutive}`
|
||||||
|
: ""),
|
||||||
affiliation:
|
affiliation:
|
||||||
(item.child4 == undefined && item.child4 == null ? "" : item.child4 + "\n") +
|
(item.child4 == undefined && item.child4 == null ? "" : item.child4 + "\n") +
|
||||||
(item.child3 == undefined && item.child3 == null ? "" : item.child3 + "\n") +
|
(item.child3 == undefined && item.child3 == null ? "" : item.child3 + "\n") +
|
||||||
|
|
@ -2497,8 +2503,10 @@ export class ReportController extends Controller {
|
||||||
no: Extension.ToThaiNumber(String(index + 1)),
|
no: Extension.ToThaiNumber(String(index + 1)),
|
||||||
fullname: item.prefix + item.firstName + " " + item.lastName,
|
fullname: item.prefix + item.firstName + " " + item.lastName,
|
||||||
position:
|
position:
|
||||||
(item.position ? item.position : "-") +
|
(item.position ? item.position : "-") +
|
||||||
(item.posExecutive != null && item.posExecutive != "" ? "\n" + item.posExecutive : ""),
|
(item.posExecutive
|
||||||
|
? `\n${item.positionExecutiveField ? `${item.posExecutive}(${item.positionExecutiveField})` : item.posExecutive}`
|
||||||
|
: ""),
|
||||||
affiliation:
|
affiliation:
|
||||||
(item.child4 == undefined && item.child4 == null ? "" : item.child4 + "\n") +
|
(item.child4 == undefined && item.child4 == null ? "" : item.child4 + "\n") +
|
||||||
(item.child3 == undefined && item.child3 == null ? "" : item.child3 + "\n") +
|
(item.child3 == undefined && item.child3 == null ? "" : item.child3 + "\n") +
|
||||||
|
|
@ -2627,8 +2635,10 @@ export class ReportController extends Controller {
|
||||||
fullname: item.prefix + item.firstName + " " + item.lastName,
|
fullname: item.prefix + item.firstName + " " + item.lastName,
|
||||||
root: item.root ?? "-",
|
root: item.root ?? "-",
|
||||||
position:
|
position:
|
||||||
(item.position ? item.position : "-") +
|
(item.position ? item.position : "-") +
|
||||||
(item.posExecutive != null && item.posExecutive != "" ? "\n" + item.posExecutive : ""),
|
(item.posExecutive
|
||||||
|
? `\n${item.positionExecutiveField ? `${item.posExecutive} (${item.positionExecutiveField})` : item.posExecutive}`
|
||||||
|
: ""),
|
||||||
posMasterNo:
|
posMasterNo:
|
||||||
Extension.ToThaiNumber(item.orgShortName) +
|
Extension.ToThaiNumber(item.orgShortName) +
|
||||||
" " +
|
" " +
|
||||||
|
|
@ -9058,6 +9068,8 @@ export class ReportController extends Controller {
|
||||||
posNoAbb: salary.orgShortName,
|
posNoAbb: salary.orgShortName,
|
||||||
positionName: salary.position,
|
positionName: salary.position,
|
||||||
positionExecutive: salary.posExecutive,
|
positionExecutive: salary.posExecutive,
|
||||||
|
positionExecutiveField: salary.positionExecutiveField,
|
||||||
|
positionArea: salary.positionArea,
|
||||||
positionType: salary.posType,
|
positionType: salary.posType,
|
||||||
positionLevel: salary.posLevel,
|
positionLevel: salary.posLevel,
|
||||||
commandId: v.commandId,
|
commandId: v.commandId,
|
||||||
|
|
@ -9139,6 +9151,8 @@ export class ReportController extends Controller {
|
||||||
posNoAbb: salary.orgShortName,
|
posNoAbb: salary.orgShortName,
|
||||||
positionName: salary.position,
|
positionName: salary.position,
|
||||||
positionExecutive: salary.posExecutive,
|
positionExecutive: salary.posExecutive,
|
||||||
|
positionExecutiveField: salary.positionExecutiveField,
|
||||||
|
positionArea: salary.positionArea,
|
||||||
positionType: salary.posType,
|
positionType: salary.posType,
|
||||||
positionLevel: salary.posLevel,
|
positionLevel: salary.posLevel,
|
||||||
commandId: v.commandId,
|
commandId: v.commandId,
|
||||||
|
|
@ -9220,6 +9234,8 @@ export class ReportController extends Controller {
|
||||||
posNoAbb: salary.orgShortName,
|
posNoAbb: salary.orgShortName,
|
||||||
positionName: salary.position,
|
positionName: salary.position,
|
||||||
positionExecutive: salary.posExecutive,
|
positionExecutive: salary.posExecutive,
|
||||||
|
positionExecutiveField: salary.positionExecutiveField,
|
||||||
|
positionArea: salary.positionArea,
|
||||||
positionType: salary.posType,
|
positionType: salary.posType,
|
||||||
positionLevel: salary.posLevel,
|
positionLevel: salary.posLevel,
|
||||||
commandId: v.commandId,
|
commandId: v.commandId,
|
||||||
|
|
|
||||||
|
|
@ -1618,7 +1618,7 @@ export class SalaryPeriodController extends Controller {
|
||||||
.orWhere("profile.position LIKE :keyword", { keyword: `%${body.keyword}%` })
|
.orWhere("profile.position LIKE :keyword", { keyword: `%${body.keyword}%` })
|
||||||
.orWhere("profile.posType LIKE :keyword", { keyword: `%${body.keyword}%` })
|
.orWhere("profile.posType LIKE :keyword", { keyword: `%${body.keyword}%` })
|
||||||
.orWhere("profile.posLevel LIKE :keyword", { keyword: `%${body.keyword}%` })
|
.orWhere("profile.posLevel LIKE :keyword", { keyword: `%${body.keyword}%` })
|
||||||
// .orWhere("profile.posExecutive LIKE :keyword", { keyword: `%${body.keyword}%` })
|
.orWhere("profile.posExecutive LIKE :keyword", { keyword: `%${body.keyword}%` })
|
||||||
.orWhere("profile.amount LIKE :keyword", { keyword: `%${body.keyword}%` })
|
.orWhere("profile.amount LIKE :keyword", { keyword: `%${body.keyword}%` })
|
||||||
.orWhere("profile.amountSpecial LIKE :keyword", { keyword: `%${body.keyword}%` })
|
.orWhere("profile.amountSpecial LIKE :keyword", { keyword: `%${body.keyword}%` })
|
||||||
.orWhere("profile.amountUse LIKE :keyword", { keyword: `%${body.keyword}%` })
|
.orWhere("profile.amountUse LIKE :keyword", { keyword: `%${body.keyword}%` })
|
||||||
|
|
@ -1694,7 +1694,15 @@ export class SalaryPeriodController extends Controller {
|
||||||
.take(body.pageSize)
|
.take(body.pageSize)
|
||||||
.getManyAndCount();
|
.getManyAndCount();
|
||||||
|
|
||||||
return new HttpSuccess({ data: salaryProfile, total });
|
const result = salaryProfile.map((profile) => ({
|
||||||
|
...profile,
|
||||||
|
posExecutive:
|
||||||
|
profile.positionExecutiveField
|
||||||
|
? `${profile.posExecutive} (${profile.positionExecutiveField})`
|
||||||
|
: profile.posExecutive ?? null,
|
||||||
|
}));
|
||||||
|
|
||||||
|
return new HttpSuccess({ data: result, total });
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue