protected function parent4process_task()
 {
     $query = Pilotplan::find();
     $ctg = new ActiveDataProvider(['query' => $query, 'pagination' => ['pageSize' => 200]]);
     $arr = [];
     foreach ($ctg->getModels() as $t) {
         if ($t->PLAN_DATE1 != '' and $t->PLAN_DATE2 != '') {
             $arr[] = $t;
             if ($t->ACTUAL_DATE1 != '' and $t->ACTUAL_DATE2 != '') {
                 $querySub1 = Pilotactual::find()->Where('ID=' . $t->ID);
                 $sub1 = new ActiveDataProvider(['query' => $querySub1, 'pagination' => ['pageSize' => 200]]);
                 foreach ($sub1->getModels() as $su1) {
                     $arr[] = $su1;
                     if ($t->ACTUAL_DATE2 != '' and $su1->ACTUAL_DATE2 != '' and $su1->ACTUAL_DATE2 > $t->PLAN_DATE2) {
                         $querySub2 = Pilotdelay::find()->Where('ID=' . $t->ID);
                         $sub2 = new ActiveDataProvider(['query' => $querySub2, 'pagination' => ['pageSize' => 200]]);
                         foreach ($sub2->getModels() as $su2) {
                             $arr[] = $su2;
                         }
                     }
                 }
             }
         }
     }
     //return $arr;
     return Json::encode($arr);
 }
 protected function parent6milestone()
 {
     $request = Yii::$app->request;
     $userid = $request->get('id_user');
     $queryStr = Pilotplan::find()->Where('CREATED_BY=' . $userid);
     $ctgstart = new ActiveDataProvider(['query' => $queryStr, 'pagination' => ['pageSize' => 200]]);
     $arrStr = [];
     foreach ($ctgstart->getModels() as $st) {
         if ($st->STATUS == 1 and Yii::$app->ambilKonvesi->convert($st->ACTUAL_DATE2, 'date') <= Yii::$app->ambilKonvesi->convert($st->PLAN_DATE2, 'date')) {
             /*CLOSE PROGRESS */
             $querySub1 = Pilotmilestone::find()->Where('ID=' . $st->ID);
             $sub1start = new ActiveDataProvider(['query' => $querySub1, 'pagination' => ['pageSize' => 200]]);
             foreach ($sub1start->getModels() as $str1) {
                 $arrStr[] = $str1;
             }
         }
     }
     return Json::encode($arrStr);
 }