diff --git a/app/adminapi/controller/project/ProjectStatisticsController.php b/app/adminapi/controller/project/ProjectStatisticsController.php index f32adcf6f..523b36d14 100644 --- a/app/adminapi/controller/project/ProjectStatisticsController.php +++ b/app/adminapi/controller/project/ProjectStatisticsController.php @@ -165,37 +165,17 @@ $cost_budget = ProjectCostBudgetDetail::where('project_id',$id)->sum('amount'); //机具清单预算 $equipment_budget = ProjectEquipmentBudgetDetail::where('project_id',$id)->sum('amount'); - $total_budget_series = [ - 'name' => '总预算', - 'data' => [$total_budget,($material_budget+$subpackage_budget+$labor_budget+$cost_budget+$equipment_budget)] + $series1 = [ + 'name' => '成本预算', + 'data' => [$total_budget,$project_budget['cl_cost'],$project_budget['fb_cost'],$project_budget['rg_cost'],$project_budget['fy_cost'],$project_budget['jj_cost']] ]; - $material_budget_series = [ - 'name' => '材料预算', - 'data' => [$project_budget['cl_cost'],$material_budget] - ]; - $subpackage_budget_series = [ - 'name' => '分包预算', - 'data' => [$project_budget['fb_cost'],$subpackage_budget] - ]; - $labor_budget_series = [ - 'name' => '人工预算', - 'data' => [$project_budget['rg_cost'],$labor_budget] - ]; - $cost_budget_series = [ - 'name' => '费用预算', - 'data' => [$project_budget['fy_cost'],$cost_budget] - ]; - $equipment_budget_series = [ - 'name' => '机具预算', - 'data' => [$project_budget['jj_cost'],$equipment_budget] + $series2 = [ + 'name' => '清单预算', + 'data' => [($material_budget+$subpackage_budget+$labor_budget+$cost_budget+$equipment_budget),$material_budget,$subpackage_budget,$labor_budget,$cost_budget,$equipment_budget] ]; $result = [ - 'total_budget_series' => $total_budget_series, - 'material_budget_series' => $material_budget_series, - 'subpackage_budget_series' => $subpackage_budget_series, - 'labor_budget_series' => $labor_budget_series, - 'cost_budget_series' => $cost_budget_series, - 'equipment_budget_series' => $equipment_budget_series, + 'series1' => $series1, + 'series2' => $series2, 'column' => $column, ]; return $this->success('success',$result);