作者 kgy

项目部署 算法修改

... ... @@ -68,4 +68,16 @@ public class Synthesize_no_2_1 implements Serializable {
@ApiModelProperty("每天供冷小时数")
private Double coolingHoursPerDay;
@ApiModelProperty("电负荷指标")
private Double designElectricLoadIndex;
@ApiModelProperty("热负荷指标")
private Double designHeatLoadIndex;
@ApiModelProperty("冷负荷指标")
private Double designCoolingLoadIndex;
@ApiModelProperty("热水定额")
private Double hotWaterQuota;
}
... ...
... ... @@ -64,5 +64,17 @@ public class Synthesize_no_2_1New implements Serializable {
@ApiModelProperty("每天供冷小时数")
private Double coolingHoursPerDay;
@ApiModelProperty("电负荷指标")
private Double designElectricLoadIndex;
@ApiModelProperty("热负荷指标")
private Double designHeatLoadIndex;
@ApiModelProperty("冷负荷指标")
private Double designCoolingLoadIndex;
@ApiModelProperty("热水定额")
private Double hotWaterQuota;
}
... ...
... ... @@ -81,12 +81,24 @@ public class ProjectController {
@Autowired
private HeatIngDataMapper heatIngDataMapper;
@GetMapping("getBuildingTypeToIndex/{buildingTypeId}/{projectId}")
@ApiOperation(value = "获取根据建筑类型换取指标")
public RestResponse<?> getBuildingTypeToIndex(
@PathVariable("buildingTypeId") @ApiParam(value = "建筑类型ID", name = "buildingTypeId") String buildingTypeId,
@PathVariable("projectId") @ApiParam(value = "项目ID", name = "projectId") String projectId
) {
Map<String,Object> map = synthesize_no_2_6Service.getBuildingTypeToIndex(buildingTypeId,projectId);
return RestResponse.success(map);
}
@GetMapping("getHeatingDays/{id}")
@ApiOperation(value = "获取供热天数")
public RestResponse<?> getHeatingDays(
@PathVariable("id")@ApiParam(value = "id",name = "项目ID") String id){
@PathVariable("id") @ApiParam(value = "id", name = "项目ID") String id
) {
Synthesize_no_1 synthesize_no_1 = no_1Service.getById(id);
Assert.notNull(synthesize_no_1,"请先保存项目信息!");
Assert.notNull(synthesize_no_1, "请先保存项目信息!");
CityDict dict = cityDictService.getOne(new QueryWrapper<CityDict>().lambda().eq(CityDict::getName, synthesize_no_1.getProjectSite()));//城市
HeatIngData heatIngData = heatIngDataMapper.selectById(dict.getId());
return RestResponse.success(heatIngData.getNo3());
... ... @@ -111,7 +123,7 @@ public class ProjectController {
/**
* 判断 两次选择的地区是否一样 不一样就行修改取最新
*/
if (!synthesize_no_1.getProjectSite().equals(synthesizeNo1.getProjectSite())){
if (!synthesize_no_1.getProjectSite().equals(synthesizeNo1.getProjectSite())) {
CityDict dict = cityDictService.getOne(new QueryWrapper<CityDict>().lambda().eq(CityDict::getName, synthesize_no_1.getProjectSite()));//城市
HeatIngData heatIngData = heatIngDataMapper.selectById(dict.getId());
/**
... ... @@ -162,6 +174,7 @@ public class ProjectController {
} else {
/**
* 年总需热水总量(调整值)*1000/(人数*365*0.9)
*
*/
electricity += calculateLoad.getNo44() * 1000 / (synthesize_no_2_1s.get(i).getWaterPersonNum() * 365 * 0.9);
}
... ...
... ... @@ -5,6 +5,7 @@ import com.synthesize_energy.item.entity.ComputeArg;
import com.synthesize_energy.item.entity.Synthesize_no_2_6;
import java.util.List;
import java.util.Map;
/**
* @author kgy
... ... @@ -13,4 +14,15 @@ import java.util.List;
*/
public interface Synthesize_no_2_6Service extends IService<Synthesize_no_2_6> {
List<ComputeArg> no2_6getType(String id);
/**
* 电负荷指标
* 热负荷指标
* 冷负荷指标
* 热水定额
* @param buildingTypeId 建筑类型ID
* @param projectId 项目ID
* @return map
*/
Map<String, Object> getBuildingTypeToIndex(String buildingTypeId,String projectId);
}
... ...
... ... @@ -438,8 +438,8 @@ public class ProjectServiceImpl implements ProjectService {
* s1建筑名称
*/
for (Sort sort : names) {
String zd_name = "no_" + sort.getId();
electricity += electricityLoadDataMapper.queryName(zd_name, dict.getId());
//String zd_name = "no_" + sort.getId();
//electricity += electricityLoadDataMapper.queryName(zd_name, dict.getId());
/**
* 电价 高 平 底
*/
... ... @@ -453,6 +453,9 @@ public class ProjectServiceImpl implements ProjectService {
end += electrovalence.getNo33();
}*/
}
for (Synthesize_no_2_1 synthesize_no_2_1 : synthesize_no_2_1s) {
electricity += synthesize_no_2_1.getDesignElectricLoadIndex();
}
synthesize_no_3_6.setNo112(tall);
synthesize_no_3_6.setNo113(level);
synthesize_no_3_6.setNo114(end);
... ... @@ -758,8 +761,11 @@ public class ProjectServiceImpl implements ProjectService {
Synthesize_no_2_1 synthesize_no_2_1 = synthesize_no_2_1Service.getById(synthesize_no_2_1s.get(i).getId());
if (!StringUtils.isEmpty(calculateLoad)) {
if (calculateLoad.getNo2().equals(calculateLoad.getNo22())) {
hotLoadAll += hotLoadDataMapper.queryName(zd_name, dict.getId());
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;
for (Synthesize_no_2_1 synthesizeNo21 : synthesize_no_2_1s) {
hotLoadAll += synthesizeNo21.getDesignHeatLoadIndex();
}
//hotLoadAll += hotLoadDataMapper.queryName(zd_name, dict.getId());
heatStorage += synthesize_no_2_1.getHeatArea() *synthesize_no_2_1.getDesignHeatLoadIndex() * Double.parseDouble(String.valueOf(jsonObject.get("hotF"))) * synthesize_no_2_1.getHeatDay() / 1000;
} else {
/**
* 年总需热量(调整值)*1000/(12*130*供热面积*0.7)
... ... @@ -768,7 +774,10 @@ public class ProjectServiceImpl implements ProjectService {
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;
}
if (calculateLoad.getNo3().equals(calculateLoad.getNo33())) {
coldLoadAll += coldLoadDataMapper.queryName(zd_name, dict.getId());
for (Synthesize_no_2_1 synthesizeNo21 : synthesize_no_2_1s) {
hotLoadAll += synthesizeNo21.getDesignCoolingLoadIndex();
}
//coldLoadAll += coldLoadDataMapper.queryName(zd_name, dict.getId());
} else {
/**
* 年总需冷量(调整值)*1000/(8*150*供冷面积*0.75)
... ... @@ -1116,8 +1125,11 @@ public class ProjectServiceImpl implements ProjectService {
Synthesize_no_2_1 synthesize_no_2_1 = synthesize_no_2_1Service.getById(synthesize_no_2_1s.get(i).getId());
if (!StringUtils.isEmpty(calculateLoad)) {
if (calculateLoad.getNo3().equals(calculateLoad.getNo33())) {
coldLoadAll += coldLoadDataMapper.queryName(zd_name, dict.getId());
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;
for (Synthesize_no_2_1 synthesizeNo21 : synthesize_no_2_1s) {
coldLoadAll += synthesizeNo21.getDesignCoolingLoadIndex();
}
//coldLoadAll += coldLoadDataMapper.queryName(zd_name, dict.getId());
coldStorageCapacity += synthesize_no_2_1.getColdArea() * synthesize_no_2_1.getDesignCoolingLoadIndex() * Double.parseDouble(String.valueOf(jsonObjectCold.get("coldE"))) * synthesize_no_2_1.getColdDay() / 1000;
} else {
/**
* 年总需冷量(调整值)*1000/(8*150*供冷面积*0.75)
... ... @@ -1335,10 +1347,12 @@ public class ProjectServiceImpl implements ProjectService {
double level = synthesizeNo26ServiceById.getNo126();
double end = synthesizeNo26ServiceById.getNo127();
double hotWaterDays = 0.0;
double hotWaterQuota = 0.0;
if (!synthesize_no_2_1s.isEmpty()) {
for (Synthesize_no_2_1 synthesize_no_2_1 : synthesize_no_2_1s) {
waterPersonNum += synthesize_no_2_1.getWaterPersonNum();
hotWaterDays += synthesize_no_2_1.getWaterDayNum();
hotWaterQuota += synthesize_no_2_1.getHotWaterQuota();
Sort sort = sortMapper.selectById(synthesize_no_2_1.getBuildingTypeId());
/**
* 电价 高 平 底
... ... @@ -1352,7 +1366,7 @@ public class ProjectServiceImpl implements ProjectService {
* 年总需热水总量=热水定额*人数*365*0.9/1000
* synthesizeNo26ServiceById.getNo50() * waterPersonNum * 365 * 0.9 / 1000
*/
double totalAnnualHotWaterDemand = synthesizeNo26ServiceById.getNo50() * waterPersonNum * hotWaterDays / 1000;
double totalAnnualHotWaterDemand = hotWaterQuota * waterPersonNum * hotWaterDays / 1000;
double totalAnnualTotalHotWaterRequirement = 0.0;
for (CalculateLoad calculateLoad : list1) {
totalAnnualTotalHotWaterRequirement += calculateLoad.getNo44();
... ... @@ -1363,7 +1377,7 @@ public class ProjectServiceImpl implements ProjectService {
* @description 年总需热水热量=365*0.9*热水定额*人数*4.2*(热水目标温度-冷水初始温度)/3600
* 年总需热水热量=供热水天数*热水定额*人数*4.2*(热水目标温度-冷水初始温度)/3600
*/
double annualTotalHotWaterRequirement = hotWaterDays * synthesizeNo26ServiceById.getNo50() * waterPersonNum * 4.2 * (synthesizeNo26ServiceById.getNo52() - synthesizeNo26ServiceById.getNo51()) / 3600;
double annualTotalHotWaterRequirement = hotWaterDays * hotWaterQuota * waterPersonNum * 4.2 * (synthesizeNo26ServiceById.getNo52() - synthesizeNo26ServiceById.getNo51()) / 3600;
synthesize_no_3_6.setNo62(annualTotalHotWaterRequirement);
/**
* 热水系统收益
... ... @@ -1391,13 +1405,13 @@ public class ProjectServiceImpl implements ProjectService {
* @description 集热面积=(热水定额*人数*4.2 * (热水目标温度-冷水初始温度)*太阳能保证率)/((总辐照度*1000/365)*集热器集热效率*(1-热损失系数))
* 集热面积=(热水定额*人数*4.2*(热水目标温度-冷水初始温度)*太阳能保证率)/(年平均太阳辐照量*集热器集热效率*(1-热损失系数))
*/
Double num1 = Double.valueOf(df.format((synthesizeNo26ServiceById.getNo50() * waterPersonNum * 4.2 * (synthesizeNo26ServiceById.getNo52() - synthesizeNo26ServiceById.getNo51()) * synthesizeNo26ServiceById.getNo54()) / ((synthesizeNo26ServiceById.getNo115() * synthesizeNo26ServiceById.getNo55()) * (1 - synthesizeNo26ServiceById.getNo56()))));
Double num1 = Double.valueOf(df.format((hotWaterQuota * waterPersonNum * 4.2 * (synthesizeNo26ServiceById.getNo52() - synthesizeNo26ServiceById.getNo51()) * synthesizeNo26ServiceById.getNo54()) / ((synthesizeNo26ServiceById.getNo115() * synthesizeNo26ServiceById.getNo55()) * (1 - synthesizeNo26ServiceById.getNo56()))));
synthesize_no_3_6.setNo22(num1);
no_3_1_1_1Dto.setInstallCapacity(format.apply(new BigDecimal(num1)) + "m²");
/**
* 太阳能集热器总投资=热水定额*人数*集热器单位投资 /1000/10000
*/
Double num2 = Double.valueOf(df.format(synthesizeNo26ServiceById.getNo50() * waterPersonNum * synthesizeNo26ServiceById.getNo58() / 1000 / 10000));
Double num2 = Double.valueOf(df.format(hotWaterQuota * waterPersonNum * synthesizeNo26ServiceById.getNo58() / 1000 / 10000));
synthesize_no_3_6.setNo46(num2);
no_3_1_1_1Dto.setInvestmentEstimation(format.apply(new BigDecimal(num2)));
/**
... ... @@ -1418,7 +1432,7 @@ public class ProjectServiceImpl implements ProjectService {
/**
* 空气源热泵(热水型)容量=热水定额*人数*4.2*(热水目标温度-冷水初始温度)/3600/空气源热泵能效比/0.9/运行时间(kW)
*/
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;
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;
No_3_1_1_1Dto no_3_1_1_1Dto = new No_3_1_1_1Dto();
no_3_1_1_1Dto.setName(array2[12]);
synthesize_no_3_6.setNo23(Double.valueOf(df.format(airSourceHeatPumpCapacity)));
... ... @@ -1460,7 +1474,7 @@ public class ProjectServiceImpl implements ProjectService {
/**
* 地源热泵
*/
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;
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;
No_3_1_1_1Dto no_3_1_1_1Dto = new No_3_1_1_1Dto();
no_3_1_1_1Dto.setName(array2[17]);
synthesize_no_3_6.setNo207(Double.valueOf(df.format(gasBoilerHotWaterType)));
... ... @@ -1506,7 +1520,7 @@ public class ProjectServiceImpl implements ProjectService {
/**
* 水源热泵
*/
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;
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;
No_3_1_1_1Dto no_3_1_1_1Dto = new No_3_1_1_1Dto();
no_3_1_1_1Dto.setName(array2[18]);
synthesize_no_3_6.setNo208(Double.valueOf(df.format(electricBoilerCapacity)));
... ... @@ -1976,13 +1990,13 @@ public class ProjectServiceImpl implements ProjectService {
/**
* 设计电负荷
*/
String zd_name = "no_" + sort.getId();
int electricity = electricityLoadDataMapper.queryName(zd_name, dict.getId());
/*String zd_name = "no_" + sort.getId();
int electricity = electricityLoadDataMapper.queryName(zd_name, dict.getId());*/
/**
* 年总需电量
* =10*365*建筑面积面积*设计电负荷*0.8/1000
*/
annualTotalElectricityDemand = synthesizeNo21.getPowerSupplyDays() * synthesizeNo21.getHoursOfPowerSupplyPerDay() * synthesizeNo21.getArchitectureArea() * electricity * 0.8 / 1000;
annualTotalElectricityDemand = synthesizeNo21.getPowerSupplyDays() * synthesizeNo21.getHoursOfPowerSupplyPerDay() * synthesizeNo21.getArchitectureArea() * synthesizeNo21.getDesignElectricLoadIndex() * 0.8 / 1000;
} else if ("2".equals(s)) {
/**
... ... @@ -1997,19 +2011,20 @@ public class ProjectServiceImpl implements ProjectService {
/**
* 散热器 数据库里面的值
*/
hotLoadAll = (double) hotLoadDataMapper.queryName(zd_name, dict.getId());
//hotLoadAll = (double) hotLoadDataMapper.queryName(zd_name, dict.getId());
hotLoadAll = synthesizeNo21.getDesignHeatLoadIndex();
} else if ("2".equals(synthesizeNo21.getHeatEnd())) {
/**
* 地暖
* * 0.9
*/
hotLoadAll = hotLoadDataMapper.queryName(zd_name, dict.getId()) * 0.9;
hotLoadAll = synthesizeNo21.getDesignHeatLoadIndex() * 0.9;
} else if ("3".equals(synthesizeNo21.getHeatEnd())) {
/**
* 等级盘管
* * 2
*/
hotLoadAll = (double) (hotLoadDataMapper.queryName(zd_name, dict.getId()) * 2);
hotLoadAll = synthesizeNo21.getDesignHeatLoadIndex() * 2;
}
Assert.notNull(synthesizeNo21.getHeatDay(), "供热天数为空了");
Integer di = calculatedTemperatureInHeatingRoomMapper.queryName(zd_name, dict.getId());
... ... @@ -2023,8 +2038,9 @@ public class ProjectServiceImpl implements ProjectService {
* @deprecated =10*150*供冷面积*设计冷负荷*0.75/1000
* 年总需热量= 8*供冷天数*供冷面积*设计冷负荷*0.75/1000
*/
String zd_name = "no_" + sort.getId();
int coldLoadAll = coldLoadDataMapper.queryName(zd_name, dict.getId());
//String zd_name = "no_" + sort.getId();
//int coldLoadAll = coldLoadDataMapper.queryName(zd_name, dict.getId());
Double coldLoadAll = synthesizeNo21.getDesignCoolingLoadIndex();
Assert.notNull(synthesizeNo21.getColdDay(), "供冷天数为空了");
annualTotalCoolingDemand = synthesizeNo21.getCoolingHoursPerDay() * synthesizeNo21.getColdDay() * synthesizeNo21.getColdArea() * coldLoadAll * 0.75 / 1000;
} else if ("4".equals(s)) {
... ... @@ -2033,8 +2049,9 @@ public class ProjectServiceImpl implements ProjectService {
* @deprecated =热水定额*人数*365*0.9/1000
* 年总需热水总量= 热水定额*人数*供热水天数/1000
*/
String zd_name = "no_" + sort.getId();
Double electricity = hotWaterDataMapper.queryName(zd_name, dict.getId());
//String zd_name = "no_" + sort.getId();
Double electricity = synthesizeNo21.getHotWaterQuota();
//Double electricity = hotWaterDataMapper.queryName(zd_name, dict.getId());
Assert.notNull(synthesizeNo21.getWaterDayNum(), "供热水天数为空了");
totalAnnualTotalHotWaterRequirement = electricity * synthesizeNo21.getWaterPersonNum() * synthesizeNo21.getWaterDayNum() / 1000;
}
... ... @@ -2120,7 +2137,8 @@ public class ProjectServiceImpl implements ProjectService {
}
if (!org.springframework.util.StringUtils.isEmpty(calculateLoad)) {
if (calculateLoad.getNo4().equals(calculateLoad.getNo44())) {
electricity += hotWaterDataMapper.queryName(zd_name, cityDict.getId());
//electricity += hotWaterDataMapper.queryName(zd_name, cityDict.getId());
electricity += synthesize_no_2_11.getHotWaterQuota();
} else {
/**
* 年总需热水总量(调整值)*1000/(人数*365*0.9)
... ... @@ -2179,19 +2197,20 @@ public class ProjectServiceImpl implements ProjectService {
/**
* 散热器 数据库里面的值
*/
designHeatLoad += (double) hotLoadDataMapper.queryName(zd_name, dict.getId());
//designHeatLoad += (double) hotLoadDataMapper.queryName(zd_name, dict.getId());
designHeatLoad += synthesize_no_2_1.getDesignHeatLoadIndex();
} else if ("2".equals(synthesize_no_2_1.getHeatEnd())) {
/**
* 地暖
* * 0.9
*/
designHeatLoad += hotLoadDataMapper.queryName(zd_name, dict.getId()) * 0.9;
designHeatLoad += synthesize_no_2_1.getDesignHeatLoadIndex() * 0.9;
} else if ("3".equals(synthesize_no_2_1.getHeatEnd())) {
/**
* 等级盘管
* * 2
*/
designHeatLoad += (double) (hotLoadDataMapper.queryName(zd_name, dict.getId()) * 2);
designHeatLoad += synthesize_no_2_1.getDesignHeatLoadIndex() * 2;
}
}
double v = annualHeatSupply * 1000 / (heatingArea * designHeatLoad) / 130;
... ... @@ -2219,19 +2238,20 @@ public class ProjectServiceImpl implements ProjectService {
/**
* 散热器 数据库里面的值
*/
designCoolingLoad += (double) hotLoadDataMapper.queryName(zd_name, dict.getId());
//designCoolingLoad += (double) hotLoadDataMapper.queryName(zd_name, dict.getId());
designCoolingLoad += synthesize_no_2_1.getDesignHeatLoadIndex();
} else if ("2".equals(synthesize_no_2_1.getHeatEnd())) {
/**
* 地暖
* * 0.9
*/
designCoolingLoad += hotLoadDataMapper.queryName(zd_name, dict.getId()) * 0.9;
designCoolingLoad += synthesize_no_2_1.getDesignHeatLoadIndex() * 0.9;
} else if ("3".equals(synthesize_no_2_1.getHeatEnd())) {
/**
* 等级盘管
* * 2
*/
designCoolingLoad += (double) (hotLoadDataMapper.queryName(zd_name, dict.getId()) * 2);
designCoolingLoad += synthesize_no_2_1.getDesignHeatLoadIndex() * 2;
}
}
double v = annualCoolingCapacity * 1000 / (coolingArea * designCoolingLoad) / 150;
... ... @@ -2546,7 +2566,7 @@ public class ProjectServiceImpl implements ProjectService {
}
EquipmentCapacityDto2 equipmentCapacityVo1 = new EquipmentCapacityDto2();
if (flag) {
equipmentCapacityVo1.setTotal(poweredBy + "kWh");
equipmentCapacityVo1.setTotal(poweredBy + "kW");
} else {
equipmentCapacityVo1.setTotal(format.apply(new BigDecimal(date)) + "kW");
}
... ... @@ -2788,7 +2808,7 @@ public class ProjectServiceImpl implements ProjectService {
date += Double.parseDouble(capacityDto.getData());
}
if (flag) {
equipmentCapacityVo.setTotal(poweredBy + "kWh");
equipmentCapacityVo.setTotal(poweredBy + "kW");
} else {
equipmentCapacityVo.setTotal(df.format(date) + "kW");
}
... ...
package com.synthesize_energy.item.web.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.google.common.collect.Lists;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.synthesize_energy.item.dto.ComputeArg2Dto;
import com.synthesize_energy.item.dto.ComputeArgDto;
import com.synthesize_energy.item.entity.ComputeArg;
import com.synthesize_energy.item.entity.Synthesize_no_1;
import com.synthesize_energy.item.entity.Synthesize_no_2_3;
import com.synthesize_energy.item.entity.Synthesize_no_2_6;
import com.synthesize_energy.item.mapper.ComputeArgMapper;
import com.synthesize_energy.item.mapper.Synthesize_no_2_6Mapper;
import com.synthesize_energy.item.entity.*;
import com.synthesize_energy.item.mapper.*;
import com.synthesize_energy.item.web.service.No_1Service;
import com.synthesize_energy.item.web.service.Synthesize_no_2_3Service;
import com.synthesize_energy.item.web.service.Synthesize_no_2_6Service;
... ... @@ -20,6 +18,7 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
... ... @@ -371,7 +370,7 @@ public class Synthesize_no_2_6ServiceImpl extends ServiceImpl<Synthesize_no_2_6M
/**
* 供冷系统
*/
if(!StringUtils.isEmpty(synthesize_no_2_3.getPowerCold())) {
if (!StringUtils.isEmpty(synthesize_no_2_3.getPowerCold())) {
String[] split1 = synthesize_no_2_3.getPowerCold().split(",");// 1-空气源热泵(制冷型) 2-空气源热泵(双工况) 3-冷水机组 4-多联机中央空调 5-蓄热 6-双蓄
computeArg2DtoList = new ArrayList<>();
for (String s1 : split1) {
... ... @@ -476,12 +475,12 @@ public class Synthesize_no_2_6ServiceImpl extends ServiceImpl<Synthesize_no_2_6M
* 太阳能集热器
*/
List<ComputeArgDto> computeArgDtos = new ArrayList<>();
ComputeArgDto computeArgDto = new ComputeArgDto();
/* ComputeArgDto computeArgDto = new ComputeArgDto();
computeArgDto.setNamType("热水定额");
computeArgDto.setId(50);
computeArgDto.setModelType(synthesize_no_2_6.getNo50());
computeArgDto.setName("L/人");
computeArgDtos.add(computeArgDto);
computeArgDtos.add(computeArgDto);*/
ComputeArgDto computeArgDto1 = new ComputeArgDto();
computeArgDto1.setId(51);
computeArgDto1.setNamType("冷水初始温度");
... ... @@ -794,4 +793,54 @@ public class Synthesize_no_2_6ServiceImpl extends ServiceImpl<Synthesize_no_2_6M
*/
return computeArgs;
}
@Autowired
private No_1Mapper no_1Mapper;
@Autowired
private CityDictMapper cityDictMapper;
@Autowired
private SortMapper sortMapper;
@Autowired
private HotWaterDataMapper hotWaterDataMapper;
@Autowired
private ColdLoadDataMapper coldLoadDataMapper;
@Autowired
private HotLoadDataMapper hotLoadDataMapper;
@Autowired
private ElectricityLoadDataMapper electricityLoadDataMapper;
/**
* @param buildingTypeId 建筑类型ID
* @param projectId 项目ID
* @return
*/
@Override
public Map<String, Object> getBuildingTypeToIndex(String buildingTypeId, String projectId) {
Map<String, Object> map = new HashMap<>(4);
Synthesize_no_1 synthesize_no_1 = no_1Mapper.selectById(projectId);
CityDict cityDict = cityDictMapper.selectOne(new LambdaQueryWrapper<CityDict>().eq(CityDict::getName, synthesize_no_1.getProjectSite()));
Sort sort = sortMapper.selectById(buildingTypeId);
String zd_name = "no_" + sort.getId();
/**
* 热水定额
*/
double hotWaterQuota = hotWaterDataMapper.queryName(zd_name, cityDict.getId());
map.put("hotWaterQuota", hotWaterQuota);
/**
* 电负荷指标
*/
Integer designElectricLoadIndex = electricityLoadDataMapper.queryName(zd_name, cityDict.getId());
map.put("designElectricLoadIndex", designElectricLoadIndex);
/**
* 热负荷指标
*/
Integer designHeatLoadIndex = hotLoadDataMapper.queryName(zd_name, cityDict.getId());
map.put("designHeatLoadIndex", designHeatLoadIndex);
/**
* 冷负荷指标
*/
Integer designCoolingLoadIndex = coldLoadDataMapper.queryName(zd_name, cityDict.getId());
map.put("designCoolingLoadIndex", designCoolingLoadIndex);
return map;
}
}
... ...