更新: 重构代码并优化财务统计逻辑中的筛选功能
This commit is contained in:
parent
deb451b0fd
commit
8fa6f4e757
@ -4,6 +4,7 @@ namespace app\adminapi\logic\consult_basic;
|
||||
|
||||
use app\common\logic\BaseLogic;
|
||||
use app\common\model\consult_basic\ConsultProject;
|
||||
use app\common\model\dict\DictData;
|
||||
use app\common\model\financial\FinancialInvoice;
|
||||
use app\common\model\financial\FinancialRefund;
|
||||
use app\common\model\financial\FinancialSettlement;
|
||||
@ -24,9 +25,12 @@ class ConsultStatisticsLogic extends BaseLogic
|
||||
$where1=[
|
||||
['review_status', '=', 1],
|
||||
['contract_type', '=', 0],
|
||||
['business_nature', '=', 3],
|
||||
['status', '=', 0]
|
||||
];
|
||||
$DictData=DictData::where('type_value','consult')->column('value');
|
||||
if($DictData){
|
||||
$where1[]=['business_nature','in',$DictData];
|
||||
}
|
||||
$total_apply_amount = $marketingContract->statistics_count($where1, $time, 'sum', '');
|
||||
$apply_amount_value = $marketingContract->statistics_count($where1, $time, 'group', 'create_time');
|
||||
$data[] = [
|
||||
|
@ -6,6 +6,7 @@ namespace app\adminapi\logic\manage_basic;
|
||||
|
||||
use app\common\logic\BaseLogic;
|
||||
use app\common\model\consult_basic\ConsultProject;
|
||||
use app\common\model\dict\DictData;
|
||||
use app\common\model\financial\FinancialInvoice;
|
||||
use app\common\model\financial\FinancialRefund;
|
||||
use app\common\model\financial\FinancialSettlement;
|
||||
@ -31,14 +32,17 @@ class ManageStatisticsLogic extends BaseLogic
|
||||
$financialRefund = new FinancialRefund();
|
||||
$financialSettlement = new FinancialSettlement();
|
||||
|
||||
$where_1=[
|
||||
['review_status', '=', 1],
|
||||
['contract_type', '=', 0],
|
||||
['business_nature', '=', 2],
|
||||
['status', '=', 0]
|
||||
];
|
||||
$total_apply_amount = $marketingContract->statistics_count($where_1, $time, 'sum', '');
|
||||
$apply_amount_value = $marketingContract->statistics_count($where_1, $time, 'group', 'create_time');
|
||||
$where1=[
|
||||
['review_status', '=', 1],
|
||||
['contract_type', '=', 0],
|
||||
['status', '=', 0]
|
||||
];
|
||||
$DictData=DictData::where('type_value','management')->column('value');
|
||||
if($DictData){
|
||||
$where1[]=['business_nature','in',$DictData];
|
||||
}
|
||||
$total_apply_amount = $marketingContract->statistics_count($where1, $time, 'sum', '');
|
||||
$apply_amount_value = $marketingContract->statistics_count($where1, $time, 'group', 'create_time');
|
||||
$data[] = [
|
||||
'title' => '待立项项目',
|
||||
'desc' => '',
|
||||
|
Loading…
x
Reference in New Issue
Block a user