更新: 重构代码并优化财务统计逻辑中的统计功能

This commit is contained in:
mkm 2024-07-08 10:56:09 +08:00
parent 5042685dc1
commit 1c6a2941c7
2 changed files with 16 additions and 5 deletions

View File

@ -21,8 +21,14 @@ class ConsultStatisticsLogic extends BaseLogic
$financialInvoice = new FinancialInvoice();
$financialRefund = new FinancialRefund();
$financialSettlement = new FinancialSettlement();
$total_apply_amount = $marketingContract->statistics_count([], $time, 'sum', '');
$apply_amount_value = $marketingContract->statistics_count([], $time, 'group', 'create_time');
$where1=[
['review_status', '=', 1],
['contract_type', '=', 0],
['business_nature', '=', 3],
['status', '=', 0]
];
$total_apply_amount = $marketingContract->statistics_count($where1, $time, 'sum', '');
$apply_amount_value = $marketingContract->statistics_count($where1, $time, 'group', 'create_time');
$data[] = [
'title' => '待立项项目',
'desc' => '',

View File

@ -29,9 +29,14 @@ class SupervisionProjectStatisticsLogic extends BaseLogic
$supervisionProject = new SupervisionProject();
$supervisionProjectMonthlyReport = new SupervisionProjectMonthlyReport();
$total_apply_amount = $marketingContract->statistics_count([], $time, 'sum', '');
$apply_amount_value = $marketingContract->statistics_count([], $time, 'group', 'create_time');
$where1=[
['review_status', '=', 1],
['contract_type', '=', 0],
['business_nature', '=', 1],
['status', '=', 0]
];
$total_apply_amount = $marketingContract->statistics_count($where1, $time, 'sum', '');
$apply_amount_value = $marketingContract->statistics_count($where1, $time, 'group', 'create_time');
$data[] = [
'title' => '待立项项目',
'desc' => '',