Merge branch 'develop' into develop-Bright

This commit is contained in:
Bright 2025-07-23 15:08:36 +07:00
commit 91c8e37647
3 changed files with 33 additions and 13 deletions

View file

@ -1925,9 +1925,9 @@ export class ImportDataController extends Controller {
// ? _null
// : Number(item.SAL_POS_AMOUNT_2);
// profileSalary.positionSalaryAmount = sal_pos_amount_1 ?? sal_pos_amount_2;
const special_amt: any =
item.SPECIAL_AMT == null || item.SPECIAL_AMT == "" ? _null : Number(item.SPECIAL_AMT);
profileSalary.amountSpecial = special_amt;
// const special_amt: any =
// item.SPECIAL_AMT == null || item.SPECIAL_AMT == "" ? _null : Number(item.SPECIAL_AMT);
// profileSalary.amountSpecial = special_amt;
profileSalary.posNumCodeSit = item.POS_NUM_CODE_SIT;
profileSalary.posNumCodeSitAbb = item.POS_NUM_CODE_SIT_ABB;

View file

@ -189,12 +189,12 @@ export class HR_POSITION_EMPLOYEETEMP {
// })
// SAL_POS_AMOUNT_2: string;
@Column({
nullable: true,
type: "text",
default: null,
})
SPECIAL_AMT: string;
// @Column({
// nullable: true,
// type: "text",
// default: null,
// })
// SPECIAL_AMT: string;
@Column({
nullable: true,

View file

@ -532,7 +532,17 @@ async function handler_org(msg: amqp.ConsumeMessage): Promise<boolean> {
? x.id
: x.ancestorDNA,
}));
await repoEmployeePosmaster.save(_orgemployeePosMaster);
// await repoEmployeePosmaster.save(_orgemployeePosMaster);
await repoEmployeePosmaster
.createQueryBuilder()
.insert()
.into(EmployeePosMaster)
.values(_orgemployeePosMaster)
.orUpdate({
conflict_target: ['id'],
overwrite: ['ancestorDNA'],
})
.execute();
// }
//หา dna posmaster ถ้าไม่มีให้เอาตัวเองเป็น dna
@ -555,9 +565,19 @@ async function handler_org(msg: amqp.ConsumeMessage): Promise<boolean> {
? x.id
: x.ancestorDNA,
}));
await repoEmployeeTempPosmaster.save(_orgemployeeTempPosMaster);
// await repoEmployeeTempPosmaster.save(_orgemployeeTempPosMaster);
await repoEmployeeTempPosmaster
.createQueryBuilder()
.insert()
.into(EmployeeTempPosMaster)
.values(_orgemployeeTempPosMaster)
.orUpdate({
conflict_target: ['id'],
overwrite: ['ancestorDNA'],
})
.execute();
// }
//create org
orgRoot.forEach(async (x: any) => {
var dataId = x.id;
@ -1364,7 +1384,7 @@ async function handler_org(msg: amqp.ConsumeMessage): Promise<boolean> {
});
});
// }
const employeePosMaster = await repoEmployeePosmaster.find({
where: { orgRevisionId: orgRevisionDraft.id },
relations: ["positions", "positions.posLevel", "positions.posType"],