作者 kgy

驻场第三天

package com.synthesize_energy.item.dto;
import com.synthesize_energy.item.vo.EnergyEquipmentVo;
import com.synthesize_energy.item.vo.LoadParameterVo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
... ... @@ -86,5 +88,16 @@ public class No_3_1Dto {
*/
@ApiModelProperty("热水销售价格")
private String marketWaterPrice;
/**
* 负荷参数
*/
@ApiModelProperty("负荷参数")
private List<LoadParameterVo> loadParameterVos;
@ApiModelProperty("能源设备")
private EnergyEquipmentVo energyEquipmentVo;
}
... ...
... ... @@ -56,4 +56,16 @@ public class Synthesize_no_2_1 implements Serializable {
@TableField(exist = false)
private CalculateLoadVo calculateLoad;
@ApiModelProperty("供电天数")
private Double powerSupplyDays;
@ApiModelProperty("每天供电小时数")
private Double hoursOfPowerSupplyPerDay;
@ApiModelProperty("每天供热小时数")
private Double heatingHoursPerDay;
@ApiModelProperty("每天供冷小时数")
private Double coolingHoursPerDay;
}
... ...
... ... @@ -52,5 +52,17 @@ public class Synthesize_no_2_1New implements Serializable {
@ApiModelProperty("供冷末端形式{1-风机盘管 2-辐射供冷 3-组合式空调箱} -----")
private String coldEnd;
@ApiModelProperty("供电天数")
private Double powerSupplyDays;
@ApiModelProperty("每天供电小时数")
private Double hoursOfPowerSupplyPerDay;
@ApiModelProperty("每天供热小时数")
private Double heatingHoursPerDay;
@ApiModelProperty("每天供冷小时数")
private Double coolingHoursPerDay;
}
... ...
... ... @@ -47,6 +47,7 @@ public class CalculateLoadVo {
public void setNo2(Double no2) {
this.no2 = Double.valueOf(df.format(no2 * 0.0036));
}
public void setNo22(Double no22) {
this.no22 = Double.valueOf(df.format(no22 * 0.0036));
}
... ...
package com.synthesize_energy.item.vo;
import com.synthesize_energy.item.dto.ColdMsgDto;
import com.synthesize_energy.item.dto.HotMsgDto;
import com.synthesize_energy.item.dto.HotWaterDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author kgy
* @version 1.0
* @date 2020/10/17 11:29
*/
@Data
public class EnergyEquipmentVo {
@ApiModelProperty("光伏可利用面积")
private Double photovoltaicArea;
@ApiModelProperty("风电装机容量")
private Double windAh;
@ApiModelProperty("储能能量")
private Double powerSupplyEnergy;
@ApiModelProperty("供热参数")
private HotMsgDto hotMsgDto;
@ApiModelProperty("供冷参数")
private ColdMsgDto coldMsgDto;
@ApiModelProperty("热水参数")
private HotWaterDto hotWaterDto;
}
... ...
package com.synthesize_energy.item.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author kgy
* @version 1.0
* @date 2020/10/16 14:59
*/
@Data
public class LoadParameterVo {
private String id;
@ApiModelProperty("no_1项目信息保存返回的ID")
private String pid;
@ApiModelProperty("建筑类型ID")
private String buildingTypeId;
@ApiModelProperty("建筑类型Name")
private String buildingTypeName;
@ApiModelProperty("建筑面积")
private Double architectureArea;
@ApiModelProperty("供热面积")
private Double heatArea;
@ApiModelProperty("供冷面积")
private Double coldArea;
@ApiModelProperty("用水人数")
private Integer waterPersonNum;
@ApiModelProperty("供热天数-----")
private Double heatDay;
@ApiModelProperty("供冷天数-----")
private Double coldDay;
@ApiModelProperty("用水天数-----")
private Double waterDayNum;
@ApiModelProperty("供热末端形式{1-散热器 2-地暖 3-风机盘管} -----")
private String heatEnd;
@ApiModelProperty("供冷末端形式{1-风机盘管 2-辐射供冷 3-组合式空调箱} -----")
private String coldEnd;
@ApiModelProperty("年总需电量 可变值")
private Double no11;
@ApiModelProperty("年总需热量 可变值")
private Double no22;
@ApiModelProperty("年总需冷量 可变值")
private Double no33;
@ApiModelProperty("年总需水量 可变值")
private Double no44;
@ApiModelProperty("供电天数")
private Double powerSupplyDays;
@ApiModelProperty("每天供电小时数")
private Double hoursOfPowerSupplyPerDay;
@ApiModelProperty("每天供热小时数")
private Double heatingHoursPerDay;
@ApiModelProperty("每天供冷小时数")
private Double coolingHoursPerDay;
}
... ...
... ... @@ -11,6 +11,7 @@ import com.synthesize_energy.item.entity.*;
import com.synthesize_energy.item.mapper.*;
import com.synthesize_energy.item.utils.JwtUtil;
import com.synthesize_energy.item.vo.CalculateLoadVo;
import com.synthesize_energy.item.vo.EnergyEquipmentVo;
import com.synthesize_energy.item.web.service.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
... ... @@ -18,6 +19,7 @@ import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.Assert;
import org.springframework.web.bind.annotation.*;
... ... @@ -79,6 +81,18 @@ public class ProjectController {
@Autowired
private ElectrovalenceMapper electrovalenceMapper;
@GetMapping("getindex")
public RestResponse<?> getInfex(String id){
EnergyEquipmentVo energyEquipmentVo = new EnergyEquipmentVo();
Synthesize_no_2_4 synthesize_no_2_4 = synthesize_no_2_4Service.getById(id);
BeanUtils.copyProperties(synthesize_no_2_4,energyEquipmentVo);
Synthesize_no_2_3 synthesize_no_2_3 = synthesize_no_2_3Service.getById(id);
energyEquipmentVo.setColdMsgDto(JSON.parseObject(JSON.parse(synthesize_no_2_3.getColdMsg()).toString(), ColdMsgDto.class));
energyEquipmentVo.setHotMsgDto(JSON.parseObject(JSON.parse(synthesize_no_2_3.getHotMsg()).toString(), HotMsgDto.class));
energyEquipmentVo.setHotWaterDto(JSON.parseObject(JSON.parse(synthesize_no_2_3.getHotWaterMsg()).toString(), HotWaterDto.class));
return RestResponse.success();
}
@PostMapping("no_1")
@ApiOperation(value = "no_1项目信息", notes = "no_1项目信息")
public RestResponse<String> no1Save(Synthesize_no_1 synthesize_no_1) {
... ...
... ... @@ -14,6 +14,8 @@ import com.synthesize_energy.item.dto.*;
import com.synthesize_energy.item.entity.*;
import com.synthesize_energy.item.mapper.*;
import com.synthesize_energy.item.vo.CalculateLoadVo;
import com.synthesize_energy.item.vo.EnergyEquipmentVo;
import com.synthesize_energy.item.vo.LoadParameterVo;
import com.synthesize_energy.item.web.service.*;
import lombok.extern.java.Log;
import lombok.extern.slf4j.Slf4j;
... ... @@ -80,8 +82,7 @@ public class ProjectServiceImpl implements ProjectService {
@Autowired
private Synthesize_no_1ImgService synthesize_no_1ImgService;
@Autowired
private Synthesize_no_1ClientNameMapper synthesize_no_1ClientNameMapper;
private Synthesize_no_1ClientNameMapper synthesize_no_1ClientNameMapper;
@Autowired
private CalculateLoadService calculateLoadService;
... ... @@ -111,14 +112,40 @@ public class ProjectServiceImpl implements ProjectService {
* 建筑类型
*/
List<String> list = new ArrayList<>();
List<LoadParameterVo> loadParameterVos = new ArrayList<>();
List<Synthesize_no_2_1> synthesize_no_2_1s = synthesize_no_2_1Service.list(new QueryWrapper<Synthesize_no_2_1>().lambda().eq(Synthesize_no_2_1::getPid, id));
if (!synthesize_no_2_1s.isEmpty()) {
for (Synthesize_no_2_1 synthesize_no_2_1 : synthesize_no_2_1s) {
Sort sort = sortMapper.selectById(synthesize_no_2_1.getBuildingTypeId());
list.add(sort.getName());
/**
* 负荷参数
*/
LoadParameterVo loadParameterVo = new LoadParameterVo();
BeanUtils.copyProperties(synthesize_no_2_1,loadParameterVo);
CalculateLoad calculateLoad = calculateLoadService.getById(synthesize_no_2_1.getId());
CalculateLoadVo calculateLoadVo = new CalculateLoadVo();
BeanUtils.copyProperties(calculateLoad,calculateLoadVo);
BeanUtils.copyProperties(calculateLoadVo,loadParameterVo);
loadParameterVos.add(loadParameterVo);
}
}
no_3_1Dto.setBuildingType(list);
no_3_1Dto.setLoadParameterVos(loadParameterVos);
/**
* 能源设备
*/
EnergyEquipmentVo energyEquipmentVo = new EnergyEquipmentVo();
Synthesize_no_2_4 synthesize_no_2_4 = synthesize_no_2_4Service.getById(id);
BeanUtils.copyProperties(synthesize_no_2_4,energyEquipmentVo);
Synthesize_no_2_3 synthesize_no_2_3 = synthesize_no_2_3Service.getById(id);
energyEquipmentVo.setColdMsgDto(JSON.parseObject(JSON.parse(synthesize_no_2_3.getColdMsg()).toString(), ColdMsgDto.class));
energyEquipmentVo.setHotMsgDto(JSON.parseObject(JSON.parse(synthesize_no_2_3.getHotMsg()).toString(), HotMsgDto.class));
energyEquipmentVo.setHotWaterDto(JSON.parseObject(JSON.parse(synthesize_no_2_3.getHotWaterMsg()).toString(), HotWaterDto.class));
if (Objects.nonNull(synthesize_no_2_3.getPowerSupplyEnergy())){
energyEquipmentVo.setPowerSupplyEnergy(synthesize_no_2_3.getPowerSupplyEnergy());
}
no_3_1Dto.setEnergyEquipmentVo(energyEquipmentVo);
CityDict dict = cityDictService.getOne(new QueryWrapper<CityDict>().lambda().eq(CityDict::getName, byId.getProjectSite()));
//CpvAndCfmData cfmData = cpvAndCfmDataService.getById(dict.getId());
Synthesize_no_2_6 synthesize_no_2_6 = synthesize_no_2_6Service.getById(id);
... ... @@ -538,8 +565,8 @@ public class ProjectServiceImpl implements ProjectService {
synthesize_no_3_6.setNo111(Double.valueOf(df.format(projectEarnings2)));
No_3_1_1_1Dto no_3_1_1_1Dto = new No_3_1_1_1Dto();
no_3_1_1_1Dto.setName(array2[0]);
no_3_1_1_1Dto.setInstallCapacity("0.00");
no_3_1_1_1Dto.setInvestmentEstimation("0.00");
no_3_1_1_1Dto.setInstallCapacity("/");
no_3_1_1_1Dto.setInvestmentEstimation("/");
no_3_1_1_1Dto.setProjectEarnings(format.apply(new BigDecimal(projectEarnings)));
no_3_1_1_1Dto.setRemark(format.apply(new BigDecimal(projectEarnings1)));
synthesize_no_3_6.setNo65(projectEarnings1);
... ... @@ -593,12 +620,14 @@ public class ProjectServiceImpl implements ProjectService {
synthesize_no_3_6.setNo117(Double.valueOf(df.format(storedEnergyInstallCapacity)));
no_3_1_1_1Dto = new No_3_1_1_1Dto();
no_3_1_1_1Dto.setName(array2[3]);
no_3_1_1_1Dto.setInstallCapacity(format.apply(new BigDecimal(storedEnergyAll)) + "kW");
no_3_1_1_1Dto.setInstallCapacity(format.apply(new BigDecimal(storedEnergyAll)) + "kWh");
Double num1 = Double.valueOf(df.format(storedEnergyAll * synthesizeNo26ServiceById.getNo19() / 10));
synthesize_no_3_6.setNo38(num1);
no_3_1_1_1Dto.setInvestmentEstimation(format.apply(new BigDecimal(num1)));
no_3_1_1_1Dto.setProjectEarnings("0.00");
no_3_1_1_1Dto.setRemark(format.apply(new BigDecimal(synthesizeNo26ServiceById.getNo20() * storedEnergyAll * 1000 / 10000)));
Double num3 = Double.valueOf(format.apply(new BigDecimal(synthesizeNo26ServiceById.getNo20() * storedEnergyAll * 1000 / 10000)));
no_3_1_1_1Dto.setRemark(String.valueOf(num3));
synthesize_no_3_6.setNo68(num3);
list2.add(no_3_1_1_1Dto);
} else if ("4".equals(string)) {
/**
... ... @@ -609,7 +638,7 @@ public class ProjectServiceImpl implements ProjectService {
synthesize_no_3_6.setNo13(Double.valueOf(df.format(storedEnergyAll)));
no_3_1_1_1Dto = new No_3_1_1_1Dto();
no_3_1_1_1Dto.setName(array2[3]);
no_3_1_1_1Dto.setInstallCapacity(format.apply(new BigDecimal(storedEnergyAll)) + "kW");
no_3_1_1_1Dto.setInstallCapacity(format.apply(new BigDecimal(storedEnergyAll)) + "kWh");
Double num1 = Double.valueOf(df.format(storedEnergyAll * synthesizeNo26ServiceById.getNo19() / 10));
no_3_1_1_1Dto.setInvestmentEstimation(format.apply(new BigDecimal(num1)));
synthesize_no_3_6.setNo38(num1);
... ... @@ -633,7 +662,7 @@ public class ProjectServiceImpl implements ProjectService {
synthesize_no_3_6.setNo13(Double.valueOf(df.format(storedEnergyAll)));
no_3_1_1_1Dto = new No_3_1_1_1Dto();
no_3_1_1_1Dto.setName(array2[3]);
no_3_1_1_1Dto.setInstallCapacity(format.apply(new BigDecimal(storedEnergyAll)) + "kW");
no_3_1_1_1Dto.setInstallCapacity(format.apply(new BigDecimal(storedEnergyAll)) + "kWh");
Double num1 = Double.valueOf(df.format(storedEnergyAll * synthesizeNo26ServiceById.getNo19() / 10));
synthesize_no_3_6.setNo38(num1);
no_3_1_1_1Dto.setInvestmentEstimation(format.apply(new BigDecimal(num1)));
... ... @@ -649,7 +678,9 @@ public class ProjectServiceImpl implements ProjectService {
}
no_3_1_1Dto.setList(list2);
for (No_3_1_1_1Dto no3111Dto : list2) {
totalInvestment += Double.parseDouble(no3111Dto.getInvestmentEstimation());
if (!no3111Dto.getInvestmentEstimation().equals("/")) {
totalInvestment += Double.parseDouble(no3111Dto.getInvestmentEstimation());
}
totalRevenue += Double.parseDouble(no3111Dto.getProjectEarnings());
totalAll += Double.parseDouble(no3111Dto.getRemark());
}
... ... @@ -1357,7 +1388,9 @@ public class ProjectServiceImpl implements ProjectService {
Double num3 = Double.valueOf(format2);
synthesize_no_3_6.setNo34(num3);
no_3_1_1_1Dto.setProjectEarnings(format.apply(new BigDecimal((totalAnnualTotalHotWaterRequirement * synthesize_no_2_5.getHotWaterSellingPrice()) / 10000 * 0.6)));
no_3_1_1_1Dto.setRemark(format.apply(new BigDecimal((totalAnnualTotalHotWaterRequirement * 0.6 * synthesizeNo26ServiceById.getNo114()) / 10000)));
Double nom4 = Double.valueOf(format.apply(new BigDecimal((totalAnnualTotalHotWaterRequirement * 0.6 * synthesizeNo26ServiceById.getNo114()) / 10000)));
synthesize_no_3_6.setNo76(nom4);
no_3_1_1_1Dto.setRemark(String.valueOf(nom4));
list2.add(no_3_1_1_1Dto);
} else if ("2".equals(water)) {
synthesize_no_3_6.setNo61(annualTotalHotWaterRequirement * commitmentRatio * Double.parseDouble(String.valueOf(jsonObject.get("hotWaterA"))) / 100);
... ... @@ -1477,7 +1510,9 @@ public class ProjectServiceImpl implements ProjectService {
}
no_3_1_1Dto.setList(list2);
for (No_3_1_1_1Dto no_3_1_1_1Dto : list2) {
totalInvestment += Double.parseDouble(no_3_1_1_1Dto.getInvestmentEstimation());
if (!no_3_1_1_1Dto.getInvestmentEstimation().equals("/")) {
totalInvestment += Double.parseDouble(no_3_1_1_1Dto.getInvestmentEstimation());
}
totalRevenue += Double.parseDouble(no_3_1_1_1Dto.getProjectEarnings());
totalAll += Double.parseDouble(no_3_1_1_1Dto.getRemark());
}
... ... @@ -1893,16 +1928,16 @@ public class ProjectServiceImpl implements ProjectService {
@Override
public Map<String, Object> no2_1Save(String synthesize_no_2_1_new, Double electricityAh) {
String id = "";
log.warn("建筑信息 集合 -------------------------- --------------------------------{}",synthesize_no_2_1_new.toString());
log.warn("建筑信息 集合 -------------------------- --------------------------------{}", synthesize_no_2_1_new.toString());
List<Synthesize_no_2_1New> synthesize_no_2_1s = JSON.parseArray(synthesize_no_2_1_new, Synthesize_no_2_1New.class);
if (org.apache.commons.lang3.StringUtils.isNotEmpty(synthesize_no_2_1s.get(0).getPid()) && !synthesize_no_2_1s.isEmpty()) {
synthesize_no_2_1Service.remove(new QueryWrapper<Synthesize_no_2_1>().lambda().eq(Synthesize_no_2_1::getPid, synthesize_no_2_1s.get(0).getPid()));
//calculateLoadService.remove(new QueryWrapper<CalculateLoad>().lambda().eq(CalculateLoad::getCid, synthesize_no_2_1s.get(0).getPid()));
//CalculateLoad serviceOne = calculateLoadService.getOne(new LambdaQueryWrapper<CalculateLoad>().eq(CalculateLoad::getCid, synthesize_no_2_1s.get(0).getPid()));
calculateLoadService.remove(new QueryWrapper<CalculateLoad>().lambda().eq(CalculateLoad::getCid, synthesize_no_2_1s.get(0).getPid()));
CalculateLoad serviceOne = calculateLoadService.getOne(new LambdaQueryWrapper<CalculateLoad>().eq(CalculateLoad::getCid, synthesize_no_2_1s.get(0).getPid()));
for (Synthesize_no_2_1New synthesize_no_2_1 : synthesize_no_2_1s) {
Synthesize_no_2_1 synthesizeNo21 = new Synthesize_no_2_1();
BeanUtils.copyProperties(synthesize_no_2_1,synthesizeNo21);
BeanUtils.copyProperties(synthesize_no_2_1, synthesizeNo21);
id = synthesizeNo21.getPid();
synthesize_no_2_1Service.saveOrUpdate(synthesizeNo21);
/* List<CalculateLoad> list = calculateLoadService.list(new QueryWrapper<CalculateLoad>()
... ... @@ -1931,7 +1966,7 @@ public class ProjectServiceImpl implements ProjectService {
* 年总需电量
* =10*365*建筑面积面积*设计电负荷*0.8/1000
*/
annualTotalElectricityDemand = 10 * 365 * synthesizeNo21.getArchitectureArea() * electricity * 0.8 / 1000;
annualTotalElectricityDemand = synthesizeNo21.getPowerSupplyDays() * synthesizeNo21.getHoursOfPowerSupplyPerDay() * synthesizeNo21.getArchitectureArea() * electricity * 0.8 / 1000;
} else if ("2".equals(s)) {
/**
... ... @@ -1961,7 +1996,7 @@ public class ProjectServiceImpl implements ProjectService {
hotLoadAll = (double) (hotLoadDataMapper.queryName(zd_name, dict.getId()) * 2);
}
Assert.notNull(synthesizeNo21.getHeatDay(), "供热天数为空了");
annualTotalHeatRequirement = 12 * synthesizeNo21.getHeatDay() * synthesizeNo21.getHeatArea() * hotLoadAll * 0.7 / 1000;
annualTotalHeatRequirement = synthesizeNo21.getHeatingHoursPerDay() * synthesizeNo21.getHeatDay() * synthesizeNo21.getHeatArea() * hotLoadAll * 0.7 / 1000;
} else if ("3".equals(s)) {
/**
... ... @@ -1972,7 +2007,7 @@ public class ProjectServiceImpl implements ProjectService {
String zd_name = "no_" + sort.getId();
int coldLoadAll = coldLoadDataMapper.queryName(zd_name, dict.getId());
Assert.notNull(synthesizeNo21.getColdDay(), "供冷天数为空了");
annualTotalCoolingDemand = 8 * synthesizeNo21.getColdDay() * synthesizeNo21.getColdArea() * coldLoadAll * 0.75 / 1000;
annualTotalCoolingDemand = synthesizeNo21.getCoolingHoursPerDay() * synthesizeNo21.getColdDay() * synthesizeNo21.getColdArea() * coldLoadAll * 0.75 / 1000;
} else if ("4".equals(s)) {
/**
* 年总需热水总量
... ... @@ -1986,7 +2021,7 @@ public class ProjectServiceImpl implements ProjectService {
}
}
CalculateLoad serviceOne = calculateLoadService.getById(synthesizeNo21.getId());
//CalculateLoad serviceOne = calculateLoadService.getById(synthesizeNo21.getId());
if (!StringUtils.isEmpty(serviceOne)) {
calculateLoad.setId(serviceOne.getId());
calculateLoad.setNo1(Double.valueOf(df.format(annualTotalElectricityDemand)));
... ... @@ -2204,19 +2239,21 @@ public class ProjectServiceImpl implements ProjectService {
if (!synthesize_no_2_1s.isEmpty()) {
for (Synthesize_no_2_1 synthesize_no_2_1 : synthesize_no_2_1s) {
CalculateLoad calculateLoad = calculateLoadService.getOne(new LambdaQueryWrapper<CalculateLoad>().eq(CalculateLoad::getId, synthesize_no_2_1.getId()));
CalculateLoadVo calculateLoadVo = new CalculateLoadVo();
BeanUtils.copyProperties(calculateLoad,calculateLoadVo);
synthesize_no_2_1.setCalculateLoad(calculateLoadVo);
Sort sort = sortMapper.selectById(synthesize_no_2_1.getBuildingTypeId());
if (!StringUtils.isEmpty(sort)) {
synthesize_no_2_1.setBuildingTypeName(sort.getName());
if (!StringUtils.isEmpty(calculateLoad)) {
CalculateLoadVo calculateLoadVo = new CalculateLoadVo();
BeanUtils.copyProperties(calculateLoad, calculateLoadVo);
synthesize_no_2_1.setCalculateLoad(calculateLoadVo);
Sort sort = sortMapper.selectById(synthesize_no_2_1.getBuildingTypeId());
if (!StringUtils.isEmpty(sort)) {
synthesize_no_2_1.setBuildingTypeName(sort.getName());
}
}
}
}
Synthesize_no_2_2 synthesize_no_2_2 = synthesize_no_2_2Service.getById(id);
Synthesize_no_2_3 synthesize_no_2_3 = synthesize_no_2_3Service.getById(id);
if (!StringUtils.isEmpty(synthesize_no_2_3)) {
if (!StringUtils.isEmpty(synthesize_no_2_3.getHotMsg())){
if (!StringUtils.isEmpty(synthesize_no_2_3.getHotMsg())) {
HotMsgDto hotMsgDto = JSON.parseObject(synthesize_no_2_3.getHotMsg(), HotMsgDto.class);
synthesize_no_2_3.setHotMsgDto(hotMsgDto);
}
... ... @@ -2232,7 +2269,7 @@ public class ProjectServiceImpl implements ProjectService {
Synthesize_no_2_4 synthesize_no_2_4 = synthesize_no_2_4Service.getById(id);
Synthesize_no_2_5 synthesize_no_2_5 = synthesize_no_2_5Service.getById(id);
Synthesize_no_2_6 synthesize_no_2_6 = synthesize_no_2_6Service.getById(id);
//List<CalculateLoad> list = calculateLoadService.list(new LambdaQueryWrapper<CalculateLoad>().eq(CalculateLoad::getCid, id));
//List<CalculateLoad> list = calculateLoadService.list(new LambdaQueryWrapper<CalculateLoad>().eq(CalculateLoad::getCid, id));
ProjectDto projectDto = new ProjectDto();
projectDto.setSynthesize_no_1(synthesize_no_1);
projectDto.setSynthesize_no_1Img(synthesize_no_1Img);
... ... @@ -2279,7 +2316,7 @@ public class ProjectServiceImpl implements ProjectService {
* 年总需电量
* =10*365*建筑面积面积*设计电负荷*0.8/1000
*/
annualTotalElectricityDemand = 10 * 365 * synthesizeNo21.getArchitectureArea() * electricity * 0.8 / 1000;
annualTotalElectricityDemand = synthesizeNo21.getPowerSupplyDays() * synthesizeNo21.getHoursOfPowerSupplyPerDay() * synthesizeNo21.getArchitectureArea() * electricity * 0.8 / 1000;
} else if ("2".equals(s)) {
/**
* 年总需热量
... ... @@ -2308,7 +2345,7 @@ public class ProjectServiceImpl implements ProjectService {
hotLoadAll = (double) (hotLoadDataMapper.queryName(zd_name, dict.getId()) * 2);
}
Assert.notNull(synthesizeNo21.getHeatDay(), "供热天数为空了");
annualTotalHeatRequirement = 12 * synthesizeNo21.getHeatDay() * synthesizeNo21.getHeatArea() * hotLoadAll * 0.7 / 1000;
annualTotalHeatRequirement = synthesizeNo21.getHeatingHoursPerDay() * synthesizeNo21.getHeatDay() * synthesizeNo21.getHeatArea() * hotLoadAll * 0.7 / 1000;
} else if ("3".equals(s)) {
/**
... ... @@ -2319,7 +2356,7 @@ public class ProjectServiceImpl implements ProjectService {
String zd_name = "no_" + sort.getId();
int coldLoadAll = coldLoadDataMapper.queryName(zd_name, dict.getId());
Assert.notNull(synthesizeNo21.getColdDay(), "供冷天数为空了");
annualTotalCoolingDemand = 8 * synthesizeNo21.getColdDay() * synthesizeNo21.getColdArea() * coldLoadAll * 0.75 / 1000;
annualTotalCoolingDemand = synthesizeNo21.getCoolingHoursPerDay() * synthesizeNo21.getColdDay() * synthesizeNo21.getColdArea() * coldLoadAll * 0.75 / 1000;
} else if ("4".equals(s)) {
/**
* 年总需热水总量
... ... @@ -2339,6 +2376,10 @@ public class ProjectServiceImpl implements ProjectService {
calculateLoad.setNo3(Double.valueOf(df.format(annualTotalCoolingDemand)));
calculateLoad.setNo4(Double.valueOf(df.format(totalAnnualTotalHotWaterRequirement)));
calculateLoad.setAid(synthesizeNo21.getBuildingTypeId());
calculateLoad.setNo11(Double.valueOf(df.format(annualTotalElectricityDemand)));
calculateLoad.setNo22(Double.valueOf(df.format(annualTotalHeatRequirement)));
calculateLoad.setNo33(Double.valueOf(df.format(annualTotalCoolingDemand)));
calculateLoad.setNo44(Double.valueOf(df.format(totalAnnualTotalHotWaterRequirement)));
} else {
calculateLoad.setId(id);
calculateLoad.setNo1(Double.valueOf(df.format(annualTotalElectricityDemand)));
... ... @@ -2353,6 +2394,19 @@ public class ProjectServiceImpl implements ProjectService {
calculateLoad.setAid(synthesizeNo21.getBuildingTypeId());
}
calculateLoadService.saveOrUpdate(calculateLoad);
/* CalculateLoad service = calculateLoadService.getById(id);
calculateLoad.setId(id);
calculateLoad.setNo1(Double.valueOf(df.format(annualTotalElectricityDemand)));
calculateLoad.setNo11(Double.valueOf(df.format(annualTotalElectricityDemand)));
calculateLoad.setNo2(Double.valueOf(df.format(annualTotalHeatRequirement)));
calculateLoad.setNo22(Double.valueOf(df.format(annualTotalHeatRequirement)));
calculateLoad.setNo3(Double.valueOf(df.format(annualTotalCoolingDemand)));
calculateLoad.setNo33(Double.valueOf(df.format(annualTotalCoolingDemand)));
calculateLoad.setNo4(Double.valueOf(df.format(totalAnnualTotalHotWaterRequirement)));
calculateLoad.setNo44(Double.valueOf(df.format(totalAnnualTotalHotWaterRequirement)));
calculateLoad.setCid(synthesizeNo21.getPid());
calculateLoad.setAid(synthesizeNo21.getBuildingTypeId());
calculateLoadService.saveOrUpdate(calculateLoad);*/
}
}
}
... ...