优化录取计算:计算专业后保存为结果数据
This commit is contained in:
zhouwentao 2024-03-17 21:05:26 +08:00
parent c537b9f2f6
commit c6a1c6ce21
2 changed files with 6 additions and 4 deletions

View File

@ -93,6 +93,8 @@ public class RecommendMajorDTO implements Serializable {
@ApiModelProperty(value = "学生的折合分数")
private BigDecimal studentConvertedScore;
@ApiModelProperty(value = "其他分数限制")
private String otherScoreLimitation;
/**
* 文化分限制
*/

View File

@ -100,19 +100,19 @@ public class YxCalculationMajorServiceImpl extends ServiceImpl<YxCalculationMajo
if(true){
//语文成绩
if (recommendMajorDTO.getChineseScoreLimitation()!=null && recommendMajorDTO.getChineseScoreLimitation().compareTo(YxConstant.bigDecimal0)>0) {
otherScoreLimitation.append("语文成绩不低于").append(recommendMajorDTO.getChineseScoreLimitation()).append("分,");
otherScoreLimitation.append("语文成绩不低于").append(recommendMajorDTO.getChineseScoreLimitation().doubleValue()).append("分,");
}
//外语成绩
if (recommendMajorDTO.getEnglishScoreLimitation()!=null && recommendMajorDTO.getEnglishScoreLimitation().compareTo(YxConstant.bigDecimal0)>0) {
otherScoreLimitation.append("外语成绩不低于").append(recommendMajorDTO.getEnglishScoreLimitation()).append("分,");
otherScoreLimitation.append("外语成绩不低于").append(recommendMajorDTO.getEnglishScoreLimitation().doubleValue()).append("分,");
}
//文化成绩
if (recommendMajorDTO.getCulturalScoreLimitation()!=null && recommendMajorDTO.getCulturalScoreLimitation().compareTo(YxConstant.bigDecimal0)>0) {
otherScoreLimitation.append("文化成绩不低于").append(recommendMajorDTO.getCulturalScoreLimitation()).append("分,");
otherScoreLimitation.append("文化成绩不低于").append(recommendMajorDTO.getCulturalScoreLimitation().doubleValue()).append("分,");
}
//专业成绩
if (recommendMajorDTO.getProfessionalScoreLimitation()!=null && recommendMajorDTO.getProfessionalScoreLimitation().compareTo(YxConstant.bigDecimal0)>0) {
otherScoreLimitation.append("语文成绩不低于").append(recommendMajorDTO.getProfessionalScoreLimitation()).append("分,");
otherScoreLimitation.append("语文成绩不低于").append(recommendMajorDTO.getProfessionalScoreLimitation().doubleValue()).append("分,");
}
if (otherScoreLimitation.length()>0) {
yxCalculationMajor.setOtherScoreLimitation(otherScoreLimitation.substring(0,otherScoreLimitation.length()-2));