Merge branch 'develop' into adiDev
This commit is contained in:
commit
087b2ddfd6
2 changed files with 96 additions and 0 deletions
45
src/entities/view/viewDirector.ts
Normal file
45
src/entities/view/viewDirector.ts
Normal file
|
|
@ -0,0 +1,45 @@
|
||||||
|
import { ViewColumn, ViewEntity } from "typeorm";
|
||||||
|
|
||||||
|
@ViewEntity({
|
||||||
|
expression: `SELECT
|
||||||
|
\`bma_ehr_organization_demo\`.\`profile\`.\`id\` AS \`Id\`,
|
||||||
|
\`bma_ehr_organization_demo\`.\`profile\`.\`prefix\` AS \`prefix\`,
|
||||||
|
\`bma_ehr_organization_demo\`.\`profile\`.\`firstName\` AS \`firstName\`,
|
||||||
|
\`bma_ehr_organization_demo\`.\`profile\`.\`lastName\` AS \`lastName\`,
|
||||||
|
\`bma_ehr_organization_demo\`.\`profile\`.\`citizenId\` AS \`citizenId\`,
|
||||||
|
\`bma_ehr_organization_demo\`.\`profile\`.\`position\` AS \`position\`,
|
||||||
|
\`bma_ehr_organization_demo\`.\`posMaster\`.\`isDirector\` AS \`isDirector\`,
|
||||||
|
\`bma_ehr_organization_demo\`.\`posLevel\`.\`posLevelName\` AS \`posLevel\`,
|
||||||
|
\`bma_ehr_organization_demo\`.\`posType\`.\`posTypeName\` AS \`posType\`,
|
||||||
|
\`bma_ehr_organization_demo\`.\`posMaster\`.\`orgRootId\` AS \`orgRootId\`,
|
||||||
|
NULL AS \`actFullName\`
|
||||||
|
FROM
|
||||||
|
(((\`bma_ehr_organization_demo\`.\`posMaster\`
|
||||||
|
JOIN \`bma_ehr_organization_demo\`.\`profile\` ON ((\`bma_ehr_organization_demo\`.\`posMaster\`.\`current_holderId\` = \`bma_ehr_organization_demo\`.\`profile\`.\`id\`)))
|
||||||
|
JOIN \`bma_ehr_organization_demo\`.\`posLevel\` ON ((\`bma_ehr_organization_demo\`.\`profile\`.\`posLevelId\` = \`bma_ehr_organization_demo\`.\`posLevel\`.\`id\`)))
|
||||||
|
JOIN \`bma_ehr_organization_demo\`.\`posType\` ON ((\`bma_ehr_organization_demo\`.\`profile\`.\`posTypeId\` = \`bma_ehr_organization_demo\`.\`posType\`.\`id\`)))`,
|
||||||
|
})
|
||||||
|
export class viewDirector {
|
||||||
|
@ViewColumn()
|
||||||
|
id: string;
|
||||||
|
@ViewColumn()
|
||||||
|
prefix: string;
|
||||||
|
@ViewColumn()
|
||||||
|
firstName: string;
|
||||||
|
@ViewColumn()
|
||||||
|
lastName: string;
|
||||||
|
@ViewColumn()
|
||||||
|
citizenId: string;
|
||||||
|
@ViewColumn()
|
||||||
|
position: string;
|
||||||
|
@ViewColumn()
|
||||||
|
posLevel: string;
|
||||||
|
@ViewColumn()
|
||||||
|
posType: string;
|
||||||
|
@ViewColumn()
|
||||||
|
isDirector: boolean;
|
||||||
|
@ViewColumn()
|
||||||
|
orgRootId: string;
|
||||||
|
@ViewColumn()
|
||||||
|
actFullName: string;
|
||||||
|
}
|
||||||
51
src/entities/view/viewDirectorActing.ts
Normal file
51
src/entities/view/viewDirectorActing.ts
Normal file
|
|
@ -0,0 +1,51 @@
|
||||||
|
import { ViewColumn, ViewEntity } from "typeorm";
|
||||||
|
|
||||||
|
@ViewEntity({
|
||||||
|
expression: `SELECT
|
||||||
|
\`profileChild\`.\`id\` AS \`Id\`,
|
||||||
|
\`profileChild\`.\`prefix\` AS \`prefix\`,
|
||||||
|
\`profileChild\`.\`firstName\` AS \`firstName\`,
|
||||||
|
\`profileChild\`.\`lastName\` AS \`lastName\`,
|
||||||
|
\`profileChild\`.\`citizenId\` AS \`citizenId\`,
|
||||||
|
\`profileChild\`.\`position\` AS \`position\`,
|
||||||
|
\`posMasterChild\`.\`isDirector\` AS \`isDirector\`,
|
||||||
|
\`bma_ehr_organization_demo\`.\`posLevel\`.\`posLevelName\` AS \`posLevel\`,
|
||||||
|
\`bma_ehr_organization_demo\`.\`posType\`.\`posTypeName\` AS \`posType\`,
|
||||||
|
\`bma_ehr_organization_demo\`.\`posMaster\`.\`orgRootId\` AS \`orgRootId\`,
|
||||||
|
CONCAT(\`bma_ehr_organization_demo\`.\`profile\`.\`prefix\`,
|
||||||
|
\`bma_ehr_organization_demo\`.\`profile\`.\`firstName\`,
|
||||||
|
' ',
|
||||||
|
\`bma_ehr_organization_demo\`.\`profile\`.\`lastName\`) AS \`actFullName\`
|
||||||
|
FROM
|
||||||
|
((((((\`bma_ehr_organization_demo\`.\`posMasterAct\`
|
||||||
|
JOIN \`bma_ehr_organization_demo\`.\`posMaster\` \`posMasterChild\` ON ((\`bma_ehr_organization_demo\`.\`posMasterAct\`.\`posMasterChildId\` = \`posMasterChild\`.\`id\`)))
|
||||||
|
JOIN \`bma_ehr_organization_demo\`.\`profile\` \`profileChild\` ON ((\`posMasterChild\`.\`current_holderId\` = \`profileChild\`.\`id\`)))
|
||||||
|
JOIN \`bma_ehr_organization_demo\`.\`posLevel\` ON ((\`profileChild\`.\`posLevelId\` = \`bma_ehr_organization_demo\`.\`posLevel\`.\`id\`)))
|
||||||
|
JOIN \`bma_ehr_organization_demo\`.\`posType\` ON ((\`profileChild\`.\`posTypeId\` = \`bma_ehr_organization_demo\`.\`posType\`.\`id\`)))
|
||||||
|
JOIN \`bma_ehr_organization_demo\`.\`posMaster\` ON ((\`bma_ehr_organization_demo\`.\`posMasterAct\`.\`posMasterId\` = \`bma_ehr_organization_demo\`.\`posMaster\`.\`id\`)))
|
||||||
|
JOIN \`bma_ehr_organization_demo\`.\`profile\` ON ((\`bma_ehr_organization_demo\`.\`posMaster\`.\`current_holderId\` = \`bma_ehr_organization_demo\`.\`profile\`.\`id\`)))`,
|
||||||
|
})
|
||||||
|
export class viewCommanderDirector {
|
||||||
|
@ViewColumn()
|
||||||
|
id: string;
|
||||||
|
@ViewColumn()
|
||||||
|
prefix: string;
|
||||||
|
@ViewColumn()
|
||||||
|
firstName: string;
|
||||||
|
@ViewColumn()
|
||||||
|
lastName: string;
|
||||||
|
@ViewColumn()
|
||||||
|
citizenId: string;
|
||||||
|
@ViewColumn()
|
||||||
|
position: string;
|
||||||
|
@ViewColumn()
|
||||||
|
posLevel: string;
|
||||||
|
@ViewColumn()
|
||||||
|
posType: string;
|
||||||
|
@ViewColumn()
|
||||||
|
isDirector: boolean;
|
||||||
|
@ViewColumn()
|
||||||
|
orgRootId: string;
|
||||||
|
@ViewColumn()
|
||||||
|
actFullName: string;
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue