Examples of Calculation


Examples of com.nykredit.kundeservice.tcm.datatypes.calculations.Calculation

         System.getenv("username").equalsIgnoreCase("RUNE")){  
        if (colIndex > 1 && this.getTableHeader().getCursor().getType() != Cursor.E_RESIZE_CURSOR && header != "Estimat**" && header != "Krav***"){
         
          tooltip = "<html><b>" + rowName + ":</b><br><br>";
          if(value instanceof Calculation) {
            Calculation calc = (Calculation)value;
            String[] tooltips = calc.getToolTipInformation();
            if(calc.getToolTipInformation() != null){
              for(String t : tooltips){

                tooltip += t + "<br>";
              }
            tooltip += "</html>";
View Full Code Here

Examples of lv.odylab.evemanage.domain.calculation.Calculation

        String blueprintTypeName = securityManager.decodeUrlString(blueprintTypeNameFromUrl);
        calculationExpression.setBlueprintTypeName(blueprintTypeName);
        BlueprintDetailsDto blueprintDetailsDto = eveDbGateway.getBlueprintDetailsForTypeName(blueprintTypeName);
        BlueprintTypeDto blueprintTypeDto = blueprintDetailsDto.getBlueprintTypeDto();
        Long[] pathNodes = new Long[]{blueprintTypeDto.getProductTypeID()};
        Calculation calculation = getCalculation(pathNodes, blueprintDetailsDto, calculationExpression.getPriceSetItemTypeIdToPriceMap());
        calculation.setMaterialLevel(calculationExpression.getMeLevel());
        calculation.setProductivityLevel(calculationExpression.getPeLevel());
        return calculation;
    }
View Full Code Here

Examples of lv.odylab.evemanage.domain.calculation.Calculation

        calculation.setProductivityLevel(calculationExpression.getPeLevel());
        return calculation;
    }

    private Calculation getCalculation(Long[] pathNodes, BlueprintDetailsDto blueprintDetailsDto, Map<Long, String> priceSetItemTypeIdToPriceMap) {
        Calculation calculation = new Calculation();
        BlueprintTypeDto blueprintTypeDto = blueprintDetailsDto.getBlueprintTypeDto();
        calculation.setBlueprintTypeID(blueprintTypeDto.getBlueprintTypeID());
        calculation.setBlueprintTypeName(blueprintTypeDto.getBlueprintTypeName());
        calculation.setProductTypeID(blueprintTypeDto.getProductTypeID());
        calculation.setProductTypeCategoryID(blueprintTypeDto.getProductCategoryID());
        calculation.setProductTypeName(blueprintTypeDto.getProductTypeName());
        calculation.setProductGraphicIcon(blueprintTypeDto.getProductGraphicIcon());
        calculation.setMaterialLevel(0);
        calculation.setProductivityLevel(0);
        calculation.setWasteFactor(blueprintTypeDto.getWasteFactor());
        calculation.setPrice("0.00");

        List<TypeMaterialDto> materialDtos = blueprintDetailsDto.getMaterialDtos();
        List<TypeRequirementDto> requirementDtos = blueprintDetailsDto.getManufacturingRequirementDtos();
        List<CalculationItem> calculationItems = new ArrayList<CalculationItem>();

        for (TypeMaterialDto materialDto : materialDtos) {
            CalculationItem calculationItem = new CalculationItem();
            PathExpression pathExpression = new PathExpression(pathNodes, calculation.getMaterialLevel(), calculation.getProductivityLevel(), materialDto.getMaterialTypeID());
            calculationItem.setPath(pathExpression.getPath());
            calculationItem.setItemTypeID(materialDto.getMaterialTypeID());
            calculationItem.setItemCategoryID(materialDto.getMaterialTypeCategoryID());
            calculationItem.setItemTypeName(materialDto.getMaterialTypeName());
            calculationItem.setItemTypeIcon(materialDto.getMaterialTypeGraphicIcon());
            calculationItem.setQuantity(materialDto.getQuantity());
            calculationItem.setParentQuantity(1L);
            calculationItem.setPerfectQuantity(materialDto.getQuantity());
            calculationItem.setWasteFactor(blueprintTypeDto.getWasteFactor());
            calculationItem.setDamagePerJob("1.00");
            String price = priceSetItemTypeIdToPriceMap.get(materialDto.getMaterialTypeID());
            calculationItem.setPrice(price == null ? "0.00" : price);
            calculationItem.setTotalPrice("0.00");
            calculationItem.setTotalPriceForParent("0.00");
            calculationItems.add(calculationItem);
        }

        for (TypeRequirementDto requirementDto : requirementDtos) {
            if (requirementDto.getRequiredTypeCategoryID() == 16L) {
                continue;
            }
            CalculationItem calculationItem = new CalculationItem();
            PathExpression pathExpression = new PathExpression(pathNodes, requirementDto.getRequiredTypeID());
            calculationItem.setPath(pathExpression.getPath());
            calculationItem.setItemTypeID(requirementDto.getRequiredTypeID());
            calculationItem.setItemCategoryID(requirementDto.getRequiredTypeCategoryID());
            calculationItem.setItemTypeName(requirementDto.getRequiredTypeName());
            calculationItem.setItemTypeIcon(requirementDto.getRequiredTypeNameGraphicIcon());
            calculationItem.setQuantity(requirementDto.getQuantity());
            calculationItem.setParentQuantity(1L);
            calculationItem.setPerfectQuantity(requirementDto.getQuantity());
            calculationItem.setWasteFactor(blueprintTypeDto.getWasteFactor());
            calculationItem.setDamagePerJob(requirementDto.getDamagePerJob());
            String price = priceSetItemTypeIdToPriceMap.get(requirementDto.getRequiredTypeID());
            calculationItem.setPrice(price == null ? "0.00" : price);
            calculationItem.setTotalPrice("0.00");
            calculationItem.setTotalPriceForParent("0.00");
            calculationItems.add(calculationItem);
        }
        calculation.setItems(calculationItems);
        return calculation;
    }
View Full Code Here

Examples of lv.odylab.evemanage.domain.calculation.Calculation

        return itemTypeDtosForClient;
    }

    @Override
    public CalculationDto getQuickCalculation(String blueprintName) throws EveDbException, InvalidNameException {
        Calculation calculation = applicationFacade.getCalculation(blueprintName);
        return mapper.map(calculation, CalculationDto.class);
    }
View Full Code Here

Examples of lv.odylab.evemanage.domain.calculation.Calculation

        return mapper.map(calculation, CalculationDto.class);
    }

    @Override
    public CalculationDto getQuickCalculationForExpression(CalculationExpression calculationExpression) throws EveDbException, InvalidNameException {
        Calculation calculation = applicationFacade.getCalculationForExpression(calculationExpression);
        return mapper.map(calculation, CalculationDto.class);
    }
View Full Code Here

Examples of lv.odylab.evemanage.domain.calculation.Calculation

        return mapper.map(calculation, CalculationDto.class);
    }

    @Override
    public CalculationDto getQuickCalculation(Long[] pathNodes, String blueprintName) throws EveDbException, InvalidNameException {
        Calculation calculation = applicationFacade.getCalculation(pathNodes, blueprintName);
        return mapper.map(calculation, CalculationDto.class);
    }
View Full Code Here

Examples of lv.odylab.evemanage.domain.calculation.Calculation

        return mapper.map(calculation, CalculationDto.class);
    }

    @Override
    public CalculationDto getQuickCalculation(Long[] pathNodes, Long blueprintProductTypeID) throws EveDbException, InvalidNameException, InvalidItemTypeException {
        Calculation calculation = applicationFacade.getCalculation(pathNodes, blueprintProductTypeID);
        return mapper.map(calculation, CalculationDto.class);
    }
View Full Code Here

Examples of org.glassfish.jersey.examples.rx.domain.Calculation

    public Calculation calculation(@PathParam("from") @DefaultValue("Moon") final String from,
                                   @PathParam("to") final String to) {
        // Simulate long-running operation.
        Helper.sleep(350);

        return new Calculation(from, to, new Random().nextInt(10000));
    }
View Full Code Here

Examples of org.thechiselgroup.choosel.core.client.util.math.Calculation

                        ((FirstResourcePropertyResolver) resolver)
                                .getProperty());
            } else if (resolver instanceof CalculationResolver) {
                child.setValue(MEMENTO_KEY_TYPE, MEMENTO_VALUE_CALCULATION);

                Calculation calculation = ((CalculationResolver) resolver)
                        .getCalculation();
                child.setValue(MEMENTO_KEY_PROPERTY,
                        ((CalculationResolver) resolver).getProperty());

                if (calculation instanceof SumCalculation) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.