| | |
| | | int finalI = i; |
| | | mapList.stream().filter(m->Objects.equals(String.valueOf(m.get("type")),String.valueOf(TYPE_INT_LIST.get(finalI)))) |
| | | .forEach(m->{ |
| | | System.out.println(m.get("type")); |
| | | if(Objects.equals(m.get("inspectionStatus"),0)){ |
| | | integerNoPass.incrementAndGet(); |
| | | } |
| | |
| | | list.add(mapNoPass); |
| | | mapResult.put("series",list); |
| | | mapResult.put("noData",true); |
| | | System.out.println("执行结束getTestSampleStatistics________________>"+mapResult); |
| | | //System.out.println(mapResult); |
| | | return mapResult; |
| | | } |
| | | |
| | |
| | | supplierDistinct.forEach(l -> { |
| | | supplierList.add(String.valueOf(l.get("supplier"))); |
| | | }); |
| | | //x轴 |
| | | allMap.put("xAxis", supplierList); |
| | | List<SeriesDto> seriesDtoList = new ArrayList<SeriesDto>(2); |
| | | //title |
| | | SeriesDto seriesDto = new SeriesDto("合格数量"); |
| | | SeriesDto seriesDto2 = new SeriesDto("不合格数量"); |
| | | // 取出对应合格数量不合格数量 |
| | |
| | | .forEach(l -> { |
| | | if (Objects.equals(l.get("inspectionStatus"), 1)) { |
| | | integerPass.incrementAndGet(); |
| | | } else { |
| | | } else if(Objects.equals(l.get("inspectionStatus"), 0)) { |
| | | integerNoPass.incrementAndGet(); |
| | | } |
| | | }); |
| | |
| | | seriesDtoList.add(seriesDto2); |
| | | allMap.put("series", seriesDtoList); |
| | | allMap.put("noData",true); |
| | | System.out.println("getSupplierNoPassStatistics结果++++++++++++++++>"+allMap); |
| | | return allMap; |
| | | } |
| | | |
| | |
| | | public Map<String, Object> getNoPassProjectStatistics(SelectQualificationRateDto dto) { |
| | | Map<String, Object> allMap = new HashMap<>(16); |
| | | List<ImInfo> imInfos = qualificationRateStatisticsMapper.selectProjectionsByCondition(dto); |
| | | List<String>NameList = new ArrayList<>(); |
| | | List<SelectProjectByCodeAndNameDto>projectByCodeAndNameDtos=new ArrayList<>(); |
| | | if(imInfos.size()<=0){ |
| | | allMap.put("noData",false); |
| | | return allMap; |
| | | } |
| | | List<String>NameList = new ArrayList<>(); |
| | | List<SelectProjectByCodeAndNameDto>projectByCodeAndNameDtos=new ArrayList<>(); |
| | | imInfos.forEach(l->{ |
| | | NameList.add(l.getICode()+"-"+l.getImName()); |
| | | projectByCodeAndNameDtos.add(new SelectProjectByCodeAndNameDto(l.getICode(),l.getImName())); |
| | | NameList.add(l.getImCode()+"-"+l.getImName()); |
| | | projectByCodeAndNameDtos.add(new SelectProjectByCodeAndNameDto(l.getImCode(),l.getImName())); |
| | | }); |
| | | List<ImInfo> imInfosAll = qualificationRateStatisticsMapper.selectProjection(projectByCodeAndNameDtos,dto); |
| | | int total = imInfosAll.size(); |
| | |
| | | AtomicInteger i=new AtomicInteger(0); |
| | | NameList.forEach(n->{ |
| | | imInfos.stream() |
| | | .filter(im-> Objects.equals(n,im.getICode()+"-"+im.getImName())) |
| | | .filter(im-> Objects.equals(n,im.getImCode()+"-"+im.getImName())) |
| | | .forEach(im->{ |
| | | i.set(im.getIprInfos().size()); |
| | | }); |
| | |
| | | allMap.put("legend",NameList); |
| | | allMap.put("series",doubleList); |
| | | allMap.put("noData",true); |
| | | System.out.println("getNoPassProjectStatistics结果==========================>"+allMap); |
| | | return allMap; |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getSampleOptions() { |
| | | return qualificationRateStatisticsMapper.getSampleOptions(); |
| | | List<Map<String, Object>> sampleOptions = qualificationRateStatisticsMapper.getSampleOptions(); |
| | | //去重样品 |
| | | List<Map<String, Object>> sampleOptionsDistinct = ArrayListUtil.oneObjectsDistinctByProperty(MapHandlerDto::comparingByCode, sampleOptions); |
| | | sampleOptionsDistinct.forEach(System.out::println); |
| | | return sampleOptionsDistinct; |
| | | } |
| | | |
| | | public static String getPercent(long x, long y) { |