ปรับออกคำสั่งลงตำแหน่ง
This commit is contained in:
parent
c5e0fcc4f7
commit
e305ea7a88
20 changed files with 1317 additions and 1183 deletions
|
|
@ -138,7 +138,7 @@ export class ProfileEmployeeController extends Controller {
|
|||
where: { id: id },
|
||||
order: {
|
||||
profileSalary: {
|
||||
date: "DESC",
|
||||
commandDateAffect: "DESC",
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
@ -229,39 +229,40 @@ export class ProfileEmployeeController extends Controller {
|
|||
|
||||
const salary_raw = await this.salaryRepo.find({
|
||||
select: [
|
||||
"date",
|
||||
"position",
|
||||
"commandDateAffect",
|
||||
"posNo",
|
||||
"positionType",
|
||||
"positionLevel",
|
||||
"positionSalaryAmount",
|
||||
"refCommandNo",
|
||||
"commandNo",
|
||||
"amount",
|
||||
"templateDoc",
|
||||
"position",
|
||||
"remark",
|
||||
"positionName",
|
||||
"orgRoot",
|
||||
"orgChild1",
|
||||
"orgChild2",
|
||||
"orgChild3",
|
||||
"orgChild4",
|
||||
"mpCee",
|
||||
"positionCee",
|
||||
"positionExecutive",
|
||||
],
|
||||
where: { profileEmployeeId: id },
|
||||
order: { date: "ASC" },
|
||||
order: { commandDateAffect: "ASC" },
|
||||
});
|
||||
const salarys =
|
||||
salary_raw.length > 1
|
||||
? salary_raw.slice(1).map((item) => ({
|
||||
date: item.date ? Extension.ToThaiNumber(Extension.ToThaiShortDate(item.date)) : null,
|
||||
position: item.position != null ? item.position : "-",
|
||||
date: item.commandDateAffect
|
||||
? Extension.ToThaiNumber(Extension.ToThaiShortDate(item.commandDateAffect))
|
||||
: null,
|
||||
position: item.positionName != null ? item.positionName : "-",
|
||||
posNo: item.posNo != null ? Extension.ToThaiNumber(item.posNo) : null,
|
||||
orgRoot: item.orgRoot,
|
||||
orgChild1: item.orgChild1,
|
||||
orgChild2: item.orgChild2,
|
||||
orgChild3: item.orgChild3,
|
||||
orgChild4: item.orgChild4,
|
||||
mpCee: item.mpCee,
|
||||
positionCee: item.positionCee,
|
||||
positionExecutive: item.positionExecutive,
|
||||
}))
|
||||
: [
|
||||
|
|
@ -274,7 +275,7 @@ export class ProfileEmployeeController extends Controller {
|
|||
orgChild2: null,
|
||||
orgChild3: null,
|
||||
orgChild4: null,
|
||||
mpCee: null,
|
||||
positionCee: null,
|
||||
positionExecutive: null,
|
||||
},
|
||||
];
|
||||
|
|
@ -323,8 +324,8 @@ export class ProfileEmployeeController extends Controller {
|
|||
`${_regisAddres}${_subDistrict}${_district}${_province}${registrationZipCode}`,
|
||||
),
|
||||
date:
|
||||
salary_raw.length > 0 && salary_raw[0].date != null
|
||||
? Extension.ToThaiNumber(Extension.ToThaiShortDate(salary_raw[0].date))
|
||||
salary_raw.length > 0 && salary_raw[0].commandDateAffect != null
|
||||
? Extension.ToThaiNumber(Extension.ToThaiShortDate(salary_raw[0].commandDateAffect))
|
||||
: "",
|
||||
positionName: profile.position != null ? profile.position : "",
|
||||
appointText:
|
||||
|
|
@ -336,12 +337,12 @@ export class ProfileEmployeeController extends Controller {
|
|||
? Extension.ToThaiNumber(Extension.ToThaiNumber(salary_raw[0].posNo))
|
||||
: "",
|
||||
position:
|
||||
salary_raw.length > 0 && salary_raw[0].position != null
|
||||
? Extension.ToThaiNumber(Extension.ToThaiNumber(salary_raw[0].position))
|
||||
salary_raw.length > 0 && salary_raw[0].positionName != null
|
||||
? Extension.ToThaiNumber(Extension.ToThaiNumber(salary_raw[0].positionName))
|
||||
: "",
|
||||
mpCee:
|
||||
salary_raw.length > 0 && salary_raw[0].mpCee != null
|
||||
? Extension.ToThaiNumber(Extension.ToThaiNumber(salary_raw[0].mpCee))
|
||||
positionCee:
|
||||
salary_raw.length > 0 && salary_raw[0].positionCee != null
|
||||
? Extension.ToThaiNumber(Extension.ToThaiNumber(salary_raw[0].positionCee))
|
||||
: "",
|
||||
positionExecutive:
|
||||
salary_raw.length > 0 && salary_raw[0].positionExecutive != null
|
||||
|
|
@ -643,15 +644,15 @@ export class ProfileEmployeeController extends Controller {
|
|||
];
|
||||
const salary_raw = await this.salaryRepo.find({
|
||||
select: [
|
||||
"date",
|
||||
"position",
|
||||
"commandDateAffect",
|
||||
"positionName",
|
||||
"posNo",
|
||||
"positionType",
|
||||
"positionLevel",
|
||||
"positionSalaryAmount",
|
||||
"refCommandNo",
|
||||
"commandNo",
|
||||
"amount",
|
||||
"templateDoc",
|
||||
"remark",
|
||||
],
|
||||
where: { profileEmployeeId: id },
|
||||
order: { order: "ASC" },
|
||||
|
|
@ -660,15 +661,15 @@ export class ProfileEmployeeController extends Controller {
|
|||
const salarys =
|
||||
salary_raw.length > 0
|
||||
? salary_raw.map((item) => ({
|
||||
SalaryDate: item.date
|
||||
? Extension.ToThaiNumber(Extension.ToThaiFullDate2(item.date))
|
||||
SalaryDate: item.commandDateAffect
|
||||
? Extension.ToThaiNumber(Extension.ToThaiFullDate2(item.commandDateAffect))
|
||||
: null,
|
||||
Position: item.position != null ? Extension.ToThaiNumber(item.position) : null,
|
||||
Position: item.positionName != null ? Extension.ToThaiNumber(item.positionName) : null,
|
||||
PosNo: item.posNo != null ? Extension.ToThaiNumber(item.posNo) : null,
|
||||
Salary:
|
||||
item.amount != null ? Extension.ToThaiNumber(item.amount.toLocaleString()) : null,
|
||||
Rank: item.positionLevel != null ? Extension.ToThaiNumber(item.positionLevel) : null,
|
||||
RefAll: item.templateDoc ? Extension.ToThaiNumber(item.templateDoc) : null,
|
||||
RefAll: item.remark ? Extension.ToThaiNumber(item.remark) : null,
|
||||
PositionLevel:
|
||||
item.positionLevel != null ? Extension.ToThaiNumber(item.positionLevel) : null,
|
||||
PositionType: item.positionType ?? null,
|
||||
|
|
@ -1705,7 +1706,7 @@ export class ProfileEmployeeController extends Controller {
|
|||
@Query() isAll?: boolean,
|
||||
@Query() retireType?: string,
|
||||
@Query() sortBy: string = "current_holders.posMasterNo",
|
||||
@Query() sort: "ASC"|"DESC" = "ASC",
|
||||
@Query() sort: "ASC" | "DESC" = "ASC",
|
||||
) {
|
||||
let _data = await new permission().PermissionOrgList(request, "SYS_REGISTRY_EMP");
|
||||
let queryLike =
|
||||
|
|
@ -4432,7 +4433,7 @@ export class ProfileEmployeeController extends Controller {
|
|||
body: {
|
||||
result: {
|
||||
id: string;
|
||||
templateDoc: string;
|
||||
remark: string;
|
||||
amount: Double | null;
|
||||
positionSalaryAmount: Double | null;
|
||||
mouthSalaryAmount: Double | null;
|
||||
|
|
@ -4462,7 +4463,7 @@ export class ProfileEmployeeController extends Controller {
|
|||
positionType: profile.posTypeNameTemp,
|
||||
positionLevel: profile.posLevelNameTemp,
|
||||
refCommandNo: v.refCommandNo,
|
||||
templateDoc: v.templateDoc,
|
||||
remark: v.remark,
|
||||
})
|
||||
.then(async () => {
|
||||
profile.statusTemp = "DONE";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue