Class StockChangeService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.inventory.rs2.warehouse.stock.change.StockChangeService
@RestController
@RequestMapping("inventory/r2/warehouses/stocks/changes")
@Resource(logging=true)
public class StockChangeService
extends PrivateService
Service to manage the stock change.
- Since:
- 19.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<DTOStockChange> Retrieves the requiredDTOStockChangeby calling from theStockChangeLoadEvent.org.springframework.http.ResponseEntity<PageResponse<DTOStockChange>> getCollection(@NotNull @Valid Page page, @Valid @NotNull DTOStockChangeSearchFilter filter) Returns the collection of all the stored stock changes by calling theStockChangeSearchEvent.org.springframework.http.ResponseEntity<Void> Action to perform a stock change, calling theWarehouseStockChangeCreateOperationEvent.
-
Constructor Details
-
StockChangeService
public StockChangeService()
-
-
Method Details
-
getCollection
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOStockChange>> getCollection(@RequestParam("page") @NotNull @Valid @NotNull @Valid Page page, @RequestParam("filter") @Valid @NotNull @Valid @NotNull DTOStockChangeSearchFilter filter) throws DAValidateException, DAException Returns the collection of all the stored stock changes by calling theStockChangeSearchEvent.- Parameters:
page- thePagethat will contain the paginated resultfilter- theDTOStockChangeSearchFilter- Returns:
- the
ResponseEntitycontaining the collection ofDTOStockChange - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
get
@GetMapping(value="{id:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOStockChange> get(@PathVariable("id") Long id, @RequestParam(required=false,name="language",defaultValue="user") String language) throws DAValidateException, DAException Retrieves the requiredDTOStockChangeby calling from theStockChangeLoadEvent.- Parameters:
id- the stock change idlanguage- the language of the user- Returns:
- the
ResponseEntitycontaining the loadedDTOStockChange - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
warehouseManualOperation
@PostMapping(value="actions/changeStock", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> warehouseManualOperation(@Valid @RequestBody @Valid DTOStockChangeCreateOperationInsert dto) throws DAValidateException, DAException Action to perform a stock change, calling theWarehouseStockChangeCreateOperationEvent.- Parameters:
dto- theDTOStockChangeCreateOperationInsert- Returns:
- the
ResponseEntity - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-