Commit 2c4e31c7 authored by licc's avatar licc

修改获取专业列表接口

parent 8f0f9ab0
...@@ -112,10 +112,13 @@ public class ProfessionServiceImpl extends ServiceImpl<ProfessionMapper, Profess ...@@ -112,10 +112,13 @@ public class ProfessionServiceImpl extends ServiceImpl<ProfessionMapper, Profess
return null; 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 SchemeTypeEnums.UNDERGRADUATE_CULTURE.getCode();
} }
return 0;
return SchemeTypeEnums.JUNIOR_COLLEGE_MAJOR.getCode();
} }
//type == 2 美术考生 //type == 2 美术考生
...@@ -126,8 +129,11 @@ public class ProfessionServiceImpl extends ServiceImpl<ProfessionMapper, Profess ...@@ -126,8 +129,11 @@ public class ProfessionServiceImpl extends ServiceImpl<ProfessionMapper, Profess
return null; 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(); return SchemeTypeEnums.UNDERGRADUATE_ARTS.getCode();
} }
...@@ -143,13 +149,13 @@ public class ProfessionServiceImpl extends ServiceImpl<ProfessionMapper, Profess ...@@ -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()) { if (total >= firstRule.getCultureMin()) {
return SchemeTypeEnums.UNDERGRADUATE_SPORTS.getCode(); return SchemeTypeEnums.UNDERGRADUATE_SPORTS.getCode();
} }
return SchemeTypeEnums.JUNIOR_COLLEGE_SPORTS.getCode(); return SchemeTypeEnums.JUNIOR_COLLEGE_SPORTS.getCode();
} }
//type == 4 体育考生 //type == 4 体育考生
...@@ -160,8 +166,10 @@ public class ProfessionServiceImpl extends ServiceImpl<ProfessionMapper, Profess ...@@ -160,8 +166,10 @@ public class ProfessionServiceImpl extends ServiceImpl<ProfessionMapper, Profess
return null; 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(); return SchemeTypeEnums.UNDERGRADUATE_LITERATURE.getCode();
} }
......
...@@ -241,17 +241,17 @@ public class SchemeServiceImpl extends ServiceImpl<SchemeMapper, SchemeInfo> imp ...@@ -241,17 +241,17 @@ public class SchemeServiceImpl extends ServiceImpl<SchemeMapper, SchemeInfo> imp
list = getVolunteerList(list, totalResult); list = getVolunteerList(list, totalResult);
} }
// //6保存用户方案记录、志愿之间的关联关系,扣减查询次数 //6保存用户方案记录、志愿之间的关联关系,扣减查询次数
// R<Integer> bool = volunteerManager.saveUserVolunteer(user, list, scoreInfo, queryVo.getBigMajorNames()); R<Integer> bool = volunteerManager.saveUserVolunteer(user, list, scoreInfo, queryVo.getBigMajorNames());
// if (null != bool && bool.getCode() == 500) { if (null != bool && bool.getCode() == 500) {
// return R.error("保存方案查询记录失败!"); return R.error("保存方案查询记录失败!");
// } }
//排序 //排序
list.sort(Comparator.comparing(Volunteer::getLowestMark).reversed()); list.sort(Comparator.comparing(Volunteer::getLowestMark).reversed());
volunteerVo.setUserId(user.getId()); volunteerVo.setUserId(user.getId());
// assert bool != null; assert bool != null;
// volunteerVo.setRecordId(bool.getData()); volunteerVo.setRecordId(bool.getData());
volunteerVo.setVolunteers(list); volunteerVo.setVolunteers(list);
volunteerVo.setTotal(list.size()); volunteerVo.setTotal(list.size());
return R.ok(volunteerVo); 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