소스 검색

未设置班级优先级,有限按照一志愿分配

dzx 4 달 전
부모
커밋
da9a9bb6eb
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      src/main/java/com/xjrsoft/module/banding/service/impl/BandingTaskServiceImpl.java

+ 4 - 1
src/main/java/com/xjrsoft/module/banding/service/impl/BandingTaskServiceImpl.java

@@ -158,7 +158,6 @@ public class BandingTaskServiceImpl extends MPJBaseServiceImpl<BandingTaskMapper
             );
         }
 
-
         //3、查询所用到的规则
         List<BandingRule> ruleList = ruleMapper.selectJoinList(BandingRule.class,
                 new MPJLambdaWrapper<BandingRule>()
@@ -282,6 +281,10 @@ public class BandingTaskServiceImpl extends MPJBaseServiceImpl<BandingTaskMapper
                     }
                 }
 
+                if(taskClass.getSortCode() == null && !Objects.equals(taskClass.getMajorSetId(), newStudent.getFirstAmbitionId())){//如果未给班级设置优先级,只匹配一志愿的学生
+                    continue;
+                }
+
                 List<Boolean> conditionList = new ArrayList<>();
                 BandingTaskMajorCondition condition = classConditionMap.get(taskClass.getMajorSetId());
                 if(condition.getHeight() !=null && newStudent.getHeight() != null && newStudent.getHeight().compareTo(condition.getHeight()) >= 0 ){