| | |
| | | return new Response().set(number); |
| | | } |
| | | |
| | | //山西晋源特定接口 |
| | | public Response getRealTimeWithLevel1JY() { |
| | | int number=mapper.getRealTimeWithLevel1JY(); |
| | | return new Response().set(number); |
| | | } |
| | | |
| | | //实时1级告警记录查询 |
| | | public Response getRealAlarmListWithLevel1(int uId) { |
| | | Calendar instance = Calendar.getInstance(); |
| | |
| | | } |
| | | } |
| | | |
| | | //山西晋源特定接口 |
| | | public Response getMonVRTAnalysisJY() { |
| | | |
| | | Response response = new Response(); |
| | | try { |
| | | HashMap<String, Object> resultMap = new HashMap<>(); |
| | | Map<String, Object> monVolMap = new HashMap<>();//单体电压 Alarm_vol_Monomer =119005; |
| | | Map<String, Object> monResMap = new HashMap<>();//单体内阻 Alarm_res_Monomer =119007 |
| | | Map<String, Object> monTemMap = new HashMap<>();//单体温度 Alarm_tmp_Monomer =119006 |
| | | |
| | | /*======单体电压======*/ |
| | | |
| | | //高告警数量 |
| | | Integer volHighAlarmsNum = mapper.getAlarmHighLowJY(AlarmConstant.ALM_SIGNAL_ID_MonVolHigh); |
| | | //低告警数量 |
| | | Integer volLowAlarmsNum = mapper.getAlarmHighLowJY(AlarmConstant.ALM_SIGNAL_ID_MonVolLow); |
| | | |
| | | //单体电压总告警数 |
| | | //Integer volTotalAlarmNum = volHighAlarmsNum+volLowAlarmsNum; |
| | | |
| | | //告警总数 |
| | | //Integer totalStationAlarmNum =mapper.getTotalAlarms(userId); |
| | | |
| | | //电压告警机房数 |
| | | //int volTotalAlarmStations = mapper.getTotalAlarmStations(userId,AlarmConstant.Alarm_vol_Monomer); |
| | | |
| | | //总机房数 |
| | | //int totalStationNum = infoMapper.getStationCount(userId); |
| | | |
| | | //电压告警占比 |
| | | //String volRateStr = (String) MathUtil.divide(volTotalAlarmNum,totalStationAlarmNum,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); //告警机房数比例 |
| | | resultMap.put("单体电压", monVolMap); |
| | | |
| | | |
| | | |
| | | /*======单体内阻======*/ |
| | | |
| | | //高告警数量 |
| | | Integer resHighAlarmsNum = mapper.getAlarmHighLowJY( AlarmConstant.ALM_SIGNAL_ID_MonResHigh); |
| | | //低告警数量 |
| | | Integer resLowAlarmsNum = mapper.getAlarmHighLowJY(AlarmConstant.ALM_SIGNAL_ID_MonResLow); |
| | | |
| | | //单体内阻总告警数 |
| | | //Integer resTotalAlarmNum = resHighAlarmsNum+resLowAlarmsNum; |
| | | |
| | | //内阻告警机房数 |
| | | //int resTotalAlarmStations = mapper.getTotalAlarmStations(userId,AlarmConstant.Alarm_res_Monomer); |
| | | |
| | | //内阻告警占比 |
| | | //String resRateStr = (String) MathUtil.divide(resTotalAlarmNum,totalStationAlarmNum,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); //告警机房数比例 |
| | | resultMap.put("单体内阻", monResMap); |
| | | |
| | | /*======单体温度======*/ |
| | | |
| | | //高告警数量 |
| | | Integer tempHighAlarmsNum = mapper.getAlarmHighLowJY(AlarmConstant.ALM_SIGNAL_ID_MonTmpHigh); |
| | | //低告警数量 |
| | | Integer tempLowAlarmsNum = mapper.getAlarmHighLowJY(AlarmConstant.ALM_SIGNAL_ID_MonTmpLow); |
| | | |
| | | //单体温度总告警数 |
| | | //Integer tempTotalAlarmNum = tempHighAlarmsNum+tempLowAlarmsNum; |
| | | |
| | | //温度告警机房数 |
| | | //int tempTotalAlarmStations = mapper.getTotalAlarmStations(userId,AlarmConstant.Alarm_tmp_Monomer); |
| | | |
| | | //温度告警占比 |
| | | //String tempRateStr = (String) MathUtil.divide(tempTotalAlarmNum,totalStationAlarmNum,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); //告警机房数比例 |
| | | resultMap.put("单体温度", monTemMap); |
| | | |
| | | return response.setII(1, true, resultMap, ""); |
| | | } catch (Exception e) { |
| | | return response.set(1, false, "发生异常:" + e.getCause()); |
| | | } |
| | | } |
| | | |
| | | //今日实时告警 |
| | | public Response getBalmToday(int userId) { |
| | | try { |