เพิ่้มฟิลด์สังกัด
This commit is contained in:
parent
f79104be14
commit
dfcc136c79
1 changed files with 30 additions and 2 deletions
|
|
@ -2920,7 +2920,20 @@ export class OrganizationDotnetController extends Controller {
|
||||||
?.orgRoot != null
|
?.orgRoot != null
|
||||||
? `${item.current_holders.find((x) => x.orgRevisionId == findRevision?.id)?.orgRoot.orgRootShortName}${item.current_holders.find((x) => x.orgRevisionId == findRevision?.id)?.posMasterNo}`
|
? `${item.current_holders.find((x) => x.orgRevisionId == findRevision?.id)?.orgRoot.orgRootShortName}${item.current_holders.find((x) => x.orgRevisionId == findRevision?.id)?.posMasterNo}`
|
||||||
: null;
|
: null;
|
||||||
|
const Oc =
|
||||||
|
item.current_holders.length == 0
|
||||||
|
? null
|
||||||
|
: body.node == 4 && item.current_holders[0].orgChild4 != null
|
||||||
|
? `${item.current_holders[0].orgChild4.orgChild4Name}/${item.current_holders[0].orgChild3.orgChild3Name}/${item.current_holders[0].orgChild2.orgChild2Name}/${item.current_holders[0].orgChild1.orgChild1Name}/${item.current_holders[0].orgRoot.orgRootName}`
|
||||||
|
: body.node == 3 && item.current_holders[0].orgChild3 != null
|
||||||
|
? `${item.current_holders[0].orgChild3.orgChild3Name}/${item.current_holders[0].orgChild2.orgChild2Name}/${item.current_holders[0].orgChild1.orgChild1Name}/${item.current_holders[0].orgRoot.orgRootName}`
|
||||||
|
: body.node == 2 && item.current_holders[0].orgChild2 != null
|
||||||
|
? `${item.current_holders[0].orgChild2.orgChild2Name}/${item.current_holders[0].orgChild1.orgChild1Name}/${item.current_holders[0].orgRoot.orgRootName}`
|
||||||
|
: body.node == 1 && item.current_holders[0].orgChild1 != null
|
||||||
|
? `${item.current_holders[0].orgChild1.orgChild1Name}/${item.current_holders[0].orgRoot.orgRootName}`
|
||||||
|
: body.node == 0 && item.current_holders[0].orgRoot != null
|
||||||
|
? `${item.current_holders[0].orgRoot.orgRootName}`
|
||||||
|
: null;
|
||||||
return {
|
return {
|
||||||
id: item.id,
|
id: item.id,
|
||||||
prefix: item.prefix,
|
prefix: item.prefix,
|
||||||
|
|
@ -2931,6 +2944,7 @@ export class OrganizationDotnetController extends Controller {
|
||||||
position: item.position,
|
position: item.position,
|
||||||
positionLevel: item.posLevel?.posLevelName ?? null,
|
positionLevel: item.posLevel?.posLevelName ?? null,
|
||||||
positionType: item.posType?.posTypeName ?? null,
|
positionType: item.posType?.posTypeName ?? null,
|
||||||
|
oc: Oc
|
||||||
};
|
};
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
@ -3049,7 +3063,20 @@ export class OrganizationDotnetController extends Controller {
|
||||||
?.orgRoot != null
|
?.orgRoot != null
|
||||||
? `${item.current_holders.find((x) => x.orgRevisionId == findRevision?.id)?.orgRoot.orgRootShortName}${item.current_holders.find((x) => x.orgRevisionId == findRevision?.id)?.posMasterNo}`
|
? `${item.current_holders.find((x) => x.orgRevisionId == findRevision?.id)?.orgRoot.orgRootShortName}${item.current_holders.find((x) => x.orgRevisionId == findRevision?.id)?.posMasterNo}`
|
||||||
: null;
|
: null;
|
||||||
|
const Oc =
|
||||||
|
item.current_holders.length == 0
|
||||||
|
? null
|
||||||
|
: body.node == 4 && item.current_holders[0].orgChild4 != null
|
||||||
|
? `${item.current_holders[0].orgChild4.orgChild4Name}/${item.current_holders[0].orgChild3.orgChild3Name}/${item.current_holders[0].orgChild2.orgChild2Name}/${item.current_holders[0].orgChild1.orgChild1Name}/${item.current_holders[0].orgRoot.orgRootName}`
|
||||||
|
: body.node == 3 && item.current_holders[0].orgChild3 != null
|
||||||
|
? `${item.current_holders[0].orgChild3.orgChild3Name}/${item.current_holders[0].orgChild2.orgChild2Name}/${item.current_holders[0].orgChild1.orgChild1Name}/${item.current_holders[0].orgRoot.orgRootName}`
|
||||||
|
: body.node == 2 && item.current_holders[0].orgChild2 != null
|
||||||
|
? `${item.current_holders[0].orgChild2.orgChild2Name}/${item.current_holders[0].orgChild1.orgChild1Name}/${item.current_holders[0].orgRoot.orgRootName}`
|
||||||
|
: body.node == 1 && item.current_holders[0].orgChild1 != null
|
||||||
|
? `${item.current_holders[0].orgChild1.orgChild1Name}/${item.current_holders[0].orgRoot.orgRootName}`
|
||||||
|
: body.node == 0 && item.current_holders[0].orgRoot != null
|
||||||
|
? `${item.current_holders[0].orgRoot.orgRootName}`
|
||||||
|
: null;
|
||||||
return {
|
return {
|
||||||
id: item.id,
|
id: item.id,
|
||||||
prefix: item.prefix,
|
prefix: item.prefix,
|
||||||
|
|
@ -3061,6 +3088,7 @@ export class OrganizationDotnetController extends Controller {
|
||||||
position: item.position,
|
position: item.position,
|
||||||
positionLevel: item.posLevel?.posLevelName ?? null,
|
positionLevel: item.posLevel?.posLevelName ?? null,
|
||||||
positionType: item.posType?.posTypeName ?? null,
|
positionType: item.posType?.posTypeName ?? null,
|
||||||
|
oc: Oc
|
||||||
};
|
};
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue