Finance.php 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2017~2021 https://www.yiovo.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
  8. // +----------------------------------------------------------------------
  9. // | Author: 萤火科技 <admin@yiovo.com>
  10. // +----------------------------------------------------------------------
  11. declare (strict_types = 1);
  12. namespace app\store\controller\statistics;
  13. use app\store\controller\Controller;
  14. use app\store\model\ShopsMonthlyBonusSt;
  15. use app\store\model\User;
  16. use app\store\model\user\BonusHistory;
  17. use app\store\model\user\CommissionDetail;
  18. use app\store\service\statistics\Data as StatisticsDataService;
  19. /**
  20. * 财务统计模块
  21. * Class Data
  22. * @package app\store\controller\statistics
  23. */
  24. class Finance extends Controller
  25. {
  26. /**
  27. * 推荐官业绩及佣金列表-基本佣金
  28. * @return array
  29. * @throws \think\db\exception\DataNotFoundException
  30. * @throws \think\db\exception\DbException
  31. * @throws \think\db\exception\ModelNotFoundException
  32. */
  33. public function commerBaseStat()
  34. {
  35. $params = $this->request->param();
  36. //推荐官基本佣金
  37. $m = new User();
  38. $data = $m->financeCommerStat($params);
  39. return $this->renderSuccess(compact('data'));
  40. }
  41. /**
  42. * 推荐官基本佣金明细
  43. * @return array
  44. * @throws \think\db\exception\DataNotFoundException
  45. * @throws \think\db\exception\DbException
  46. * @throws \think\db\exception\ModelNotFoundException
  47. */
  48. public function commerBaseDetails()
  49. {
  50. $params = $this->request->param();
  51. //推荐官基本佣金
  52. $m = new CommissionDetail();
  53. $data = $m->commerDetails($params);
  54. return $this->renderSuccess(compact('data'));
  55. }
  56. /**
  57. * 门店个人奖励金列表
  58. * @return array
  59. * @author: zjwhust
  60. * @Time: 2022/5/12 14:15
  61. */
  62. public function shopBonusList()
  63. {
  64. $model = new BonusHistory();
  65. $list = $model->shopBonusList($this->request->param());
  66. return $this->renderSuccess(compact('list'));
  67. }
  68. /**
  69. * 门店个人奖励金明细
  70. * @return array
  71. * @author: zjwhust
  72. * @Time: 2022/5/13 9:24
  73. */
  74. public function shopBonusDetail()
  75. {
  76. $model = new BonusHistory();
  77. $list = $model->shopBonusDetail($this->request->param());
  78. return $this->renderSuccess(compact('list'));
  79. }
  80. /**
  81. * 门店销售额及佣金-达量奖励金
  82. * @return array
  83. * @author: zjwhust
  84. * @Time: 2022/5/13 9:36
  85. */
  86. public function shopBonusStat()
  87. {
  88. $model = new ShopsMonthlyBonusSt();
  89. $list = $model->shopBonusStat($this->request->param());
  90. return $this->renderSuccess(compact('list'));
  91. }
  92. /**
  93. * 推荐官业绩及佣金列表-达量奖励金
  94. * @return array
  95. * @throws \think\db\exception\DataNotFoundException
  96. * @throws \think\db\exception\DbException
  97. * @throws \think\db\exception\ModelNotFoundException
  98. */
  99. public function commerBonusStat(){
  100. $params = $this->request->param();
  101. $m = new User();
  102. $data = $m->financeCommerBonusStat($params);
  103. return $this->renderSuccess(compact('data'));
  104. }
  105. /**
  106. * 推荐官奖励金明细
  107. * @return array
  108. * @throws \think\db\exception\DataNotFoundException
  109. * @throws \think\db\exception\DbException
  110. * @throws \think\db\exception\ModelNotFoundException
  111. */
  112. public function commerBonusDetails(){
  113. $params = $this->request->param();
  114. $m = new BonusHistory();
  115. $data = $m->commerDetails($params);
  116. return $this->renderSuccess(compact('data'));
  117. }
  118. }