From e3d0ed20827ff712910e9abbb06818e4bdda4c2a Mon Sep 17 00:00:00 2001 From: "DESKTOP-2S5P7D1\\Windows 10" Date: Fri, 21 Feb 2025 19:01:48 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B8=84=E0=B8=B3?= =?UTF-8?q?=E0=B8=AA=E0=B8=B1=E0=B9=88=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/ReportController.ts | 49 ++++++++++++++++------------- 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/src/controllers/ReportController.ts b/src/controllers/ReportController.ts index 3ac005c..e357d3b 100644 --- a/src/controllers/ReportController.ts +++ b/src/controllers/ReportController.ts @@ -1079,18 +1079,18 @@ export class ReportController extends Controller { body: { refIds: { refId: string - commandAffectDate: Date | null commandNo: string | null + commandYear: number | null commandId: string | null - commandYear: number - templateDoc: string | null + remark: string | null amount: Double | null amountSpecial?: Double | null positionSalaryAmount: Double | null mouthSalaryAmount: Double | null - mpCee?: string | null - refCommandCode?: string | null - refCommandName?: string | null + commandCode?: string | null + commandName?: string | null + commandDateAffect: Date | null + commandDateSign: Date | null }[] } ) { @@ -1099,15 +1099,17 @@ export class ReportController extends Controller { data: body.refIds.map(v => ({ profileId: v.refId, commandId: v.commandId, - date: v.commandAffectDate, - refCommandNo: `${v.commandNo}/${Extension.ToThaiYear(v.commandYear)}`, - salaryRef: v.templateDoc, amount: v.amount, amountSpecial: v.amountSpecial, positionSalaryAmount: v.positionSalaryAmount, mouthSalaryAmount: v.mouthSalaryAmount, - refCommandCode: v.refCommandCode, - refCommandName: v.refCommandName, + commandNo: v.commandNo, + commandYear: v.commandYear, + commandDateAffect: v.commandDateAffect, + commandDateSign: v.commandDateSign, + commandCode: v.commandCode, + commandName: v.commandName, + remark: v.remark, })), }) .then(async res => { @@ -1172,18 +1174,18 @@ export class ReportController extends Controller { body: { refIds: { refId: string - commandAffectDate: Date | null commandNo: string | null + commandYear: number | null commandId: string | null - commandYear: number - templateDoc: string | null + remark: string | null amount: Double | null amountSpecial?: Double | null positionSalaryAmount: Double | null mouthSalaryAmount: Double | null - mpCee?: string | null - refCommandCode?: string | null - refCommandName?: string | null + commandCode?: string | null + commandName?: string | null + commandDateAffect: Date | null + commandDateSign: Date | null }[] } ) { @@ -1192,15 +1194,18 @@ export class ReportController extends Controller { data: body.refIds.map(v => ({ profileId: v.refId, commandId: v.commandId, - date: v.commandAffectDate, - refCommandNo: `${v.commandNo}/${Extension.ToThaiYear(v.commandYear)}`, - salaryRef: v.templateDoc, amount: v.amount, + amountSpecial: v.amountSpecial, positionSalaryAmount: v.positionSalaryAmount, mouthSalaryAmount: v.mouthSalaryAmount, isGovernment: false, - refCommandCode: v.refCommandCode, - refCommandName: v.refCommandName, + commandNo: v.commandNo, + commandYear: v.commandYear, + commandDateAffect: v.commandDateAffect, + commandDateSign: v.commandDateSign, + commandCode: v.commandCode, + commandName: v.commandName, + remark: v.remark, })), }) .then(async res => {