|
@@ -290,21 +290,24 @@ public class BandingTaskServiceImpl extends MPJBaseServiceImpl<BandingTaskMapper
|
|
|
|
|
|
List<Boolean> conditionList = new ArrayList<>();
|
|
|
BandingTaskMajorCondition condition = classConditionMap.get(taskClass.getMajorSetId());
|
|
|
- if(condition.getHeight() !=null && newStudent.getHeight() != null && newStudent.getHeight().compareTo(condition.getHeight()) >= 0 ){
|
|
|
- conditionList.add(true);
|
|
|
- }else if(condition.getHeight() !=null && newStudent.getHeight() != null && newStudent.getHeight().compareTo(condition.getHeight()) < 0){
|
|
|
- conditionList.add(false);
|
|
|
- }else if(condition.getHeight() !=null && newStudent.getHeight() == null){
|
|
|
- conditionList.add(false);
|
|
|
- }
|
|
|
+ if(condition != null){
|
|
|
+ if(condition.getHeight() !=null && newStudent.getHeight() != null && newStudent.getHeight().compareTo(condition.getHeight()) >= 0 ){
|
|
|
+ conditionList.add(true);
|
|
|
+ }else if(condition.getHeight() !=null && newStudent.getHeight() != null && newStudent.getHeight().compareTo(condition.getHeight()) < 0){
|
|
|
+ conditionList.add(false);
|
|
|
+ }else if(condition.getHeight() !=null && newStudent.getHeight() == null){
|
|
|
+ conditionList.add(false);
|
|
|
+ }
|
|
|
|
|
|
- if(condition.getScore() !=null && newStudent.getScore() != null && newStudent.getScore().compareTo(condition.getScore()) >= 0 ){
|
|
|
- conditionList.add(true);
|
|
|
- }else if(condition.getScore() !=null && newStudent.getScore() != null && newStudent.getScore().compareTo(condition.getScore()) < 0){
|
|
|
- conditionList.add(false);
|
|
|
- }else if(condition.getScore() !=null && newStudent.getScore() == null){
|
|
|
- conditionList.add(false);
|
|
|
+ if(condition.getScore() !=null && newStudent.getScore() != null && newStudent.getScore().compareTo(condition.getScore()) >= 0 ){
|
|
|
+ conditionList.add(true);
|
|
|
+ }else if(condition.getScore() !=null && newStudent.getScore() != null && newStudent.getScore().compareTo(condition.getScore()) < 0){
|
|
|
+ conditionList.add(false);
|
|
|
+ }else if(condition.getScore() !=null && newStudent.getScore() == null){
|
|
|
+ conditionList.add(false);
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
//如果包含false,则表明不符合条件,这个学生跳过
|
|
|
if(conditionList.contains(false)){
|
|
|
continue;
|