/**
   * 获取待备货的发货项
   *
   * @return
   */
  public List<OrderShipment> getShipments4Picking() {
    String hql =
        "select os, so.customerFirstname, so.customerLastname from OrderShipment os, SalesOrder so where os.salesOrder.salesOrderId=so.salesOrderId and os.status=? and so.isOnHold!=?";
    List list =
        this.findByHql(hql, OrderConstants.SHIPMENT_STATUS_PICKING_AVAILABLE, Constants.FLAG_TRUE);
    List<OrderShipment> orderShipments = new ArrayList<OrderShipment>();
    if (list != null)
      for (int i = 0; i < list.size(); i++) {
        Object[] array = (Object[]) list.get(i);
        OrderShipment orderShipment = (OrderShipment) array[0];
        orderShipment.setCustomerFirstname((String) array[1]);
        orderShipment.setCustomerLastname((String) array[2]);
        orderShipments.add(orderShipment);
      }

    return orderShipments;
  }