|
|
@@ -53,6 +53,32 @@ class StatSaleClass extends BaseClass
|
|
|
return ['totalPrice' => $totalPrice];
|
|
|
}
|
|
|
|
|
|
+ //结账跟踪 ssh 20230503
|
|
|
+ public static function OrderClear($mainId)
|
|
|
+ {
|
|
|
+ $get = Yii::$app->request->get();
|
|
|
+ $where = [];
|
|
|
+ $where['mainId'] = $mainId;
|
|
|
+ $searchTime = isset($get['searchTime']) && !empty($get['searchTime']) ? $get['searchTime'] : 'today';
|
|
|
+
|
|
|
+ $startTime = $get['startTime'] ?? '';
|
|
|
+ $endTime = $get['endTime'] ?? '';
|
|
|
+ $period = dateUtil::formatTime($searchTime, $startTime, $endTime, true);
|
|
|
+ $start = $period['startTime'];
|
|
|
+ $end = $period['endTime'];
|
|
|
+ $where['time'] = ['between', [$start, $end]];
|
|
|
+
|
|
|
+ $currentStartDate = date('Y-m-d', strtotime($start));
|
|
|
+ $currentEndDate = date('Y-m-d', strtotime($end));
|
|
|
+ $currentStartTime = $currentStartDate . ' 00:00:00';
|
|
|
+ $currentEndTime = $currentEndDate . ' 23:59:59';
|
|
|
+
|
|
|
+ $where = ['mainId' => $mainId, 'status' => ['in', [OrderClass::ORDER_STATUS_UN_SEND, OrderClass::ORDER_STATUS_SENDING, OrderClass::ORDER_STATUS_COMPLETE]]];
|
|
|
+ $where['payTime'] = ['between', [$currentStartTime, $currentEndTime]];
|
|
|
+ $ghsOrderList = OrderClass::getAllByCondition($where, null, '*');
|
|
|
+ return ['list' => $ghsOrderList];
|
|
|
+ }
|
|
|
+
|
|
|
//客户下单榜 ssh 20230502
|
|
|
public static function statCustomCg($mainId)
|
|
|
{
|