| | |
| | | //单体容量低告警数和对应的告警机房数 |
| | | BatteryAlarmDto batteryAlarmDto = mapper.getLowCapacityAlarms(userId,AlarmConstant.Alarm_IGNAL_ID_CapAlarmLow); |
| | | int alarmNum = batteryAlarmDto.getNum(); |
| | | int stationNum = batteryAlarmDto.getStationNum(); |
| | | //int stationNum = batteryAlarmDto.getStationNum(); |
| | | //总告警数 |
| | | Integer totalAlarmNum = mapper.getTotalAlarms(userId); |
| | | //Integer totalAlarmNum = mapper.getTotalAlarms(userId); |
| | | //总机房数 |
| | | int totalStationNum = infoMapper.getStationCount(userId); |
| | | //int totalStationNum = infoMapper.getStationCount(userId); |
| | | |
| | | //容量低告警占比 |
| | | String capLowRateStr = (String) MathUtil.divide(alarmNum,totalAlarmNum,3); |
| | | //String capLowRateStr = (String) MathUtil.divide(alarmNum,totalAlarmNum,3); |
| | | //容量低告警机房占比 |
| | | String capLowStationRateStr = (String) MathUtil.divide(stationNum,totalStationNum,3); |
| | | //String capLowStationRateStr = (String) MathUtil.divide(stationNum,totalStationNum,3); |
| | | |
| | | resultMap.put("告警数",alarmNum); |
| | | resultMap.put("告警总数",totalAlarmNum); |
| | | //resultMap.put("告警总数",totalAlarmNum); |
| | | //resultMap.put("告警占比",capLowRateStr); |
| | | |
| | | resultMap.put("告警机房数",alarmNum); |
| | | //resultMap.put("告警机房数",alarmNum); |
| | | //resultMap.put("告警机房占比",capLowStationRateStr); |
| | | |
| | | response.set(1, resultMap); |
| | |
| | | //放电电流低告警数和对应的告警机房数 |
| | | BatteryAlarmDto batteryAlarmDto = mapper.getLowDischargeAlarms(userId,AlarmConstant.ALM_SIGNAL_ID_DisChargeCurrLow); |
| | | int disChargeAlarmNum = batteryAlarmDto.getNum(); |
| | | int disChargeStationNum = batteryAlarmDto.getStationNum(); |
| | | //int disChargeStationNum = batteryAlarmDto.getStationNum(); |
| | | |
| | | //总告警数 |
| | | Integer totalAlarmNum = mapper.getTotalAlarms(userId); |
| | | //Integer totalAlarmNum = mapper.getTotalAlarms(userId); |
| | | //总机房数 |
| | | int totalStationNum = infoMapper.getStationCount(userId); |
| | | //int totalStationNum = infoMapper.getStationCount(userId); |
| | | //放电电流低告警占比 |
| | | String disChargeLowRateStr = (String) MathUtil.divide(disChargeAlarmNum,totalAlarmNum,3); |
| | | //String disChargeLowRateStr = (String) MathUtil.divide(disChargeAlarmNum,totalAlarmNum,3); |
| | | //放电电流低告警机房占比 |
| | | String disChargeLowStationRateStr = (String) MathUtil.divide(disChargeStationNum,totalStationNum,3); |
| | | //String disChargeLowStationRateStr = (String) MathUtil.divide(disChargeStationNum,totalStationNum,3); |
| | | |
| | | resultMap.put("低告警数量", disChargeAlarmNum); //低告警数量 alm_signal_id:DisChargeCurr 7 high; 8 low |
| | | resultMap.put("告警机房总数", disChargeStationNum); //告警机房总数 |
| | | resultMap.put("告警机房数比例", disChargeLowRateStr); //告警机房数比例 |
| | | resultMap.put("告警总数", totalAlarmNum); //告警总数 |
| | | resultMap.put("告警总数比例", disChargeLowStationRateStr); //告警总数比例 |
| | | //resultMap.put("告警机房总数", disChargeStationNum); //告警机房总数 |
| | | //resultMap.put("告警机房数比例", disChargeLowRateStr); //告警机房数比例 |
| | | //resultMap.put("告警总数", totalAlarmNum); //告警总数 |
| | | //resultMap.put("告警总数比例", disChargeLowStationRateStr); //告警总数比例 |
| | | response.setCode(1); |
| | | response.setData(resultMap); |
| | | } catch (Exception e) { |
| | |
| | | Integer dischargeHighAlarmsNum = mapper.getAlarmHighLow(userId,AlarmConstant.ALM_SIGNAL_ID_DisChargeCurrHigh); |
| | | |
| | | //告警总数 |
| | | Integer totalStationAlarmNum =mapper.getTotalAlarms(userId); |
| | | //Integer totalStationAlarmNum =mapper.getTotalAlarms(userId); |
| | | |
| | | //放电电流高告警机房数 |
| | | int dischargeTotalAlarmStations = mapper.getTotalAlarmStations(userId,AlarmConstant.ALM_SIGNAL_ID_DisChargeCurrHigh); |
| | | //int dischargeTotalAlarmStations = mapper.getTotalAlarmStations(userId,AlarmConstant.ALM_SIGNAL_ID_DisChargeCurrHigh); |
| | | |
| | | //总机房数 |
| | | int totalStationNum = infoMapper.getStationCount(userId); |
| | | //int totalStationNum = infoMapper.getStationCount(userId); |
| | | |
| | | //放电电流高告警占比 |
| | | String dischargeRateStr = (String) MathUtil.divide(dischargeHighAlarmsNum,totalStationAlarmNum,3); |
| | | //String dischargeRateStr = (String) MathUtil.divide(dischargeHighAlarmsNum,totalStationAlarmNum,3); |
| | | //放电电流高告警机房占比 |
| | | String dischargeStationRateStr = (String) MathUtil.divide(dischargeTotalAlarmStations,totalStationNum,3); |
| | | //String dischargeStationRateStr = (String) MathUtil.divide(dischargeTotalAlarmStations,totalStationNum,3); |
| | | |
| | | disCharge.put("高告警数量",dischargeHighAlarmsNum); //高告警数量 alm_signal_id:ChargeCurrHigh 5 high; 6 low |
| | | disCharge.put("告警总数",totalStationAlarmNum); //告警总数 |
| | | //disCharge.put("告警总数",totalStationAlarmNum); //告警总数 |
| | | //disCharge.put("告警总数比例", dischargeRateStr); //告警总数比例 |
| | | disCharge.put("告警机房总数", dischargeTotalAlarmStations); //告警机房总数 |
| | | //disCharge.put("告警机房总数", dischargeTotalAlarmStations); //告警机房总数 |
| | | //disCharge.put("告警机房数比例",dischargeStationRateStr); //告警机房数比例 |
| | | resultMap.put("disCharge", disCharge); |
| | | |
| | |
| | | int chargeTotalAlarmStations = mapper.getTotalAlarmStations(userId,AlarmConstant.ALM_SIGNAL_ID_ChargeCurrHigh); |
| | | |
| | | //放电电流高告警占比 |
| | | String chargeRateStr = (String) MathUtil.divide(chargeHighAlarmsNum,totalStationAlarmNum,3); |
| | | //String chargeRateStr = (String) MathUtil.divide(chargeHighAlarmsNum,totalStationAlarmNum,3); |
| | | //放电电流高告警机房占比 |
| | | String chargeStationRateStr = (String) MathUtil.divide(chargeTotalAlarmStations,totalStationNum,3); |
| | | //String chargeStationRateStr = (String) MathUtil.divide(chargeTotalAlarmStations,totalStationNum,3); |
| | | |
| | | reCharge.put("高告警数量", chargeHighAlarmsNum); //高告警数量 |
| | | reCharge.put("告警总数", totalStationAlarmNum); //告警总数 |
| | | reCharge.put("告警总数比例", chargeRateStr); //告警总数比例 |
| | | reCharge.put("告警机房总数", chargeTotalAlarmStations); //告警机房总数 |
| | | reCharge.put("告警机房数比例", chargeStationRateStr); //告警机房数比例 |
| | | //reCharge.put("告警总数", totalStationAlarmNum); //告警总数 |
| | | //reCharge.put("告警总数比例", chargeRateStr); //告警总数比例 |
| | | //reCharge.put("告警机房总数", chargeTotalAlarmStations); //告警机房总数 |
| | | //reCharge.put("告警机房数比例", chargeStationRateStr); //告警机房数比例 |
| | | resultMap.put("reCharge", reCharge); |
| | | |
| | | return new Response<Map>().set(1,resultMap); |
| | |
| | | Integer volLowAlarmsNum = mapper.getAlarmHighLow(userId,AlarmConstant.ALM_SIGNAL_ID_MonVolLow); |
| | | |
| | | //单体电压总告警数 |
| | | Integer volTotalAlarmNum = volHighAlarmsNum+volLowAlarmsNum; |
| | | //Integer volTotalAlarmNum = volHighAlarmsNum+volLowAlarmsNum; |
| | | |
| | | //告警总数 |
| | | Integer totalStationAlarmNum =mapper.getTotalAlarms(userId); |
| | | //Integer totalStationAlarmNum =mapper.getTotalAlarms(userId); |
| | | |
| | | //电压告警机房数 |
| | | int volTotalAlarmStations = mapper.getTotalAlarmStations(userId,AlarmConstant.Alarm_vol_Monomer); |
| | | //int volTotalAlarmStations = mapper.getTotalAlarmStations(userId,AlarmConstant.Alarm_vol_Monomer); |
| | | |
| | | //总机房数 |
| | | int totalStationNum = infoMapper.getStationCount(userId); |
| | | //int totalStationNum = infoMapper.getStationCount(userId); |
| | | |
| | | //电压告警占比 |
| | | String volRateStr = (String) MathUtil.divide(volTotalAlarmNum,totalStationAlarmNum,3); |
| | | //String volRateStr = (String) MathUtil.divide(volTotalAlarmNum,totalStationAlarmNum,3); |
| | | //电压告警机房占比 |
| | | String volStationRateStr = (String) MathUtil.divide(volTotalAlarmStations,totalStationNum,3); |
| | | //String volStationRateStr = (String) MathUtil.divide(volTotalAlarmStations,totalStationNum,3); |
| | | |
| | | |
| | | monVolMap.put("高告警数量", volHighAlarmsNum); //高告警数量 alm_signal_id 9 |
| | | monVolMap.put("低告警数量", volLowAlarmsNum); //低告警数量 alm_signal_id 10 |
| | | monVolMap.put("告警总数", volTotalAlarmNum); //告警总数 |
| | | monVolMap.put("告警总数比例", volRateStr); //告警总数比例 |
| | | monVolMap.put("告警机房总数", volTotalAlarmStations); //告警机房总数 |
| | | monVolMap.put("告警机房数比例", volStationRateStr); //告警机房数比例 |
| | | //monVolMap.put("告警总数", volTotalAlarmNum); //告警总数 |
| | | //monVolMap.put("告警总数比例", volRateStr); //告警总数比例 |
| | | //monVolMap.put("告警机房总数", volTotalAlarmStations); //告警机房总数 |
| | | //monVolMap.put("告警机房数比例", volStationRateStr); //告警机房数比例 |
| | | resultMap.put("单体电压", monVolMap); |
| | | |
| | | |
| | |
| | | Integer resLowAlarmsNum = mapper.getAlarmHighLow(userId,AlarmConstant.ALM_SIGNAL_ID_MonResLow); |
| | | |
| | | //单体内阻总告警数 |
| | | Integer resTotalAlarmNum = resHighAlarmsNum+resLowAlarmsNum; |
| | | //Integer resTotalAlarmNum = resHighAlarmsNum+resLowAlarmsNum; |
| | | |
| | | //内阻告警机房数 |
| | | int resTotalAlarmStations = mapper.getTotalAlarmStations(userId,AlarmConstant.Alarm_res_Monomer); |
| | | //int resTotalAlarmStations = mapper.getTotalAlarmStations(userId,AlarmConstant.Alarm_res_Monomer); |
| | | |
| | | //内阻告警占比 |
| | | String resRateStr = (String) MathUtil.divide(resTotalAlarmNum,totalStationAlarmNum,3); |
| | | //String resRateStr = (String) MathUtil.divide(resTotalAlarmNum,totalStationAlarmNum,3); |
| | | //内阻告警机房占比 |
| | | String resStationRateStr = (String) MathUtil.divide(resTotalAlarmStations,totalStationNum,3); |
| | | //String resStationRateStr = (String) MathUtil.divide(resTotalAlarmStations,totalStationNum,3); |
| | | |
| | | monResMap.put("高告警数量", resHighAlarmsNum); //高告警数量 alm_signal_id 13 |
| | | monResMap.put("低告警数量", resLowAlarmsNum); //低告警数量 alm_signal_id 14 |
| | | monResMap.put("告警总数", resTotalAlarmNum); //告警总数 |
| | | monResMap.put("告警总数比例", resRateStr); //告警总数比例 |
| | | monResMap.put("告警机房总数", resTotalAlarmStations); //告警机房总数 |
| | | monResMap.put("告警机房数比例", resStationRateStr); //告警机房数比例 |
| | | //monResMap.put("告警总数", resTotalAlarmNum); //告警总数 |
| | | //monResMap.put("告警总数比例", resRateStr); //告警总数比例 |
| | | //monResMap.put("告警机房总数", resTotalAlarmStations); //告警机房总数 |
| | | //monResMap.put("告警机房数比例", resStationRateStr); //告警机房数比例 |
| | | resultMap.put("单体内阻", monResMap); |
| | | |
| | | /*======单体温度======*/ |
| | |
| | | Integer tempLowAlarmsNum = mapper.getAlarmHighLow(userId,AlarmConstant.ALM_SIGNAL_ID_MonTmpLow); |
| | | |
| | | //单体温度总告警数 |
| | | Integer tempTotalAlarmNum = tempHighAlarmsNum+tempLowAlarmsNum; |
| | | //Integer tempTotalAlarmNum = tempHighAlarmsNum+tempLowAlarmsNum; |
| | | |
| | | //温度告警机房数 |
| | | int tempTotalAlarmStations = mapper.getTotalAlarmStations(userId,AlarmConstant.Alarm_tmp_Monomer); |
| | | //int tempTotalAlarmStations = mapper.getTotalAlarmStations(userId,AlarmConstant.Alarm_tmp_Monomer); |
| | | |
| | | //温度告警占比 |
| | | String tempRateStr = (String) MathUtil.divide(tempTotalAlarmNum,totalStationAlarmNum,3); |
| | | //String tempRateStr = (String) MathUtil.divide(tempTotalAlarmNum,totalStationAlarmNum,3); |
| | | //温度告警机房占比 |
| | | String tempStationRateStr = (String) MathUtil.divide(tempTotalAlarmStations,totalStationNum,3); |
| | | //String tempStationRateStr = (String) MathUtil.divide(tempTotalAlarmStations,totalStationNum,3); |
| | | |
| | | monTemMap.put("高告警数量", tempHighAlarmsNum); //高告警数量 alm_signal_id 13 |
| | | monTemMap.put("低告警数量", tempLowAlarmsNum); //低告警数量 alm_signal_id 14 |
| | | monTemMap.put("告警总数", tempTotalAlarmNum); //告警总数 |
| | | monTemMap.put("告警总数比例", tempRateStr); //告警总数比例 |
| | | monTemMap.put("告警机房总数", tempTotalAlarmStations); //告警机房总数 |
| | | monTemMap.put("告警机房数比例", tempStationRateStr); //告警机房数比例 |
| | | //monTemMap.put("告警总数", tempTotalAlarmNum); //告警总数 |
| | | //monTemMap.put("告警总数比例", tempRateStr); //告警总数比例 |
| | | //monTemMap.put("告警机房总数", tempTotalAlarmStations); //告警机房总数 |
| | | //monTemMap.put("告警机房数比例", tempStationRateStr); //告警机房数比例 |
| | | resultMap.put("单体温度", monTemMap); |
| | | |
| | | response.setCode(1); |
| | |
| | | Integer alarmNum2 = mapper.getAlarmHighLow(userId,alarmSignalIds.get(i)+1); |
| | | |
| | | //告警总数 |
| | | Integer totalAlarmNum =alarmNum+alarmNum2; |
| | | //Integer totalAlarmNum =alarmNum+alarmNum2; |
| | | |
| | | //总告警数 |
| | | Integer totalAlarms = mapper.getTotalAlarms(userId); |
| | | //Integer totalAlarms = mapper.getTotalAlarms(userId); |
| | | |
| | | //告警机房数 |
| | | int alarmStationNum = mapper.getTotalAlarmStations(userId,alarmIds.get(i)); |
| | | //int alarmStationNum = mapper.getTotalAlarmStations(userId,alarmIds.get(i)); |
| | | |
| | | //总机房数 |
| | | int totalStationNum = infoMapper.getStationCount(userId); |
| | | //int totalStationNum = infoMapper.getStationCount(userId); |
| | | |
| | | //告警占比 |
| | | String rate = (String) MathUtil.divide(totalAlarmNum,totalAlarms,3); |
| | | //String rate = (String) MathUtil.divide(totalAlarmNum,totalAlarms,3); |
| | | //告警机房占比 |
| | | String stationRate = (String) MathUtil.divide(alarmStationNum,totalStationNum,3); |
| | | //String stationRate = (String) MathUtil.divide(alarmStationNum,totalStationNum,3); |
| | | |
| | | resMap.put(mapName1,alarmNum); //告警1数量 |
| | | resMap.put(mapName2,alarmNum2); //告警2数量 |
| | | resMap.put("告警总数", totalAlarmNum); //告警总数 |
| | | //resMap.put("告警总数", totalAlarmNum); //告警总数 |
| | | //resMap.put("告警总数比例", rate); //告警总数比例 |
| | | resMap.put("告警机房总数", alarmStationNum); //告警机房总数 |
| | | //resMap.put("告警机房总数", alarmStationNum); //告警机房总数 |
| | | //resMap.put("告警机房数比例", stationRate); //告警机房数比例 |
| | | res.put(alarmNames.get(i),resMap); |
| | | } |