no message

This commit is contained in:
Kittapath 2024-04-30 18:00:32 +07:00
parent 045ac98952
commit d483cfd4b4

View file

@ -2503,57 +2503,57 @@ export class PositionController extends Controller {
typeCondition = { typeCondition = {
orgRootId: body.nodeId, orgRootId: body.nodeId,
orgChild1Id: IsNull(), orgChild1Id: IsNull(),
current_holder: body.isBlank == true ? IsNull() : Not(IsNull()), current_holderId: body.isBlank == true ? IsNull() : Not(IsNull()),
}; };
} else if (body.node === 1) { } else if (body.node === 1) {
typeCondition = { typeCondition = {
orgChild1Id: body.nodeId, orgChild1Id: body.nodeId,
orgChild2Id: IsNull(), orgChild2Id: IsNull(),
current_holder: body.isBlank == true ? IsNull() : Not(IsNull()), current_holderId: body.isBlank == true ? IsNull() : Not(IsNull()),
}; };
} else if (body.node === 2) { } else if (body.node === 2) {
typeCondition = { typeCondition = {
orgChild2Id: body.nodeId, orgChild2Id: body.nodeId,
orgChild3Id: IsNull(), orgChild3Id: IsNull(),
current_holder: body.isBlank == true ? IsNull() : Not(IsNull()), current_holderId: body.isBlank == true ? IsNull() : Not(IsNull()),
}; };
} else if (body.node === 3) { } else if (body.node === 3) {
typeCondition = { typeCondition = {
orgChild3Id: body.nodeId, orgChild3Id: body.nodeId,
orgChild4Id: IsNull(), orgChild4Id: IsNull(),
current_holder: body.isBlank == true ? IsNull() : Not(IsNull()), current_holderId: body.isBlank == true ? IsNull() : Not(IsNull()),
}; };
} else if (body.node === 4) { } else if (body.node === 4) {
typeCondition = { typeCondition = {
orgChild4Id: body.nodeId, orgChild4Id: body.nodeId,
current_holder: body.isBlank == true ? IsNull() : Not(IsNull()), current_holderId: body.isBlank == true ? IsNull() : Not(IsNull()),
}; };
} }
} else { } else {
if (body.node === 0) { if (body.node === 0) {
typeCondition = { typeCondition = {
orgRootId: body.nodeId, orgRootId: body.nodeId,
current_holder: body.isBlank == true ? IsNull() : Not(IsNull()), current_holderId: body.isBlank == true ? IsNull() : Not(IsNull()),
}; };
} else if (body.node === 1) { } else if (body.node === 1) {
typeCondition = { typeCondition = {
orgChild1Id: body.nodeId, orgChild1Id: body.nodeId,
current_holder: body.isBlank == true ? IsNull() : Not(IsNull()), current_holderId: body.isBlank == true ? IsNull() : Not(IsNull()),
}; };
} else if (body.node === 2) { } else if (body.node === 2) {
typeCondition = { typeCondition = {
orgChild2Id: body.nodeId, orgChild2Id: body.nodeId,
current_holder: body.isBlank == true ? IsNull() : Not(IsNull()), current_holderId: body.isBlank == true ? IsNull() : Not(IsNull()),
}; };
} else if (body.node === 3) { } else if (body.node === 3) {
typeCondition = { typeCondition = {
orgChild3Id: body.nodeId, orgChild3Id: body.nodeId,
current_holder: body.isBlank == true ? IsNull() : Not(IsNull()), current_holderId: body.isBlank == true ? IsNull() : Not(IsNull()),
}; };
} else if (body.node === 4) { } else if (body.node === 4) {
typeCondition = { typeCondition = {
orgChild4Id: body.nodeId, orgChild4Id: body.nodeId,
current_holder: body.isBlank == true ? IsNull() : Not(IsNull()), current_holderId: body.isBlank == true ? IsNull() : Not(IsNull()),
}; };
} }
} }
@ -2629,8 +2629,29 @@ export class PositionController extends Controller {
shortName = posMaster.orgChild4.orgChild4ShortName; shortName = posMaster.orgChild4.orgChild4ShortName;
} }
let node: any = null;
let nodeId: any = null;
if (posMaster.orgChild4Id != null) {
node = 4;
nodeId = posMaster.orgChild4Id;
} else if (posMaster.orgChild3Id != null) {
node = 3;
nodeId = posMaster.orgChild3Id;
} else if (posMaster.orgChild2Id != null) {
node = 2;
nodeId = posMaster.orgChild2Id;
} else if (posMaster.orgChild1Id != null) {
node = 1;
nodeId = posMaster.orgChild1Id;
} else if (posMaster.orgRootId != null) {
node = 0;
nodeId = posMaster.orgRootId;
}
return { return {
id: posMaster.id, id: posMaster.id,
node: node,
nodeId: nodeId,
orgRootId: posMaster.orgRootId, orgRootId: posMaster.orgRootId,
orgChild1Id: posMaster.orgChild1Id, orgChild1Id: posMaster.orgChild1Id,
orgChild2Id: posMaster.orgChild2Id, orgChild2Id: posMaster.orgChild2Id,