/** * Deletes an existing Application model. * If deletion is successful, the browser will be redirected to the 'index' page. * @param integer $id * @return mixed */ public function actionCheckPoint($id_app_task_checkpoint) { $model = AppTaskCheckpoint::findOne($id_app_task_checkpoint); if (Yii::$app->request->post()) { $model->status = true; $model->save(false); if ($model->save(false)) { if ($model->id_app_task_checkpoint_type == DictTask::LINE_IS_SET_UP) { //对line-setup的checkout操作 //active log.checkout line-setup Active::operationLog($model->appTask->id_application, [Yii::$app->user->getIdentity()->first_name, Yii::$app->user->getIdentity()->last_name, DictTask::$taskType[DictTask::TYPE_LINE_SETUP], ''], DictActive::USER_UPDATE_TASK, Yii::$app->user->getIdentity()->id); } else { //其余三个都是application-review的checkout foreach (DictTask::$checkPointType as $key => $val) { switch ($model->id_app_task_checkpoint_type) { //active log.checkout application-review case $key: Active::operationLog($model->appTask->id_application, [Yii::$app->user->getIdentity()->first_name, Yii::$app->user->getIdentity()->last_name, DictTask::$checkPointType[$model->id_app_task_checkpoint_type], DictTask::$taskType[DictTask::TYPE_APPLICATION_REVIEW]], DictActive::USER_REVIEWD_CHECK_POINT, Yii::$app->user->getIdentity()->id); } } } } return $this->redirect(AppTask::getSectionsUrl($model->appTask)); } return $this->renderAjax('check_point', ['model' => $model]); }