Exemplo n.º 1
0
 function actionSubmit2()
 {
     $ncli = Yii::$app->getRequest()->getQueryParam('ncli');
     $produk = Yii::$app->getRequest()->getQueryParam('produk');
     $model = new Dataprospek();
     if (isset($ncli)) {
         $id = $ncli;
         $paket = $produk;
         $data = $model->find()->select(['CLIENT_NAME', 'REGIONAL', 'WITEL', 'NOTEL_SPD', 'NCLI'])->where(['NCLI' => $id])->all();
     } else {
         $paket = $_POST['produk'];
         $id = $_POST['id'];
         $data = $model->find()->select(['CLIENT_NAME', 'REGIONAL', 'WITEL', 'NOTEL_SPD', 'NCLI'])->where(['NOTEL_SPD' => $id])->all();
     }
     return $this->render('submit2', ['data' => $data, 'id' => $id, 'paket' => $paket]);
 }
Exemplo n.º 2
0
 public function actionOffercampaign()
 {
     $connection = \Yii::$app->db;
     set_time_limit(0);
     $query = Dataprospek::find();
     $pagination = new Pagination(['defaultPageSize' => 10, 'totalCount' => $query->count()]);
     $title = "Data Jumlah Pelangggan";
     $lengkap = Dataprospek::find()->select(['CLIENT_NAME', 'REGIONAL', 'AD_STREET', 'AD_STNUMBER', 'AD_DISTRICT', 'CITY', 'NCLI', 'NOTEL_TLP', 'R2BB'])->offset($pagination->offset)->limit($pagination->limit)->all();
     $reg = "SELECT REGIONAL from DATA_PROSPEK where REGIONAL is not null  group by REGIONAL order by REGIONAL ASC";
     $regional = $connection->createCommand($reg)->query();
     $wit = "SELECT WITEL from DATA_PROSPEK  group by WITEL order by WITEL ASC";
     $witel = $connection->createCommand($wit)->query();
     $jar = "SELECT TYPE_JARINGAN from DATA_PROSPEK WHERE TYPE_JARINGAN is not null group by TYPE_JARINGAN order by TYPE_JARINGAN ASC";
     $jaringan = $connection->createCommand($jar)->query();
     //$leng="SELECT * from DATA_PROSPEK WHERE ROWNUM<=50 ORDER BY CLIENT_NAME ASC";  	$lengkap=$connection->createCommand($leng)->query();
     return $this->render('offering_campaign', ['data_lengkap' => $lengkap, 'regional' => $regional, 'witel' => $witel, 'jaringan' => $jaringan, 'pagination' => $pagination, 'offset' => $pagination->offset, 'title' => $title]);
 }