tGovernmentStatistics.js 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. 'use strict';
  2. const _ = require('lodash');
  3. const meta = require('./.tGovernmentStatistics.js');
  4. const Controller = require('egg').Controller;
  5. const { CrudController } = require('naf-framework-mongoose/lib/controller');
  6. // 管理
  7. class TGovernmentStatisticsController extends Controller {
  8. constructor(ctx) {
  9. super(ctx);
  10. this.service = this.ctx.service.tGovernmentStatistics;
  11. }
  12. // 企业发布需求金额
  13. async demandAmount() {
  14. const res = await this.service.demandAmount(this.ctx.query);
  15. this.ctx.ok({ data: res });
  16. }
  17. // 解决融资
  18. async financingSolution() {
  19. const res = await this.service.financingSolution(this.ctx.query);
  20. this.ctx.ok({ data: res });
  21. }
  22. // 注册企业年月
  23. async companyDate() {
  24. const res = await this.service.companyDate(this.ctx.query);
  25. this.ctx.ok({ data: res });
  26. }
  27. // 注册企业行业
  28. async companyIndustry() {
  29. const res = await this.service.companyIndustry(this.ctx.query);
  30. this.ctx.ok({ ...res });
  31. }
  32. // 注册企业地区
  33. async companyRegion() {
  34. const res = await this.service.companyRegion(this.ctx.query);
  35. this.ctx.ok({ ...res });
  36. }
  37. // 帮助企业年月
  38. async helpBusinessesDate() {
  39. const res = await this.service.helpBusinessesDate(this.ctx.query);
  40. this.ctx.ok({ data: res });
  41. }
  42. // 帮助企业行业
  43. async helpBusinessesIndustry() {
  44. const res = await this.service.helpBusinessesIndustry(this.ctx.query);
  45. this.ctx.ok({ ...res });
  46. }
  47. // 帮助企业地区
  48. async helpBusinessesRegion() {
  49. const res = await this.service.helpBusinessesRegion(this.ctx.query);
  50. this.ctx.ok({ ...res });
  51. }
  52. // 企业发布需求
  53. async needCount() {
  54. const res = await this.service.needCount(this.ctx.query);
  55. this.ctx.ok({ data: res });
  56. }
  57. // 金融产品
  58. async financialProducts() {
  59. const res = await this.service.financialProducts(this.ctx.query);
  60. this.ctx.ok({ data: res });
  61. }
  62. // 服务金融机构
  63. async financialInstitution() {
  64. const res = await this.service.financialInstitution(this.ctx.query);
  65. this.ctx.ok({ ...res });
  66. }
  67. // 首页查询
  68. async pageSelect() {
  69. const res = await this.service.pageSelect(this.ctx.query);
  70. this.ctx.ok({ data: res });
  71. }
  72. // 银行统计
  73. async bank() {
  74. const res = await this.service.bank(this.ctx.query);
  75. this.ctx.ok({ ...res });
  76. }
  77. }
  78. module.exports = CrudController(TGovernmentStatisticsController, meta);