| | |
| | | |
| | | private List<CheckScore> getCheckScores(Map.Entry<Long, List<CheckScore>> entry) { |
| | | List<CheckScore> tempList = new ArrayList<>(); // 临时存储需要添加的元素 |
| | | for (CheckScore listCheckScore : entry.getValue()) { |
| | | if (listCheckScore.getExamineCategory() == 1 && entry.getValue().size() == 1) { |
| | | CheckScore face = new CheckScore(); |
| | | face.setExamineCategory((short) 2); |
| | | face.setScore(new BigDecimal("0.0")); |
| | | CheckScore car = new CheckScore(); |
| | | car.setExamineCategory((short) 3); |
| | | car.setScore(new BigDecimal("0.0")); |
| | | tempList.add(face); |
| | | tempList.add(car); |
| | | |
| | | boolean hasFace = false; |
| | | boolean hasCar = false; |
| | | for (int i =0;i <entry.getValue().size();i++) { |
| | | CheckScore checkScore = entry.getValue().get(i); |
| | | if (checkScore.getExamineCategory() == 2){ |
| | | hasCar = true; |
| | | }else if (checkScore.getExamineCategory() == 3){ |
| | | hasFace = true; |
| | | } |
| | | } |
| | | if (!hasCar){ |
| | | CheckScore car = new CheckScore(); |
| | | car.setExamineCategory((short) 2); |
| | | car.setScore(new BigDecimal("0.0")); |
| | | tempList.add(car); |
| | | } |
| | | if (!hasFace){ |
| | | CheckScore face = new CheckScore(); |
| | | face.setExamineCategory((short) 3); |
| | | face.setScore(new BigDecimal("0.0")); |
| | | tempList.add(face); |
| | | } |
| | | |
| | | return tempList; |
| | | } |
| | | |