shish hace 4 años
padre
commit
302e0d3b83
Se han modificado 1 ficheros con 16 adiciones y 19 borrados
  1. 16 19
      app-ghs/controllers/StatYjController.php

+ 16 - 19
app-ghs/controllers/StatYjController.php

@@ -10,24 +10,21 @@ use common\components\util;
 class StatYjController extends BaseController
 {
 
-	//员工业绩 ssh 2021.3.15
-	public function actionList()
-	{
-		$get = Yii::$app->request->get();
-		$where = [];
-		$where['shopId'] = $this->shopId;
-		if (isset($get['shopId']) && !empty($get['shopId'])) {
-			$where['shopId'] = $get['shopId'];
-		}
-		$searchTime = $get['searchTime'] ?? 'today';
-		if (!empty($searchTime)) {
-			$startTime = $get['startTime'] ?? '';
-			$endTime = $get['endTime'] ?? '';
-			$period = dateUtil::formatTime($searchTime, $startTime, $endTime, true);
-			$where['time'] = ['between', [$period['startTime'], $period['endTime']]];
-		}
-		$respond = StatYjClass::getYjList($where);
-		util::success($respond);
-	}
+    //员工业绩 ssh 2021.3.15
+    public function actionList()
+    {
+        $get = Yii::$app->request->get();
+        $where = [];
+        $where['mainId'] = $this->mainId;
+        $searchTime = $get['searchTime'] ?? 'today';
+        if (!empty($searchTime)) {
+            $startTime = $get['startTime'] ?? '';
+            $endTime = $get['endTime'] ?? '';
+            $period = dateUtil::formatTime($searchTime, $startTime, $endTime, true);
+            $where['time'] = ['between', [$period['startTime'], $period['endTime']]];
+        }
+        $respond = StatYjClass::getYjList($where);
+        util::success($respond);
+    }
 
 }