This commit is contained in:
zhouwentao 2025-06-02 21:54:16 +08:00
parent 87a68e6d2e
commit 4a435a1efb
3 changed files with 45 additions and 10 deletions

View File

@ -29,6 +29,7 @@ import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jetbrains.annotations.NotNull;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -117,7 +118,7 @@ public class YxHistoryMajorEnrollController extends JeecgController<YxHistoryMaj
@ApiOperation(value = "历年录取数据表-编辑", notes = "历年录取数据表-编辑")
@RequiresPermissions("yx:yx_history_major_enroll:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
public Result<String> edit(@RequestBody YxHistoryMajorEnroll yxHistoryMajorEnroll) {
public Result<String> edit(@NotNull @RequestBody YxHistoryMajorEnroll yxHistoryMajorEnroll) {
String id = yxHistoryMajorEnroll.getId();
String majorCode = yxHistoryMajorEnroll.getMajorCode();
@ -210,6 +211,34 @@ public class YxHistoryMajorEnrollController extends JeecgController<YxHistoryMaj
return Result.OK("操作成功");
}
@ApiOperation(value = "更新25年专业")
@PostMapping(value = "/insertNewMajorList")
public Result<?> insertNewMajorList() {
LambdaQueryWrapper<YxHistoryMajorEnroll> helqw = new LambdaQueryWrapper<>();
helqw.eq(YxHistoryMajorEnroll::getYear,"2024");
helqw.eq(YxHistoryMajorEnroll::getMajorType,"美术与设计类");
List<YxHistoryMajorEnroll> list = yxHistoryMajorEnrollService.list(helqw);
YxSchoolMajor yxSchoolMajor = null;
for (YxHistoryMajorEnroll yxHistoryMajorEnroll : list) {
yxSchoolMajor = new YxSchoolMajor();
yxSchoolMajor.setSchoolCode(yxHistoryMajorEnroll.getSchoolCode());
yxSchoolMajor.setMajorCode(yxHistoryMajorEnroll.getMajorCode());
yxSchoolMajor.setBatch(yxHistoryMajorEnroll.getBatch());
yxSchoolMajor.setEnrollmentCode(yxHistoryMajorEnroll.getEnrollmentCode());
yxSchoolMajor.setMajorName(yxHistoryMajorEnroll.getMajorName());
yxSchoolMajor.setMajorType(yxHistoryMajorEnroll.getMajorType());
yxSchoolMajor.setMajorType(yxHistoryMajorEnroll.getMajorType());
yxSchoolMajor.setMajorTypeChild(yxHistoryMajorEnroll.getMajorTypeChild());
yxSchoolMajor.setTuition(yxHistoryMajorEnroll.getTuition());
//
yxSchoolMajor.setMainSubjects(yxHistoryMajorEnroll.getMainSubjects());
yxSchoolMajor.setCategory(yxHistoryMajorEnroll.getCategory());
}
// yxHistoryMajorEnrollService.renewControlLine(id);
return Result.OK("操作成功");
}
/**
* 通过id查询
*

View File

@ -129,13 +129,18 @@ public class MusicService {
if(majorTypeChild.contains("音乐表演")){
majorChild_mainSubjects="音乐表演";
if(StringUtils.isNotBlank(userProfessionalCategoryChildren) && userProfessionalCategoryChildren.contains("声乐")){
majorChild_mainSubjects+="声乐";
}else if(StringUtils.isNotBlank(userProfessionalCategoryChildren) && userProfessionalCategoryChildren.contains("器乐")){
majorChild_mainSubjects+="器乐";
}
}else if(majorTypeChild.contains("音乐教育")){
majorChild_mainSubjects="音乐教育";
}
if(StringUtils.isNotBlank(userProfessionalCategoryChildren) && userProfessionalCategoryChildren.contains("声乐")){
majorChild_mainSubjects+="声乐";
}else if(StringUtils.isNotBlank(userProfessionalCategoryChildren) && userProfessionalCategoryChildren.contains("器乐")){
majorChild_mainSubjects+="器乐";
if("浙江师范大学".equals(recommendMajorDTO.getSchoolName()) && "音乐学(师范)".equals( recommendMajorDTO.getMajorName())){
System.out.println("qvq");
}
batchControlLineKey = recommendMajorDTO.getCategory()+"-" +
@ -151,6 +156,8 @@ public class MusicService {
if (StringUtils.isBlank(rulesEnrollProbability)) {
continue;
}
//取出往年的分数信息, 算出 三年平均差值
historyMajorEnrollList = recommendMajorDTO.getHistoryMajorEnrollList().stream().filter(h -> YxConstant.cankaoYearList.contains(h.getYear())).collect(Collectors.toList());

View File

@ -66,12 +66,11 @@ public class YxCalculationMajorServiceImpl extends ServiceImpl<YxCalculationMajo
recommendMajorDTOList = yxSchoolMajorMapper.recommendMajorList(queryRecommendMajorVO); // 获取到当前专业/理科的数据
//将历史录取信息合并到专业信息里
if (CollectionUtils.isNotEmpty(recommendMajorDTOList)) {
// 如果是非美术类只要24年数据
if (!"美术与设计类".equals(userScore.getProfessionalCategory())) {
yxHistoryMajorEnrollService.recommendMajorDTOListSetHistoryInfo(recommendMajorDTOList, Collections.singletonList("2024"));
}else{
//
yxHistoryMajorEnrollService.recommendMajorDTOListSetHistoryInfo(recommendMajorDTOList, Collections.singletonList("2024"));
/*if (!"美术与设计类".equals(userScore.getProfessionalCategory())) {}else{
yxHistoryMajorEnrollService.recommendMajorDTOListSetHistoryInfo(recommendMajorDTOList, ScoreUtil.getCalOldYears());
}
}*/
this.checkEnrollProbability(recommendMajorDTOList, userScore);
}
long endTime = new Date().getTime();