Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
simpmw
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alfiro Pratama
simpmw
Commits
4920d01e
Commit
4920d01e
authored
9 months ago
by
Alfiro Pratama
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Excel Export
parent
6c0dbf84
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
9 deletions
+14
-9
app/Exports/DaftarProposalExport.php
+14
-9
No files found.
app/Exports/DaftarProposalExport.php
View file @
4920d01e
...
...
@@ -7,9 +7,9 @@ use App\Models\DaftarProposal;
use
Illuminate\Support\Facades\DB
;
use
Illuminate\Contracts\View\View
;
use
Maatwebsite\Excel\Concerns\FromView
;
use
Maatwebsite\Excel\Concerns\ShouldAutoSize
;
//
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
class
DaftarProposalExport
implements
FromView
,
ShouldAutoSize
class
DaftarProposalExport
implements
FromView
{
/**
* @return \Illuminate\Support\Collection
...
...
@@ -23,29 +23,33 @@ class DaftarProposalExport implements FromView,ShouldAutoSize
public
function
view
()
:
View
{
ini_set
(
'memory_limit'
,
'-1'
);
//
ini_set('memory_limit', '-1');
$statement
=
" STATUS_HAPUS = '0' "
;
if
(
$this
->
jenis
!=
"0"
)
{
$statement
.=
" AND jenis_id = '
"
.
$this
->
jenis
.
"
'"
;
$statement
.=
" AND jenis_id = '
{
$this
->
jenis
}
'"
;
}
if
(
$this
->
status
!=
"0"
)
{
// dikurang 1 karena di view mulai dari 0 sedangkan 0 itu menunggu persetujuan
$status
=
$this
->
status
-
1
;
$statement
.=
" AND STATUS_FINAL = '
"
.
$status
.
"
'"
;
$statement
.=
" AND STATUS_FINAL = '
{
$status
}
'"
;
}
if
(
$this
->
tahun
!=
"0"
)
{
$statement
.=
" AND PERIODE = '
"
.
$this
->
tahun
.
"
'"
;
$statement
.=
" AND PERIODE = '
{
$this
->
tahun
}
'"
;
}
$data
=
DaftarProposal
::
with
(
'rKelompokDetil'
)
$data
=
DaftarProposal
::
with
(
[
'rKelompokDetil'
,
'reviewerProposal1'
,
'reviewerProposal2'
]
)
->
select
(
"*"
)
->
selectRaw
(
" round((ambil_jumlah_penilaian_seleksi(reviewer_proposal_id_1) + ambil_jumlah_penilaian_seleksi(reviewer_proposal_id_2 )) / 2, 2) as rata "
)
->
whereRaw
(
$statement
)
->
get
();
->
selectRaw
(
" round((ambil_jumlah_penilaian_seleksi(reviewer_proposal_id_1) + ambil_jumlah_penilaian_seleksi(reviewer_proposal_id_2 )) / 2, 2) as rata "
)
// ->whereRaw($statement)
->
get
();
// dd($statement);
$result
=
[];
$x
=
0
;
...
...
@@ -103,8 +107,9 @@ class DaftarProposalExport implements FromView,ShouldAutoSize
}
$datas
[
'list_proposal'
]
=
$result
;
// dd($result);
$datas
[
'jenis_monev'
]
=
'Seleksi Internal'
;
return
view
(
'backend.operator.daftar_proposal.excel'
,
$datas
);
return
view
(
'backend.operator.daftar_proposal.excel
_new
'
,
$datas
);
}
}
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment