| | |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static com.whyc.util.ActionUtil.createFilefolderIFNotExist; |
| | | |
| | |
| | | int yearAboveSeven = 0; |
| | | List<Integer> list = battInfMapper.findUseYear(uId); |
| | | //查询1年内~7年内,7年以上,含头不含尾 |
| | | map.put("1年内", (int) list.stream().filter(item -> item <= 1).count()); |
| | | map.put("2年内", (int) list.stream().filter(item -> item <= 2).count()); |
| | | map.put("3年内", (int) list.stream().filter(item -> item <= 3).count()); |
| | | map.put("4年内", (int) list.stream().filter(item -> item <= 4).count()); |
| | | map.put("5年内", (int) list.stream().filter(item -> item <= 5).count()); |
| | | map.put("6年内", (int) list.stream().filter(item -> item <= 6).count()); |
| | | map.put("7年内", (int) list.stream().filter(item -> item <= 7).count()); |
| | | map.put("7年以上", (int) list.stream().filter(item -> item > 7).count()); |
| | | map.put("1年内", (int) list.stream().filter(item -> item <1).count()); |
| | | map.put("2年内", (int) list.stream().filter(item -> item < 2).count()); |
| | | map.put("3年内", (int) list.stream().filter(item -> item < 3).count()); |
| | | map.put("4年内", (int) list.stream().filter(item -> item < 4).count()); |
| | | map.put("5年内", (int) list.stream().filter(item -> item < 5).count()); |
| | | map.put("6年内", (int) list.stream().filter(item -> item < 6).count()); |
| | | map.put("7年内", (int) list.stream().filter(item -> item < 7).count()); |
| | | map.put("7年以上", (int) list.stream().filter(item -> item >= 7).count()); |
| | | |
| | | /*for (int year:list){ |
| | | if(year<3){ |
| | |
| | | int powerNum = powerInfService.getNum(userId); |
| | | List<StationInf> stationInfList = stationInfService.getStationInfList(userId); |
| | | int stationNum = stationInfService.getStation(userId); |
| | | int hrDisNum = testInfService.getHrQuarter(userId); |
| | | int hrDisNum = testInfService.getHrQuarterZC(userId); |
| | | map.put("battGroupCount", battGroupCount); |
| | | map.put("devCount", devCount); |
| | | map.put("powerNum", powerNum); |
| | |
| | | //int battStationNum = battInfMapper.geStationCount(userId); |
| | | //总机房 |
| | | int stationNum = stationInfService.getStation(userId); |
| | | //设备数 |
| | | int deviceNum = battInfMapper.getDevNum(userId); |
| | | /*本年度已核容放电电池组(testdate_inf中test_type=3,test_startType=3) |
| | | int hrDisNum = testInfService.getHrQuarter(userId); |
| | | * 修改为:领导层本年度已放数 仅需要统计放电正常停止的 正常停止的条件如下: |
| | |
| | | map.put("powerNum", powerNum);//电源 |
| | | map.put("stationNum", stationNum);//总机房 |
| | | map.put("hrDisNum", hrDisNum);//本年度核容放电电池组 |
| | | map.put("deviceNum", deviceNum);//本年度核容放电电池组 |
| | | return new Response().setII(1, true, map, "基础资源信息"); |
| | | } catch (Exception e) { |
| | | return new Response<>().set(1, false, "发生异常:" + e.getCause()); |
| | |
| | | List<String> list = battInfMapper.searchMonVol(); |
| | | return new Response().setII(1, list.size() > 0 ? true : false, list, "查询标称电压类别"); |
| | | } |
| | | |
| | | //根据设备id查询电池组id(取第一个) |
| | | public Response searchBattGroupIdByDevId(int devId) { |
| | | String battGroupId = battInfMapper.searchBattGroupIdByDevId(devId); |
| | | return new Response().setII(1, battGroupId != null, battGroupId != null ? battGroupId : "0", "返回电池组id"); |
| | | } |
| | | } |