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


PHP Proc::AssignRelatedAttributes方法代码示例

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


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

示例1: 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

示例2: 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

示例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: searchforgrupavid

 public function searchforgrupavid($params)
 {
     $query = Matvid::find();
     $dataProvider = new ActiveDataProvider(['query' => $query, 'sort' => ['defaultOrder' => ['matvid_name' => SORT_ASC]]]);
     $query->joinWith(['grupavids']);
     $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;
     }
     $query->andFilterWhere(['matvid_id' => $this->matvid_id]);
     $query->andFilterWhere(['like', 'matvid_name', $this->matvid_name]);
     $query->andFilterWhere(['like', 'grupavids.grupa_main', $this->getAttribute('grupavids.grupa_main')]);
     Proc::AssignRelatedAttributes($dataProvider, ['grupavids.grupa_main']);
     return $dataProvider;
 }
开发者ID:vovancho,项目名称:yii2test,代码行数:17,代码来源:MatvidSearch.php

示例6: search

 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Importmaterial::find();
     $dataProvider = new ActiveDataProvider(['query' => $query, 'sort' => ['defaultOrder' => ['importmaterial_combination' => SORT_ASC]]]);
     $query->joinWith(['idmatvid']);
     $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;
     }
     $query->andFilterWhere(['importmaterial_id' => $this->importmaterial_id, 'id_matvid' => $this->id_matvid]);
     $query->andFilterWhere(['like', 'importmaterial_combination', $this->importmaterial_combination]);
     $query->andFilterWhere(['LIKE', 'idmatvid.matvid_name', $this->getAttribute('idmatvid.matvid_name')]);
     Proc::AssignRelatedAttributes($dataProvider, ['idmatvid.matvid_name']);
     return $dataProvider;
 }
开发者ID:vovancho,项目名称:yii2test,代码行数:24,代码来源:ImportmaterialSearch.php

示例7: 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

示例8: search

 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Authitemchild::find();
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     $query->joinWith(['children']);
     $this->load($params);
     $this->parent = $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(['like', 'parent', $this->parent])->andFilterWhere(['like', 'child', $this->child]);
     $query->andFilterWhere(['LIKE', 'children.description', $this->getAttribute('children.description')]);
     $query->andFilterWhere(['LIKE', 'children.type', $this->getAttribute('children.type')]);
     $query->andFilterWhere(['LIKE', 'children.name', $this->getAttribute('children.name')]);
     Proc::AssignRelatedAttributes($dataProvider, ['children.description', 'children.type', 'children.name']);
     return $dataProvider;
 }
开发者ID:vovancho,项目名称:yii2test,代码行数:26,代码来源:AuthitemchildSearch.php

示例9: search

 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Authassignment::find();
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     $query->joinWith(['itemname']);
     $this->load($params);
     $this->user_id = $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(['user_id' => $this->user_id, 'created_at' => $this->created_at]);
     $query->andFilterWhere(['like', 'item_name', $this->item_name]);
     $query->andFilterWhere(['LIKE', 'itemname.description', $this->getAttribute('itemname.description')]);
     $query->andFilterWhere(['LIKE', 'itemname.type', $this->getAttribute('itemname.type')]);
     $query->andFilterWhere(['LIKE', 'itemname.name', $this->getAttribute('itemname.name')]);
     Proc::AssignRelatedAttributes($dataProvider, ['itemname.description', 'itemname.type', 'itemname.name']);
     return $dataProvider;
 }
开发者ID:vovancho,项目名称:yii2test,代码行数:27,代码来源:AuthassignmentSearch.php

示例10: search

 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Removeakt::find();
     // add conditions that should always apply here
     $dataProvider = new ActiveDataProvider(['query' => $query, 'sort' => ['defaultOrder' => ['removeakt_id' => SORT_DESC]]]);
     $query->joinWith(['idRemover.idperson', 'idRemover.iddolzh']);
     $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(['removeakt_id' => $this->removeakt_id, 'id_remover' => $this->id_remover]);
     $query->andFilterWhere(Proc::WhereConstruct($this, 'removeakt_date', Proc::Date));
     $query->andFilterWhere(['LIKE', 'idperson.auth_user_fullname', $this->getAttribute('idRemover.idperson.auth_user_fullname')]);
     $query->andFilterWhere(['LIKE', 'iddolzh.dolzh_name', $this->getAttribute('idRemover.iddolzh.dolzh_name')]);
     Proc::AssignRelatedAttributes($dataProvider, ['idRemover.idperson.auth_user_fullname', 'idRemover.iddolzh.dolzh_name']);
     return $dataProvider;
 }
开发者ID:vovancho,项目名称:yii2test,代码行数:27,代码来源:RemoveaktSearch.php

示例11: search

 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = RramatDocfiles::find();
     // add conditions that should always apply here
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     $query->joinWith('idDocfiles');
     $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(['rramat_docfiles_id' => $this->rramat_docfiles_id, 'id_docfiles' => $this->id_docfiles, 'id_recoveryrecieveaktmat' => $params['id']]);
     $query->andFilterWhere(['LIKE', 'idDocfiles.docfiles_ext', $this->getAttribute('idDocfiles.docfiles_ext')]);
     $query->andFilterWhere(['LIKE', 'idDocfiles.docfiles_name', $this->getAttribute('idDocfiles.docfiles_name')]);
     $query->andFilterWhere(['LIKE', 'idDocfiles.docfiles_hash', $this->getAttribute('idDocfiles.docfiles_hash')]);
     Proc::AssignRelatedAttributes($dataProvider, ['idDocfiles.docfiles_ext', 'idDocfiles.docfiles_name', 'idDocfiles.docfiles_hash']);
     return $dataProvider;
 }
开发者ID:vovancho,项目名称:yii2test,代码行数:27,代码来源:RramatDocfilesSearch.php

示例12: searchForimportemployee

 public function searchForimportemployee($params)
 {
     $query = Impemployee::find();
     $dataProvider = new ActiveDataProvider(['query' => $query, 'sort' => ['defaultOrder' => ['idemployee.idperson.auth_user_fullname' => SORT_ASC]]]);
     $query->joinWith(['idemployee.iddolzh', 'idemployee.idpodraz', 'idemployee.idbuild']);
     $this->load($params);
     $this->id_importemployee = $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(['impemployee_id' => $this->impemployee_id, 'id_importemployee' => $this->id_importemployee, 'id_employee' => $this->id_employee]);
     $query->andFilterWhere(['LIKE', 'idemployee.employee_id', $this->getAttribute('idemployee.employee_id')]);
     $query->andFilterWhere(['LIKE', 'iddolzh.dolzh_name', $this->getAttribute('idemployee.iddolzh.dolzh_name')]);
     $query->andFilterWhere(['LIKE', 'idpodraz.podraz_name', $this->getAttribute('idemployee.idpodraz.podraz_name')]);
     $query->andFilterWhere(['LIKE', 'idbuild.build_name', $this->getAttribute('idemployee.idbuild.build_name')]);
     Proc::AssignRelatedAttributes($dataProvider, ['idemployee.employee_id', 'idemployee.iddolzh.dolzh_name', 'idemployee.idbuild.build_name', 'idemployee.idpodraz.podraz_name']);
     return $dataProvider;
 }
开发者ID:vovancho,项目名称:yii2test,代码行数:20,代码来源:ImpemployeeSearch.php

示例13: search

 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Spisosnovmaterials::find();
     // add conditions that should always apply here
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     $query->joinWith(['idMattraffic.idMaterial']);
     $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(['spisosnovmaterials_id' => $this->spisosnovmaterials_id, 'id_mattraffic' => $this->id_mattraffic, 'id_spisosnovakt' => $this->id_spisosnovakt]);
     $query->andFilterWhere(Proc::WhereConstruct($this, 'spisosnovmaterials_number'));
     $query->andFilterWhere(['LIKE', 'idMaterial.material_name', $this->getAttribute('idMattraffic.idMaterial.material_name')]);
     $query->andFilterWhere(['LIKE', 'idMaterial.material_inv', $this->getAttribute('idMattraffic.idMaterial.material_inv')]);
     $query->andFilterWhere(['LIKE', 'idMaterial.material_serial', $this->getAttribute('idMattraffic.idMaterial.material_serial')]);
     $query->andFilterWhere(Proc::WhereConstruct($this, 'idMattraffic.idMaterial.material_release', Proc::Date));
     $query->andFilterWhere(Proc::WhereConstruct($this, 'idMattraffic.idMaterial.material_price'));
     Proc::AssignRelatedAttributes($dataProvider, ['idMattraffic.idMaterial.material_name', 'idMattraffic.idMaterial.material_inv', 'idMattraffic.idMaterial.material_serial', 'idMattraffic.idMaterial.material_release', 'idMattraffic.idMaterial.material_price']);
     return $dataProvider;
 }
开发者ID:vovancho,项目名称:yii2test,代码行数:30,代码来源:SpisosnovmaterialsSearch.php

示例14: searchformaterialcontain

 public function searchformaterialcontain($params)
 {
     $query = TrMat::find();
     // add conditions that should always apply here
     $dataProvider = new ActiveDataProvider(['query' => $query, 'sort' => ['defaultOrder' => ['tr_mat_id' => SORT_DESC]]]);
     $query->joinWith(['idInstallakt', 'idMattraffic.idMaterial', 'idMattraffic.idMol.idperson', 'idMattraffic.idMol.iddolzh', 'idParent', 'trRmMats']);
     $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;
     }
     //      $query->andWhere('tr_mat_id not in (select tmo.id_tr_mat from tr_mat_osmotr tmo where tmo.id_osmotraktmat = ' . $params['idosmotraktmat'] . ')');
     // grid filtering conditions
     $query->andFilterWhere(['tr_mat_id' => $this->tr_mat_id, 'id_mattraffic' => $this->id_mattraffic, 'id_parent' => $this->id_parent]);
     $query->andWhere(['trRmMats.id_tr_mat' => NULL]);
     $query->andWhere(['idParent.id_material' => $params['id']]);
     $query->andFilterWhere(Proc::WhereConstruct($this, 'id_installakt'));
     $query->andFilterWhere(Proc::WhereConstruct($this, 'idInstallakt.installakt_date'), 'date');
     $query->andFilterWhere(['LIKE', 'idMaterial.material_name', $this->getAttribute('idMattraffic.idMaterial.material_name')]);
     $query->andFilterWhere(['LIKE', 'idMaterial.material_inv', $this->getAttribute('idMattraffic.idMaterial.material_inv')]);
     $query->andFilterWhere(Proc::WhereConstruct($this, 'idMattraffic.mattraffic_number'));
     $query->andFilterWhere(['LIKE', 'idperson.auth_user_fullname', $this->getAttribute('idMattraffic.idMol.idperson.auth_user_fullname')]);
     $query->andFilterWhere(['LIKE', 'iddolzh.dolzh_name', $this->getAttribute('idMattraffic.idMol.iddolzh.dolzh_name')]);
     $query->andFilterWhere(['LIKE', 'idbuild.build_name', $this->getAttribute('idMattraffic.idMol.idbuild.build_name')]);
     Proc::AssignRelatedAttributes($dataProvider, ['idInstallakt.installakt_date', 'idMattraffic.idMaterial.material_name', 'idMattraffic.idMaterial.material_inv', 'idMattraffic.mattraffic_number', 'idMattraffic.idMol.idperson.auth_user_fullname', 'idMattraffic.idMol.iddolzh.dolzh_name', 'idMattraffic.idMol.idbuild.build_name']);
     return $dataProvider;
 }
开发者ID:vovancho,项目名称:yii2test,代码行数:28,代码来源:TrMatSearch.php

示例15: searchforinstallakt_mat

 public function searchforinstallakt_mat($params)
 {
     $query = Material::find();
     $dataProvider = new ActiveDataProvider(['query' => $query, 'sort' => ['defaultOrder' => ['material_name' => SORT_ASC]]]);
     $query->joinWith(['idMatv', 'idIzmer']);
     $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;
     }
     $query->andFilterWhere(['material_id' => $this->material_id, 'material_tip' => $this->material_tip, 'material_writeoff' => $this->material_writeoff, 'id_matvid' => $this->id_matvid, 'id_izmer' => $this->id_izmer, 'material_importdo' => $this->material_importdo]);
     $query->andFilterWhere(['like', 'material_name', $this->material_name])->andFilterWhere(['like', 'material_name1c', $this->material_name1c])->andFilterWhere(['like', 'material_1c', $this->material_1c])->andFilterWhere(['like', 'material_inv', $this->material_inv])->andFilterWhere(['like', 'material_serial', $this->material_serial]);
     $query->andFilterWhere(Proc::WhereConstruct($this, 'material_release', Proc::Date));
     //    $query->andFilterWhere(Proc::WhereConstruct($this, 'material_number'));
     $query->andWhere(['material_number' => 1]);
     $query->andFilterWhere(Proc::WhereConstruct($this, 'material_price'));
     $query->andFilterWhere(['LIKE', 'idMatv.matvid_name', $this->getAttribute('idMatv.matvid_name')]);
     $query->andFilterWhere(['LIKE', 'idIzmer.izmer_name', $this->getAttribute('idIzmer.izmer_name')]);
     $query->andFilterWhere(Proc::WhereConstruct($this, 'material_username'));
     $query->andFilterWhere(Proc::WhereConstruct($this, 'material_lastchange', Proc::DateTime));
     $query->andFilterWhere(Proc::WhereConstruct($this, 'material_number'));
     Proc::AssignRelatedAttributes($dataProvider, ['idMatv.matvid_name', 'idIzmer.izmer_name']);
     return $dataProvider;
 }
开发者ID:vovancho,项目名称:yii2test,代码行数:25,代码来源:MaterialSearch.php


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