From f845ce949eed4ff2135648a9985a2c7d3636f166 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Tue, 9 Jul 2024 11:26:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0:=20=E9=87=8D=E6=9E=84?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=B9=B6=E4=BC=98=E5=8C=96=E8=B4=A2=E5=8A=A1?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E9=80=BB=E8=BE=91=E4=B8=AD=E7=9A=84=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cost_project/CostProjectStatisticsLogic.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/app/adminapi/logic/cost_project/CostProjectStatisticsLogic.php b/app/adminapi/logic/cost_project/CostProjectStatisticsLogic.php index 044bbe921..04feb7c0c 100644 --- a/app/adminapi/logic/cost_project/CostProjectStatisticsLogic.php +++ b/app/adminapi/logic/cost_project/CostProjectStatisticsLogic.php @@ -17,6 +17,7 @@ namespace app\adminapi\logic\cost_project; use app\common\logic\BaseLogic; use app\common\model\cost_project\CostProject; +use app\common\model\dict\DictData; use app\common\model\financial\FinancialInvoice; use app\common\model\financial\FinancialRefund; use app\common\model\financial\FinancialSettlement; @@ -44,9 +45,17 @@ class CostProjectStatisticsLogic extends BaseLogic $where1=[ ['review_status','=', 1], ['contract_type','=',0], - ['business_nature','=',4], ['status','=',0] ]; + $where2=[ + ['review_status','=', 1], + ['status','=',1] + ]; + $data=DictData::where('type_value','cost_project')->column('value'); + if($data){ + $where1[]=['business_nature','in',$data]; + $where2[]=['business_nature','in',$data]; + } $total_apply_amount = $marketingContract->statistics_count($where1, $time, 'sum', ''); $apply_amount_value = $marketingContract->statistics_count($where1, $time, 'group', 'create_time'); $data[] = [ @@ -77,11 +86,6 @@ class CostProjectStatisticsLogic extends BaseLogic 'type' => 1, ]; //签约金额 - $where2=[ - ['review_status','=', 1], - ['business_nature','=',4], - ['status','=',1] - ]; $total_apply_amount = $marketingContract->statistics($where2, $time, 'sum', '', 'signed_amount'); $apply_amount_value = $marketingContract->statistics($where2, $time, 'group', 'create_time', 'signed_amount'); $data[] = [