作者 kgy

项目部署 算法修改

@@ -68,4 +68,16 @@ public class Synthesize_no_2_1 implements Serializable { @@ -68,4 +68,16 @@ public class Synthesize_no_2_1 implements Serializable {
68 @ApiModelProperty("每天供冷小时数") 68 @ApiModelProperty("每天供冷小时数")
69 private Double coolingHoursPerDay; 69 private Double coolingHoursPerDay;
70 70
  71 + @ApiModelProperty("电负荷指标")
  72 + private Double designElectricLoadIndex;
  73 +
  74 + @ApiModelProperty("热负荷指标")
  75 + private Double designHeatLoadIndex;
  76 +
  77 + @ApiModelProperty("冷负荷指标")
  78 + private Double designCoolingLoadIndex;
  79 +
  80 + @ApiModelProperty("热水定额")
  81 + private Double hotWaterQuota;
  82 +
71 } 83 }
@@ -64,5 +64,17 @@ public class Synthesize_no_2_1New implements Serializable { @@ -64,5 +64,17 @@ public class Synthesize_no_2_1New implements Serializable {
64 @ApiModelProperty("每天供冷小时数") 64 @ApiModelProperty("每天供冷小时数")
65 private Double coolingHoursPerDay; 65 private Double coolingHoursPerDay;
66 66
  67 + @ApiModelProperty("电负荷指标")
  68 + private Double designElectricLoadIndex;
  69 +
  70 + @ApiModelProperty("热负荷指标")
  71 + private Double designHeatLoadIndex;
  72 +
  73 + @ApiModelProperty("冷负荷指标")
  74 + private Double designCoolingLoadIndex;
  75 +
  76 + @ApiModelProperty("热水定额")
  77 + private Double hotWaterQuota;
  78 +
67 79
68 } 80 }
@@ -81,12 +81,24 @@ public class ProjectController { @@ -81,12 +81,24 @@ public class ProjectController {
81 @Autowired 81 @Autowired
82 private HeatIngDataMapper heatIngDataMapper; 82 private HeatIngDataMapper heatIngDataMapper;
83 83
  84 + @GetMapping("getBuildingTypeToIndex/{buildingTypeId}/{projectId}")
  85 + @ApiOperation(value = "获取根据建筑类型换取指标")
  86 + public RestResponse<?> getBuildingTypeToIndex(
  87 + @PathVariable("buildingTypeId") @ApiParam(value = "建筑类型ID", name = "buildingTypeId") String buildingTypeId,
  88 + @PathVariable("projectId") @ApiParam(value = "项目ID", name = "projectId") String projectId
  89 + ) {
  90 + Map<String,Object> map = synthesize_no_2_6Service.getBuildingTypeToIndex(buildingTypeId,projectId);
  91 + return RestResponse.success(map);
  92 + }
  93 +
  94 +
84 @GetMapping("getHeatingDays/{id}") 95 @GetMapping("getHeatingDays/{id}")
85 @ApiOperation(value = "获取供热天数") 96 @ApiOperation(value = "获取供热天数")
86 public RestResponse<?> getHeatingDays( 97 public RestResponse<?> getHeatingDays(
87 - @PathVariable("id")@ApiParam(value = "id",name = "项目ID") String id){ 98 + @PathVariable("id") @ApiParam(value = "id", name = "项目ID") String id
  99 + ) {
88 Synthesize_no_1 synthesize_no_1 = no_1Service.getById(id); 100 Synthesize_no_1 synthesize_no_1 = no_1Service.getById(id);
89 - Assert.notNull(synthesize_no_1,"请先保存项目信息!"); 101 + Assert.notNull(synthesize_no_1, "请先保存项目信息!");
90 CityDict dict = cityDictService.getOne(new QueryWrapper<CityDict>().lambda().eq(CityDict::getName, synthesize_no_1.getProjectSite()));//城市 102 CityDict dict = cityDictService.getOne(new QueryWrapper<CityDict>().lambda().eq(CityDict::getName, synthesize_no_1.getProjectSite()));//城市
91 HeatIngData heatIngData = heatIngDataMapper.selectById(dict.getId()); 103 HeatIngData heatIngData = heatIngDataMapper.selectById(dict.getId());
92 return RestResponse.success(heatIngData.getNo3()); 104 return RestResponse.success(heatIngData.getNo3());
@@ -111,7 +123,7 @@ public class ProjectController { @@ -111,7 +123,7 @@ public class ProjectController {
111 /** 123 /**
112 * 判断 两次选择的地区是否一样 不一样就行修改取最新 124 * 判断 两次选择的地区是否一样 不一样就行修改取最新
113 */ 125 */
114 - if (!synthesize_no_1.getProjectSite().equals(synthesizeNo1.getProjectSite())){ 126 + if (!synthesize_no_1.getProjectSite().equals(synthesizeNo1.getProjectSite())) {
115 CityDict dict = cityDictService.getOne(new QueryWrapper<CityDict>().lambda().eq(CityDict::getName, synthesize_no_1.getProjectSite()));//城市 127 CityDict dict = cityDictService.getOne(new QueryWrapper<CityDict>().lambda().eq(CityDict::getName, synthesize_no_1.getProjectSite()));//城市
116 HeatIngData heatIngData = heatIngDataMapper.selectById(dict.getId()); 128 HeatIngData heatIngData = heatIngDataMapper.selectById(dict.getId());
117 /** 129 /**
@@ -162,6 +174,7 @@ public class ProjectController { @@ -162,6 +174,7 @@ public class ProjectController {
162 } else { 174 } else {
163 /** 175 /**
164 * 年总需热水总量(调整值)*1000/(人数*365*0.9) 176 * 年总需热水总量(调整值)*1000/(人数*365*0.9)
  177 + *
165 */ 178 */
166 electricity += calculateLoad.getNo44() * 1000 / (synthesize_no_2_1s.get(i).getWaterPersonNum() * 365 * 0.9); 179 electricity += calculateLoad.getNo44() * 1000 / (synthesize_no_2_1s.get(i).getWaterPersonNum() * 365 * 0.9);
167 } 180 }
@@ -5,6 +5,7 @@ import com.synthesize_energy.item.entity.ComputeArg; @@ -5,6 +5,7 @@ import com.synthesize_energy.item.entity.ComputeArg;
5 import com.synthesize_energy.item.entity.Synthesize_no_2_6; 5 import com.synthesize_energy.item.entity.Synthesize_no_2_6;
6 6
7 import java.util.List; 7 import java.util.List;
  8 +import java.util.Map;
8 9
9 /** 10 /**
10 * @author kgy 11 * @author kgy
@@ -13,4 +14,15 @@ import java.util.List; @@ -13,4 +14,15 @@ import java.util.List;
13 */ 14 */
14 public interface Synthesize_no_2_6Service extends IService<Synthesize_no_2_6> { 15 public interface Synthesize_no_2_6Service extends IService<Synthesize_no_2_6> {
15 List<ComputeArg> no2_6getType(String id); 16 List<ComputeArg> no2_6getType(String id);
  17 +
  18 + /**
  19 + * 电负荷指标
  20 + * 热负荷指标
  21 + * 冷负荷指标
  22 + * 热水定额
  23 + * @param buildingTypeId 建筑类型ID
  24 + * @param projectId 项目ID
  25 + * @return map
  26 + */
  27 + Map<String, Object> getBuildingTypeToIndex(String buildingTypeId,String projectId);
16 } 28 }
@@ -438,8 +438,8 @@ public class ProjectServiceImpl implements ProjectService { @@ -438,8 +438,8 @@ public class ProjectServiceImpl implements ProjectService {
438 * s1建筑名称 438 * s1建筑名称
439 */ 439 */
440 for (Sort sort : names) { 440 for (Sort sort : names) {
441 - String zd_name = "no_" + sort.getId();  
442 - electricity += electricityLoadDataMapper.queryName(zd_name, dict.getId()); 441 + //String zd_name = "no_" + sort.getId();
  442 + //electricity += electricityLoadDataMapper.queryName(zd_name, dict.getId());
443 /** 443 /**
444 * 电价 高 平 底 444 * 电价 高 平 底
445 */ 445 */
@@ -453,6 +453,9 @@ public class ProjectServiceImpl implements ProjectService { @@ -453,6 +453,9 @@ public class ProjectServiceImpl implements ProjectService {
453 end += electrovalence.getNo33(); 453 end += electrovalence.getNo33();
454 }*/ 454 }*/
455 } 455 }
  456 + for (Synthesize_no_2_1 synthesize_no_2_1 : synthesize_no_2_1s) {
  457 + electricity += synthesize_no_2_1.getDesignElectricLoadIndex();
  458 + }
456 synthesize_no_3_6.setNo112(tall); 459 synthesize_no_3_6.setNo112(tall);
457 synthesize_no_3_6.setNo113(level); 460 synthesize_no_3_6.setNo113(level);
458 synthesize_no_3_6.setNo114(end); 461 synthesize_no_3_6.setNo114(end);
@@ -758,8 +761,11 @@ public class ProjectServiceImpl implements ProjectService { @@ -758,8 +761,11 @@ public class ProjectServiceImpl implements ProjectService {
758 Synthesize_no_2_1 synthesize_no_2_1 = synthesize_no_2_1Service.getById(synthesize_no_2_1s.get(i).getId()); 761 Synthesize_no_2_1 synthesize_no_2_1 = synthesize_no_2_1Service.getById(synthesize_no_2_1s.get(i).getId());
759 if (!StringUtils.isEmpty(calculateLoad)) { 762 if (!StringUtils.isEmpty(calculateLoad)) {
760 if (calculateLoad.getNo2().equals(calculateLoad.getNo22())) { 763 if (calculateLoad.getNo2().equals(calculateLoad.getNo22())) {
761 - hotLoadAll += hotLoadDataMapper.queryName(zd_name, dict.getId());  
762 - heatStorage += synthesize_no_2_1.getHeatArea() * hotLoadDataMapper.queryName(zd_name, dict.getId()) * Double.parseDouble(String.valueOf(jsonObject.get("hotF"))) * synthesize_no_2_1.getHeatDay() / 1000; 764 + for (Synthesize_no_2_1 synthesizeNo21 : synthesize_no_2_1s) {
  765 + hotLoadAll += synthesizeNo21.getDesignHeatLoadIndex();
  766 + }
  767 + //hotLoadAll += hotLoadDataMapper.queryName(zd_name, dict.getId());
  768 + heatStorage += synthesize_no_2_1.getHeatArea() *synthesize_no_2_1.getDesignHeatLoadIndex() * Double.parseDouble(String.valueOf(jsonObject.get("hotF"))) * synthesize_no_2_1.getHeatDay() / 1000;
763 } else { 769 } else {
764 /** 770 /**
765 * 年总需热量(调整值)*1000/(12*130*供热面积*0.7) 771 * 年总需热量(调整值)*1000/(12*130*供热面积*0.7)
@@ -768,7 +774,10 @@ public class ProjectServiceImpl implements ProjectService { @@ -768,7 +774,10 @@ public class ProjectServiceImpl implements ProjectService {
768 heatStorage += synthesize_no_2_1.getHeatArea() * calculateLoad.getNo22() * 1000 / (12 * 130 * synthesize_no_2_1.getHeatArea() * 0.7) * Double.parseDouble(String.valueOf(jsonObject.get("hotF"))) * synthesize_no_2_1.getHeatDay() / 1000; 774 heatStorage += synthesize_no_2_1.getHeatArea() * calculateLoad.getNo22() * 1000 / (12 * 130 * synthesize_no_2_1.getHeatArea() * 0.7) * Double.parseDouble(String.valueOf(jsonObject.get("hotF"))) * synthesize_no_2_1.getHeatDay() / 1000;
769 } 775 }
770 if (calculateLoad.getNo3().equals(calculateLoad.getNo33())) { 776 if (calculateLoad.getNo3().equals(calculateLoad.getNo33())) {
771 - coldLoadAll += coldLoadDataMapper.queryName(zd_name, dict.getId()); 777 + for (Synthesize_no_2_1 synthesizeNo21 : synthesize_no_2_1s) {
  778 + hotLoadAll += synthesizeNo21.getDesignCoolingLoadIndex();
  779 + }
  780 + //coldLoadAll += coldLoadDataMapper.queryName(zd_name, dict.getId());
772 } else { 781 } else {
773 /** 782 /**
774 * 年总需冷量(调整值)*1000/(8*150*供冷面积*0.75) 783 * 年总需冷量(调整值)*1000/(8*150*供冷面积*0.75)
@@ -1116,8 +1125,11 @@ public class ProjectServiceImpl implements ProjectService { @@ -1116,8 +1125,11 @@ public class ProjectServiceImpl implements ProjectService {
1116 Synthesize_no_2_1 synthesize_no_2_1 = synthesize_no_2_1Service.getById(synthesize_no_2_1s.get(i).getId()); 1125 Synthesize_no_2_1 synthesize_no_2_1 = synthesize_no_2_1Service.getById(synthesize_no_2_1s.get(i).getId());
1117 if (!StringUtils.isEmpty(calculateLoad)) { 1126 if (!StringUtils.isEmpty(calculateLoad)) {
1118 if (calculateLoad.getNo3().equals(calculateLoad.getNo33())) { 1127 if (calculateLoad.getNo3().equals(calculateLoad.getNo33())) {
1119 - coldLoadAll += coldLoadDataMapper.queryName(zd_name, dict.getId());  
1120 - coldStorageCapacity += synthesize_no_2_1.getColdArea() * coldLoadDataMapper.queryName(zd_name, dict.getId()) * Double.parseDouble(String.valueOf(jsonObjectCold.get("coldE"))) * synthesize_no_2_1.getColdDay() / 1000; 1128 + for (Synthesize_no_2_1 synthesizeNo21 : synthesize_no_2_1s) {
  1129 + coldLoadAll += synthesizeNo21.getDesignCoolingLoadIndex();
  1130 + }
  1131 + //coldLoadAll += coldLoadDataMapper.queryName(zd_name, dict.getId());
  1132 + coldStorageCapacity += synthesize_no_2_1.getColdArea() * synthesize_no_2_1.getDesignCoolingLoadIndex() * Double.parseDouble(String.valueOf(jsonObjectCold.get("coldE"))) * synthesize_no_2_1.getColdDay() / 1000;
1121 } else { 1133 } else {
1122 /** 1134 /**
1123 * 年总需冷量(调整值)*1000/(8*150*供冷面积*0.75) 1135 * 年总需冷量(调整值)*1000/(8*150*供冷面积*0.75)
@@ -1335,10 +1347,12 @@ public class ProjectServiceImpl implements ProjectService { @@ -1335,10 +1347,12 @@ public class ProjectServiceImpl implements ProjectService {
1335 double level = synthesizeNo26ServiceById.getNo126(); 1347 double level = synthesizeNo26ServiceById.getNo126();
1336 double end = synthesizeNo26ServiceById.getNo127(); 1348 double end = synthesizeNo26ServiceById.getNo127();
1337 double hotWaterDays = 0.0; 1349 double hotWaterDays = 0.0;
  1350 + double hotWaterQuota = 0.0;
1338 if (!synthesize_no_2_1s.isEmpty()) { 1351 if (!synthesize_no_2_1s.isEmpty()) {
1339 for (Synthesize_no_2_1 synthesize_no_2_1 : synthesize_no_2_1s) { 1352 for (Synthesize_no_2_1 synthesize_no_2_1 : synthesize_no_2_1s) {
1340 waterPersonNum += synthesize_no_2_1.getWaterPersonNum(); 1353 waterPersonNum += synthesize_no_2_1.getWaterPersonNum();
1341 hotWaterDays += synthesize_no_2_1.getWaterDayNum(); 1354 hotWaterDays += synthesize_no_2_1.getWaterDayNum();
  1355 + hotWaterQuota += synthesize_no_2_1.getHotWaterQuota();
1342 Sort sort = sortMapper.selectById(synthesize_no_2_1.getBuildingTypeId()); 1356 Sort sort = sortMapper.selectById(synthesize_no_2_1.getBuildingTypeId());
1343 /** 1357 /**
1344 * 电价 高 平 底 1358 * 电价 高 平 底
@@ -1352,7 +1366,7 @@ public class ProjectServiceImpl implements ProjectService { @@ -1352,7 +1366,7 @@ public class ProjectServiceImpl implements ProjectService {
1352 * 年总需热水总量=热水定额*人数*365*0.9/1000 1366 * 年总需热水总量=热水定额*人数*365*0.9/1000
1353 * synthesizeNo26ServiceById.getNo50() * waterPersonNum * 365 * 0.9 / 1000 1367 * synthesizeNo26ServiceById.getNo50() * waterPersonNum * 365 * 0.9 / 1000
1354 */ 1368 */
1355 - double totalAnnualHotWaterDemand = synthesizeNo26ServiceById.getNo50() * waterPersonNum * hotWaterDays / 1000; 1369 + double totalAnnualHotWaterDemand = hotWaterQuota * waterPersonNum * hotWaterDays / 1000;
1356 double totalAnnualTotalHotWaterRequirement = 0.0; 1370 double totalAnnualTotalHotWaterRequirement = 0.0;
1357 for (CalculateLoad calculateLoad : list1) { 1371 for (CalculateLoad calculateLoad : list1) {
1358 totalAnnualTotalHotWaterRequirement += calculateLoad.getNo44(); 1372 totalAnnualTotalHotWaterRequirement += calculateLoad.getNo44();
@@ -1363,7 +1377,7 @@ public class ProjectServiceImpl implements ProjectService { @@ -1363,7 +1377,7 @@ public class ProjectServiceImpl implements ProjectService {
1363 * @description 年总需热水热量=365*0.9*热水定额*人数*4.2*(热水目标温度-冷水初始温度)/3600 1377 * @description 年总需热水热量=365*0.9*热水定额*人数*4.2*(热水目标温度-冷水初始温度)/3600
1364 * 年总需热水热量=供热水天数*热水定额*人数*4.2*(热水目标温度-冷水初始温度)/3600 1378 * 年总需热水热量=供热水天数*热水定额*人数*4.2*(热水目标温度-冷水初始温度)/3600
1365 */ 1379 */
1366 - double annualTotalHotWaterRequirement = hotWaterDays * synthesizeNo26ServiceById.getNo50() * waterPersonNum * 4.2 * (synthesizeNo26ServiceById.getNo52() - synthesizeNo26ServiceById.getNo51()) / 3600; 1380 + double annualTotalHotWaterRequirement = hotWaterDays * hotWaterQuota * waterPersonNum * 4.2 * (synthesizeNo26ServiceById.getNo52() - synthesizeNo26ServiceById.getNo51()) / 3600;
1367 synthesize_no_3_6.setNo62(annualTotalHotWaterRequirement); 1381 synthesize_no_3_6.setNo62(annualTotalHotWaterRequirement);
1368 /** 1382 /**
1369 * 热水系统收益 1383 * 热水系统收益
@@ -1391,13 +1405,13 @@ public class ProjectServiceImpl implements ProjectService { @@ -1391,13 +1405,13 @@ public class ProjectServiceImpl implements ProjectService {
1391 * @description 集热面积=(热水定额*人数*4.2 * (热水目标温度-冷水初始温度)*太阳能保证率)/((总辐照度*1000/365)*集热器集热效率*(1-热损失系数)) 1405 * @description 集热面积=(热水定额*人数*4.2 * (热水目标温度-冷水初始温度)*太阳能保证率)/((总辐照度*1000/365)*集热器集热效率*(1-热损失系数))
1392 * 集热面积=(热水定额*人数*4.2*(热水目标温度-冷水初始温度)*太阳能保证率)/(年平均太阳辐照量*集热器集热效率*(1-热损失系数)) 1406 * 集热面积=(热水定额*人数*4.2*(热水目标温度-冷水初始温度)*太阳能保证率)/(年平均太阳辐照量*集热器集热效率*(1-热损失系数))
1393 */ 1407 */
1394 - Double num1 = Double.valueOf(df.format((synthesizeNo26ServiceById.getNo50() * waterPersonNum * 4.2 * (synthesizeNo26ServiceById.getNo52() - synthesizeNo26ServiceById.getNo51()) * synthesizeNo26ServiceById.getNo54()) / ((synthesizeNo26ServiceById.getNo115() * synthesizeNo26ServiceById.getNo55()) * (1 - synthesizeNo26ServiceById.getNo56())))); 1408 + Double num1 = Double.valueOf(df.format((hotWaterQuota * waterPersonNum * 4.2 * (synthesizeNo26ServiceById.getNo52() - synthesizeNo26ServiceById.getNo51()) * synthesizeNo26ServiceById.getNo54()) / ((synthesizeNo26ServiceById.getNo115() * synthesizeNo26ServiceById.getNo55()) * (1 - synthesizeNo26ServiceById.getNo56()))));
1395 synthesize_no_3_6.setNo22(num1); 1409 synthesize_no_3_6.setNo22(num1);
1396 no_3_1_1_1Dto.setInstallCapacity(format.apply(new BigDecimal(num1)) + "m²"); 1410 no_3_1_1_1Dto.setInstallCapacity(format.apply(new BigDecimal(num1)) + "m²");
1397 /** 1411 /**
1398 * 太阳能集热器总投资=热水定额*人数*集热器单位投资 /1000/10000 1412 * 太阳能集热器总投资=热水定额*人数*集热器单位投资 /1000/10000
1399 */ 1413 */
1400 - Double num2 = Double.valueOf(df.format(synthesizeNo26ServiceById.getNo50() * waterPersonNum * synthesizeNo26ServiceById.getNo58() / 1000 / 10000)); 1414 + Double num2 = Double.valueOf(df.format(hotWaterQuota * waterPersonNum * synthesizeNo26ServiceById.getNo58() / 1000 / 10000));
1401 synthesize_no_3_6.setNo46(num2); 1415 synthesize_no_3_6.setNo46(num2);
1402 no_3_1_1_1Dto.setInvestmentEstimation(format.apply(new BigDecimal(num2))); 1416 no_3_1_1_1Dto.setInvestmentEstimation(format.apply(new BigDecimal(num2)));
1403 /** 1417 /**
@@ -1418,7 +1432,7 @@ public class ProjectServiceImpl implements ProjectService { @@ -1418,7 +1432,7 @@ public class ProjectServiceImpl implements ProjectService {
1418 /** 1432 /**
1419 * 空气源热泵(热水型)容量=热水定额*人数*4.2*(热水目标温度-冷水初始温度)/3600/空气源热泵能效比/0.9/运行时间(kW) 1433 * 空气源热泵(热水型)容量=热水定额*人数*4.2*(热水目标温度-冷水初始温度)/3600/空气源热泵能效比/0.9/运行时间(kW)
1420 */ 1434 */
1421 - double airSourceHeatPumpCapacity = synthesizeNo26ServiceById.getNo50() * waterPersonNum * 4.2 * (synthesizeNo26ServiceById.getNo52() - synthesizeNo26ServiceById.getNo51()) / 3600 / synthesizeNo26ServiceById.getNo53() / 0.9 / synthesizeNo26ServiceById.getNo57() * Double.parseDouble(String.valueOf(jsonObject.get("hotWaterA"))) / 100; 1435 + double airSourceHeatPumpCapacity = hotWaterQuota * waterPersonNum * 4.2 * (synthesizeNo26ServiceById.getNo52() - synthesizeNo26ServiceById.getNo51()) / 3600 / synthesizeNo26ServiceById.getNo53() / 0.9 / synthesizeNo26ServiceById.getNo57() * Double.parseDouble(String.valueOf(jsonObject.get("hotWaterA"))) / 100;
1422 No_3_1_1_1Dto no_3_1_1_1Dto = new No_3_1_1_1Dto(); 1436 No_3_1_1_1Dto no_3_1_1_1Dto = new No_3_1_1_1Dto();
1423 no_3_1_1_1Dto.setName(array2[12]); 1437 no_3_1_1_1Dto.setName(array2[12]);
1424 synthesize_no_3_6.setNo23(Double.valueOf(df.format(airSourceHeatPumpCapacity))); 1438 synthesize_no_3_6.setNo23(Double.valueOf(df.format(airSourceHeatPumpCapacity)));
@@ -1460,7 +1474,7 @@ public class ProjectServiceImpl implements ProjectService { @@ -1460,7 +1474,7 @@ public class ProjectServiceImpl implements ProjectService {
1460 /** 1474 /**
1461 * 地源热泵 1475 * 地源热泵
1462 */ 1476 */
1463 - double gasBoilerHotWaterType = synthesizeNo26ServiceById.getNo50() * waterPersonNum * 4.2 * (synthesizeNo26ServiceById.getNo52() - synthesizeNo26ServiceById.getNo51()) / 3600 / synthesizeNo26ServiceById.getNo116() / 0.9 / synthesizeNo26ServiceById.getNo57() * Double.parseDouble(String.valueOf(jsonObject.get("hotWaterB"))) / 100; 1477 + double gasBoilerHotWaterType = hotWaterQuota * waterPersonNum * 4.2 * (synthesizeNo26ServiceById.getNo52() - synthesizeNo26ServiceById.getNo51()) / 3600 / synthesizeNo26ServiceById.getNo116() / 0.9 / synthesizeNo26ServiceById.getNo57() * Double.parseDouble(String.valueOf(jsonObject.get("hotWaterB"))) / 100;
1464 No_3_1_1_1Dto no_3_1_1_1Dto = new No_3_1_1_1Dto(); 1478 No_3_1_1_1Dto no_3_1_1_1Dto = new No_3_1_1_1Dto();
1465 no_3_1_1_1Dto.setName(array2[17]); 1479 no_3_1_1_1Dto.setName(array2[17]);
1466 synthesize_no_3_6.setNo207(Double.valueOf(df.format(gasBoilerHotWaterType))); 1480 synthesize_no_3_6.setNo207(Double.valueOf(df.format(gasBoilerHotWaterType)));
@@ -1506,7 +1520,7 @@ public class ProjectServiceImpl implements ProjectService { @@ -1506,7 +1520,7 @@ public class ProjectServiceImpl implements ProjectService {
1506 /** 1520 /**
1507 * 水源热泵 1521 * 水源热泵
1508 */ 1522 */
1509 - double electricBoilerCapacity = synthesizeNo26ServiceById.getNo50() * waterPersonNum * 4.2 * (synthesizeNo26ServiceById.getNo52() - synthesizeNo26ServiceById.getNo51()) / 3600 / synthesizeNo26ServiceById.getNo57() / 0.9 / synthesizeNo26ServiceById.getNo119() * Double.parseDouble(String.valueOf(jsonObject.get("hotWaterC"))) / 100; 1523 + double electricBoilerCapacity = hotWaterQuota * waterPersonNum * 4.2 * (synthesizeNo26ServiceById.getNo52() - synthesizeNo26ServiceById.getNo51()) / 3600 / synthesizeNo26ServiceById.getNo57() / 0.9 / synthesizeNo26ServiceById.getNo119() * Double.parseDouble(String.valueOf(jsonObject.get("hotWaterC"))) / 100;
1510 No_3_1_1_1Dto no_3_1_1_1Dto = new No_3_1_1_1Dto(); 1524 No_3_1_1_1Dto no_3_1_1_1Dto = new No_3_1_1_1Dto();
1511 no_3_1_1_1Dto.setName(array2[18]); 1525 no_3_1_1_1Dto.setName(array2[18]);
1512 synthesize_no_3_6.setNo208(Double.valueOf(df.format(electricBoilerCapacity))); 1526 synthesize_no_3_6.setNo208(Double.valueOf(df.format(electricBoilerCapacity)));
@@ -1976,13 +1990,13 @@ public class ProjectServiceImpl implements ProjectService { @@ -1976,13 +1990,13 @@ public class ProjectServiceImpl implements ProjectService {
1976 /** 1990 /**
1977 * 设计电负荷 1991 * 设计电负荷
1978 */ 1992 */
1979 - String zd_name = "no_" + sort.getId();  
1980 - int electricity = electricityLoadDataMapper.queryName(zd_name, dict.getId()); 1993 + /*String zd_name = "no_" + sort.getId();
  1994 + int electricity = electricityLoadDataMapper.queryName(zd_name, dict.getId());*/
1981 /** 1995 /**
1982 * 年总需电量 1996 * 年总需电量
1983 * =10*365*建筑面积面积*设计电负荷*0.8/1000 1997 * =10*365*建筑面积面积*设计电负荷*0.8/1000
1984 */ 1998 */
1985 - annualTotalElectricityDemand = synthesizeNo21.getPowerSupplyDays() * synthesizeNo21.getHoursOfPowerSupplyPerDay() * synthesizeNo21.getArchitectureArea() * electricity * 0.8 / 1000; 1999 + annualTotalElectricityDemand = synthesizeNo21.getPowerSupplyDays() * synthesizeNo21.getHoursOfPowerSupplyPerDay() * synthesizeNo21.getArchitectureArea() * synthesizeNo21.getDesignElectricLoadIndex() * 0.8 / 1000;
1986 2000
1987 } else if ("2".equals(s)) { 2001 } else if ("2".equals(s)) {
1988 /** 2002 /**
@@ -1997,19 +2011,20 @@ public class ProjectServiceImpl implements ProjectService { @@ -1997,19 +2011,20 @@ public class ProjectServiceImpl implements ProjectService {
1997 /** 2011 /**
1998 * 散热器 数据库里面的值 2012 * 散热器 数据库里面的值
1999 */ 2013 */
2000 - hotLoadAll = (double) hotLoadDataMapper.queryName(zd_name, dict.getId()); 2014 + //hotLoadAll = (double) hotLoadDataMapper.queryName(zd_name, dict.getId());
  2015 + hotLoadAll = synthesizeNo21.getDesignHeatLoadIndex();
2001 } else if ("2".equals(synthesizeNo21.getHeatEnd())) { 2016 } else if ("2".equals(synthesizeNo21.getHeatEnd())) {
2002 /** 2017 /**
2003 * 地暖 2018 * 地暖
2004 * * 0.9 2019 * * 0.9
2005 */ 2020 */
2006 - hotLoadAll = hotLoadDataMapper.queryName(zd_name, dict.getId()) * 0.9; 2021 + hotLoadAll = synthesizeNo21.getDesignHeatLoadIndex() * 0.9;
2007 } else if ("3".equals(synthesizeNo21.getHeatEnd())) { 2022 } else if ("3".equals(synthesizeNo21.getHeatEnd())) {
2008 /** 2023 /**
2009 * 等级盘管 2024 * 等级盘管
2010 * * 2 2025 * * 2
2011 */ 2026 */
2012 - hotLoadAll = (double) (hotLoadDataMapper.queryName(zd_name, dict.getId()) * 2); 2027 + hotLoadAll = synthesizeNo21.getDesignHeatLoadIndex() * 2;
2013 } 2028 }
2014 Assert.notNull(synthesizeNo21.getHeatDay(), "供热天数为空了"); 2029 Assert.notNull(synthesizeNo21.getHeatDay(), "供热天数为空了");
2015 Integer di = calculatedTemperatureInHeatingRoomMapper.queryName(zd_name, dict.getId()); 2030 Integer di = calculatedTemperatureInHeatingRoomMapper.queryName(zd_name, dict.getId());
@@ -2023,8 +2038,9 @@ public class ProjectServiceImpl implements ProjectService { @@ -2023,8 +2038,9 @@ public class ProjectServiceImpl implements ProjectService {
2023 * @deprecated =10*150*供冷面积*设计冷负荷*0.75/1000 2038 * @deprecated =10*150*供冷面积*设计冷负荷*0.75/1000
2024 * 年总需热量= 8*供冷天数*供冷面积*设计冷负荷*0.75/1000 2039 * 年总需热量= 8*供冷天数*供冷面积*设计冷负荷*0.75/1000
2025 */ 2040 */
2026 - String zd_name = "no_" + sort.getId();  
2027 - int coldLoadAll = coldLoadDataMapper.queryName(zd_name, dict.getId()); 2041 + //String zd_name = "no_" + sort.getId();
  2042 + //int coldLoadAll = coldLoadDataMapper.queryName(zd_name, dict.getId());
  2043 + Double coldLoadAll = synthesizeNo21.getDesignCoolingLoadIndex();
2028 Assert.notNull(synthesizeNo21.getColdDay(), "供冷天数为空了"); 2044 Assert.notNull(synthesizeNo21.getColdDay(), "供冷天数为空了");
2029 annualTotalCoolingDemand = synthesizeNo21.getCoolingHoursPerDay() * synthesizeNo21.getColdDay() * synthesizeNo21.getColdArea() * coldLoadAll * 0.75 / 1000; 2045 annualTotalCoolingDemand = synthesizeNo21.getCoolingHoursPerDay() * synthesizeNo21.getColdDay() * synthesizeNo21.getColdArea() * coldLoadAll * 0.75 / 1000;
2030 } else if ("4".equals(s)) { 2046 } else if ("4".equals(s)) {
@@ -2033,8 +2049,9 @@ public class ProjectServiceImpl implements ProjectService { @@ -2033,8 +2049,9 @@ public class ProjectServiceImpl implements ProjectService {
2033 * @deprecated =热水定额*人数*365*0.9/1000 2049 * @deprecated =热水定额*人数*365*0.9/1000
2034 * 年总需热水总量= 热水定额*人数*供热水天数/1000 2050 * 年总需热水总量= 热水定额*人数*供热水天数/1000
2035 */ 2051 */
2036 - String zd_name = "no_" + sort.getId();  
2037 - Double electricity = hotWaterDataMapper.queryName(zd_name, dict.getId()); 2052 + //String zd_name = "no_" + sort.getId();
  2053 + Double electricity = synthesizeNo21.getHotWaterQuota();
  2054 + //Double electricity = hotWaterDataMapper.queryName(zd_name, dict.getId());
2038 Assert.notNull(synthesizeNo21.getWaterDayNum(), "供热水天数为空了"); 2055 Assert.notNull(synthesizeNo21.getWaterDayNum(), "供热水天数为空了");
2039 totalAnnualTotalHotWaterRequirement = electricity * synthesizeNo21.getWaterPersonNum() * synthesizeNo21.getWaterDayNum() / 1000; 2056 totalAnnualTotalHotWaterRequirement = electricity * synthesizeNo21.getWaterPersonNum() * synthesizeNo21.getWaterDayNum() / 1000;
2040 } 2057 }
@@ -2120,7 +2137,8 @@ public class ProjectServiceImpl implements ProjectService { @@ -2120,7 +2137,8 @@ public class ProjectServiceImpl implements ProjectService {
2120 } 2137 }
2121 if (!org.springframework.util.StringUtils.isEmpty(calculateLoad)) { 2138 if (!org.springframework.util.StringUtils.isEmpty(calculateLoad)) {
2122 if (calculateLoad.getNo4().equals(calculateLoad.getNo44())) { 2139 if (calculateLoad.getNo4().equals(calculateLoad.getNo44())) {
2123 - electricity += hotWaterDataMapper.queryName(zd_name, cityDict.getId()); 2140 + //electricity += hotWaterDataMapper.queryName(zd_name, cityDict.getId());
  2141 + electricity += synthesize_no_2_11.getHotWaterQuota();
2124 } else { 2142 } else {
2125 /** 2143 /**
2126 * 年总需热水总量(调整值)*1000/(人数*365*0.9) 2144 * 年总需热水总量(调整值)*1000/(人数*365*0.9)
@@ -2179,19 +2197,20 @@ public class ProjectServiceImpl implements ProjectService { @@ -2179,19 +2197,20 @@ public class ProjectServiceImpl implements ProjectService {
2179 /** 2197 /**
2180 * 散热器 数据库里面的值 2198 * 散热器 数据库里面的值
2181 */ 2199 */
2182 - designHeatLoad += (double) hotLoadDataMapper.queryName(zd_name, dict.getId()); 2200 + //designHeatLoad += (double) hotLoadDataMapper.queryName(zd_name, dict.getId());
  2201 + designHeatLoad += synthesize_no_2_1.getDesignHeatLoadIndex();
2183 } else if ("2".equals(synthesize_no_2_1.getHeatEnd())) { 2202 } else if ("2".equals(synthesize_no_2_1.getHeatEnd())) {
2184 /** 2203 /**
2185 * 地暖 2204 * 地暖
2186 * * 0.9 2205 * * 0.9
2187 */ 2206 */
2188 - designHeatLoad += hotLoadDataMapper.queryName(zd_name, dict.getId()) * 0.9; 2207 + designHeatLoad += synthesize_no_2_1.getDesignHeatLoadIndex() * 0.9;
2189 } else if ("3".equals(synthesize_no_2_1.getHeatEnd())) { 2208 } else if ("3".equals(synthesize_no_2_1.getHeatEnd())) {
2190 /** 2209 /**
2191 * 等级盘管 2210 * 等级盘管
2192 * * 2 2211 * * 2
2193 */ 2212 */
2194 - designHeatLoad += (double) (hotLoadDataMapper.queryName(zd_name, dict.getId()) * 2); 2213 + designHeatLoad += synthesize_no_2_1.getDesignHeatLoadIndex() * 2;
2195 } 2214 }
2196 } 2215 }
2197 double v = annualHeatSupply * 1000 / (heatingArea * designHeatLoad) / 130; 2216 double v = annualHeatSupply * 1000 / (heatingArea * designHeatLoad) / 130;
@@ -2219,19 +2238,20 @@ public class ProjectServiceImpl implements ProjectService { @@ -2219,19 +2238,20 @@ public class ProjectServiceImpl implements ProjectService {
2219 /** 2238 /**
2220 * 散热器 数据库里面的值 2239 * 散热器 数据库里面的值
2221 */ 2240 */
2222 - designCoolingLoad += (double) hotLoadDataMapper.queryName(zd_name, dict.getId()); 2241 + //designCoolingLoad += (double) hotLoadDataMapper.queryName(zd_name, dict.getId());
  2242 + designCoolingLoad += synthesize_no_2_1.getDesignHeatLoadIndex();
2223 } else if ("2".equals(synthesize_no_2_1.getHeatEnd())) { 2243 } else if ("2".equals(synthesize_no_2_1.getHeatEnd())) {
2224 /** 2244 /**
2225 * 地暖 2245 * 地暖
2226 * * 0.9 2246 * * 0.9
2227 */ 2247 */
2228 - designCoolingLoad += hotLoadDataMapper.queryName(zd_name, dict.getId()) * 0.9; 2248 + designCoolingLoad += synthesize_no_2_1.getDesignHeatLoadIndex() * 0.9;
2229 } else if ("3".equals(synthesize_no_2_1.getHeatEnd())) { 2249 } else if ("3".equals(synthesize_no_2_1.getHeatEnd())) {
2230 /** 2250 /**
2231 * 等级盘管 2251 * 等级盘管
2232 * * 2 2252 * * 2
2233 */ 2253 */
2234 - designCoolingLoad += (double) (hotLoadDataMapper.queryName(zd_name, dict.getId()) * 2); 2254 + designCoolingLoad += synthesize_no_2_1.getDesignHeatLoadIndex() * 2;
2235 } 2255 }
2236 } 2256 }
2237 double v = annualCoolingCapacity * 1000 / (coolingArea * designCoolingLoad) / 150; 2257 double v = annualCoolingCapacity * 1000 / (coolingArea * designCoolingLoad) / 150;
@@ -2546,7 +2566,7 @@ public class ProjectServiceImpl implements ProjectService { @@ -2546,7 +2566,7 @@ public class ProjectServiceImpl implements ProjectService {
2546 } 2566 }
2547 EquipmentCapacityDto2 equipmentCapacityVo1 = new EquipmentCapacityDto2(); 2567 EquipmentCapacityDto2 equipmentCapacityVo1 = new EquipmentCapacityDto2();
2548 if (flag) { 2568 if (flag) {
2549 - equipmentCapacityVo1.setTotal(poweredBy + "kWh"); 2569 + equipmentCapacityVo1.setTotal(poweredBy + "kW");
2550 } else { 2570 } else {
2551 equipmentCapacityVo1.setTotal(format.apply(new BigDecimal(date)) + "kW"); 2571 equipmentCapacityVo1.setTotal(format.apply(new BigDecimal(date)) + "kW");
2552 } 2572 }
@@ -2788,7 +2808,7 @@ public class ProjectServiceImpl implements ProjectService { @@ -2788,7 +2808,7 @@ public class ProjectServiceImpl implements ProjectService {
2788 date += Double.parseDouble(capacityDto.getData()); 2808 date += Double.parseDouble(capacityDto.getData());
2789 } 2809 }
2790 if (flag) { 2810 if (flag) {
2791 - equipmentCapacityVo.setTotal(poweredBy + "kWh"); 2811 + equipmentCapacityVo.setTotal(poweredBy + "kW");
2792 } else { 2812 } else {
2793 equipmentCapacityVo.setTotal(df.format(date) + "kW"); 2813 equipmentCapacityVo.setTotal(df.format(date) + "kW");
2794 } 2814 }
1 package com.synthesize_energy.item.web.service.impl; 1 package com.synthesize_energy.item.web.service.impl;
  2 +
  3 +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
2 import com.google.common.collect.Lists; 4 import com.google.common.collect.Lists;
3 5
4 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; 6 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
5 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 7 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
6 import com.synthesize_energy.item.dto.ComputeArg2Dto; 8 import com.synthesize_energy.item.dto.ComputeArg2Dto;
7 import com.synthesize_energy.item.dto.ComputeArgDto; 9 import com.synthesize_energy.item.dto.ComputeArgDto;
8 -import com.synthesize_energy.item.entity.ComputeArg;  
9 -import com.synthesize_energy.item.entity.Synthesize_no_1;  
10 -import com.synthesize_energy.item.entity.Synthesize_no_2_3;  
11 -import com.synthesize_energy.item.entity.Synthesize_no_2_6;  
12 -import com.synthesize_energy.item.mapper.ComputeArgMapper;  
13 -import com.synthesize_energy.item.mapper.Synthesize_no_2_6Mapper; 10 +import com.synthesize_energy.item.entity.*;
  11 +import com.synthesize_energy.item.mapper.*;
14 import com.synthesize_energy.item.web.service.No_1Service; 12 import com.synthesize_energy.item.web.service.No_1Service;
15 import com.synthesize_energy.item.web.service.Synthesize_no_2_3Service; 13 import com.synthesize_energy.item.web.service.Synthesize_no_2_3Service;
16 import com.synthesize_energy.item.web.service.Synthesize_no_2_6Service; 14 import com.synthesize_energy.item.web.service.Synthesize_no_2_6Service;
@@ -20,6 +18,7 @@ import org.springframework.transaction.annotation.Transactional; @@ -20,6 +18,7 @@ import org.springframework.transaction.annotation.Transactional;
20 import org.springframework.util.StringUtils; 18 import org.springframework.util.StringUtils;
21 19
22 import java.util.ArrayList; 20 import java.util.ArrayList;
  21 +import java.util.HashMap;
23 import java.util.List; 22 import java.util.List;
24 import java.util.Map; 23 import java.util.Map;
25 24
@@ -371,7 +370,7 @@ public class Synthesize_no_2_6ServiceImpl extends ServiceImpl<Synthesize_no_2_6M @@ -371,7 +370,7 @@ public class Synthesize_no_2_6ServiceImpl extends ServiceImpl<Synthesize_no_2_6M
371 /** 370 /**
372 * 供冷系统 371 * 供冷系统
373 */ 372 */
374 - if(!StringUtils.isEmpty(synthesize_no_2_3.getPowerCold())) { 373 + if (!StringUtils.isEmpty(synthesize_no_2_3.getPowerCold())) {
375 String[] split1 = synthesize_no_2_3.getPowerCold().split(",");// 1-空气源热泵(制冷型) 2-空气源热泵(双工况) 3-冷水机组 4-多联机中央空调 5-蓄热 6-双蓄 374 String[] split1 = synthesize_no_2_3.getPowerCold().split(",");// 1-空气源热泵(制冷型) 2-空气源热泵(双工况) 3-冷水机组 4-多联机中央空调 5-蓄热 6-双蓄
376 computeArg2DtoList = new ArrayList<>(); 375 computeArg2DtoList = new ArrayList<>();
377 for (String s1 : split1) { 376 for (String s1 : split1) {
@@ -476,12 +475,12 @@ public class Synthesize_no_2_6ServiceImpl extends ServiceImpl<Synthesize_no_2_6M @@ -476,12 +475,12 @@ public class Synthesize_no_2_6ServiceImpl extends ServiceImpl<Synthesize_no_2_6M
476 * 太阳能集热器 475 * 太阳能集热器
477 */ 476 */
478 List<ComputeArgDto> computeArgDtos = new ArrayList<>(); 477 List<ComputeArgDto> computeArgDtos = new ArrayList<>();
479 - ComputeArgDto computeArgDto = new ComputeArgDto(); 478 +/* ComputeArgDto computeArgDto = new ComputeArgDto();
480 computeArgDto.setNamType("热水定额"); 479 computeArgDto.setNamType("热水定额");
481 computeArgDto.setId(50); 480 computeArgDto.setId(50);
482 computeArgDto.setModelType(synthesize_no_2_6.getNo50()); 481 computeArgDto.setModelType(synthesize_no_2_6.getNo50());
483 computeArgDto.setName("L/人"); 482 computeArgDto.setName("L/人");
484 - computeArgDtos.add(computeArgDto); 483 + computeArgDtos.add(computeArgDto);*/
485 ComputeArgDto computeArgDto1 = new ComputeArgDto(); 484 ComputeArgDto computeArgDto1 = new ComputeArgDto();
486 computeArgDto1.setId(51); 485 computeArgDto1.setId(51);
487 computeArgDto1.setNamType("冷水初始温度"); 486 computeArgDto1.setNamType("冷水初始温度");
@@ -794,4 +793,54 @@ public class Synthesize_no_2_6ServiceImpl extends ServiceImpl<Synthesize_no_2_6M @@ -794,4 +793,54 @@ public class Synthesize_no_2_6ServiceImpl extends ServiceImpl<Synthesize_no_2_6M
794 */ 793 */
795 return computeArgs; 794 return computeArgs;
796 } 795 }
  796 +
  797 + @Autowired
  798 + private No_1Mapper no_1Mapper;
  799 + @Autowired
  800 + private CityDictMapper cityDictMapper;
  801 + @Autowired
  802 + private SortMapper sortMapper;
  803 + @Autowired
  804 + private HotWaterDataMapper hotWaterDataMapper;
  805 + @Autowired
  806 + private ColdLoadDataMapper coldLoadDataMapper;
  807 + @Autowired
  808 + private HotLoadDataMapper hotLoadDataMapper;
  809 + @Autowired
  810 + private ElectricityLoadDataMapper electricityLoadDataMapper;
  811 +
  812 + /**
  813 + * @param buildingTypeId 建筑类型ID
  814 + * @param projectId 项目ID
  815 + * @return
  816 + */
  817 + @Override
  818 + public Map<String, Object> getBuildingTypeToIndex(String buildingTypeId, String projectId) {
  819 + Map<String, Object> map = new HashMap<>(4);
  820 + Synthesize_no_1 synthesize_no_1 = no_1Mapper.selectById(projectId);
  821 + CityDict cityDict = cityDictMapper.selectOne(new LambdaQueryWrapper<CityDict>().eq(CityDict::getName, synthesize_no_1.getProjectSite()));
  822 + Sort sort = sortMapper.selectById(buildingTypeId);
  823 + String zd_name = "no_" + sort.getId();
  824 + /**
  825 + * 热水定额
  826 + */
  827 + double hotWaterQuota = hotWaterDataMapper.queryName(zd_name, cityDict.getId());
  828 + map.put("hotWaterQuota", hotWaterQuota);
  829 + /**
  830 + * 电负荷指标
  831 + */
  832 + Integer designElectricLoadIndex = electricityLoadDataMapper.queryName(zd_name, cityDict.getId());
  833 + map.put("designElectricLoadIndex", designElectricLoadIndex);
  834 + /**
  835 + * 热负荷指标
  836 + */
  837 + Integer designHeatLoadIndex = hotLoadDataMapper.queryName(zd_name, cityDict.getId());
  838 + map.put("designHeatLoadIndex", designHeatLoadIndex);
  839 + /**
  840 + * 冷负荷指标
  841 + */
  842 + Integer designCoolingLoadIndex = coldLoadDataMapper.queryName(zd_name, cityDict.getId());
  843 + map.put("designCoolingLoadIndex", designCoolingLoadIndex);
  844 + return map;
  845 + }
797 } 846 }