| | |
| | | }); |
| | | } |
| | | List<Map> mapList =apsWeldSeamMapper.weldSeamEcharts(queryDataList); |
| | | Set monthSet=mapList.stream().map(e->e.get("produce_month").toString()).collect(Collectors.toSet()); |
| | | Set monthSet=mapList.stream().map(e->e.get("produce_month")).collect(Collectors.toSet()); |
| | | List monthList = new ArrayList(monthSet); |
| | | Collections.sort(monthList); |
| | | |
| | | List<List<String>> echartsList = new ArrayList<>(); |
| | | |
| | | Set<String> titleSet = new HashSet<>(); |
| | | List<String> title = new ArrayList<>(titleSet); |
| | | title.add("product"); |
| | | mapList.forEach(item->{ |
| | | StringBuilder sb = new StringBuilder(); |
| | | sb.append(item.get("production_base")); |
| | |
| | | sb.append(item.get("work_order_name")); |
| | | sb.append("-"); |
| | | sb.append(item.get("classification_name")); |
| | | title.add(sb.toString()); |
| | | |
| | | titleSet.add(sb.toString()); |
| | | }); |
| | | List<String> title = new ArrayList<>(); |
| | | title.add("product"); |
| | | title.addAll(titleSet); |
| | | echartsList.add(title); |
| | | monthList.forEach(month->{ |
| | | List<String> table = new ArrayList<>(); |
| | |
| | | sb.append(value.get("work_order_name")); |
| | | sb.append("-"); |
| | | sb.append(value.get("classification_name")); |
| | | if(sb.toString().equals(title.get(i)) && month.equals(value.get("produce_month").toString())){ |
| | | if(sb.toString().equals(title.get(i)) && month==value.get("produce_month")){ |
| | | table.add(value.get("total_weld_seam").toString()); |
| | | } |
| | | } |