作者 kgy

第一天驻场 结束

正在显示 16 个修改的文件 包含 189 行增加62 行删除
... ... @@ -17,7 +17,7 @@ public class CorsFilter implements Filter {
res.addHeader("Access-Control-Allow-Credentials", "true");
res.addHeader("Access-Control-Allow-Origin", "*");
res.addHeader("Access-Control-Allow-Methods", "GET, POST, DELETE, PUT");
res.addHeader("Access-Control-Allow-Headers", "Content-Type,X-CAF-Authorization-Token,sessionToken,X-TOKEN");
res.addHeader("Access-Control-Allow-Headers", "Content-Type,X-CAF-Authorization-Token,sessionToken,X-TOKEN,token");
if (((HttpServletRequest) request).getMethod().equals("OPTIONS")) {
response.getWriter().println("ok");
return;
... ...
package com.synthesize_energy.item.config;
import org.springframework.stereotype.Component;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;
@WebListener
@Component
public class MyContextListener implements ServletContextListener {
private SSHConnection conexionssh;
public MyContextListener() {
super();
}
@Override
public void contextInitialized(ServletContextEvent arg0) {
// 建立连接
System.out.println("Context initialized ... !\n\n\n");
try {
conexionssh = new SSHConnection();
conexionssh.SSHConnection();
System.out.println("\n\n\n成功建立SSH连接!\n\n\n");
} catch (Throwable e) {
System.out.println("\n\n\nSSH连接失败!\n\n\n");
e.printStackTrace(); // error connecting SSH server
}
}
@Override
public void contextDestroyed(ServletContextEvent arg0) {
// 断开连接
System.out.println("Context destroyed ... !\n\n\n");
try {
conexionssh.closeSSH(); // disconnect
System.out.println("\n\n\n成功断开SSH连接!\n\n\n");
} catch (Exception e) {
e.printStackTrace();
System.out.println("\n\n\n断开SSH连接出错!\n\n\n");
}
}
}
... ...
package com.synthesize_energy.item.dto;
import com.synthesize_energy.item.entity.*;
import com.synthesize_energy.item.vo.CalculateLoadVo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
... ... @@ -31,5 +32,5 @@ public class ProjectDto {
@ApiModelProperty("参数修正")
private Synthesize_no_2_6 synthesize_no_2_6;
@ApiModelProperty("符合计算")
private List<CalculateLoad> calculateLoads;
private List<CalculateLoadVo> calculateLoads;
}
... ...
... ... @@ -91,5 +91,7 @@ public class Synthesize_no_1 implements Serializable {
private BigDecimal lng;
@ApiModelProperty("纬度")
private BigDecimal lat;
@ApiModelProperty("1-计算过2-没有计算过")
private String flagCalculate;
}
... ...
... ... @@ -41,7 +41,7 @@ public class Synthesize_no_1ClientName implements Serializable {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date time;
@ApiModelProperty(hidden = true)
private Date newTime;
private String newTime;
@ApiModelProperty("1收藏2没收藏")
private String collectState;
/**
... ...
... ... @@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.synthesize_energy.item.vo.CalculateLoadVo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
... ... @@ -52,6 +53,6 @@ public class Synthesize_no_2_1 implements Serializable {
@ApiModelProperty("负荷参数")
@TableField(exist = false)
private CalculateLoad calculateLoad;
private CalculateLoadVo calculateLoad;
}
... ...
package com.synthesize_energy.item.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.synthesize_energy.item.entity.Synthesize_no_1ClientName;
import org.apache.ibatis.annotations.Param;
/**
* @author kgy
... ... @@ -9,4 +12,6 @@ import com.synthesize_energy.item.entity.Synthesize_no_1ClientName;
* @date 2020/5/22 11:48
*/
public interface Synthesize_no_1ClientNameMapper extends BaseMapper<Synthesize_no_1ClientName> {
IPage<Synthesize_no_1ClientName> queryByIdPage(Page<Synthesize_no_1ClientName> namePage, @Param("userId") String userId, @Param("name") String name);
}
... ...
... ... @@ -173,7 +173,7 @@ public class MyController {
if (StringUtils.isEmpty(synthesize_no_1ClientName.getId())) {
synthesize_no_1ClientName.setUserId(JwtUtil.getUserId(request.getHeader("token")));
synthesize_no_1ClientName.setTime(new Date());
synthesize_no_1ClientName.setNewTime(new Date());
synthesize_no_1ClientName.setNewTime(synthesize_no_1ClientName.getName());
synthesize_no_1ClientName.setDeleteState("0");
}
synthesize_no_1ClientNameService.saveOrUpdate(synthesize_no_1ClientName);
... ... @@ -196,9 +196,11 @@ public class MyController {
switch (type) {
case "1":
synthesize_no_1ClientName.setType("1");
synthesize_no_1ClientName.setNewTime("11111");
break;
case "2":
synthesize_no_1ClientName.setType(null);
synthesize_no_1ClientName.setNewTime(synthesize_no_1ClientName.getName());
break;
case "3":
synthesize_no_1ClientName.setDeleteState("1");
... ... @@ -228,6 +230,9 @@ public class MyController {
return RestResponse.success("设置成功");
}
@Autowired
private Synthesize_no_1ClientNameMapper synthesize_no_1ClientNameMapper;
@GetMapping("query/client")
@ApiOperation(value = "查询客户", notes = "查询客户", response = Synthesize_no_1ClientName.class)
@ApiImplicitParams({
... ... @@ -241,22 +246,23 @@ public class MyController {
@RequestParam(value = "rows", required = true) Integer rows
) {
for (Synthesize_no_1ClientName synthesize_no_1ClientName : synthesize_no_1ClientNameService.list(new QueryWrapper<Synthesize_no_1ClientName>()
/* for (Synthesize_no_1ClientName synthesize_no_1ClientName : synthesize_no_1ClientNameService.list(new QueryWrapper<Synthesize_no_1ClientName>()
.lambda()
.eq(Synthesize_no_1ClientName::getType, "1")
.ne(Synthesize_no_1ClientName::getDeleteState,"1")
.eq(Synthesize_no_1ClientName::getUserId, JwtUtil.getUserId(request.getHeader("token"))))) {
synthesize_no_1ClientName.setNewTime(new Date());
synthesize_no_1ClientNameService.updateById(synthesize_no_1ClientName);
}
}*/
Page<Synthesize_no_1ClientName> namePage = new Page<>(page, rows);
IPage<Synthesize_no_1ClientName> iPage = synthesize_no_1ClientNameService.page(namePage, new QueryWrapper<Synthesize_no_1ClientName>()
/* IPage<Synthesize_no_1ClientName> iPage = synthesize_no_1ClientNameService.page(namePage, new QueryWrapper<Synthesize_no_1ClientName>()
.lambda()
.eq(Synthesize_no_1ClientName::getUserId, JwtUtil.getUserId(request.getHeader("token")))
.ne(Synthesize_no_1ClientName::getDeleteState,"1")
.like(!StringUtils.isEmpty(name), Synthesize_no_1ClientName::getName, name)
.orderByDesc(Synthesize_no_1ClientName::getNewTime));
.orderByDesc(Synthesize_no_1ClientName::getNewTime));*/
IPage<Synthesize_no_1ClientName> iPage = synthesize_no_1ClientNameMapper.queryByIdPage(namePage,JwtUtil.getUserId(request.getHeader("token")),name);
return new PageVO<>(iPage.getRecords(), iPage.getTotal(), page, rows);
}
... ...
package com.synthesize_energy.item.web.controller;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @author kgy
* @version 1.0
* @date 2020/10/14 14:46
*/
@RestController
@RequestMapping("newProject")
@Api(value = "是否计算过", tags = "是否计算过")
public class NewProjectController {
}
... ...
... ... @@ -89,6 +89,7 @@ public class ProjectController {
synthesize_no_1.setCountState("0");
synthesize_no_1.setUserId(JwtUtil.getUserId(request.getHeader("token")));
synthesize_no_1.setNewTime(new Date());
synthesize_no_1.setFlagCalculate("2");
} else {
/**
* 修改 对条件设置的参数修正 热水定额 冷水初始温度 修改
... ... @@ -171,7 +172,8 @@ public class ProjectController {
) {
String userId = JwtUtil.getUserId(request.getHeader("token"));
QueryWrapper<Synthesize_no_1ClientName> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(Synthesize_no_1ClientName::getUserId, userId).ne(Synthesize_no_1ClientName::getDeleteState,"1").orderByDesc(Synthesize_no_1ClientName::getNewTime);
queryWrapper.lambda().eq(Synthesize_no_1ClientName::getUserId, userId).ne(Synthesize_no_1ClientName::getDeleteState, "1")
.orderByDesc(Synthesize_no_1ClientName::getNewTime);
queryWrapper.like(StringUtils.isNotBlank(name), "name", name);
List<Synthesize_no_1ClientName> list = synthesize_no_1ClientNameService.list(queryWrapper);
List<ClientNameDto> names = new ArrayList<>();
... ... @@ -340,13 +342,13 @@ public class ProjectController {
* 蓄热做一个限制,出水温度不能低于进水温度
*/
Synthesize_no_2_6 synthesize_no_2_6 = synthesize_no_2_6Service.getById(synthesize_no_2_3.getId());
if (org.springframework.util.StringUtils.isEmpty(synthesize_no_2_6)){
if (org.springframework.util.StringUtils.isEmpty(synthesize_no_2_6)) {
Synthesize_no_2_6 synthesize_no_2_61 = synthesize_no_2_6Service.getById("1");
if (synthesize_no_2_61.getNo52() <= hotMsgDto.getHotG()){
if (synthesize_no_2_61.getNo52() <= hotMsgDto.getHotG()) {
throw new IllegalArgumentException("供热温度填写有误,范围不得大于等于" + synthesize_no_2_61.getNo52());
}
}else {
if (synthesize_no_2_6.getNo52() <= hotMsgDto.getHotG()){
} else {
if (synthesize_no_2_6.getNo52() <= hotMsgDto.getHotG()) {
throw new IllegalArgumentException("供热温度填写有误,范围不得大于等于" + synthesize_no_2_6.getNo52());
}
}
... ... @@ -410,15 +412,15 @@ public class ProjectController {
String site = synthesize_no_1.getProjectSite();
CityDict cityDict = cityDictService.getOne(new QueryWrapper<CityDict>().lambda().eq(CityDict::getName, site));
Integer no1 = coldWaterDataMapper.selectById(cityDict.getId()).getNo1();
if (org.springframework.util.StringUtils.isEmpty(synthesize_no_2_6)){
if (no1 <= coldMsgDto.getColdF()){
if (org.springframework.util.StringUtils.isEmpty(synthesize_no_2_6)) {
if (no1 <= coldMsgDto.getColdF()) {
throw new IllegalArgumentException("供冷温度填写有误,范围不得大于等于" + no1);
}
}else {
if (org.springframework.util.StringUtils.isEmpty(coldMsgDto.getColdF())){
} else {
if (org.springframework.util.StringUtils.isEmpty(coldMsgDto.getColdF())) {
coldMsgDto.setColdF(0.0);
}
if (synthesize_no_2_6.getNo51() <= coldMsgDto.getColdF()){
if (synthesize_no_2_6.getNo51() <= coldMsgDto.getColdF()) {
throw new IllegalArgumentException("供冷温度填写有误,范围不得大于等于" + synthesize_no_2_6.getNo51());
}
}
... ... @@ -634,13 +636,13 @@ public class ProjectController {
* 蓄热做一个限制,出水温度不能低于进水温度
*/
Synthesize_no_2_6 synthesize_no_2_6 = synthesize_no_2_6Service.getById(synthesize_no_2_3.getId());
if (org.springframework.util.StringUtils.isEmpty(synthesize_no_2_6)){
if (org.springframework.util.StringUtils.isEmpty(synthesize_no_2_6)) {
Synthesize_no_2_6 synthesize_no_2_61 = synthesize_no_2_6Service.getById("1");
if (synthesize_no_2_61.getNo52() <= hotMsgDto.getHotG()){
if (synthesize_no_2_61.getNo52() <= hotMsgDto.getHotG()) {
throw new IllegalArgumentException("供热温度填写有误,范围不得大于等于" + synthesize_no_2_61.getNo52());
}
}else {
if (synthesize_no_2_6.getNo52() <= hotMsgDto.getHotG()){
} else {
if (synthesize_no_2_6.getNo52() <= hotMsgDto.getHotG()) {
throw new IllegalArgumentException("供热温度填写有误,范围不得大于等于" + synthesize_no_2_6.getNo52());
}
}
... ... @@ -703,15 +705,15 @@ public class ProjectController {
String site = synthesize_no_1.getProjectSite();
CityDict cityDict = cityDictService.getOne(new QueryWrapper<CityDict>().lambda().eq(CityDict::getName, site));
Integer no1 = coldWaterDataMapper.selectById(cityDict.getId()).getNo1();
if (org.springframework.util.StringUtils.isEmpty(synthesize_no_2_6)){
if (no1 <= coldMsgDto.getColdF()){
if (org.springframework.util.StringUtils.isEmpty(synthesize_no_2_6)) {
if (no1 <= coldMsgDto.getColdF()) {
throw new IllegalArgumentException("供冷温度填写有误,范围不得大于等于" + no1);
}
}else {
if (org.springframework.util.StringUtils.isEmpty(coldMsgDto.getColdF())){
} else {
if (org.springframework.util.StringUtils.isEmpty(coldMsgDto.getColdF())) {
coldMsgDto.setColdF(0.0);
}
if (synthesize_no_2_6.getNo51() <= coldMsgDto.getColdF()){
if (synthesize_no_2_6.getNo51() <= coldMsgDto.getColdF()) {
throw new IllegalArgumentException("供冷温度填写有误,范围不得大于等于" + synthesize_no_2_6.getNo51());
}
}
... ... @@ -875,19 +877,23 @@ public class ProjectController {
}
}
}
byId.setId(synthesize_no_1.getId());
byId.setNo50(electricity);
byId.setNo51(Double.valueOf(coldWaterDataMapper.selectById(cityDict.getId()).getNo1()));
byId.setNo54(cpvAndCfmDataService.getById(cityDict.getId()).getNo7()); // 太阳能保证率
byId.setNo115(cpvAndCfmDataService.getById(cityDict.getId()).getNo6()); // 年平均太阳辐照量
byId.setNo122(cpvAndCfmDataService.getById(cityDict.getId()).getNo2()); // 太阳辐照度
byId.setNo123(cpvAndCfmDataService.getById(cityDict.getId()).getNo3());//年总光伏利用小时数
byId.setNo124(cpvAndCfmDataService.getById(cityDict.getId()).getNo5()); // 年总风机利用小时数
byId.setNo125(tall); // 高峰电价
byId.setNo126(flat); // 平时电价
byId.setNo127(floor); // 低谷电价
byId.setNo128(energySourcesMapper.selectById(cityDict.getId()).getNo2()); // 天然气价格
byId.setNo129(energySourcesMapper.selectById(cityDict.getId()).getNo1()); // 自来水价格
if (!synthesizeNo1.getProjectSite().equals(synthesize_no_1.getProjectSite())) {
byId.setId(synthesize_no_1.getId());
byId.setNo50(electricity);
byId.setNo51(Double.valueOf(coldWaterDataMapper.selectById(cityDict.getId()).getNo1()));
byId.setNo54(cpvAndCfmDataService.getById(cityDict.getId()).getNo7()); // 太阳能保证率
byId.setNo115(cpvAndCfmDataService.getById(cityDict.getId()).getNo6()); // 年平均太阳辐照量
byId.setNo122(cpvAndCfmDataService.getById(cityDict.getId()).getNo2()); // 太阳辐照度
byId.setNo123(cpvAndCfmDataService.getById(cityDict.getId()).getNo3());//年总光伏利用小时数
byId.setNo124(cpvAndCfmDataService.getById(cityDict.getId()).getNo5()); // 年总风机利用小时数
byId.setNo128(energySourcesMapper.selectById(cityDict.getId()).getNo2()); // 天然气价格
byId.setNo129(energySourcesMapper.selectById(cityDict.getId()).getNo1()); // 自来水价格
byId.setNo125(tall); // 高峰电价
byId.setNo126(flat); // 平时电价
byId.setNo127(floor); // 低谷电价
synthesize_no_2_6Service.saveOrUpdate(byId);
}
synthesize_no_1.setType(synthesizeNo1.getType());
synthesize_no_1.setDeleteState(synthesizeNo1.getDeleteState());
synthesize_no_1.setCountState(synthesizeNo1.getCountState());
... ... @@ -895,7 +901,6 @@ public class ProjectController {
synthesize_no_1.setPtState(synthesizeNo1.getPtState());
synthesize_no_1.setAdminState(synthesizeNo1.getAdminState());
synthesize_no_1.setSuperAdminState(synthesizeNo1.getAdminState());
synthesize_no_2_6Service.saveOrUpdate(byId);
}
}
no_1Service.saveOrUpdate(synthesize_no_1);
... ...
package com.synthesize_energy.item.web.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.synthesize_energy.item.entity.Synthesize_no_1ClientName;
... ... @@ -9,4 +11,6 @@ import com.synthesize_energy.item.entity.Synthesize_no_1ClientName;
* @date 2020/5/22 11:49
*/
public interface Synthesize_no_1ClientNameService extends IService<Synthesize_no_1ClientName> {
}
... ...
... ... @@ -220,7 +220,7 @@ public class ProjectServiceImpl implements ProjectService {
Synthesize_no_2_3 synthesize_no_2_3 = synthesize_no_2_3Service.getById(id);//能源设备 供电 供热 供冷 热水
List<No_3_1_1Dto> list = new ArrayList<>();
String[] array = new String[]{"供电系统", "供热系统", "供冷系统", "热水系统"};
String[] array2 = new String[]{"电网", "光伏发电", "风电", "储能", "电锅炉", "空气源热泵(制热型)", "空气源热泵(双工况)", "燃气锅炉", "空气源热泵(制冷型)", "空气源热泵(双工况)", "冷水机组", "太阳能集热器", "空气源热泵(热水型)", "多联机中央空调", "蓄热", "双蓄", "蓄冷", "地源热泵", "水源热泵"};
String[] array2 = new String[]{"电网", "光伏发电", "风电", "储能", "电锅炉", "空气源热泵(制热型)", "空气源热泵(双工况)", "燃气锅炉", "空气源热泵(制冷型)", "空气源热泵(双工况)", "冷水机组", "太阳能集热器", "空气源热泵(热水型)", "多联机中央空调", "蓄热", "双蓄", "蓄冷", "地源热泵", "水源热泵"};
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));//建筑
//Electrovalence electrovalence = electrovalenceMapper.selectById(dict.getId());//电价
... ... @@ -1441,7 +1441,7 @@ public class ProjectServiceImpl implements ProjectService {
synthesize_no_3_6.setNo232(num3);
list2.add(no_3_1_1_1Dto);*/
/**
* 水源热泵
* 水源热泵
*/
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;
No_3_1_1_1Dto no_3_1_1_1Dto = new No_3_1_1_1Dto();
... ... @@ -1499,6 +1499,13 @@ public class ProjectServiceImpl implements ProjectService {
*/
no_3_1Tall_dto.setTotalAll(format.apply(new BigDecimal(totalAll)) + "万元");
no_3_1Tall_dto.setList(list);
/**
* 新增是否计算过
*/
Synthesize_no_1 synthesize_no_1 = no_1Service.getById(id);
synthesize_no_1.setFlagCalculate("2");
no_1Service.updateById(synthesize_no_1);
return no_3_1Tall_dto;
}
... ... @@ -1876,8 +1883,10 @@ public class ProjectServiceImpl implements ProjectService {
String id = "";
List<Synthesize_no_2_1> synthesize_no_2_1s = JSON.parseArray(synthesize_no_2_1_new, Synthesize_no_2_1.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()));
for (Synthesize_no_2_1 synthesizeNo21 : synthesize_no_2_1s) {
id = synthesizeNo21.getPid();
synthesize_no_2_1Service.saveOrUpdate(synthesizeNo21);
... ... @@ -1962,7 +1971,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)));
... ... @@ -2127,7 +2136,7 @@ public class ProjectServiceImpl implements ProjectService {
CalculateLoad calculateLoad = calculateLoadService.getById(synthesize_no_2_1.getId());
if (!StringUtils.isEmpty(calculateLoad)) {
annualCoolingCapacity += calculateLoad.getNo22();
coolingArea += synthesize_no_2_1.getHeatArea();
coolingArea += synthesize_no_2_1.getColdArea();
CityDict dict = cityDictService.getOne(new QueryWrapper<CityDict>().lambda().eq(CityDict::getName, synthesize_no_1.getProjectSite()));//城市
Sort sort = sortMapper.selectById(synthesize_no_2_1.getBuildingTypeId());
Assert.notNull(synthesize_no_2_1.getHeatEnd(), "末端形式选择出错了");
... ... @@ -2180,7 +2189,9 @@ 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::getCid, synthesize_no_2_1.getPid()));
synthesize_no_2_1.setCalculateLoad(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());
... ... @@ -2547,7 +2558,7 @@ public class ProjectServiceImpl implements ProjectService {
list2.add(equipmentCapacityDto2);
} else if ("4".equals(string)) {
EquipmentCapacityDto equipmentCapacityDto2 = new EquipmentCapacityDto();
equipmentCapacityDto2.setName("水源热泵");
equipmentCapacityDto2.setName("水源热泵");
equipmentCapacityDto2.setData(format.apply(new BigDecimal(synthesize_no_3_6.getNo208())));
equipmentCapacityDto2.setType("4");
list2.add(equipmentCapacityDto2);
... ... @@ -2790,7 +2801,7 @@ public class ProjectServiceImpl implements ProjectService {
list2.add(equipmentCapacityDto1);
} else if ("4".equals(string)) {
EquipmentCapacityDto equipmentCapacityDto1 = new EquipmentCapacityDto();
equipmentCapacityDto1.setName("水源热泵");
equipmentCapacityDto1.setName("水源热泵");
equipmentCapacityDto1.setData(format.apply(new BigDecimal(synthesize_no_3_6.getNo216())));
equipmentCapacityDto1.setType("4");
list2.add(equipmentCapacityDto1);
... ... @@ -3539,7 +3550,7 @@ public class ProjectServiceImpl implements ProjectService {
list2.add(equipmentCapacityDto1);
} else if ("4".equals(string)) {
EquipmentCapacityDto equipmentCapacityDto1 = new EquipmentCapacityDto();
equipmentCapacityDto1.setName("水源热泵");
equipmentCapacityDto1.setName("水源热泵");
equipmentCapacityDto1.setData(format.apply(new BigDecimal(synthesize_no_3_6.getNo224())));
equipmentCapacityDto1.setType("4");
list2.add(equipmentCapacityDto1);
... ... @@ -3949,7 +3960,7 @@ public class ProjectServiceImpl implements ProjectService {
* 电锅炉热水节省费用=年热水费费用*0.4-年总需热水热量*0.4/0.9/电锅炉效率*((8*低谷电价+2*高峰电价)/10)
*/
No_3_1_1_1Dto no_3_1_1_1Dto = new No_3_1_1_1Dto();
no_3_1_1_1Dto.setName("水源热泵");
no_3_1_1_1Dto.setName("水源热泵");
no_3_1_1_1Dto.setProjectEarnings(format.apply(new BigDecimal(synthesize_no_2_2.getHotWaterPrice() * 0.4 - synthesize_no_3_6.getNo62() * 0.4 / 0.9 / synthesize_no_2_6.getNo119() * ((8 * synthesize_no_3_6.getNo114() + 2 * synthesize_no_3_6.getNo112()) / 10))));
no_3_1_1_1Dtos.add(no_3_1_1_1Dto);
}
... ...
... ... @@ -634,24 +634,24 @@ public class Synthesize_no_2_6ServiceImpl extends ServiceImpl<Synthesize_no_2_6M
List<ComputeArgDto> computeArgDtos = new ArrayList<>();
ComputeArgDto computeArgDto1 = new ComputeArgDto();
computeArgDto1.setId(119);
computeArgDto1.setNamType("水源热泵系统综合能效比");
computeArgDto1.setNamType("水源热泵系统综合能效比");
computeArgDto1.setModelType(synthesize_no_2_6.getNo119());
computeArgDto1.setName("");
computeArgDtos.add(computeArgDto1);
ComputeArgDto computeArgDto2 = new ComputeArgDto();
computeArgDto2.setId(120);
computeArgDto2.setNamType("水源热泵单位投资成本");
computeArgDto2.setNamType("水源热泵单位投资成本");
computeArgDto2.setModelType(synthesize_no_2_6.getNo120());
computeArgDto2.setName("元/kW");
computeArgDtos.add(computeArgDto2);
ComputeArgDto computeArgDto3 = new ComputeArgDto();
computeArgDto3.setId(121);
computeArgDto3.setNamType("水源热泵单位运维成本");
computeArgDto3.setNamType("水源热泵单位运维成本");
computeArgDto3.setModelType(synthesize_no_2_6.getNo121());
computeArgDto3.setName("元/吨");
computeArgDtos.add(computeArgDto3);
computeArg2Dto = new ComputeArg2Dto();
computeArg2Dto.setName("水源热泵");
computeArg2Dto.setName("水源热泵");
computeArg2Dto.setList(computeArgDtos);
computeArg2DtoList.add(computeArg2Dto);
}
... ... @@ -676,7 +676,7 @@ public class Synthesize_no_2_6ServiceImpl extends ServiceImpl<Synthesize_no_2_6M
computeArgDtos.add(computeArgDto1);
ComputeArgDto computeArgDto2 = new ComputeArgDto();
computeArgDto2.setId(63);
computeArgDto2.setNamType("基准利润率");
computeArgDto2.setNamType("基准收益率");
computeArgDto2.setModelType(synthesize_no_2_6.getNo63());
computeArgDto2.setName("");
computeArgDtos.add(computeArgDto2);
... ...
... ... @@ -46,9 +46,9 @@ spring:
datasource:
master:
driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql://xxx:3306/synthesize_energy?useUnicode=true&&characterEncoding=utf8&useSSL=false&serverTimezone=UTC
username: xx
password: xx
url: jdbc:mysql://1f692e5a3458475ea270448f4d3bfde5in01.internal.cn-east-2.mysql.rds.myhuaweicloud.com:3306/synthesize_energy?useUnicode=true&&characterEncoding=utf8&useSSL=false&serverTimezone=UTC
username: db136s1ehvo1yn73
password: cxz307311SJK
type: org.apache.commons.dbcp2.BasicDataSource
dbcp2:
connection-init-sqls: SET NAMES utf8mb4
... ...
spring:
profiles:
#开发时使用下面注释
active: dev
# active: dev
# 打包时使用下面注释
# active: prod
active: prod
... ...
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.synthesize_energy.item.mapper.Synthesize_no_1ClientNameMapper">
<select id="queryByIdPage" resultType="com.synthesize_energy.item.entity.Synthesize_no_1ClientName">
SELECT
id,name,user_id,nature,industry,site,main_touch_person,touch_phone,remark,time,new_time,collect_state,type,delete_state
FROM synthesize_no_1_client_name
<where>
<if test="userId != null and userId != ''">
and user_id = #{userId}
</if>
<if test="name != null and name != ''">
and name like concat('%', #{name}, '%')
</if>
</where>
AND delete_state != '1'
ORDER BY convert(new_time using gbk) collate gbk_chinese_ci asc ,
convert(name using gbk) collate gbk_chinese_ci asc
</select>
</mapper>
\ No newline at end of file
... ...