コード例 #1
0
 @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();
 }
コード例 #2
0
 @RequestMapping(value = "/load/{Id}", method = RequestMethod.GET)
 @ResponseBody
 public ConsumptionReportAmmoViewModel load(@PathVariable long Id) {
   return (ConsumptionReportAmmoViewModel)
       ModelMapper.map(
           iConsumptionReportAmmoService.loadByEntityId(Id), ConsumptionReportAmmoViewModel.class);
 }
コード例 #3
0
 @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);
 }
コード例 #4
0
 @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();
 }
コード例 #5
0
 @RequestMapping(value = "/list/grid/{consumptionId}", method = RequestMethod.GET)
 @ResponseBody
 public QueryResult<ConsumptionReportAmmoViewModel> getAllGridByConsumptionId(
     @PathVariable Long consumptionId, String where, String order, int pageNumber, int pageSize) {
   return ModelMapper.mapQueryResult(
       iConsumptionReportAmmoService.getAllGridByConsumptionId(
           consumptionId, new SearchOption(where, order, pageNumber, pageSize)),
       ConsumptionReportAmmoViewModel.class);
 }
コード例 #6
0
 @RequestMapping(value = "/list/searchEnumeration", method = RequestMethod.GET)
 @ResponseBody
 public QueryResult<EnumerationViewModel> searchEnumeration(
     long instructionId,
     int storeHouseId,
     String enumerateDate,
     String enumerateNumber,
     String countedDate,
     String where,
     String order,
     int pageNumber,
     int pageSize) {
   SearchOption s = new SearchOption(where, order, pageNumber, pageSize);
   QueryResult<Enumeration> q =
       enumerationService.searchEnumeration(
           instructionId, storeHouseId, enumerateDate, enumerateNumber, countedDate, s);
   return ModelMapper.mapQueryResult(q, EnumerationViewModel.class);
 }
コード例 #7
0
 @RequestMapping(value = "/list/searchAllocateTraining", method = RequestMethod.GET)
 @ResponseBody
 public QueryResult<AllocateTrainingViewModel> searchAllocation(
     int norm,
     String allocateNumber,
     int allocateTrainingSubject,
     String allocateDate,
     int publisherId,
     int functorId,
     String order,
     int pageNumber,
     int pageSize) {
   QueryResult<AllocateTraining> modelResult =
       allocateTrainingService.searchAllocation(
           norm,
           allocateNumber,
           allocateTrainingSubject,
           allocateDate,
           publisherId,
           functorId,
           new SearchOption("", order, pageNumber, pageSize));
   return ModelMapper.mapQueryResult(modelResult, AllocateTrainingViewModel.class);
 }
コード例 #8
0
 @RequestMapping(value = "/load/{id}", method = RequestMethod.GET)
 @ResponseBody
 public EnumerationViewModel load(@PathVariable Long id) {
   return ModelMapper.map(enumerationService.loadByEntityId(id), EnumerationViewModel.class);
 }
コード例 #9
0
 @RequestMapping(value = "/load/{id}", method = RequestMethod.GET)
 @ResponseBody
 public AllocateTrainingViewModel load(@PathVariable long id) {
   return ModelMapper.map(
       allocateTrainingService.loadByEntityId(id), AllocateTrainingViewModel.class);
 }