Class BTTransferRequestCheckStockAvailabilityEvent
java.lang.Object
overit.geocall.bl.BusinessTask<TransferRequestCheckStockAvailabilityEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<TransferRequestCheckStockAvailabilityEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<TransferRequestCheckStockAvailabilityEvent>
overit.geocallapp.wfm.inventory.bl.task.BTInventoryManagement<TransferRequestCheckStockAvailabilityEvent>
overit.geocallapp.wfm.inventory.bl.warehouse.transfer.request.task.BTTransferRequestCheckStockAvailabilityEvent
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(TransferRequestCheckStockAvailabilityEvent.class)
public class BTTransferRequestCheckStockAvailabilityEvent
extends BTInventoryManagement<TransferRequestCheckStockAvailabilityEvent>
Business task in order to check the stock availability of the materials requested in a
When the
TransferRequest. When the
TransferRequestCheckStockAvailabilityEvent is launched
the BT notices the call and checks whether all the materials listed in the TransferRequest
are currently on stock in the indicated BOWarehouse. - Since:
- 14.0
- See Also:
- GCApi:
- task
-
Field Summary
Fields inherited from class overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask
LOG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckConsumptionMaterial(TransferRequestItem item, BOWarehouse warehouse, BOStockType stockType, BOMaterial material, PoolKit poolKit) Checks the quantities of the material on consumption, based on the givenBOWarehouseandBOStockType.protected voidcheckSerializedMaterial(TransferRequestItem item, BOStockType stockType, BOWarehouse warehouse, PoolKit poolKit) Checks the serial numbers for the given serialized material, based on the givenBOWarehouseandBOStockType.protected voidexecute(TransferRequestCheckStockAvailabilityEvent event, PoolKit poolKit) Checks every material that has been listen in theTransferRequestin order to verify that the requested quantity is present in stock in the indicated picking warehouse.protected StringbooleanChecks if the execution is valid.protected BOMaterialloadMaterial(Long materialId, PoolKit poolKit) Loads theBOMaterialstarting from the given id.protected DoubleloadMaterialStockQuantity(Long warehouse, Long stockType, Long materialId, PoolKit poolKit) protected List<BOSerializedMaterial> loadSerializedMaterialInStock(TransferRequestItem item, String serialNumber, BOStockType stockType, BOWarehouse warehouse, PoolKit poolKit) Loads the serialized material, based on the givenBOWarehouseandBOStockType.protected BOStockTypeloadStockType(Long stockTypeId, PoolKit poolKit) Loads theBOStockTypestarting from the given id.protected BOWarehouseloadWarehouse(Long warehouseId, PoolKit poolKit) Loads theBOWarehousestarting from the given id.Methods inherited from class overit.geocallapp.wfm.inventory.bl.task.BTInventoryManagement
checkValidExecutionMethods inherited from class overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask
getException, throwExceptionIfInvalidMethods inherited from class overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask
body, getEventMethods inherited from class overit.geocall.bl.BusinessTask
start, start, startAlone, startInBackground
-
Constructor Details
-
BTTransferRequestCheckStockAvailabilityEvent
public BTTransferRequestCheckStockAvailabilityEvent()
-
-
Method Details
-
execute
protected void execute(TransferRequestCheckStockAvailabilityEvent event, PoolKit poolKit) throws DAException, DAValidateException Checks every material that has been listen in theTransferRequestin order to verify that the requested quantity is present in stock in the indicated picking warehouse.- Specified by:
executein classValidExecutionBusinessTask<TransferRequestCheckStockAvailabilityEvent>- Parameters:
event- theTransferRequestCheckStockAvailabilityEventpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
checkConsumptionMaterial
protected void checkConsumptionMaterial(TransferRequestItem item, BOWarehouse warehouse, BOStockType stockType, BOMaterial material, PoolKit poolKit) throws DAValidateException, DAException Checks the quantities of the material on consumption, based on the givenBOWarehouseandBOStockType.- Parameters:
item- the currentTransferRequestItemwarehouse- the pickingBOWarehousestockType- theBOStockTypematerial- theBOMaterialto check- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
checkSerializedMaterial
protected void checkSerializedMaterial(TransferRequestItem item, BOStockType stockType, BOWarehouse warehouse, PoolKit poolKit) throws DAValidateException, DAException Checks the serial numbers for the given serialized material, based on the givenBOWarehouseandBOStockType.- Parameters:
item- the currentTransferRequestItemstockType- theBOStockTypewarehouse- theBOWarehousepoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
loadSerializedMaterialInStock
protected List<BOSerializedMaterial> loadSerializedMaterialInStock(TransferRequestItem item, String serialNumber, BOStockType stockType, BOWarehouse warehouse, PoolKit poolKit) throws DAValidateException, DAException Loads the serialized material, based on the givenBOWarehouseandBOStockType.- Parameters:
item- the currentTransferRequestItemserialNumber- the serial numberstockType- theBOStockTypewarehouse- theBOWarehousepoolKit- thePoolKit- Returns:
- a list of of loaded
BOSerializedMaterialthat are currently in stock - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
loadMaterialStockQuantity
protected Double loadMaterialStockQuantity(Long warehouse, Long stockType, Long materialId, PoolKit poolKit) throws DAValidateException, DAException - Parameters:
warehouse- theBOWarehousestockType- theStockTypeLoadEventmaterialId- theBOMaterialid- Returns:
- the stock quantity
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
loadMaterial
protected BOMaterial loadMaterial(Long materialId, PoolKit poolKit) throws DAException, DAValidateException Loads theBOMaterialstarting from the given id.- Parameters:
materialId- the material idpoolKit- thePoolKit- Returns:
- the loaded
BOMaterial - Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
loadWarehouse
protected BOWarehouse loadWarehouse(Long warehouseId, PoolKit poolKit) throws DAException, DAValidateException Loads theBOWarehousestarting from the given id.- Parameters:
warehouseId- the warehouse idpoolKit- thePoolKit- Returns:
- the loaded
BOWarehouse - Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
loadStockType
protected BOStockType loadStockType(Long stockTypeId, PoolKit poolKit) throws DAException, DAValidateException Loads theBOStockTypestarting from the given id.- Parameters:
stockTypeId- the stock type idpoolKit- thePoolKit- Returns:
- the BO stock type
- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
getInLanguageString
-
isValidExecution
public boolean isValidExecution()Checks if the execution is valid.- Returns:
- true, if successful
-