com.ibm.commerce.inventory.commands

Class GeneratePickBatchCmdImpl

  • All Implemented Interfaces:
    com.ibm.commerce.command.CacheableECCommand, ECCommand, ECTargetableCommand, TaskCommand, GeneratePickBatchCmd, com.ibm.websphere.cache.Sizeable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, com.ibm.websphere.command.TargetableCommand, java.io.Serializable


    public class GeneratePickBatchCmdImpl
    extends TaskCommandImpl
    implements GeneratePickBatchCmd
    Default implementation of the GeneratePickBatchCmd interface. Generates a pick batch for specified fulfillment center and store.

    This is a task command.

    The order releases with 'SHIP' status for the specified fulfillment center and store will be included in the pick batch generation. If there are more than the maximum number of order releases, which are eligible, when a pick batch is generated. Only the maximum number of order releases are picked up in this pick batch. And the rest will be picked up by the next pick batch generation. A pack slip XML will be generated for each eligible order release and a pick ticket XML will be generated for the whole batch. An invoice XML may also be generated for each eligible order release.

    Uses the following access beans:

    • InventoryJDBCHelperAccessBean
    • UserAccessBean
    • PickBatchAccessBean
    • StoreEntityDescriptionAccessBean
    • FulfillmentCenterDescriptionAccessBean
    • OrderReleaseAccessBean
    • OrderItemAccessBean
    • OrderAccessBean
    • TradingAgreementAccessBean
    • TermConditionAccessBean
    • InvoiceTCAccessBean
    • ShippingModeDescriptionAccessBean
    • AddressAccessBean
    • BaseItemDescriptionAccessBean
    • CatalogEntryDescriptionAccessBean
    • CurrencyAccessBean
    See Also:
    Serialized Form
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        The internal copyright field.
        See Also:
        Constant Field Values
    • Constructor Detail

      • GeneratePickBatchCmdImpl

        public GeneratePickBatchCmdImpl()
    • Method Detail

      • isReadyToCallExecute

        public boolean isReadyToCallExecute()
        This command is ready to be executed.
        Specified by:
        isReadyToCallExecute in interface com.ibm.websphere.command.Command
        Overrides:
        isReadyToCallExecute in class AbstractECTargetableCommand
        Returns:
        Always true.
      • generatePickbatch

        public void generatePickbatch(int maxOrderReleases)
                               throws ECException
        This method generates a pick batch with no delay for select how age orders.
        Parameters:
        maxOrderReleases - maximum number of order releases in a pick batch
        Throws:
        ECException -
        • ECSystemException Naming error, _ERR_CREATE_EXCEPTION
        • ECSystemException Finder error, _ERR_FINDER_EXCEPTION
        • ECSystemException Naming error, _ERR_NAMING_EXCEPTION
        • ECSystemException Remote error, _ERR_REMOTE_EXCEPTION
        See Also:
        generatePickbatch(int, int)
      • generatePickbatch

        public void generatePickbatch(int maxOrderReleases,
                                      int delayInMins)
                               throws ECException
        Performs the generation of pick batch if there are any eligible order releases. The order releases with 'SHIP' status for the specified fulfillment center and store will be included in the pick batch. If there are more than the maximum number of order releases, which are eligible, when a pick batch is generated. Only the maximum number of order releases are picked up in this pick batch. And the rest will be picked up by the next pick batch generation. A pack slip XML will be generated by calling GeneratePackSlipCmd command and an invoice XML may be prepared for each eligible order release. A pick ticket XML will be generated for the whole batch by calling generatePickticket() method.

        Here is the flow of events, highlighting the use of access beans, commands and other methods.

        1. InventoryJDBCHelperAccessBean.findReadyToBeShippedReleaseListByStoreentIdAndFfmcenterId
        2. UserAccessBean to get member id.
        3. PickBatchAccessBean to insert a new row specifying member id and fulfillment center and generate a pick batch identifier.
        4. Calls setPickBatchId method.
        5. StoreEntityDescriptionAccessBean to retrieve store display name.
        6. FulfillmentCenterDescriptionAccessBean to retrieve fulfilment center name.
        7. Calls GeneratePackSlipCmd for each order release.
        8. Updates OrderReleaseAccessBean with pack slip object.
        9. Calls PrepareInvoiceCmd.
        10. Calls generatePickticket method.
        11. Updates PickBatchAccessBean with pick batch object.
        Parameters:
        maxOrderReleases - maximum number of order releases in a pick batch
        delayInMins - number of minutes the past to use as criteria for selecting orders in a pick batch orders.timeplaced < current time - delayInMins minutes
        Throws:
        ECException -
        • ECSystemException Naming error, _ERR_CREATE_EXCEPTION
        • ECSystemException Finder error, _ERR_FINDER_EXCEPTION
        • ECSystemException Naming error, _ERR_NAMING_EXCEPTION
        • ECSystemException Remote error, _ERR_REMOTE_EXCEPTION
        See Also:
        GeneratePackSlipCmd, generatePickticket(java.lang.String, java.lang.String, java.lang.String), setPickBatchId(java.lang.Long)
      • generatePickticket

        public java.lang.String generatePickticket(java.lang.String pickBatchId,
                                                   java.lang.String store_name,
                                                   java.lang.String ffmcenter_name)
                                            throws ECException
        Generates the pick ticket XML for the whole batch. Uses InventoryJDBCHelperAccessBean().findPickItemsListByPickbatchId to get the list of items and some of the descriptive information, partnum and quantity. Also uses BaseItemDescriptionAccessBean to retrieve the short and long item descriptions.
        Parameters:
        pickBatchId - pick batch identifier
        store_name - store name
        ffmcenter_name - fulfillment center name
        Returns:
        Pick ticket XML.
        Throws:
        ECException -
        • ECSystemException Naming error, _ERR_CREATE_EXCEPTION
        • ECSystemException Finder error, _ERR_FINDER_EXCEPTION
        • ECSystemException Naming error, _ERR_NAMING_EXCEPTION
        • ECSystemException Remote error, _ERR_REMOTE_EXCEPTION
      • generatePickticket

        public java.lang.String generatePickticket(java.lang.String pickBatchId,
                                                   java.lang.String store_name,
                                                   java.lang.String ffmcenter_name,
                                                   boolean isExpedited)
                                            throws ECException
        Generates the pick ticket XML for the whole batch. Uses InventoryJDBCHelperAccessBean().findPickItemsListByPickbatchId to get the list of items and some of the descriptive information, partnum and quantity. Also uses BaseItemDescriptionAccessBean to retrieve the short and long item descriptions.
        Parameters:
        pickBatchId - pick batch identifier
        store_name - store name
        ffmcenter_name - fulfillment center name
        isExpedited -
        Returns:
        Pick ticket XML.
        Throws:
        ECException -
        • ECSystemException Naming error, _ERR_CREATE_EXCEPTION
        • ECSystemException Finder error, _ERR_FINDER_EXCEPTION
        • ECSystemException Naming error, _ERR_NAMING_EXCEPTION
        • ECSystemException Remote error, _ERR_REMOTE_EXCEPTION
      • reset

        public void reset()
        Resets the command local variable.
        Specified by:
        reset in interface com.ibm.websphere.command.Command
        Overrides:
        reset in class AbstractECTargetableCommand
      • getIsExpedited

        public java.lang.String getIsExpedited()
        Returns the inIsExpedited.
        Returns:
        String
      • setIsExpedited

        public void setIsExpedited(java.lang.String newIsExpedited)
        Sets the inIsExpedited.
        Parameters:
        newIsExpedited - The inIsExpedited to set
      • generatePackslip

        public java.lang.String generatePackslip(java.lang.String pickBatchId,
                                                 java.lang.String store_name,
                                                 java.lang.String ffmcenter_name,
                                                 java.lang.String order_number,
                                                 java.lang.String release_number,
                                                 java.lang.String customer_number,
                                                 java.lang.String order_date)
                                          throws ECException
        Deprecated. uses GeneratePackSlipCmd instead.
        Generates the pack slip XML for an order release.
        • Uses GeneratePackSlipCmd get the pack slip XML.
        Parameters:
        pickBatchId - pick batch identifier
        store_name - store entity name
        ffmcenter_name - fulfillment center name
        order_number - order number
        release_number - release number
        customer_number - customer number
        order_date - order date
        Returns:
        Pack slip XML for an order release.
        Throws:
        ECException
      • parsePackslipForDtd10

        public java.lang.String parsePackslipForDtd10(java.lang.String packSlipXML)
                                               throws ECApplicationException
        Generate pack slip for dtd1.0 by parsing the pack slip for dtd2.0 This method is called by PickPackListResult.jsp
        Specified by:
        parsePackslipForDtd10 in interface GeneratePickBatchCmd
        Parameters:
        packSlipXML - the pack slip XML for dtd2.0
        Returns:
        pack slip XML for dtd1.0
        Throws:
        ECApplicationException - if any exception occurs while parsing the XML
      • parsePickSlipForDtd10

        public java.lang.String parsePickSlipForDtd10(java.lang.String pickSlipXML)
                                               throws ECApplicationException
        Generate pick ticket for dtd1.0 by parsing the pick ticket for dtd2.0 This method is called by PickPackListResult.jsp
        Specified by:
        parsePickSlipForDtd10 in interface GeneratePickBatchCmd
        Parameters:
        pickSlipXML - the pick slip XML for dtd2.0
        Returns:
        pick ticket XML for dtd1.0
        Throws:
        ECApplicationException - if any exception occurs while parsing the XML