import { BaseRoute, Inject, Router } from "noomi"; import { __AmOrgModeService } from "../../service/__data/__orgmodeservice"; import AMReportService from "../../service/__data/__amreport"; @Router({ namespace: "/__report", path: "*" }) class __AmReportRoute extends BaseRoute { @Inject(AMReportService) service: AMReportService; async genreport(){ try{ const r = await this.service.genReport(); return { type:'file', data:r }; }catch(e){ return {success:false,result:e} } } }