|
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.dat_op_induk".
*
* The followings are the available columns in table 'pbb.dat_op_induk':
* @property string $kd_propinsi
* @property string $kd_dati2
* @property string $kd_kecamatan
* @property string $kd_kelurahan
* @property string $kd_blok
* @property string $no_urut
* @property string $kd_jns_op
* @property integer $createdby
* @property string $createdtime
* @property integer $updatedby
* @property string $updatedtime
*/
class DatOpInduk extends CBhumieRecord
{
/**
* Returns the static model of the specified AR class.
* @param string $className active record class name.
* @return DatOpInduk 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.dat_op_induk';
}
/**
* @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_propinsi, kd_dati2, kd_kecamatan, kd_kelurahan, kd_blok, no_urut, kd_jns_op', 'required'),
//array('createdby, updatedby', 'numerical', 'integerOnly'=>true),
array('kd_propinsi, kd_dati2', 'length', 'max'=>2),
array('kd_kecamatan, kd_kelurahan, kd_blok', 'length', 'max'=>3),
array('no_urut', 'length', 'max'=>4),
array('kd_jns_op', 'length', 'max'=>1),
// The following rule is used by search().
// Please remove those attributes that should not be searched.
array('kd_propinsi, kd_dati2, kd_kecamatan, kd_kelurahan, kd_blok, no_urut, kd_jns_op', 'safe', 'on'=>'search'),
// array('kd_propinsi, kd_dati2, kd_kecamatan, kd_kelurahan, kd_blok, no_urut, kd_jns_op, createdby, createdtime, updatedby, updatedtime', '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(
);
}
/**
* @return array customized attribute labels (name=>label)
*/
public function attributeLabels()
{
return array(
'kd_propinsi' => 'Kd Propinsi',
'kd_dati2' => 'Kd Dati2',
'kd_kecamatan' => 'Kd Kecamatan',
'kd_kelurahan' => 'Kd Kelurahan',
'kd_blok' => 'Kd Blok',
'no_urut' => 'No Urut',
'kd_jns_op' => 'Kd Jns Op',
'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_propinsi',$this->kd_propinsi,true);
$criteria->compare('kd_dati2',$this->kd_dati2,true);
$criteria->compare('kd_kecamatan',$this->kd_kecamatan,true);
$criteria->compare('kd_kelurahan',$this->kd_kelurahan,true);
$criteria->compare('kd_blok',$this->kd_blok,true);
$criteria->compare('no_urut',$this->no_urut,true);
$criteria->compare('kd_jns_op',$this->kd_jns_op,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,
));
}
public function qryPropObjPjk($txt_kd_propinsi, $txt_kd_dati2, $txt_kd_kecamatan, $txt_kd_kelurahan)
{
$qryPropObjPjk = 'SELECT COUNT(kd_propinsi) as nprop
FROM pbb.dat_objek_pajak
WHERE kd_propinsi = :txt_kd_propinsi
AND kd_dati2 = :txt_kd_dati2
AND kd_kecamatan = :txt_kd_kecamatan';
if($txt_kd_kelurahan!=""){
$qryPropObjPjk = $qryPropObjPjk.' AND kd_kelurahan = :txt_kd_kelurahan';
}
$command = Yii::app()->db->createCommand($qryPropObjPjk);
$command->bindParam(":txt_kd_propinsi",$txt_kd_propinsi,PDO::PARAM_STR);
$command->bindParam(":txt_kd_dati2",$txt_kd_dati2,PDO::PARAM_STR);
$command->bindParam(":txt_kd_kecamatan",$txt_kd_kecamatan,PDO::PARAM_STR);
if($txt_kd_kelurahan!=""){
$command->bindParam(":txt_kd_kelurahan",$txt_kd_kelurahan,PDO::PARAM_STR);
}
$data = $command->queryAll();
return $data[0]['nprop'];
}
public function qryPropSbjPjk($txt_kd_propinsi, $txt_kd_dati2, $txt_kd_kecamatan, $txt_kd_kelurahan)
{
$qryPropSbjPjk = 'SELECT COUNT(kd_propinsi) as nprop
FROM pbb.dat_op_induk
WHERE kd_propinsi = :txt_kd_propinsi
AND kd_dati2 = :txt_kd_dati2
AND kd_kecamatan = :txt_kd_kecamatan
AND kd_kelurahan = :txt_kd_kelurahan';
$command = Yii::app()->db->createCommand($qryPropSbjPjk);
$command->bindParam(":txt_kd_propinsi",$txt_kd_propinsi,PDO::PARAM_STR);
$command->bindParam(":txt_kd_dati2",$txt_kd_dati2,PDO::PARAM_STR);
$command->bindParam(":txt_kd_kecamatan",$txt_kd_kecamatan,PDO::PARAM_STR);
$command->bindParam(":txt_kd_kelurahan",$txt_kd_kelurahan,PDO::PARAM_STR);
$data = $command->queryAll();
return $data[0]['nprop'];
}
public function qryDatObjekPajak($txt_kd_propinsi, $txt_kd_dati2, $txt_kd_kecamatan, $txt_kd_kelurahan)
{
$qryDatObjekPajak = 'SELECT kd_propinsi,kd_dati2,kd_kecamatan,kd_kelurahan,kd_blok,no_urut,kd_jns_op
FROM pbb.dat_objek_pajak
WHERE kd_propinsi = :txt_kd_propinsi
AND kd_dati2 = :txt_kd_dati2
AND kd_kecamatan = :txt_kd_kecamatan';
if($txt_kd_kelurahan!=""){
$qryDatObjekPajak = $qryDatObjekPajak." AND kd_kelurahan = :txt_kd_kelurahan";
}
$qryDatObjekPajak = $qryDatObjekPajak." ORDER BY kd_propinsi, kd_dati2, kd_kecamatan, kd_kelurahan, kd_blok, no_urut, kd_jns_op";
$command = Yii::app()->db->createCommand($qryDatObjekPajak);
$command->bindParam(":txt_kd_propinsi",$txt_kd_propinsi,PDO::PARAM_STR);
$command->bindParam(":txt_kd_dati2",$txt_kd_dati2,PDO::PARAM_STR);
$command->bindParam(":txt_kd_kecamatan",$txt_kd_kecamatan,PDO::PARAM_STR);
if($txt_kd_kelurahan!=""){
$command->bindParam(":txt_kd_kelurahan",$txt_kd_kelurahan,PDO::PARAM_STR);
}
$data = $command->queryAll();
return $data;
}
public function qryDatOpInduk($txt_kd_propinsi, $txt_kd_dati2, $txt_kd_kecamatan, $txt_kd_kelurahan)
{
$qryDatOpInduk = ' SELECT kd_propinsi, kd_dati2, kd_kecamatan, kd_kelurahan, kd_blok, no_urut, kd_jns_op
FROM pbb.dat_op_induk
WHERE kd_propinsi = :txt_kd_propinsi
AND kd_dati2 = :txt_kd_dati2
AND kd_kecamatan = :txt_kd_kecamatan
AND kd_kelurahan = :txt_kd_kelurahan
ORDER BY kd_propinsi, kd_dati2, kd_kecamatan, kd_kelurahan, kd_blok, no_urut, kd_jns_op';
$command = Yii::app()->db->createCommand($qryDatOpInduk);
$command->bindParam(":txt_kd_propinsi",$txt_kd_propinsi,PDO::PARAM_STR);
$command->bindParam(":txt_kd_dati2",$txt_kd_dati2,PDO::PARAM_STR);
$command->bindParam(":txt_kd_kecamatan",$txt_kd_kecamatan,PDO::PARAM_STR);
$command->bindParam(":txt_kd_kelurahan",$txt_kd_kelurahan,PDO::PARAM_STR);
$data = $command->queryAll();
return $data;
}
public function penentuanNjopBumi($vlc_kd_propinsi, $vlc_kd_dati2, $vlc_kd_kecamatan, $vlc_kd_kelurahan, $vlc_kd_blok, $vlc_no_urut, $vlc_kd_jns_op, $txt_thn_pajak)
{
$qryfunc='SELECT * FROM pbb.PENENTUAN_NJOP_BUMI(\'%s\',\'%s\',\'%s\',\'%s\',\'%s\',\'%s\',\'%s\',\'%s\',%d)';
$data = Yii::app()->db->createCommand(sprintf($qryfunc,$vlc_kd_propinsi,
$vlc_kd_dati2,
$vlc_kd_kecamatan,
$vlc_kd_kelurahan,
$vlc_kd_blok,
$vlc_no_urut,
$vlc_kd_jns_op,
$txt_thn_pajak,
1))->queryAll();
return $data[0]['penentuan_njop_bumi'];
}
public function penentuanNjopBng($vlc_kd_propinsi, $vlc_kd_dati2, $vlc_kd_kecamatan, $vlc_kd_kelurahan, $vlc_kd_blok, $vlc_no_urut, $vlc_kd_jns_op, $txt_thn_pajak)
{
$qryfunc='SELECT * FROM pbb.PENENTUAN_NJOP_BNG(\'%s\',\'%s\',\'%s\',\'%s\',\'%s\',\'%s\',\'%s\',\'%s\',%d)';
$data = Yii::app()->db->createCommand(sprintf($qryfunc,$vlc_kd_propinsi,
$vlc_kd_dati2,
$vlc_kd_kecamatan,
$vlc_kd_kelurahan,
$vlc_kd_blok,
$vlc_no_urut,
$vlc_kd_jns_op,
$txt_thn_pajak,
1))->queryAll();
return $data[0]['penentuan_njop_bng'];
}
public function penilaianOpAnggotaMasal($vlc_kd_propinsi, $vlc_kd_dati2, $vlc_kd_kecamatan, $vlc_kd_kelurahan, $vlc_kd_blok, $vlc_no_urut, $vlc_kd_jns_op, $txt_thn_pajak)
{
$qryfunc='SELECT * FROM pbb.PENILAIAN_OP_ANGGOTA_MASSAL(\'%s\',\'%s\',\'%s\',\'%s\',\'%s\',\'%s\',\'%s\',\'%s\',%d)';
$data = Yii::app()->db->createCommand(sprintf($qryfunc,$vlc_kd_propinsi,
$vlc_kd_dati2,
$vlc_kd_kecamatan,
$vlc_kd_kelurahan,
$vlc_kd_blok,
$vlc_no_urut,
$vlc_kd_jns_op,
$txt_thn_pajak,
1))->queryAll();
return $data[0]['penilaian_op_anggota_massal'];
}
public function qryOpInduk($txt_kd_propinsi, $txt_kd_dati2, $txt_kd_kecamatan, $txt_kd_kelurahan)
{
$qryPropSbjPjk = 'SELECT COUNT(kd_propinsi) as nprop
FROM pbb.dat_op_induk
WHERE kd_propinsi = :txt_kd_propinsi
AND kd_dati2 = :txt_kd_dati2
AND kd_kecamatan = :txt_kd_kecamatan
AND kd_kelurahan = :txt_kd_kelurahan';
$command = Yii::app()->db->createCommand($qryPropSbjPjk);
$command->bindParam(":txt_kd_propinsi",$txt_kd_propinsi,PDO::PARAM_STR);
$command->bindParam(":txt_kd_dati2",$txt_kd_dati2,PDO::PARAM_STR);
$command->bindParam(":txt_kd_kecamatan",$txt_kd_kecamatan,PDO::PARAM_STR);
$command->bindParam(":txt_kd_kelurahan",$txt_kd_kelurahan,PDO::PARAM_STR);
$data = $command->queryAll();
return $data[0]['nprop'];
}
}