From 0fae96a7138e6a5d684a2f014ee0d0f53be5f9a3 Mon Sep 17 00:00:00 2001 From: "DESKTOP-2S5P7D1\\Windows 10" Date: Fri, 21 Feb 2025 19:00:24 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B8=9A=E0=B8=B1?= =?UTF-8?q?=E0=B8=99=E0=B8=97=E0=B8=B6=E0=B8=81=E0=B8=84=E0=B8=B3=E0=B8=AA?= =?UTF-8?q?=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 | 731 ++++++++++++++-------------- 1 file changed, 371 insertions(+), 360 deletions(-) diff --git a/src/controllers/ReportController.ts b/src/controllers/ReportController.ts index 536c623..7a6c7cb 100644 --- a/src/controllers/ReportController.ts +++ b/src/controllers/ReportController.ts @@ -1147,7 +1147,7 @@ export class ReportController extends Controller { }, }); // console.log(">>>>3",salaryProfile1); - + //รอบปีก่อนหน้า const salaryPeriodIncrease2_APR = await this.salaryPeriodRepository.findOne({ where: { @@ -1584,7 +1584,7 @@ export class ReportController extends Controller { : item.type === "FULLHAFT" ? "หนึ่งขั้นครึ่ง" : "-", - score1: item.result??"-", //ผลการประเมินฯ ครั้งที่ 1 + score1: item.result ?? "-", //ผลการประเมินฯ ครั้งที่ 1 score2: "-", //ผลการประเมินฯ ครั้งที่ 2 })) : null, @@ -1664,7 +1664,7 @@ export class ReportController extends Controller { : item.type === "FULLHAFT" ? "หนึ่งขั้นครึ่ง" : "-", - score1: item.result??"-", //ผลการประเมินฯ ครั้งที่ 1 + score1: item.result ?? "-", //ผลการประเมินฯ ครั้งที่ 1 score2: "-", //ผลการประเมินฯ ครั้งที่ 2 })) : null, @@ -2253,7 +2253,7 @@ export class ReportController extends Controller { }, }, isRetired: true, // เฉพาะคนที่เกษียณ - type: Not(In(["NONE","PENDING"])), + type: Not(In(["NONE", "PENDING"])), }, order: { type: "DESC", @@ -2503,14 +2503,10 @@ export class ReportController extends Controller { @Path() salaryPeriodId: string, @Path() group: string, ) { - - return new HttpSuccess({ template: "gov2-10", reportName: "gov2-10", - data: { - - }, + data: {}, }); } @@ -4481,7 +4477,7 @@ export class ReportController extends Controller { const matchingProfile = aprPreviousYearProfileCurrent.find( (profileAPR) => profileAPR.citizenId === profile.citizenId, ); - if (!matchingProfile) return false; + if (!matchingProfile) return false; const typeMatch = checkTypeMatch(matchingProfile.type, profile.type); return typeMatch; }) @@ -4783,7 +4779,7 @@ export class ReportController extends Controller { amountSpecial: profile.amountSpecial ? Extension.ToThaiNumber(profile.amountSpecial.toLocaleString()) : "-", - score: profile.result??"-", + score: profile.result ?? "-", reason: null, }; }); @@ -6469,326 +6465,327 @@ export class ReportController extends Controller { }); } - /** - * API ออกคำสั่ง 33 - * - * @summary ออกคำสั่ง 33 - * - * @param {string} id Guid, *Id ผังเงินเดือน - */ - @Post("command/33/resume") - async SalaryReport33Resume( - @Body() - body: { - result: { - id: string; - refCommandNo: string; - templateDoc: string; - mpCee?: string | null; - refCommandCode?: string | null; - refCommandName?: string | null; - }[]; - }, - @Request() request: RequestWithUser, - ) { - await Promise.all( - body.result.map(async (v) => { - const salary = await this.salaryProfileRepository.findOne({ - where: { - id: v.id, - }, - }); + // /** + // * API ออกคำสั่ง 33 + // * + // * @summary ออกคำสั่ง 33 + // * + // * @param {string} id Guid, *Id ผังเงินเดือน + // */ + // @Post("command/33/resume") + // async SalaryReport33Resume( + // @Body() + // body: { + // result: { + // id: string; + // refCommandNo: string; + // templateDoc: string; + // mpCee?: string | null; + // refCommandCode?: string | null; + // refCommandName?: string | null; + // }[]; + // }, + // @Request() request: RequestWithUser, + // ) { + // await Promise.all( + // body.result.map(async (v) => { + // const salary = await this.salaryProfileRepository.findOne({ + // where: { + // id: v.id, + // }, + // }); - if (salary != null) { - await new CallAPI() - .PostData(request, "/org/profile/salary", { - profileId: salary.profileId, - date: new Date(), - amount: salary.positionSalaryAmount, - positionSalaryAmount: salary.amountSpecial, - mouthSalaryAmount: null, - posNo: salary.orgShortName + salary.posMasterNo, - position: salary.position, - positionLine: null, - positionPathSide: null, - positionExecutive: salary.posExecutive, - positionType: salary.posType, - positionLevel: salary.posLevel, - refCommandNo: v.refCommandNo, - templateDoc: v.templateDoc, - refCommandCode: v.refCommandCode, - refCommandName: v.refCommandName, - }) - .then(async () => { - const before = null; - salary.status = "DONE"; - salary.lastUpdateUserId = request.user.sub; - salary.lastUpdateFullName = request.user.name; - salary.lastUpdatedAt = new Date(); - await this.salaryProfileRepository.save(salary, { data: request }); - setLogDataDiff(request, { before, after: salary }); - }); - } - }), - ); - return new HttpSuccess(); - } + // if (salary != null) { + // await new CallAPI() + // .PostData(request, "/org/profile/salary", { + // profileId: salary.profileId, - /** - * API ออกคำสั่ง 34 - * - * @summary ออกคำสั่ง 34 - * - * @param {string} id Guid, *Id ผังเงินเดือน - */ - @Post("command/34/resume") - async SalaryReport34Resume( - @Body() - body: { - result: { - id: string; - refCommandNo: string; - templateDoc: string; - mpCee?: string | null; - refCommandCode?: string | null; - refCommandName?: string | null; - }[]; - }, - @Request() request: RequestWithUser, - ) { - await Promise.all( - body.result.map(async (v) => { - const salary = await this.salaryProfileRepository.findOne({ - where: { - id: v.id, - }, - }); - if (salary != null) { - await new CallAPI() - .PostData(request, "/org/profile/salary", { - profileId: salary.profileId, - date: new Date(), - amount: salary.positionSalaryAmount, - positionSalaryAmount: salary.amountSpecial, - mouthSalaryAmount: null, - posNo: salary.orgShortName + salary.posMasterNo, - position: salary.position, - positionLine: null, - positionPathSide: null, - positionExecutive: salary.posExecutive, - positionType: salary.posType, - positionLevel: salary.posLevel, - refCommandNo: v.refCommandNo, - templateDoc: v.templateDoc, - refCommandCode: v.refCommandCode, - refCommandName: v.refCommandName, - }) - .then(async () => { - const before = null; - salary.status = "DONE"; - salary.lastUpdateUserId = request.user.sub; - salary.lastUpdateFullName = request.user.name; - salary.lastUpdatedAt = new Date(); - await this.salaryProfileRepository.save(salary, { data: request }); - setLogDataDiff(request, { before, after: salary }); - }); - } - }), - ); - return new HttpSuccess(); - } + // date: new Date(), + // amount: salary.positionSalaryAmount, + // positionSalaryAmount: salary.amountSpecial, + // mouthSalaryAmount: null, + // posNo: salary.orgShortName + salary.posMasterNo, + // position: salary.position, + // positionLine: null, + // positionPathSide: null, + // positionExecutive: salary.posExecutive, + // positionType: salary.posType, + // positionLevel: salary.posLevel, + // refCommandNo: v.refCommandNo, + // templateDoc: v.templateDoc, + // refCommandCode: v.refCommandCode, + // refCommandName: v.refCommandName, + // }) + // .then(async () => { + // const before = null; + // salary.status = "DONE"; + // salary.lastUpdateUserId = request.user.sub; + // salary.lastUpdateFullName = request.user.name; + // salary.lastUpdatedAt = new Date(); + // await this.salaryProfileRepository.save(salary, { data: request }); + // setLogDataDiff(request, { before, after: salary }); + // }); + // } + // }), + // ); + // return new HttpSuccess(); + // } - /** - * API ออกคำสั่ง 35 - * - * @summary ออกคำสั่ง 35 - * - * @param {string} id Guid, *Id ผังเงินเดือน - */ - @Post("command/35/resume") - async SalaryReport35Resume( - @Body() - body: { - result: { - id: string; - refCommandNo: string; - templateDoc: string; - mpCee?: string | null; - refCommandCode?: string | null; - refCommandName?: string | null; - }[]; - }, - @Request() request: RequestWithUser, - ) { - await Promise.all( - body.result.map(async (v) => { - const salary = await this.salaryProfileRepository.findOne({ - where: { - id: v.id, - }, - }); - if (salary != null) { - await new CallAPI() - .PostData(request, "/org/profile/salary", { - profileId: salary.profileId, - date: new Date(), - amount: salary.positionSalaryAmount, - positionSalaryAmount: salary.amountSpecial, - mouthSalaryAmount: null, - posNo: salary.orgShortName + salary.posMasterNo, - position: salary.position, - positionLine: null, - positionPathSide: null, - positionExecutive: salary.posExecutive, - positionType: salary.posType, - positionLevel: salary.posLevel, - refCommandNo: v.refCommandNo, - templateDoc: v.templateDoc, - refCommandCode: v.refCommandCode, - refCommandName: v.refCommandName, - }) - .then(async () => { - const before = null; - salary.status = "DONE"; - salary.lastUpdateUserId = request.user.sub; - salary.lastUpdateFullName = request.user.name; - salary.lastUpdatedAt = new Date(); - await this.salaryProfileRepository.save(salary, { data: request }); - setLogDataDiff(request, { before, after: salary }); - }); - } - }), - ); - return new HttpSuccess(); - } + // /** + // * API ออกคำสั่ง 34 + // * + // * @summary ออกคำสั่ง 34 + // * + // * @param {string} id Guid, *Id ผังเงินเดือน + // */ + // @Post("command/34/resume") + // async SalaryReport34Resume( + // @Body() + // body: { + // result: { + // id: string; + // refCommandNo: string; + // templateDoc: string; + // mpCee?: string | null; + // refCommandCode?: string | null; + // refCommandName?: string | null; + // }[]; + // }, + // @Request() request: RequestWithUser, + // ) { + // await Promise.all( + // body.result.map(async (v) => { + // const salary = await this.salaryProfileRepository.findOne({ + // where: { + // id: v.id, + // }, + // }); + // if (salary != null) { + // await new CallAPI() + // .PostData(request, "/org/profile/salary", { + // profileId: salary.profileId, + // date: new Date(), + // amount: salary.positionSalaryAmount, + // positionSalaryAmount: salary.amountSpecial, + // mouthSalaryAmount: null, + // posNo: salary.orgShortName + salary.posMasterNo, + // position: salary.position, + // positionLine: null, + // positionPathSide: null, + // positionExecutive: salary.posExecutive, + // positionType: salary.posType, + // positionLevel: salary.posLevel, + // refCommandNo: v.refCommandNo, + // templateDoc: v.templateDoc, + // refCommandCode: v.refCommandCode, + // refCommandName: v.refCommandName, + // }) + // .then(async () => { + // const before = null; + // salary.status = "DONE"; + // salary.lastUpdateUserId = request.user.sub; + // salary.lastUpdateFullName = request.user.name; + // salary.lastUpdatedAt = new Date(); + // await this.salaryProfileRepository.save(salary, { data: request }); + // setLogDataDiff(request, { before, after: salary }); + // }); + // } + // }), + // ); + // return new HttpSuccess(); + // } - /** - * API ออกคำสั่ง 36 - * - * @summary ออกคำสั่ง 36 - * - * @param {string} id Guid, *Id ผังเงินเดือน - */ - @Post("command/36/resume") - async SalaryReport36Resume( - @Body() - body: { - result: { - id: string; - refCommandNo: string; - templateDoc: string; - mpCee?: string | null; - refCommandCode?: string | null; - refCommandName?: string | null; - }[]; - }, - @Request() request: RequestWithUser, - ) { - await Promise.all( - body.result.map(async (v) => { - const salary = await this.salaryProfileEmployeeRepository.findOne({ - where: { - id: v.id, - }, - }); - if (salary != null) { - await new CallAPI() - .PostData(request, "/org/profile-employee/salary", { - profileEmployeeId: salary.profileId, - date: new Date(), - amount: salary.positionSalaryAmount, - positionSalaryAmount: salary.amountSpecial, - mouthSalaryAmount: null, - posNo: salary.orgShortName + salary.posMasterNo, - position: salary.position, - // positionLine: null, - // positionPathSide: null, - // positionExecutive: null, - positionType: salary.posType, - positionLevel: salary.posLevel ? String(salary.posLevel) : null, - refCommandNo: v.refCommandNo, - templateDoc: v.templateDoc, - refCommandCode: v.refCommandCode, - refCommandName: v.refCommandName, - }) - .then(async () => { - const before = null; - salary.status = "DONE"; - salary.lastUpdateUserId = request.user.sub; - salary.lastUpdateFullName = request.user.name; - salary.lastUpdatedAt = new Date(); - await this.salaryProfileEmployeeRepository.save(salary, { data: request }); - setLogDataDiff(request, { before, after: salary }); - }); - } - }), - ); - return new HttpSuccess(); - } + // /** + // * API ออกคำสั่ง 35 + // * + // * @summary ออกคำสั่ง 35 + // * + // * @param {string} id Guid, *Id ผังเงินเดือน + // */ + // @Post("command/35/resume") + // async SalaryReport35Resume( + // @Body() + // body: { + // result: { + // id: string; + // refCommandNo: string; + // templateDoc: string; + // mpCee?: string | null; + // refCommandCode?: string | null; + // refCommandName?: string | null; + // }[]; + // }, + // @Request() request: RequestWithUser, + // ) { + // await Promise.all( + // body.result.map(async (v) => { + // const salary = await this.salaryProfileRepository.findOne({ + // where: { + // id: v.id, + // }, + // }); + // if (salary != null) { + // await new CallAPI() + // .PostData(request, "/org/profile/salary", { + // profileId: salary.profileId, + // date: new Date(), + // amount: salary.positionSalaryAmount, + // positionSalaryAmount: salary.amountSpecial, + // mouthSalaryAmount: null, + // posNo: salary.orgShortName + salary.posMasterNo, + // position: salary.position, + // positionLine: null, + // positionPathSide: null, + // positionExecutive: salary.posExecutive, + // positionType: salary.posType, + // positionLevel: salary.posLevel, + // refCommandNo: v.refCommandNo, + // templateDoc: v.templateDoc, + // refCommandCode: v.refCommandCode, + // refCommandName: v.refCommandName, + // }) + // .then(async () => { + // const before = null; + // salary.status = "DONE"; + // salary.lastUpdateUserId = request.user.sub; + // salary.lastUpdateFullName = request.user.name; + // salary.lastUpdatedAt = new Date(); + // await this.salaryProfileRepository.save(salary, { data: request }); + // setLogDataDiff(request, { before, after: salary }); + // }); + // } + // }), + // ); + // return new HttpSuccess(); + // } - /** - * API ออกคำสั่ง 37 - * - * @summary ออกคำสั่ง 37 - * - * @param {string} id Guid, *Id ผังเงินเดือน - */ - @Post("command/37/resume") - async SalaryReport37Resume( - @Body() - body: { - result: { - id: string; - refCommandNo: string; - templateDoc: string; - mpCee?: string | null; - refCommandCode?: string | null; - refCommandName?: string | null; - }[]; - }, - @Request() request: RequestWithUser, - ) { - await Promise.all( - body.result.map(async (v) => { - const salary = await this.salaryProfileEmployeeRepository.findOne({ - where: { - id: v.id, - }, - }); - if (salary != null) { - await new CallAPI() - .PostData(request, "/org/profile-employee/salary", { - profileEmployeeId: salary.profileId, - date: new Date(), - amount: salary.positionSalaryAmount, - positionSalaryAmount: salary.amountSpecial, - mouthSalaryAmount: null, - posNo: salary.orgShortName + salary.posMasterNo, - position: salary.position, - positionLine: null, - positionPathSide: null, - positionExecutive: null, - positionType: salary.posType, - positionLevel: salary.posLevel, - refCommandNo: v.refCommandNo, - templateDoc: v.templateDoc, - refCommandCode: v.refCommandCode, - refCommandName: v.refCommandName, - }) - .then(async () => { - const before = null; - salary.status = "DONE"; - salary.lastUpdateUserId = request.user.sub; - salary.lastUpdateFullName = request.user.name; - salary.lastUpdatedAt = new Date(); - await this.salaryProfileEmployeeRepository.save(salary, { data: request }); - setLogDataDiff(request, { before, after: salary }); - }); - } - }), - ); - return new HttpSuccess(); - } + // /** + // * API ออกคำสั่ง 36 + // * + // * @summary ออกคำสั่ง 36 + // * + // * @param {string} id Guid, *Id ผังเงินเดือน + // */ + // @Post("command/36/resume") + // async SalaryReport36Resume( + // @Body() + // body: { + // result: { + // id: string; + // refCommandNo: string; + // templateDoc: string; + // mpCee?: string | null; + // refCommandCode?: string | null; + // refCommandName?: string | null; + // }[]; + // }, + // @Request() request: RequestWithUser, + // ) { + // await Promise.all( + // body.result.map(async (v) => { + // const salary = await this.salaryProfileEmployeeRepository.findOne({ + // where: { + // id: v.id, + // }, + // }); + // if (salary != null) { + // await new CallAPI() + // .PostData(request, "/org/profile-employee/salary", { + // profileEmployeeId: salary.profileId, + // date: new Date(), + // amount: salary.positionSalaryAmount, + // positionSalaryAmount: salary.amountSpecial, + // mouthSalaryAmount: null, + // posNo: salary.orgShortName + salary.posMasterNo, + // position: salary.position, + // // positionLine: null, + // // positionPathSide: null, + // // positionExecutive: null, + // positionType: salary.posType, + // positionLevel: salary.posLevel ? String(salary.posLevel) : null, + // refCommandNo: v.refCommandNo, + // templateDoc: v.templateDoc, + // refCommandCode: v.refCommandCode, + // refCommandName: v.refCommandName, + // }) + // .then(async () => { + // const before = null; + // salary.status = "DONE"; + // salary.lastUpdateUserId = request.user.sub; + // salary.lastUpdateFullName = request.user.name; + // salary.lastUpdatedAt = new Date(); + // await this.salaryProfileEmployeeRepository.save(salary, { data: request }); + // setLogDataDiff(request, { before, after: salary }); + // }); + // } + // }), + // ); + // return new HttpSuccess(); + // } + + // /** + // * API ออกคำสั่ง 37 + // * + // * @summary ออกคำสั่ง 37 + // * + // * @param {string} id Guid, *Id ผังเงินเดือน + // */ + // @Post("command/37/resume") + // async SalaryReport37Resume( + // @Body() + // body: { + // result: { + // id: string; + // refCommandNo: string; + // templateDoc: string; + // mpCee?: string | null; + // refCommandCode?: string | null; + // refCommandName?: string | null; + // }[]; + // }, + // @Request() request: RequestWithUser, + // ) { + // await Promise.all( + // body.result.map(async (v) => { + // const salary = await this.salaryProfileEmployeeRepository.findOne({ + // where: { + // id: v.id, + // }, + // }); + // if (salary != null) { + // await new CallAPI() + // .PostData(request, "/org/profile-employee/salary", { + // profileEmployeeId: salary.profileId, + // date: new Date(), + // amount: salary.positionSalaryAmount, + // positionSalaryAmount: salary.amountSpecial, + // mouthSalaryAmount: null, + // posNo: salary.orgShortName + salary.posMasterNo, + // position: salary.position, + // positionLine: null, + // positionPathSide: null, + // positionExecutive: null, + // positionType: salary.posType, + // positionLevel: salary.posLevel, + // refCommandNo: v.refCommandNo, + // templateDoc: v.templateDoc, + // refCommandCode: v.refCommandCode, + // refCommandName: v.refCommandName, + // }) + // .then(async () => { + // const before = null; + // salary.status = "DONE"; + // salary.lastUpdateUserId = request.user.sub; + // salary.lastUpdateFullName = request.user.name; + // salary.lastUpdatedAt = new Date(); + // await this.salaryProfileEmployeeRepository.save(salary, { data: request }); + // setLogDataDiff(request, { before, after: salary }); + // }); + // } + // }), + // ); + // return new HttpSuccess(); + // } /** * API ออกคำสั่ง 33 @@ -7820,18 +7817,18 @@ export class ReportController extends Controller { body: { refIds: { refId: string; - commandAffectDate: Date | null; commandNo: string | null; - commandId?: string | null; - commandYear: number; - templateDoc: string | null; + commandYear: number | null; + commandId: string | null; + remark: string | null; amount: Double | null; - amountSpecial: 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; }[]; }, @Request() request: RequestWithUser, @@ -7848,23 +7845,29 @@ export class ReportController extends Controller { await new CallAPI() .PostData(request, "/org/profile/salary/update", { profileId: salary.profileId, - date: new Date(), + commandDateAffect: v.commandDateAffect, + commandDateSign: v.commandDateSign, amount: v.amount, amountSpecial: v.amountSpecial, - commandId: v.commandId, positionSalaryAmount: v.positionSalaryAmount, mouthSalaryAmount: v.mouthSalaryAmount, - posNo: salary.orgShortName + salary.posMasterNo, - position: salary.position, - positionLine: null, - positionPathSide: null, + posNo: salary.posMasterNo, + posNoAbb: salary.orgShortName, + positionName: salary.position, positionExecutive: salary.posExecutive, positionType: salary.posType, positionLevel: salary.posLevel, - refCommandNo: `${v.commandNo}/${Extension.ToThaiYear(v.commandYear)}`, - templateDoc: v.templateDoc, - refCommandCode: v.refCommandCode, - refCommandName: v.refCommandName, + commandId: v.commandId, + remark: v.remark, + orgRoot: salary.root, + orgChild1: salary.child1, + orgChild2: salary.child2, + orgChild3: salary.child3, + orgChild4: salary.child4, + commandCode: v.commandCode, + commandName: v.commandName, + commandNo: v.commandNo, + commandYear: v.commandYear, }) .then(async () => { const before = null; @@ -7894,18 +7897,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; + 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; }[]; }, @Request() request: RequestWithUser, @@ -7921,20 +7924,28 @@ export class ReportController extends Controller { await new CallAPI() .PostData(request, "/org/profile-employee/salary/update", { profileEmployeeId: salary.profileId, - date: new Date(), + commandDateAffect: v.commandDateAffect, + commandDateSign: v.commandDateSign, amount: v.amount, amountSpecial: v.amountSpecial, - commandId: v.commandId, positionSalaryAmount: v.positionSalaryAmount, mouthSalaryAmount: v.mouthSalaryAmount, - posNo: salary.orgShortName + salary.posMasterNo, - position: salary.position, + posNo: salary.posMasterNo, + posNoAbb: salary.orgShortName, + positionName: salary.position, positionType: salary.posType, - positionLevel: salary.posLevel ? String(salary.posLevel) : null, - refCommandNo: `${v.commandNo}/${Extension.ToThaiYear(v.commandYear)}`, - templateDoc: v.templateDoc, - refCommandCode: v.refCommandCode, - refCommandName: v.refCommandName, + positionLevel: salary.posLevel, + commandId: v.commandId, + remark: v.remark, + orgRoot: salary.root, + orgChild1: salary.child1, + orgChild2: salary.child2, + orgChild3: salary.child3, + orgChild4: salary.child4, + commandCode: v.commandCode, + commandName: v.commandName, + commandNo: v.commandNo, + commandYear: v.commandYear, }) .then(async () => { const before = null;