| | |
| | | import com.iailab.module.model.mdk.vo.ItemVO; |
| | | import com.iailab.module.model.mpk.service.ChartParamService; |
| | | import com.iailab.module.model.mpk.service.ChartService; |
| | | import com.iailab.module.model.mpk.service.ElectricityPriceSegmentedService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | @Autowired |
| | | private InfluxDBService influxDBService; |
| | | |
| | | @Autowired |
| | | private ElectricityPriceSegmentedService electricityPriceSegmentedService; |
| | | |
| | | private int HOUR_MINS = 60; |
| | | |
| | |
| | | reqVO.setStartTime(predictItem.getLastTime()); |
| | | } |
| | | // 默认结束时间:运行时间+预测长度*粒度 |
| | | if (null == reqVO.getStartTime()) { |
| | | if (null == reqVO.getEndTime()) { |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(predictItem.getLastTime()); |
| | | calendar.add(Calendar.SECOND,predictItem.getPredictLength() * predictItem.getGranularity()); |
| | |
| | | return result; |
| | | } |
| | | |
| | | @Override |
| | | public List<ElectricityPriceSegmentedDTO> getElectricityPriceList() { |
| | | return electricityPriceSegmentedService.getElectricityPriceList(); |
| | | } |
| | | |
| | | @Override |
| | | public Boolean createElectricityPrice(ElectricityPriceSegmentedDTO dto) { |
| | | electricityPriceSegmentedService.create(dto); |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * 计算功率因数 p²/(根号:p²+Q²) |
| | | **/ |