diff --git a/ruoyi-admin/src/main/java/com/ruoyi/cms/service/impl/HitCompetitionStudentInfoServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/cms/service/impl/HitCompetitionStudentInfoServiceImpl.java index 0111d9e..ea4f306 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/cms/service/impl/HitCompetitionStudentInfoServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/cms/service/impl/HitCompetitionStudentInfoServiceImpl.java @@ -115,9 +115,11 @@ public class HitCompetitionStudentInfoServiceImpl extends ServiceImpl selectHitCompetitionStudentInfoListExport(HitCompetitionStudentInfo hitCompetitionStudentInfo) { - Calendar calendar = Calendar.getInstance(); - int year = calendar.get(Calendar.YEAR); - hitCompetitionStudentInfo.setYear(String.valueOf(year)); + if (StringUtils.isEmpty(hitCompetitionStudentInfo.getYear())) { + Calendar calendar = Calendar.getInstance(); + int year = calendar.get(Calendar.YEAR); + hitCompetitionStudentInfo.setYear(String.valueOf(year)); + } //当前教师的学校 LoginUser loginUser = SecurityUtils.getLoginUser(); HitRegistrationTeachInfo hitRegistrationTeachInfo = hitRegistrationTeachInfoMapper.selectHitRegistrationTeachInfoByUserId(loginUser.getUserId(), hitCompetitionStudentInfo.getYear());