pos num sit

This commit is contained in:
mamoss 2025-05-01 13:18:57 +07:00
parent 3230ace376
commit 696873974c

View file

@ -3428,6 +3428,30 @@ export class ImportDataController extends Controller {
return new HttpSuccess();
}
/**
* @summary
*/
@Post("update-profileSalaryEmp")
async UpdateProfileSalaryEmp(@Request() request: { user: Record<string, any> }) {
let rowCount = 0;
const profileSalarys: any = await this.salaryRepo.find({ where: { refId: Not(IsNull()) } });
for await (const _item of profileSalarys) {
const EMPLOYEE = await this.HR_POSITION_EMPLOYEERepo.findOne({
select: ["id", "POS_NUM_CODE_SIT", "POS_NUM_CODE_SIT_ABB"],
where: { id: _item.refId },
});
if (EMPLOYEE) {
rowCount++;
_item.posNumCodeSit = EMPLOYEE.POS_NUM_CODE_SIT;
_item.posNumCodeSitAbb = EMPLOYEE.POS_NUM_CODE_SIT_ABB;
await this.salaryRepo.save(_item);
console.log(rowCount);
}
}
return new HttpSuccess();
}
OrgRank(value: string) {
switch (value.trim().toUpperCase()) {
case "DEPARTMENT":