updates
This commit is contained in:
parent
02bfd920b4
commit
ab334e0e03
|
|
@ -243,7 +243,8 @@ public class YxScoreController {
|
||||||
LambdaUpdateWrapper<YxCalculationMajor> updateWrapper = new LambdaUpdateWrapper<>();
|
LambdaUpdateWrapper<YxCalculationMajor> updateWrapper = new LambdaUpdateWrapper<>();
|
||||||
updateWrapper.eq(YxCalculationMajor::getScoreId,scoreId);
|
updateWrapper.eq(YxCalculationMajor::getScoreId,scoreId);
|
||||||
updateWrapper.set(YxCalculationMajor::getScoreId,bakScoreId);
|
updateWrapper.set(YxCalculationMajor::getScoreId,bakScoreId);
|
||||||
yxCalculationMajorService.update(updateWrapper);
|
yxCalculationMajorService.updateScoreId(yxUserScore.getCalculationTableName() ,scoreId, bakScoreId);
|
||||||
|
// yxCalculationMajorService.update(updateWrapper);
|
||||||
try {
|
try {
|
||||||
// 重新计算专业
|
// 重新计算专业
|
||||||
List<RecommendMajorDTO> recommendMajorDTOList = yxCalculationMajorService.calculationMajor(yxUserScore);
|
List<RecommendMajorDTO> recommendMajorDTOList = yxCalculationMajorService.calculationMajor(yxUserScore);
|
||||||
|
|
|
||||||
|
|
@ -26,4 +26,6 @@ public interface YxCalculationMajorMapper extends BaseMapper<YxCalculationMajor>
|
||||||
List<String> groupByBatchNumber(@Param(value = "tableName")String tableName,@Param("queryvo") QueryRecommendMajorVO queryRecommendMajorVO);
|
List<String> groupByBatchNumber(@Param(value = "tableName")String tableName,@Param("queryvo") QueryRecommendMajorVO queryRecommendMajorVO);
|
||||||
|
|
||||||
YxCalculationMajor getCalculationById(@Param("calculationTableName") String calculationTableName, @Param("calculationMajorId") String calculationMajorId);
|
YxCalculationMajor getCalculationById(@Param("calculationTableName") String calculationTableName, @Param("calculationMajorId") String calculationMajorId);
|
||||||
|
|
||||||
|
int updateScoreId(@Param("calculationTableName") String calculationTableName,@Param("scoreId") String scoreId,@Param("bakScoreId") String bakScoreId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,11 @@
|
||||||
)
|
)
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
<update id="updateScoreId">
|
||||||
|
UPDATE ${calculationTableName}
|
||||||
|
SET score_id = #{scoreId}
|
||||||
|
WHERE score_id = #{bakScoreId}
|
||||||
|
</update>
|
||||||
|
|
||||||
<select id="recommendMajorList" resultType="org.jeecg.modules.web.dto.RecommendMajorDTO">
|
<select id="recommendMajorList" resultType="org.jeecg.modules.web.dto.RecommendMajorDTO">
|
||||||
SELECT
|
SELECT
|
||||||
|
|
|
||||||
|
|
@ -64,4 +64,6 @@ public interface IYxCalculationMajorService extends IService<YxCalculationMajor>
|
||||||
List<String> groupByBatchNumber(QueryRecommendMajorVO queryRecommendMajorVO);
|
List<String> groupByBatchNumber(QueryRecommendMajorVO queryRecommendMajorVO);
|
||||||
|
|
||||||
YxCalculationMajor getCalculationById(String calculationTableName, String calculationMajorId);
|
YxCalculationMajor getCalculationById(String calculationTableName, String calculationMajorId);
|
||||||
|
|
||||||
|
boolean updateScoreId(String calculationTableName, String scoreId, String bakScoreId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -472,6 +472,11 @@ public class YxCalculationMajorServiceImpl extends ServiceImpl<YxCalculationMajo
|
||||||
return baseMapper.getCalculationById(calculationTableName, calculationMajorId);
|
return baseMapper.getCalculationById(calculationTableName, calculationMajorId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean updateScoreId(String calculationTableName, String scoreId, String bakScoreId) {
|
||||||
|
return baseMapper.updateScoreId(calculationTableName, scoreId, bakScoreId) >= 1;
|
||||||
|
}
|
||||||
|
|
||||||
private void setSchoolTagsList(List<RecommendMajorDTO> recommendMajorList) {
|
private void setSchoolTagsList(List<RecommendMajorDTO> recommendMajorList) {
|
||||||
if (CollectionUtils.isNotEmpty(recommendMajorList)) {
|
if (CollectionUtils.isNotEmpty(recommendMajorList)) {
|
||||||
Set<String> schoolIdSet = recommendMajorList.stream().map(RecommendMajorDTO::getSchoolId).collect(Collectors.toSet());
|
Set<String> schoolIdSet = recommendMajorList.stream().map(RecommendMajorDTO::getSchoolId).collect(Collectors.toSet());
|
||||||
|
|
@ -604,7 +609,7 @@ public class YxCalculationMajorServiceImpl extends ServiceImpl<YxCalculationMajo
|
||||||
recommendMajorDTO.setEnrollProbability(YxConstant.bigDecimal0);
|
recommendMajorDTO.setEnrollProbability(YxConstant.bigDecimal0);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if("5000".equals(recommendMajorDTO.getSchoolCode())){
|
if("6195".equals(recommendMajorDTO.getSchoolCode()) && "高职高专".equals(recommendMajorDTO.getBatch())){
|
||||||
System.out.println("qvq");
|
System.out.println("qvq");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue