|
|
|
@ -1,6 +1,7 @@ |
|
|
|
package com.mh.system.service.device.impl; |
|
|
|
package com.mh.system.service.device.impl; |
|
|
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
|
|
|
|
import com.mh.common.core.domain.dto.ProProfileDTO; |
|
|
|
import com.mh.common.core.domain.dto.SysPerformanceDTO; |
|
|
|
import com.mh.common.core.domain.dto.SysPerformanceDTO; |
|
|
|
import com.mh.common.core.domain.entity.CollectionParamsManage; |
|
|
|
import com.mh.common.core.domain.entity.CollectionParamsManage; |
|
|
|
import com.mh.common.core.domain.entity.SysParams; |
|
|
|
import com.mh.common.core.domain.entity.SysParams; |
|
|
|
@ -13,6 +14,8 @@ import com.mh.system.mapper.WeatherDataMapper; |
|
|
|
import com.mh.system.mapper.device.CollectionParamsManageMapper; |
|
|
|
import com.mh.system.mapper.device.CollectionParamsManageMapper; |
|
|
|
import com.mh.system.service.device.ICollectionParamsManageService; |
|
|
|
import com.mh.system.service.device.ICollectionParamsManageService; |
|
|
|
import com.mh.system.service.device.ICoolingSystemMonitorService; |
|
|
|
import com.mh.system.service.device.ICoolingSystemMonitorService; |
|
|
|
|
|
|
|
import com.mh.system.service.overview.IProOverviewService; |
|
|
|
|
|
|
|
import com.mh.system.service.overview.impl.ProOverviewServiceImpl; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
|
|
|
@ -37,10 +40,13 @@ public class CoolingSystemMonitorServiceImpl implements ICoolingSystemMonitorSer |
|
|
|
|
|
|
|
|
|
|
|
private final CollectionParamsManageMapper collectionParamsManageMapper; |
|
|
|
private final CollectionParamsManageMapper collectionParamsManageMapper; |
|
|
|
|
|
|
|
|
|
|
|
public CoolingSystemMonitorServiceImpl(SysParamsMapper sysParamsMapper, WeatherDataMapper weatherDataMapper, CollectionParamsManageMapper collectionParamsManageMapper) { |
|
|
|
private final IProOverviewService overviewService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public CoolingSystemMonitorServiceImpl(SysParamsMapper sysParamsMapper, WeatherDataMapper weatherDataMapper, CollectionParamsManageMapper collectionParamsManageMapper, IProOverviewService overviewService) { |
|
|
|
this.sysParamsMapper = sysParamsMapper; |
|
|
|
this.sysParamsMapper = sysParamsMapper; |
|
|
|
this.weatherDataMapper = weatherDataMapper; |
|
|
|
this.weatherDataMapper = weatherDataMapper; |
|
|
|
this.collectionParamsManageMapper = collectionParamsManageMapper; |
|
|
|
this.collectionParamsManageMapper = collectionParamsManageMapper; |
|
|
|
|
|
|
|
this.overviewService = overviewService; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
@ -226,6 +232,15 @@ public class CoolingSystemMonitorServiceImpl implements ICoolingSystemMonitorSer |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
List<ProProfileDTO> proProfile = overviewService.getProProfile(); |
|
|
|
|
|
|
|
if (null != proProfile && !proProfile.isEmpty()) { |
|
|
|
|
|
|
|
// 今年累计冷量
|
|
|
|
|
|
|
|
BigDecimal yearCold = proProfile.getFirst().getYearCold(); |
|
|
|
|
|
|
|
sysPerformanceDTO.setYearCold(yearCold); |
|
|
|
|
|
|
|
// 今年累计电量
|
|
|
|
|
|
|
|
BigDecimal yearEle = proProfile.getFirst().getYearEle(); |
|
|
|
|
|
|
|
sysPerformanceDTO.setYearPower(yearEle); |
|
|
|
|
|
|
|
} |
|
|
|
// 开始计算瞬时EER和累计EER
|
|
|
|
// 开始计算瞬时EER和累计EER
|
|
|
|
BigDecimal yearPower = sysPerformanceDTO.getYearPower(); |
|
|
|
BigDecimal yearPower = sysPerformanceDTO.getYearPower(); |
|
|
|
BigDecimal yearCold = sysPerformanceDTO.getYearCold(); |
|
|
|
BigDecimal yearCold = sysPerformanceDTO.getYearCold(); |
|
|
|
|