|
Server IP : 127.0.0.1 / Your IP : 127.0.0.1 Web Server : Apache/2.4.10 (Win32) OpenSSL/1.0.1i PHP/5.6.3 System : Windows NT WIN-R7LTCC7BPLI 6.3 build 9200 (Windows Server 2012 R2 Datacenter Edition) i586 User : GerbangSIPAD ( 0) PHP Version : 5.6.3 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF Directory (0777) : C:/xampp5/htdocs/bhumie/upload/../protected/models/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
/**
* This is the model class for table "pbb.pst_detail".
*
* The followings are the available columns in table 'pbb.pst_detail':
* @property string $kd_kanwil
* @property string $kd_kantor
* @property string $thn_pelayanan
* @property string $bundel_pelayanan
* @property string $no_urut_pelayanan
* @property string $kd_propinsi_pemohon
* @property string $kd_dati2_pemohon
* @property string $kd_kecamatan_pemohon
* @property string $kd_kelurahan_pemohon
* @property string $kd_blok_pemohon
* @property string $no_urut_pemohon
* @property string $kd_jns_op_pemohon
* @property string $kd_jns_pelayanan
* @property string $thn_pajak_permohonan
* @property string $nama_penerima
* @property string $catatan_penyerahan
* @property integer $status_selesai
* @property string $tgl_selesai
* @property string $kd_seksi_berkas
* @property string $tgl_penyerahan
* @property string $nip_penyerah
* @property integer $createdby
* @property string $createdtime
* @property integer $updatedby
* @property string $updatedtime
*/
class PstDetail extends CBhumieRecord {
/**
* Returns the static model of the specified AR class.
* @param string $className active record class name.
* @return PstDetail the static model class
*/
public static function model($className=__CLASS__) {
return parent::model($className);
}
/**
* @return string the associated database table name
*/
public function tableName() {
return 'pbb.pst_detail';
}
/**
* @return array validation rules for model attributes.
*/
public function rules() {
// NOTE: you should only define rules for those attributes that
// will receive user inputs.
return array(
//array('kd_kanwil, kd_kantor, thn_pelayanan, bundel_pelayanan, no_urut_pelayanan, kd_propinsi_pemohon, kd_dati2_pemohon, kd_kecamatan_pemohon, kd_kelurahan_pemohon, kd_blok_pemohon, no_urut_pemohon, kd_jns_op_pemohon, kd_jns_pelayanan, thn_pajak_permohonan, tgl_selesai, kd_seksi_berkas, createdby, createdtime, updatedby, updatedtime', 'required'),
array('kd_kanwil, kd_kantor, thn_pelayanan, bundel_pelayanan, no_urut_pelayanan, kd_propinsi_pemohon, kd_dati2_pemohon, kd_kecamatan_pemohon, kd_kelurahan_pemohon, kd_blok_pemohon, no_urut_pemohon, kd_jns_op_pemohon, kd_jns_pelayanan, thn_pajak_permohonan, tgl_selesai, kd_seksi_berkas', 'required'),
//array('status_selesai, createdby, updatedby', 'numerical', 'integerOnly'=>true),
array('kd_kanwil, kd_kantor, kd_propinsi_pemohon, kd_dati2_pemohon, kd_jns_pelayanan, kd_seksi_berkas', 'length', 'max' => 2),
array('thn_pelayanan, bundel_pelayanan, no_urut_pemohon, thn_pajak_permohonan', 'length', 'max' => 4),
array('no_urut_pelayanan, kd_kecamatan_pemohon, kd_kelurahan_pemohon, kd_blok_pemohon', 'length', 'max' => 3),
array('kd_jns_op_pemohon', 'length', 'max' => 1),
array('nama_penerima', 'length', 'max' => 30),
array('catatan_penyerahan', 'length', 'max' => 75),
array('nip_penyerah', 'length', 'max' => 18),
array('tgl_penyerahan', 'safe'),
// The following rule is used by search().
// Please remove those attributes that should not be searched.
array('kd_kanwil, kd_kantor, thn_pelayanan, bundel_pelayanan, no_urut_pelayanan, kd_propinsi_pemohon, kd_dati2_pemohon, kd_kecamatan_pemohon, kd_kelurahan_pemohon, kd_blok_pemohon, no_urut_pemohon, kd_jns_op_pemohon, kd_jns_pelayanan, thn_pajak_permohonan, nama_penerima, catatan_penyerahan, status_selesai, tgl_selesai, kd_seksi_berkas, tgl_penyerahan, nip_penyerah, createdby, createdtime, updatedby, updatedtime', 'safe', 'on' => 'search'),
//array('kd_kanwil, kd_kantor, thn_pelayanan, bundel_pelayanan, no_urut_pelayanan, kd_propinsi_pemohon, kd_dati2_pemohon, kd_kecamatan_pemohon, kd_kelurahan_pemohon, kd_blok_pemohon, no_urut_pemohon, kd_jns_op_pemohon, kd_jns_pelayanan, thn_pajak_permohonan, nama_penerima, catatan_penyerahan, status_selesai, tgl_selesai, kd_seksi_berkas, tgl_penyerahan, nip_penyerah', 'safe', 'on'=>'search'),
);
}
/**
* @return array relational rules.
*/
public function relations() {
// NOTE: you may need to adjust the relation name and the related
// class name for the relations automatically generated below.
return array(
'refJnsPelayanan' => array(self::BELONGS_TO, 'RefJnsPelayanan', 'kd_jns_pelayanan'),
);
}
/**
* @return array customized attribute labels (name=>label)
*/
public function attributeLabels() {
return array(
'kd_kanwil' => 'Kd Kanwil',
'kd_kantor' => 'Kd Kantor',
'thn_pelayanan' => 'Thn Pelayanan',
'bundel_pelayanan' => 'Bundel Pelayanan',
'no_urut_pelayanan' => 'No Urut Pelayanan',
'kd_propinsi_pemohon' => 'Kd Propinsi Pemohon',
'kd_dati2_pemohon' => 'Kd Dati2 Pemohon',
'kd_kecamatan_pemohon' => 'Kd Kecamatan Pemohon',
'kd_kelurahan_pemohon' => 'Kd Kelurahan Pemohon',
'kd_blok_pemohon' => 'Kd Blok Pemohon',
'no_urut_pemohon' => 'No Urut Pemohon',
'kd_jns_op_pemohon' => 'Kd Jns Op Pemohon',
'kd_jns_pelayanan' => 'Kd Jns Pelayanan',
'thn_pajak_permohonan' => 'Tahun Pajak :',
'nama_penerima' => 'Nama Penerima :',
'catatan_penyerahan' => 'Catatan Penyerahan',
'status_selesai' => 'Status Selesai',
'tgl_selesai' => 'Tgl Selesai',
'kd_seksi_berkas' => 'Kd Seksi Berkas',
'tgl_penyerahan' => 'Tgl Penyerahan',
'nip_penyerah' => 'Nip Penyerah',
'createdby' => 'Createdby',
'createdtime' => 'Createdtime',
'updatedby' => 'Updatedby',
'updatedtime' => 'Updatedtime',
);
}
/**
* Retrieves a list of models based on the current search/filter conditions.
* @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions.
*/
public function search() {
// Warning: Please modify the following code to remove attributes that
// should not be searched.
$criteria = new CDbCriteria;
$criteria->compare('kd_kanwil', $this->kd_kanwil, true);
$criteria->compare('kd_kantor', $this->kd_kantor, true);
$criteria->compare('thn_pelayanan', $this->thn_pelayanan, true);
$criteria->compare('bundel_pelayanan', $this->bundel_pelayanan, true);
$criteria->compare('no_urut_pelayanan', $this->no_urut_pelayanan, true);
$criteria->compare('kd_propinsi_pemohon', $this->kd_propinsi_pemohon, true);
$criteria->compare('kd_dati2_pemohon', $this->kd_dati2_pemohon, true);
$criteria->compare('kd_kecamatan_pemohon', $this->kd_kecamatan_pemohon, true);
$criteria->compare('kd_kelurahan_pemohon', $this->kd_kelurahan_pemohon, true);
$criteria->compare('kd_blok_pemohon', $this->kd_blok_pemohon, true);
$criteria->compare('no_urut_pemohon', $this->no_urut_pemohon, true);
$criteria->compare('kd_jns_op_pemohon', $this->kd_jns_op_pemohon, true);
$criteria->compare('kd_jns_pelayanan', $this->kd_jns_pelayanan, true);
$criteria->compare('thn_pajak_permohonan', $this->thn_pajak_permohonan, true);
$criteria->compare('nama_penerima', $this->nama_penerima, true);
$criteria->compare('catatan_penyerahan', $this->catatan_penyerahan, true);
$criteria->compare('status_selesai', $this->status_selesai);
$criteria->compare('tgl_selesai', $this->tgl_selesai, true);
$criteria->compare('kd_seksi_berkas', $this->kd_seksi_berkas, true);
$criteria->compare('tgl_penyerahan', $this->tgl_penyerahan, true);
$criteria->compare('nip_penyerah', $this->nip_penyerah, true);
$criteria->compare('createdby', $this->createdby);
$criteria->compare('createdtime', $this->createdtime, true);
$criteria->compare('updatedby', $this->updatedby);
$criteria->compare('updatedtime', $this->updatedtime, true);
return new CActiveDataProvider($this, array(
'criteria' => $criteria,
));
}
/******* search berkas by @adhitya_RD07 *******/
public function searchBerkasSelesai() {
$criteria = new CDbCriteria;
$criteria->alias = 'p';
$criteria->select = 'p.kd_propinsi_pemohon, p.kd_dati2_pemohon, p.kd_kecamatan_pemohon, p.kd_kelurahan_pemohon, p.kd_blok_pemohon, p.no_urut_pemohon, p.kd_jns_op_pemohon, p.kd_jns_pelayanan';
//$criteria->condition = 'p.kd_kanwil=\''.$this->kd_kanwil.'\' AND p.kd_kantor=\''.$this->kd_kantor.'\' AND p.thn_pelayanan=\''.$this->thn_pelayanan.'\' AND p.bundel_pelayanan=\''.$this->bundel_pelayanan.'\' AND p.no_urut_pelayanan=\''.$this->no_urut_pelayanan.'\' AND p.status_selesai <> 2';
$criteria->condition = 'p.kd_kanwil=:kdKanwil AND p.kd_kantor=:kdKantor AND p.thn_pelayanan=:thnPelayanan AND p.bundel_pelayanan=:bundelPelayanan AND p.no_urut_pelayanan=:noUrutPelayanan AND p.status_selesai <> 2';
$criteria->order = 'p.kd_kecamatan_pemohon, p.kd_kelurahan_pemohon, p.kd_blok_pemohon, p.no_urut_pemohon, p.kd_jns_op_pemohon ASC';
$criteria->params = array(':kdKanwil' => $this->kd_kanwil, ':kdKantor' => $this->kd_kantor, ':thnPelayanan' => $this->thn_pelayanan, ':bundelPelayanan' => $this->bundel_pelayanan, ':noUrutPelayanan' => $this->no_urut_pelayanan);
return new CActiveDataProvider(get_class($this), array(
'criteria' => $criteria,
));
}
/* public function searchNmrPelayanan()
{
//$kd_propinsi = Yii::app()->globalvar->getKodePropinsi();
// $kd_dati2 = Yii::app()->globalvar->getKodeDati2();
$PstDetail = $_GET['PstDetail']
$kd_propinsi = $PstDetail['kd_propinsi_pemohon'];
$kd_dati2 = $PstDetail['kd_dati2_pemohon'];
$kd_kecamatan = $PstDetail['kd_kecamatan_pemohon'];
$kd_kelurahan = $PstDetail['kd_kelurahan_pemohon'];
$kd_blok = $PstDetail['kd_blok_pemohon'];
$no_urut = $PstDetail['no_urut_pemohon'];
$kd_jns_op = $PstDetail['kd_jns_op_pemohon'];
$criteria = new CDbCriteria;
$criteria->alias = 'a';
$criteria->select = 'a.thn_pelayanan, a.bundel_pelayanan, a.no_urut_pelayanan, a.thn_pajak_permohonan, a.kd_jns_pelayanan';
$criteria->join = 'pbb.ref_jns_pelayanan b on a.kd_jns_pelayanan = b.kd_jns_pelayanan';
$criteria->condition = 'a.kd_propinsi_pemohon=\''.$kd_propinsi.'\' AND a.kd_dati2_pemohon=\''.$kd_dati2.'\' AND a.kd_kecamatan_pemohon=\''.$kd_kecamatan.'\' AND a.kd_kelurahan_pemohon=\''.$kd_kelurahan.'\' AND a.kd_blok_pemohon=\''.$kd_blok.'\' AND a.no_urut_pemohon=\''.$no_urut.'\' AND a.kd_jns_op_pemohon=\''.$kd_jns_op.'\'';
return new CActiveDataProvider($this, array(
'criteria'=>$criteria,
));
} */
/* public function searchNmrPelayanan()
{
/*$kd_propinsi_pemohon = $_POST['kd_propinsi_pemohon'];
$kd_dati2_pemohon = $_POST['kd_dati2_pemohon'];
$kd_kecamatan_pemohon = $_POST['kd_kecamatan_pemohon'];
$kd_kelurahan_pemohon = $_POST['kd_kelurahan_pemohon'];
$kd_blok_pemohon = $_POST['kd_blok_pemohon'];
$no_urut_pemohon = $_POST['no_urut_pemohon'];
$kd_jns_op_pemohon = $_POST['kd_jns_op_pemohon']; */
//var_dump($kd_propinsi_pemohon);exit;
//$kd_propinsi_pemohon==null?0:$kd_propinsi_pemohon;
/* $criteria = new CDbCriteria;
$criteria->alias = 'a';
$criteria->select = 'a.thn_pelayanan, a.bundel_pelayanan, a.no_urut_pelayanan, a.thn_pajak_permohonan, a.kd_jns_pelayanan, b.nm_jenis_pelayanan';
$criteria->join = 'left join pbb.ref_jns_pelayanan b on a.kd_jns_pelayanan = b.kd_jns_pelayanan';
$criteria->condition = 'a.kd_propinsi_pemohon = "'.$kd_propinsi_pemohon.'" and a.kd_dati2_pemohon = "'.$kd_dati2_pemohon.'" and a.kd_kecamatan_pemohon = "'.$kd_kecamatan_pemohon.'" and a.kd_kelurahan_pemohon = "'.$kd_kelurahan_pemohon.'" and a.kd_blok_pemohon = "'.$kd_blok_pemohon.'" and a.no_urut_pemohon = "'.$no_urut_pemohon.'" and a.kd_jns_op_pemohon = "'.$kd_jns_op_pemohon.'"';
//var_dump($criteria);exit;
//$sql = array();
//$sql = 'select a.thn_pelayanan, a.bundel_pelayanan, a.no_urut_pelayanan, a.thn_pajak_permohonan, a.kd_jns_pelayanan, b.nm_jenis_pelayanan from pbb.pst_detail a left join pbb.ref_jns_pelayanan b on a.kd_jns_pelayanan = b.kd_jns_pelayanan';
//$sql .= 'where a.kd_propinsi_pemohon = "'.$kd_propinsi_pemohon.'" and a.kd_dati2_pemohon = "'.$kd_dati2_pemohon.'" and a.kd_kecamatan_pemohon = "'.$kd_kecamatan_pemohon.'" and a.kd_kelurahan_pemohon = "'.$kd_kelurahan_pemohon.'" and a.kd_blok_pemohon = "'.$kd_blok_pemohon.'" and a.no_urut_pemohon = "'.$no_urut_pemohon.'" and a.kd_jns_op_pemohon = "'.$kd_jns_op_pemohon.'"';
$criteria->compare('kd_propinsi_pemohon',$this->kd_propinsi_pemohon,true);
$criteria->compare('kd_dati2_pemohon',$this->kd_dati2_pemohon,true);
$criteria->compare('kd_kecamatan_pemohon',$this->kd_kecamatan_pemohon,true);
$criteria->compare('kd_kelurahan_pemohon',$this->kd_kelurahan_pemohon,true);
$criteria->compare('kd_blok_pemohon',$this->kd_blok_pemohon,true);
$criteria->compare('no_urut_pemohon',$this->no_urut_pemohon,true);
$criteria->compare('kd_jns_op_pemohon',$this->kd_jns_op_pemohon,true);
//var_dump($sql);
//return new CArrayDataProvider($sql,array('keyField'=>'thn_pelayanan'));
return new CActiveDataProvider($this, array(
'criteria'=>$criteria,
));
} */
}