diff --git a/dntd-common/pom.xml b/dntd-common/pom.xml
index a2857de..0295f1a 100644
--- a/dntd-common/pom.xml
+++ b/dntd-common/pom.xml
@@ -10,7 +10,7 @@
dntd-common
- 1.1-SNAPSHOT
+ 1.0-SNAPSHOT
8
diff --git a/dntd-common/src/main/java/com/dky/utils/entity/SysDeviceHeatScene.java b/dntd-common/src/main/java/com/dky/utils/entity/SysDeviceHeatScene.java
index b88c9ee..c76a3b4 100644
--- a/dntd-common/src/main/java/com/dky/utils/entity/SysDeviceHeatScene.java
+++ b/dntd-common/src/main/java/com/dky/utils/entity/SysDeviceHeatScene.java
@@ -25,6 +25,14 @@ public class SysDeviceHeatScene {
private Double laborCost ;
//单台设备可参考供暖面积
private Double devReferenceArea;
+ /** 单台电设备参考的工作容积(立方米) */
+ private Double devWorkArea ;
+ /** 产品密度(千克/立方米) */
+ private Double productDensity ;
+ /** 单台电设备制造一批产品的产量(kg) */
+ private Double manufactProduct ;
+ /** 单台电设备制造一批产品的周期(小时) */
+ private Double manufactCycle ;
//设备使用年限
private Integer devServiceLife;
//设备年运行时长
@@ -48,7 +56,43 @@ public class SysDeviceHeatScene {
this.recomMaxPeopleNum = recomMaxPeopleNum;
}
- public SysDeviceHeatScene(Integer id, String devType, String devSubType, String devTechType, Double heatEfficiency, Double devPower, Double devPrice, Double devSubstituteLaborCost, Double laborCost, Double devReferenceArea, Integer devServiceLife, Integer devAnnualOperationTime, String remark) {
+ public Double getDevWorkArea() {
+ return devWorkArea;
+ }
+
+ public void setDevWorkArea(Double devWorkArea) {
+ this.devWorkArea = devWorkArea;
+ }
+
+ public Double getProductDensity() {
+ return productDensity;
+ }
+
+ public void setProductDensity(Double productDensity) {
+ this.productDensity = productDensity;
+ }
+
+ public Double getManufactProduct() {
+ return manufactProduct;
+ }
+
+ public void setManufactProduct(Double manufactProduct) {
+ this.manufactProduct = manufactProduct;
+ }
+
+ public Double getManufactCycle() {
+ return manufactCycle;
+ }
+
+ public void setManufactCycle(Double manufactCycle) {
+ this.manufactCycle = manufactCycle;
+ }
+
+ public SysDeviceHeatScene(Integer id, String devType, String devSubType, String devTechType, Double heatEfficiency, Double devPower,
+ Double devPrice, Double devSubstituteLaborCost, Double laborCost, Double devReferenceArea, Integer devServiceLife,
+ Integer devAnnualOperationTime, Integer minPeople, Integer maxPeople,
+ Double devWorkArea, Double productDensity, Double manufactProduct, Double manufactCycle,
+ String remark) {
this.id = String.valueOf(id);
this.devType = devType;
this.devSubType = devSubType;
@@ -61,6 +105,12 @@ public class SysDeviceHeatScene {
this.devReferenceArea = devReferenceArea;
this.devServiceLife = devServiceLife;
this.devAnnualOperationTime = devAnnualOperationTime;
+ this.recomMinPeopleNum = minPeople;
+ this.recomMaxPeopleNum = maxPeople;
+ this.devWorkArea = devWorkArea;
+ this.productDensity = productDensity;
+ this.manufactProduct = manufactProduct;
+ this.manufactCycle = manufactCycle;
this.remark = remark;
}
diff --git a/dntd-common/src/main/java/com/dky/utils/enums/DeviceSubType.java b/dntd-common/src/main/java/com/dky/utils/enums/DeviceSubType.java
index 07ae6b4..3b97724 100644
--- a/dntd-common/src/main/java/com/dky/utils/enums/DeviceSubType.java
+++ b/dntd-common/src/main/java/com/dky/utils/enums/DeviceSubType.java
@@ -4,8 +4,10 @@ package com.dky.utils.enums;
public enum DeviceSubType {
Boiler_Heating(0101, "工业供热电锅炉"),
+ Kitchen_Cooking(0102, "电厨炊"),
Cooling_Heating(0201, "供冷/暖"),
- Cooling_Heating_Electric_Boiler(0202, "供冷/暖电锅炉");
+ Cooling_Heating_Electric_Boiler(0202, "供冷/暖电锅炉"),
+ Material_Kiln(0203, "建材电窑炉");
/**
diff --git a/dntd-common/src/main/java/com/dky/utils/enums/EnergyPriceType.java b/dntd-common/src/main/java/com/dky/utils/enums/EnergyPriceType.java
new file mode 100644
index 0000000..8e5e743
--- /dev/null
+++ b/dntd-common/src/main/java/com/dky/utils/enums/EnergyPriceType.java
@@ -0,0 +1,33 @@
+package com.dky.utils.enums;
+
+
+public enum EnergyPriceType {
+
+ Residential_Electric_Price(0.55, "居民电价"),
+ Industry_Electric_Price(1.2, "工业电价"),
+ COAL_PRICE_PER_KILOGRAM(0.9, "煤炭平均价格/千克");
+
+
+ /**
+ * 能源价格
+ */
+ private final Double price;
+ /**
+ * 描述
+ */
+ private final String desc;
+
+ public Double getPrice() {
+ return price;
+ }
+
+ public String getDesc() {
+ return desc;
+ }
+
+ EnergyPriceType(Double price, String desc) {
+ this.price = price;
+ this.desc = desc;
+ }
+
+}
diff --git a/dntd-model-buildheating/pom.xml b/dntd-model-buildheating/pom.xml
index 79fcc8d..4eafd5b 100644
--- a/dntd-model-buildheating/pom.xml
+++ b/dntd-model-buildheating/pom.xml
@@ -10,7 +10,7 @@
dntd-model-buildheating
- 1.1-SNAPSHOT
+ 1.0-SNAPSHOT
8
diff --git a/dntd-model-buildheating/src/main/java/com/dky/calculate/BuildHeatingModel.java b/dntd-model-buildheating/src/main/java/com/dky/calculate/BuildHeatingModel.java
index a138f6b..319d431 100644
--- a/dntd-model-buildheating/src/main/java/com/dky/calculate/BuildHeatingModel.java
+++ b/dntd-model-buildheating/src/main/java/com/dky/calculate/BuildHeatingModel.java
@@ -1,6 +1,8 @@
package com.dky.calculate;
+import com.dky.utils.enums.EnergyPriceType;
+
public class BuildHeatingModel {
// 定义常量
@@ -35,7 +37,7 @@ public class BuildHeatingModel {
Double devicePower,
Integer days,
Double laborCost){
- return (deviceNum * devicePower * days * 24 * 0.5) + (laborCost * deviceNum);
+ return (deviceNum * devicePower * days * 24 * EnergyPriceType.Residential_Electric_Price.getPrice()) + (laborCost * deviceNum);
}
/**
@@ -54,7 +56,7 @@ public class BuildHeatingModel {
Double devicePower,
Integer days,
Double laborCost){
- double run = (deviceNum * devicePower * days * 24 * 0.5) + (laborCost * deviceNum);
+ double run = (deviceNum * devicePower * days * 24 * EnergyPriceType.Residential_Electric_Price.getPrice()) + (laborCost * deviceNum);
return ((deviceNum * devicePrice) / useYears) + run;
}
@@ -62,21 +64,17 @@ public class BuildHeatingModel {
* 年减碳
* @param lastYearFee 上年运行费用
* @param oldLaborCost 原设备的人工费用
- * @param deviceNum 电锅炉设备台数
- * @param devicePower 单台电锅炉的功率
- * @param days 年采暖(供冷)时间(天)
+ * @param electricCost 电替代设备年耗电量
* @return
*/
public static Double calculateAnnualCarbonReduction(Double lastYearFee,
Double oldLaborCost,
- Integer deviceNum,
- Double devicePower,
- Integer days){
+ Double electricCost){
// 计算煤炭减少的碳排放量
double coalReduction = (lastYearFee - oldLaborCost) / COAL_PRICE_PER_KILOGRAM * STANDARD_COAL_CONVERSION_FACTOR;
// 计算电替代设备增加的碳排放量
- double electricityIncrease = getElectric(deviceNum, devicePower, days) * ELECTRICITY_SUBSTITUTION_CONVERSION_FACTOR;
+ double electricityIncrease = electricCost * ELECTRICITY_SUBSTITUTION_CONVERSION_FACTOR;
// 计算总的年减碳量
return (coalReduction - electricityIncrease) * CO2_CONVERSION_FACTOR;
diff --git a/dntd-model-heatboiler/pom.xml b/dntd-model-heatboiler/pom.xml
index 844a501..e1deaeb 100644
--- a/dntd-model-heatboiler/pom.xml
+++ b/dntd-model-heatboiler/pom.xml
@@ -37,7 +37,7 @@
com.dky
dntd-common
- 1.1-SNAPSHOT
+ 1.0-SNAPSHOT
compile
diff --git a/dntd-model-heatboiler/src/main/java/com/dky/calculate/Advantage.java b/dntd-model-heatboiler/src/main/java/com/dky/calculate/Advantage.java
index d927284..760832e 100644
--- a/dntd-model-heatboiler/src/main/java/com/dky/calculate/Advantage.java
+++ b/dntd-model-heatboiler/src/main/java/com/dky/calculate/Advantage.java
@@ -20,8 +20,8 @@ public class Advantage {
* @return
*/
public static String economy(Double firstInvestFee ,Double yearRunFee, Double lastYearFee){
- // 运行收益 = 年运行费用-上年运行费用(即原设备运行费用)
- Double hsq = Math.round((yearRunFee - lastYearFee) * 100.0)/100.0;
+ // 运行收益 = 上年运行费用(即原设备运行费用)- 今年运行费用
+ Double hsq = Math.round((lastYearFee - yearRunFee) * 100.0)/100.0;
// 投资回收期 = 初次投资费用/运行收益
Double js = Math.round((firstInvestFee / hsq) * 100.0)/100.0;
return "本次改造投资回收期为"+js+"年,本改造方案相比较原技术节省年运行费用成本"+decimalFormat.format(hsq)+"元。";
diff --git a/dntd-model-heatboiler/src/main/java/com/dky/calculate/HeatBoilerModel.java b/dntd-model-heatboiler/src/main/java/com/dky/calculate/HeatBoilerModel.java
index 807f1d9..153ff66 100644
--- a/dntd-model-heatboiler/src/main/java/com/dky/calculate/HeatBoilerModel.java
+++ b/dntd-model-heatboiler/src/main/java/com/dky/calculate/HeatBoilerModel.java
@@ -3,6 +3,7 @@ package com.dky.calculate;
import com.dky.entity.Heatboiler;
import com.dky.entity.HeatboilerSpec;
import com.dky.entity.OriginalDevice;
+import com.dky.utils.enums.EnergyPriceType;
public class HeatBoilerModel {
@@ -45,7 +46,7 @@ public class HeatBoilerModel {
// 电替代设备年耗电量=单台电替代设备的功率*电替代设备台数*电设备年运行时间
double annualElectricityConsumption = devicePower * deviceCount * deviceAnnualOperationTime;
// 年运行费用=电替代设备年耗电量*平均电价(0.5元/千瓦时) + 单台电替代设备人工费用成本 * 台数
- return annualElectricityConsumption * 0.5 + deviceSubstituteLaborCost * deviceCount;
+ return annualElectricityConsumption * EnergyPriceType.Industry_Electric_Price.getPrice() + deviceSubstituteLaborCost * deviceCount;
}
diff --git a/dntd-model-kitchencooking/pom.xml b/dntd-model-kitchencooking/pom.xml
new file mode 100644
index 0000000..90ebe7d
--- /dev/null
+++ b/dntd-model-kitchencooking/pom.xml
@@ -0,0 +1,39 @@
+
+
+ 4.0.0
+
+ com.dky
+ dntd-model-tools
+ 1.1-SNAPSHOT
+
+
+ dntd-model-kitchencooking
+ 1.0-SNAPSHOT
+
+
+ 8
+ 8
+ UTF-8
+
+
+
+
+ cn.hutool
+ hutool-all
+ 5.4.5
+
+
+ com.dky
+ dntd-modelI
+ 1.0-SNAPSHOT
+
+
+ com.dky
+ dntd-common
+ 1.0-SNAPSHOT
+
+
+
+
\ No newline at end of file
diff --git a/dntd-model-kitchencooking/src/main/java/com/dky/calculate/KitchenCookModel.java b/dntd-model-kitchencooking/src/main/java/com/dky/calculate/KitchenCookModel.java
new file mode 100644
index 0000000..5637505
--- /dev/null
+++ b/dntd-model-kitchencooking/src/main/java/com/dky/calculate/KitchenCookModel.java
@@ -0,0 +1,70 @@
+package com.dky.calculate;
+
+
+import com.dky.utils.enums.EnergyPriceType;
+
+public class KitchenCookModel {
+
+ private static final double ELECTIRC_PRICE_KILOWATT_HOUR = EnergyPriceType.Residential_Electric_Price.getPrice(); // 居民平均电价(0.55元/千瓦时)
+ private static final double COAL_PRICE_PER_KILOGRAM = 0.9; // 煤炭的平均价格,单位:元/千克
+ private static final double STANDARD_COAL_CONVERSION_FACTOR = 0.7143; // 千克标准煤/千克
+ private static final double CO2_CONVERSION_FACTOR = 1.9003; // 千克二氧化碳/千克
+ private static final double ELECTRICITY_SUBSTITUTION_CONVERSION_FACTOR = 0.1229; // 千克标准煤/千瓦时
+
+ /**
+ * 计算电厨炊年耗电量
+ * @param powerPerUnit 设备功率
+ * @param numberOfUnits 设备台数
+ * @param annualOperatingHours 电设备年运行时间
+ * @return 单台电厨炊的功率 * 电厨炊设备台数 * 电设备年运行时间
+ */
+ public static double calculateAnnualElectricityConsumption(double powerPerUnit, int numberOfUnits, int annualOperatingHours) {
+ return powerPerUnit * numberOfUnits * annualOperatingHours;
+ }
+
+ /**
+ * 计算年运行费用
+ * @param powerPerUnit 设备功率
+ * @param numberOfUnits 设备台数
+ * @param annualOperatingHours 电设备年运行时间
+ * @param laborCostForReplacement 电替代设备人工费用成本
+ * @return 电厨炊年耗电量 *平均电价(0.55元/千瓦时) + 电替代设备人工费用成本
+ */
+ public static double calculateAnnualOperatingCost(double powerPerUnit, int numberOfUnits, int annualOperatingHours, double laborCostForReplacement) {
+ return calculateAnnualElectricityConsumption(powerPerUnit, numberOfUnits, annualOperatingHours) * ELECTIRC_PRICE_KILOWATT_HOUR + laborCostForReplacement;
+ }
+
+ /**
+ * 计算总年费用
+ * @param numberOfUnits 电厨炊设备台数
+ * @param pricePerUnit 单台电设备价格
+ * @param usefulLifeYears 电厨炊的使用年限
+ * @param powerPerUnit 设备功率
+ * @param annualOperatingHours 电设备年运行时间
+ * @param laborCostForReplacement 电替代设备人工费用成本
+ * @return (电厨炊设备台数 *单台电设备价格)/电厨炊的使用年限 + 年运行费用
+ */
+ public static double calculateTotalAnnualCost(int numberOfUnits, double pricePerUnit, int usefulLifeYears, double powerPerUnit, int annualOperatingHours, double laborCostForReplacement) {
+ double initialCost = numberOfUnits * pricePerUnit;
+ double depreciationCost = initialCost / usefulLifeYears;
+ return depreciationCost + calculateAnnualOperatingCost(powerPerUnit, numberOfUnits, annualOperatingHours, laborCostForReplacement);
+ }
+
+ /**
+ * 计算年减碳量
+ * @param lastYearFee 上年运行费用
+ * @param laborCostForOriginalDevice 原设备人工费用
+ * @param annualElectricityConsumption 电替代设备年耗电量
+ * @return 年减碳量=[(上年运行费用-原设备的人工费用)/煤炭平均价格(0.9元/千克)*0.7143千克标准煤/千克-电替代设备年耗电量*0.1229千克标准煤/千瓦时]*1.9003千克二氧化碳/千克
+ */
+ public static double calculateAnnualCarbonReduction(double lastYearFee, double laborCostForOriginalDevice, double annualElectricityConsumption) {
+ // (上年运行费用-原设备的人工费用)/煤炭平均价格(0.9元/千克)*0.7143千克标准煤/千克
+ double coalEquivalentFromPreviousYear = (lastYearFee - laborCostForOriginalDevice) / COAL_PRICE_PER_KILOGRAM * STANDARD_COAL_CONVERSION_FACTOR;
+ // 电替代设备年耗电量 * 0.1229千克标准煤
+ double electricityEquivalent = annualElectricityConsumption * ELECTRICITY_SUBSTITUTION_CONVERSION_FACTOR;
+ // (上年运行费用-原设备的人工费用)/煤炭平均价格(0.9元/千克)*0.7143千克标准煤/千克-电替代设备年耗电量*0.1229千克标准煤/千瓦时
+ double netReductionInCoalEquivalent = coalEquivalentFromPreviousYear - electricityEquivalent;
+ return netReductionInCoalEquivalent * CO2_CONVERSION_FACTOR;
+ }
+
+}
diff --git a/dntd-model-kitchencooking/src/main/java/com/dky/calculate/KitchenCookScheme.java b/dntd-model-kitchencooking/src/main/java/com/dky/calculate/KitchenCookScheme.java
new file mode 100644
index 0000000..8a68973
--- /dev/null
+++ b/dntd-model-kitchencooking/src/main/java/com/dky/calculate/KitchenCookScheme.java
@@ -0,0 +1,54 @@
+package com.dky.calculate;
+
+
+import com.dky.utils.entity.SysDeviceHeatScene;
+import com.dky.utils.result.MatchedDevice;
+
+import java.util.*;
+import java.util.stream.Collectors;
+
+public class KitchenCookScheme {
+
+ public static List getCookDevices(Integer peopleNum, List sysDeviceHeatSceneList) {
+ // 获取烹饪设备类型最少推荐使用人数
+ Integer cookDeviceType = getCookDeviceType(peopleNum, sysDeviceHeatSceneList);
+
+ List collect = sysDeviceHeatSceneList.stream().filter(SysDeviceHeatScene -> Objects.equals(SysDeviceHeatScene.getRecomMinPeopleNum(), cookDeviceType)).collect(Collectors.toList());
+
+ List list = new ArrayList<>();
+
+ collect.forEach((device) ->{
+ list.add(new MatchedDevice(1, device));
+ });
+
+ return list;
+ }
+
+ public static Integer getCookDeviceType(Integer peopleNum, List sysDeviceHeatSceneList) {
+ ArrayList collect = sysDeviceHeatSceneList.stream().collect(
+ Collectors.collectingAndThen(
+ Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(SysDeviceHeatScene::getRecomMinPeopleNum))),
+ ArrayList::new
+ )
+ );
+
+ IntSummaryStatistics intSummaryStatistics = collect.stream().mapToInt(SysDeviceHeatScene::getRecomMinPeopleNum).summaryStatistics();
+
+ for (SysDeviceHeatScene s : collect){
+ if (s.getRecomMinPeopleNum() >= intSummaryStatistics.getMax()){
+ return s.getRecomMinPeopleNum();
+ } else {
+ boolean f1 = peopleNum >= s.getRecomMinPeopleNum();
+ boolean f2 = peopleNum <= s.getRecomMaxPeopleNum();
+ if (f1 && f2){
+ return s.getRecomMinPeopleNum();
+ }
+ }
+ }
+ return 1;
+ }
+
+
+
+
+}
diff --git a/dntd-model-materialkiln/pom.xml b/dntd-model-materialkiln/pom.xml
new file mode 100644
index 0000000..a22d68d
--- /dev/null
+++ b/dntd-model-materialkiln/pom.xml
@@ -0,0 +1,40 @@
+
+
+ 4.0.0
+
+ com.dky
+ dntd-model-tools
+ 1.1-SNAPSHOT
+
+
+ dntd-model-materialkiln
+ 1.0-SNAPSHOT
+
+
+ 8
+ 8
+ UTF-8
+
+
+
+
+ cn.hutool
+ hutool-all
+ 5.4.5
+
+
+ com.dky
+ dntd-modelI
+ 1.0-SNAPSHOT
+
+
+ com.dky
+ dntd-common
+ 1.0-SNAPSHOT
+ compile
+
+
+
+
\ No newline at end of file
diff --git a/dntd-model-materialkiln/src/main/java/com/dky/calculate/MaterialKilnModel.java b/dntd-model-materialkiln/src/main/java/com/dky/calculate/MaterialKilnModel.java
new file mode 100644
index 0000000..6a2be52
--- /dev/null
+++ b/dntd-model-materialkiln/src/main/java/com/dky/calculate/MaterialKilnModel.java
@@ -0,0 +1,126 @@
+package com.dky.calculate;
+
+
+import com.dky.utils.enums.EnergyPriceType;
+
+public class MaterialKilnModel {
+
+ // 标准煤转换系数:千克标准煤/千克
+ private static final double coalConversionFactor = 0.7143;
+ // 电能转换到标准煤的系数:千克标准煤/千瓦时
+ private static final double electricityConversionFactor = 0.1229;
+ // 标准煤转换到二氧化碳的系数:千克二氧化碳/千克标准煤
+ private static final double carbonConversionFactor = 1.9003;
+
+ /**
+ * 计算初次投资费用
+ *
+ * @param productDensity 产品的密度
+ * @param furnaceWorkingVolume 电窑炉的工作容积
+ * @param expectedAnnualOutput 预计年产量
+ * @param batchProductionHours 单台电设备制造一批产品的周期小时
+ * @param equipmentAnnualHours 单台设备年运行时间
+ * @param singleEquipmentPrice 单台电设备价格
+ * @return 包含计算结果的对象
+ */
+ public static Double calculateProduction(
+ Double productDensity,
+ Double furnaceWorkingVolume,
+ Double expectedAnnualOutput,
+ Double batchProductionHours,
+ Double equipmentAnnualHours,
+ Double singleEquipmentPrice
+ ) {
+ // 单台电设备制造一批产品的产量 = 产品的密度*电窑炉的工作容积
+ double singleBatchProduction = productDensity * furnaceWorkingVolume;
+
+ // 电替代设备台数 = (预计年产量*单台电设备制造一批产品的周期小时)/(单台电设备制造一批产品的产量*单台设备年运行时间)
+ double equipmentCount = (expectedAnnualOutput * batchProductionHours) /
+ (singleBatchProduction * equipmentAnnualHours);
+
+ // 初次投资费用 = 电替代设备台数*单台电设备价格
+ return equipmentCount * singleEquipmentPrice;
+
+ }
+
+
+ /**
+ * 计算年运行费用
+ *
+ * @param devicePower 电替代设备功率
+ * @param deviceCount 电替代设备台数
+ * @param deviceSubstituteLaborCost 电替代设备人工费用
+ * @param deviceAnnualOperationTime 电替代设备年运行时间
+ * @return 年运行费用
+ */
+ public static double calculateAnnualOperatingCost(Double devicePower, Integer deviceCount, Double deviceSubstituteLaborCost, Integer deviceAnnualOperationTime) {
+
+ // 电替代设备年耗电量=单台电替代设备的功率*电替代设备台数*电设备年运行时间
+ double annualElectricityConsumption = devicePower * deviceCount * deviceAnnualOperationTime;
+ // 年运行费用=电替代设备年耗电量*工业平均电价(1.2元/千瓦时) + 单台电替代设备人工费用成本 * 台数
+ return annualElectricityConsumption * EnergyPriceType.Industry_Electric_Price.getPrice() + deviceSubstituteLaborCost * deviceCount;
+
+ }
+
+ /**
+ * 计算年总费用
+ *
+ * @param devicePower 电替代设备功率
+ * @param deviceCount 电替代设备台数
+ * @param deviceSubstituteLaborCost 电替代设备人工费用
+ * @param deviceAnnualOperationTime 电替代设备年运行时间
+ * @param devicePrice 设备价格
+ * @param deviceServiceLife 设备使用年限
+ * @return
+ */
+ public static double calculateAnnualTotalCost(Double devicePower, Integer deviceCount, Double deviceSubstituteLaborCost, Integer deviceAnnualOperationTime, Double devicePrice, Integer deviceServiceLife) {
+ //(电替代设备台数*单台电设备价格)/电替代设备的使用年限
+ double v = ((devicePrice * deviceCount) / deviceServiceLife);
+ // 年总费用 =(电替代设备台数*单台电设备价格)/电替代设备的使用年限 + 年运行费用
+ return v + calculateAnnualOperatingCost(devicePower, deviceCount, deviceSubstituteLaborCost, deviceAnnualOperationTime);
+ }
+
+ /**
+ * 计算年减碳量。
+ *
+ * @param previousYearOperatingCost 上年运行费用
+ * @param originalEquipmentLaborCost 原设备的人工费用
+ * @param electricitySubstitutionAnnualConsumption 电替代设备年耗电量
+ * @return 年减碳量
+ */
+ public static double calculateAnnualCarbonReduction(
+ Double previousYearOperatingCost,
+ Double originalEquipmentLaborCost,
+ Double electricitySubstitutionAnnualConsumption
+ ) {
+ // 计算节约的煤炭量(转换为标准煤)=(上年运行费用-原设备的人工费用)/煤炭平均价格(0.9元/千克)*0.7143千克标准煤/千克
+ double savedCoalInStandardCoal = (previousYearOperatingCost - originalEquipmentLaborCost) /
+ EnergyPriceType.COAL_PRICE_PER_KILOGRAM.getPrice() * coalConversionFactor;
+
+ // 计算电替代设备消耗的电量转换为标准煤的量
+ double electricityInStandardCoal = electricitySubstitutionAnnualConsumption * electricityConversionFactor;
+
+ // 计算总的节约的标准煤量
+ double totalSavedStandardCoal = savedCoalInStandardCoal - electricityInStandardCoal;
+
+ // 计算年减碳量
+ return totalSavedStandardCoal * carbonConversionFactor;
+ }
+
+ /**
+ * 计算电替代设备年耗电量
+ *
+ * @param devicePower 设备功率
+ * @param deviceCount 设备台数
+ * @param deviceAnnualOperationTime 单台电设备年运行时间
+ * @return
+ */
+ public static double calculateSubstituteElectricity(Double devicePower, Integer deviceCount, Integer deviceAnnualOperationTime) {
+ // 电替代设备年耗电量 = 电替代设备的功率 * 电替代设备台数 * 电设备年运行时间
+ return devicePower * deviceCount * deviceAnnualOperationTime;
+
+ }
+
+
+
+}
diff --git a/dntd-model-materialkiln/src/main/java/com/dky/calculate/MaterialKilnScheme.java b/dntd-model-materialkiln/src/main/java/com/dky/calculate/MaterialKilnScheme.java
new file mode 100644
index 0000000..259847e
--- /dev/null
+++ b/dntd-model-materialkiln/src/main/java/com/dky/calculate/MaterialKilnScheme.java
@@ -0,0 +1,37 @@
+package com.dky.calculate;
+
+
+import com.dky.utils.entity.SysDeviceHeatScene;
+import com.dky.utils.result.MatchedDevice;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class MaterialKilnScheme {
+
+
+ public static List calSchemeByTechType(Double workArea, List sysDeviceHeatSceneList) {
+ // 对技术类型下的设备list按照单台设备工作容积进行排序
+ sysDeviceHeatSceneList.sort((o1, o2) -> Double.compare(o2.getDevWorkArea(), o1.getDevWorkArea()));
+ Double remainArea = workArea;
+ // 遍历设备,根据工作容积进行匹配设备数量
+ List matchedDeviceList = new ArrayList<>();
+ for (SysDeviceHeatScene deviceHeatScene : sysDeviceHeatSceneList) {
+ double v = remainArea / deviceHeatScene.getDevWorkArea();
+ int count = (int) (v);
+ if (v < 1) {
+ count = count + 1;
+ }
+ remainArea = remainArea - count * deviceHeatScene.getDevWorkArea();
+ matchedDeviceList.add(new MatchedDevice(count, deviceHeatScene));
+ if (remainArea <= 0) {
+ // 当总供暖面积已经满足需求时,跳出循环,不再选择其他设备
+ break;
+ }
+ }
+ return matchedDeviceList;
+ }
+
+
+
+}
diff --git a/dntd-tool/pom.xml b/dntd-tool/pom.xml
index 2ebe441..7793ada 100644
--- a/dntd-tool/pom.xml
+++ b/dntd-tool/pom.xml
@@ -52,7 +52,7 @@
com.dky
dntd-common
- 1.1-SNAPSHOT
+ 1.0-SNAPSHOT
compile
@@ -61,6 +61,18 @@
1.1-SNAPSHOT
compile
+
+ com.dky
+ dntd-model-kitchencooking
+ 1.0-SNAPSHOT
+ compile
+
+
+ com.dky
+ dntd-model-materialkiln
+ 1.0-SNAPSHOT
+ compile
+
diff --git a/dntd-tool/src/main/java/com/dky/generate/BuildHeatingScene.java b/dntd-tool/src/main/java/com/dky/generate/BuildHeatingScene.java
index d0431a1..a54fac6 100644
--- a/dntd-tool/src/main/java/com/dky/generate/BuildHeatingScene.java
+++ b/dntd-tool/src/main/java/com/dky/generate/BuildHeatingScene.java
@@ -25,9 +25,10 @@ public class BuildHeatingScene implements DntdModelI {
@Override
public JSONObject createReport(JSONObject jsonObject,List sceneList) {
- List list = GetTargetDeviceList.main(DeviceSubType.Cooling_Heating.getDesc(), sceneList);
- List alternateDeviceList = GetTargetDeviceList.main(DeviceSubType.Cooling_Heating_Electric_Boiler.getDesc(), list);
- System.out.println("建筑供暖场景: " + alternateDeviceList + "\n");
+ List list1 = GetTargetDeviceList.main(DeviceSubType.Cooling_Heating.getDesc(), sceneList);
+ List list2 = GetTargetDeviceList.main(DeviceSubType.Cooling_Heating_Electric_Boiler.getDesc(), sceneList);
+ List alternateDeviceList = new ArrayList<>(list1);
+ alternateDeviceList.addAll(list2);
JSONObject distInfo = new JSONObject();
JSONObject buildInfo = new JSONObject();
@@ -158,6 +159,7 @@ public class BuildHeatingScene implements DntdModelI {
Double runCost = 0.0;
Double allCost = 0.0;
Double calculateAnnualCarbon = 0.0;
+ Double laborFee1 = 0.0;
Double electric = 0.0;
List> deviceList = new ArrayList<>();
for (MatchedDevice matchedDevice : matchedDeviceList){
@@ -168,10 +170,14 @@ public class BuildHeatingScene implements DntdModelI {
map.put("devPrice",matchedDevice.getDeviceHeatScene().getDevPrice());
deviceList.add(map);
startCost = startCost + (matchedDevice.getCount() * matchedDevice.getDeviceHeatScene().getDevPrice());
+
runCost = runCost + (BuildHeatingModel.getRunCost(matchedDevice.getCount(), matchedDevice.getDeviceHeatScene().getDevPower(), days, matchedDevice.getDeviceHeatScene().getDevSubstituteLaborCost()));
+
allCost = allCost + (BuildHeatingModel.getYearCost(matchedDevice.getCount(), matchedDevice.getDeviceHeatScene().getDevPrice(), matchedDevice.getDeviceHeatScene().getDevServiceLife(), matchedDevice.getDeviceHeatScene().getDevPower(), days, matchedDevice.getDeviceHeatScene().getDevSubstituteLaborCost()));
+
electric = electric + (BuildHeatingModel.getElectric(matchedDevice.getCount(), matchedDevice.getDeviceHeatScene().getDevPower(), days));
- calculateAnnualCarbon = calculateAnnualCarbon + (BuildHeatingModel.calculateAnnualCarbonReduction(lastYearFee, matchedDevice.getCount() * matchedDevice.getDeviceHeatScene().getLaborCost(), matchedDevice.getCount(), matchedDevice.getDeviceHeatScene().getDevPower(), days));
+
+ laborFee1 = laborFee1 + (matchedDevice.getCount() * matchedDevice.getDeviceHeatScene().getDevPrice() / matchedDevice.getDeviceHeatScene().getDevServiceLife());
}
//初次投资费用
@@ -183,6 +189,7 @@ public class BuildHeatingScene implements DntdModelI {
//年总费用
returnJsonObject.set("yearCost", decimalFormat.format(allCost));
//年减碳量
+ calculateAnnualCarbon = BuildHeatingModel.calculateAnnualCarbonReduction(lastYearFee, laborFee1, electric);
returnJsonObject.set("calculate", decimalFormat.format(calculateAnnualCarbon/1000));
//替代电量
returnJsonObject.set("electric", decimalFormat.format(electric));
diff --git a/dntd-tool/src/main/java/com/dky/generate/KitchenCookScene.java b/dntd-tool/src/main/java/com/dky/generate/KitchenCookScene.java
new file mode 100644
index 0000000..efba660
--- /dev/null
+++ b/dntd-tool/src/main/java/com/dky/generate/KitchenCookScene.java
@@ -0,0 +1,133 @@
+package com.dky.generate;
+
+import cn.hutool.json.JSONObject;
+import com.dky.calculate.*;
+import com.dky.modelI.DntdModelI;
+import com.dky.utils.GetTargetDeviceList;
+import com.dky.utils.entity.SysDeviceHeatScene;
+import com.dky.utils.enums.DeviceSubType;
+import com.dky.utils.result.MatchedDevice;
+
+import java.text.DecimalFormat;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class KitchenCookScene implements DntdModelI {
+
+ DecimalFormat decimalFormat = new DecimalFormat("#.00");
+
+ // 首先A=由运行/合同容量折合成kW(x0.9)x85%,
+ static final Double COEFFICIENT_1 = 0.9;
+ static final Double COEFFICIENT_2 = 0.85;
+
+ @Override
+ public JSONObject createReport(JSONObject jsonObject, List sceneList) {
+ List alternateDeviceList = GetTargetDeviceList.main(DeviceSubType.Kitchen_Cooking.getDesc(), sceneList);
+
+ JSONObject distInfo = new JSONObject();
+
+ try{
+ distInfo = (JSONObject) jsonObject.get("distInfo");
+ } catch (Exception e){
+ e.printStackTrace();
+ }
+
+ // 运行容量
+ Double runCapacity = Double.parseDouble(distInfo.get("runCapacity").toString());
+ // 上年最大需量
+ Double lastYearNeed = Double.parseDouble(distInfo.get("lastYearNeed").toString());
+ // 上年运行费用(万元)
+ Double lastYearFee = Double.parseDouble(jsonObject.get("lastYearFee").toString());
+ // 人数
+ Integer peopleNum = Integer.parseInt(jsonObject.get("peopleNum").toString());
+
+ /*
+ 实际可承载容量A = 运行(或合同容量)x0.9[将运行容量或合同容量折算成容量]x85%
+ */
+ double A = runCapacity * COEFFICIENT_1 * COEFFICIENT_2;
+
+ /*
+ 根据人数计算出不同技术类型下所需要不同功率设备数据
+ */
+ List cookDevices = KitchenCookScheme.getCookDevices(peopleNum, alternateDeviceList);
+ /*
+ 替代后设备总功率C1
+ */
+ double C1 = 0.0;
+
+ for (MatchedDevice matchedDevice : cookDevices){
+ C1 = C1 + matchedDevice.getDeviceHeatScene().getDevPower() * matchedDevice.getCount();
+ }
+
+ /*
+ 改造后最大需量D1
+ */
+ double D1 = lastYearNeed + C1;
+
+ String remark = "";
+ if ( A < D1){
+ remark = "本方案存在扩容投资需求,扩容投资不计入初次投资费用";
+ }
+
+
+ /*
+ 封装返回
+ */
+ JSONObject returnJsonObject = new JSONObject();
+ Double startCost = 0.0;
+ Double runCost = 0.0;
+ Double allCost = 0.0;
+ Double calculateAnnualCarbon = 0.0;
+ Double laborCost = 0.0;
+ Double electric = 0.0;
+ List> deviceList = new ArrayList<>();
+ for (MatchedDevice matchedDevice : cookDevices){
+ HashMap map = new HashMap<>();
+ map.put("devSubType",matchedDevice.getDeviceHeatScene().getDevSubType());
+ map.put("devTechType",matchedDevice.getDeviceHeatScene().getDevTechType());
+ map.put("devCount",matchedDevice.getCount());
+ map.put("devPrice",matchedDevice.getDeviceHeatScene().getDevPrice());
+ deviceList.add(map);
+
+ startCost = startCost + (matchedDevice.getCount() * matchedDevice.getDeviceHeatScene().getDevPrice());
+
+ runCost = runCost + (KitchenCookModel.calculateAnnualOperatingCost(matchedDevice.getDeviceHeatScene().getDevPower(), matchedDevice.getCount(), matchedDevice.getDeviceHeatScene().getDevAnnualOperationTime(), matchedDevice.getDeviceHeatScene().getDevSubstituteLaborCost()));
+
+ allCost = allCost + (KitchenCookModel.calculateTotalAnnualCost(matchedDevice.getCount(), matchedDevice.getDeviceHeatScene().getDevPrice(), matchedDevice.getDeviceHeatScene().getDevServiceLife(),
+ matchedDevice.getDeviceHeatScene().getDevPower(), matchedDevice.getDeviceHeatScene().getDevAnnualOperationTime(), matchedDevice.getDeviceHeatScene().getDevSubstituteLaborCost()));
+
+ electric = electric + (KitchenCookModel.calculateAnnualElectricityConsumption(matchedDevice.getDeviceHeatScene().getDevPower(), matchedDevice.getCount(), matchedDevice.getDeviceHeatScene().getDevAnnualOperationTime()));
+
+ laborCost = laborCost + (matchedDevice.getCount() * matchedDevice.getDeviceHeatScene().getLaborCost() / matchedDevice.getDeviceHeatScene().getDevServiceLife());
+
+ }
+ //初次投资费用
+ returnJsonObject.set("startCost", decimalFormat.format(startCost));
+ // 设备总价
+ returnJsonObject.set("devCost", decimalFormat.format(startCost));
+ //年运行费用
+ returnJsonObject.set("yearRunCost", decimalFormat.format(runCost));
+ //年总费用
+ returnJsonObject.set("yearCost", decimalFormat.format(allCost));
+ //年减碳量
+ calculateAnnualCarbon = KitchenCookModel.calculateAnnualCarbonReduction(lastYearFee, laborCost, electric);
+ returnJsonObject.set("calculate", decimalFormat.format(calculateAnnualCarbon/1000));
+ //替代电量
+ returnJsonObject.set("electric", decimalFormat.format(electric));
+ //备注
+ returnJsonObject.set("remark",remark);
+ //封装需配置设备情况
+ returnJsonObject.set("deviceList",deviceList);
+
+ //封装方案优势
+ returnJsonObject.set("safety", BuildHeatingAdvantage.safety());
+ returnJsonObject.set("economy", Advantage.economy(startCost, runCost, lastYearFee));
+ returnJsonObject.set("intelligence", BuildHeatingAdvantage.intelligence());
+ returnJsonObject.set("environment", BuildHeatingAdvantage.environment(Double.valueOf(decimalFormat.format(calculateAnnualCarbon/1000))));
+
+ return returnJsonObject;
+ }
+
+}
diff --git a/dntd-tool/src/main/java/com/dky/generate/MaterialKilnScene.java b/dntd-tool/src/main/java/com/dky/generate/MaterialKilnScene.java
new file mode 100644
index 0000000..93991d7
--- /dev/null
+++ b/dntd-tool/src/main/java/com/dky/generate/MaterialKilnScene.java
@@ -0,0 +1,131 @@
+package com.dky.generate;
+
+import cn.hutool.json.JSONObject;
+import com.dky.calculate.*;
+import com.dky.modelI.DntdModelI;
+import com.dky.utils.GetTargetDeviceList;
+import com.dky.utils.entity.SysDeviceHeatScene;
+import com.dky.utils.enums.DeviceSubType;
+import com.dky.utils.result.MatchedDevice;
+
+import java.text.DecimalFormat;
+import java.util.*;
+
+public class MaterialKilnScene implements DntdModelI {
+
+ DecimalFormat decimalFormat = new DecimalFormat("#.00");
+
+ // 首先A=由运行/合同容量折合成kW(x0.9)x85%,
+ static final Double COEFFICIENT_1 = 0.9;
+ static final Double COEFFICIENT_2 = 0.85;
+
+
+ @Override
+ public JSONObject createReport(JSONObject jsonObject, List list) {
+
+ List alternateDeviceList = GetTargetDeviceList.main(DeviceSubType.Material_Kiln.getDesc(), list);
+ // System.out.println("工业锅炉供热: " + alternateDeviceList + "\n");
+
+ JSONObject distInfo = new JSONObject();
+ JSONObject heatUseNeedInfo = new JSONObject();
+ JSONObject originalDevInfo = new JSONObject();
+
+ try {
+ distInfo = (JSONObject) jsonObject.get("distInfo");
+ heatUseNeedInfo = (JSONObject) jsonObject.get("heatUseNeedInfo");
+ originalDevInfo = (JSONObject) jsonObject.get("originalDevInfo");
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ // 运行容量
+ Double runCapacity = Double.parseDouble(distInfo.get("runCapacity").toString());
+ // 上年最大需量
+ Double lastYearNeed = Double.parseDouble(distInfo.get("lastYearNeed").toString());
+ // 工作容积(单位: m³)【 1 立方米=1000 升 】
+ Double workArea = Double.parseDouble(heatUseNeedInfo.get("workArea").toString()) / 1000;
+ // 预计年产量(吨)
+ Double yearOutPut = Double.parseDouble(heatUseNeedInfo.get("yearOutPut").toString());
+ // 上年运行费用(元)
+ Double lastYearFee = Double.parseDouble(originalDevInfo.get("lastYearFee").toString());
+
+ // 根据供热需量设备功率计算出不同技术类型下所需要不同功率设备数据
+ List matchedDeviceGroupList = MaterialKilnScheme.calSchemeByTechType(workArea, alternateDeviceList);
+
+ // 实际可承载容量A = 运行(或合同容量)x0.9 [将运行容量或合同容量折算成容量] x85%
+ double A = runCapacity * COEFFICIENT_1 * COEFFICIENT_2;
+ // 根据供热需量设备功率计算每个技术类型下需要的不同功率的设备的数量,然后将不同功率及对应的数量进行计算得出总功率C1,取最大
+ Double C1 = CalC.getC1(Collections.singletonList(matchedDeviceGroupList));
+
+ // 改造后最大需量
+ double D1 = lastYearNeed + C1;
+
+ String remark = "";
+
+ // 同时考虑热泵和电锅炉
+ if (A < D1) {
+ remark = "本方案存在扩容投资需求,扩容投资不计入初次投资费用";
+ }
+
+
+ /*
+ 封装返回
+ */
+ JSONObject returnJsonObject = new JSONObject();
+ Double startCost = 0.0;
+ Double runCost = 0.0;
+ Double allCost = 0.0;
+ Double calculateAnnualCarbon = 0.0;
+ Double laborFee1 = 0.0;
+ Double electric = 0.0;
+ List> deviceList = new ArrayList<>();
+ for (MatchedDevice matchedDevice : matchedDeviceGroupList) {
+ HashMap map = new HashMap<>();
+ map.put("devSubType", matchedDevice.getDeviceHeatScene().getDevSubType());
+ map.put("devTechType", matchedDevice.getDeviceHeatScene().getDevTechType());
+ map.put("devCount", matchedDevice.getCount());
+ map.put("devPrice", matchedDevice.getDeviceHeatScene().getDevPrice());
+ deviceList.add(map);
+
+ startCost = startCost + (matchedDevice.getCount() * matchedDevice.getDeviceHeatScene().getDevPrice());
+
+ runCost = runCost + (MaterialKilnModel.calculateAnnualOperatingCost(matchedDevice.getDeviceHeatScene().getDevPower(), matchedDevice.getCount(), matchedDevice.getDeviceHeatScene().getDevSubstituteLaborCost(), matchedDevice.getDeviceHeatScene().getDevAnnualOperationTime()));
+
+ allCost = allCost + (MaterialKilnModel.calculateAnnualTotalCost(matchedDevice.getDeviceHeatScene().getDevPower(), matchedDevice.getCount(), matchedDevice.getDeviceHeatScene().getDevSubstituteLaborCost(),
+ matchedDevice.getDeviceHeatScene().getDevAnnualOperationTime(), matchedDevice.getDeviceHeatScene().getDevPrice(), matchedDevice.getDeviceHeatScene().getDevServiceLife()));
+
+ electric = electric + (MaterialKilnModel.calculateSubstituteElectricity(matchedDevice.getDeviceHeatScene().getDevPower(), matchedDevice.getCount(), matchedDevice.getDeviceHeatScene().getDevAnnualOperationTime()));
+
+ laborFee1 = laborFee1 + (matchedDevice.getCount() * matchedDevice.getDeviceHeatScene().getDevPrice() / matchedDevice.getDeviceHeatScene().getDevServiceLife());
+
+ }
+ //初次投资费用
+ returnJsonObject.set("startCost", decimalFormat.format(startCost));
+ // 设备总价
+ returnJsonObject.set("devCost", decimalFormat.format(startCost));
+ //年运行费用
+ returnJsonObject.set("yearRunCost", decimalFormat.format(runCost));
+ //年总费用
+ returnJsonObject.set("yearCost", decimalFormat.format(allCost));
+ //年减碳量
+ calculateAnnualCarbon = MaterialKilnModel.calculateAnnualCarbonReduction(lastYearFee, laborFee1, electric);
+ returnJsonObject.set("calculate", decimalFormat.format(calculateAnnualCarbon / 1000));
+ //替代电量
+ returnJsonObject.set("electric", decimalFormat.format(electric));
+ //备注
+ returnJsonObject.set("remark", remark);
+ //封装需配置设备情况
+ returnJsonObject.set("deviceList", deviceList);
+
+ //封装方案优势
+ returnJsonObject.set("safety", BuildHeatingAdvantage.safety());
+ returnJsonObject.set("economy", Advantage.economy(startCost, runCost, lastYearFee));
+ returnJsonObject.set("intelligence", BuildHeatingAdvantage.intelligence());
+ returnJsonObject.set("environment", BuildHeatingAdvantage.environment(Double.valueOf(decimalFormat.format(calculateAnnualCarbon / 1000))));
+
+
+ return returnJsonObject;
+ }
+
+
+}
diff --git a/dntd-tool/src/main/java/com/dky/test/TestMain.java b/dntd-tool/src/main/java/com/dky/test/TestMain.java
index a5eb27c..64ec534 100644
--- a/dntd-tool/src/main/java/com/dky/test/TestMain.java
+++ b/dntd-tool/src/main/java/com/dky/test/TestMain.java
@@ -11,12 +11,8 @@ package com.dky.test;
import cn.hutool.json.JSONObject;
-import com.dky.calculate.HeatBoilerScheme;
-import com.dky.calculate.Scheme;
-import com.dky.calculate.SchemeRating;
import com.dky.tool.ModelTool;
import com.dky.utils.entity.SysDeviceHeatScene;
-import com.dky.utils.result.MatchedDevice;
import java.util.ArrayList;
import java.util.List;
@@ -26,18 +22,28 @@ public class TestMain {
public static void main(String[] args) {
JSONObject param = new JSONObject();
- param.put("type", "0102");
- param.put("costRatio", 0.2);
- param.put("effRatio", 0.8);
+ param.put("type", "0104");
+ /*param.put("lastYearFee", 500000.2);
+ param.put("peopleNum", 88);*/
param.put("distInfo", new JSONObject()
.put("runCapacity", 2400.0)
.put("lastYearNeed", 1600.0));
param.put("heatUseNeedInfo", new JSONObject()
+ .put("workArea", 33)
+ .put("yearOutPut", 1000000.0));
+ param.put("originalDevInfo", new JSONObject()
+ .put("previousYearEnergyUsage", 24090000)
+ .put("lastYearFee", 3150000));
+ /*param.put("buildInfo", new JSONObject()
+ .put("days", 185)
+ .put("heatingArea", 48000)
+ .put("lastYearFee", 3000000));*/
+ /*param.put("heatUseNeedInfo", new JSONObject()
.put("heatingNeedPower", 33)
.put("thermometerValueOut", 112.45));
param.put("originalDevInfo", new JSONObject()
.put("previousYearEnergyUsage", 24090000)
- .put("lastYearFee", 3000000));
+ .put("lastYearFee", 3000000));*/
String key = "GWnQ4RqqTc8n1Uj59xLoUtv975fmQsRWuvsk1zRmQu9TwIvlc6FTekndKMh+vMuRbI2bxdmuIxyZndYcg9u5xVa+HaiBZRP8OZFYIAo+66vDVlkBf47Nh2srjFyIXlLH";
// 构建JSONObject对象
@@ -52,64 +58,80 @@ public class TestMain {
}
-
-
- public static ListcreateDevList(){
+ public static List createDevList() {
List deviceList = new ArrayList<>();
// 模拟从数据库中检索数据
Object[][] data =
{
- {1, "电锅炉", "工业供热电锅炉", "直热式电锅炉(电阻类)", 0.95, 360.00, 80000.00, 60000.00, 180000.00, 3000.00, 15, 4500, null},
- {2, "电锅炉", "工业供热电锅炉", "直热式电锅炉(电阻类)", 0.95, 720.00, 100000.00, 60000.00, 180000.00, 6000.00, 15, 4500, null},
- {3, "电锅炉", "工业供热电锅炉", "直热式电锅炉(电阻类)", 0.95, 1440.00, 160000.00, 60000.00, 180000.00, 12000.00, 15, 4500, null},
- {4, "电锅炉", "工业供热电锅炉", "直热式电锅炉(电极类)", 0.97, 360.00, 280000.00, 60000.00, 180000.00, 3000.00, 15, 4500, null},
- {5, "电锅炉", "工业供热电锅炉", "直热式电锅炉(电极类)", 0.97, 720.00, 460000.00, 60000.00, 180000.00, 6000.00, 15, 4500, null},
- {6, "电锅炉", "工业供热电锅炉", "直热式电锅炉(电极类)", 0.97, 1440.00, 900000.00, 60000.00, 180000.00, 12000.00, 15, 4500, null},
- {7, "电锅炉", "工业供热电锅炉", "直热式电锅炉(电磁涡流类)", 0.98, 360.00, 150000.00, 60000.00, 180000.00, 3000.00, 15, 4500, null},
- {8, "电锅炉", "工业供热电锅炉", "直热式电锅炉(电磁涡流类)", 0.98, 720.00, 180000.00, 60000.00, 180000.00, 6000.00, 15, 4500, null},
- {9, "电锅炉", "工业供热电锅炉", "直热式电锅炉(电磁涡流类)", 0.98, 1440.00, 300000.00, 60000.00, 180000.00, 12000.00, 15, 4500, null},
- {10, "电锅炉", "工业供热电锅炉", "蓄热式电锅炉(固体蓄热)", 0.95, 360.00, 360000.00, 60000.00, 180000.00, 3000.00, 15, 4500, null},
- {11, "电锅炉", "工业供热电锅炉", "蓄热式电锅炉(固体蓄热)", 0.95, 720.00, 720000.00, 60000.00, 180000.00, 6000.00, 15, 4500, null},
- {12, "电锅炉", "工业供热电锅炉", "蓄热式电锅炉(固体蓄热)", 0.95, 1440.00, 1440000.00, 60000.00, 180000.00, 12000.00, 15, 4500, null},
- {13, "电锅炉", "工业供热电锅炉", "蓄热式电锅炉(相变蓄热)", 0.98, 360.00, 120000.00, 60000.00, 180000.00, 3000.00, 15, 4500, null},
- {14, "电锅炉", "工业供热电锅炉", "蓄热式电锅炉(相变蓄热)", 0.98, 720.00, 160000.00, 60000.00, 180000.00, 6000.00, 15, 4500, null},
- {15, "电锅炉", "工业供热电锅炉", "蓄热式电锅炉(相变蓄热)", 0.98, 1440.00, 280000.00, 60000.00, 180000.00, 12000.00, 15, 4500, null},
- {16, "电锅炉", "工业供热电锅炉", "蓄热式电锅炉(水蓄)", 0.97, 360.00, 110000.00, 60000.00, 180000.00, 3000.00, 15, 4500, null},
- {17, "电锅炉", "工业供热电锅炉", "蓄热式电锅炉(水蓄)", 0.97, 720.00, 150000.00, 60000.00, 180000.00, 6000.00, 15, 4500, null},
- {18, "电锅炉", "工业供热电锅炉", "蓄热式电锅炉(水蓄)", 0.97, 1440.00, 260000.00, 60000.00, 180000.00, 12000.00, 15, 4500, null},
- {19, "电锅炉", "供冷/暖电锅炉", "直热式电锅炉(电阻类)", 0.95, 360.00, 80000.00, 60000.00, 180000.00, 3000.00, 15, null, null},
- {20, "电锅炉", "供冷/暖电锅炉", "直热式电锅炉(电阻类)", 0.95, 720.00, 100000.00, 60000.00, 180000.00, 6000.00, 15, null, null},
- {21, "电锅炉", "供冷/暖电锅炉", "直热式电锅炉(电阻类)", 0.95, 1440.00, 160000.00, 60000.00, 180000.00, 12000.00, 15, null, null},
- {22, "电锅炉", "供冷/暖电锅炉", "直热式电锅炉(电极类)", 0.97, 360.00, 280000.00, 60000.00, 180000.00, 3000.00, 15, null, null},
- {23, "电锅炉", "供冷/暖电锅炉", "直热式电锅炉(电极类)", 0.97, 720.00, 460000.00, 60000.00, 180000.00, 6000.00, 15, null, null},
- {24, "电锅炉", "供冷/暖电锅炉", "直热式电锅炉(电极类)", 0.97, 1440.00, 900000.00, 60000.00, 180000.00, 12000.00, 15, null, null},
- {25, "电锅炉", "供冷/暖电锅炉", "直热式电锅炉(电磁涡流类)", 0.98, 360.00, 150000.00, 60000.00, 180000.00, 3000.00, 15, null, null},
- {26, "电锅炉", "供冷/暖电锅炉", "直热式电锅炉(电磁涡流类)", 0.98, 720.00, 180000.00, 60000.00, 180000.00, 6000.00, 15, null, null},
- {27, "电锅炉", "供冷/暖电锅炉", "直热式电锅炉(电磁涡流类)", 0.98, 1440.00, 300000.00, 60000.00, 180000.00, 12000.00, 15, null, null},
- {28, "电锅炉", "供冷/暖电锅炉", "蓄热式电锅炉(固体蓄热)", 0.95, 360.00, 360000.00, 60000.00, 180000.00, 3000.00, 15, null, null},
- {29, "电锅炉", "供冷/暖电锅炉", "蓄热式电锅炉(固体蓄热)", 0.95, 720.00, 720000.00, 60000.00, 180000.00, 6000.00, 15, null, null},
- {30, "电锅炉", "供冷/暖电锅炉", "蓄热式电锅炉(固体蓄热)", 0.95, 1440.00, 1440000.00, 60000.00, 180000.00, 12000.00, 15, null, null},
- {31, "电锅炉", "供冷/暖电锅炉", "蓄热式电锅炉(相变蓄热)", 0.98, 360.00, 120000.00, 60000.00, 180000.00, 3000.00, 15, null, null},
- {32, "电锅炉", "供冷/暖电锅炉", "蓄热式电锅炉(相变蓄热)", 0.98, 720.00, 160000.00, 60000.00, 180000.00, 6000.00, 15, null, null},
- {33, "电锅炉", "供冷/暖电锅炉", "蓄热式电锅炉(相变蓄热)", 0.98, 1440.00, 280000.00, 60000.00, 180000.00, 12000.00, 15, null, null},
- {34, "电锅炉", "供冷/暖电锅炉", "蓄热式电锅炉(水蓄)", 0.97, 360.00, 110000.00, 60000.00, 180000.00, 3000.00, 15, null, null},
- {35, "电锅炉", "供冷/暖电锅炉", "蓄热式电锅炉(水蓄)", 0.97, 720.00, 150000.00, 60000.00, 180000.00, 6000.00, 15, null, null},
- {36, "电锅炉", "供冷/暖电锅炉", "蓄热式电锅炉(水蓄)", 0.97, 1440.00, 260000.00, 60000.00, 180000.00, 12000.00, 15, null, null},
- {37, "热泵", "供冷/暖", "水源热泵", 4.00, 25.00, 45000.00, 60000.00, 180000.00, 500.00, 15, null, null},
- {38, "热泵", "供冷/暖", "水源热泵", 4.00, 45.00, 75000.00, 60000.00, 180000.00, 1000.00, 15, null, null},
- {39, "热泵", "供冷/暖", "水源热泵", 4.00, 90.00, 140000.00, 60000.00, 180000.00, 2000.00, 15, null, null},
- {40, "热泵", "供冷/暖", "土壤源热泵", 4.00, 25.00, 45000.00, 60000.00, 180000.00, 500.00, 15, null, null},
- {41, "热泵", "供冷/暖", "土壤源热泵", 4.00, 45.00, 75000.00, 60000.00, 180000.00, 1000.00, 15, null, null},
- {42, "热泵", "供冷/暖", "土壤源热泵", 4.00, 90.00, 140000.00, 60000.00, 180000.00, 2000.00, 15, null, null},
- {43, "热泵", "供冷/暖", "空气源热泵", 4.00, 25.00, 45000.00, 60000.00, 180000.00, 500.00, 15, null, null},
- {44, "热泵", "供冷/暖", "空气源热泵", 4.00, 45.00, 75000.00, 60000.00, 180000.00, 1000.00, 15, null, null},
- {45, "热泵", "供冷/暖", "空气源热泵", 4.00, 90.00, 140000.00, 60000.00, 180000.00, 2000.00, 15, null, null},
- {46, "热泵", "供冷/暖", "低品位余热源(如电厂低温循环水)热泵", 4.00, 25.00, 45000.00, 60000.00, 180000.00, 500.00, 15, null, null},
- {47, "热泵", "供冷/暖", "低品位余热源(如电厂低温循环水)热泵", 4.00, 45.00, 75000.00, 60000.00, 180000.00, 1000.00, 15, null, null},
- {48, "热泵", "供冷/暖", "低品位余热源(如电厂低温循环水)热泵", 4.00, 90.00, 140000.00, 60000.00, 180000.00, 2000.00, 15, null, null},
- {49, "热泵", "供冷/暖", "高温蒸汽热泵", 3.00, 45.00, 380000.00, 60000.00, 180000.00, 1000.00, 15, null, null},
- {50, "热泵", "供冷/暖", "高温蒸汽热泵", 3.00, 120.00, 550000.00, 60000.00, 180000.00, 2000.00, 15, null, null},
+ {1, "电锅炉", "工业供热电锅炉", "直热式电锅炉(电阻类)", 0.95, 360.00, 80000.00, 60000.00, 180000.00, 3000.00, 15, 4500, null, null,null,null,null,null},
+ {2, "电锅炉", "工业供热电锅炉", "直热式电锅炉(电阻类)", 0.95, 720.00, 100000.00, 60000.00, 180000.00, 6000.00, 15, 4500, null, null,null,null,null,null},
+ {3, "电锅炉", "工业供热电锅炉", "直热式电锅炉(电阻类)", 0.95, 1440.00, 160000.00, 60000.00, 180000.00, 12000.00, 15, 4500, null, null,null,null,null,null},
+ {4, "电锅炉", "工业供热电锅炉", "直热式电锅炉(电极类)", 0.97, 360.00, 280000.00, 60000.00, 180000.00, 3000.00, 15, 4500, null, null,null,null,null,null},
+ {5, "电锅炉", "工业供热电锅炉", "直热式电锅炉(电极类)", 0.97, 720.00, 460000.00, 60000.00, 180000.00, 6000.00, 15, 4500, null, null,null,null,null,null},
+ {6, "电锅炉", "工业供热电锅炉", "直热式电锅炉(电极类)", 0.97, 1440.00, 900000.00, 60000.00, 180000.00, 12000.00, 15, 4500, null, null,null,null,null,null},
+ {7, "电锅炉", "工业供热电锅炉", "直热式电锅炉(电磁涡流类)", 0.98, 360.00, 150000.00, 60000.00, 180000.00, 3000.00, 15, 4500, null, null,null,null,null,null},
+ {8, "电锅炉", "工业供热电锅炉", "直热式电锅炉(电磁涡流类)", 0.98, 720.00, 180000.00, 60000.00, 180000.00, 6000.00, 15, 4500, null, null,null,null,null,null},
+ {9, "电锅炉", "工业供热电锅炉", "直热式电锅炉(电磁涡流类)", 0.98, 1440.00, 300000.00, 60000.00, 180000.00, 12000.00, 15, 4500, null, null,null,null,null,null},
+ {10, "电锅炉", "工业供热电锅炉", "蓄热式电锅炉(固体蓄热)", 0.95, 360.00, 360000.00, 60000.00, 180000.00, 3000.00, 15, 4500, null, null,null,null,null,null},
+ {11, "电锅炉", "工业供热电锅炉", "蓄热式电锅炉(固体蓄热)", 0.95, 720.00, 720000.00, 60000.00, 180000.00, 6000.00, 15, 4500, null, null,null,null,null,null},
+ {12, "电锅炉", "工业供热电锅炉", "蓄热式电锅炉(固体蓄热)", 0.95, 1440.00, 1440000.00, 60000.00, 180000.00, 12000.00, 15, 4500, null, null,null,null,null,null},
+ {13, "电锅炉", "工业供热电锅炉", "蓄热式电锅炉(相变蓄热)", 0.98, 360.00, 120000.00, 60000.00, 180000.00, 3000.00, 15, 4500, null, null,null,null,null,null},
+ {14, "电锅炉", "工业供热电锅炉", "蓄热式电锅炉(相变蓄热)", 0.98, 720.00, 160000.00, 60000.00, 180000.00, 6000.00, 15, 4500, null, null,null,null,null,null},
+ {15, "电锅炉", "工业供热电锅炉", "蓄热式电锅炉(相变蓄热)", 0.98, 1440.00, 280000.00, 60000.00, 180000.00, 12000.00, 15, 4500, null, null,null,null,null,null},
+ {16, "电锅炉", "工业供热电锅炉", "蓄热式电锅炉(水蓄)", 0.97, 360.00, 110000.00, 60000.00, 180000.00, 3000.00, 15, 4500, null, null,null,null,null,null},
+ {17, "电锅炉", "工业供热电锅炉", "蓄热式电锅炉(水蓄)", 0.97, 720.00, 150000.00, 60000.00, 180000.00, 6000.00, 15, 4500, null, null,null,null,null,null},
+ {18, "电锅炉", "工业供热电锅炉", "蓄热式电锅炉(水蓄)", 0.97, 1440.00, 260000.00, 60000.00, 180000.00, 12000.00, 15, 4500, null, null,null,null,null,null},
+ {19, "电锅炉", "供冷/暖电锅炉", "直热式电锅炉(电阻类)", 0.95, 360.00, 80000.00, 60000.00, 180000.00, 3000.00, 15, null, null, null,null,null,null,null},
+ {20, "电锅炉", "供冷/暖电锅炉", "直热式电锅炉(电阻类)", 0.95, 720.00, 100000.00, 60000.00, 180000.00, 6000.00, 15, null, null, null,null,null,null,null},
+ {21, "电锅炉", "供冷/暖电锅炉", "直热式电锅炉(电阻类)", 0.95, 1440.00, 160000.00, 60000.00, 180000.00, 12000.00, 15, null, null, null,null,null,null,null},
+ {22, "电锅炉", "供冷/暖电锅炉", "直热式电锅炉(电极类)", 0.97, 360.00, 280000.00, 60000.00, 180000.00, 3000.00, 15, null, null, null,null,null,null,null},
+ {23, "电锅炉", "供冷/暖电锅炉", "直热式电锅炉(电极类)", 0.97, 720.00, 460000.00, 60000.00, 180000.00, 6000.00, 15, null, null, null,null,null,null,null},
+ {24, "电锅炉", "供冷/暖电锅炉", "直热式电锅炉(电极类)", 0.97, 1440.00, 900000.00, 60000.00, 180000.00, 12000.00, 15, null, null, null,null,null,null,null},
+ {25, "电锅炉", "供冷/暖电锅炉", "直热式电锅炉(电磁涡流类)", 0.98, 360.00, 150000.00, 60000.00, 180000.00, 3000.00, 15, null, null, null,null,null,null,null},
+ {26, "电锅炉", "供冷/暖电锅炉", "直热式电锅炉(电磁涡流类)", 0.98, 720.00, 180000.00, 60000.00, 180000.00, 6000.00, 15, null, null, null,null,null,null,null},
+ {27, "电锅炉", "供冷/暖电锅炉", "直热式电锅炉(电磁涡流类)", 0.98, 1440.00, 300000.00, 60000.00, 180000.00, 12000.00, 15, null, null, null,null,null,null,null},
+ {28, "电锅炉", "供冷/暖电锅炉", "蓄热式电锅炉(固体蓄热)", 0.95, 360.00, 360000.00, 60000.00, 180000.00, 3000.00, 15, null, null, null,null,null,null,null},
+ {29, "电锅炉", "供冷/暖电锅炉", "蓄热式电锅炉(固体蓄热)", 0.95, 720.00, 720000.00, 60000.00, 180000.00, 6000.00, 15, null, null, null,null,null,null,null},
+ {30, "电锅炉", "供冷/暖电锅炉", "蓄热式电锅炉(固体蓄热)", 0.95, 1440.00, 1440000.00, 60000.00, 180000.00, 12000.00, 15, null, null, null,null,null,null,null},
+ {31, "电锅炉", "供冷/暖电锅炉", "蓄热式电锅炉(相变蓄热)", 0.98, 360.00, 120000.00, 60000.00, 180000.00, 3000.00, 15, null, null, null,null,null,null,null},
+ {32, "电锅炉", "供冷/暖电锅炉", "蓄热式电锅炉(相变蓄热)", 0.98, 720.00, 160000.00, 60000.00, 180000.00, 6000.00, 15, null, null, null,null,null,null,null},
+ {33, "电锅炉", "供冷/暖电锅炉", "蓄热式电锅炉(相变蓄热)", 0.98, 1440.00, 280000.00, 60000.00, 180000.00, 12000.00, 15, null, null, null,null,null,null,null},
+ {34, "电锅炉", "供冷/暖电锅炉", "蓄热式电锅炉(水蓄)", 0.97, 360.00, 110000.00, 60000.00, 180000.00, 3000.00, 15, null, null, null,null,null,null,null},
+ {35, "电锅炉", "供冷/暖电锅炉", "蓄热式电锅炉(水蓄)", 0.97, 720.00, 150000.00, 60000.00, 180000.00, 6000.00, 15, null, null, null,null,null,null,null},
+ {36, "电锅炉", "供冷/暖电锅炉", "蓄热式电锅炉(水蓄)", 0.97, 1440.00, 260000.00, 60000.00, 180000.00, 12000.00, 15, null, null, null,null,null,null,null},
+ {37, "热泵", "供冷/暖", "水源热泵", 4.00, 25.00, 45000.00, 60000.00, 180000.00, 500.00, 15, null, null, null,null,null,null,null},
+ {38, "热泵", "供冷/暖", "水源热泵", 4.00, 45.00, 75000.00, 60000.00, 180000.00, 1000.00, 15, null, null, null,null,null,null,null},
+ {39, "热泵", "供冷/暖", "水源热泵", 4.00, 90.00, 140000.00, 60000.00, 180000.00, 2000.00, 15, null, null, null,null,null,null,null},
+ {40, "热泵", "供冷/暖", "土壤源热泵", 4.00, 25.00, 45000.00, 60000.00, 180000.00, 500.00, 15, null, null, null,null,null,null,null},
+ {41, "热泵", "供冷/暖", "土壤源热泵", 4.00, 45.00, 75000.00, 60000.00, 180000.00, 1000.00, 15, null, null, null,null,null,null,null},
+ {42, "热泵", "供冷/暖", "土壤源热泵", 4.00, 90.00, 140000.00, 60000.00, 180000.00, 2000.00, 15, null, null, null,null,null,null,null},
+ {43, "热泵", "供冷/暖", "空气源热泵", 4.00, 25.00, 45000.00, 60000.00, 180000.00, 500.00, 15, null, null, null,null,null,null,null},
+ {44, "热泵", "供冷/暖", "空气源热泵", 4.00, 45.00, 75000.00, 60000.00, 180000.00, 1000.00, 15, null, null, null,null,null,null,null},
+ {45, "热泵", "供冷/暖", "空气源热泵", 4.00, 90.00, 140000.00, 60000.00, 180000.00, 2000.00, 15, null, null, null,null,null,null,null},
+ {46, "热泵", "供冷/暖", "低品位余热源(如电厂低温循环水)热泵", 4.00, 25.00, 45000.00, 60000.00, 180000.00, 500.00, 15, null, null, null,null,null,null,null},
+ {47, "热泵", "供冷/暖", "低品位余热源(如电厂低温循环水)热泵", 4.00, 45.00, 75000.00, 60000.00, 180000.00, 1000.00, 15, null, null, null,null,null,null,null},
+ {48, "热泵", "供冷/暖", "低品位余热源(如电厂低温循环水)热泵", 4.00, 90.00, 140000.00, 60000.00, 180000.00, 2000.00, 15, null, null, null,null,null,null,null},
+ {49, "热泵", "供冷/暖", "高温蒸汽热泵", 3.00, 45.00, 380000.00, 60000.00, 180000.00, 1000.00, 15, null, null, null,null,null,null,null},
+ {50, "热泵", "供冷/暖", "高温蒸汽热泵", 3.00, 120.00, 550000.00, 60000.00, 180000.00, 2000.00, 15, 1250, null, null,null,null,null,null},
+ {51, "电厨炊", "电厨炊", "电磁灶", null, 12, 3500.00, 60000.00, 180000.00, null, 15, 1250, 1, 50,null,null,null,null},
+ {52, "电厨炊", "电厨炊", "蒸锅", null, 9, 2200.00, 60000.00, 180000.00, null, 15, 1250, 1, 50,null,null,null,null},
+ {53, "电厨炊", "电厨炊", "汤炉", null, 6, 1500.00, 60000.00, 180000.00, null, 15, 1250, 1, 50,null,null,null,null},
+ {54, "电厨炊", "电厨炊", "煮炉", null, 8, 2100.00, 60000.00, 180000.00, null, 15, 1250, 1, 50,null,null,null,null},
+ {55, "电厨炊", "电厨炊", "饼铛", null, 4, 1600.00, 60000.00, 180000.00, null, 15, 1250, 1, 50,null,null,null,null},
+ {56, "电厨炊", "电厨炊", "电磁灶", null, 20, 4500.00, 60000.00, 180000.00, null, 15, 1250, 51, 100,null,null,null,null},
+ {57, "电厨炊", "电厨炊", "蒸锅", null, 12, 2500.00, 60000.00, 180000.00, null, 15, 1250, 51, 100,null,null,null,null},
+ {58, "电厨炊", "电厨炊", "汤炉", null, 9, 2500.00, 60000.00, 180000.00, null, 15, 1250, 51, 100,null,null,null,null},
+ {59, "电厨炊", "电厨炊", "煮炉", null, 12, 2900.00, 60000.00, 180000.00, null, 15, 1250, 51, 100,null,null,null,null},
+ {60, "电厨炊", "电厨炊", "饼铛", null, 5, 1700.00, 60000.00, 180000.00, null, 15, 1250, 51, 100,null,null,null,null},
+ {61, "电厨炊", "电厨炊", "电磁灶", null, 30, 5900.00, 60000.00, 180000.00, null, 15, 1250, 101, null,null,null,null,null},
+ {62, "电厨炊", "电厨炊", "蒸锅", null, 12, 3900.00, 60000.00, 180000.00, null, 15, 1250, 101, null,null,null,null,null},
+ {63, "电厨炊", "电厨炊", "汤炉", null, 12, 2900.00, 60000.00, 180000.00, null, 15, 1250, 101, null,null,null,null,null},
+ {64, "电厨炊", "电厨炊", "煮炉", null, 18, 3200.00, 60000.00, 180000.00, null, 15, 1250, 101, null,null,null,null,null},
+ {65, "电厨炊", "电厨炊", "饼铛", null, 5, 1700.00, 60000.00, 180000.00, null, 15, 1250, 101, null,null,null,null,null},
+ {66, "电窑炉", "建材电窑炉", "建材电窑炉", null, 25, 26000.00, 60000.00, 180000.00, null, 15, 4500, null, null,0.20,2500.00,500.00,4.00},
+ {67, "电窑炉", "建材电窑炉", "建材电窑炉", null, 145, 140000.00, 60000.00, 180000.00, null, 15, 4500, null, null,1.50,2500.00,3750.00,4.00},
+ {68, "电窑炉", "建材电窑炉", "建材电窑炉", null, 300, 250000.00, 60000.00, 180000.00, null, 15, 4500, null, null,3.00,2500.00,7500.00,4.00},
};
// 创建对象并添加到列表
@@ -118,23 +140,38 @@ public class TestMain {
String devType = (String) row[1];
String devSubType = (String) row[2];
String devTechType = (String) row[3];
- double heatEfficiency = (double) row[4];
- double devPower = (double) row[5];
double devPrice = (double) row[6];
double devSubstituteLaborCost = (double) row[7];
double laborCost = (double) row[8];
- double devReferenceArea = (double) row[9];
- int devServiceLife = (int) row[10];
+
SysDeviceHeatScene device = new SysDeviceHeatScene(
- id, devType, devSubType, devTechType, heatEfficiency, devPower, devPrice,
- devSubstituteLaborCost, laborCost, devReferenceArea, devServiceLife, 4500, null);
+ id, devType, devSubType, devTechType, isHave2(row[4]), isHave2(row[5]), devPrice,
+ devSubstituteLaborCost, laborCost, isHave2(row[9]), isHave(row[10]), isHave(row[11]),
+ isHave(row[12]), isHave(row[13]),
+ isHave2(row[14]), isHave2(row[15]),
+ isHave2(row[16]), isHave2(row[17]),null);
deviceList.add(device);
}
return deviceList;
}
+ public static Integer isHave(Object args) {
+ if (null != args) {
+ return Integer.parseInt(args.toString());
+ } else {
+ return null;
+ }
+ }
+
+ public static Double isHave2(Object args) {
+ if (null != args) {
+ return Double.parseDouble(args.toString());
+ } else {
+ return null;
+ }
+ }
}
diff --git a/dntd-tool/src/main/resources/modelCode.properties b/dntd-tool/src/main/resources/modelCode.properties
index 0341473..e858cfb 100644
--- a/dntd-tool/src/main/resources/modelCode.properties
+++ b/dntd-tool/src/main/resources/modelCode.properties
@@ -1,2 +1,4 @@
0101=generate.BuildHeatingScene
-0102=generate.HeatBoilerScene
\ No newline at end of file
+0102=generate.HeatBoilerScene
+0103=generate.KitchenCookScene
+0104=generate.MaterialKilnScene
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 26f40fe..0763585 100644
--- a/pom.xml
+++ b/pom.xml
@@ -14,6 +14,8 @@
dntd-modelI
dntd-common
dntd-model-buildheating
+ dntd-model-kitchencooking
+ dntd-model-materialkiln