|
|
@@ -10,7 +10,7 @@ class StatBookClass extends BaseClass
|
|
|
public static $baseFile = '\biz\stat\models\StatBook';
|
|
|
|
|
|
//预订单统计 ssh 20220402
|
|
|
- public static function bookOrderAdd($info, $date = null)
|
|
|
+ public static function bookOrderAdd($info, $params, $date = null)
|
|
|
{
|
|
|
$mainId = $info['mainId'] ?? 0;
|
|
|
$itemId = $info['productId'] ?? 0;
|
|
|
@@ -18,6 +18,10 @@ class StatBookClass extends BaseClass
|
|
|
//预订单只会有大单位
|
|
|
$num = $info['xhNum'] ?? 0;
|
|
|
$name = $info['name'] ?? '';
|
|
|
+ $sendTimeWant = $params['sendTimeWant'] ?? '';
|
|
|
+ if (empty($date) && !empty($sendTimeWant)) {
|
|
|
+ $date = date("Ymd", strtotime($sendTimeWant));
|
|
|
+ }
|
|
|
$time = $date == null ? date('Ymd') : $date;
|
|
|
$stat = self::getByCondition(['mainId' => $mainId, 'itemId' => $itemId, 'time' => $time], true);
|
|
|
if (empty($stat)) {
|