正在显示
1 个修改的文件
包含
50 行增加
和
22 行删除
@@ -327,7 +327,7 @@ public class ProjectServiceImpl implements ProjectService { | @@ -327,7 +327,7 @@ public class ProjectServiceImpl implements ProjectService { | ||
327 | synthesize_no_3_6.setNo222(0.0D); | 327 | synthesize_no_3_6.setNo222(0.0D); |
328 | synthesize_no_3_6.setNo223(0.0D); | 328 | synthesize_no_3_6.setNo223(0.0D); |
329 | synthesize_no_3_6.setNo224(0.0D); | 329 | synthesize_no_3_6.setNo224(0.0D); |
330 | - List<CalculateLoad> list1 = calculateLoadService.list(new LambdaQueryWrapper<CalculateLoad>().eq(CalculateLoad::getCid, id));// 年总需电量 年总需热量 年总需冷量 | 330 | + //List<CalculateLoad> list1 = calculateLoadService.list(new LambdaQueryWrapper<CalculateLoad>().eq(CalculateLoad::getCid, id));// 年总需电量 年总需热量 年总需冷量 |
331 | synthesize_no_3_6.setId(id); | 331 | synthesize_no_3_6.setId(id); |
332 | synthesize_no_3_6.setNo1("0"); | 332 | synthesize_no_3_6.setNo1("0"); |
333 | synthesize_no_3_6.setNo2(0.0D); | 333 | synthesize_no_3_6.setNo2(0.0D); |
@@ -556,9 +556,15 @@ public class ProjectServiceImpl implements ProjectService { | @@ -556,9 +556,15 @@ public class ProjectServiceImpl implements ProjectService { | ||
556 | * 10 * 365 * architectureArea * electricity * 0.8 / 1000 | 556 | * 10 * 365 * architectureArea * electricity * 0.8 / 1000 |
557 | */ | 557 | */ |
558 | double electricityAll = 0.0; | 558 | double electricityAll = 0.0; |
559 | - for (CalculateLoad calculateLoad : list1) { | ||
560 | - electricityAll += calculateLoad.getNo11(); | 559 | + for (Synthesize_no_2_1 synthesize_no_2_1 : synthesize_no_2_1s) { |
560 | + CalculateLoad calculateLoad = calculateLoadService.getById(synthesize_no_2_1.getId()); | ||
561 | + if (Objects.nonNull(calculateLoad.getNo11())) { | ||
562 | + electricityAll += calculateLoad.getNo11(); | ||
563 | + } | ||
561 | } | 564 | } |
565 | +/* for (CalculateLoad calculateLoad : list1) { | ||
566 | + electricityAll += calculateLoad.getNo11(); | ||
567 | + }*/ | ||
562 | // electricityAll = storeItemListTotal; | 568 | // electricityAll = storeItemListTotal; |
563 | // synthesize_no_3_6.setNo1(String.valueOf(Double.valueOf(df.format(electricityAll * synthesize_no_2_5.getElectricitySellingPrice())))); | 569 | // synthesize_no_3_6.setNo1(String.valueOf(Double.valueOf(df.format(electricityAll * synthesize_no_2_5.getElectricitySellingPrice())))); |
564 | /** | 570 | /** |
@@ -828,7 +834,7 @@ public class ProjectServiceImpl implements ProjectService { | @@ -828,7 +834,7 @@ public class ProjectServiceImpl implements ProjectService { | ||
828 | double level = synthesizeNo26ServiceById.getNo126(); | 834 | double level = synthesizeNo26ServiceById.getNo126(); |
829 | double end = synthesizeNo26ServiceById.getNo127(); | 835 | double end = synthesizeNo26ServiceById.getNo127(); |
830 | for (int i = 0; i < names.size(); i++) { | 836 | for (int i = 0; i < names.size(); i++) { |
831 | - String zd_name = "no_" + names.get(i).getId(); | 837 | + //String zd_name = "no_" + names.get(i).getId(); |
832 | CalculateLoad calculateLoad = calculateLoadService.getById(synthesize_no_2_1s.get(i).getId()); | 838 | CalculateLoad calculateLoad = calculateLoadService.getById(synthesize_no_2_1s.get(i).getId()); |
833 | Synthesize_no_2_1 synthesize_no_2_1 = synthesize_no_2_1Service.getById(synthesize_no_2_1s.get(i).getId()); | 839 | Synthesize_no_2_1 synthesize_no_2_1 = synthesize_no_2_1Service.getById(synthesize_no_2_1s.get(i).getId()); |
834 | if (!StringUtils.isEmpty(calculateLoad)) { | 840 | if (!StringUtils.isEmpty(calculateLoad)) { |
@@ -876,9 +882,15 @@ public class ProjectServiceImpl implements ProjectService { | @@ -876,9 +882,15 @@ public class ProjectServiceImpl implements ProjectService { | ||
876 | java.text.NumberFormat nf = java.text.NumberFormat.getInstance(); | 882 | java.text.NumberFormat nf = java.text.NumberFormat.getInstance(); |
877 | nf.setGroupingUsed(false); | 883 | nf.setGroupingUsed(false); |
878 | double annualTotalHeatRequirement = 0.0; | 884 | double annualTotalHeatRequirement = 0.0; |
879 | - for (CalculateLoad calculateLoad : list1) { | ||
880 | - annualTotalHeatRequirement += calculateLoad.getNo22(); | 885 | + for (Synthesize_no_2_1 synthesize_no_2_1 : synthesize_no_2_1s) { |
886 | + CalculateLoad calculateLoad = calculateLoadService.getById(synthesize_no_2_1.getId()); | ||
887 | + if (Objects.nonNull(calculateLoad.getNo22())) { | ||
888 | + annualTotalHeatRequirement += calculateLoad.getNo22(); | ||
889 | + } | ||
881 | } | 890 | } |
891 | +/* for (CalculateLoad calculateLoad : list1) { | ||
892 | + annualTotalHeatRequirement += calculateLoad.getNo22(); | ||
893 | + }*/ | ||
882 | String format2 = nf.format(annualTotalHeatRequirement); | 894 | String format2 = nf.format(annualTotalHeatRequirement); |
883 | /** | 895 | /** |
884 | * 电锅炉年供热量 | 896 | * 电锅炉年供热量 |
@@ -1242,16 +1254,26 @@ public class ProjectServiceImpl implements ProjectService { | @@ -1242,16 +1254,26 @@ public class ProjectServiceImpl implements ProjectService { | ||
1242 | * 8 * 150 * coldArea * coldLoadAll * 0.75 / 1000 | 1254 | * 8 * 150 * coldArea * coldLoadAll * 0.75 / 1000 |
1243 | */ | 1255 | */ |
1244 | double annualTotalHeatRequirement = 0.0; | 1256 | double annualTotalHeatRequirement = 0.0; |
1245 | - for (CalculateLoad calculateLoad : list1) { | ||
1246 | - annualTotalHeatRequirement += calculateLoad.getNo33(); | 1257 | + double AnnualTotalHeatRequirement = 0.0; |
1258 | + for (Synthesize_no_2_1 synthesize_no_2_1 : synthesize_no_2_1s) { | ||
1259 | + CalculateLoad calculateLoad = calculateLoadService.getById(synthesize_no_2_1.getId()); | ||
1260 | + if (Objects.nonNull(calculateLoad.getNo33())) { | ||
1261 | + annualTotalHeatRequirement += calculateLoad.getNo33(); | ||
1262 | + } | ||
1263 | + if (Objects.nonNull(calculateLoad.getNo22())) { | ||
1264 | + AnnualTotalHeatRequirement += calculateLoad.getNo22(); | ||
1265 | + } | ||
1247 | } | 1266 | } |
1267 | +/* for (CalculateLoad calculateLoad : list1) { | ||
1268 | + annualTotalHeatRequirement += calculateLoad.getNo33(); | ||
1269 | + }*/ | ||
1248 | java.text.NumberFormat nf = java.text.NumberFormat.getInstance(); | 1270 | java.text.NumberFormat nf = java.text.NumberFormat.getInstance(); |
1249 | nf.setGroupingUsed(false); | 1271 | nf.setGroupingUsed(false); |
1250 | - double AnnualTotalHeatRequirement = 0.0; | ||
1251 | - for (CalculateLoad calculateLoad : list1) { | 1272 | + |
1273 | +/* for (CalculateLoad calculateLoad : list1) { | ||
1252 | AnnualTotalHeatRequirement += calculateLoad.getNo22(); | 1274 | AnnualTotalHeatRequirement += calculateLoad.getNo22(); |
1253 | - } | ||
1254 | - String format1 = nf.format(AnnualTotalHeatRequirement); | 1275 | + }*/ |
1276 | + //String format1 = nf.format(AnnualTotalHeatRequirement); | ||
1255 | synthesize_no_3_6.setNo234(coldStorageCapacity); | 1277 | synthesize_no_3_6.setNo234(coldStorageCapacity); |
1256 | /** | 1278 | /** |
1257 | * 供冷收入 | 1279 | * 供冷收入 |
@@ -1459,9 +1481,15 @@ public class ProjectServiceImpl implements ProjectService { | @@ -1459,9 +1481,15 @@ public class ProjectServiceImpl implements ProjectService { | ||
1459 | */ | 1481 | */ |
1460 | double totalAnnualHotWaterDemand = hotWaterQuota * waterPersonNum * hotWaterDays / 1000; | 1482 | double totalAnnualHotWaterDemand = hotWaterQuota * waterPersonNum * hotWaterDays / 1000; |
1461 | double totalAnnualTotalHotWaterRequirement = 0.0; | 1483 | double totalAnnualTotalHotWaterRequirement = 0.0; |
1462 | - for (CalculateLoad calculateLoad : list1) { | ||
1463 | - totalAnnualTotalHotWaterRequirement += calculateLoad.getNo44(); | 1484 | + for (Synthesize_no_2_1 synthesize_no_2_1 : synthesize_no_2_1s) { |
1485 | + CalculateLoad calculateLoad = calculateLoadService.getById(synthesize_no_2_1.getId()); | ||
1486 | + if (Objects.nonNull(calculateLoad.getNo44())){ | ||
1487 | + totalAnnualTotalHotWaterRequirement += calculateLoad.getNo44(); | ||
1488 | + } | ||
1464 | } | 1489 | } |
1490 | +/* for (CalculateLoad calculateLoad : list1) { | ||
1491 | + | ||
1492 | + }*/ | ||
1465 | synthesize_no_3_6.setNo20(Double.valueOf(df.format(totalAnnualTotalHotWaterRequirement))); | 1493 | synthesize_no_3_6.setNo20(Double.valueOf(df.format(totalAnnualTotalHotWaterRequirement))); |
1466 | 1494 | ||
1467 | /** | 1495 | /** |
@@ -1956,10 +1984,10 @@ public class ProjectServiceImpl implements ProjectService { | @@ -1956,10 +1984,10 @@ public class ProjectServiceImpl implements ProjectService { | ||
1956 | case 4: | 1984 | case 4: |
1957 | case 5: | 1985 | case 5: |
1958 | case 6: | 1986 | case 6: |
1959 | - list.add(profit - (originalValue - synthesize_no_3_6.getNo300() / yearLength - annualTotalTransportationCost - (annualIncome - originalValue)*0.12) * 0.25 / 2); | 1987 | + list.add(profit - (originalValue - synthesize_no_3_6.getNo300() / yearLength - annualTotalTransportationCost - (annualIncome - originalValue) * 0.12) * 0.25 / 2); |
1960 | break; | 1988 | break; |
1961 | default: | 1989 | default: |
1962 | - list.add(profit - (originalValue - synthesize_no_3_6.getNo300() / yearLength - annualTotalTransportationCost - (annualIncome - originalValue)*0.12) * 0.25); | 1990 | + list.add(profit - (originalValue - synthesize_no_3_6.getNo300() / yearLength - annualTotalTransportationCost - (annualIncome - originalValue) * 0.12) * 0.25); |
1963 | break; | 1991 | break; |
1964 | } | 1992 | } |
1965 | } | 1993 | } |
@@ -1968,7 +1996,7 @@ public class ProjectServiceImpl implements ProjectService { | @@ -1968,7 +1996,7 @@ public class ProjectServiceImpl implements ProjectService { | ||
1968 | * 高新技术企业 | 1996 | * 高新技术企业 |
1969 | */ | 1997 | */ |
1970 | for (Integer i = 0; i < npvData.getYear(); i++) { | 1998 | for (Integer i = 0; i < npvData.getYear(); i++) { |
1971 | - list.add(profit - (originalValue - synthesize_no_3_6.getNo300() / yearLength - annualTotalTransportationCost - (annualIncome - originalValue)*0.12) * 0.15); | 1999 | + list.add(profit - (originalValue - synthesize_no_3_6.getNo300() / yearLength - annualTotalTransportationCost - (annualIncome - originalValue) * 0.12) * 0.15); |
1972 | } | 2000 | } |
1973 | list.set(0, -synthesize_no_3_6.getNo300() - otherIncome); | 2001 | list.set(0, -synthesize_no_3_6.getNo300() - otherIncome); |
1974 | } else if ("1,2".equals(synthesize_no_2_5.getSale())) { | 2002 | } else if ("1,2".equals(synthesize_no_2_5.getSale())) { |
@@ -1988,10 +2016,10 @@ public class ProjectServiceImpl implements ProjectService { | @@ -1988,10 +2016,10 @@ public class ProjectServiceImpl implements ProjectService { | ||
1988 | case 4: | 2016 | case 4: |
1989 | case 5: | 2017 | case 5: |
1990 | case 6: | 2018 | case 6: |
1991 | - list.add(profit - (originalValue - synthesize_no_3_6.getNo300() / yearLength - annualTotalTransportationCost - (annualIncome - originalValue)*0.12) * 0.15 / 2); | 2019 | + list.add(profit - (originalValue - synthesize_no_3_6.getNo300() / yearLength - annualTotalTransportationCost - (annualIncome - originalValue) * 0.12) * 0.15 / 2); |
1992 | break; | 2020 | break; |
1993 | default: | 2021 | default: |
1994 | - list.add(profit - (originalValue - synthesize_no_3_6.getNo300() / yearLength - annualTotalTransportationCost - (annualIncome - originalValue)*0.12) * 0.15); | 2022 | + list.add(profit - (originalValue - synthesize_no_3_6.getNo300() / yearLength - annualTotalTransportationCost - (annualIncome - originalValue) * 0.12) * 0.15); |
1995 | break; | 2023 | break; |
1996 | } | 2024 | } |
1997 | } | 2025 | } |
@@ -2001,7 +2029,7 @@ public class ProjectServiceImpl implements ProjectService { | @@ -2001,7 +2029,7 @@ public class ProjectServiceImpl implements ProjectService { | ||
2001 | */ | 2029 | */ |
2002 | 2030 | ||
2003 | for (int i = 0; i <= yearLength; i++) { | 2031 | for (int i = 0; i <= yearLength; i++) { |
2004 | - list.add(profit - (originalValue - synthesize_no_3_6.getNo300() / yearLength - annualTotalTransportationCost - (annualIncome - originalValue)*0.12) * 0.25); | 2032 | + list.add(profit - (originalValue - synthesize_no_3_6.getNo300() / yearLength - annualTotalTransportationCost - (annualIncome - originalValue) * 0.12) * 0.25); |
2005 | } | 2033 | } |
2006 | list.set(0, -synthesize_no_3_6.getNo300()); | 2034 | list.set(0, -synthesize_no_3_6.getNo300()); |
2007 | } | 2035 | } |
@@ -2043,7 +2071,7 @@ public class ProjectServiceImpl implements ProjectService { | @@ -2043,7 +2071,7 @@ public class ProjectServiceImpl implements ProjectService { | ||
2043 | break; | 2071 | break; |
2044 | } | 2072 | } |
2045 | } | 2073 | } |
2046 | - double spp = year + Math.abs(sum1) / sum2 ; | 2074 | + double spp = year + Math.abs(sum1) / sum2; |
2047 | map.put("num3", df.format(spp)); | 2075 | map.put("num3", df.format(spp)); |
2048 | /** | 2076 | /** |
2049 | * 动态投资回收期(DPP) | 2077 | * 动态投资回收期(DPP) |
@@ -2062,7 +2090,7 @@ public class ProjectServiceImpl implements ProjectService { | @@ -2062,7 +2090,7 @@ public class ProjectServiceImpl implements ProjectService { | ||
2062 | break; | 2090 | break; |
2063 | } | 2091 | } |
2064 | } | 2092 | } |
2065 | - double dpp = year3 + Math.abs(sum3) / sum4 ; | 2093 | + double dpp = year3 + Math.abs(sum3) / sum4; |
2066 | map.put("num4", df.format(dpp)); | 2094 | map.put("num4", df.format(dpp)); |
2067 | return map; | 2095 | return map; |
2068 | } | 2096 | } |
-
请 注册 或 登录 后发表评论