test(3) #2160
This commit is contained in:
parent
65789c6ac6
commit
804ee8a639
1 changed files with 25 additions and 25 deletions
|
|
@ -578,30 +578,30 @@ async function handler_org(msg: amqp.ConsumeMessage): Promise<boolean> {
|
||||||
}
|
}
|
||||||
assignMap.get(dna)!.push(posmasterAssign);
|
assignMap.get(dna)!.push(posmasterAssign);
|
||||||
}
|
}
|
||||||
// ดึง permissionProfiles ของ revision เดิม
|
// // ดึง permissionProfiles ของ revision เดิม
|
||||||
const oldPermissionProfiles = await permissionProfilesRepository.find({
|
// const oldPermissionProfiles = await permissionProfilesRepository.find({
|
||||||
relations: ["orgRootTree"],
|
// relations: ["orgRootTree"],
|
||||||
where: {
|
// where: {
|
||||||
orgRootTree: {
|
// orgRootTree: {
|
||||||
orgRevisionId: orgRevisionPublish?.id,
|
// orgRevisionId: orgRevisionPublish?.id,
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
// สร้าง Map: ancestorDNA → permissionProfiles[]
|
// // สร้าง Map: ancestorDNA → permissionProfiles[]
|
||||||
const permissionMap = new Map<string, PermissionProfile[]>();
|
// const permissionMap = new Map<string, PermissionProfile[]>();
|
||||||
for (const permissionProfile of oldPermissionProfiles) {
|
// for (const permissionProfile of oldPermissionProfiles) {
|
||||||
const dna = permissionProfile.orgRootTree.ancestorDNA;
|
// const dna = permissionProfile.orgRootTree.ancestorDNA;
|
||||||
if (!permissionMap.has(dna)) {
|
// if (!permissionMap.has(dna)) {
|
||||||
permissionMap.set(dna, []);
|
// permissionMap.set(dna, []);
|
||||||
}
|
// }
|
||||||
permissionMap.get(dna)!.push(permissionProfile);
|
// permissionMap.get(dna)!.push(permissionProfile);
|
||||||
}
|
// }
|
||||||
const newRoots = await orgRootRepository.find({
|
// const newRoots = await orgRootRepository.find({
|
||||||
where: { orgRevisionId: orgRevisionDraft?.id },
|
// where: { orgRevisionId: orgRevisionDraft?.id },
|
||||||
});
|
// });
|
||||||
const newRootMap = new Map(
|
// const newRootMap = new Map(
|
||||||
newRoots.map(r => [r.ancestorDNA, r.id])
|
// newRoots.map(r => [r.ancestorDNA, r.id])
|
||||||
);
|
// );
|
||||||
const _null: any = null;
|
const _null: any = null;
|
||||||
for (const item of posMaster) {
|
for (const item of posMaster) {
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue