fixing view workflow
This commit is contained in:
parent
61a532cae8
commit
711fa04a77
1 changed files with 14 additions and 2 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("")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue