本文整理汇总了PHP中app\func\Proc::WhereConstruct方法的典型用法代码示例。如果您正苦于以下问题:PHP Proc::WhereConstruct方法的具体用法?PHP Proc::WhereConstruct怎么用?PHP Proc::WhereConstruct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\func\Proc
的用法示例。
在下文中一共展示了Proc::WhereConstruct方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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;
}
示例2: baseFilter
private function baseFilter(&$query)
{
$query->andFilterWhere(['mattraffic_id' => $this->mattraffic_id, 'mattraffic_tip' => $this->mattraffic_tip, 'id_material' => $this->id_material, 'id_mol' => $this->id_mol]);
$query->andFilterWhere(['LIKE', 'idMaterial.material_tip', $this->getAttribute('idMaterial.material_tip')]);
$query->andFilterWhere(['LIKE', 'idMatv.matvid_name', $this->getAttribute('idMaterial.idMatv.matvid_name')]);
$query->andFilterWhere(['LIKE', 'idMaterial.material_name', $this->getAttribute('idMaterial.material_name')]);
$query->andFilterWhere(['LIKE', 'idMaterial.material_inv', $this->getAttribute('idMaterial.material_inv')]);
$query->andFilterWhere(['LIKE', 'idMaterial.material_serial', $this->getAttribute('idMaterial.material_serial')]);
$query->andFilterWhere(['LIKE', 'idMaterial.material_name', $this->getAttribute('idMaterial.material_name')]);
$query->andFilterWhere(Proc::WhereConstruct($this, 'idMaterial.material_release', Proc::Date));
$query->andFilterWhere(Proc::WhereConstruct($this, 'idMaterial.material_number'));
$query->andFilterWhere(['LIKE', 'idIzmer.izmer_name', $this->getAttribute('idMaterial.idIzmer.izmer_name')]);
$query->andFilterWhere(Proc::WhereConstruct($this, 'idMaterial.material_price'));
$query->andFilterWhere(Proc::WhereConstruct($this, 'idMol.employee_id'));
$query->andFilterWhere(['LIKE', 'idperson.auth_user_fullname', $this->getAttribute('idMol.idperson.auth_user_fullname')]);
$query->andFilterWhere(['LIKE', 'iddolzh.dolzh_name', $this->getAttribute('idMol.iddolzh.dolzh_name')]);
$query->andFilterWhere(['LIKE', 'idpodraz.podraz_name', $this->getAttribute('idMol.idpodraz.podraz_name')]);
$query->andFilterWhere(['LIKE', 'idbuild.build_name', $this->getAttribute('idMol.idbuild.build_name')]);
$query->andFilterWhere(Proc::WhereConstruct($this, 'idMol.employee_dateinactive', Proc::Date));
$query->andFilterWhere(['LIKE', 'idMaterial.material_writeoff', $this->getAttribute('idMaterial.material_writeoff')]);
$query->andFilterWhere(['LIKE', 'idMaterial.material_username', $this->getAttribute('idMaterial.material_username')]);
$query->andFilterWhere(Proc::WhereConstruct($this, 'idMaterial.material_lastchange', Proc::DateTime));
$query->andFilterWhere(['LIKE', 'idMaterial.material_importdo', $this->getAttribute('idMaterial.material_importdo')]);
$query->andFilterWhere(['LIKE', 'idMol.employee_username', $this->getAttribute('idMol.employee_username')]);
$query->andFilterWhere(['LIKE', 'idbuild.build_name', $this->getAttribute('idMol.idbuild.build_name')]);
$query->andFilterWhere(Proc::WhereConstruct($this, 'idMol.employee_lastchange', Proc::DateTime));
$query->andFilterWhere(['LIKE', 'idMol.employee_importdo', $this->getAttribute('idMol.employee_importdo')]);
$query->andFilterWhere(Proc::WhereConstruct($this, 'mattraffic_date', Proc::Date));
$query->andFilterWhere(Proc::WhereConstruct($this, 'mattraffic_number'));
$query->andFilterWhere(['LIKE', 'mattraffic_username', $this->getAttribute('mattraffic_username')]);
$query->andFilterWhere(Proc::WhereConstruct($this, 'mattraffic_lastchange', Proc::DateTime));
}
示例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;
}
示例4: 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;
}
示例5: 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;
}
示例6: search
public function search($params)
{
$query = Logreport::find();
$dataProvider = new ActiveDataProvider(['query' => $query, 'sort' => ['defaultOrder' => ['logreport_id' => SORT_DESC]]]);
$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(Proc::WhereConstruct($this, 'logreport_id'));
$query->andFilterWhere(Proc::WhereConstruct($this, 'logreport_executetime', Proc::Time));
$query->andFilterWhere(Proc::WhereConstruct($this, 'logreport_date', Proc::Date));
$query->andFilterWhere(Proc::WhereConstruct($this, 'logreport_errors'));
$query->andFilterWhere(Proc::WhereConstruct($this, 'logreport_updates'));
$query->andFilterWhere(Proc::WhereConstruct($this, 'logreport_additions'));
$query->andFilterWhere(Proc::WhereConstruct($this, 'logreport_amount'));
$query->andFilterWhere(Proc::WhereConstruct($this, 'logreport_missed'));
$query->andFilterWhere(Proc::WhereConstruct($this, 'logreport_memoryused'));
return $dataProvider;
}
示例7: 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;
}
示例8: searchemployee
public function searchemployee($params)
{
$query = Authuser::find();
$dataProvider = new ActiveDataProvider(['query' => $query, 'sort' => ['defaultOrder' => ['auth_user_fullname' => SORT_ASC]]]);
$query->joinWith('employees', true, 'INNER JOIN');
if (Yii::$app->user->can('Administrator')) {
$query->joinWith(['profile']);
}
$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(['auth_user_id' => $this->auth_user_id]);
$query->andFilterWhere(['like', 'auth_user_fullname', $this->auth_user_fullname]);
if (Yii::$app->user->can('Administrator')) {
$query->andFilterWhere(['like', 'profile.profile_inn', $this->getAttribute('profile.profile_inn')]);
$query->andFilterWhere(Proc::WhereConstruct($this, 'profile.profile_dr', Proc::Date));
$query->andFilterWhere(['like', 'profile.profile_address', $this->getAttribute('profile.profile_address')]);
$query->andFilterWhere(['like', 'profile.profile_snils', $this->getAttribute('profile.profile_snils')]);
$query->andFilterWhere(['profile.profile_pol' => $this->getAttribute('profile.profile_pol')]);
$query->groupBy(['auth_user_id']);
// Костыль для gridview, не отображает положенные 10 записей при сортировке или фильтрации.
// Причина возможно в NULL значениях первичного ключа profile_id связанной модели Profile
Proc::AssignRelatedAttributes($dataProvider, ['profile.profile_inn', 'profile.profile_dr', 'profile.profile_pol', 'profile.profile_address', 'profile.profile_snils']);
}
return $dataProvider;
}
示例9: searchforauthuser
public function searchforauthuser($params)
{
$query = Employee::find();
$dataProvider = new ActiveDataProvider(['query' => $query, 'sort' => ['defaultOrder' => ['employee_id' => SORT_ASC]]]);
$query->joinWith(['iddolzh', 'idpodraz', 'idbuild']);
$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(['employee_id' => $this->employee_id, 'id_dolzh' => $this->id_dolzh, 'id_podraz' => $this->id_podraz, 'id_build' => $this->id_build, 'id_person' => $params['id']]);
$query->andFilterWhere(['LIKE', 'iddolzh.dolzh_name', $this->getAttribute('iddolzh.dolzh_name')]);
$query->andFilterWhere(['LIKE', 'idbuild.build_name', $this->getAttribute('idbuild.build_name')]);
$query->andFilterWhere(['LIKE', 'idpodraz.podraz_name', $this->getAttribute('idpodraz.podraz_name')]);
$query->andFilterWhere(['LIKE', 'employee_username', $this->getAttribute('employee_username')]);
$query->andFilterWhere(Proc::WhereConstruct($this, 'employee_lastchange', Proc::DateTime));
$query->andFilterWhere(Proc::WhereConstruct($this, 'employee_dateinactive', Proc::Date));
Proc::AssignRelatedAttributes($dataProvider, ['iddolzh.dolzh_name', 'idbuild.build_name', 'idpodraz.podraz_name']);
return $dataProvider;
}
示例10: searchformaterialkarta
public function searchformaterialkarta($params)
{
$query = Recoveryrecieveakt::find();
// add conditions that should always apply here
$dataProvider = new ActiveDataProvider(['query' => $query, 'sort' => ['defaultOrder' => ['idRecoverysendakt.recoverysendakt_date' => SORT_DESC, 'recoveryrecieveakt_date' => SORT_DESC]]]);
$query->joinWith(['idRecoverysendakt', 'idOsmotrakt.idTrosnov.idMattraffic']);
$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(['recoveryrecieveakt_repaired' => $this->recoveryrecieveakt_repaired, 'idMattraffic.id_material' => $params['id']]);
$query->andFilterWhere(Proc::WhereConstruct($this, 'id_recoverysendakt'));
$query->andFilterWhere(Proc::WhereConstruct($this, 'idRecoverysendakt.recoverysendakt_date'), 'date');
$query->andFilterWhere(Proc::WhereConstruct($this, 'recoveryrecieveakt_date'), 'date');
$query->andFilterWhere(['LIKE', 'recoveryrecieveakt_result', $this->getAttribute('recoveryrecieveakt_result')]);
$query->andFilterWhere(Proc::WhereConstruct($this, 'id_osmotrakt'));
Proc::AssignRelatedAttributes($dataProvider, ['idRecoverysendakt.recoverysendakt_date']);
return $dataProvider;
}
示例11: 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;
}
示例12: glaukFilter
private function glaukFilter(&$query)
{
$query->andFilterWhere(['LIKE', 'patient_fam', $this->getAttribute('patient_fam')]);
$query->andFilterWhere(['LIKE', 'patient_im', $this->getAttribute('patient_im')]);
$query->andFilterWhere(['LIKE', 'patient_ot', $this->getAttribute('patient_ot')]);
$query->andFilterWhere(Proc::WhereConstruct($this, 'patient_dr', Proc::Date));
$query->andFilterWhere(['LIKE', 'patient_pol', $this->getAttribute('patient_pol')]);
$fias_city = $this->getAttribute('idFias.fias_city');
if (!empty($fias_city)) {
$query->andFilterWhere(['or', ['and', ['LIKE', 'idFias.OFFNAME', $this->getAttribute('idFias.fias_city')], 'idFias.AOLEVEL < 7'], ['and', ['LIKE', 'idFias2.OFFNAME', $this->getAttribute('idFias.fias_city')], 'idFias.AOLEVEL >= 7']]);
}
$fias_street = $this->getAttribute('idFias.fias_street');
if (!empty($fias_street)) {
$query->andFilterWhere(['and', ['LIKE', 'idFias.OFFNAME', $this->getAttribute('idFias.fias_street')], 'idFias.AOLEVEL >= 7']);
}
$query->andFilterWhere(['LIKE', 'patient_dom', $this->getAttribute('patient_dom')]);
$query->andFilterWhere(['LIKE', 'patient_korp', $this->getAttribute('patient_korp')]);
$query->andFilterWhere(['LIKE', 'patient_kvartira', $this->getAttribute('patient_kvartira')]);
$query->andFilterWhere(['LIKE', 'patient_username', $this->getAttribute('patient_username')]);
$query->andFilterWhere(Proc::WhereConstruct($this, 'patient_lastchange', Proc::DateTime));
$query->andFilterWhere(Proc::WhereConstruct($this, 'glaukuchets.glaukuchet_uchetbegin', Proc::Date));
$query->andFilterWhere(['LIKE', 'glaukuchets.glaukuchet_detect', $this->getAttribute('glaukuchets.glaukuchet_detect')]);
$query->andFilterWhere(Proc::WhereConstruct($this, 'glaukuchets.glaukuchet_deregdate', Proc::Date));
$query->andFilterWhere(['LIKE', 'glaukuchets.glaukuchet_deregreason', $this->getAttribute('glaukuchets.glaukuchet_deregreason')]);
$query->andFilterWhere(['LIKE', 'glaukuchets.glaukuchet_stage', $this->getAttribute('glaukuchets.glaukuchet_stage')]);
$query->andFilterWhere(Proc::WhereConstruct($this, 'glaukuchets.glaukuchet_operdate', Proc::Date));
$query->andFilterWhere(['LIKE', 'glaukuchets.glaukuchet_invalid', $this->getAttribute('glaukuchets.glaukuchet_invalid')]);
$query->andFilterWhere(Proc::WhereConstruct($this, 'glaukuchets.glaukuchet_lastvisit', Proc::Date));
$query->andFilterWhere(Proc::WhereConstruct($this, 'glaukuchets.glaukuchet_lastmetabol', Proc::Date));
$query->andFilterWhere(['LIKE', 'idperson.auth_user_fullname', $this->getAttribute('glaukuchets.idEmployee.idperson.auth_user_fullname')]);
$query->andFilterWhere(['LIKE', 'iddolzh.dolzh_name', $this->getAttribute('glaukuchets.idEmployee.iddolzh.dolzh_name')]);
$query->andFilterWhere(['LIKE', 'idpodraz.podraz_name', $this->getAttribute('glaukuchets.idEmployee.idpodraz.podraz_name')]);
$query->andFilterWhere(['LIKE', 'idbuild.build_name', $this->getAttribute('glaukuchets.idEmployee.idbuild.build_name')]);
$query->andFilterWhere(['LIKE', 'idClassMkb.code', $this->getAttribute('glaukuchets.idClassMkb.code')]);
$query->andFilterWhere(['LIKE', 'idClassMkb.name', $this->getAttribute('glaukuchets.idClassMkb.name')]);
$query->andFilterWhere(Proc::WhereConstruct($this, 'patient_lastchange', Proc::DateTime));
$query->andFilterWhere(['LIKE', 'patient_username', $this->getAttribute('patient_username')]);
$query->andFilterWhere(Proc::WhereConstruct($this, 'glaukuchets.glaukuchet_lastchange', Proc::DateTime));
$query->andFilterWhere(['LIKE', 'glaukuchets.glaukuchet_username', $this->getAttribute('glaukuchets.glaukuchet_username')]);
}
示例13: searchformaterialkarta
public function searchformaterialkarta($params)
{
$query = TrMatOsmotr::find();
$query->joinWith(['idTrMat.idMattraffic', 'idOsmotraktmat.idMaster.idperson', 'idOsmotraktmat.idMaster.iddolzh', 'idReason']);
$dataProvider = new ActiveDataProvider(['query' => $query, 'sort' => ['defaultOrder' => ['idOsmotraktmat.osmotraktmat_id' => SORT_DESC]]]);
$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(['idMattraffic.id_material' => $params['id']]);
$query->andFilterWhere(Proc::WhereConstruct($this, 'idOsmotraktmat.osmotraktmat_id'));
$query->andFilterWhere(Proc::WhereConstruct($this, 'idOsmotraktmat.osmotraktmat_date', Proc::Date));
$query->andFilterWhere(Proc::WhereConstruct($this, 'tr_mat_osmotr_number'));
$query->andFilterWhere(['LIKE', 'idReason.reason_text', $this->getAttribute('idReason.reason_text')]);
$query->andFilterWhere(['LIKE', 'tr_mat_osmotr_comment', $this->getAttribute('tr_mat_osmotr_comment')]);
$query->andFilterWhere(['LIKE', 'idperson.auth_user_fullname', $this->getAttribute('idOsmotraktmat.idMaster.idperson.auth_user_fullname')]);
$query->andFilterWhere(['LIKE', 'iddolzh.dolzh_name', $this->getAttribute('idOsmotraktmat.idMaster.iddolzh.dolzh_name')]);
Proc::AssignRelatedAttributes($dataProvider, ['idOsmotraktmat.osmotraktmat_id', 'idOsmotraktmat.osmotraktmat_date', 'idReason.reason_text', 'idOsmotraktmat.idMaster.idperson.auth_user_fullname', 'idOsmotraktmat.idMaster.iddolzh.dolzh_name']);
return $dataProvider;
}
示例14: 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;
}