This commit is contained in:
zhouwentao 2025-06-23 08:53:25 +08:00
parent b20413b7bd
commit 32d0fd1e78
11 changed files with 26 additions and 9 deletions

View File

@ -191,7 +191,7 @@ public class MiniUserScoreController {
yxUserScore.setId(null);
yxUserScore.setCreateTime(null);
yxUserScore.setUpdateTime(null);
yxUserScore.setCalculationTableName("yx_calculation_major");
yxUserScore.setCalculationTableName(YxConstant.newCalculationMajorName);
//保存当前用户的得分
yxUserScoreService.save(yxUserScore);

View File

@ -157,4 +157,7 @@ public class RecommendMajorDTO implements Serializable {
private BigDecimal scoreLineDifference;
@ApiModelProperty(value = "状态")
private String state;
@ApiModelProperty(value = "学费")
private String tuition;
}

View File

@ -75,8 +75,8 @@ public class YxConstant {
public static BigDecimal bigDecimal7p5 = new BigDecimal("7.5");
public static BigDecimal bigDecimal50 = new BigDecimal("50");
public static String oldCalculationMajorName = "yx_calculation_major";
public static String newCalculationMajorName = "yx_calculation_major";
public static String oldCalculationMajorName = "yx_calculation_major_2025";
public static String newCalculationMajorName = "yx_calculation_major_2025";
public static BigDecimal bigDecimal10 = new BigDecimal("10");
public static BigDecimal bigDecimal025 = new BigDecimal("0.25");

View File

@ -59,7 +59,7 @@ public class YxCalculationMajor implements Serializable {
/**学费*/
@Excel(name = "学费", width = 15)
@ApiModelProperty(value = "学费")
private java.math.BigDecimal tuition;
private String tuition;
/**备注*/
@Excel(name = "备注", width = 15)
@ApiModelProperty(value = "备注")

View File

@ -24,4 +24,6 @@ public interface YxCalculationMajorMapper extends BaseMapper<YxCalculationMajor>
void insertBatchNew(@Param("tableName") String tableName,@Param("scoreId")String scoreId,@Param("list") List<YxCalculationMajor> list);
List<String> groupByBatchNumber(@Param(value = "tableName")String tableName,@Param("queryvo") QueryRecommendMajorVO queryRecommendMajorVO);
YxCalculationMajor getCalculationById(@Param("calculationTableName") String calculationTableName, @Param("calculationMajorId") String calculationMajorId);
}

View File

@ -64,7 +64,6 @@
s.province as province,
s.school_nature as schoolNature,
s.institution_type as institutionType
FROM ${tableName} cm
LEFT JOIN yx_school_child sc ON sc.school_code = cm.school_code
LEFT JOIN yx_school_research_teaching srt ON srt.school_id = sc.school_id
@ -558,5 +557,8 @@
AND cm.enroll_probability &gt;=0
GROUP BY cm.batch
</select>
<select id="getCalculationById" resultType="org.jeecg.modules.yx.entity.YxCalculationMajor">
SELECT * FROM ${calculationTableName} WHERE id = #{calculationMajorId}
</select>
</mapper>

View File

@ -37,6 +37,7 @@
sm.batch as batch,
sm.enrollment_code as enrollmentCode,
sm.major_code,
sm.tuition as tuition,
sm.tuition as studyCost,
sm.kslx,
sm.plan_num as planNum

View File

@ -62,4 +62,6 @@ public interface IYxCalculationMajorService extends IService<YxCalculationMajor>
void copyNew(String oldScoreId, String newScoreId, String oldCalculationMajorTableName, String newCalculationMajorTableName);
List<String> groupByBatchNumber(QueryRecommendMajorVO queryRecommendMajorVO);
YxCalculationMajor getCalculationById(String calculationTableName, String calculationMajorId);
}

View File

@ -83,6 +83,7 @@ public class YxCalculationMajorServiceImpl extends ServiceImpl<YxCalculationMajo
otherScoreLimitation = new StringBuilder();
yxCalculationMajor = new YxCalculationMajor();
BeanUtils.copyProperties(recommendMajorDTO, yxCalculationMajor);
yxCalculationMajor.setTuition(recommendMajorDTO.getTuition());
yxCalculationMajor.setDetail(recommendMajorDTO.getMajorDetail());
yxCalculationMajor.setScoreId(userScore.getId());
yxCalculationMajor.setStudentOldConvertedScore(recommendMajorDTO.getStudentScore());
@ -428,6 +429,11 @@ public class YxCalculationMajorServiceImpl extends ServiceImpl<YxCalculationMajo
return baseMapper.groupByBatchNumber(activeCurrentUserScore.getCalculationTableName(),queryRecommendMajorVO);
}
@Override
public YxCalculationMajor getCalculationById(String calculationTableName, String calculationMajorId) {
return baseMapper.getCalculationById(calculationTableName, calculationMajorId);
}
private void setSchoolTagsList(List<RecommendMajorDTO> recommendMajorList) {
if (CollectionUtils.isNotEmpty(recommendMajorList)) {
Set<String> schoolIdSet = recommendMajorList.stream().map(RecommendMajorDTO::getSchoolId).collect(Collectors.toSet());

View File

@ -10,6 +10,7 @@ import org.apache.shiro.SecurityUtils;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.util.AssertUtils;
import org.jeecg.common.util.RedisUtil;
import org.jeecg.modules.yx.constant.YxConstant;
import org.jeecg.modules.yx.dto.ProfessionalCategoryChildrenDTO;
import org.jeecg.modules.yx.dto.UserScoreUpdateDTO;
import org.jeecg.modules.yx.entity.YxCalculationMajor;
@ -188,7 +189,7 @@ public class YxUserScoreServiceImpl extends ServiceImpl<YxUserScoreMapper, YxUse
if (CollectionUtil.isNotEmpty(userScoreUpdateDTO.getSubjectList())) {
yxUserScore.setSubjects(userScoreUpdateDTO.getSubjectList().stream().collect(Collectors.joining(",")));
}
yxUserScore.setCalculationTableName("yx_calculation_major");
yxUserScore.setCalculationTableName(YxConstant.newCalculationMajorName);
this.save(yxUserScore);
return yxUserScore;
}

View File

@ -426,14 +426,14 @@ public class YxVolunteerServiceImpl extends ServiceImpl<YxVolunteerMapper, YxVol
String volunteerId = activeByCreateVolunteerDto.getId();
YxCalculationMajor calculationMajor = null;
for (YxVolunteerRecord yxVolunteerRecord : volunteerRecordList) {
if (yxVolunteerRecord.getIndexs()>35) {
throw new JeecgBootException("各批次仅可加35个志愿");
if (yxVolunteerRecord.getIndexs()>64) {
throw new JeecgBootException("各批次仅可加64个志愿");
}
//判断有没有专业Id
if (StringUtils.isBlank(yxVolunteerRecord.getCalculationMajorId())) {
continue;
}
calculationMajor = yxCalculationMajorService.getById(yxVolunteerRecord.getCalculationMajorId());
calculationMajor = yxCalculationMajorService.getCalculationById(activeByCreateVolunteerDto.getUserScoreInfo().getCalculationTableName() ,yxVolunteerRecord.getCalculationMajorId());
if (calculationMajor == null) {
continue;
}