no message
This commit is contained in:
parent
b5384b6d46
commit
aa2d930d75
4 changed files with 161 additions and 1 deletions
|
|
@ -8,10 +8,12 @@ import { ViewColumn, ViewEntity } from "typeorm";
|
|||
\`bma_ehr_organization_demo\`.\`profile\`.\`lastName\` AS \`lastName\`,
|
||||
\`bma_ehr_organization_demo\`.\`profile\`.\`citizenId\` AS \`citizenId\`,
|
||||
\`bma_ehr_organization_demo\`.\`profile\`.\`position\` AS \`position\`,
|
||||
NULL AS \`posNo\`,
|
||||
\`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 \`actFullNameId\`,
|
||||
NULL AS \`actFullName\`
|
||||
FROM
|
||||
(((\`bma_ehr_organization_demo\`.\`posMaster\`
|
||||
|
|
@ -33,6 +35,8 @@ export class viewDirector {
|
|||
@ViewColumn()
|
||||
position: string;
|
||||
@ViewColumn()
|
||||
posNo: string;
|
||||
@ViewColumn()
|
||||
posLevel: string;
|
||||
@ViewColumn()
|
||||
posType: string;
|
||||
|
|
@ -41,5 +45,7 @@ export class viewDirector {
|
|||
@ViewColumn()
|
||||
orgRootId: string;
|
||||
@ViewColumn()
|
||||
actFullNameId: string;
|
||||
@ViewColumn()
|
||||
actFullName: string;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,18 +8,32 @@ import { ViewColumn, ViewEntity } from "typeorm";
|
|||
\`profileChild\`.\`lastName\` AS \`lastName\`,
|
||||
\`profileChild\`.\`citizenId\` AS \`citizenId\`,
|
||||
\`profileChild\`.\`position\` AS \`position\`,
|
||||
CONCAT((CASE
|
||||
WHEN (\`bma_ehr_organization_demo\`.\`posMaster\`.\`orgChild1Id\` IS NULL) THEN \`orgRootChild\`.\`orgRootShortName\`
|
||||
WHEN (\`bma_ehr_organization_demo\`.\`posMaster\`.\`orgChild2Id\` IS NULL) THEN \`orgChild1Child\`.\`orgChild1ShortName\`
|
||||
WHEN (\`bma_ehr_organization_demo\`.\`posMaster\`.\`orgChild3Id\` IS NULL) THEN \`orgChild2Child\`.\`orgChild2ShortName\`
|
||||
WHEN (\`bma_ehr_organization_demo\`.\`posMaster\`.\`orgChild4Id\` IS NULL) THEN \`orgChild3Child\`.\`orgChild3ShortName\`
|
||||
ELSE \`orgChild4Child\`.\`orgChild4ShortName\`
|
||||
END),
|
||||
\`bma_ehr_organization_demo\`.\`posMaster\`.\`posMasterNo\`) AS \`posNo\`,
|
||||
\`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\`,
|
||||
\`bma_ehr_organization_demo\`.\`profile\`.\`id\` AS \`actFullNameId\`,
|
||||
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\`
|
||||
(((((((((((\`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\`)))
|
||||
LEFT JOIN \`bma_ehr_organization_demo\`.\`orgRoot\` \`orgRootChild\` ON ((\`posMasterChild\`.\`orgRootId\` = \`orgRootChild\`.\`id\`)))
|
||||
LEFT JOIN \`bma_ehr_organization_demo\`.\`orgChild1\` \`orgChild1Child\` ON ((\`posMasterChild\`.\`orgChild1Id\` = \`orgChild1Child\`.\`id\`)))
|
||||
LEFT JOIN \`bma_ehr_organization_demo\`.\`orgChild2\` \`orgChild2Child\` ON ((\`posMasterChild\`.\`orgChild2Id\` = \`orgChild2Child\`.\`id\`)))
|
||||
LEFT JOIN \`bma_ehr_organization_demo\`.\`orgChild3\` \`orgChild3Child\` ON ((\`posMasterChild\`.\`orgChild3Id\` = \`orgChild3Child\`.\`id\`)))
|
||||
LEFT JOIN \`bma_ehr_organization_demo\`.\`orgChild4\` \`orgChild4Child\` ON ((\`posMasterChild\`.\`orgChild4Id\` = \`orgChild4Child\`.\`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\`)))
|
||||
|
|
@ -39,6 +53,8 @@ export class viewDirectorActing {
|
|||
@ViewColumn()
|
||||
position: string;
|
||||
@ViewColumn()
|
||||
posNo: string;
|
||||
@ViewColumn()
|
||||
posLevel: string;
|
||||
@ViewColumn()
|
||||
posType: string;
|
||||
|
|
@ -47,5 +63,7 @@ export class viewDirectorActing {
|
|||
@ViewColumn()
|
||||
orgRootId: string;
|
||||
@ViewColumn()
|
||||
actFullNameId: string;
|
||||
@ViewColumn()
|
||||
actFullName: string;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue