@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);
 }
Ejemplo n.º 2
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);
 }
 @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);
 }