作者 kgy

项目部署

@@ -14,10 +14,7 @@ import com.synthesize_energy.item.utils.JwtUtil; @@ -14,10 +14,7 @@ import com.synthesize_energy.item.utils.JwtUtil;
14 import com.synthesize_energy.item.vo.CalculateLoadVo; 14 import com.synthesize_energy.item.vo.CalculateLoadVo;
15 import com.synthesize_energy.item.vo.EnergyEquipmentVo; 15 import com.synthesize_energy.item.vo.EnergyEquipmentVo;
16 import com.synthesize_energy.item.web.service.*; 16 import com.synthesize_energy.item.web.service.*;
17 -import io.swagger.annotations.Api;  
18 -import io.swagger.annotations.ApiImplicitParam;  
19 -import io.swagger.annotations.ApiImplicitParams;  
20 -import io.swagger.annotations.ApiOperation; 17 +import io.swagger.annotations.*;
21 import lombok.extern.slf4j.Slf4j; 18 import lombok.extern.slf4j.Slf4j;
22 import org.apache.commons.lang3.StringUtils; 19 import org.apache.commons.lang3.StringUtils;
23 import org.springframework.beans.BeanUtils; 20 import org.springframework.beans.BeanUtils;
@@ -84,16 +81,14 @@ public class ProjectController { @@ -84,16 +81,14 @@ public class ProjectController {
84 @Autowired 81 @Autowired
85 private HeatIngDataMapper heatIngDataMapper; 82 private HeatIngDataMapper heatIngDataMapper;
86 83
87 - @GetMapping("getindex")  
88 - public RestResponse<?> getInfex(String id){  
89 - EnergyEquipmentVo energyEquipmentVo = new EnergyEquipmentVo();  
90 - Synthesize_no_2_4 synthesize_no_2_4 = synthesize_no_2_4Service.getById(id);  
91 - BeanUtils.copyProperties(synthesize_no_2_4,energyEquipmentVo);  
92 - Synthesize_no_2_3 synthesize_no_2_3 = synthesize_no_2_3Service.getById(id);  
93 - energyEquipmentVo.setColdMsgDto(JSON.parseObject(JSON.parse(synthesize_no_2_3.getColdMsg()).toString(), ColdMsgDto.class));  
94 - energyEquipmentVo.setHotMsgDto(JSON.parseObject(JSON.parse(synthesize_no_2_3.getHotMsg()).toString(), HotMsgDto.class));  
95 - energyEquipmentVo.setHotWaterDto(JSON.parseObject(JSON.parse(synthesize_no_2_3.getHotWaterMsg()).toString(), HotWaterDto.class));  
96 - return RestResponse.success(); 84 + @GetMapping("getHeatingDays/{id}")
  85 + @ApiOperation(value = "获取供热天数")
  86 + public RestResponse<?> getHeatingDays(@PathVariable("id")@ApiParam(value = "id",name = "项目ID") String id){
  87 + Synthesize_no_1 synthesize_no_1 = no_1Service.getById(id);
  88 + Assert.notNull(synthesize_no_1,"请先保存项目信息!");
  89 + CityDict dict = cityDictService.getOne(new QueryWrapper<CityDict>().lambda().eq(CityDict::getName, synthesize_no_1.getProjectSite()));//城市
  90 + HeatIngData heatIngData = heatIngDataMapper.selectById(dict.getId());
  91 + return RestResponse.success(heatIngData.getNo3());
97 } 92 }
98 93
99 @PostMapping("no_1") 94 @PostMapping("no_1")
1 spring: 1 spring:
2 profiles: 2 profiles:
3 #开发时使用下面注释 3 #开发时使用下面注释
4 - active: dev 4 +# active: dev
5 # 打包时使用下面注释 5 # 打包时使用下面注释
6 -# active: prod 6 + active: prod