shish пре 4 година
родитељ
комит
9701a908e4
2 измењених фајлова са 15 додато и 0 уклоњено
  1. 8 0
      app-ghs/controllers/ExpendController.php
  2. 7 0
      biz-ghs/expend/classes/ExpendClass.php

+ 8 - 0
app-ghs/controllers/ExpendController.php

@@ -10,6 +10,14 @@ use Yii;
 class ExpendController extends BaseController
 {
 
+    public function actionList()
+    {
+        $where = [];
+        $where['mainId'] = $this->mainId;
+        $list = ExpendClass::getExpendList($where);
+        util::success($list);
+    }
+
     //新增支出 ssh 20220710
     public function actionAddExpend()
     {

+ 7 - 0
biz-ghs/expend/classes/ExpendClass.php

@@ -8,4 +8,11 @@ class ExpendClass extends BaseClass
 {
 
     public static $baseFile = '\bizGhs\expend\models\Expend';
+
+    public static function getExpendList($where)
+    {
+        $data = self::getList('*', $where, 'addTime DESC,id DESC');
+        return $data;
+    }
+
 }