正在显示
16 个修改的文件
包含
189 行增加
和
62 行删除
@@ -17,7 +17,7 @@ public class CorsFilter implements Filter { | @@ -17,7 +17,7 @@ public class CorsFilter implements Filter { | ||
17 | res.addHeader("Access-Control-Allow-Credentials", "true"); | 17 | res.addHeader("Access-Control-Allow-Credentials", "true"); |
18 | res.addHeader("Access-Control-Allow-Origin", "*"); | 18 | res.addHeader("Access-Control-Allow-Origin", "*"); |
19 | res.addHeader("Access-Control-Allow-Methods", "GET, POST, DELETE, PUT"); | 19 | res.addHeader("Access-Control-Allow-Methods", "GET, POST, DELETE, PUT"); |
20 | - res.addHeader("Access-Control-Allow-Headers", "Content-Type,X-CAF-Authorization-Token,sessionToken,X-TOKEN"); | 20 | + res.addHeader("Access-Control-Allow-Headers", "Content-Type,X-CAF-Authorization-Token,sessionToken,X-TOKEN,token"); |
21 | if (((HttpServletRequest) request).getMethod().equals("OPTIONS")) { | 21 | if (((HttpServletRequest) request).getMethod().equals("OPTIONS")) { |
22 | response.getWriter().println("ok"); | 22 | response.getWriter().println("ok"); |
23 | return; | 23 | return; |
synthesize_energy_api/src/main/java/com/synthesize_energy/item/config/MyContextListener.java
0 → 100644
1 | +package com.synthesize_energy.item.config; | ||
2 | + | ||
3 | +import org.springframework.stereotype.Component; | ||
4 | + | ||
5 | +import javax.servlet.ServletContextEvent; | ||
6 | +import javax.servlet.ServletContextListener; | ||
7 | +import javax.servlet.annotation.WebListener; | ||
8 | + | ||
9 | +@WebListener | ||
10 | +@Component | ||
11 | +public class MyContextListener implements ServletContextListener { | ||
12 | + private SSHConnection conexionssh; | ||
13 | + | ||
14 | + public MyContextListener() { | ||
15 | + super(); | ||
16 | + } | ||
17 | + | ||
18 | + | ||
19 | + | ||
20 | + | ||
21 | + @Override | ||
22 | + public void contextInitialized(ServletContextEvent arg0) { | ||
23 | + // 建立连接 | ||
24 | + System.out.println("Context initialized ... !\n\n\n"); | ||
25 | + try { | ||
26 | + conexionssh = new SSHConnection(); | ||
27 | + conexionssh.SSHConnection(); | ||
28 | + System.out.println("\n\n\n成功建立SSH连接!\n\n\n"); | ||
29 | + } catch (Throwable e) { | ||
30 | + System.out.println("\n\n\nSSH连接失败!\n\n\n"); | ||
31 | + e.printStackTrace(); // error connecting SSH server | ||
32 | + } | ||
33 | + } | ||
34 | + | ||
35 | + | ||
36 | + | ||
37 | + | ||
38 | + @Override | ||
39 | + public void contextDestroyed(ServletContextEvent arg0) { | ||
40 | + // 断开连接 | ||
41 | + System.out.println("Context destroyed ... !\n\n\n"); | ||
42 | + try { | ||
43 | + conexionssh.closeSSH(); // disconnect | ||
44 | + System.out.println("\n\n\n成功断开SSH连接!\n\n\n"); | ||
45 | + } catch (Exception e) { | ||
46 | + e.printStackTrace(); | ||
47 | + System.out.println("\n\n\n断开SSH连接出错!\n\n\n"); | ||
48 | + } | ||
49 | + } | ||
50 | +} | ||
51 | + |
1 | package com.synthesize_energy.item.dto; | 1 | package com.synthesize_energy.item.dto; |
2 | 2 | ||
3 | import com.synthesize_energy.item.entity.*; | 3 | import com.synthesize_energy.item.entity.*; |
4 | +import com.synthesize_energy.item.vo.CalculateLoadVo; | ||
4 | import io.swagger.annotations.ApiModelProperty; | 5 | import io.swagger.annotations.ApiModelProperty; |
5 | import lombok.Data; | 6 | import lombok.Data; |
6 | 7 | ||
@@ -31,5 +32,5 @@ public class ProjectDto { | @@ -31,5 +32,5 @@ public class ProjectDto { | ||
31 | @ApiModelProperty("参数修正") | 32 | @ApiModelProperty("参数修正") |
32 | private Synthesize_no_2_6 synthesize_no_2_6; | 33 | private Synthesize_no_2_6 synthesize_no_2_6; |
33 | @ApiModelProperty("符合计算") | 34 | @ApiModelProperty("符合计算") |
34 | - private List<CalculateLoad> calculateLoads; | 35 | + private List<CalculateLoadVo> calculateLoads; |
35 | } | 36 | } |
@@ -91,5 +91,7 @@ public class Synthesize_no_1 implements Serializable { | @@ -91,5 +91,7 @@ public class Synthesize_no_1 implements Serializable { | ||
91 | private BigDecimal lng; | 91 | private BigDecimal lng; |
92 | @ApiModelProperty("纬度") | 92 | @ApiModelProperty("纬度") |
93 | private BigDecimal lat; | 93 | private BigDecimal lat; |
94 | + @ApiModelProperty("1-计算过2-没有计算过") | ||
95 | + private String flagCalculate; | ||
94 | 96 | ||
95 | } | 97 | } |
synthesize_energy_api/src/main/java/com/synthesize_energy/item/entity/Synthesize_no_1ClientName.java
@@ -41,7 +41,7 @@ public class Synthesize_no_1ClientName implements Serializable { | @@ -41,7 +41,7 @@ public class Synthesize_no_1ClientName implements Serializable { | ||
41 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | 41 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
42 | private Date time; | 42 | private Date time; |
43 | @ApiModelProperty(hidden = true) | 43 | @ApiModelProperty(hidden = true) |
44 | - private Date newTime; | 44 | + private String newTime; |
45 | @ApiModelProperty("1收藏2没收藏") | 45 | @ApiModelProperty("1收藏2没收藏") |
46 | private String collectState; | 46 | private String collectState; |
47 | /** | 47 | /** |
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableId; | @@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableId; | ||
6 | import com.baomidou.mybatisplus.annotation.TableName; | 6 | import com.baomidou.mybatisplus.annotation.TableName; |
7 | import com.fasterxml.jackson.databind.annotation.JsonSerialize; | 7 | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
8 | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; | 8 | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
9 | +import com.synthesize_energy.item.vo.CalculateLoadVo; | ||
9 | import io.swagger.annotations.ApiModelProperty; | 10 | import io.swagger.annotations.ApiModelProperty; |
10 | import lombok.Data; | 11 | import lombok.Data; |
11 | 12 | ||
@@ -52,6 +53,6 @@ public class Synthesize_no_2_1 implements Serializable { | @@ -52,6 +53,6 @@ public class Synthesize_no_2_1 implements Serializable { | ||
52 | 53 | ||
53 | @ApiModelProperty("负荷参数") | 54 | @ApiModelProperty("负荷参数") |
54 | @TableField(exist = false) | 55 | @TableField(exist = false) |
55 | - private CalculateLoad calculateLoad; | 56 | + private CalculateLoadVo calculateLoad; |
56 | 57 | ||
57 | } | 58 | } |
1 | package com.synthesize_energy.item.mapper; | 1 | package com.synthesize_energy.item.mapper; |
2 | 2 | ||
3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
4 | +import com.baomidou.mybatisplus.core.metadata.IPage; | ||
5 | +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
4 | import com.synthesize_energy.item.entity.Synthesize_no_1ClientName; | 6 | import com.synthesize_energy.item.entity.Synthesize_no_1ClientName; |
7 | +import org.apache.ibatis.annotations.Param; | ||
5 | 8 | ||
6 | /** | 9 | /** |
7 | * @author kgy | 10 | * @author kgy |
@@ -9,4 +12,6 @@ import com.synthesize_energy.item.entity.Synthesize_no_1ClientName; | @@ -9,4 +12,6 @@ import com.synthesize_energy.item.entity.Synthesize_no_1ClientName; | ||
9 | * @date 2020/5/22 11:48 | 12 | * @date 2020/5/22 11:48 |
10 | */ | 13 | */ |
11 | public interface Synthesize_no_1ClientNameMapper extends BaseMapper<Synthesize_no_1ClientName> { | 14 | public interface Synthesize_no_1ClientNameMapper extends BaseMapper<Synthesize_no_1ClientName> { |
15 | + | ||
16 | + IPage<Synthesize_no_1ClientName> queryByIdPage(Page<Synthesize_no_1ClientName> namePage, @Param("userId") String userId, @Param("name") String name); | ||
12 | } | 17 | } |
@@ -173,7 +173,7 @@ public class MyController { | @@ -173,7 +173,7 @@ public class MyController { | ||
173 | if (StringUtils.isEmpty(synthesize_no_1ClientName.getId())) { | 173 | if (StringUtils.isEmpty(synthesize_no_1ClientName.getId())) { |
174 | synthesize_no_1ClientName.setUserId(JwtUtil.getUserId(request.getHeader("token"))); | 174 | synthesize_no_1ClientName.setUserId(JwtUtil.getUserId(request.getHeader("token"))); |
175 | synthesize_no_1ClientName.setTime(new Date()); | 175 | synthesize_no_1ClientName.setTime(new Date()); |
176 | - synthesize_no_1ClientName.setNewTime(new Date()); | 176 | + synthesize_no_1ClientName.setNewTime(synthesize_no_1ClientName.getName()); |
177 | synthesize_no_1ClientName.setDeleteState("0"); | 177 | synthesize_no_1ClientName.setDeleteState("0"); |
178 | } | 178 | } |
179 | synthesize_no_1ClientNameService.saveOrUpdate(synthesize_no_1ClientName); | 179 | synthesize_no_1ClientNameService.saveOrUpdate(synthesize_no_1ClientName); |
@@ -196,9 +196,11 @@ public class MyController { | @@ -196,9 +196,11 @@ public class MyController { | ||
196 | switch (type) { | 196 | switch (type) { |
197 | case "1": | 197 | case "1": |
198 | synthesize_no_1ClientName.setType("1"); | 198 | synthesize_no_1ClientName.setType("1"); |
199 | + synthesize_no_1ClientName.setNewTime("11111"); | ||
199 | break; | 200 | break; |
200 | case "2": | 201 | case "2": |
201 | synthesize_no_1ClientName.setType(null); | 202 | synthesize_no_1ClientName.setType(null); |
203 | + synthesize_no_1ClientName.setNewTime(synthesize_no_1ClientName.getName()); | ||
202 | break; | 204 | break; |
203 | case "3": | 205 | case "3": |
204 | synthesize_no_1ClientName.setDeleteState("1"); | 206 | synthesize_no_1ClientName.setDeleteState("1"); |
@@ -228,6 +230,9 @@ public class MyController { | @@ -228,6 +230,9 @@ public class MyController { | ||
228 | return RestResponse.success("设置成功"); | 230 | return RestResponse.success("设置成功"); |
229 | } | 231 | } |
230 | 232 | ||
233 | + @Autowired | ||
234 | + private Synthesize_no_1ClientNameMapper synthesize_no_1ClientNameMapper; | ||
235 | + | ||
231 | @GetMapping("query/client") | 236 | @GetMapping("query/client") |
232 | @ApiOperation(value = "查询客户", notes = "查询客户", response = Synthesize_no_1ClientName.class) | 237 | @ApiOperation(value = "查询客户", notes = "查询客户", response = Synthesize_no_1ClientName.class) |
233 | @ApiImplicitParams({ | 238 | @ApiImplicitParams({ |
@@ -241,22 +246,23 @@ public class MyController { | @@ -241,22 +246,23 @@ public class MyController { | ||
241 | @RequestParam(value = "rows", required = true) Integer rows | 246 | @RequestParam(value = "rows", required = true) Integer rows |
242 | 247 | ||
243 | ) { | 248 | ) { |
244 | - for (Synthesize_no_1ClientName synthesize_no_1ClientName : synthesize_no_1ClientNameService.list(new QueryWrapper<Synthesize_no_1ClientName>() | 249 | +/* for (Synthesize_no_1ClientName synthesize_no_1ClientName : synthesize_no_1ClientNameService.list(new QueryWrapper<Synthesize_no_1ClientName>() |
245 | .lambda() | 250 | .lambda() |
246 | .eq(Synthesize_no_1ClientName::getType, "1") | 251 | .eq(Synthesize_no_1ClientName::getType, "1") |
247 | .ne(Synthesize_no_1ClientName::getDeleteState,"1") | 252 | .ne(Synthesize_no_1ClientName::getDeleteState,"1") |
248 | .eq(Synthesize_no_1ClientName::getUserId, JwtUtil.getUserId(request.getHeader("token"))))) { | 253 | .eq(Synthesize_no_1ClientName::getUserId, JwtUtil.getUserId(request.getHeader("token"))))) { |
249 | synthesize_no_1ClientName.setNewTime(new Date()); | 254 | synthesize_no_1ClientName.setNewTime(new Date()); |
250 | synthesize_no_1ClientNameService.updateById(synthesize_no_1ClientName); | 255 | synthesize_no_1ClientNameService.updateById(synthesize_no_1ClientName); |
251 | - } | 256 | + }*/ |
252 | 257 | ||
253 | Page<Synthesize_no_1ClientName> namePage = new Page<>(page, rows); | 258 | Page<Synthesize_no_1ClientName> namePage = new Page<>(page, rows); |
254 | - IPage<Synthesize_no_1ClientName> iPage = synthesize_no_1ClientNameService.page(namePage, new QueryWrapper<Synthesize_no_1ClientName>() | 259 | +/* IPage<Synthesize_no_1ClientName> iPage = synthesize_no_1ClientNameService.page(namePage, new QueryWrapper<Synthesize_no_1ClientName>() |
255 | .lambda() | 260 | .lambda() |
256 | .eq(Synthesize_no_1ClientName::getUserId, JwtUtil.getUserId(request.getHeader("token"))) | 261 | .eq(Synthesize_no_1ClientName::getUserId, JwtUtil.getUserId(request.getHeader("token"))) |
257 | .ne(Synthesize_no_1ClientName::getDeleteState,"1") | 262 | .ne(Synthesize_no_1ClientName::getDeleteState,"1") |
258 | .like(!StringUtils.isEmpty(name), Synthesize_no_1ClientName::getName, name) | 263 | .like(!StringUtils.isEmpty(name), Synthesize_no_1ClientName::getName, name) |
259 | - .orderByDesc(Synthesize_no_1ClientName::getNewTime)); | 264 | + .orderByDesc(Synthesize_no_1ClientName::getNewTime));*/ |
265 | + IPage<Synthesize_no_1ClientName> iPage = synthesize_no_1ClientNameMapper.queryByIdPage(namePage,JwtUtil.getUserId(request.getHeader("token")),name); | ||
260 | return new PageVO<>(iPage.getRecords(), iPage.getTotal(), page, rows); | 266 | return new PageVO<>(iPage.getRecords(), iPage.getTotal(), page, rows); |
261 | } | 267 | } |
262 | 268 |
1 | +package com.synthesize_energy.item.web.controller; | ||
2 | + | ||
3 | +import io.swagger.annotations.Api; | ||
4 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
5 | +import org.springframework.web.bind.annotation.RestController; | ||
6 | + | ||
7 | +/** | ||
8 | + * @author kgy | ||
9 | + * @version 1.0 | ||
10 | + * @date 2020/10/14 14:46 | ||
11 | + */ | ||
12 | +@RestController | ||
13 | +@RequestMapping("newProject") | ||
14 | +@Api(value = "是否计算过", tags = "是否计算过") | ||
15 | +public class NewProjectController { | ||
16 | + | ||
17 | + | ||
18 | + | ||
19 | +} |
synthesize_energy_api/src/main/java/com/synthesize_energy/item/web/controller/ProjectController.java
@@ -89,6 +89,7 @@ public class ProjectController { | @@ -89,6 +89,7 @@ public class ProjectController { | ||
89 | synthesize_no_1.setCountState("0"); | 89 | synthesize_no_1.setCountState("0"); |
90 | synthesize_no_1.setUserId(JwtUtil.getUserId(request.getHeader("token"))); | 90 | synthesize_no_1.setUserId(JwtUtil.getUserId(request.getHeader("token"))); |
91 | synthesize_no_1.setNewTime(new Date()); | 91 | synthesize_no_1.setNewTime(new Date()); |
92 | + synthesize_no_1.setFlagCalculate("2"); | ||
92 | } else { | 93 | } else { |
93 | /** | 94 | /** |
94 | * 修改 对条件设置的参数修正 热水定额 冷水初始温度 修改 | 95 | * 修改 对条件设置的参数修正 热水定额 冷水初始温度 修改 |
@@ -171,7 +172,8 @@ public class ProjectController { | @@ -171,7 +172,8 @@ public class ProjectController { | ||
171 | ) { | 172 | ) { |
172 | String userId = JwtUtil.getUserId(request.getHeader("token")); | 173 | String userId = JwtUtil.getUserId(request.getHeader("token")); |
173 | QueryWrapper<Synthesize_no_1ClientName> queryWrapper = new QueryWrapper<>(); | 174 | QueryWrapper<Synthesize_no_1ClientName> queryWrapper = new QueryWrapper<>(); |
174 | - queryWrapper.lambda().eq(Synthesize_no_1ClientName::getUserId, userId).ne(Synthesize_no_1ClientName::getDeleteState,"1").orderByDesc(Synthesize_no_1ClientName::getNewTime); | 175 | + queryWrapper.lambda().eq(Synthesize_no_1ClientName::getUserId, userId).ne(Synthesize_no_1ClientName::getDeleteState, "1") |
176 | + .orderByDesc(Synthesize_no_1ClientName::getNewTime); | ||
175 | queryWrapper.like(StringUtils.isNotBlank(name), "name", name); | 177 | queryWrapper.like(StringUtils.isNotBlank(name), "name", name); |
176 | List<Synthesize_no_1ClientName> list = synthesize_no_1ClientNameService.list(queryWrapper); | 178 | List<Synthesize_no_1ClientName> list = synthesize_no_1ClientNameService.list(queryWrapper); |
177 | List<ClientNameDto> names = new ArrayList<>(); | 179 | List<ClientNameDto> names = new ArrayList<>(); |
@@ -340,13 +342,13 @@ public class ProjectController { | @@ -340,13 +342,13 @@ public class ProjectController { | ||
340 | * 蓄热做一个限制,出水温度不能低于进水温度 | 342 | * 蓄热做一个限制,出水温度不能低于进水温度 |
341 | */ | 343 | */ |
342 | Synthesize_no_2_6 synthesize_no_2_6 = synthesize_no_2_6Service.getById(synthesize_no_2_3.getId()); | 344 | Synthesize_no_2_6 synthesize_no_2_6 = synthesize_no_2_6Service.getById(synthesize_no_2_3.getId()); |
343 | - if (org.springframework.util.StringUtils.isEmpty(synthesize_no_2_6)){ | 345 | + if (org.springframework.util.StringUtils.isEmpty(synthesize_no_2_6)) { |
344 | Synthesize_no_2_6 synthesize_no_2_61 = synthesize_no_2_6Service.getById("1"); | 346 | Synthesize_no_2_6 synthesize_no_2_61 = synthesize_no_2_6Service.getById("1"); |
345 | - if (synthesize_no_2_61.getNo52() <= hotMsgDto.getHotG()){ | 347 | + if (synthesize_no_2_61.getNo52() <= hotMsgDto.getHotG()) { |
346 | throw new IllegalArgumentException("供热温度填写有误,范围不得大于等于" + synthesize_no_2_61.getNo52()); | 348 | throw new IllegalArgumentException("供热温度填写有误,范围不得大于等于" + synthesize_no_2_61.getNo52()); |
347 | } | 349 | } |
348 | - }else { | ||
349 | - if (synthesize_no_2_6.getNo52() <= hotMsgDto.getHotG()){ | 350 | + } else { |
351 | + if (synthesize_no_2_6.getNo52() <= hotMsgDto.getHotG()) { | ||
350 | throw new IllegalArgumentException("供热温度填写有误,范围不得大于等于" + synthesize_no_2_6.getNo52()); | 352 | throw new IllegalArgumentException("供热温度填写有误,范围不得大于等于" + synthesize_no_2_6.getNo52()); |
351 | } | 353 | } |
352 | } | 354 | } |
@@ -410,15 +412,15 @@ public class ProjectController { | @@ -410,15 +412,15 @@ public class ProjectController { | ||
410 | String site = synthesize_no_1.getProjectSite(); | 412 | String site = synthesize_no_1.getProjectSite(); |
411 | CityDict cityDict = cityDictService.getOne(new QueryWrapper<CityDict>().lambda().eq(CityDict::getName, site)); | 413 | CityDict cityDict = cityDictService.getOne(new QueryWrapper<CityDict>().lambda().eq(CityDict::getName, site)); |
412 | Integer no1 = coldWaterDataMapper.selectById(cityDict.getId()).getNo1(); | 414 | Integer no1 = coldWaterDataMapper.selectById(cityDict.getId()).getNo1(); |
413 | - if (org.springframework.util.StringUtils.isEmpty(synthesize_no_2_6)){ | ||
414 | - if (no1 <= coldMsgDto.getColdF()){ | 415 | + if (org.springframework.util.StringUtils.isEmpty(synthesize_no_2_6)) { |
416 | + if (no1 <= coldMsgDto.getColdF()) { | ||
415 | throw new IllegalArgumentException("供冷温度填写有误,范围不得大于等于" + no1); | 417 | throw new IllegalArgumentException("供冷温度填写有误,范围不得大于等于" + no1); |
416 | } | 418 | } |
417 | - }else { | ||
418 | - if (org.springframework.util.StringUtils.isEmpty(coldMsgDto.getColdF())){ | 419 | + } else { |
420 | + if (org.springframework.util.StringUtils.isEmpty(coldMsgDto.getColdF())) { | ||
419 | coldMsgDto.setColdF(0.0); | 421 | coldMsgDto.setColdF(0.0); |
420 | } | 422 | } |
421 | - if (synthesize_no_2_6.getNo51() <= coldMsgDto.getColdF()){ | 423 | + if (synthesize_no_2_6.getNo51() <= coldMsgDto.getColdF()) { |
422 | throw new IllegalArgumentException("供冷温度填写有误,范围不得大于等于" + synthesize_no_2_6.getNo51()); | 424 | throw new IllegalArgumentException("供冷温度填写有误,范围不得大于等于" + synthesize_no_2_6.getNo51()); |
423 | } | 425 | } |
424 | } | 426 | } |
@@ -634,13 +636,13 @@ public class ProjectController { | @@ -634,13 +636,13 @@ public class ProjectController { | ||
634 | * 蓄热做一个限制,出水温度不能低于进水温度 | 636 | * 蓄热做一个限制,出水温度不能低于进水温度 |
635 | */ | 637 | */ |
636 | Synthesize_no_2_6 synthesize_no_2_6 = synthesize_no_2_6Service.getById(synthesize_no_2_3.getId()); | 638 | Synthesize_no_2_6 synthesize_no_2_6 = synthesize_no_2_6Service.getById(synthesize_no_2_3.getId()); |
637 | - if (org.springframework.util.StringUtils.isEmpty(synthesize_no_2_6)){ | 639 | + if (org.springframework.util.StringUtils.isEmpty(synthesize_no_2_6)) { |
638 | Synthesize_no_2_6 synthesize_no_2_61 = synthesize_no_2_6Service.getById("1"); | 640 | Synthesize_no_2_6 synthesize_no_2_61 = synthesize_no_2_6Service.getById("1"); |
639 | - if (synthesize_no_2_61.getNo52() <= hotMsgDto.getHotG()){ | 641 | + if (synthesize_no_2_61.getNo52() <= hotMsgDto.getHotG()) { |
640 | throw new IllegalArgumentException("供热温度填写有误,范围不得大于等于" + synthesize_no_2_61.getNo52()); | 642 | throw new IllegalArgumentException("供热温度填写有误,范围不得大于等于" + synthesize_no_2_61.getNo52()); |
641 | } | 643 | } |
642 | - }else { | ||
643 | - if (synthesize_no_2_6.getNo52() <= hotMsgDto.getHotG()){ | 644 | + } else { |
645 | + if (synthesize_no_2_6.getNo52() <= hotMsgDto.getHotG()) { | ||
644 | throw new IllegalArgumentException("供热温度填写有误,范围不得大于等于" + synthesize_no_2_6.getNo52()); | 646 | throw new IllegalArgumentException("供热温度填写有误,范围不得大于等于" + synthesize_no_2_6.getNo52()); |
645 | } | 647 | } |
646 | } | 648 | } |
@@ -703,15 +705,15 @@ public class ProjectController { | @@ -703,15 +705,15 @@ public class ProjectController { | ||
703 | String site = synthesize_no_1.getProjectSite(); | 705 | String site = synthesize_no_1.getProjectSite(); |
704 | CityDict cityDict = cityDictService.getOne(new QueryWrapper<CityDict>().lambda().eq(CityDict::getName, site)); | 706 | CityDict cityDict = cityDictService.getOne(new QueryWrapper<CityDict>().lambda().eq(CityDict::getName, site)); |
705 | Integer no1 = coldWaterDataMapper.selectById(cityDict.getId()).getNo1(); | 707 | Integer no1 = coldWaterDataMapper.selectById(cityDict.getId()).getNo1(); |
706 | - if (org.springframework.util.StringUtils.isEmpty(synthesize_no_2_6)){ | ||
707 | - if (no1 <= coldMsgDto.getColdF()){ | 708 | + if (org.springframework.util.StringUtils.isEmpty(synthesize_no_2_6)) { |
709 | + if (no1 <= coldMsgDto.getColdF()) { | ||
708 | throw new IllegalArgumentException("供冷温度填写有误,范围不得大于等于" + no1); | 710 | throw new IllegalArgumentException("供冷温度填写有误,范围不得大于等于" + no1); |
709 | } | 711 | } |
710 | - }else { | ||
711 | - if (org.springframework.util.StringUtils.isEmpty(coldMsgDto.getColdF())){ | 712 | + } else { |
713 | + if (org.springframework.util.StringUtils.isEmpty(coldMsgDto.getColdF())) { | ||
712 | coldMsgDto.setColdF(0.0); | 714 | coldMsgDto.setColdF(0.0); |
713 | } | 715 | } |
714 | - if (synthesize_no_2_6.getNo51() <= coldMsgDto.getColdF()){ | 716 | + if (synthesize_no_2_6.getNo51() <= coldMsgDto.getColdF()) { |
715 | throw new IllegalArgumentException("供冷温度填写有误,范围不得大于等于" + synthesize_no_2_6.getNo51()); | 717 | throw new IllegalArgumentException("供冷温度填写有误,范围不得大于等于" + synthesize_no_2_6.getNo51()); |
716 | } | 718 | } |
717 | } | 719 | } |
@@ -875,19 +877,23 @@ public class ProjectController { | @@ -875,19 +877,23 @@ public class ProjectController { | ||
875 | } | 877 | } |
876 | } | 878 | } |
877 | } | 879 | } |
878 | - byId.setId(synthesize_no_1.getId()); | ||
879 | - byId.setNo50(electricity); | ||
880 | - byId.setNo51(Double.valueOf(coldWaterDataMapper.selectById(cityDict.getId()).getNo1())); | ||
881 | - byId.setNo54(cpvAndCfmDataService.getById(cityDict.getId()).getNo7()); // 太阳能保证率 | ||
882 | - byId.setNo115(cpvAndCfmDataService.getById(cityDict.getId()).getNo6()); // 年平均太阳辐照量 | ||
883 | - byId.setNo122(cpvAndCfmDataService.getById(cityDict.getId()).getNo2()); // 太阳辐照度 | ||
884 | - byId.setNo123(cpvAndCfmDataService.getById(cityDict.getId()).getNo3());//年总光伏利用小时数 | ||
885 | - byId.setNo124(cpvAndCfmDataService.getById(cityDict.getId()).getNo5()); // 年总风机利用小时数 | ||
886 | - byId.setNo125(tall); // 高峰电价 | ||
887 | - byId.setNo126(flat); // 平时电价 | ||
888 | - byId.setNo127(floor); // 低谷电价 | ||
889 | - byId.setNo128(energySourcesMapper.selectById(cityDict.getId()).getNo2()); // 天然气价格 | ||
890 | - byId.setNo129(energySourcesMapper.selectById(cityDict.getId()).getNo1()); // 自来水价格 | 880 | + if (!synthesizeNo1.getProjectSite().equals(synthesize_no_1.getProjectSite())) { |
881 | + byId.setId(synthesize_no_1.getId()); | ||
882 | + byId.setNo50(electricity); | ||
883 | + byId.setNo51(Double.valueOf(coldWaterDataMapper.selectById(cityDict.getId()).getNo1())); | ||
884 | + byId.setNo54(cpvAndCfmDataService.getById(cityDict.getId()).getNo7()); // 太阳能保证率 | ||
885 | + byId.setNo115(cpvAndCfmDataService.getById(cityDict.getId()).getNo6()); // 年平均太阳辐照量 | ||
886 | + byId.setNo122(cpvAndCfmDataService.getById(cityDict.getId()).getNo2()); // 太阳辐照度 | ||
887 | + byId.setNo123(cpvAndCfmDataService.getById(cityDict.getId()).getNo3());//年总光伏利用小时数 | ||
888 | + byId.setNo124(cpvAndCfmDataService.getById(cityDict.getId()).getNo5()); // 年总风机利用小时数 | ||
889 | + byId.setNo128(energySourcesMapper.selectById(cityDict.getId()).getNo2()); // 天然气价格 | ||
890 | + byId.setNo129(energySourcesMapper.selectById(cityDict.getId()).getNo1()); // 自来水价格 | ||
891 | + | ||
892 | + byId.setNo125(tall); // 高峰电价 | ||
893 | + byId.setNo126(flat); // 平时电价 | ||
894 | + byId.setNo127(floor); // 低谷电价 | ||
895 | + synthesize_no_2_6Service.saveOrUpdate(byId); | ||
896 | + } | ||
891 | synthesize_no_1.setType(synthesizeNo1.getType()); | 897 | synthesize_no_1.setType(synthesizeNo1.getType()); |
892 | synthesize_no_1.setDeleteState(synthesizeNo1.getDeleteState()); | 898 | synthesize_no_1.setDeleteState(synthesizeNo1.getDeleteState()); |
893 | synthesize_no_1.setCountState(synthesizeNo1.getCountState()); | 899 | synthesize_no_1.setCountState(synthesizeNo1.getCountState()); |
@@ -895,7 +901,6 @@ public class ProjectController { | @@ -895,7 +901,6 @@ public class ProjectController { | ||
895 | synthesize_no_1.setPtState(synthesizeNo1.getPtState()); | 901 | synthesize_no_1.setPtState(synthesizeNo1.getPtState()); |
896 | synthesize_no_1.setAdminState(synthesizeNo1.getAdminState()); | 902 | synthesize_no_1.setAdminState(synthesizeNo1.getAdminState()); |
897 | synthesize_no_1.setSuperAdminState(synthesizeNo1.getAdminState()); | 903 | synthesize_no_1.setSuperAdminState(synthesizeNo1.getAdminState()); |
898 | - synthesize_no_2_6Service.saveOrUpdate(byId); | ||
899 | } | 904 | } |
900 | } | 905 | } |
901 | no_1Service.saveOrUpdate(synthesize_no_1); | 906 | no_1Service.saveOrUpdate(synthesize_no_1); |
1 | package com.synthesize_energy.item.web.service; | 1 | package com.synthesize_energy.item.web.service; |
2 | 2 | ||
3 | +import com.baomidou.mybatisplus.core.metadata.IPage; | ||
4 | +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
3 | import com.baomidou.mybatisplus.extension.service.IService; | 5 | import com.baomidou.mybatisplus.extension.service.IService; |
4 | import com.synthesize_energy.item.entity.Synthesize_no_1ClientName; | 6 | import com.synthesize_energy.item.entity.Synthesize_no_1ClientName; |
5 | 7 | ||
@@ -9,4 +11,6 @@ import com.synthesize_energy.item.entity.Synthesize_no_1ClientName; | @@ -9,4 +11,6 @@ import com.synthesize_energy.item.entity.Synthesize_no_1ClientName; | ||
9 | * @date 2020/5/22 11:49 | 11 | * @date 2020/5/22 11:49 |
10 | */ | 12 | */ |
11 | public interface Synthesize_no_1ClientNameService extends IService<Synthesize_no_1ClientName> { | 13 | public interface Synthesize_no_1ClientNameService extends IService<Synthesize_no_1ClientName> { |
14 | + | ||
15 | + | ||
12 | } | 16 | } |
@@ -220,7 +220,7 @@ public class ProjectServiceImpl implements ProjectService { | @@ -220,7 +220,7 @@ public class ProjectServiceImpl implements ProjectService { | ||
220 | Synthesize_no_2_3 synthesize_no_2_3 = synthesize_no_2_3Service.getById(id);//能源设备 供电 供热 供冷 热水 | 220 | Synthesize_no_2_3 synthesize_no_2_3 = synthesize_no_2_3Service.getById(id);//能源设备 供电 供热 供冷 热水 |
221 | List<No_3_1_1Dto> list = new ArrayList<>(); | 221 | List<No_3_1_1Dto> list = new ArrayList<>(); |
222 | String[] array = new String[]{"供电系统", "供热系统", "供冷系统", "热水系统"}; | 222 | String[] array = new String[]{"供电系统", "供热系统", "供冷系统", "热水系统"}; |
223 | - String[] array2 = new String[]{"电网", "光伏发电", "风电", "储能", "电锅炉", "空气源热泵(制热型)", "空气源热泵(双工况)", "燃气锅炉", "空气源热泵(制冷型)", "空气源热泵(双工况)", "冷水机组", "太阳能集热器", "空气源热泵(热水型)", "多联机中央空调", "蓄热", "双蓄", "蓄冷", "地源热泵", "污水源热泵"}; | 223 | + String[] array2 = new String[]{"电网", "光伏发电", "风电", "储能", "电锅炉", "空气源热泵(制热型)", "空气源热泵(双工况)", "燃气锅炉", "空气源热泵(制冷型)", "空气源热泵(双工况)", "冷水机组", "太阳能集热器", "空气源热泵(热水型)", "多联机中央空调", "蓄热", "双蓄", "蓄冷", "地源热泵", "水源热泵"}; |
224 | 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));//建筑 | 224 | 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));//建筑 |
225 | 225 | ||
226 | //Electrovalence electrovalence = electrovalenceMapper.selectById(dict.getId());//电价 | 226 | //Electrovalence electrovalence = electrovalenceMapper.selectById(dict.getId());//电价 |
@@ -1441,7 +1441,7 @@ public class ProjectServiceImpl implements ProjectService { | @@ -1441,7 +1441,7 @@ public class ProjectServiceImpl implements ProjectService { | ||
1441 | synthesize_no_3_6.setNo232(num3); | 1441 | synthesize_no_3_6.setNo232(num3); |
1442 | list2.add(no_3_1_1_1Dto);*/ | 1442 | list2.add(no_3_1_1_1Dto);*/ |
1443 | /** | 1443 | /** |
1444 | - * 污水源热泵 | 1444 | + * 水源热泵 |
1445 | */ | 1445 | */ |
1446 | 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; | 1446 | 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; |
1447 | No_3_1_1_1Dto no_3_1_1_1Dto = new No_3_1_1_1Dto(); | 1447 | 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 { | @@ -1499,6 +1499,13 @@ public class ProjectServiceImpl implements ProjectService { | ||
1499 | */ | 1499 | */ |
1500 | no_3_1Tall_dto.setTotalAll(format.apply(new BigDecimal(totalAll)) + "万元"); | 1500 | no_3_1Tall_dto.setTotalAll(format.apply(new BigDecimal(totalAll)) + "万元"); |
1501 | no_3_1Tall_dto.setList(list); | 1501 | no_3_1Tall_dto.setList(list); |
1502 | + | ||
1503 | + /** | ||
1504 | + * 新增是否计算过 | ||
1505 | + */ | ||
1506 | + Synthesize_no_1 synthesize_no_1 = no_1Service.getById(id); | ||
1507 | + synthesize_no_1.setFlagCalculate("2"); | ||
1508 | + no_1Service.updateById(synthesize_no_1); | ||
1502 | return no_3_1Tall_dto; | 1509 | return no_3_1Tall_dto; |
1503 | } | 1510 | } |
1504 | 1511 | ||
@@ -1876,8 +1883,10 @@ public class ProjectServiceImpl implements ProjectService { | @@ -1876,8 +1883,10 @@ public class ProjectServiceImpl implements ProjectService { | ||
1876 | String id = ""; | 1883 | String id = ""; |
1877 | List<Synthesize_no_2_1> synthesize_no_2_1s = JSON.parseArray(synthesize_no_2_1_new, Synthesize_no_2_1.class); | 1884 | List<Synthesize_no_2_1> synthesize_no_2_1s = JSON.parseArray(synthesize_no_2_1_new, Synthesize_no_2_1.class); |
1878 | if (org.apache.commons.lang3.StringUtils.isNotEmpty(synthesize_no_2_1s.get(0).getPid()) && !synthesize_no_2_1s.isEmpty()) { | 1885 | if (org.apache.commons.lang3.StringUtils.isNotEmpty(synthesize_no_2_1s.get(0).getPid()) && !synthesize_no_2_1s.isEmpty()) { |
1886 | + | ||
1879 | 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())); | 1887 | 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())); |
1880 | - calculateLoadService.remove(new QueryWrapper<CalculateLoad>().lambda().eq(CalculateLoad::getCid, synthesize_no_2_1s.get(0).getPid())); | 1888 | + CalculateLoad serviceOne = calculateLoadService.getOne(new LambdaQueryWrapper<CalculateLoad>().eq(CalculateLoad::getCid, synthesize_no_2_1s.get(0).getPid())); |
1889 | + //calculateLoadService.remove(new QueryWrapper<CalculateLoad>().lambda().eq(CalculateLoad::getCid, synthesize_no_2_1s.get(0).getPid())); | ||
1881 | for (Synthesize_no_2_1 synthesizeNo21 : synthesize_no_2_1s) { | 1890 | for (Synthesize_no_2_1 synthesizeNo21 : synthesize_no_2_1s) { |
1882 | id = synthesizeNo21.getPid(); | 1891 | id = synthesizeNo21.getPid(); |
1883 | synthesize_no_2_1Service.saveOrUpdate(synthesizeNo21); | 1892 | synthesize_no_2_1Service.saveOrUpdate(synthesizeNo21); |
@@ -1962,7 +1971,7 @@ public class ProjectServiceImpl implements ProjectService { | @@ -1962,7 +1971,7 @@ public class ProjectServiceImpl implements ProjectService { | ||
1962 | } | 1971 | } |
1963 | 1972 | ||
1964 | } | 1973 | } |
1965 | - CalculateLoad serviceOne = calculateLoadService.getById(synthesizeNo21.getId()); | 1974 | + //CalculateLoad serviceOne = calculateLoadService.getById(synthesizeNo21.getId()); |
1966 | if (!StringUtils.isEmpty(serviceOne)) { | 1975 | if (!StringUtils.isEmpty(serviceOne)) { |
1967 | calculateLoad.setId(serviceOne.getId()); | 1976 | calculateLoad.setId(serviceOne.getId()); |
1968 | calculateLoad.setNo1(Double.valueOf(df.format(annualTotalElectricityDemand))); | 1977 | calculateLoad.setNo1(Double.valueOf(df.format(annualTotalElectricityDemand))); |
@@ -2127,7 +2136,7 @@ public class ProjectServiceImpl implements ProjectService { | @@ -2127,7 +2136,7 @@ public class ProjectServiceImpl implements ProjectService { | ||
2127 | CalculateLoad calculateLoad = calculateLoadService.getById(synthesize_no_2_1.getId()); | 2136 | CalculateLoad calculateLoad = calculateLoadService.getById(synthesize_no_2_1.getId()); |
2128 | if (!StringUtils.isEmpty(calculateLoad)) { | 2137 | if (!StringUtils.isEmpty(calculateLoad)) { |
2129 | annualCoolingCapacity += calculateLoad.getNo22(); | 2138 | annualCoolingCapacity += calculateLoad.getNo22(); |
2130 | - coolingArea += synthesize_no_2_1.getHeatArea(); | 2139 | + coolingArea += synthesize_no_2_1.getColdArea(); |
2131 | CityDict dict = cityDictService.getOne(new QueryWrapper<CityDict>().lambda().eq(CityDict::getName, synthesize_no_1.getProjectSite()));//城市 | 2140 | CityDict dict = cityDictService.getOne(new QueryWrapper<CityDict>().lambda().eq(CityDict::getName, synthesize_no_1.getProjectSite()));//城市 |
2132 | Sort sort = sortMapper.selectById(synthesize_no_2_1.getBuildingTypeId()); | 2141 | Sort sort = sortMapper.selectById(synthesize_no_2_1.getBuildingTypeId()); |
2133 | Assert.notNull(synthesize_no_2_1.getHeatEnd(), "末端形式选择出错了"); | 2142 | Assert.notNull(synthesize_no_2_1.getHeatEnd(), "末端形式选择出错了"); |
@@ -2180,7 +2189,9 @@ public class ProjectServiceImpl implements ProjectService { | @@ -2180,7 +2189,9 @@ public class ProjectServiceImpl implements ProjectService { | ||
2180 | if (!synthesize_no_2_1s.isEmpty()) { | 2189 | if (!synthesize_no_2_1s.isEmpty()) { |
2181 | for (Synthesize_no_2_1 synthesize_no_2_1 : synthesize_no_2_1s) { | 2190 | for (Synthesize_no_2_1 synthesize_no_2_1 : synthesize_no_2_1s) { |
2182 | CalculateLoad calculateLoad = calculateLoadService.getOne(new LambdaQueryWrapper<CalculateLoad>().eq(CalculateLoad::getCid, synthesize_no_2_1.getPid())); | 2191 | CalculateLoad calculateLoad = calculateLoadService.getOne(new LambdaQueryWrapper<CalculateLoad>().eq(CalculateLoad::getCid, synthesize_no_2_1.getPid())); |
2183 | - synthesize_no_2_1.setCalculateLoad(calculateLoad); | 2192 | + CalculateLoadVo calculateLoadVo = new CalculateLoadVo(); |
2193 | + BeanUtils.copyProperties(calculateLoad,calculateLoadVo); | ||
2194 | + synthesize_no_2_1.setCalculateLoad(calculateLoadVo); | ||
2184 | Sort sort = sortMapper.selectById(synthesize_no_2_1.getBuildingTypeId()); | 2195 | Sort sort = sortMapper.selectById(synthesize_no_2_1.getBuildingTypeId()); |
2185 | if (!StringUtils.isEmpty(sort)) { | 2196 | if (!StringUtils.isEmpty(sort)) { |
2186 | synthesize_no_2_1.setBuildingTypeName(sort.getName()); | 2197 | synthesize_no_2_1.setBuildingTypeName(sort.getName()); |
@@ -2547,7 +2558,7 @@ public class ProjectServiceImpl implements ProjectService { | @@ -2547,7 +2558,7 @@ public class ProjectServiceImpl implements ProjectService { | ||
2547 | list2.add(equipmentCapacityDto2); | 2558 | list2.add(equipmentCapacityDto2); |
2548 | } else if ("4".equals(string)) { | 2559 | } else if ("4".equals(string)) { |
2549 | EquipmentCapacityDto equipmentCapacityDto2 = new EquipmentCapacityDto(); | 2560 | EquipmentCapacityDto equipmentCapacityDto2 = new EquipmentCapacityDto(); |
2550 | - equipmentCapacityDto2.setName("污水源热泵"); | 2561 | + equipmentCapacityDto2.setName("水源热泵"); |
2551 | equipmentCapacityDto2.setData(format.apply(new BigDecimal(synthesize_no_3_6.getNo208()))); | 2562 | equipmentCapacityDto2.setData(format.apply(new BigDecimal(synthesize_no_3_6.getNo208()))); |
2552 | equipmentCapacityDto2.setType("4"); | 2563 | equipmentCapacityDto2.setType("4"); |
2553 | list2.add(equipmentCapacityDto2); | 2564 | list2.add(equipmentCapacityDto2); |
@@ -2790,7 +2801,7 @@ public class ProjectServiceImpl implements ProjectService { | @@ -2790,7 +2801,7 @@ public class ProjectServiceImpl implements ProjectService { | ||
2790 | list2.add(equipmentCapacityDto1); | 2801 | list2.add(equipmentCapacityDto1); |
2791 | } else if ("4".equals(string)) { | 2802 | } else if ("4".equals(string)) { |
2792 | EquipmentCapacityDto equipmentCapacityDto1 = new EquipmentCapacityDto(); | 2803 | EquipmentCapacityDto equipmentCapacityDto1 = new EquipmentCapacityDto(); |
2793 | - equipmentCapacityDto1.setName("污水源热泵"); | 2804 | + equipmentCapacityDto1.setName("水源热泵"); |
2794 | equipmentCapacityDto1.setData(format.apply(new BigDecimal(synthesize_no_3_6.getNo216()))); | 2805 | equipmentCapacityDto1.setData(format.apply(new BigDecimal(synthesize_no_3_6.getNo216()))); |
2795 | equipmentCapacityDto1.setType("4"); | 2806 | equipmentCapacityDto1.setType("4"); |
2796 | list2.add(equipmentCapacityDto1); | 2807 | list2.add(equipmentCapacityDto1); |
@@ -3539,7 +3550,7 @@ public class ProjectServiceImpl implements ProjectService { | @@ -3539,7 +3550,7 @@ public class ProjectServiceImpl implements ProjectService { | ||
3539 | list2.add(equipmentCapacityDto1); | 3550 | list2.add(equipmentCapacityDto1); |
3540 | } else if ("4".equals(string)) { | 3551 | } else if ("4".equals(string)) { |
3541 | EquipmentCapacityDto equipmentCapacityDto1 = new EquipmentCapacityDto(); | 3552 | EquipmentCapacityDto equipmentCapacityDto1 = new EquipmentCapacityDto(); |
3542 | - equipmentCapacityDto1.setName("污水源热泵"); | 3553 | + equipmentCapacityDto1.setName("水源热泵"); |
3543 | equipmentCapacityDto1.setData(format.apply(new BigDecimal(synthesize_no_3_6.getNo224()))); | 3554 | equipmentCapacityDto1.setData(format.apply(new BigDecimal(synthesize_no_3_6.getNo224()))); |
3544 | equipmentCapacityDto1.setType("4"); | 3555 | equipmentCapacityDto1.setType("4"); |
3545 | list2.add(equipmentCapacityDto1); | 3556 | list2.add(equipmentCapacityDto1); |
@@ -3949,7 +3960,7 @@ public class ProjectServiceImpl implements ProjectService { | @@ -3949,7 +3960,7 @@ public class ProjectServiceImpl implements ProjectService { | ||
3949 | * 电锅炉热水节省费用=年热水费费用*0.4-年总需热水热量*0.4/0.9/电锅炉效率*((8*低谷电价+2*高峰电价)/10) | 3960 | * 电锅炉热水节省费用=年热水费费用*0.4-年总需热水热量*0.4/0.9/电锅炉效率*((8*低谷电价+2*高峰电价)/10) |
3950 | */ | 3961 | */ |
3951 | No_3_1_1_1Dto no_3_1_1_1Dto = new No_3_1_1_1Dto(); | 3962 | No_3_1_1_1Dto no_3_1_1_1Dto = new No_3_1_1_1Dto(); |
3952 | - no_3_1_1_1Dto.setName("污水源热泵"); | 3963 | + no_3_1_1_1Dto.setName("水源热泵"); |
3953 | 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)))); | 3964 | 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)))); |
3954 | no_3_1_1_1Dtos.add(no_3_1_1_1Dto); | 3965 | no_3_1_1_1Dtos.add(no_3_1_1_1Dto); |
3955 | } | 3966 | } |
@@ -634,24 +634,24 @@ public class Synthesize_no_2_6ServiceImpl extends ServiceImpl<Synthesize_no_2_6M | @@ -634,24 +634,24 @@ public class Synthesize_no_2_6ServiceImpl extends ServiceImpl<Synthesize_no_2_6M | ||
634 | List<ComputeArgDto> computeArgDtos = new ArrayList<>(); | 634 | List<ComputeArgDto> computeArgDtos = new ArrayList<>(); |
635 | ComputeArgDto computeArgDto1 = new ComputeArgDto(); | 635 | ComputeArgDto computeArgDto1 = new ComputeArgDto(); |
636 | computeArgDto1.setId(119); | 636 | computeArgDto1.setId(119); |
637 | - computeArgDto1.setNamType("污水源热泵系统综合能效比"); | 637 | + computeArgDto1.setNamType("水源热泵系统综合能效比"); |
638 | computeArgDto1.setModelType(synthesize_no_2_6.getNo119()); | 638 | computeArgDto1.setModelType(synthesize_no_2_6.getNo119()); |
639 | computeArgDto1.setName(""); | 639 | computeArgDto1.setName(""); |
640 | computeArgDtos.add(computeArgDto1); | 640 | computeArgDtos.add(computeArgDto1); |
641 | ComputeArgDto computeArgDto2 = new ComputeArgDto(); | 641 | ComputeArgDto computeArgDto2 = new ComputeArgDto(); |
642 | computeArgDto2.setId(120); | 642 | computeArgDto2.setId(120); |
643 | - computeArgDto2.setNamType("污水源热泵单位投资成本"); | 643 | + computeArgDto2.setNamType("水源热泵单位投资成本"); |
644 | computeArgDto2.setModelType(synthesize_no_2_6.getNo120()); | 644 | computeArgDto2.setModelType(synthesize_no_2_6.getNo120()); |
645 | computeArgDto2.setName("元/kW"); | 645 | computeArgDto2.setName("元/kW"); |
646 | computeArgDtos.add(computeArgDto2); | 646 | computeArgDtos.add(computeArgDto2); |
647 | ComputeArgDto computeArgDto3 = new ComputeArgDto(); | 647 | ComputeArgDto computeArgDto3 = new ComputeArgDto(); |
648 | computeArgDto3.setId(121); | 648 | computeArgDto3.setId(121); |
649 | - computeArgDto3.setNamType("污水源热泵单位运维成本"); | 649 | + computeArgDto3.setNamType("水源热泵单位运维成本"); |
650 | computeArgDto3.setModelType(synthesize_no_2_6.getNo121()); | 650 | computeArgDto3.setModelType(synthesize_no_2_6.getNo121()); |
651 | computeArgDto3.setName("元/吨"); | 651 | computeArgDto3.setName("元/吨"); |
652 | computeArgDtos.add(computeArgDto3); | 652 | computeArgDtos.add(computeArgDto3); |
653 | computeArg2Dto = new ComputeArg2Dto(); | 653 | computeArg2Dto = new ComputeArg2Dto(); |
654 | - computeArg2Dto.setName("污水源热泵"); | 654 | + computeArg2Dto.setName("水源热泵"); |
655 | computeArg2Dto.setList(computeArgDtos); | 655 | computeArg2Dto.setList(computeArgDtos); |
656 | computeArg2DtoList.add(computeArg2Dto); | 656 | computeArg2DtoList.add(computeArg2Dto); |
657 | } | 657 | } |
@@ -676,7 +676,7 @@ public class Synthesize_no_2_6ServiceImpl extends ServiceImpl<Synthesize_no_2_6M | @@ -676,7 +676,7 @@ public class Synthesize_no_2_6ServiceImpl extends ServiceImpl<Synthesize_no_2_6M | ||
676 | computeArgDtos.add(computeArgDto1); | 676 | computeArgDtos.add(computeArgDto1); |
677 | ComputeArgDto computeArgDto2 = new ComputeArgDto(); | 677 | ComputeArgDto computeArgDto2 = new ComputeArgDto(); |
678 | computeArgDto2.setId(63); | 678 | computeArgDto2.setId(63); |
679 | - computeArgDto2.setNamType("基准利润率"); | 679 | + computeArgDto2.setNamType("基准收益率"); |
680 | computeArgDto2.setModelType(synthesize_no_2_6.getNo63()); | 680 | computeArgDto2.setModelType(synthesize_no_2_6.getNo63()); |
681 | computeArgDto2.setName(""); | 681 | computeArgDto2.setName(""); |
682 | computeArgDtos.add(computeArgDto2); | 682 | computeArgDtos.add(computeArgDto2); |
@@ -46,9 +46,9 @@ spring: | @@ -46,9 +46,9 @@ spring: | ||
46 | datasource: | 46 | datasource: |
47 | master: | 47 | master: |
48 | driver-class-name: com.mysql.jdbc.Driver | 48 | driver-class-name: com.mysql.jdbc.Driver |
49 | - url: jdbc:mysql://xxx:3306/synthesize_energy?useUnicode=true&&characterEncoding=utf8&useSSL=false&serverTimezone=UTC | ||
50 | - username: xx | ||
51 | - password: xx | 49 | + url: jdbc:mysql://1f692e5a3458475ea270448f4d3bfde5in01.internal.cn-east-2.mysql.rds.myhuaweicloud.com:3306/synthesize_energy?useUnicode=true&&characterEncoding=utf8&useSSL=false&serverTimezone=UTC |
50 | + username: db136s1ehvo1yn73 | ||
51 | + password: cxz307311SJK | ||
52 | type: org.apache.commons.dbcp2.BasicDataSource | 52 | type: org.apache.commons.dbcp2.BasicDataSource |
53 | dbcp2: | 53 | dbcp2: |
54 | connection-init-sqls: SET NAMES utf8mb4 | 54 | connection-init-sqls: SET NAMES utf8mb4 |
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
3 | +<mapper namespace="com.synthesize_energy.item.mapper.Synthesize_no_1ClientNameMapper"> | ||
4 | + | ||
5 | + | ||
6 | + <select id="queryByIdPage" resultType="com.synthesize_energy.item.entity.Synthesize_no_1ClientName"> | ||
7 | + SELECT | ||
8 | + id,name,user_id,nature,industry,site,main_touch_person,touch_phone,remark,time,new_time,collect_state,type,delete_state | ||
9 | + FROM synthesize_no_1_client_name | ||
10 | + <where> | ||
11 | + <if test="userId != null and userId != ''"> | ||
12 | + and user_id = #{userId} | ||
13 | + </if> | ||
14 | + <if test="name != null and name != ''"> | ||
15 | + and name like concat('%', #{name}, '%') | ||
16 | + </if> | ||
17 | + </where> | ||
18 | + AND delete_state != '1' | ||
19 | + ORDER BY convert(new_time using gbk) collate gbk_chinese_ci asc , | ||
20 | + convert(name using gbk) collate gbk_chinese_ci asc | ||
21 | + </select> | ||
22 | +</mapper> |
-
请 注册 或 登录 后发表评论