Commit 2c4e31c7 authored by licc's avatar licc

修改获取专业列表接口

parent 8f0f9ab0
......@@ -112,10 +112,13 @@ public class ProfessionServiceImpl extends ServiceImpl<ProfessionMapper, Profess
return null;
}
if (scoreInfo.getCultureGrade() >= firstRule.getCultureMin()) {
//本科类比文化分 = 本年录取分 -去年录取分 + 考生分数
double firstCulture = firstRule.getCurrentYearCulture() - firstRule.getCultureMin() + scoreInfo.getCultureGrade();
if (scoreInfo.getCultureGrade() >= firstCulture) {
return SchemeTypeEnums.UNDERGRADUATE_CULTURE.getCode();
}
return 0;
return SchemeTypeEnums.JUNIOR_COLLEGE_MAJOR.getCode();
}
//type == 2 美术考生
......@@ -126,8 +129,11 @@ public class ProfessionServiceImpl extends ServiceImpl<ProfessionMapper, Profess
return null;
}
if (scoreInfo.getCultureGrade() >= firstRule.getCultureMin() &&
scoreInfo.getMajorGrade() >= firstRule.getProfessionMin()) {
//专科类比分 = 本年录取分 -去年录取分 + 考生分数
double firstCulture = firstRule.getCurrentYearCulture() - firstRule.getCultureMin() + scoreInfo.getCultureGrade();
double firstMajor = firstRule.getCurrentYearMajor() - firstRule.getProfessionMin() + scoreInfo.getMajorGrade();
if (scoreInfo.getCultureGrade() >= firstCulture &&
scoreInfo.getMajorGrade() >= firstMajor) {
return SchemeTypeEnums.UNDERGRADUATE_ARTS.getCode();
}
......@@ -143,13 +149,13 @@ public class ProfessionServiceImpl extends ServiceImpl<ProfessionMapper, Profess
}
//计算综合成绩
double total = scoreInfo.getMajorGrade() * 750 / 100 * 0.7 + scoreInfo.getCultureGrade() * 0.3;
//综合成绩差值
double value = firstRule.getCurrentYearCulture() - firstRule.getCultureMin();
double total = scoreInfo.getMajorGrade() * 750 / 100 * 0.7 + scoreInfo.getCultureGrade() * 0.3 - value;
if (total >= firstRule.getCultureMin()) {
return SchemeTypeEnums.UNDERGRADUATE_SPORTS.getCode();
}
return SchemeTypeEnums.JUNIOR_COLLEGE_SPORTS.getCode();
}
//type == 4 体育考生
......@@ -160,8 +166,10 @@ public class ProfessionServiceImpl extends ServiceImpl<ProfessionMapper, Profess
return null;
}
if (scoreInfo.getCultureGrade() >= firstRule.getCultureMin() &&
scoreInfo.getMajorGrade() >= firstRule.getProfessionMin()) {
//专科类比分 = 本年录取分 -去年录取分 + 考生分数
double firstCulture = firstRule.getCurrentYearCulture() - firstRule.getCultureMin() + scoreInfo.getCultureGrade();
double firstMajor = firstRule.getCurrentYearMajor() - firstRule.getProfessionMin() + scoreInfo.getMajorGrade();
if (scoreInfo.getCultureGrade() >= firstCulture && scoreInfo.getMajorGrade() >= firstMajor) {
return SchemeTypeEnums.UNDERGRADUATE_LITERATURE.getCode();
}
......
......@@ -241,17 +241,17 @@ public class SchemeServiceImpl extends ServiceImpl<SchemeMapper, SchemeInfo> imp
list = getVolunteerList(list, totalResult);
}
// //6保存用户方案记录、志愿之间的关联关系,扣减查询次数
// R<Integer> bool = volunteerManager.saveUserVolunteer(user, list, scoreInfo, queryVo.getBigMajorNames());
// if (null != bool && bool.getCode() == 500) {
// return R.error("保存方案查询记录失败!");
// }
//6保存用户方案记录、志愿之间的关联关系,扣减查询次数
R<Integer> bool = volunteerManager.saveUserVolunteer(user, list, scoreInfo, queryVo.getBigMajorNames());
if (null != bool && bool.getCode() == 500) {
return R.error("保存方案查询记录失败!");
}
//排序
list.sort(Comparator.comparing(Volunteer::getLowestMark).reversed());
volunteerVo.setUserId(user.getId());
// assert bool != null;
// volunteerVo.setRecordId(bool.getData());
assert bool != null;
volunteerVo.setRecordId(bool.getData());
volunteerVo.setVolunteers(list);
volunteerVo.setTotal(list.size());
return R.ok(volunteerVo);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment