diff --git a/src/controllers/SalaryPeriodEmployeeController.ts b/src/controllers/SalaryPeriodEmployeeController.ts index 3fe8627..7cf5afb 100644 --- a/src/controllers/SalaryPeriodEmployeeController.ts +++ b/src/controllers/SalaryPeriodEmployeeController.ts @@ -1020,7 +1020,58 @@ export class SalaryPeriodEmployeeController extends Controller { .take(body.pageSize) .getManyAndCount(); - return new HttpSuccess({ data: salaryProfile, total }); + const mapSalaryProfile = salaryProfile.map((item) => ({ + id: item.id, + salaryOrgId: item.salaryOrgId, + salaryLevel: item.salaryLevel, + salaryLevelNew: item.salaryLevelNew, + prefix: item.prefix, + firstName: item.firstName, + lastName: item.lastName, + citizenId: item.citizenId, + posMasterNoPrefix: item.posMasterNoPrefix, + posMasterNo: item.posMasterNo, + posMasterNoSuffix: item.posMasterNoSuffix, + orgShortName: item.orgShortName, + position: item.position, + posType: item.posType, + posTypeShort: item.posTypeShort, + posLevel: + item.posTypeShort != null && item.posLevel != null + ? `${item.posTypeShort} ${item.posLevel}` + : null, + group: item.group, + groupNew: item.groupNew, + amount: item.amount, + amountSpecial: item.amountSpecial, + amountUse: item.amountUse, + positionSalaryAmount: item.positionSalaryAmount, + positionSalaryAmountPer: item.positionSalaryAmountPer, + positionSalaryDayAmount: item.positionSalaryDayAmount, + type: item.type, + status: item.status, + revisionId: item.revisionId, + rootId: item.rootId, + root: item.root, + child1Id: item.child1Id, + child1: item.child1, + child2Id: item.child2Id, + child2: item.child2, + child3Id: item.child3Id, + child3: item.child3, + child4Id: item.child4Id, + child4: item.child4, + result: item.result, + duration: item.duration, + isPunish: item.isPunish, + isSuspension: item.isSuspension, + isAbsent: item.isAbsent, + isLeave: item.isLeave, + isRetired: item.isRetired, + isReserve: item.isReserve, + isNext: item.isNext + })); + return new HttpSuccess({ data: mapSalaryProfile, total }); } /**