kk1 employee

This commit is contained in:
mamoss 2025-05-01 13:35:54 +07:00
parent 6efa73eeeb
commit e81ed7f778
2 changed files with 35 additions and 31 deletions

View file

@ -3410,7 +3410,9 @@ export class ImportDataController extends Controller {
@Post("update-profileSalary")
async UpdateProfileSalary(@Request() request: { user: Record<string, any> }) {
let rowCount = 0;
const profileSalarys: any = await this.salaryRepo.find({ where: { refId: Not(IsNull()) } });
const profileSalarys: any = await this.salaryRepo.find({
where: { refId: Not(IsNull()), profileEmployeeId: IsNull(), posNumCodeSit: IsNull() },
});
for await (const _item of profileSalarys) {
const OFFICER = await this.HR_POSITION_OFFICERRepo.findOne({
@ -3434,7 +3436,9 @@ export class ImportDataController extends Controller {
@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()) } });
const profileSalarys: any = await this.salaryRepo.find({
where: { refId: Not(IsNull()), profileId: IsNull(), posNumCodeSit: IsNull() },
});
for await (const _item of profileSalarys) {
const EMPLOYEE = await this.HR_POSITION_EMPLOYEERepo.findOne({