|
|
|
@ -18,10 +18,7 @@ import org.springframework.stereotype.Service; |
|
|
|
|
import org.springframework.util.ObjectUtils; |
|
|
|
|
import org.springframework.util.StringUtils; |
|
|
|
|
|
|
|
|
|
import java.util.LinkedHashMap; |
|
|
|
|
import java.util.LinkedList; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.Map; |
|
|
|
|
import java.util.*; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @Description: TODO |
|
|
|
@ -52,6 +49,13 @@ public class CmsHomeTrainingPlanServiceImpl implements ICmsHomeTrainingPlanServi |
|
|
|
|
@Autowired |
|
|
|
|
private IPyCourseConstituteService pyCourseConstituteService; |
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
private ISysUserService iSysUserService; |
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
private ISeCourseService iSeCourseService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public Object getData4Top1() { |
|
|
|
|
|
|
|
|
@ -125,12 +129,6 @@ public class CmsHomeTrainingPlanServiceImpl implements ICmsHomeTrainingPlanServi |
|
|
|
|
return returnMap; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
private ISysUserService iSysUserService; |
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
private ISeCourseService iSeCourseService; |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public Object getData4Top2() { |
|
|
|
|
Map<String, Object> returnMap = new LinkedHashMap<>(); |
|
|
|
@ -162,6 +160,57 @@ public class CmsHomeTrainingPlanServiceImpl implements ICmsHomeTrainingPlanServi |
|
|
|
|
return returnMap; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @Title: getData4Top3 |
|
|
|
|
* @Description: 课程与毕业要求的关系矩阵 |
|
|
|
|
* @Params: [] |
|
|
|
|
* @Return: java.lang.Object |
|
|
|
|
* @Author: z.h.c |
|
|
|
|
* @Date: 2023/9/13 9:25 |
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
public Object getData4Top3() { |
|
|
|
|
|
|
|
|
|
Map<String, Object> returnMap = new LinkedHashMap<>(); |
|
|
|
|
|
|
|
|
|
PyBasicInfo basicInfo = this.getTopPyBasicInfo(); |
|
|
|
|
if (ObjectUtils.isEmpty(basicInfo)) return returnMap; |
|
|
|
|
|
|
|
|
|
String basicId = basicInfo.getBasicId(); |
|
|
|
|
|
|
|
|
|
// 查该培养方案对应的课程
|
|
|
|
|
List<PyBasicCourse> basicCourseList = pyBasicCourseService.list(new LambdaQueryWrapper<PyBasicCourse>() |
|
|
|
|
.eq(PyBasicCourse::getBasicId, basicId) |
|
|
|
|
.eq(PyBasicCourse::getStatus, "0")); |
|
|
|
|
|
|
|
|
|
List<SeCourse> seCourseList = new LinkedList<>(); |
|
|
|
|
Optional.ofNullable(basicCourseList).orElse(new LinkedList<>()).forEach(pyBasicCourse -> { |
|
|
|
|
SeCourse seCourse = iSeCourseService.getById(pyBasicCourse.getCourseId()); |
|
|
|
|
if (!ObjectUtils.isEmpty(seCourse)) { |
|
|
|
|
seCourse.setAchievement(""); |
|
|
|
|
seCourseList.add(seCourse); |
|
|
|
|
} |
|
|
|
|
returnMap.put("课程列表", seCourseList); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 查找毕业要求
|
|
|
|
|
QueryWrapper queryWrapper2 = new QueryWrapper(); |
|
|
|
|
queryWrapper2.eq("basic_id", basicId); |
|
|
|
|
queryWrapper2.ne("pid", 0); |
|
|
|
|
queryWrapper2.ne("has_child", 0); |
|
|
|
|
List<PyGraRequire> pyGraRequires = pyGraRequireService.list(queryWrapper2); |
|
|
|
|
List<PyGraRequire> pyGraRequireList = new LinkedList<>(); |
|
|
|
|
for (PyGraRequire py : pyGraRequires) { |
|
|
|
|
String str = py.getGraduateRequire(); |
|
|
|
|
py.setGraduateRequire(str.split(":")[0]); |
|
|
|
|
pyGraRequireList.add(py); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
returnMap.put("毕业要求", pyGraRequireList); |
|
|
|
|
return returnMap; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @description: 获取已置顶的培养方案 |
|
|
|
|
* @param: [] |
|
|
|
@ -174,8 +223,9 @@ public class CmsHomeTrainingPlanServiceImpl implements ICmsHomeTrainingPlanServi |
|
|
|
|
PyBasicInfo pyBasicInfo = basicInfoService.getOne(new LambdaQueryWrapper<PyBasicInfo>() |
|
|
|
|
.eq(PyBasicInfo::getStatu, "0") |
|
|
|
|
// .eq(PyBasicInfo::getBasicId, "8bb1e5211f1390cdbda8ef9d723723eb")
|
|
|
|
|
.eq(PyBasicInfo::getBasicId, "236ee773b155859e845d9568ba02297b") |
|
|
|
|
//.eq(PyBasicInfo::getStatu, 置顶标志)
|
|
|
|
|
.eq(PyBasicInfo::getBasicId, "485e2cbe976455f5683b816993799b66") |
|
|
|
|
// .eq(PyBasicInfo::getBasicId, "236ee773b155859e845d9568ba02297b")
|
|
|
|
|
// .eq(PyBasicInfo::getIsTop, "是")
|
|
|
|
|
.last("limit 1") |
|
|
|
|
); |
|
|
|
|
return pyBasicInfo; |
|
|
|
|