|
|
@ -222,8 +222,36 @@ public class TestReportServiceImpl extends ServiceImpl<TestReportMapper, TestRep |
|
|
|
.orderByAsc(SysDictData::getDictSort)); |
|
|
|
Map<String, List<SysDictData>> groupByType = sysDictDataList.stream().collect(Collectors.groupingBy(SysDictData::getDictType)); |
|
|
|
for (String option : groupByType.keySet()) { |
|
|
|
String substring = option.substring(option.length() - 1); |
|
|
|
//反射 |
|
|
|
String reportOptionVal = ""; |
|
|
|
switch (substring){ |
|
|
|
case "1": |
|
|
|
reportOptionVal = vo.getReportOption1(); |
|
|
|
break; |
|
|
|
case "2": |
|
|
|
reportOptionVal = vo.getReportOption2(); |
|
|
|
break; |
|
|
|
case "3": |
|
|
|
reportOptionVal = vo.getReportOption3(); |
|
|
|
break; |
|
|
|
case "4": |
|
|
|
reportOptionVal = vo.getReportOption4(); |
|
|
|
break; |
|
|
|
case "5": |
|
|
|
reportOptionVal = vo.getReportOption5(); |
|
|
|
break; |
|
|
|
case "6": |
|
|
|
reportOptionVal = vo.getReportOption6(); |
|
|
|
break; |
|
|
|
case "7": |
|
|
|
reportOptionVal = vo.getReportOption7(); |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
List<SysDictData> report_option_1 = groupByType.get(option); |
|
|
|
Optional<SysDictData> first = report_option_1.stream().filter(item -> item.getDictValue().equals(vo.getReportOption1())).findFirst(); |
|
|
|
String finalReportOptionVal = reportOptionVal; |
|
|
|
Optional<SysDictData> first = report_option_1.stream().filter(item -> item.getDictValue().equals(finalReportOptionVal)).findFirst(); |
|
|
|
if (!first.isPresent()) { |
|
|
|
continue; |
|
|
|
|
|
|
|