Update ReportingController.java
Penerapan service login user saat cetak slip gaji
This commit is contained in:
parent
ee680e4d2f
commit
8d19fcb7c4
@ -7840,16 +7840,19 @@ public class ReportingController extends LocaleController<RegistrasiPelayananVO>
|
|||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping("/slipGaji")
|
@RequestMapping("/slipGaji")
|
||||||
public ModelAndView getSlipGaji(ModelAndView m, @RequestParam(value = "format", required = false) String format,
|
public ModelAndView getSlipGaji(ModelAndView m,
|
||||||
@RequestParam(value = "idPegawai", required = true) Integer pegawaiId,
|
@RequestParam(value = "format", required = false) String format,
|
||||||
@RequestParam(value = "bulan", required = true) Long bulan) {
|
@RequestParam(value = "bulan", required = true) Long bulan) {
|
||||||
Map<String, Object> data = reportService.defineSlipGajiDataSource(pegawaiId, bulan);
|
|
||||||
List<Map<String, Object>> dataSource = new ArrayList<>();
|
List<Map<String, Object>> dataSource = new ArrayList<>();
|
||||||
dataSource.add(data);
|
LoginUser loginUser = loginUserService.getLoginUser();
|
||||||
|
if (CommonUtil.isNotNullOrEmpty(loginUser)) {
|
||||||
|
Map<String, Object> data = reportService.defineSlipGajiDataSource(loginUser.getPegawai().getId(), bulan);
|
||||||
|
dataSource.add(data);
|
||||||
|
}
|
||||||
m.addObject("dataSource", dataSource);
|
m.addObject("dataSource", dataSource);
|
||||||
m.addObject("format", "pdf");
|
m.addObject("format", format);
|
||||||
if (format != null && !format.isEmpty())
|
if (CommonUtil.isNullOrEmpty(format))
|
||||||
m.addObject("format", format);
|
m.addObject("format", "pdf");
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user