| | |
| | | import com.whyc.mapper.CommonMapper; |
| | | import com.whyc.pojo.db_data_history.BattRealdataId; |
| | | import com.whyc.pojo.db_data_history.PwrdevHistorydataId; |
| | | import com.whyc.pojo.db_param.AppParam; |
| | | import com.whyc.pojo.db_param.ApptimeParam; |
| | | import com.whyc.pojo.db_param.PowerPropertyParam; |
| | | import com.whyc.pojo.db_station.PowerInf; |
| | |
| | | |
| | | @Autowired |
| | | private PowerInfService powerInfService; |
| | | |
| | | @Autowired |
| | | private AppParamService appParamService; |
| | | |
| | | @Autowired |
| | | private ApptimeParamService apptimeParamService; |
| | |
| | | //1.2.7优良电源统计上一季度的电源某一属性和参数阈值超过的次数 |
| | | public Integer getPwrQuarter7(Integer powerId,Integer powerType) { |
| | | Map<String,Integer> map=new HashMap<>(); |
| | | map.put("acin1_vola",0); |
| | | map.put("acout_curra",0); |
| | | map.put("dcoutVol",0); |
| | | map.put("dcoutCurr",0); |
| | | //获取优良电源性能统计在平台上的时间参数设置表 |
| | | ApptimeParam apptimeParam=apptimeParamService.getPwrPerformanceStrartTime(powerId); |
| | | //获取指定时间到当前时间一共多少月的集合 |
| | |
| | | for (PowerPropertyParam param : paramList) { |
| | | paramValues.put(param.getPropertyName()+"_upper", param.getBasisVal()*param.getAlarmLimithUpper()); |
| | | paramValues.put(param.getPropertyName()+"_lower", param.getBasisVal()*param.getAlarmLimithLowper()); |
| | | map.put(param.getPropertyName(), 0); |
| | | } |
| | | for (int i=0;i<datelist.size();i++) { |
| | | String date=datelist.get(i); |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | return 1; |
| | | } |
| | | //判断优良电源性能 |
| | | private Integer judgePwrPerformence(Map<String,Integer> map){ |
| | | //获取apps中优良电源判断参数 |
| | | List<AppParam> appParamList=appParamService.getPwrPerformenceParam(); |
| | | Float excellentVal=0f; |
| | | Float commonlyVal=0f; |
| | | Float warningVal=0f; |
| | | for (AppParam appParam : appParamList) { |
| | | if(appParam.getParamNamePsx().equals("power_excellent_val")){ |
| | | excellentVal=appParam.getParamValue(); |
| | | } |
| | | if(appParam.getParamNamePsx().equals("power_commonly_val")){ |
| | | commonlyVal=appParam.getParamValue(); |
| | | } |
| | | if(appParam.getParamNamePsx().equals("power_warning_val")){ |
| | | warningVal=appParam.getParamValue(); |
| | | } |
| | | } |
| | | return 1; |
| | | } |
| | | } |