Browse Source

update report analysis

pull/3/head
wahyu 1 year ago
parent
commit
c6452c9cc2
  1. 6
      app/Http/Controllers/ActivityController.php

6
app/Http/Controllers/ActivityController.php

@ -544,8 +544,8 @@ class ActivityController extends Controller
{ {
$dataBuilder = $this->setUpPayload($request->all(), 'm_activity'); $dataBuilder = $this->setUpPayload($request->all(), 'm_activity');
$builder = $dataBuilder['builder']; $builder = $dataBuilder['builder'];
$dataGet = $builder->select( 'selfTable.name', 'persentase_progress', 'selfTable.start_date', 'selfTable.end_date', 'duration', 'assign_hr_to_activity.id', $dataGet = $builder->select( 'selfTable.name', 'persentase_progress', 'selfTable.start_date', 'selfTable.end_date', 'duration',
'm_version_gantt.name_version', 'm_users.name as user_name', 'm_version_gantt.name_version', DB::raw('STRING_AGG(m_users.name, \',\') as user_name'),
DB::raw('SUM(report_activity_material.qty) as qty'), 'assign_material_to_activity.qty_planning', DB::raw('SUM(report_activity_material.qty) as qty'), 'assign_material_to_activity.qty_planning',
'assign_material_to_activity.id as join_third_id') 'assign_material_to_activity.id as join_third_id')
->join('m_version_gantt', 'm_version_gantt.id', '=', 'selfTable.version_gantt_id') ->join('m_version_gantt', 'm_version_gantt.id', '=', 'selfTable.version_gantt_id')
@ -557,10 +557,8 @@ class ActivityController extends Controller
->groupBy("selfTable.name") ->groupBy("selfTable.name")
->groupBy("selfTable.persentase_progress") ->groupBy("selfTable.persentase_progress")
->groupBy("m_version_gantt.name_version") ->groupBy("m_version_gantt.name_version")
->groupBy("m_users.name")
->groupBy("assign_material_to_activity.qty_planning") ->groupBy("assign_material_to_activity.qty_planning")
->groupBy("assign_material_to_activity.id") ->groupBy("assign_material_to_activity.id")
->groupBy("assign_hr_to_activity.id")
->get(); ->get();
return response()->json(['status' => 'success', 'code' => 200, 'data' => $dataGet ], 200); return response()->json(['status' => 'success', 'code' => 200, 'data' => $dataGet ], 200);
} }

Loading…
Cancel
Save