|
|
@@ -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);
|
|
|
+ }
|
|
|
|
|
|
}
|