| | |
| | | Response response = new Response(); |
| | | try { |
| | | Map<String, Integer> resultMap = new HashMap<>(); |
| | | resultMap.put("在线浮充数量", 0); |
| | | resultMap.put("直流充电数量", 0); |
| | | resultMap.put("预充电数量", 0); |
| | | resultMap.put("核容测试数量", 0); |
| | | resultMap.put("内阻测试数量", 0); |
| | | resultMap.put("通讯故障数量", 0); |
| | | |
| | | List<Fbs9100State> fbs9100StateList = mapper.getListWithoutZJDYBTSE2(userId,type); |
| | | Map<String, List<Fbs9100State>> deviceMap = fbs9100StateList.stream().collect(Collectors.groupingBy(Fbs9100State::getDevIp)); |
| | | //Map<String, List<Fbs9100State>> deviceMap = fbs9100StateList.stream().collect(Collectors.groupingBy(Fbs9100State::getDevIp)); |
| | | Map<String, List<Fbs9100State>> deviceMap = fbs9100StateList.stream().collect(Collectors.groupingBy(state -> |
| | | String.format("%s_%s",state.getDevIp(), state.getDevId()))); |
| | | Set<String> deviceSet = deviceMap.keySet(); |
| | | Calendar instance = Calendar.getInstance(); |
| | | instance.add(Calendar.MINUTE, -1); |
| | |
| | | resultMap.put("内阻测试数量", resultMap.get("内阻测试数量") + 1); |
| | | } |
| | | else if(workStateSet.contains(DeviceConstant.DEV_ONLINE_CHARGE)) { |
| | | resultMap.put("在线浮充数量", resultMap.get("在线浮充数量") + 1); |
| | | resultMap.put("直流充电数量", resultMap.get("直流充电数量") + 1); |
| | | } |
| | | |
| | | } |
| | |
| | | Response response = new Response(); |
| | | try { |
| | | Map<String, Integer> resultMap = new HashMap<>(); |
| | | resultMap.put("在线浮充数量", 0); |
| | | resultMap.put("直流充电数量", 0); |
| | | resultMap.put("预充电数量", 0); |
| | | resultMap.put("核容测试数量", 0); |
| | | resultMap.put("内阻测试数量", 0); |
| | |
| | | |
| | | List<Fbs9100State> fbs9100StateList = mapper.getListWithoutZJDYBTSE2JY(type); |
| | | |
| | | Map<String, List<Fbs9100State>> deviceMap = fbs9100StateList.stream().collect(Collectors.groupingBy(Fbs9100State::getDevIp)); |
| | | //Map<String, List<Fbs9100State>> deviceMap = fbs9100StateList.stream().collect(Collectors.groupingBy(Fbs9100State::getDevIp)); |
| | | Map<String, List<Fbs9100State>> deviceMap = fbs9100StateList.stream().collect(Collectors.groupingBy(state ->String.format("%s_%s",state.getDevIp(), state.getDevId()))); |
| | | Set<String> deviceSet = deviceMap.keySet(); |
| | | Calendar instance = Calendar.getInstance(); |
| | | instance.add(Calendar.MINUTE, -1); |
| | |
| | | resultMap.put("内阻测试数量", resultMap.get("内阻测试数量") + 1); |
| | | } |
| | | else if(workStateSet.contains(DeviceConstant.DEV_ONLINE_CHARGE)) { |
| | | resultMap.put("在线浮充数量", resultMap.get("在线浮充数量") + 1); |
| | | resultMap.put("直流充电数量", resultMap.get("直流充电数量") + 1); |
| | | } |
| | | |
| | | } |