CZT
2023-10-11 564295458c720206db9b5194b90481b711f4b010
igds-basic/src/main/java/com/ld/igds/grain/manager/GrainManager.java
@@ -810,15 +810,19 @@
        GrainData grainData;
        Building building;
        String height;
        Double length;
        //直径
        Double diameter;
        Double bulkWeight;
        Double storage = 0.0;
        Double volume = 0.0;
        Double deVolume;
        for (Depot depot : depotList) {
            //获取仓房信息,设置建筑高度
            height = null;
            //获取仓房直径
            length = 0.0;
            diameter = 0.0;
            deVolume = 0.0;
            //容重
            bulkWeight = depot.getBulkWeight();
            grainData = coreGrainService.listLiquidHeight(companyId, depot.getId());
@@ -833,7 +837,10 @@
                        height = building.getHeight() + "";
                    }
                    if (null != building.getLength()) {
                        length = building.getLength();
                        diameter = building.getLength();
                    }
                    if (null != building.getDeVolume()) {
                        deVolume = building.getDeVolume();
                    }
                }
            }
@@ -842,7 +849,9 @@
            grainData.setDepotHeight(height);
            if (null != bulkWeight && StringUtils.isNotEmpty(grainData.getOilHeight())) {
                Double oilHeight = Double.valueOf(grainData.getOilHeight());
                storage = 3.14 * Math.pow(length / 2, 2) * oilHeight * bulkWeight;
                //计算体积
                volume = 3.14 * Math.pow(diameter / 2, 2) * oilHeight  - deVolume;
                storage = volume * bulkWeight;
            }
            grainData.setStorage(storage);