教师端首页

beetlsql3-dev
Mlxa0324 2 years ago
parent 3090abc8cc
commit 00ecf5f4aa

@ -186,8 +186,8 @@ public class ResourcesApplicationService extends CoreBaseService<ResourcesApplic
// 1子应用系统 // 1子应用系统
.andEq(UniversitiesCollegesJurisdictionExperimentalSystem::getType, 1) .andEq(UniversitiesCollegesJurisdictionExperimentalSystem::getType, 1)
.andEq(UniversitiesCollegesJurisdictionExperimentalSystem::getUniversitiesCollegesId, universitiesCollegesId) .andEq(UniversitiesCollegesJurisdictionExperimentalSystem::getUniversitiesCollegesId, universitiesCollegesId)
.andGreatEq(UniversitiesCollegesJurisdictionExperimentalSystem::getUseStartTime, dateTime) .andLessEq(UniversitiesCollegesJurisdictionExperimentalSystem::getUseStartTime, dateTime)
.andLess(UniversitiesCollegesJurisdictionExperimentalSystem::getUseEndTime, dateTime) .andGreat(UniversitiesCollegesJurisdictionExperimentalSystem::getUseEndTime, dateTime)
.select(); .select();
// 获取关联的应用ID集合 // 获取关联的应用ID集合

@ -1,5 +1,6 @@
package com.ibeetl.jlw.service.api.teacher; package com.ibeetl.jlw.service.api.teacher;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.lang.Assert; import cn.hutool.core.lang.Assert;
import com.ibeetl.jlw.dao.TeacherMergeApplicationDao; import com.ibeetl.jlw.dao.TeacherMergeApplicationDao;
import com.ibeetl.jlw.entity.*; import com.ibeetl.jlw.entity.*;
@ -7,9 +8,10 @@ import com.ibeetl.jlw.entity.api.CurrentUserInfo;
import com.ibeetl.jlw.entity.api.teacher.TeacherIndexData; import com.ibeetl.jlw.entity.api.teacher.TeacherIndexData;
import com.ibeetl.jlw.service.*; import com.ibeetl.jlw.service.*;
import com.ibeetl.jlw.service.api.ApiIndexBaseService; import com.ibeetl.jlw.service.api.ApiIndexBaseService;
import com.ibeetl.jlw.web.query.TeacherMergeApplicationQuery; import com.ibeetl.jlw.web.query.ResourcesApplicationQuery;
import com.ibeetl.jlw.web.query.TeacherOpenCourseMergeTeacherQuery; import com.ibeetl.jlw.web.query.TeacherOpenCourseMergeTeacherQuery;
import com.ibeetl.jlw.web.query.TeacherOpenCourseNoticeQuery; import com.ibeetl.jlw.web.query.TeacherOpenCourseNoticeQuery;
import org.beetl.sql.core.engine.PageQuery;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -56,21 +58,18 @@ public class ApiTeacherService {
// 教师ID // 教师ID
final Long teacherId = ((Teacher) identityInfo).getTeacherId(); final Long teacherId = ((Teacher) identityInfo).getTeacherId();
TeacherExtendSchoolInfo teacherExtendSchoolInfo = teacherService.getTeacherExtendSchoolInfo(teacherId.toString());
// 我的通知 // 我的通知
TeacherOpenCourseNoticeQuery teacherOpenCourseNoticeQuery = new TeacherOpenCourseNoticeQuery(); TeacherOpenCourseNoticeQuery teacherOpenCourseNoticeQuery = new TeacherOpenCourseNoticeQuery();
teacherOpenCourseNoticeQuery.setCreateByTeacherId(teacherId); teacherOpenCourseNoticeQuery.setCreateByTeacherId(teacherId);
List<TeacherOpenCourseNotice> noticeList = teacherOpenCourseNoticeService.getValues(teacherOpenCourseNoticeQuery); List<TeacherOpenCourseNotice> noticeList = teacherOpenCourseNoticeService.getValues(teacherOpenCourseNoticeQuery);
// 教师应用信息
TeacherMergeApplicationQuery teacherMergeApplicationQuery = new TeacherMergeApplicationQuery();
teacherMergeApplicationQuery.setTeacherId(teacherId);
List<TeacherMergeApplication> applicationList = teacherMergeApplicationDao.getValuesByQueryOrderByIndex(teacherMergeApplicationQuery);
// 我的应用由来:教师所在的院校,查询关联到的应用 // 我的应用由来:教师所在的院校,查询关联到的应用
List<ResourcesApplication> resourcesApplicationList = resourcesApplicationService ResourcesApplicationQuery resourcesApplicationQuery = new ResourcesApplicationQuery();
.getResourcesApplicationListByUniversitiesCollegesId(teacherExtendSchoolInfo.getUniversitiesCollegesId()); PageQuery pageQuery = resourcesApplicationQuery.getPageQuery();
resourcesApplicationQuery.setTeacherId(teacherId);
PageQuery<ResourcesApplication> resourcesApplicationPageQuery = resourcesApplicationService.queryMyApplicationByConditionQuery(pageQuery);
List<ResourcesApplication> resourcesApplications = CollectionUtil.emptyIfNull(resourcesApplicationPageQuery.getList());
// 我的开课信息 // 我的开课信息
TeacherOpenCourseMergeTeacherQuery teacherOpenCourseMergeTeacherQuery = new TeacherOpenCourseMergeTeacherQuery(); TeacherOpenCourseMergeTeacherQuery teacherOpenCourseMergeTeacherQuery = new TeacherOpenCourseMergeTeacherQuery();
@ -85,7 +84,7 @@ public class ApiTeacherService {
return TeacherIndexData.builder() return TeacherIndexData.builder()
.toDoList(reportList) .toDoList(reportList)
.noticeList(noticeList) .noticeList(noticeList)
.myApplicationList(resourcesApplicationList) .myApplicationList(resourcesApplications)
.myOpenCourseList(openCourseList) .myOpenCourseList(openCourseList)
.build(); .build();
} }

Loading…
Cancel
Save