|
|
@@ -0,0 +1,32 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+namespace ghs\controllers;
|
|
|
+
|
|
|
+use biz\stat\classes\StatKhCgClass;
|
|
|
+use common\components\dateUtil;
|
|
|
+use Yii;
|
|
|
+use common\components\util;
|
|
|
+
|
|
|
+class StatKhCgController extends BaseController
|
|
|
+{
|
|
|
+
|
|
|
+ //客户采购列表 shish 20211017
|
|
|
+ public function actionProfile()
|
|
|
+ {
|
|
|
+ $get = Yii::$app->request->get();
|
|
|
+ $where = [];
|
|
|
+ $where['shopId'] = $this->shopId;
|
|
|
+ if (isset($get['shopId']) && !empty($get['shopId'])) {
|
|
|
+ $where['shopId'] = $get['shopId'];
|
|
|
+ }
|
|
|
+ $selectTime = $get['selectTime'] ?? 'thisMonth';
|
|
|
+ if (!empty($selectTime)) {
|
|
|
+ $startTime = $get['startTime'] ?? '';
|
|
|
+ $endTime = $get['endTime'] ?? '';
|
|
|
+ $period = dateUtil::formatTime($selectTime, $startTime, $endTime, true);
|
|
|
+ $where['time'] = ['between', [$period['startTime'], $period['endTime']]];
|
|
|
+ }
|
|
|
+ $list = StatKhCgClass::getAllByCondition($where, null, '*');
|
|
|
+ }
|
|
|
+
|
|
|
+}
|