Package no.ugland.utransprod.model

Examples of no.ugland.utransprod.model.Order


   * @param window
   */
  void showMissingCollies(WindowInterface window) {
    Assembly assembly = (Assembly) assemblySelectionList.getSelection();
    if (assembly != null) {
      Order order = assembly.getOrder();
      Deviation deviation = assembly.getDeviation();
      List<OrderLine> missing = null;
      if (order != null) {
        orderViewHandler.lazyLoadOrder(order, new LazyLoadOrderEnum[] {
            LazyLoadOrderEnum.ORDER_LINES,
            LazyLoadOrderEnum.COMMENTS,
            LazyLoadOrderEnum.ORDER_LINE_ORDER_LINES });
        missing = order.getMissingCollies();
      } else {
        DeviationManager deviationManager = (DeviationManager) ModelUtil
            .getBean("deviationManager");
        deviationManager.lazyLoad(deviation,
            new LazyLoadDeviationEnum[] {
View Full Code Here


  }

  @Override
  void afterSaveObject(Assembly assembly, WindowInterface window) {
    try {
      Order order = assembly.getOrder();
      if (order != null) {
        order.cacheComments();
        orderViewHandler.getOrderManager().saveOrder(order);
      }
    } catch (ProTransException e) {
      Util.showErrorDialog(window, "Feil", e.getMessage());
      e.printStackTrace();
View Full Code Here

        Assembly assembly = (Assembly) assemblySelectionList
            .getElementAt(tableOrders
                .convertRowIndexToModel(assemblySelectionList
                    .getSelectionIndex()));
        Order order = assembly.getOrder();
        if (order != null) {

          DeviationViewHandler deviationViewHandler = deviationViewHandlerFactory
              .create(order, true, false, true, null, true);
          deviationViewHandler.registerDeviation(order, window);
View Full Code Here

      if (!orderCommentViewHandler.isCanceled()) {
        List<OrderComment> comments = new ArrayList<OrderComment>(
            (List<OrderComment>) presentationModel
                .getBufferedValue(AssemblyModel.PROPERTY_COMMENT_LIST));
        Order order = ((AssemblyModel) presentationModel.getBean())
            .getObject().getOrder();
        order.setCachedComment(null);
        orderComment.setOrder(order);
        comments.add(0, orderComment);
        presentationModel.setBufferedValue(
            AssemblyModel.PROPERTY_COMMENT_LIST, comments);
View Full Code Here

   * @throws ProTransException
   */
  protected void checkCompleteness(Colli colli, boolean applied)
      throws ProTransException {
    if (colli != null) {
      Order order = colli.getOrder();
      if (order != null) {
        OrderManager orderManager = (OrderManager) ModelUtil
            .getBean("orderManager");
        if (applied) {
          orderManager.lazyLoadOrder(order, new LazyLoadOrderEnum[] {
              LazyLoadOrderEnum.ORDER_LINES,
              LazyLoadOrderEnum.ORDER_LINE_ORDER_LINES });
          if (order.isDonePackage()) {
            order.setOrderComplete(Util.getCurrentDate());
            orderManager.saveOrder(order);
          }
        } else {
          order.setOrderComplete(null);
          orderManager.saveOrder(order);
        }
      } else {
        PostShipment postShipment = colli.getPostShipment();
        if (postShipment != null) {
View Full Code Here

    }
  }

  protected void refreshAndSaveOrder(final WindowInterface window,
      final OrderLine orderLine) {
    Order order = orderLine.getOrder();

    try {
      managerRepository.getOrderManager().refreshObject(order);
      order.setStatus(null);
      managerRepository.getOrderManager().saveOrder(order);
      managerRepository.getOrderLineManager().saveOrderLine(orderLine);
    } catch (ProTransException e) {
      Util.showErrorDialog(window, "Feil", e.getMessage());
      e.printStackTrace();
View Full Code Here

    ConstructionTypeArticle constructionTypeArticle = new ConstructionTypeArticle();
    ArticleType articleType = new ArticleType();
    articleType.setArticleTypeName("Port");
    constructionTypeArticle.setArticleType(articleType);
    orderLine.setConstructionTypeArticle(constructionTypeArticle);
    final Order order = new Order();
    order.setOrderNr("100");
    order.addOrderLine(orderLine);

    order.addColli(colli);
    packable = new OrderModel(order, false, false, false, null, null);
    final ColliViewHandler colliViewHandler = new ColliViewHandler(null,
        colli, packable, login, managerRepository, null);
    when(colliViewHandlerProvider.getColliViewHandler(colli)).thenReturn(
        colliViewHandler);
View Full Code Here

    /**
     * @see no.ugland.utransprod.service.OrderManager#findByOrderNr(java.lang.String)
     */
    public final Order findByOrderNr(final String orderNr) {
        Order order = new Order();
        order.setOrderNr(orderNr);
        List<Order> orders = dao.findByExample(order);
        if (orders == null || orders.size() != 1) {
            return null;
        }
        return orders.get(0);
View Full Code Here

  public void skal_sette_komplett_til_nei_dersom_det_legges_til_artikkel(){
    PresentationModel presentationModel = null;
    Login login=null;
    ManagerRepository managerRepository=null;
    OrderArticleViewHandler<Order, OrderModel> orderArticleViewHandler=new OrderArticleViewHandler<Order, OrderModel>(presentationModel, false, login, managerRepository);
    Order order=new Order();
    order.setOrderComplete(new Date());
    ArticleType newArticleType=new ArticleType();
    orderArticleViewHandler.getNewOrderLineFromArticle(order, newArticleType);
    assertNull(order.getOrderComplete());
  }
View Full Code Here

    ConstructionType constructionType = constructionTypeManager
        .findByName("A1");
    OrderLine orderLine = new OrderLine();
    orderLine.setOrdNo(7);
    orderLine.setLnNo(13);
    Order order = new Order();
    order.setProductArea(productArea);
    order.setOrderNr("100100100");
    order.setConstructionType(constructionType);
    order.addOrderLine(orderLine);
    orderLine.setArticlePath(orderLine.getGeneratedArticlePath());
    order.setDeliveryAddress("deliveryAddress");
    order.setPostalCode("4841");
    order.setPostOffice("postOffice");
    order.setOrderDate(Util.getCurrentDate());
    OrderModel orderModel = new OrderModel(order, false, true, true, null,
        null);
    orderModel.setCustomerNr("100000");
    orderModel.setCustomerFirstName("test");
    orderModel.setCustomerLastName("testesen");
View Full Code Here

TOP

Related Classes of no.ugland.utransprod.model.Order

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.