| 123456789101112131415161718192021222324252627282930 |
- <?php
- namespace hd\controllers;
- use bizHd\stat\classes\StatWorkCatClass;
- use common\components\dateUtil;
- use Yii;
- use common\components\util;
- class StatWorkCatController extends BaseController
- {
- //制作单统计 ssh 20220616
- public function actionProfile()
- {
- $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']]];
- }
- $list = StatWorkCatClass::getAllByCondition($where, null, '*');
- util::success(['list' => $list, 'income' => []]);
- }
- }
|