Class StockService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.inventory.rs2.warehouse.stock.StockService
@RestController
@RequestMapping("inventory/r2/warehouses/stocks")
@Resource(logging=true)
public class StockService
extends PrivateService
Services to manage the stocks.
- Since:
- 19.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<DTOStock> Retrieves the requiredDTOStockby calling from theStockLoadEvent.org.springframework.http.ResponseEntity<PageResponse<DTOStock>> getCollection(@NotNull @Valid Page page, @Valid @NotNull DTOStockSearchFilter filter) Retrieves all the stored stocks by calling theStockSearchEvent.org.springframework.http.ResponseEntity<DTOStockHistory> getHistory(Long stockId, Long id) Retrieves the required stock history by calling theStockHistoryLoadEvent.org.springframework.http.ResponseEntity<PageResponse<DTOMaterialStock>> getMaterialStocks(@NotNull @Valid Page page, @Valid @NotNull DTOMaterialStockSearchFilter filter) Retrieves the required stock grouping as required by calling theWarehouseMaterialStockSearchEvent.org.springframework.http.ResponseEntity<PageResponse<DTOStockSerializedMaterial>> Retrieves the required stock serialized materials by calling theStockSerializedMaterialSearchEvent.org.springframework.http.ResponseEntity<PageResponse<DTOStockHistory>> getStockHistories(Long stockId, @NotNull @Valid Page page, @Valid @NotNull DTOStockHistorySearchFilter filter) Retrieves all the stored stock history by calling theStockHistorySearchEvent.
-
Constructor Details
-
StockService
public StockService()
-
-
Method Details
-
getCollection
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOStock>> getCollection(@RequestParam("page") @NotNull @Valid @NotNull @Valid Page page, @RequestParam("filter") @Valid @NotNull @Valid @NotNull DTOStockSearchFilter filter) throws DAValidateException, DAException Retrieves all the stored stocks by calling theStockSearchEvent.- Parameters:
page- thePagethat will contain the paginated resultfilter- theDTOStockSearchFilter- Returns:
- the
ResponseEntitycontaining the collection ofDTOStock - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
get
@GetMapping(value="{id:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOStock> get(@PathVariable("id") Long id) throws DAValidateException, DAException Retrieves the requiredDTOStockby calling from theStockLoadEvent.- Parameters:
id- the stock id- Returns:
- the
ResponseEntitycontaining the loadedDTOStock - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
getStockHistories
@GetMapping(value="{stockId:[0-9]+}/histories", produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOStockHistory>> getStockHistories(@PathVariable("stockId") Long stockId, @RequestParam("page") @NotNull @Valid @NotNull @Valid Page page, @RequestParam("filter") @Valid @NotNull @Valid @NotNull DTOStockHistorySearchFilter filter) throws DAValidateException, DAException Retrieves all the stored stock history by calling theStockHistorySearchEvent.- Parameters:
stockId- the stock idpage- thePagethat will contain the paginated resultfilter- theDTOStockHistorySearchFilter- Returns:
- the
ResponseEntitycontaining the collection ofDTOStockHistory - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
getHistory
@GetMapping(value="{stockId:[0-9]+}/histories/{id:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOStockHistory> getHistory(@PathVariable("stockId") Long stockId, @PathVariable("id") Long id) throws DAValidateException, DAException Retrieves the required stock history by calling theStockHistoryLoadEvent.- Parameters:
stockId- the stock idid-ResponseEntitycontaining the loadedDTOStockHistory- Returns:
- the
ResponseEntitycontaining the loadedDTOStockHistory - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
getSerializedMaterials
@GetMapping(value="{id:[0-9]+}/actions/getSerializedMaterials", produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOStockSerializedMaterial>> getSerializedMaterials(@PathVariable("id") Long id) throws DAValidateException, DAException Retrieves the required stock serialized materials by calling theStockSerializedMaterialSearchEvent.- Parameters:
id- the stock id- Returns:
- the
ResponseEntitycontaining the serialized materials of the stock - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
getMaterialStocks
@GetMapping(value="/actions/getMaterialStocks", produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOMaterialStock>> getMaterialStocks(@RequestParam("page") @NotNull @Valid @NotNull @Valid Page page, @RequestParam("filter") @Valid @NotNull @Valid @NotNull DTOMaterialStockSearchFilter filter) throws DAValidateException, DAException Retrieves the required stock grouping as required by calling theWarehouseMaterialStockSearchEvent.- Parameters:
page- thePagethat will contain the paginated resultfilter- theDTOMaterialStockSearchFilter- Returns:
- the
ResponseEntitycontaining the required grouped stocks - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-