From c06cc5a193cec47cfca5b7cbee8a7bcae58ea590 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Fri, 21 Jun 2024 11:39:16 +0800 Subject: [PATCH] =?UTF-8?q?feat(statistic):=20=E6=B7=BB=E5=8A=A0=E9=87=87?= =?UTF-8?q?=E8=B4=AD=E6=AC=BE=E6=94=AF=E4=BB=98=E5=95=86=E5=93=81=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../logic/statistic/TradeStatisticLogic.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/app/admin/logic/statistic/TradeStatisticLogic.php b/app/admin/logic/statistic/TradeStatisticLogic.php index 0ce735bb5..cdc1be899 100644 --- a/app/admin/logic/statistic/TradeStatisticLogic.php +++ b/app/admin/logic/statistic/TradeStatisticLogic.php @@ -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);