| | |
| | | import com.iailab.module.model.mcs.pre.entity.MmPredictAlarmMessageEntity; |
| | | import com.iailab.module.model.mcs.pre.service.*; |
| | | import com.iailab.module.model.mcs.pre.vo.MmItemOutputRespVO; |
| | | import com.iailab.module.model.mcs.pre.vo.MmPredictAlarmConfigSaveReqVO; |
| | | import com.iailab.module.model.mcs.pre.vo.MmPredictAlarmMessageSaveReqVO; |
| | | import com.iailab.module.model.mcs.pre.vo.MmPredictItemRespVO; |
| | | import com.iailab.module.model.mcs.sche.entity.StAdjustConfigDetEntity; |
| | |
| | | |
| | | @Autowired |
| | | private StAdjustConfigService stAdjustConfigService; |
| | | |
| | | private int HOUR_MINS = 60; |
| | | |
| | | @Override |
| | |
| | | return ConvertUtils.sourceToTarget(list, StAdjustConfigDetDTO.class); |
| | | } |
| | | |
| | | @Override |
| | | public Boolean updateAlarmConfig(String alarmObj,String upperLimit,String lowerLimit) { |
| | | MmPredictAlarmConfigSaveReqVO reqVO = new MmPredictAlarmConfigSaveReqVO(); |
| | | reqVO.setAlarmObj(alarmObj); |
| | | reqVO.setUpperLimit(BigDecimal.valueOf(Double.parseDouble(upperLimit))); |
| | | reqVO.setLowerLimit(BigDecimal.valueOf(Double.parseDouble(lowerLimit))); |
| | | mmPredictAlarmConfigService.updateByAlarmObj(reqVO); |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | public Boolean updateChartParam(ChartDTO chartDTO) { |
| | | ChartDTO oldChartDTO = chartService.getChartByChartCode(chartDTO.getChartCode()); |
| | | List<ChartParamDTO> chartParams = chartDTO.getChartParams(); |
| | | chartParams.forEach(item -> { |
| | | item.setChartId(oldChartDTO.getId()); |
| | | }); |
| | | chartParamService.updateByChartIdAndParamCode(chartParams); |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * 计算功率因数 p²/(根号:p²+Q²) |
| | | **/ |