StatCgController.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. namespace ghs\controllers;
  3. use bizGhs\shop\classes\ShopAdminClass;
  4. use bizGhs\stat\classes\StatCgClass;
  5. use Yii;
  6. use common\components\util;
  7. class StatCgController extends BaseController
  8. {
  9. public function actionProfit()
  10. {
  11. ini_set('memory_limit', '2045M');
  12. set_time_limit(0);
  13. //查看财务的权限
  14. $lookMoney = ShopAdminClass::lookMoneyPower($this->shopAdmin, $this->shop);
  15. if ($lookMoney == 0) {
  16. //util::fail('无法查看');
  17. }
  18. $mainId = $this->mainId;
  19. $respond = StatCgClass::statCg($mainId);
  20. $list = $respond['itemList'] ?? [];
  21. $staffCg = $respond['staffCg'] ?? [];
  22. util::success(['list' => $list, 'staffCg' => $staffCg]);
  23. }
  24. //采购人业绩 ssh 2024412
  25. public function actionYj()
  26. {
  27. ini_set('memory_limit', '2045M');
  28. set_time_limit(0);
  29. //查看财务的权限
  30. $lookMoney = ShopAdminClass::lookMoneyPower($this->shopAdmin, $this->shop);
  31. if ($lookMoney == 0) {
  32. //util::fail('无法查看');
  33. }
  34. $mainId = $this->mainId;
  35. $respond = StatCgClass::statCgYj($mainId);
  36. $staffCg = $respond['staffCg'] ?? [];
  37. util::success(['staffCg' => $staffCg]);
  38. }
  39. }