Commit 22cc8cb4 by novanbagus

update sorting

parent 6411a7dd
...@@ -93,6 +93,9 @@ class DaftarProposalController extends Controller ...@@ -93,6 +93,9 @@ class DaftarProposalController extends Controller
$records = DaftarProposal::orderBy($columnName,$columnSortOrder) $records = DaftarProposal::orderBy($columnName,$columnSortOrder)
->whereRaw($statementGlobal.$statement) ->whereRaw($statementGlobal.$statement)
->select('daftar_proposal.*') ->select('daftar_proposal.*')
->selectRaw(" ambil_jumlah_penilaian_seleksi(reviewer_proposal_id_1) nilai_1 ")
->selectRaw(" ambil_jumlah_penilaian_seleksi(reviewer_proposal_id_2) nilai_2 ")
->selectRaw(" round((ambil_jumlah_penilaian_seleksi(reviewer_proposal_id_1) + ambil_jumlah_penilaian_seleksi(reviewer_proposal_id_2 )) / 2, 2) as rata ")
->skip($start) ->skip($start)
->take($rowperpage) ->take($rowperpage)
->get(); ->get();
...@@ -110,14 +113,15 @@ class DaftarProposalController extends Controller ...@@ -110,14 +113,15 @@ class DaftarProposalController extends Controller
$reviewer_id_1 = $record->reviewer_id_1; $reviewer_id_1 = $record->reviewer_id_1;
$reviewer_id_2 = $record->reviewer_id_2; $reviewer_id_2 = $record->reviewer_id_2;
$status_final = $record->status_final; $status_final = $record->status_final;
$reviewer_proposal_id_1 = $record->reviewer_proposal_id_1?:'00000000-0000-0000-0000-000000000000'; $nilai_1 = $record->nilai_1;
$reviewer_proposal_id_2 = $record->reviewer_proposal_id_2?:'00000000-0000-0000-0000-000000000000'; $nilai_2 = $record->nilai_2;
$rata = $record->rata;
$nilai_1= DB::select("select ambil_jumlah_penilaian_seleksi('".$reviewer_proposal_id_1."', '".$record->jenis_id."')")[0]->ambil_jumlah_penilaian_seleksi; // $nilai_1= DB::select("select ambil_jumlah_penilaian_seleksi('".$reviewer_proposal_id_1."', '".$record->jenis_id."')")[0]->ambil_jumlah_penilaian_seleksi;
$nilai_2= DB::select("select ambil_jumlah_penilaian_seleksi('".$reviewer_proposal_id_2."', '".$record->jenis_id."')")[0]->ambil_jumlah_penilaian_seleksi; // $nilai_2= DB::select("select ambil_jumlah_penilaian_seleksi('".$reviewer_proposal_id_2."', '".$record->jenis_id."')")[0]->ambil_jumlah_penilaian_seleksi;
$rata = number_format((float) (($nilai_1 + $nilai_2) / 2), 0, '.', ''); // $rata = number_format((float) (($nilai_1 + $nilai_2) / 2), 0, '.', '');
// $delete = "confirmLolos('".Crypt::encrypt($reviewer_id)."')"; // $delete = "confirmLolos('".Crypt::encrypt($reviewer_id)."')";
......
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