Merge branch 'adminapi' into 'master'
Adminapi See merge request online-sistem1/api_arrahn!141
This commit is contained in:
@@ -22,7 +22,11 @@ use App\BajetTahunan;
|
||||
use App\Blacklist;
|
||||
use App\Pelelong;
|
||||
use App\Mohon;
|
||||
|
||||
use App\Pengesahan;
|
||||
use App\Permohonan;
|
||||
use App\Status;
|
||||
use App\LookupStatus;
|
||||
use App\KPFiles;
|
||||
|
||||
use DB;
|
||||
use Carbon\Carbon;
|
||||
@@ -1666,6 +1670,18 @@ class AdminPageController extends Controller
|
||||
return response()->json($detailslelong, 200);
|
||||
}
|
||||
|
||||
public function UpdateNotisLelong2($kodcaw,Request $request){
|
||||
|
||||
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$kodcaw)->first();
|
||||
|
||||
$detailslelong = Pelelong::on($cawangan['mysql'])->
|
||||
update(array(
|
||||
'para3'=>$request->content
|
||||
));
|
||||
|
||||
return response()->json($detailslelong, 200);
|
||||
}
|
||||
|
||||
public function paginate($items, $perPage = 5, $page = null, $options = [])
|
||||
{
|
||||
$page = $page ?: (Paginator::resolveCurrentPage() ?: 1);
|
||||
@@ -1681,19 +1697,28 @@ class AdminPageController extends Controller
|
||||
$cawangan_all = Cawangan::on('mysql7')->get();
|
||||
$arraykelulusan = [];
|
||||
|
||||
foreach($cawangan_all as $index=>$cawangan){
|
||||
$kelulusan=Mohon::on($cawangan['mysql'])
|
||||
foreach($cawangan_all as $index=>$cawangan){
|
||||
$kelulusan=Mohon::on($cawangan['mysql'])
|
||||
->where('tarikh','=',$harini->toDateString())
|
||||
->where('masalulus','=','')
|
||||
->where('pelulus','=','operasi')
|
||||
->get();
|
||||
->get()->toArray();
|
||||
|
||||
if(sizeof($kelulusan) != 0){
|
||||
array_push($arraykelulusan,["kelulusanall" => $kelulusan,"cawangan" => $cawangan['details_caw'],"cawangankod" => $cawangan['kodcaw']]);
|
||||
foreach($kelulusan as $index=>$kel)
|
||||
{
|
||||
$kelulusan[$index]['cawangan'] = $cawangan['details_caw'];
|
||||
$kelulusan[$index]['cawangankod'] = $cawangan['kodcaw'];
|
||||
array_push($arraykelulusan,$kelulusan[$index]);
|
||||
}
|
||||
// $arraykelulusan += $kelulusan;
|
||||
// array_push($arraykelulusan,$kelulusan);
|
||||
// $arraykelulusan += $kelulusan;
|
||||
// array_push($arraykelulusan,["kelulusanall" => $kelulusan,"cawangan" => $cawangan['details_caw'],"cawangankod" => $cawangan['kodcaw']]);
|
||||
}
|
||||
}
|
||||
|
||||
$data = $this->paginate($arraykelulusan);
|
||||
|
||||
$data = $this->paginate($arraykelulusan,3);
|
||||
|
||||
return response()->json($data,200);
|
||||
}
|
||||
@@ -1802,4 +1827,442 @@ class AdminPageController extends Controller
|
||||
|
||||
return response()->json($data);
|
||||
}
|
||||
|
||||
public function TambahPermohonan(Request $request,$kodcaw)
|
||||
{
|
||||
|
||||
$timeloni = Carbon::now();
|
||||
$current = new Carbon();
|
||||
$curent_year = substr($current->year,2,2);
|
||||
$curent_month = sprintf("%02d", $current->month);
|
||||
$current_day = sprintf("%02d", $current->day);
|
||||
|
||||
try {
|
||||
$permohonan = new Permohonan;
|
||||
$pengesahan = new Pengesahan;
|
||||
$status = new Status;
|
||||
|
||||
$nopermohonan = 'AR' . strtoupper($kodcaw) . $curent_year . $curent_month . $current_day . '-000' .rand(1,9);
|
||||
|
||||
$permohonan->kodcaw = $kodcaw;
|
||||
$permohonan->jenismohon = $request->jenismohon;
|
||||
$permohonan->baki_petibesi = $request->bakipetibesi;
|
||||
$permohonan->amaun_mohon = $request->jumlahmohon;
|
||||
$permohonan->nama_pemohon = $request->namapemohon;
|
||||
$permohonan->tarikh_permohonan = $request->tarikhmohon;
|
||||
$permohonan->outstandingsemasa = $request->outstanding;
|
||||
$permohonan->nopermohonan = $nopermohonan;
|
||||
$permohonan->save();
|
||||
|
||||
|
||||
$pengesahan->mohonid = $permohonan->id;
|
||||
$pengesahan->kodcaw = $kodcaw;
|
||||
$pengesahan->save();
|
||||
|
||||
$status->mohonid = $permohonan->id;
|
||||
$status->statusid = 1;
|
||||
$status->tarikhmasa = $timeloni->toDateTimeString();
|
||||
$status->save();
|
||||
|
||||
return response(1);
|
||||
|
||||
} catch (\Throwable $e) {
|
||||
return response($e);
|
||||
}
|
||||
}
|
||||
|
||||
public function GetRekodPermohonanCawangan($kodcaw)
|
||||
{
|
||||
if($kodcaw === 'admin')
|
||||
{
|
||||
$listpermohonan = Permohonan::join('pengesahan', 'permohonan.mohonid', '=', 'pengesahan.mohonid')
|
||||
->where('tagterima',1)
|
||||
->orWhere('tagoperasi','=',2)
|
||||
->orWhere('tagakaun','=',2)
|
||||
->orWhere('tagpb','=',2)
|
||||
->orWhere('tagdeposit','=',2)
|
||||
->orWhere('tagprint','=',2)
|
||||
->orWhere([['tagcit', 1],['jenismohon','bayaranbalik'],['tagakaun',1]])
|
||||
->orderBy('tarikh_permohonan','desc')->paginate(5);
|
||||
|
||||
}else{
|
||||
$listpermohonan = Permohonan::join('pengesahan', 'permohonan.mohonid', '=', 'pengesahan.mohonid')
|
||||
->where('pengesahan.kodcaw', $kodcaw)
|
||||
->where('tagterima',1)
|
||||
->orWhere('tagoperasi','=',2)
|
||||
->orWhere('tagakaun','=',2)
|
||||
->orWhere('tagpb','=',2)
|
||||
->orWhere('tagdeposit','=',2)
|
||||
->orWhere('tagprint','=',2)
|
||||
->orWhere([['tagcit', 1],['jenismohon','bayaranbalik'],['tagakaun',1]])
|
||||
->get();
|
||||
|
||||
}
|
||||
|
||||
return response()->json($listpermohonan);
|
||||
}
|
||||
|
||||
public function GetPermohonanCawangan($kodcaw,Request $request)
|
||||
{
|
||||
|
||||
if($kodcaw === 'admin')
|
||||
{
|
||||
$listpermohonan = Permohonan::join('pengesahan', 'permohonan.mohonid', '=', 'pengesahan.mohonid')
|
||||
->where('tagterima',0)
|
||||
->where('tagoperasi','!=',2)
|
||||
->where('tagakaun','!=',2)
|
||||
->where('tagpb','!=',2)
|
||||
->where('tagdeposit','!=',2)
|
||||
->where('tagprint','!=',2)
|
||||
->where(function($query){
|
||||
$query->where('tagcit', '!=', 1)
|
||||
->orWhere('tagoperasi','!=',1)
|
||||
->orWhere('tagakaun','!=',1);
|
||||
})
|
||||
->orderBy('tarikh_permohonan','desc')->paginate(5);
|
||||
|
||||
}else{
|
||||
$listpermohonan = Permohonan::join('pengesahan', 'permohonan.mohonid', '=', 'pengesahan.mohonid')
|
||||
->where('pengesahan.kodcaw', $kodcaw)
|
||||
->where('tagterima',0)
|
||||
->where('tagoperasi','!=',2)
|
||||
->where('tagakaun','!=',2)
|
||||
->where('tagpb','!=',2)
|
||||
->where('tagdeposit','!=',2)
|
||||
->where('tagprint','!=',2)
|
||||
->where(function($query){
|
||||
$query->where('tagcit', '!=', 1)
|
||||
->orWhere('tagoperasi','!=',1)
|
||||
->orWhere('tagakaun','!=',1);
|
||||
})
|
||||
->get();
|
||||
}
|
||||
|
||||
return response()->json($listpermohonan);
|
||||
}
|
||||
|
||||
public function GetPermohonanById($kodcaw,$mohonid)
|
||||
{
|
||||
$permohonanstatus = [];
|
||||
$listpermohonan = Permohonan::join('pengesahan', 'permohonan.mohonid', '=', 'pengesahan.mohonid')
|
||||
->where([['permohonan.kodcaw', $kodcaw],['permohonan.mohonid',$mohonid]])->first()->toArray();
|
||||
|
||||
$status = Status::where('mohonid',$mohonid)->get()->toArray();
|
||||
|
||||
array_push($listpermohonan,(["status" => $status]));
|
||||
|
||||
return response()->json($listpermohonan);
|
||||
}
|
||||
|
||||
public function GetDescriptionStatus($mohonid)
|
||||
{
|
||||
$statusarray = [];
|
||||
$statusdetails = [];
|
||||
$status = Status::join('pengesahan', 'status.mohonid', '=', 'pengesahan.mohonid')
|
||||
->join('permohonan', 'status.mohonid', '=', 'permohonan.mohonid')
|
||||
->where('status.mohonid',$mohonid)->get()->toArray();
|
||||
|
||||
foreach($status as $index=>$stat)
|
||||
{
|
||||
$status_lookup = LookupStatus::where('statusid',$stat['statusid'])->first()->toArray();
|
||||
$date = date('d-m-Y',strtotime($stat['tarikhmasa']));
|
||||
$time = date('g:i a',strtotime($stat['tarikhmasa']));
|
||||
|
||||
switch($stat['statusid']){
|
||||
case 1: array_push($status_lookup,['tarikh' => $date, 'masa' => $time,'nama_pemohon' => $stat['nama_pemohon']]);
|
||||
break;
|
||||
case 2: array_push($status_lookup,['tarikh' => $date, 'masa' => $time,'nama_operasi' => $stat['nama_operasi']]);
|
||||
break;
|
||||
case 3: array_push($status_lookup,['tarikh' => $date, 'masa' => $time,'nama_akaun' => $stat['nama_akaun']]);
|
||||
break;
|
||||
case 4: array_push($status_lookup,['tarikh' => $date, 'masa' => $time,'jumlah_diluluskan' => $stat['jumlah_diluluskan']]);
|
||||
break;
|
||||
case 5: array_push($status_lookup,['tarikh' => $date, 'masa' => $time,'jenisbank' => $stat['jenisbank'],'noresit' => $stat['noresit']]);
|
||||
break;
|
||||
case 6: array_push($status_lookup,['tarikh' => $date, 'masa' => $time,'nama_penerima' => $stat['nama_penerima']]);
|
||||
break;
|
||||
case 7: array_push($status_lookup,['tarikh' => $date, 'masa' => $time,'komen' => $stat['komen_batal']]);
|
||||
break;
|
||||
case 8: array_push($status_lookup,['tarikh' => $date, 'masa' => $time,'jenisbank' => $stat['bank_cit']]);
|
||||
break;
|
||||
}
|
||||
|
||||
array_push($statusarray,$status_lookup);
|
||||
}
|
||||
|
||||
return response()->json($statusarray);
|
||||
}
|
||||
|
||||
public function KelulusanPermohonanByOperasi(Request $request)
|
||||
{
|
||||
$timeloni = Carbon::now();
|
||||
$status = new Status;
|
||||
try{
|
||||
|
||||
if($request->kelulusan == 'Lulus')
|
||||
{
|
||||
$status->mohonid = $request->mohonid;
|
||||
$status->statusid = 2;
|
||||
$status->tarikhmasa = $timeloni->toDateTimeString();
|
||||
$status->save();
|
||||
|
||||
$pengesahan = Pengesahan::where([['mohonid',$request->mohonid],['tagoperasi',0]])
|
||||
->update(array(
|
||||
'tagoperasi' => 1,
|
||||
'nama_operasi' => $request->namaoperasi,
|
||||
'tarikh_pengesahanoperasi' => $timeloni->toDateString()
|
||||
));
|
||||
|
||||
}else{
|
||||
|
||||
$status->mohonid = $request->mohonid;
|
||||
$status->statusid = 7;
|
||||
$status->tarikhmasa = $timeloni->toDateTimeString();
|
||||
$status->save();
|
||||
|
||||
$pengesahan = Pengesahan::where([['mohonid',$request->mohonid],['tagoperasi',0]])
|
||||
->update(array(
|
||||
'tagoperasi' => 2,
|
||||
'komen_batal' => $request->komen,
|
||||
'nama_operasi' => $request->namaoperasi,
|
||||
'tarikh_pengesahanoperasi' => $timeloni->toDateString()
|
||||
));
|
||||
|
||||
}
|
||||
|
||||
return response()->json($pengesahan,200);
|
||||
|
||||
}catch (\Throwable $e){
|
||||
return response($e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function KelulusanPermohonanByAkaun(Request $request)
|
||||
{
|
||||
$timeloni = Carbon::now();
|
||||
$status = new Status;
|
||||
|
||||
try{
|
||||
|
||||
if($request->kelulusan == 'Lulus')
|
||||
{
|
||||
$status->mohonid = $request->mohonid;
|
||||
$status->statusid = 3;
|
||||
$status->tarikhmasa = $timeloni->toDateTimeString();
|
||||
$status->save();
|
||||
|
||||
$pengesahan = Pengesahan::where([['mohonid',$request->mohonid],['tagakaun',0]])
|
||||
->update(array(
|
||||
'tagakaun' => 1,
|
||||
'nama_akaun' => $request->namaakaun,
|
||||
'tarikh_pengesahanakaun' => $timeloni->toDateString()
|
||||
));
|
||||
|
||||
}else
|
||||
{
|
||||
$status->mohonid = $request->mohonid;
|
||||
$status->statusid = 7;
|
||||
$status->tarikhmasa = $timeloni->toDateTimeString();
|
||||
$status->save();
|
||||
|
||||
$pengesahan = Pengesahan::where([['mohonid',$request->mohonid],['tagakaun',0]])
|
||||
->update(array(
|
||||
'tagakaun' => 2,
|
||||
'komen_batal' => $request->komen,
|
||||
'nama_akaun' => $request->namaakaun,
|
||||
'tarikh_pengesahanakaun' => $timeloni->toDateString()
|
||||
));
|
||||
}
|
||||
|
||||
return response()->json($pengesahan);
|
||||
|
||||
|
||||
}catch (\Throwable $e){
|
||||
return response($e);
|
||||
}
|
||||
}
|
||||
|
||||
public function PengesahanCetakan(Request $request)
|
||||
{
|
||||
$timeloni = Carbon::now();
|
||||
|
||||
try{
|
||||
$pengesahan = Pengesahan::where([['mohonid',$request->mohonid],['tagakaun',1]])
|
||||
->update(array(
|
||||
'tagprint' => 1,
|
||||
'nama_print' => $request->namaprint,
|
||||
'tarikh_print' => $timeloni->toDateString()
|
||||
));
|
||||
|
||||
return response()->json($pengesahan);
|
||||
}catch (\Throwable $e){
|
||||
return response($e);
|
||||
}
|
||||
}
|
||||
|
||||
public function KelulusanPermohonanByPB(Request $request)
|
||||
{
|
||||
$timeloni = Carbon::now();
|
||||
$status = new Status;
|
||||
$kp_files = new KPFiles;
|
||||
|
||||
try{
|
||||
|
||||
if($request->kelulusan == 'Lulus')
|
||||
{
|
||||
$status->mohonid = $request->mohonid;
|
||||
$status->statusid = 4;
|
||||
$status->tarikhmasa = $timeloni->toDateTimeString();
|
||||
$status->save();
|
||||
|
||||
$kp_files->data = $request->dataimage;
|
||||
$kp_files->type = $request->imagetype;
|
||||
$kp_files->filename = $request->imagename;
|
||||
$kp_files->tarikhmasa = $timeloni->toDateTimeString();
|
||||
$kp_files->save();
|
||||
|
||||
$pengesahan = Pengesahan::where([['mohonid',$request->mohonid],['tagpb',0]])
|
||||
->update(array(
|
||||
'tagpb' => 1,
|
||||
'kp_id' => $kp_files->id
|
||||
));
|
||||
|
||||
$permohonan = Permohonan::where('mohonid',$request->mohonid)
|
||||
->update(array(
|
||||
'tarikh_diluluskan' => $timeloni->toDateTimeString(),
|
||||
'jumlah_diluluskan' => $request->amaun_lulus
|
||||
));
|
||||
}else{
|
||||
$status->mohonid = $request->mohonid;
|
||||
$status->statusid = 7;
|
||||
$status->tarikhmasa = $timeloni->toDateTimeString();
|
||||
$status->save();
|
||||
|
||||
$pengesahan = Pengesahan::where([['mohonid',$request->mohonid],['tagpb',0]])
|
||||
->update(array(
|
||||
'tagpb' => 2,
|
||||
'komen_batal' => $request->komen
|
||||
));
|
||||
}
|
||||
|
||||
return response()->json(1);
|
||||
|
||||
|
||||
}catch (\Throwable $e){
|
||||
return response($e);
|
||||
}
|
||||
}
|
||||
|
||||
public function DepositBank(Request $request)
|
||||
{
|
||||
$timeloni = Carbon::now();
|
||||
$status = new Status;
|
||||
|
||||
try{
|
||||
|
||||
if($request->kelulusan == 'Lulus')
|
||||
{
|
||||
$status->mohonid = $request->mohonid;
|
||||
$status->statusid = 5;
|
||||
$status->tarikhmasa = $timeloni->toDateTimeString();
|
||||
$status->save();
|
||||
|
||||
$pengesahan = Pengesahan::where([['mohonid',$request->mohonid],['tagdeposit',0]])
|
||||
->update(array(
|
||||
'tagdeposit' => 1,
|
||||
'tarikh_bankin' => $timeloni->toDateString(),
|
||||
'jenisbank' => $request->jenisbank,
|
||||
'noresit' => $request->noresit
|
||||
));
|
||||
}else{
|
||||
$status->mohonid = $request->mohonid;
|
||||
$status->statusid = 7;
|
||||
$status->tarikhmasa = $timeloni->toDateTimeString();
|
||||
$status->save();
|
||||
|
||||
$pengesahan = Pengesahan::where([['mohonid',$request->mohonid],['tagdeposit',0]])
|
||||
->update(array(
|
||||
'tagdeposit' => 2,
|
||||
'komen_batal' => $request->komen
|
||||
));
|
||||
}
|
||||
|
||||
return response()->json(1);
|
||||
|
||||
|
||||
}catch (\Throwable $e){
|
||||
return response($e);
|
||||
}
|
||||
}
|
||||
|
||||
public function TagTerima(Request $request)
|
||||
{
|
||||
$timeloni = Carbon::now();
|
||||
$status = new Status;
|
||||
|
||||
try{
|
||||
|
||||
$status->mohonid = $request->mohonid;
|
||||
$status->statusid = 6;
|
||||
$status->tarikhmasa = $timeloni->toDateTimeString();
|
||||
$status->save();
|
||||
|
||||
$pengesahan = Permohonan::where([['mohonid',$request->mohonid],['tagterima',0]])
|
||||
->update(array(
|
||||
'tagterima' => 1,
|
||||
'tarikh_terima' => $timeloni->toDateString(),
|
||||
'nama_penerima' => $request->namapenerima
|
||||
));
|
||||
|
||||
return response()->json(1);
|
||||
|
||||
|
||||
}catch (\Throwable $e){
|
||||
return response($e);
|
||||
}
|
||||
}
|
||||
|
||||
public function TagCit (Request $request)
|
||||
{
|
||||
$timeloni = Carbon::now();
|
||||
$status = new Status;
|
||||
|
||||
try{
|
||||
|
||||
$status->mohonid = $request->mohonid;
|
||||
$status->statusid = 8;
|
||||
$status->tarikhmasa = $timeloni->toDateTimeString();
|
||||
$status->save();
|
||||
|
||||
$pengesahan = Pengesahan::where([['mohonid',$request->mohonid],['tagcit',0]])
|
||||
->update(array(
|
||||
'tagcit' => 1,
|
||||
'resit_cit' => $request->resitcit,
|
||||
'bank_cit' => $request->bank
|
||||
));
|
||||
|
||||
return response()->json(1);
|
||||
|
||||
|
||||
}catch (\Throwable $e){
|
||||
return response($e);
|
||||
}
|
||||
}
|
||||
|
||||
public function viewFile(Request $request) {
|
||||
// $data = \DB::connection($conn)
|
||||
// ->table($tbl)
|
||||
// ->where('filename', $filename)
|
||||
// ->first();
|
||||
|
||||
$kp = KPFiles::where('kp_id',$request->kp_id)
|
||||
->first();
|
||||
|
||||
return response(base64_decode(stream_get_contents($kp->data)), 200, [
|
||||
'Content-type' => 'application/' . $kp->type,
|
||||
'Content-Disposition' => 'inline; filename='.$kp->filename
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -643,24 +643,38 @@ class LelongController extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
public function getSenaraiLelongAktif($kodcaw){
|
||||
public function getSenaraiLelongAktif($kodcaw,$fasa){
|
||||
$current = Carbon::now();
|
||||
$current = new Carbon();
|
||||
|
||||
$cawangan = Cawangan::on('mysql7')->where('kodcaw',$kodcaw)->first();
|
||||
|
||||
$lelong = Lelong::on($cawangan['mysql'])
|
||||
->selectRaw('count(*) as total, batchno,t_lelong')
|
||||
->where('t_lelong','>=',$current->toDateString())
|
||||
->whereNull('t_jual')
|
||||
->orderBy('t_lelong','desc')
|
||||
->groupBy('batchno')
|
||||
->get();
|
||||
if($fasa == 'fasa1')
|
||||
{
|
||||
$lelong = Lelong::on($cawangan['mysql'])
|
||||
->selectRaw('count(*) as total, batchno,t_lelong')
|
||||
->where('t_lelong','>=',$current->toDateString())
|
||||
->where('fasa', 0)
|
||||
->whereNull('t_jual')
|
||||
->orderBy('t_lelong','desc')
|
||||
->groupBy('batchno')
|
||||
->get();
|
||||
}else{
|
||||
$lelong = Lelong::on($cawangan['mysql'])
|
||||
->selectRaw('count(*) as total, batchno,t_lelong')
|
||||
->where('t_lelong','>=',$current->toDateString())
|
||||
->where('fasa', 2)
|
||||
->whereNull('t_jual')
|
||||
->orderBy('t_lelong','desc')
|
||||
->groupBy('batchno')
|
||||
->get();
|
||||
}
|
||||
|
||||
|
||||
return response()->json($lelong);
|
||||
}
|
||||
|
||||
public function getSenaraiBatchNoAktif($kodcaw,Request $request){
|
||||
public function getSenaraiBatchNoAktif($kodcaw,$fasa,Request $request){
|
||||
|
||||
$current = Carbon::now();
|
||||
$current = new Carbon();
|
||||
@@ -668,13 +682,29 @@ class LelongController extends Controller
|
||||
|
||||
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$kodcaw)->first();
|
||||
|
||||
$lelong = Lelong::on($cawangan['mysql'])
|
||||
->select('lelong.t_lelong','lelong.norujukan','gadai.jbg','gadai.nokp','gadai.pinjaman','gadai.bakiupah')
|
||||
->leftJoin('gadai', 'gadai.norujukan', '=', 'lelong.norujukan')
|
||||
// ->leftJoin('customer', 'customer.kpbaru', '=', 'gadai.nokp')
|
||||
->where('batchno','=',$request->batchno)
|
||||
->orderBy('gadai.t_gadai','asc')
|
||||
->where('gadai.taglel','=', 1);
|
||||
if($fasa == 'fasa1')
|
||||
{
|
||||
$lelong = Lelong::on($cawangan['mysql'])
|
||||
->select('lelong.t_lelong','lelong.norujukan','gadai.jbg','gadai.nokp','gadai.pinjaman','gadai.bakiupah')
|
||||
->leftJoin('gadai', 'gadai.norujukan', '=', 'lelong.norujukan')
|
||||
// ->leftJoin('customer', 'customer.kpbaru', '=', 'gadai.nokp')
|
||||
->where('batchno','=',$request->batchno)
|
||||
->where('fasa',0)
|
||||
->orderBy('gadai.t_gadai','asc')
|
||||
->orderBy('gadai.sirig','asc')
|
||||
->where('gadai.taglel','=', 1);
|
||||
}else{
|
||||
$lelong = Lelong::on($cawangan['mysql'])
|
||||
->select('lelong.t_lelong','lelong.norujukan','gadai.jbg','gadai.nokp','gadai.pinjaman','gadai.bakiupah')
|
||||
->leftJoin('gadai', 'gadai.norujukan', '=', 'lelong.norujukan')
|
||||
// ->leftJoin('customer', 'customer.kpbaru', '=', 'gadai.nokp')
|
||||
->where('batchno','=',$request->batchno)
|
||||
->where('fasa',1)
|
||||
->orderBy('gadai.t_gadai','asc')
|
||||
->orderBy('gadai.sirig','asc')
|
||||
->where('gadai.taglel','=', 1);
|
||||
}
|
||||
|
||||
|
||||
$batchlel = BatchLel::on($cawangan['mysql'])
|
||||
->where('batchno','=',$request->batchno)
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class KPFiles extends Model
|
||||
{
|
||||
protected $table = 'kelulusanpb_files';
|
||||
public $timestamps = false;
|
||||
protected $connection = 'mysql7';
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'kp_id',
|
||||
'data',
|
||||
'filename',
|
||||
'type',
|
||||
'tarikhmasa'
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes excluded from the model's JSON form.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
// protected $hidden = [];
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class LookupStatus extends Model
|
||||
{
|
||||
protected $table = 'lookup_status';
|
||||
public $timestamps = false;
|
||||
protected $connection = 'mysql7';
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'statusid',
|
||||
'description'
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes excluded from the model's JSON form.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
// protected $hidden = [];
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Pengesahan extends Model
|
||||
{
|
||||
protected $table = 'pengesahan';
|
||||
public $timestamps = false;
|
||||
protected $connection = 'mysql7';
|
||||
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'sahno',
|
||||
'nama_operasi',
|
||||
'tarikh_pengesahanoperasi',
|
||||
'nama_akaun',
|
||||
'tarikh_pengesahanakaun',
|
||||
'jenisbank',
|
||||
'noresit',
|
||||
'tarikh_bankin',
|
||||
'kodcaw',
|
||||
'mohonid',
|
||||
'tagoperasi',
|
||||
'tagakaun',
|
||||
'tagpb',
|
||||
'tagdeposit',
|
||||
'tagprint',
|
||||
'tarikh_print',
|
||||
'nama_print',
|
||||
'tagcit',
|
||||
'bank_cit',
|
||||
'komen_batal',
|
||||
'kelulusanpbimage',
|
||||
'resit_cit',
|
||||
'nama_cit',
|
||||
'jeniscit'
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes excluded from the model's JSON form.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
// protected $hidden = [];
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Permohonan extends Model
|
||||
{
|
||||
protected $table = 'permohonan';
|
||||
public $timestamps = false;
|
||||
protected $connection = 'mysql7';
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'mohonid',
|
||||
'kodcaw',
|
||||
'jenismohon',
|
||||
'baki_petibesi',
|
||||
'amaun_mohon',
|
||||
'nama_pemohon',
|
||||
'tarikh_permohonan',
|
||||
'tarikh_diluluskan',
|
||||
'jumlah_diluluskan',
|
||||
'tarikh_terima',
|
||||
'nama_penerima',
|
||||
'outstandingsemasa',
|
||||
'nopermohonan',
|
||||
'tagterima'
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes excluded from the model's JSON form.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
// protected $hidden = [];
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Status extends Model
|
||||
{
|
||||
protected $table = 'status';
|
||||
public $timestamps = false;
|
||||
protected $connection = 'mysql7';
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'recno',
|
||||
'mohonid',
|
||||
'statusid',
|
||||
'tarikhmasa'
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes excluded from the model's JSON form.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
// protected $hidden = [];
|
||||
}
|
||||
+19
-2
@@ -262,8 +262,8 @@ $router->group(['prefix'=>'api'], function () use ($router){
|
||||
$router->get('gadai/JumlahagingBulanan/test/{kodcaw}/{tarikh}',['uses'=>'GadaiController@carian_Seluruh_AgingBulanan']);
|
||||
|
||||
//LELONG API
|
||||
$router->get('senaraibatch/aktif/{kodcaw}',['uses'=>'LelongController@getSenaraiLelongAktif']);
|
||||
$router->get('senaraibatch/laporan/{kodcaw}',['uses'=>'LelongController@getSenaraiBatchNoAktif']);
|
||||
$router->get('senaraibatch/aktif/{kodcaw}/{fasa}',['uses'=>'LelongController@getSenaraiLelongAktif']);
|
||||
$router->get('senaraibatch/laporan/{kodcaw}/{fasa}',['uses'=>'LelongController@getSenaraiBatchNoAktif']);
|
||||
$router->get('details/notislelong/{kodcaw}',['uses'=>'LelongController@DetailsNotisLelong']);
|
||||
|
||||
|
||||
@@ -677,12 +677,29 @@ $router->group(['prefix'=>'admin'], function () use ($router){
|
||||
$router->post('DeleteBlacklist',['uses'=>'AdminPageController@DeleteBlackList']);
|
||||
$router->post('AddSenaraiHitam',['uses'=>'AdminPageController@AddSenaraiHitam']);
|
||||
$router->put('notislelong/update/{kodcaw}',['uses'=>'AdminPageController@UpdateNotisLelong']);
|
||||
$router->put('notislelong/update2/{kodcaw}',['uses'=>'AdminPageController@UpdateNotisLelong2']);
|
||||
|
||||
$router->get('ListOperasi/Paginate',['uses'=>'AdminPageController@listoperasi']);
|
||||
$router->get('ListOperasiKelulusan/Paginate',['uses'=>'AdminPageController@listoperasikelulusan']);
|
||||
|
||||
$router->get('customers/{ic}/gadai/{status}',['uses'=>'AdminPageController@showOneCustomerGadai']);
|
||||
|
||||
$router->post('permohonan/add/{kodcaw}',['uses'=>'AdminPageController@TambahPermohonan']);
|
||||
$router->get('permohonan/get/{kodcaw}',['uses'=>'AdminPageController@GetPermohonanCawangan']);
|
||||
$router->get('permohonan/rekod/{kodcaw}',['uses'=>'AdminPageController@GetRekodPermohonanCawangan']);
|
||||
$router->get('permohonan/get/{kodcaw}/{mohonid}',['uses'=>'AdminPageController@GetPermohonanById']);
|
||||
$router->get('permohonan/description/{mohonid}',['uses'=>'AdminPageController@GetDescriptionStatus']);
|
||||
|
||||
$router->put('permohonan/updateoperasi',['uses'=>'AdminPageController@KelulusanPermohonanByOperasi']);
|
||||
$router->put('permohonan/updateakaun',['uses'=>'AdminPageController@KelulusanPermohonanByAkaun']);
|
||||
$router->put('permohonan/updatecetak',['uses'=>'AdminPageController@PengesahanCetakan']);
|
||||
$router->post('permohonan/updatepb',['uses'=>'AdminPageController@KelulusanPermohonanByPB']);
|
||||
$router->put('permohonan/updatebank',['uses'=>'AdminPageController@DepositBank']);
|
||||
$router->put('permohonan/tagterima',['uses'=>'AdminPageController@TagTerima']);
|
||||
$router->put('permohonan/tagcit',['uses'=>'AdminPageController@TagCit']);
|
||||
$router->get('permohonan/viewfiles',['uses'=>'AdminPageController@viewFile']);
|
||||
|
||||
|
||||
});
|
||||
|
||||
$router->group(['prefix'=>'kelantanpay'], function () use ($router){
|
||||
|
||||
Reference in New Issue
Block a user