Examples of BlueprintTypeDto


Examples of lv.odylab.evemanage.integration.evedb.dto.BlueprintTypeDto

    }

    @Override
    public Calculation getCalculation(String blueprintName) throws EveDbException, InvalidNameException {
        BlueprintDetailsDto blueprintDetailsDto = eveDbGateway.getBlueprintDetailsForTypeName(blueprintName);
        BlueprintTypeDto blueprintTypeDto = blueprintDetailsDto.getBlueprintTypeDto();
        Long[] pathNodes = new Long[]{blueprintTypeDto.getProductTypeID()};
        return getCalculation(pathNodes, blueprintDetailsDto, Collections.<Long, String>emptyMap());
    }
View Full Code Here

Examples of lv.odylab.evemanage.integration.evedb.dto.BlueprintTypeDto

    public Calculation getCalculationForExpression(CalculationExpression calculationExpression) throws EveDbException, InvalidNameException {
        String blueprintTypeNameFromUrl = calculationExpression.getBlueprintTypeName();
        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.integration.evedb.dto.BlueprintTypeDto

        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");
View Full Code Here

Examples of lv.odylab.evemanage.integration.evedb.dto.BlueprintTypeDto

        return createBlueprint(blueprintTypeID, null, meLevel, peLevel, null, SharingLevel.PERSONAL.toString(), userKey);
    }

    @Override
    public Blueprint createBlueprint(Long blueprintTypeID, Long itemID, Integer meLevel, Integer peLevel, Long attachedCharacterID, String sharingLevel, Key<User> userKey) throws EveDbException {
        BlueprintTypeDto blueprintTypeDto = eveDbGateway.getBlueprintTypeByTypeID(blueprintTypeID);
        Blueprint blueprint = new Blueprint();
        blueprint.setUser(userKey);
        blueprint.setItemID(itemID);
        blueprint.setItemTypeID(blueprintTypeID);
        blueprint.setItemTypeName(blueprintTypeDto.getBlueprintTypeName());
        blueprint.setProductTypeID(blueprintTypeDto.getProductTypeID());
        blueprint.setProductTypeName(blueprintTypeDto.getProductTypeName());
        blueprint.setProductGraphicIcon(blueprintTypeDto.getProductGraphicIcon());
        blueprint.setProductTypeCategoryID(blueprintTypeDto.getProductCategoryID());
        blueprint.setProductivityLevel(peLevel);
        blueprint.setMaterialLevel(meLevel);
        if (attachedCharacterID != null) {
            Character character = characterDao.getByCharacterID(attachedCharacterID, userKey);
            blueprint.setAttachedCharacterInfo(mapper.map(character, CharacterInfo.class));
View Full Code Here

Examples of lv.odylab.evemanage.integration.evedb.dto.BlueprintTypeDto

    }

    @Override
    public lv.odylab.evemanage.client.rpc.dto.blueprint.BlueprintDetailsDto map(BlueprintDetailsDto blueprintDetailsDto, Class<lv.odylab.evemanage.client.rpc.dto.blueprint.BlueprintDetailsDto> blueprintDetailsDtoClass) {
        lv.odylab.evemanage.client.rpc.dto.blueprint.BlueprintDetailsDto blueprintDetails = new lv.odylab.evemanage.client.rpc.dto.blueprint.BlueprintDetailsDto();
        BlueprintTypeDto blueprintTypeDto = blueprintDetailsDto.getBlueprintTypeDto();
        blueprintDetails.setBlueprintTypeID(blueprintTypeDto.getBlueprintTypeID());
        blueprintDetails.setBlueprintTypeName(blueprintTypeDto.getBlueprintTypeName());
        blueprintDetails.setTechLevel(blueprintTypeDto.getTechLevel());
        blueprintDetails.setProductionTime(blueprintTypeDto.getProductionTime());
        blueprintDetails.setResearchProductivityTime(blueprintTypeDto.getResearchProductivityTime());
        blueprintDetails.setResearchMaterialTime(blueprintTypeDto.getResearchMaterialTime());
        blueprintDetails.setResearchCopyTime(blueprintTypeDto.getResearchCopyTime());
        blueprintDetails.setResearchTechTime(blueprintTypeDto.getResearchTechTime());
        blueprintDetails.setProductivityModifier(blueprintTypeDto.getProductivityModifier());
        blueprintDetails.setWasteFactor(blueprintTypeDto.getWasteFactor());

        List<MaterialDto> materials = new ArrayList<MaterialDto>();
        for (TypeMaterialDto typeMaterialDto : blueprintDetailsDto.getMaterialDtos()) {
            materials.add(map(typeMaterialDto, MaterialDto.class));
        }
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.