Package no.ugland.utransprod.model

Examples of no.ugland.utransprod.model.TakstolProductionV


    buttonStartetKapping.setEnabled(false);
    buttonIkkeStartetKapping.setEnabled(false);
    buttonFerdigKappet.setEnabled(false);
    buttonIkkeFerdigKappet.setEnabled(false);
    if (hasSelection) {
      TakstolProductionV takstolProductionV = (TakstolProductionV) produceable;
      if (takstolProductionV.getProbability() != null
          && takstolProductionV.getProbability() == 100
          && takstolProductionV.getCuttingStarted() == null
          && takstolProductionV.getCuttingDone() == null
          && takstolProductionV.getActionStarted() == null
          && takstolProductionV.getProduced() == null) {
        buttonStartetKapping.setEnabled(true);
      }
      if (takstolProductionV.getCuttingStarted() != null
          && takstolProductionV.getActionStarted() == null
          && takstolProductionV.getProduced() == null
          && takstolProductionV.getCuttingDone() == null) {
        buttonIkkeStartetKapping.setEnabled(true);
      }
      if (takstolProductionV.getProbability() != null
          && takstolProductionV.getProbability() == 100
          && takstolProductionV.getCuttingDone() == null
          && takstolProductionV.getActionStarted() == null
          && takstolProductionV.getProduced() == null) {
        buttonFerdigKappet.setEnabled(true);
      }
      if (takstolProductionV.getCuttingDone() != null
          && takstolProductionV.getProduced() == null
          && takstolProductionV.getActionStarted() == null) {
        buttonIkkeFerdigKappet.setEnabled(true);
      }
    }
    if (buttonShowTakstolInfo != null) {
      buttonShowTakstolInfo.setEnabled(hasSelection);
View Full Code Here


    JTableFixture tableFixture = dialogFixture
        .table(TableEnum.TABLEPRODUCTIONTAKSTOL.getTableName());

    tableFixture.cell(row(0).column(1)).click();

    TakstolProductionV takstol = (TakstolProductionV) takstolProductionViewHandler
        .getSelectedObject();
    int index = 0;
    while (takstol.getProbability() != 100 || takstol.getProduced() != null
        || takstol.getActionStarted() != null
        || takstol.getCuttingDone() != null) {
      index++;
      tableFixture.cell(row(index).column(1)).click();
      takstol = (TakstolProductionV) takstolProductionViewHandler
          .getSelectedObject();
    }

    dialogFixture.button("ButtonFerdigKappet").requireEnabled();
    dialogFixture.button("ButtonFerdigKappet").click();
    tableFixture.cell(row(index-1).column(1)).click();
    assertEquals(ColorEnum.GREEN.getColor(),tableFixture.cell(row(index).column(1)).foreground().target());

    OrderManager orderManager = (OrderManager) ModelUtil
        .getBean(OrderManager.MANAGER_NAME);
    Order order = orderManager.findByOrderNr(takstol.getOrderNr());
    orderManager.lazyLoadTree(order);
    OrderLine orderLineTakstol = order.getOrderLine("Takstoler");
    assertNotNull(orderLineTakstol.getCuttingDone());

  }
View Full Code Here

    JTableFixture tableFixture = dialogFixture
        .table(TableEnum.TABLEPRODUCTIONTAKSTOL.getTableName());

    tableFixture.cell(row(0).column(1)).click();

    TakstolProductionV takstol = (TakstolProductionV) takstolProductionViewHandler
        .getSelectedObject();
    int index = 0;
    while (takstol.getProbability() != 100 || takstol.getProduced() != null
        || takstol.getActionStarted() != null
        || takstol.getCuttingDone() == null) {
      index++;
      tableFixture.cell(row(index).column(1)).click();
      takstol = (TakstolProductionV) takstolProductionViewHandler
          .getSelectedObject();
    }

    dialogFixture.button("ButtonFerdigKappet").requireDisabled();
    dialogFixture.button("ButtonIkkeFerdigKappet").requireEnabled();
    dialogFixture.button("ButtonIkkeFerdigKappet").click();
    tableFixture.cell(row(index).column(1)).foreground().requireEqualTo(
        new Color(3,3,3));

    OrderManager orderManager = (OrderManager) ModelUtil
        .getBean(OrderManager.MANAGER_NAME);
    Order order = orderManager.findByOrderNr(takstol.getOrderNr());
    orderManager.lazyLoadTree(order);
    OrderLine orderLineTakstol = order.getOrderLine("Takstoler");
    assertNull(orderLineTakstol.getCuttingDone());
  }
View Full Code Here

    JTableFixture tableFixture = dialogFixture
        .table(TableEnum.TABLEPRODUCTIONTAKSTOL.getTableName());

    tableFixture.cell(row(0).column(1)).click();

    TakstolProductionV takstol = (TakstolProductionV) takstolProductionViewHandler
        .getSelectedObject();
    int index = 0;
    while (takstol.getProbability() != 100 || takstol.getProduced() != null
        || takstol.getActionStarted() != null
        || takstol.getCuttingStarted() != null) {
      index++;
      tableFixture.cell(row(index).column(1)).click();
      takstol = (TakstolProductionV) takstolProductionViewHandler
          .getSelectedObject();
    }

    dialogFixture.button("ButtonStartetKapping").requireEnabled();
    dialogFixture.button("ButtonStartetKapping").click();
    tableFixture.cell(row(index-1).column(1)).click();
    assertEquals(ColorEnum.BLUE.getColor(),tableFixture.cell(row(index).column(1)).foreground().target());

    OrderManager orderManager = (OrderManager) ModelUtil
        .getBean(OrderManager.MANAGER_NAME);
    Order order = orderManager.findByOrderNr(takstol.getOrderNr());
    orderManager.lazyLoadTree(order);
    OrderLine orderLineTakstol = order.getOrderLine("Takstoler");
    assertNotNull(orderLineTakstol.getCuttingStarted());

  }
View Full Code Here

    JTableFixture tableFixture = dialogFixture
        .table(TableEnum.TABLEPRODUCTIONTAKSTOL.getTableName());

    tableFixture.cell(row(0).column(1)).click();

    TakstolProductionV takstol = (TakstolProductionV) takstolProductionViewHandler
        .getSelectedObject();
    int index = 0;
    boolean funnetStartetProduksjon = false;
    while (!funnetStartetProduksjon) {
      index++;
      tableFixture.cell(row(index).column(1)).click();
      takstol = (TakstolProductionV) takstolProductionViewHandler
          .getSelectedObject();
      if (takstol.getActionStarted() != null
          && takstol.getProduced() == null) {
        funnetStartetProduksjon = true;
      }
    }

    dialogFixture.button("ButtonStartetKapping").requireDisabled();
View Full Code Here

    JTableFixture tableFixture = dialogFixture
        .table(TableEnum.TABLEPRODUCTIONTAKSTOL.getTableName());

    tableFixture.cell(row(0).column(1)).click();

    TakstolProductionV takstol = (TakstolProductionV) takstolProductionViewHandler
        .getSelectedObject();
    int index = 0;
    while (takstol.getProbability() != 100 || takstol.getProduced() != null
        || takstol.getActionStarted() != null
        || takstol.getCuttingStarted() == null||takstol.getCuttingDone()!=null) {
      index++;
      tableFixture.cell(row(index).column(1)).click();
      takstol = (TakstolProductionV) takstolProductionViewHandler
          .getSelectedObject();
    }

    dialogFixture.button("ButtonStartetKapping").requireDisabled();
    dialogFixture.button("ButtonIkkeStartetKapping").requireEnabled();
    dialogFixture.button("ButtonIkkeStartetKapping").click();
    tableFixture.cell(row(index).column(1)).foreground().requireEqualTo(
        new Color(3,3,3));

    OrderManager orderManager = (OrderManager) ModelUtil
        .getBean(OrderManager.MANAGER_NAME);
    Order order = orderManager.findByOrderNr(takstol.getOrderNr());
    orderManager.lazyLoadTree(order);
    OrderLine orderLineTakstol = order.getOrderLine("Takstoler");
    assertNull(orderLineTakstol.getCuttingStarted());
  }
View Full Code Here

    }
  }

  private Map<String, TakstolProductionV> addArticleToDefaultTakstol(
      Produceable item, Map<String, TakstolProductionV> defaultTakstolMap) {
    TakstolProductionV defaultTakstol = defaultTakstolMap.get(item
        .getOrderNr());
    defaultTakstol = defaultTakstol == null ? createDefaultTakstol(item)
        : defaultTakstol;
    defaultTakstol.addRelatedArticle(item);
    addRelatedAttributeInfo(defaultTakstol, item);
    defaultTakstolMap.put(item.getOrderNr(), defaultTakstol);
    return defaultTakstolMap;
  }
View Full Code Here

    defaultTakstol.setAttributeInfo(stringBuilder.toString());

  }

  private TakstolProductionV createDefaultTakstol(Produceable item) {
    TakstolProductionV defaultTakstol = ((TakstolProductionV) item).clone();
    defaultTakstol.setArticleName(MAIN_ARTICLE_NAME);
    return defaultTakstol;
  }
View Full Code Here

  }

  public TakstolProductionV findByOrderNrAndOrderLineId(String orderNr,
      Integer orderLineId) {
    List<Produceable> list = dao.findByOrderNr(orderNr);
    TakstolProductionV takstolProductionV = findByOrderLineId(orderLineId,
        list);
    if (takstolProductionV != null) {
      takstolProductionV
          .setRelatedArticles(takstolProductionV.getNumberOfItems() != null
              && takstolProductionV.getNumberOfItems() > 3 ? getRelatedArticles(
              takstolProductionV, list)
              : new ArrayList<Applyable>());
    }
    return takstolProductionV;
  }
View Full Code Here

TOP

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

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.