Commit 4fb567cc authored by Deddy Vita Kurniawan's avatar Deddy Vita Kurniawan

* revisi Program Kerja Pengawasan, Kertas Kerja, Draft Temuan

parent 2f06cdaf
...@@ -318,7 +318,7 @@ class Kertas_kerja_model extends Base_Model ...@@ -318,7 +318,7 @@ class Kertas_kerja_model extends Base_Model
$this->db2->trans_begin(); $this->db2->trans_begin();
try { try {
$this->db2->select('1')->from('kertas_kerja')->where('id_kertas_kerja', $this->id); $this->db2->select('id_kertas_kerja')->from('kertas_kerja')->where('id_kertas_kerja', $this->id);
$rs = $this->db2->count_all_results(); $rs = $this->db2->count_all_results();
if ($rs > 0) if ($rs > 0)
{ {
......
...@@ -447,8 +447,8 @@ ...@@ -447,8 +447,8 @@
if (res.isSuccess) show_info(res.message, 'Sukses'); if (res.isSuccess) show_info(res.message, 'Sukses');
else show_error(res.message, 'Gagal'); else show_error(res.message, 'Gagal');
if (res.isSuccessSql) show_info(res.messageSql, 'Sukses'); //if (res.isSuccessSql) show_info(res.messageSql, 'Sukses');
else show_error(res.messageSql, 'Gagal'); //else show_error(res.messageSql, 'Gagal');
}, },
complete: function() { complete: function() {
App.processing(false); App.processing(false);
......
...@@ -2385,18 +2385,20 @@ class Pilih_dasar_model extends Pilih_Model ...@@ -2385,18 +2385,20 @@ class Pilih_dasar_model extends Pilih_Model
$temp = array(); $temp = array();
if($param['mode'] == 'kertas_kerja' && $param['kode'] == 'dibuat'){ if($param['mode'] == 'kertas_kerja' && $param['kode'] == 'dibuat'){
//$this->db->select('distinct cast(substring(pr.dilaksanakan from 1 for 2000) as varchar(2000)) dilaksanakan'); //$this->db->select('distinct cast(substring(pr.dilaksanakan from 1 for 2000) as varchar(2000)) dilaksanakan');
$this->db->select('distinct convert(pr.dilaksanakan using utf8) dilaksanakan'); $this->db->select('convert(pr.dilaksanakan using utf8) dilaksanakan');
$this->db->from('proker_pengawasan p'); $this->db->from('proker_pengawasan p');
$this->db->join('proker_pengawasan_rinci pr','pr.id_proker_pengawasan = p.id_proker_pengawasan'); $this->db->join('proker_pengawasan_rinci pr','pr.id_proker_pengawasan = p.id_proker_pengawasan');
$this->db->where('pr.dilaksanakan is not null'); $this->db->where('pr.dilaksanakan is not null');
$this->db->where('p.id_proker_pengawasan', $param['id_proker_pengawasan']); $this->db->where('p.id_proker_pengawasan', $param['id_proker_pengawasan']);
$this->db->where('p.id_surat', $param['id_surat']); $this->db->where('p.id_surat', $param['id_surat']);
//$this->db->where("cast(substring(pr.kkr from 1 for 2000) as varchar(2000)) containing '".$param['nomor_kkp']."'"); //$this->db->where("cast(substring(pr.kkr from 1 for 2000) as varchar(2000)) containing '".$param['nomor_kkp']."'");
$this->db->like('lower(convert(pr.kkr using utf8))', $param['nomor_kkp'], 'after'); //$this->db->like('lower(convert(pr.kkr using utf8))', $param['nomor_kkp'], 'after');
$this->db->like('lower(convert(pr.kkr using utf8))', $param['nomor_kkp']);
$rest = $this->db->get()->result_array(); $rest = $this->db->get()->result_array();
for($i=0;$i<count($rest);$i++){ for($i=0;$i<count($rest);$i++){
$exp = explode(';',$rest[$i]['DILAKSANAKAN']); $exp = explode(';',$rest[$i]['dilaksanakan']);
if(count($exp) == 1){ if(count($exp) == 1){
$new_str = trim($exp[0]); $new_str = trim($exp[0]);
if (!in_array($new_str, $temp)){ if (!in_array($new_str, $temp)){
...@@ -2632,16 +2634,16 @@ class Pilih_dasar_model extends Pilih_Model ...@@ -2632,16 +2634,16 @@ class Pilih_dasar_model extends Pilih_Model
($param['sort_by'] != null) ? $this->db->order_by($fieldmap[$param['sort_by']], $param['sort_direction']) : ''; ($param['sort_by'] != null) ? $this->db->order_by($fieldmap[$param['sort_by']], $param['sort_direction']) : '';
//$this->db->select('distinct cast(substring(pr.kkr from 1 for 2000) as varchar(2000)) kkr'); //$this->db->select('distinct cast(substring(pr.kkr from 1 for 2000) as varchar(2000)) kkr');
$this->db->select('distinct convert(pr.kkr using utf8) kkr'); $this->db->select('convert(pr.kkr using utf8) kkr');
$this->db->from('proker_pengawasan p'); $this->db->from('proker_pengawasan p');
$this->db->join('proker_pengawasan_rinci pr','pr.id_proker_pengawasan = p.id_proker_pengawasan'); $this->db->join('proker_pengawasan_rinci pr','pr.id_proker_pengawasan = p.id_proker_pengawasan');
$this->db->where('pr.kkr is not null'); $this->db->where('pr.kkr is not null');
$this->db->where('p.id_proker_pengawasan', $param['id_proker_pengawasan']); $this->db->where('p.id_proker_pengawasan', $param['id_proker_pengawasan']);
$this->db->where('p.id_surat', $param['id_surat']); $this->db->where('p.id_surat', $param['id_surat']);
$rest = $this->db->get()->result_array(); $rest = $this->db->get()->result_array();
for($i=0;$i<count($rest);$i++){ for($i=0;$i<count($rest);$i++){
$exp = explode(',',$rest[$i]['KKR']); $exp = explode(',',$rest[$i]['kkr']);
if(count($exp) == 1){ if(count($exp) == 1){
$new_str = trim($exp[0]); $new_str = trim($exp[0]);
if (!in_array($new_str, $temp)){ if (!in_array($new_str, $temp)){
......
...@@ -145,7 +145,7 @@ class Program_kerja_pengawasan_model extends Base_Model ...@@ -145,7 +145,7 @@ class Program_kerja_pengawasan_model extends Base_Model
$this->data_tim[$i]['no_urut'] = $nom; $this->data_tim[$i]['no_urut'] = $nom;
$idr = isset($this->data_tim[$i]['id_proker_pengawasan_rinci']) ? str_replace('new_', 0, $this->data_tim[$i]['id_proker_pengawasan_rinci']) : null; $idr = isset($this->data_tim[$i]['id_proker_pengawasan_rinci']) ? str_replace('new_', 0, $this->data_tim[$i]['id_proker_pengawasan_rinci']) : null;
$this->db->select('1')->from('proker_pengawasan_rinci')->where('id_proker_pengawasan', $this->id)->where('id_proker_pengawasan_rinci', $idr); $this->db->select('id_proker_pengawasan')->from('proker_pengawasan_rinci')->where('id_proker_pengawasan', $this->id)->where('id_proker_pengawasan_rinci', $idr);
$rs = $this->db->get()->row_array(); $rs = $this->db->get()->row_array();
if ($rs){ if ($rs){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment