no message
This commit is contained in:
parent
d38b7e6d90
commit
0d3e502513
1 changed files with 61 additions and 35 deletions
|
|
@ -595,10 +595,10 @@ export class OrganizationController extends Controller {
|
||||||
child2: null,
|
child2: null,
|
||||||
child3: null,
|
child3: null,
|
||||||
child4: null,
|
child4: null,
|
||||||
}
|
};
|
||||||
|
|
||||||
if (!request.user.role.includes('SUPER_ADMIN')) {
|
if (!request.user.role.includes("SUPER_ADMIN")) {
|
||||||
_data = await new permission().PermissionOrgList(request, "SYS_ORG");
|
_data = await new permission().PermissionOrgList(request, "SYS_ORG");
|
||||||
}
|
}
|
||||||
const orgRevision = await this.orgRevisionRepository.findOne({ where: { id } });
|
const orgRevision = await this.orgRevisionRepository.findOne({ where: { id } });
|
||||||
if (!orgRevision) {
|
if (!orgRevision) {
|
||||||
|
|
@ -1870,9 +1870,12 @@ export class OrganizationController extends Controller {
|
||||||
.map((x0: PosMaster) => ({
|
.map((x0: PosMaster) => ({
|
||||||
personID: x0.current_holder.id,
|
personID: x0.current_holder.id,
|
||||||
name: x0.current_holder.firstName,
|
name: x0.current_holder.firstName,
|
||||||
avatar: x0.current_holder && x0.current_holder.avatar != null && x0.current_holder.avatarName != null
|
avatar:
|
||||||
? `${x0.current_holder.avatar}/${x0.current_holder.avatarName}`
|
x0.current_holder &&
|
||||||
: null,
|
x0.current_holder.avatar != null &&
|
||||||
|
x0.current_holder.avatarName != null
|
||||||
|
? `${x0.current_holder.avatar}/${x0.current_holder.avatarName}`
|
||||||
|
: null,
|
||||||
positionName: x0.current_holder.position,
|
positionName: x0.current_holder.position,
|
||||||
positionNum: x0.orgRoot.orgRootShortName + x0.posMasterNo,
|
positionNum: x0.orgRoot.orgRootShortName + x0.posMasterNo,
|
||||||
positionNumInt: x0.posMasterNo,
|
positionNumInt: x0.posMasterNo,
|
||||||
|
|
@ -1883,9 +1886,12 @@ export class OrganizationController extends Controller {
|
||||||
.map((x1: PosMaster) => ({
|
.map((x1: PosMaster) => ({
|
||||||
personID: x1.current_holder.id,
|
personID: x1.current_holder.id,
|
||||||
name: x1.current_holder.firstName,
|
name: x1.current_holder.firstName,
|
||||||
avatar: x1.current_holder && x1.current_holder.avatar != null && x1.current_holder.avatarName != null
|
avatar:
|
||||||
? `${x1.current_holder.avatar}/${x1.current_holder.avatarName}`
|
x1.current_holder &&
|
||||||
: null,
|
x1.current_holder.avatar != null &&
|
||||||
|
x1.current_holder.avatarName != null
|
||||||
|
? `${x1.current_holder.avatar}/${x1.current_holder.avatarName}`
|
||||||
|
: null,
|
||||||
positionName: x1.current_holder.position,
|
positionName: x1.current_holder.position,
|
||||||
positionNum: x1.orgChild1.orgChild1ShortName + x1.posMasterNo,
|
positionNum: x1.orgChild1.orgChild1ShortName + x1.posMasterNo,
|
||||||
positionNumInt: x1.posMasterNo,
|
positionNumInt: x1.posMasterNo,
|
||||||
|
|
@ -1896,9 +1902,12 @@ export class OrganizationController extends Controller {
|
||||||
.map((x2: PosMaster) => ({
|
.map((x2: PosMaster) => ({
|
||||||
personID: x2.current_holder.id,
|
personID: x2.current_holder.id,
|
||||||
name: x2.current_holder.firstName,
|
name: x2.current_holder.firstName,
|
||||||
avatar: x2.current_holder && x2.current_holder.avatar != null && x2.current_holder.avatarName != null
|
avatar:
|
||||||
? `${x2.current_holder.avatar}/${x2.current_holder.avatarName}`
|
x2.current_holder &&
|
||||||
: null,
|
x2.current_holder.avatar != null &&
|
||||||
|
x2.current_holder.avatarName != null
|
||||||
|
? `${x2.current_holder.avatar}/${x2.current_holder.avatarName}`
|
||||||
|
: null,
|
||||||
positionName: x2.current_holder.position,
|
positionName: x2.current_holder.position,
|
||||||
positionNum: x2.orgChild2.orgChild2ShortName + x2.posMasterNo,
|
positionNum: x2.orgChild2.orgChild2ShortName + x2.posMasterNo,
|
||||||
positionNumInt: x2.posMasterNo,
|
positionNumInt: x2.posMasterNo,
|
||||||
|
|
@ -1909,9 +1918,12 @@ export class OrganizationController extends Controller {
|
||||||
.map((x3: PosMaster) => ({
|
.map((x3: PosMaster) => ({
|
||||||
personID: x3.current_holder.id,
|
personID: x3.current_holder.id,
|
||||||
name: x3.current_holder.firstName,
|
name: x3.current_holder.firstName,
|
||||||
avatar: x3.current_holder && x3.current_holder.avatar != null && x3.current_holder.avatarName != null
|
avatar:
|
||||||
? `${x3.current_holder.avatar}/${x3.current_holder.avatarName}`
|
x3.current_holder &&
|
||||||
: null,
|
x3.current_holder.avatar != null &&
|
||||||
|
x3.current_holder.avatarName != null
|
||||||
|
? `${x3.current_holder.avatar}/${x3.current_holder.avatarName}`
|
||||||
|
: null,
|
||||||
positionName: x3.current_holder.position,
|
positionName: x3.current_holder.position,
|
||||||
positionNum: x3.orgChild3.orgChild3ShortName + x3.posMasterNo,
|
positionNum: x3.orgChild3.orgChild3ShortName + x3.posMasterNo,
|
||||||
positionNumInt: x3.posMasterNo,
|
positionNumInt: x3.posMasterNo,
|
||||||
|
|
@ -1924,9 +1936,12 @@ export class OrganizationController extends Controller {
|
||||||
.map((x4: PosMaster) => ({
|
.map((x4: PosMaster) => ({
|
||||||
personID: x4.current_holder.id,
|
personID: x4.current_holder.id,
|
||||||
name: x4.current_holder.firstName,
|
name: x4.current_holder.firstName,
|
||||||
avatar: x4.current_holder && x4.current_holder.avatar != null && x4.current_holder.avatarName != null
|
avatar:
|
||||||
? `${x4.current_holder.avatar}/${x4.current_holder.avatarName}`
|
x4.current_holder &&
|
||||||
: null,
|
x4.current_holder.avatar != null &&
|
||||||
|
x4.current_holder.avatarName != null
|
||||||
|
? `${x4.current_holder.avatar}/${x4.current_holder.avatarName}`
|
||||||
|
: null,
|
||||||
positionName: x4.current_holder.position,
|
positionName: x4.current_holder.position,
|
||||||
positionNum: x4.orgChild4.orgChild4ShortName + x4.posMasterNo,
|
positionNum: x4.orgChild4.orgChild4ShortName + x4.posMasterNo,
|
||||||
positionNumInt: x4.posMasterNo,
|
positionNumInt: x4.posMasterNo,
|
||||||
|
|
@ -2000,9 +2015,10 @@ export class OrganizationController extends Controller {
|
||||||
.map((x0: PosMaster) => ({
|
.map((x0: PosMaster) => ({
|
||||||
personID: x0.next_holder.id,
|
personID: x0.next_holder.id,
|
||||||
name: x0.next_holder.firstName,
|
name: x0.next_holder.firstName,
|
||||||
avatar: x0.next_holder && x0.next_holder.avatar != null && x0.next_holder.avatarName != null
|
avatar:
|
||||||
? `${x0.next_holder.avatar}/${x0.next_holder.avatarName}`
|
x0.next_holder && x0.next_holder.avatar != null && x0.next_holder.avatarName != null
|
||||||
: null,
|
? `${x0.next_holder.avatar}/${x0.next_holder.avatarName}`
|
||||||
|
: null,
|
||||||
positionName: x0.next_holder.position,
|
positionName: x0.next_holder.position,
|
||||||
positionNum: x0.orgRoot.orgRootShortName + x0.posMasterNo,
|
positionNum: x0.orgRoot.orgRootShortName + x0.posMasterNo,
|
||||||
positionNumInt: x0.posMasterNo,
|
positionNumInt: x0.posMasterNo,
|
||||||
|
|
@ -2013,9 +2029,10 @@ export class OrganizationController extends Controller {
|
||||||
.map((x1: PosMaster) => ({
|
.map((x1: PosMaster) => ({
|
||||||
personID: x1.next_holder.id,
|
personID: x1.next_holder.id,
|
||||||
name: x1.next_holder.firstName,
|
name: x1.next_holder.firstName,
|
||||||
avatar: x1.next_holder && x1.next_holder.avatar != null && x1.next_holder.avatarName != null
|
avatar:
|
||||||
? `${x1.next_holder.avatar}/${x1.next_holder.avatarName}`
|
x1.next_holder && x1.next_holder.avatar != null && x1.next_holder.avatarName != null
|
||||||
: null,
|
? `${x1.next_holder.avatar}/${x1.next_holder.avatarName}`
|
||||||
|
: null,
|
||||||
positionName: x1.next_holder.position,
|
positionName: x1.next_holder.position,
|
||||||
positionNum: x1.orgChild1.orgChild1ShortName + x1.posMasterNo,
|
positionNum: x1.orgChild1.orgChild1ShortName + x1.posMasterNo,
|
||||||
positionNumInt: x1.posMasterNo,
|
positionNumInt: x1.posMasterNo,
|
||||||
|
|
@ -2026,9 +2043,12 @@ export class OrganizationController extends Controller {
|
||||||
.map((x2: PosMaster) => ({
|
.map((x2: PosMaster) => ({
|
||||||
personID: x2.next_holder.id,
|
personID: x2.next_holder.id,
|
||||||
name: x2.next_holder.firstName,
|
name: x2.next_holder.firstName,
|
||||||
avatar: x2.next_holder && x2.next_holder.avatar != null && x2.next_holder.avatarName != null
|
avatar:
|
||||||
? `${x2.next_holder.avatar}/${x2.next_holder.avatarName}`
|
x2.next_holder &&
|
||||||
: null,
|
x2.next_holder.avatar != null &&
|
||||||
|
x2.next_holder.avatarName != null
|
||||||
|
? `${x2.next_holder.avatar}/${x2.next_holder.avatarName}`
|
||||||
|
: null,
|
||||||
positionName: x2.next_holder.position,
|
positionName: x2.next_holder.position,
|
||||||
positionNum: x2.orgChild2.orgChild2ShortName + x2.posMasterNo,
|
positionNum: x2.orgChild2.orgChild2ShortName + x2.posMasterNo,
|
||||||
positionNumInt: x2.posMasterNo,
|
positionNumInt: x2.posMasterNo,
|
||||||
|
|
@ -2039,9 +2059,12 @@ export class OrganizationController extends Controller {
|
||||||
.map((x3: PosMaster) => ({
|
.map((x3: PosMaster) => ({
|
||||||
personID: x3.next_holder.id,
|
personID: x3.next_holder.id,
|
||||||
name: x3.next_holder.firstName,
|
name: x3.next_holder.firstName,
|
||||||
avatar: x3.next_holder && x3.next_holder.avatar != null && x3.next_holder.avatarName != null
|
avatar:
|
||||||
? `${x3.next_holder.avatar}/${x3.next_holder.avatarName}`
|
x3.next_holder &&
|
||||||
: null,
|
x3.next_holder.avatar != null &&
|
||||||
|
x3.next_holder.avatarName != null
|
||||||
|
? `${x3.next_holder.avatar}/${x3.next_holder.avatarName}`
|
||||||
|
: null,
|
||||||
positionName: x3.next_holder.position,
|
positionName: x3.next_holder.position,
|
||||||
positionNum: x3.orgChild3.orgChild3ShortName + x3.posMasterNo,
|
positionNum: x3.orgChild3.orgChild3ShortName + x3.posMasterNo,
|
||||||
positionNumInt: x3.posMasterNo,
|
positionNumInt: x3.posMasterNo,
|
||||||
|
|
@ -2052,9 +2075,12 @@ export class OrganizationController extends Controller {
|
||||||
.map((x4: PosMaster) => ({
|
.map((x4: PosMaster) => ({
|
||||||
personID: x4.next_holder.id,
|
personID: x4.next_holder.id,
|
||||||
name: x4.next_holder.firstName,
|
name: x4.next_holder.firstName,
|
||||||
avatar: x4.next_holder && x4.next_holder.avatar != null && x4.next_holder.avatarName != null
|
avatar:
|
||||||
? `${x4.next_holder.avatar}/${x4.next_holder.avatarName}`
|
x4.next_holder &&
|
||||||
: null,
|
x4.next_holder.avatar != null &&
|
||||||
|
x4.next_holder.avatarName != null
|
||||||
|
? `${x4.next_holder.avatar}/${x4.next_holder.avatarName}`
|
||||||
|
: null,
|
||||||
positionName: x4.next_holder.position,
|
positionName: x4.next_holder.position,
|
||||||
positionNum: x4.orgChild4.orgChild4ShortName + x4.posMasterNo,
|
positionNum: x4.orgChild4.orgChild4ShortName + x4.posMasterNo,
|
||||||
positionNumInt: x4.posMasterNo,
|
positionNumInt: x4.posMasterNo,
|
||||||
|
|
@ -3806,7 +3832,7 @@ export class OrganizationController extends Controller {
|
||||||
* @summary ORG_023 - รายละเอียดโครงสร้าง (ADMIN) #25
|
* @summary ORG_023 - รายละเอียดโครงสร้าง (ADMIN) #25
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Get("{id}/{system}")
|
@Get("system/{id}/{system}")
|
||||||
async detailBySystem(
|
async detailBySystem(
|
||||||
@Path() id: string,
|
@Path() id: string,
|
||||||
@Path() system: string,
|
@Path() system: string,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue