| | |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.whyc.constant.DeviceConstant; |
| | | import com.whyc.constant.YamlProperties; |
| | | import com.whyc.dto.BattTestData; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.dto.paramter.FbsStatePar; |
| | |
| | | List<Fbs9100State> fbs9100StateList = mapper.getListWithoutZJDYBTSE2(userId,type); |
| | | //上面的分组字段 只要能区分 不同的设备就行了. 因为如果是一拖二的情况,也可通过后面的状态优先级来覆盖,设备不会重复 |
| | | //太供可以通过ip来确定是哪台设备 |
| | | Map<String, List<Fbs9100State>> deviceMap = fbs9100StateList.stream().collect(Collectors.groupingBy(Fbs9100State::getDevIp)); |
| | | Map<String, List<Fbs9100State>> deviceMap = null; |
| | | if(YamlProperties.systemSubType == 3){ //晋源 - 因为所有设备共用一个ip, 所以需要加上devId |
| | | deviceMap = fbs9100StateList.stream().collect(Collectors.groupingBy(state -> String.format("%s_%s",state.getDevIp(), state.getDevId()))); |
| | | }else{ //默认通用 |
| | | deviceMap = fbs9100StateList.stream().collect(Collectors.groupingBy(state -> String.valueOf(state.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(); |