作者 kgy

解决供冷供热 空指针

@@ -4863,7 +4863,9 @@ public class ProjectServiceImpl implements ProjectService { @@ -4863,7 +4863,9 @@ public class ProjectServiceImpl implements ProjectService {
4863 Assert.notEmpty(synthesize_no_2_1List, "建筑类型出错了!"); 4863 Assert.notEmpty(synthesize_no_2_1List, "建筑类型出错了!");
4864 for (Synthesize_no_2_1 synthesize_no_2_ : synthesize_no_2_1List) { 4864 for (Synthesize_no_2_1 synthesize_no_2_ : synthesize_no_2_1List) {
4865 CalculateLoad calculateLoad = calculateLoadService.getById(synthesize_no_2_.getId()); 4865 CalculateLoad calculateLoad = calculateLoadService.getById(synthesize_no_2_.getId());
4866 - annualHeatSupply += calculateLoad.getNo22(); 4866 + if (Objects.nonNull(calculateLoad.getNo22())) {
  4867 + annualHeatSupply += calculateLoad.getNo22();
  4868 + }
4867 heatingArea += synthesize_no_2_.getHeatArea(); 4869 heatingArea += synthesize_no_2_.getHeatArea();
4868 CityDict dict = cityDictService.getOne(new QueryWrapper<CityDict>().lambda().eq(CityDict::getName, synthesize_no_1.getProjectSite()));//城市 4870 CityDict dict = cityDictService.getOne(new QueryWrapper<CityDict>().lambda().eq(CityDict::getName, synthesize_no_1.getProjectSite()));//城市
4869 Sort sort = sortMapper.selectById(synthesize_no_2_.getBuildingTypeId()); 4871 Sort sort = sortMapper.selectById(synthesize_no_2_.getBuildingTypeId());
@@ -4931,7 +4933,9 @@ public class ProjectServiceImpl implements ProjectService { @@ -4931,7 +4933,9 @@ public class ProjectServiceImpl implements ProjectService {
4931 for (Synthesize_no_2_1 synthesize_no_2_ : synthesize_no_2_1List) { 4933 for (Synthesize_no_2_1 synthesize_no_2_ : synthesize_no_2_1List) {
4932 CalculateLoad calculateLoad = calculateLoadService.getById(synthesize_no_2_.getId()); 4934 CalculateLoad calculateLoad = calculateLoadService.getById(synthesize_no_2_.getId());
4933 annualCoolingCapacity += calculateLoad.getNo22(); 4935 annualCoolingCapacity += calculateLoad.getNo22();
4934 - coolingArea += synthesize_no_2_.getHeatArea(); 4936 + if (Objects.nonNull(synthesize_no_2_.getHeatArea())) {
  4937 + coolingArea += synthesize_no_2_.getHeatArea();
  4938 + }
4935 CityDict dict = cityDictService.getOne(new QueryWrapper<CityDict>().lambda().eq(CityDict::getName, synthesize_no_1.getProjectSite()));//城市 4939 CityDict dict = cityDictService.getOne(new QueryWrapper<CityDict>().lambda().eq(CityDict::getName, synthesize_no_1.getProjectSite()));//城市
4936 Sort sort = sortMapper.selectById(synthesize_no_2_.getBuildingTypeId()); 4940 Sort sort = sortMapper.selectById(synthesize_no_2_.getBuildingTypeId());
4937 Assert.notNull(synthesize_no_2_.getHeatEnd(), "末端形式选择出错了"); 4941 Assert.notNull(synthesize_no_2_.getHeatEnd(), "末端形式选择出错了");