作者 wwmin

Merge branch 'master' of http://114.215.101.231:8099/kgy/synthesize_energy_project

# Conflicts:
#	synthesize_energy_api/src/main/java/com/synthesize_energy/item/web/service/impl/ProjectServiceImpl.java
@@ -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 /**
@@ -829,7 +835,7 @@ public class ProjectServiceImpl implements ProjectService { @@ -829,7 +835,7 @@ public class ProjectServiceImpl implements ProjectService {
829 double level = synthesizeNo26ServiceById.getNo126(); 835 double level = synthesizeNo26ServiceById.getNo126();
830 double end = synthesizeNo26ServiceById.getNo127(); 836 double end = synthesizeNo26ServiceById.getNo127();
831 for (int i = 0; i < names.size(); i++) { 837 for (int i = 0; i < names.size(); i++) {
832 - String zd_name = "no_" + names.get(i).getId(); 838 + //String zd_name = "no_" + names.get(i).getId();
833 CalculateLoad calculateLoad = calculateLoadService.getById(synthesize_no_2_1s.get(i).getId()); 839 CalculateLoad calculateLoad = calculateLoadService.getById(synthesize_no_2_1s.get(i).getId());
834 Synthesize_no_2_1 synthesize_no_2_1 = synthesize_no_2_1Service.getById(synthesize_no_2_1s.get(i).getId()); 840 Synthesize_no_2_1 synthesize_no_2_1 = synthesize_no_2_1Service.getById(synthesize_no_2_1s.get(i).getId());
835 if (!StringUtils.isEmpty(calculateLoad)) { 841 if (!StringUtils.isEmpty(calculateLoad)) {
@@ -877,9 +883,15 @@ public class ProjectServiceImpl implements ProjectService { @@ -877,9 +883,15 @@ public class ProjectServiceImpl implements ProjectService {
877 java.text.NumberFormat nf = java.text.NumberFormat.getInstance(); 883 java.text.NumberFormat nf = java.text.NumberFormat.getInstance();
878 nf.setGroupingUsed(false); 884 nf.setGroupingUsed(false);
879 double annualTotalHeatRequirement = 0.0; 885 double annualTotalHeatRequirement = 0.0;
880 - for (CalculateLoad calculateLoad : list1) {  
881 - annualTotalHeatRequirement += calculateLoad.getNo22(); 886 + for (Synthesize_no_2_1 synthesize_no_2_1 : synthesize_no_2_1s) {
  887 + CalculateLoad calculateLoad = calculateLoadService.getById(synthesize_no_2_1.getId());
  888 + if (Objects.nonNull(calculateLoad.getNo22())) {
  889 + annualTotalHeatRequirement += calculateLoad.getNo22();
  890 + }
882 } 891 }
  892 +/* for (CalculateLoad calculateLoad : list1) {
  893 + annualTotalHeatRequirement += calculateLoad.getNo22();
  894 + }*/
883 String format2 = nf.format(annualTotalHeatRequirement); 895 String format2 = nf.format(annualTotalHeatRequirement);
884 /** 896 /**
885 * 电锅炉年供热量 897 * 电锅炉年供热量
@@ -1242,18 +1254,28 @@ public class ProjectServiceImpl implements ProjectService { @@ -1242,18 +1254,28 @@ public class ProjectServiceImpl implements ProjectService {
1242 * =10*150*供冷面积*设计冷负荷*0.75/1000 1254 * =10*150*供冷面积*设计冷负荷*0.75/1000
1243 * 8 * 150 * coldArea * coldLoadAll * 0.75 / 1000 1255 * 8 * 150 * coldArea * coldLoadAll * 0.75 / 1000
1244 */ 1256 */
1245 - double annualTotalColdRequirement = 0.0;  
1246 - for (CalculateLoad calculateLoad : list1) {  
1247 - annualTotalColdRequirement += calculateLoad.getNo33(); 1257 + double annualTotalColdRequirement = 0.0;//冷
  1258 + double AnnualTotalHeatRequirement = 0.0;//热
  1259 + for (Synthesize_no_2_1 synthesize_no_2_1 : synthesize_no_2_1s) {
  1260 + CalculateLoad calculateLoad = calculateLoadService.getById(synthesize_no_2_1.getId());
  1261 + if (Objects.nonNull(calculateLoad.getNo33())) {
  1262 + annualTotalColdRequirement += calculateLoad.getNo33();//冷
  1263 + }
  1264 + if (Objects.nonNull(calculateLoad.getNo22())) {
  1265 + AnnualTotalHeatRequirement += calculateLoad.getNo22();//热
  1266 + }
1248 } 1267 }
  1268 +/* for (CalculateLoad calculateLoad : list1) {
  1269 + annualTotalHeatRequirement += calculateLoad.getNo33();
  1270 + }*/
1249 java.text.NumberFormat nf = java.text.NumberFormat.getInstance(); 1271 java.text.NumberFormat nf = java.text.NumberFormat.getInstance();
1250 nf.setGroupingUsed(false); 1272 nf.setGroupingUsed(false);
1251 /**年总需热量*/ 1273 /**年总需热量*/
1252 - double AnnualTotalHeatRequirement = 0.0;  
1253 - for (CalculateLoad calculateLoad : list1) { 1274 +// double AnnualTotalHeatRequirement = 0.0;
  1275 +/* for (CalculateLoad calculateLoad : list1) {
1254 AnnualTotalHeatRequirement += calculateLoad.getNo22(); 1276 AnnualTotalHeatRequirement += calculateLoad.getNo22();
1255 - }  
1256 - String format1 = nf.format(AnnualTotalHeatRequirement); 1277 + }*/
  1278 + //String format1 = nf.format(AnnualTotalHeatRequirement);
1257 synthesize_no_3_6.setNo234(coldStorageCapacity); 1279 synthesize_no_3_6.setNo234(coldStorageCapacity);
1258 /** 1280 /**
1259 * 供冷收入 1281 * 供冷收入
@@ -1461,9 +1483,15 @@ public class ProjectServiceImpl implements ProjectService { @@ -1461,9 +1483,15 @@ public class ProjectServiceImpl implements ProjectService {
1461 */ 1483 */
1462 double totalAnnualHotWaterDemand = hotWaterQuota * waterPersonNum * hotWaterDays / 1000; 1484 double totalAnnualHotWaterDemand = hotWaterQuota * waterPersonNum * hotWaterDays / 1000;
1463 double totalAnnualTotalHotWaterRequirement = 0.0; 1485 double totalAnnualTotalHotWaterRequirement = 0.0;
1464 - for (CalculateLoad calculateLoad : list1) {  
1465 - totalAnnualTotalHotWaterRequirement += calculateLoad.getNo44(); 1486 + for (Synthesize_no_2_1 synthesize_no_2_1 : synthesize_no_2_1s) {
  1487 + CalculateLoad calculateLoad = calculateLoadService.getById(synthesize_no_2_1.getId());
  1488 + if (Objects.nonNull(calculateLoad.getNo44())){
  1489 + totalAnnualTotalHotWaterRequirement += calculateLoad.getNo44();
  1490 + }
1466 } 1491 }
  1492 +/* for (CalculateLoad calculateLoad : list1) {
  1493 +
  1494 + }*/
1467 synthesize_no_3_6.setNo20(Double.valueOf(df.format(totalAnnualTotalHotWaterRequirement))); 1495 synthesize_no_3_6.setNo20(Double.valueOf(df.format(totalAnnualTotalHotWaterRequirement)));
1468 1496
1469 /** 1497 /**
@@ -1958,10 +1986,10 @@ public class ProjectServiceImpl implements ProjectService { @@ -1958,10 +1986,10 @@ public class ProjectServiceImpl implements ProjectService {
1958 case 4: 1986 case 4:
1959 case 5: 1987 case 5:
1960 case 6: 1988 case 6:
1961 - list.add(profit - (originalValue - synthesize_no_3_6.getNo300() / yearLength - annualTotalTransportationCost - (annualIncome - originalValue)*0.12) * 0.25 / 2); 1989 + list.add(profit - (originalValue - synthesize_no_3_6.getNo300() / yearLength - annualTotalTransportationCost - (annualIncome - originalValue) * 0.12) * 0.25 / 2);
1962 break; 1990 break;
1963 default: 1991 default:
1964 - list.add(profit - (originalValue - synthesize_no_3_6.getNo300() / yearLength - annualTotalTransportationCost - (annualIncome - originalValue)*0.12) * 0.25); 1992 + list.add(profit - (originalValue - synthesize_no_3_6.getNo300() / yearLength - annualTotalTransportationCost - (annualIncome - originalValue) * 0.12) * 0.25);
1965 break; 1993 break;
1966 } 1994 }
1967 } 1995 }
@@ -1970,7 +1998,7 @@ public class ProjectServiceImpl implements ProjectService { @@ -1970,7 +1998,7 @@ public class ProjectServiceImpl implements ProjectService {
1970 * 高新技术企业 1998 * 高新技术企业
1971 */ 1999 */
1972 for (Integer i = 0; i < npvData.getYear(); i++) { 2000 for (Integer i = 0; i < npvData.getYear(); i++) {
1973 - list.add(profit - (originalValue - synthesize_no_3_6.getNo300() / yearLength - annualTotalTransportationCost - (annualIncome - originalValue)*0.12) * 0.15); 2001 + list.add(profit - (originalValue - synthesize_no_3_6.getNo300() / yearLength - annualTotalTransportationCost - (annualIncome - originalValue) * 0.12) * 0.15);
1974 } 2002 }
1975 list.set(0, -synthesize_no_3_6.getNo300() - otherIncome); 2003 list.set(0, -synthesize_no_3_6.getNo300() - otherIncome);
1976 } else if ("1,2".equals(synthesize_no_2_5.getSale())) { 2004 } else if ("1,2".equals(synthesize_no_2_5.getSale())) {
@@ -1990,10 +2018,10 @@ public class ProjectServiceImpl implements ProjectService { @@ -1990,10 +2018,10 @@ public class ProjectServiceImpl implements ProjectService {
1990 case 4: 2018 case 4:
1991 case 5: 2019 case 5:
1992 case 6: 2020 case 6:
1993 - list.add(profit - (originalValue - synthesize_no_3_6.getNo300() / yearLength - annualTotalTransportationCost - (annualIncome - originalValue)*0.12) * 0.15 / 2); 2021 + list.add(profit - (originalValue - synthesize_no_3_6.getNo300() / yearLength - annualTotalTransportationCost - (annualIncome - originalValue) * 0.12) * 0.15 / 2);
1994 break; 2022 break;
1995 default: 2023 default:
1996 - list.add(profit - (originalValue - synthesize_no_3_6.getNo300() / yearLength - annualTotalTransportationCost - (annualIncome - originalValue)*0.12) * 0.15); 2024 + list.add(profit - (originalValue - synthesize_no_3_6.getNo300() / yearLength - annualTotalTransportationCost - (annualIncome - originalValue) * 0.12) * 0.15);
1997 break; 2025 break;
1998 } 2026 }
1999 } 2027 }
@@ -2003,7 +2031,7 @@ public class ProjectServiceImpl implements ProjectService { @@ -2003,7 +2031,7 @@ public class ProjectServiceImpl implements ProjectService {
2003 */ 2031 */
2004 2032
2005 for (int i = 0; i <= yearLength; i++) { 2033 for (int i = 0; i <= yearLength; i++) {
2006 - list.add(profit - (originalValue - synthesize_no_3_6.getNo300() / yearLength - annualTotalTransportationCost - (annualIncome - originalValue)*0.12) * 0.25); 2034 + list.add(profit - (originalValue - synthesize_no_3_6.getNo300() / yearLength - annualTotalTransportationCost - (annualIncome - originalValue) * 0.12) * 0.25);
2007 } 2035 }
2008 list.set(0, -synthesize_no_3_6.getNo300()); 2036 list.set(0, -synthesize_no_3_6.getNo300());
2009 } 2037 }
@@ -2045,7 +2073,7 @@ public class ProjectServiceImpl implements ProjectService { @@ -2045,7 +2073,7 @@ public class ProjectServiceImpl implements ProjectService {
2045 break; 2073 break;
2046 } 2074 }
2047 } 2075 }
2048 - double spp = year + Math.abs(sum1) / sum2 ; 2076 + double spp = year + Math.abs(sum1) / sum2;
2049 map.put("num3", df.format(spp)); 2077 map.put("num3", df.format(spp));
2050 /** 2078 /**
2051 * 动态投资回收期(DPP) 2079 * 动态投资回收期(DPP)
@@ -2064,7 +2092,7 @@ public class ProjectServiceImpl implements ProjectService { @@ -2064,7 +2092,7 @@ public class ProjectServiceImpl implements ProjectService {
2064 break; 2092 break;
2065 } 2093 }
2066 } 2094 }
2067 - double dpp = year3 + Math.abs(sum3) / sum4 ; 2095 + double dpp = year3 + Math.abs(sum3) / sum4;
2068 map.put("num4", df.format(dpp)); 2096 map.put("num4", df.format(dpp));
2069 return map; 2097 return map;
2070 } 2098 }