当前位置: 首页>>代码示例>>PHP>>正文


PHP func\Proc类代码示例

本文整理汇总了PHP中app\func\Proc的典型用法代码示例。如果您正苦于以下问题:PHP Proc类的具体用法?PHP Proc怎么用?PHP Proc使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Proc类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: search

 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Glprep::find();
     // add conditions that should always apply here
     $dataProvider = new ActiveDataProvider(['query' => $query, 'sort' => ['defaultOrder' => ['glprep_id' => SORT_DESC]]]);
     $query->joinWith(['idPreparat']);
     $this->load($params);
     // Отображает список препаратов глаукомного пациента в его карте
     if (isset($params['id'])) {
         $Glaukuchet = Glaukuchet::findOne(['id_patient' => $params['id']]);
         $query->andFilterWhere(['id_glaukuchet' => empty($Glaukuchet) ? -1 : $Glaukuchet->primaryKey]);
     } else {
         $query->andFilterWhere(['id_glaukuchet' => -1]);
     }
     if (!$this->validate()) {
         // uncomment the following line if you do not want to return any records when validation fails
         // $query->where('0=1');
         return $dataProvider;
     }
     // grid filtering conditions
     $query->andFilterWhere(['glprep_id' => $this->glprep_id, 'id_glaukuchet' => $this->id_glaukuchet, 'id_preparat' => $this->id_preparat, 'glprep_rlocat' => $this->glprep_rlocat]);
     $query->andFilterWhere(['LIKE', 'idPreparat.preparat_name', $this->getAttribute('idPreparat.preparat_name')]);
     Proc::AssignRelatedAttributes($dataProvider, ['idPreparat.preparat_name']);
     return $dataProvider;
 }
开发者ID:vovancho,项目名称:yii2test,代码行数:32,代码来源:GlprepSearch.php

示例2: search

 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = TrRmMat::find();
     // add conditions that should always apply here
     $dataProvider = new ActiveDataProvider(['query' => $query, 'sort' => ['defaultOrder' => ['tr_rm_mat_id' => SORT_DESC]]]);
     $query->joinWith(['idTrMat.idMattraffic.idMaterial', 'idTrMat.idMattraffic.idMol.idperson', 'idTrMat.idMattraffic.idMol.iddolzh', 'idTrMat.idParent.idMaterial matparent', 'idTrMat.idParent.idMol molparent', 'idTrMat.idParent.idMol.idbuild', 'idTrMat.idParent.trOsnovs']);
     $this->load($params);
     if (!$this->validate()) {
         // uncomment the following line if you do not want to return any records when validation fails
         // $query->where('0=1');
         return $dataProvider;
     }
     // grid filtering conditions
     $query->andFilterWhere(['tr_rm_mat_id' => $this->tr_rm_mat_id, 'id_removeakt' => (string) filter_input(INPUT_GET, 'id'), 'id_tr_mat' => $this->id_tr_mat]);
     $query->andFilterWhere(['LIKE', 'matparent.material_name', $this->getAttribute('idTrMat.idParent.idMaterial.material_name')]);
     $query->andFilterWhere(['LIKE', 'matparent.material_inv', $this->getAttribute('idTrMat.idParent.idMaterial.material_inv')]);
     $query->andFilterWhere(['LIKE', 'matparent.material_serial', $this->getAttribute('idTrMat.idParent.idMaterial.material_serial')]);
     $query->andFilterWhere(['LIKE', 'idbuild.build_name', $this->getAttribute('idTrMat.idParent.idMol.idbuild.build_name')]);
     $query->andFilterWhere(['LIKE', 'idMaterial.material_name', $this->getAttribute('idTrMat.idMattraffic.idMaterial.material_name')]);
     $query->andFilterWhere(['LIKE', 'idMaterial.material_inv', $this->getAttribute('idTrMat.idMattraffic.idMaterial.material_inv')]);
     $query->andFilterWhere(Proc::WhereConstruct($this, 'idTrMat.idMattraffic.mattraffic_number'));
     $query->andFilterWhere(['LIKE', 'idperson.auth_user_fullname', $this->getAttribute('idTrMat.idMattraffic.idMol.idperson.auth_user_fullname')]);
     $query->andFilterWhere(['LIKE', 'iddolzh.dolzh_name', $this->getAttribute('idTrMat.idMattraffic.idMol.iddolzh.dolzh_name')]);
     $query->andFilterWhere(['LIKE', 'trOsnovs.tr_osnov_kab', $this->getAttribute('idTrMat.idParent.trOsnovs.tr_osnov_kab')]);
     Proc::AssignRelatedAttributes($dataProvider, ['idTrMat.idParent.idMaterial.material_name' => 'matparent', 'idTrMat.idParent.idMaterial.material_inv' => 'matparent', 'idTrMat.idParent.idMaterial.material_serial' => 'matparent', 'idTrMat.idParent.idMol.idbuild.build_name', 'idTrMat.idMattraffic.idMaterial.material_name', 'idTrMat.idMattraffic.idMaterial.material_inv', 'idTrMat.idMattraffic.mattraffic_number', 'idTrMat.idMattraffic.idMol.idperson.auth_user_fullname', 'idTrMat.idMattraffic.idMol.iddolzh.dolzh_name', 'idTrMat.idParent.trOsnovs.tr_osnov_kab']);
     return $dataProvider;
 }
开发者ID:vovancho,项目名称:yii2test,代码行数:34,代码来源:TrRmMatSearch.php

示例3: search

 public function search($params)
 {
     $query = Osmotraktmat::find();
     $query->select(['osmotraktmat_id', 'osmotraktmat_date', 'id_master', 'count(trMatOsmotrs.tr_mat_osmotr_id) AS osmotraktmat_countmat']);
     $query->joinWith(['idMaster.idperson idmasterperson', 'idMaster.iddolzh idmasterdolzh', 'trMatOsmotrs']);
     // add conditions that should always apply here
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     $this->load($params);
     if (!$this->validate()) {
         // uncomment the following line if you do not want to return any records when validation fails
         // $query->where('0=1');
         return $dataProvider;
     }
     // grid filtering conditions
     $query->andFilterWhere(['id_master' => $this->id_master]);
     $query->andFilterWhere(Proc::WhereConstruct($this, 'osmotraktmat_id'));
     $query->andFilterWhere(Proc::WhereConstruct($this, 'osmotraktmat_date', Proc::Date));
     $query->groupBy(['osmotraktmat_id']);
     if (!empty($this->osmotraktmat_countmat)) {
         $w = Proc::WhereConstruct($this, 'osmotraktmat_countmat');
         $query->having('count(osmotraktmat_id) ' . $w[0] . $w[2]);
     }
     Proc::AssignRelatedAttributes($dataProvider, ['idMaster.idperson.auth_user_fullname', 'idMaster.iddolzh.dolzh_name']);
     $dataProvider->sort->attributes['osmotraktmat_countmat'] = ['asc' => ['count(osmotraktmat_id)' => SORT_ASC], 'desc' => ['count(osmotraktmat_id)' => SORT_DESC]];
     return $dataProvider;
 }
开发者ID:vovancho,项目名称:yii2test,代码行数:26,代码来源:OsmotraktmatSearch.php

示例4: search

 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Spisosnovakt::find();
     // add conditions that should always apply here
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     $query->joinWith(['idMol.idperson idpersonmol', 'idMol.iddolzh iddolzhmol', 'idMol.idpodraz idpodrazmol', 'idEmployee.idperson', 'idEmployee.iddolzh', 'idSchetuchet']);
     $this->load($params);
     if (!$this->validate()) {
         // uncomment the following line if you do not want to return any records when validation fails
         // $query->where('0=1');
         return $dataProvider;
     }
     // grid filtering conditions
     $query->andFilterWhere(['id_schetuchet' => $this->id_schetuchet, 'id_mol' => $this->id_mol, 'id_employee' => $this->id_employee]);
     $query->andFilterWhere(Proc::WhereConstruct($this, 'spisosnovakt_id'));
     $query->andFilterWhere(Proc::WhereConstruct($this, 'spisosnovakt_date', Proc::Date));
     $query->andFilterWhere(['LIKE', 'idpersonmol.auth_user_fullname', $this->getAttribute('idMol.idperson.auth_user_fullname')]);
     $query->andFilterWhere(['LIKE', 'iddolzhmol.dolzh_name', $this->getAttribute('idMol.iddolzh.dolzh_name')]);
     $query->andFilterWhere(['LIKE', 'idpodrazmol.podraz_name', $this->getAttribute('idMol.idpodraz.podraz_name')]);
     $query->andFilterWhere(['LIKE', 'idperson.auth_user_fullname', $this->getAttribute('idEmployee.idperson.auth_user_fullname')]);
     $query->andFilterWhere(['LIKE', 'iddolzh.dolzh_name', $this->getAttribute('idEmployee.iddolzh.dolzh_name')]);
     $query->andFilterWhere(['LIKE', 'idSchetuchet.schetuchet_kod', $this->getAttribute('idSchetuchet.schetuchet_kod')]);
     $query->andFilterWhere(['LIKE', 'idSchetuchet.schetuchet_name', $this->getAttribute('idSchetuchet.schetuchet_name')]);
     Proc::AssignRelatedAttributes($dataProvider, ['idMol.idperson.auth_user_fullname' => 'idpersonmol', 'idMol.iddolzh.dolzh_name' => 'iddolzhmol', 'idMol.idpodraz.podraz_name' => 'idpodrazmol', 'idEmployee.idperson.auth_user_fullname', 'idEmployee.iddolzh.dolzh_name', 'idSchetuchet.schetuchet_kod', 'idSchetuchet.schetuchet_name']);
     return $dataProvider;
 }
开发者ID:vovancho,项目名称:yii2test,代码行数:33,代码来源:SpisosnovaktSearch.php

示例5: actionSettings

 public function actionSettings()
 {
     $model = Fregatsettings::findOne(1);
     if ($model->load(Yii::$app->request->post()) && $model->save()) {
         return $this->redirect(Proc::GetPreviousURLBreadcrumbsFromSession());
     } else {
         return $this->render('//Fregat/config/settingsupdate', ['model' => $model]);
     }
 }
开发者ID:vovancho,项目名称:yii2test,代码行数:9,代码来源:FregatController.php

示例6: actionUpdate

 public function actionUpdate($id)
 {
     $model = $this->findModel($id);
     if ($model->load(Yii::$app->request->post()) && $model->save()) {
         return $this->redirect(Proc::GetPreviousURLBreadcrumbsFromSession());
     } else {
         return $this->render('update', ['model' => $model]);
     }
 }
开发者ID:vovancho,项目名称:yii2test,代码行数:9,代码来源:ImportmaterialController.php

示例7: actionToexcel

 public function actionToexcel()
 {
     $searchModel = new ImportemployeeSearch();
     $params = Yii::$app->request->queryParams;
     $inputdata = json_decode($params['inputdata']);
     $modelname = $searchModel->formName();
     $dataProvider = $searchModel->search(Proc::GetArrayValuesByKeyName($modelname, $inputdata));
     Proc::Grid2Excel($dataProvider, $modelname, 'Импорт сотрудников');
 }
开发者ID:vovancho,项目名称:yii2test,代码行数:9,代码来源:ImportemployeeController.php

示例8: actionCreate

 public function actionCreate($idglaukuchet)
 {
     $model = new Glprep();
     $model->id_glaukuchet = $idglaukuchet;
     if ($model->load(Yii::$app->request->post()) && $model->save()) {
         return $this->redirect(Proc::GetPreviousURLBreadcrumbsFromSession());
     } else {
         return $this->render('create', ['model' => $model, 'idglaukuchet' => $idglaukuchet]);
     }
 }
开发者ID:vovancho,项目名称:yii2test,代码行数:10,代码来源:GlprepController.php

示例9: actionDelete

 /**
  * Deletes an existing RramatDocfiles model.
  * If deletion is successful, the browser will be redirected to the 'index' page.
  * @param string $id
  * @return mixed
  */
 public function actionDelete($id)
 {
     if (Yii::$app->request->isAjax) {
         $ar = $this->findModel($id);
         $id_docfiles = $ar->id_docfiles;
         if ($ar->delete()) {
             Proc::DeleteDocFile($id_docfiles);
         }
     }
 }
开发者ID:vovancho,项目名称:yii2test,代码行数:16,代码来源:RramatDocfilesController.php

示例10: actionIndex

 public function actionIndex()
 {
     $searchModel = new LogreportSearch();
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     $Importconfig = Importconfig::findOne(1);
     if ($Importconfig->load(Yii::$app->request->post()) && $Importconfig->save()) {
         return $this->redirect(Proc::GetPreviousURLBreadcrumbsFromSession());
     } else {
         return $this->render('index', ['Importconfig' => $Importconfig, 'searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
     }
 }
开发者ID:vovancho,项目名称:yii2test,代码行数:11,代码来源:LogreportController.php

示例11: actionUpdate

 /**
  * Updates an existing Spisosnovakt model.
  * If update is successful, the browser will be redirected to the 'view' page.
  * @param string $id
  * @return mixed
  */
 public function actionUpdate($id)
 {
     $model = $this->findModel($id);
     if ($model->load(Yii::$app->request->post()) && $model->save()) {
         return $this->redirect(Proc::GetPreviousURLBreadcrumbsFromSession());
     } else {
         $searchModel = new SpisosnovmaterialsSearch();
         $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
         return $this->render('update', ['model' => $model, 'searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
     }
 }
开发者ID:vovancho,项目名称:yii2test,代码行数:17,代码来源:SpisosnovaktController.php

示例12: selectinput

 public function selectinput($params)
 {
     $method = isset($params['init']) ? 'one' : 'all';
     // Меняем раскладку на английскую при вводе МКБ10
     if ($method === 'all') {
         preg_match('/^([а-яА-Я]\\d)/ui', $params['q'], $match);
         if (!empty($match[1])) {
             $params['q'] = Proc::switcher($params['q']);
         }
     }
     $query = self::find()->select(array_merge(isset($params['init']) ? [] : [self::primaryKey()[0] . ' AS id'], ['CONCAT_WS(" - ", code, name) AS text']))->where(['node_count' => 0])->andwhere(['or', ['like', isset($params['init']) ? 'id' : 'code', $params['q'], isset($params['init']) ? false : null], $method === 'all' ? ['like', 'name', $params['q']] : '1<>1'])->andwhere(['or', ['like', 'code', 'H40%', false], ['like', 'code', 'Q15.0', false]])->limit(10)->asArray()->{$method}();
     return $query;
 }
开发者ID:vovancho,项目名称:yii2test,代码行数:13,代码来源:Classmkb.php

示例13: actionUpdate

 public function actionUpdate($id)
 {
     $model = $this->findModel($id);
     $UploadFile = new UploadDocFile();
     if ($model->load(Yii::$app->request->post()) && $model->save()) {
         return $this->redirect(Proc::GetPreviousURLBreadcrumbsFromSession());
     } else {
         $searchModelrramat = new RramatDocfilesSearch();
         $dataProviderrramat = $searchModelrramat->search(Yii::$app->request->queryParams);
         $searchModel = new RecoveryrecieveaktmatSearch();
         $dataProvider = $searchModel->searchbase(Yii::$app->request->queryParams);
         return $this->render('update', ['model' => $model, 'UploadFile' => $UploadFile, 'dataProvider' => $dataProvider, 'searchModelrramat' => $searchModelrramat, 'dataProviderrramat' => $dataProviderrramat]);
     }
 }
开发者ID:vovancho,项目名称:yii2test,代码行数:14,代码来源:RecoveryrecieveaktmatController.php

示例14: actionUpdate

 public function actionUpdate($id)
 {
     $model = $this->findModel($id);
     if ($model->load(Yii::$app->request->post()) && $model->save()) {
         return $this->redirect(Proc::GetPreviousURLBreadcrumbsFromSession());
     } else {
         $Request = Yii::$app->request->queryParams;
         $searchModelOsn = new TrOsnovSearch();
         $dataProviderOsn = $searchModelOsn->search($Request);
         $searchModelMat = new TrMatSearch();
         $dataProviderMat = $searchModelMat->search($Request);
         return $this->render('update', ['model' => $model, 'searchModelOsn' => $searchModelOsn, 'dataProviderOsn' => $dataProviderOsn, 'searchModelMat' => $searchModelMat, 'dataProviderMat' => $dataProviderMat]);
     }
 }
开发者ID:vovancho,项目名称:yii2test,代码行数:14,代码来源:InstallaktController.php

示例15: search

 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Grupavid::find();
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     $query->joinWith(['idmatvid']);
     $this->load($params);
     $this->id_grupa = $params['id'];
     if (!$this->validate()) {
         // uncomment the following line if you do not want to return any records when validation fails
         // $query->where('0=1');
         return $dataProvider;
     }
     $query->andFilterWhere(['grupavid_id' => $this->grupavid_id, 'grupavid_main' => $this->grupavid_main, 'id_grupa' => $this->id_grupa, 'id_matvid' => $this->id_matvid]);
     $query->andFilterWhere(['LIKE', 'idmatvid.matvid_name', $this->getAttribute('idmatvid.matvid_name')]);
     Proc::AssignRelatedAttributes($dataProvider, ['idmatvid.matvid_name']);
     return $dataProvider;
 }
开发者ID:vovancho,项目名称:yii2test,代码行数:24,代码来源:GrupavidSearch.php


注:本文中的app\func\Proc类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。