feat(statistic): 添加采购款支付商品统计

This commit is contained in:
mkm 2024-06-21 11:39:16 +08:00
parent 8902c720be
commit c06cc5a193

View File

@ -421,6 +421,23 @@ class TradeStatisticLogic extends BaseLogic
'sign' => 'ali_pay',
];
$Chain['ali_pay'] = $aliPayOrderCurve;
//采购款支付商品
$fundsOrderMoney = $this->getOrderTotalMoney(['pay_type' =>18, 'create_time' => $where['create_time']], 'sum');
$lastFundsOrderMoney = $this->getOrderTotalMoney(['pay_type' => 18, 'create_time' => $dateWhere['create_time']], 'sum', "", $isNum);
$fundsOrderCurve = $this->getOrderTotalMoney(['pay_type' =>18, 'create_time' => $where['create_time']], 'group', 'create_time');
$fundsOrderChain = countRate($fundsOrderMoney, $lastFundsOrderMoney);
$topData[13] = [
'title' => '采购支付金额',
'desc' => '用户下单时使用采购实际支付的金额',
'total_money' => $fundsOrderMoney,
'rate' => $fundsOrderChain,
'value' => $fundsOrderCurve['y'],
'type' => 1,
'sign' => 'funds',
];
$Chain['funds'] = $fundsOrderCurve;
/** @var 营业额 $inTotalMoney */
$inTotalMoney = $this->tradeTotalMoney($where, "sum");
$lastInTotalMoney = $this->tradeTotalMoney($dateWhere, "sum", $isNum);