api ผังโครงสร้ารายบุคคล
This commit is contained in:
parent
59359d2915
commit
1768d4cbbb
1 changed files with 45 additions and 32 deletions
|
|
@ -1822,11 +1822,9 @@ export class OrganizationController extends Controller {
|
|||
personID: x0.current_holder.id,
|
||||
name: x0.current_holder.firstName,
|
||||
avatar: x0.current_holder.avatar,
|
||||
positionName: /*this.positionRepository.findOne({
|
||||
where: { id: x1.id },select:["positionName"]
|
||||
})*/"",
|
||||
positionNum: "",
|
||||
positionNumInt: null,
|
||||
positionName: x0.current_holder.position,
|
||||
positionNum: x0.orgRoot.orgRootShortName+x0.posMasterNo,
|
||||
positionNumInt: x0.posMasterNo,
|
||||
departmentName: x0.orgRoot.orgRootName,
|
||||
organizationId: x0.orgRoot.id,
|
||||
children: posMasterChild1
|
||||
|
|
@ -1835,9 +1833,9 @@ export class OrganizationController extends Controller {
|
|||
personID: x1.current_holder.id,
|
||||
name: x1.current_holder.firstName,
|
||||
avatar: x1.current_holder.avatar,
|
||||
positionName: "",
|
||||
positionNum: "",
|
||||
positionNumInt: null,
|
||||
positionName: x1.current_holder.position,
|
||||
positionNum: x1.orgChild1.orgChild1ShortName+x1.posMasterNo,
|
||||
positionNumInt: x1.posMasterNo,
|
||||
departmentName: x1.orgChild1.orgChild1Name,
|
||||
organizationId: x1.orgChild1.id,
|
||||
children: posMasterChild2
|
||||
|
|
@ -1846,9 +1844,9 @@ export class OrganizationController extends Controller {
|
|||
personID: x2.current_holder.id,
|
||||
name: x2.current_holder.firstName,
|
||||
avatar: x2.current_holder.avatar,
|
||||
positionName: "",
|
||||
positionNum: "",
|
||||
positionNumInt: null,
|
||||
positionName: x2.current_holder.position,
|
||||
positionNum: x2.orgChild2.orgChild2ShortName+x2.posMasterNo,
|
||||
positionNumInt: x2.posMasterNo,
|
||||
departmentName: x2.orgChild2.orgChild2Name,
|
||||
organizationId: x2.orgChild2.id,
|
||||
children: posMasterChild3
|
||||
|
|
@ -1857,9 +1855,9 @@ export class OrganizationController extends Controller {
|
|||
personID: x3.current_holder.id,
|
||||
name: x3.current_holder.firstName,
|
||||
avatar: x3.current_holder.avatar,
|
||||
positionName: "",
|
||||
positionNum: "",
|
||||
positionNumInt: null,
|
||||
positionName: x3.current_holder.position,
|
||||
positionNum: x3.orgChild3.orgChild3ShortName+x3.posMasterNo,
|
||||
positionNumInt: x3.posMasterNo,
|
||||
departmentName: x3.orgChild3.orgChild3Name,
|
||||
organizationId: x3.orgChild3.id,
|
||||
children: posMasterChild4
|
||||
|
|
@ -1868,9 +1866,9 @@ export class OrganizationController extends Controller {
|
|||
personID: x4.current_holder.id,
|
||||
name: x4.current_holder.firstName,
|
||||
avatar: x4.current_holder.avatar,
|
||||
positionName: "",
|
||||
positionNum: "",
|
||||
positionNumInt: null,
|
||||
positionName: x4.current_holder.position,
|
||||
positionNum: x4.orgChild4.orgChild4ShortName+x4.posMasterNo,
|
||||
positionNumInt: x4.posMasterNo,
|
||||
departmentName: x4.orgChild4.orgChild4Name,
|
||||
organizationId: x4.orgChild4.id,
|
||||
}))
|
||||
|
|
@ -1944,9 +1942,9 @@ export class OrganizationController extends Controller {
|
|||
personID: x0.next_holder.id,
|
||||
name: x0.next_holder.firstName,
|
||||
avatar: x0.next_holder.avatar,
|
||||
positionName: "",
|
||||
positionNum: "",
|
||||
positionNumInt: null,
|
||||
positionName: x0.next_holder.position,
|
||||
positionNum: x0.orgRoot.orgRootShortName+x0.posMasterNo,
|
||||
positionNumInt: x0.posMasterNo,
|
||||
departmentName: x0.orgRoot.orgRootName,
|
||||
organizationId: x0.orgRoot.id,
|
||||
children: posMasterChild1
|
||||
|
|
@ -1955,9 +1953,9 @@ export class OrganizationController extends Controller {
|
|||
personID: x1.next_holder.id,
|
||||
name: x1.next_holder.firstName,
|
||||
avatar: x1.next_holder.avatar,
|
||||
positionName: "",
|
||||
positionNum: "",
|
||||
positionNumInt: null,
|
||||
positionName: x1.next_holder.position,
|
||||
positionNum: x1.orgChild1.orgChild1ShortName+x1.posMasterNo,
|
||||
positionNumInt: x1.posMasterNo,
|
||||
departmentName: x1.orgChild1.orgChild1Name,
|
||||
organizationId: x1.orgChild1.id,
|
||||
children: posMasterChild2
|
||||
|
|
@ -1966,9 +1964,9 @@ export class OrganizationController extends Controller {
|
|||
personID: x2.next_holder.id,
|
||||
name: x2.next_holder.firstName,
|
||||
avatar: x2.next_holder.avatar,
|
||||
positionName: "",
|
||||
positionNum: "",
|
||||
positionNumInt: null,
|
||||
positionName: x2.next_holder.position,
|
||||
positionNum: x2.orgChild2.orgChild2ShortName+x2.posMasterNo,
|
||||
positionNumInt: x2.posMasterNo,
|
||||
departmentName: x2.orgChild2.orgChild2Name,
|
||||
organizationId: x2.orgChild2.id,
|
||||
children: posMasterChild3
|
||||
|
|
@ -1977,9 +1975,9 @@ export class OrganizationController extends Controller {
|
|||
personID: x3.next_holder.id,
|
||||
name: x3.next_holder.firstName,
|
||||
avatar: x3.next_holder.avatar,
|
||||
positionName: "",
|
||||
positionNum: "",
|
||||
positionNumInt: null,
|
||||
positionName: x3.next_holder.position,
|
||||
positionNum: x3.orgChild3.orgChild3ShortName+x3.posMasterNo,
|
||||
positionNumInt: x3.posMasterNo,
|
||||
departmentName: x3.orgChild3.orgChild3Name,
|
||||
organizationId: x3.orgChild3.id,
|
||||
children: posMasterChild4
|
||||
|
|
@ -1988,9 +1986,9 @@ export class OrganizationController extends Controller {
|
|||
personID: x4.next_holder.id,
|
||||
name: x4.next_holder.firstName,
|
||||
avatar: x4.next_holder.avatar,
|
||||
positionName: "",
|
||||
positionNum: "",
|
||||
positionNumInt: null,
|
||||
positionName: x4.next_holder.position,
|
||||
positionNum: x4.orgChild4.orgChild4ShortName+x4.posMasterNo,
|
||||
positionNumInt: x4.posMasterNo,
|
||||
departmentName: x4.orgChild4.orgChild4Name,
|
||||
organizationId: x4.orgChild4.id,
|
||||
}))
|
||||
|
|
@ -2012,6 +2010,21 @@ export class OrganizationController extends Controller {
|
|||
};
|
||||
return new HttpSuccess([formattedData_]);
|
||||
}
|
||||
else {
|
||||
return new HttpSuccess([
|
||||
{
|
||||
personID: "",
|
||||
name: "",
|
||||
avatar: "",
|
||||
positionName: "",
|
||||
positionNum: "",
|
||||
positionNumInt: null,
|
||||
departmentName: data.orgRevisionName,
|
||||
organizationId: data.id,
|
||||
children: []
|
||||
}
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue