| | |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(predictTime); |
| | | calendar.add(Calendar.HOUR_OF_DAY, 1); |
| | | calendar.add(Calendar.MINUTE, 1); |
| | | endTime = calendar.getTime(); |
| | | } |
| | | |
| | |
| | | result.setViewMap(viewMap); |
| | | return result; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public PreDataSingleChartRespVO getPreDataSingleChart(PreDataSingleChartReqVO reqVO) { |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<StAdjustConfigDetDTO> getAdjustConfigListByModelId(String modelId) { |
| | | List<StAdjustConfigDetEntity> list = stAdjustConfigService.getDetByModelId(modelId); |
| | | return ConvertUtils.sourceToTarget(list, StAdjustConfigDetDTO.class); |
| | | } |
| | | |
| | | @Override |
| | | public Boolean updateAlarmConfig(String alarmObj,String upperLimit,String lowerLimit) { |
| | | MmPredictAlarmConfigSaveReqVO reqVO = new MmPredictAlarmConfigSaveReqVO(); |
| | | reqVO.setAlarmObj(alarmObj); |
| | |
| | | }); |
| | | chartParamService.updateByChartIdAndParamCode(chartParams); |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * 计算功率因数 p²/(根号:p²+Q²) |
| | | **/ |
| | | public Double calculateCos(Double PValue,Double QValue) { |
| | | // 绝对值 |
| | | PValue = Math.abs(PValue); |
| | | QValue = Math.abs(QValue); |
| | | //PValue [0,0.001] 直接判断为关闭返回0 |
| | | if (PValue >= 0 && PValue <= 0.001) { |
| | | return 0.0; |
| | | }else { |
| | | BigDecimal result = new BigDecimal(PValue).divide(BigDecimal.valueOf(Math.sqrt(Math.pow(PValue, 2) + Math.pow(QValue, 2))), 2, BigDecimal.ROUND_HALF_UP); |
| | | return result.doubleValue(); |
| | | } |
| | | } |
| | | |
| | | private Date[] calResultTime(ItemVO predictItem, Date startTimeReq, Date endTimeReq, int lengthLeft, int lengthRight) { |