|
|
|
@ -189,7 +189,6 @@ class HierarchyFtthController extends Controller
|
|
|
|
|
$finalData = []; |
|
|
|
|
foreach($data as $objRow){ |
|
|
|
|
$objRow->key = rand(1, 1000); |
|
|
|
|
$this->countProgress(intval($objRow->id)); |
|
|
|
|
if (VersionGantt::where('hierarchy_ftth_id', $objRow->id)->exists()) { |
|
|
|
|
$dataGantt = VersionGantt::where('hierarchy_ftth_id', $objRow->id)->get(); |
|
|
|
|
$progress = $this->ganttProgress('hierarchy_ftth_id', $objRow->id); |
|
|
|
@ -210,7 +209,13 @@ class HierarchyFtthController extends Controller
|
|
|
|
|
|
|
|
|
|
return response()->json(['status'=>'success','data'=>$finalData,'code'=>200], 200); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public function countProgressTree($hierarchy_id) |
|
|
|
|
{ |
|
|
|
|
Artisan::call('calculate:progressgantt', [ |
|
|
|
|
'hierarchy_id' => $hierarchy_id |
|
|
|
|
]); |
|
|
|
|
return response()->json(['status'=>'success','code'=>200], 200); |
|
|
|
|
} |
|
|
|
|
private function getChildren($project_id, $parent_id) |
|
|
|
|
{ |
|
|
|
|
$finalData = []; |
|
|
|
|