Merge branch 'develop' of github.com:Frappet/bma-ehr-organization into develop
This commit is contained in:
commit
4a933c79cd
2 changed files with 18 additions and 6 deletions
|
|
@ -33,10 +33,22 @@ export class ViewWorkFlowController extends Controller {
|
|||
const lists = await this.metaWorkflowRepository
|
||||
.createQueryBuilder("metaWorkflow")
|
||||
.select(["metaWorkflow.name", "metaWorkflow.sysName"])
|
||||
.groupBy("metaWorkflow.name")
|
||||
// .groupBy("metaWorkflow.name")
|
||||
.getMany();
|
||||
|
||||
return new HttpSuccess(lists);
|
||||
const sys: any = [];
|
||||
|
||||
for (let index = 0; index < lists.length; index++) {
|
||||
const element = await lists[index];
|
||||
if (sys.findIndex((x: any) => x.sysName === element.sysName) === -1) {
|
||||
sys.push({
|
||||
sysName: element.sysName,
|
||||
name: element.name,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return new HttpSuccess(sys);
|
||||
}
|
||||
|
||||
@Get("")
|
||||
|
|
|
|||
|
|
@ -32,14 +32,14 @@ export async function init() {
|
|||
});
|
||||
};
|
||||
|
||||
// sendToQueueOrg = (payload: any, persistent = true) => {
|
||||
// channel.sendToQueue(queue_org, Buffer.from(JSON.stringify(payload)), { persistent });
|
||||
// };
|
||||
sendToQueueOrg = (payload: any, persistent = true) => {
|
||||
channel.sendToQueue(queue_org, Buffer.from(JSON.stringify(payload)), { persistent });
|
||||
};
|
||||
|
||||
console.log("[AMQ] Listening for message...");
|
||||
|
||||
createConsumer(queue, channel, handler); //----> (3) Process Consumer
|
||||
// createConsumer(queue_org, channel, handler_org);
|
||||
createConsumer(queue_org, channel, handler_org);
|
||||
// createConsumer(queue2, channel, handler2);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue