فهرست منبع

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

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 ){