This commit is contained in:
parent
96a2d34c1f
commit
709a4e1ac6
1 changed files with 5 additions and 5 deletions
|
|
@ -598,8 +598,8 @@ async function handler_org(msg: amqp.ConsumeMessage): Promise<boolean> {
|
||||||
|
|
||||||
const posMasterActMap = new Map<ActKey, PosMasterAct[]>();
|
const posMasterActMap = new Map<ActKey, PosMasterAct[]>();
|
||||||
for (const act of oldposMasterAct) {
|
for (const act of oldposMasterAct) {
|
||||||
const parentDNA = act.posMaster.ancestorDNA.trim();
|
const parentDNA = act.posMaster?.ancestorDNA?.trim() ?? '';
|
||||||
const childDNA = act.posMasterChild.ancestorDNA.trim();
|
const childDNA = act.posMasterChild?.ancestorDNA?.trim() ?? '';
|
||||||
const key = `${parentDNA}|${childDNA}`;
|
const key = `${parentDNA}|${childDNA}`;
|
||||||
|
|
||||||
if (!posMasterActMap.has(key)) {
|
if (!posMasterActMap.has(key)) {
|
||||||
|
|
@ -610,7 +610,7 @@ async function handler_org(msg: amqp.ConsumeMessage): Promise<boolean> {
|
||||||
|
|
||||||
const posMasterIdMap = new Map<string, string>();
|
const posMasterIdMap = new Map<string, string>();
|
||||||
for (const pm of posMaster) {
|
for (const pm of posMaster) {
|
||||||
posMasterIdMap.set(pm.ancestorDNA.trim(), pm.id);
|
posMasterIdMap.set(pm.ancestorDNA?.trim() ?? '', pm.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
const _null: any = null;
|
const _null: any = null;
|
||||||
|
|
@ -666,8 +666,8 @@ async function handler_org(msg: amqp.ConsumeMessage): Promise<boolean> {
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const act of oldposMasterAct) {
|
for (const act of oldposMasterAct) {
|
||||||
const parentDNA = act.posMaster.ancestorDNA.trim().toLowerCase();
|
const parentDNA = act.posMaster?.ancestorDNA?.trim()?.toLowerCase() ?? '';
|
||||||
const childDNA = act.posMasterChild.ancestorDNA.trim().toLowerCase();
|
const childDNA = act.posMasterChild?.ancestorDNA?.trim()?.toLowerCase() ?? '';
|
||||||
|
|
||||||
const newParentId = posMasterIdMap.get(parentDNA);
|
const newParentId = posMasterIdMap.get(parentDNA);
|
||||||
const newChildId = posMasterIdMap.get(childDNA);
|
const newChildId = posMasterIdMap.get(childDNA);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue