fix SIT รายงานระบบบรรจุ แต่งตั้ง ย้าย โอน>>รายงานจำนวนลูกจ้างประจำ กทม. ที่ได้รับการจ้าง แต่งตั้งและย้าย (ข้อมูลไม่ถูกบันทึกลงรายงาน) #1085

This commit is contained in:
Bright 2025-02-04 17:18:22 +07:00
parent 181ec29d2a
commit dff7d7ef3a

View file

@ -4686,6 +4686,7 @@ export class CommandController extends Controller {
}[];
},
) {
let _reqBody: any[] = [];
const roleKeycloak = await this.roleKeycloakRepo.findOne({
where: { name: Like("USER") },
});
@ -4854,13 +4855,28 @@ export class CommandController extends Controller {
profile.dateAppoint = new Date();
profile.amount = item.amount == null ? _null : item.amount;
profile.amountSpecial = item.amountSpecial == null ? _null : item.amountSpecial;
_reqBody.push({
profileId: profile.id,
prefix: profile.prefix,
firstName: profile.firstName,
lastName: profile.lastName,
citizenId: profile.citizenId,
root: posMaster.orgRoot.orgRootName,
rootId: posMaster.orgRootId,
rootShortName: posMaster.orgRoot.orgRootShortName
});
await this.profileEmployeeRepository.save(profile);
await this.employeePositionRepository.save(positionNew);
}
}),
);
await new CallAPI()
.PostData(req,
"/placement/appointment/employee-appoint-21/report/excecute", { profileEmps: _reqBody }
)
.catch((error) => {
throw new Error("Failed. Cannot update status. ", error);
});
return new HttpSuccess();
}