From 39ec6018d2a239b573cb72d42b849223508f8049 Mon Sep 17 00:00:00 2001 From: moss <> Date: Thu, 1 May 2025 09:40:55 +0700 Subject: [PATCH] =?UTF-8?q?snap=20=E0=B8=9A=E0=B8=B2=E0=B8=87=E0=B8=AD?= =?UTF-8?q?=E0=B8=B1=E0=B8=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/SalaryPeriodController.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/controllers/SalaryPeriodController.ts b/src/controllers/SalaryPeriodController.ts index 71c369f..7389d2e 100644 --- a/src/controllers/SalaryPeriodController.ts +++ b/src/controllers/SalaryPeriodController.ts @@ -2554,6 +2554,9 @@ export class SalaryPeriodController extends Controller { await this.salaryProfileEmployeeRepository.remove(salaryProfileEmployee, { data: request }); await this.salaryOrgEmployeeRepository.remove(salaryOrgEmployee, { data: request }); let orgs = await new CallAPI().GetData(request, "/org/unauthorize/active/root/id"); + //snap บางสำนัก + orgs = orgs.filter((x: any) => x.rootId.includes(["d7e98989-b5ce-47d6-93c3-ab63ed486348"])); + let total = 1000; // let _orgProfiles = await new CallAPI().PostData(request, "/org/unauthorize/salary/gen", { let _orgProfiles = await new CallAPI().PostData(request, "/org/unauthorize/new-salary/gen", { @@ -2761,7 +2764,7 @@ export class SalaryPeriodController extends Controller { } }), ); - console.log("mlength",orgProfileEmployees.length) + console.log("mlength", orgProfileEmployees.length); await Promise.all( orgProfileEmployees.map(async (profile: any) => { try { @@ -2803,8 +2806,10 @@ export class SalaryPeriodController extends Controller { salaryProfileNew.type = salaryOld == null ? 0 : salaryOld.type; // salaryProfileNew.salaryLevel = salaryOld && salaryOld.salaryLevelNew ? salaryOld.salaryLevelNew : salaryOld?.salaryLevel; // salaryProfileNew.group = salaryOld && salaryOld.groupNew ? salaryOld.groupNew : salaryOld?.group; - salaryProfileNew.salaryLevelNew = salaryOld && salaryOld.salaryLevelNew ? salaryOld.salaryLevelNew : null; - salaryProfileNew.groupNew = salaryOld && salaryOld.groupNew ? salaryOld.groupNew : null; + salaryProfileNew.salaryLevelNew = + salaryOld && salaryOld.salaryLevelNew ? salaryOld.salaryLevelNew : null; + salaryProfileNew.groupNew = + salaryOld && salaryOld.groupNew ? salaryOld.groupNew : null; salaryProfileNew.amount = salaryOld == null ? 0 : salaryOld.amount; salaryProfileNew.amountSpecial = salaryOld == null ? 0 : salaryOld.amountSpecial; salaryProfileNew.amountUse = salaryOld == null ? 0 : salaryOld.amountUse;