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")
|
||||
public ModelAndView getSlipGaji(ModelAndView m, @RequestParam(value = "format", required = false) String format,
|
||||
@RequestParam(value = "idPegawai", required = true) Integer pegawaiId,
|
||||
public ModelAndView getSlipGaji(ModelAndView m,
|
||||
@RequestParam(value = "format", required = false) String format,
|
||||
@RequestParam(value = "bulan", required = true) Long bulan) {
|
||||
Map<String, Object> data = reportService.defineSlipGajiDataSource(pegawaiId, bulan);
|
||||
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("format", "pdf");
|
||||
if (format != null && !format.isEmpty())
|
||||
m.addObject("format", format);
|
||||
m.addObject("format", format);
|
||||
if (CommonUtil.isNullOrEmpty(format))
|
||||
m.addObject("format", "pdf");
|
||||
return m;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user