@RequestMapping(value = "/load/{Id}", method = RequestMethod.GET) @ResponseBody public ConsumptionReportAmmoViewModel load(@PathVariable long Id) { return (ConsumptionReportAmmoViewModel) ModelMapper.map( iConsumptionReportAmmoService.loadByEntityId(Id), ConsumptionReportAmmoViewModel.class); }
@RequestMapping(value = "/save", method = RequestMethod.POST) @ResponseBody public long save(@RequestBody ConsumptionReportAmmoViewModel viewModelEntity) { ConsumptionAmmo modelEntity = ModelMapper.map(viewModelEntity, ConsumptionAmmo.class); iConsumptionReportAmmoService.save(modelEntity); return modelEntity.getId(); }
@RequestMapping(value = "/save", method = RequestMethod.POST) @ResponseBody public Long save(@RequestBody EnumerationViewModel viewModelEntity) { Enumeration modelEntity = ModelMapper.map(viewModelEntity, Enumeration.class); modelEntity.setUpdatedDate(new Date()); modelEntity.setCreatedDate(new Date()); return enumerationService.saveAndCloneEnumerationDetail(modelEntity); }
@RequestMapping(value = "/save", method = RequestMethod.POST) @ResponseBody public long save(@RequestBody AllocateTrainingViewModel viewModelEntity) { AllocateTraining modelEntity = ModelMapper.map(viewModelEntity, AllocateTraining.class); allocateTrainingService.save(modelEntity); iFileProviderService.confirmFileProvider(modelEntity.getFileCode()); return modelEntity.getId(); }
@RequestMapping(value = "/load/{id}", method = RequestMethod.GET) @ResponseBody public EnumerationViewModel load(@PathVariable Long id) { return ModelMapper.map(enumerationService.loadByEntityId(id), EnumerationViewModel.class); }
@RequestMapping(value = "/load/{id}", method = RequestMethod.GET) @ResponseBody public AllocateTrainingViewModel load(@PathVariable long id) { return ModelMapper.map( allocateTrainingService.loadByEntityId(id), AllocateTrainingViewModel.class); }