|
|
@ -12,11 +12,16 @@ import com.ibeetl.admin.core.annotation.Function;
|
|
|
|
import com.ibeetl.admin.core.entity.CoreUser;
|
|
|
|
import com.ibeetl.admin.core.entity.CoreUser;
|
|
|
|
import com.ibeetl.admin.core.file.FileService;
|
|
|
|
import com.ibeetl.admin.core.file.FileService;
|
|
|
|
import com.ibeetl.admin.core.web.JsonResult;
|
|
|
|
import com.ibeetl.admin.core.web.JsonResult;
|
|
|
|
|
|
|
|
import com.ibeetl.jlw.dao.CourseInfoDao;
|
|
|
|
|
|
|
|
import com.ibeetl.jlw.dao.ResourcesInfoDao;
|
|
|
|
|
|
|
|
import com.ibeetl.jlw.dao.TeacherOpenCourseMergeCourseInfoDao;
|
|
|
|
import com.ibeetl.jlw.dao.TeacherOpenCourseMergeResourcesInfoDao;
|
|
|
|
import com.ibeetl.jlw.dao.TeacherOpenCourseMergeResourcesInfoDao;
|
|
|
|
import com.ibeetl.jlw.entity.CourseInfo;
|
|
|
|
import com.ibeetl.jlw.entity.CourseInfo;
|
|
|
|
import com.ibeetl.jlw.entity.ResourcesInfo;
|
|
|
|
import com.ibeetl.jlw.entity.ResourcesInfo;
|
|
|
|
|
|
|
|
import com.ibeetl.jlw.entity.TeacherOpenCourseMergeCourseInfo;
|
|
|
|
import com.ibeetl.jlw.entity.TeacherOpenCourseMergeResourcesInfo;
|
|
|
|
import com.ibeetl.jlw.entity.TeacherOpenCourseMergeResourcesInfo;
|
|
|
|
import com.ibeetl.jlw.entity.vo.ResourcesCourseInfoAuthDetailsVO;
|
|
|
|
import com.ibeetl.jlw.entity.vo.ResourcesCourseInfoAuthDetailsVO;
|
|
|
|
|
|
|
|
import com.ibeetl.jlw.enums.AddTypeEnum;
|
|
|
|
import com.ibeetl.jlw.enums.GlobalUpStatusEnum;
|
|
|
|
import com.ibeetl.jlw.enums.GlobalUpStatusEnum;
|
|
|
|
import com.ibeetl.jlw.enums.MoveEnum;
|
|
|
|
import com.ibeetl.jlw.enums.MoveEnum;
|
|
|
|
import com.ibeetl.jlw.service.CourseInfoService;
|
|
|
|
import com.ibeetl.jlw.service.CourseInfoService;
|
|
|
@ -25,10 +30,12 @@ import com.ibeetl.jlw.service.TeacherOpenCourseMergeResourcesInfoService;
|
|
|
|
import com.ibeetl.jlw.service.UniversitiesCollegesJurisdictionCurriculumResourcesService;
|
|
|
|
import com.ibeetl.jlw.service.UniversitiesCollegesJurisdictionCurriculumResourcesService;
|
|
|
|
import com.ibeetl.jlw.web.query.ResourcesInfoQuery;
|
|
|
|
import com.ibeetl.jlw.web.query.ResourcesInfoQuery;
|
|
|
|
import com.ibeetl.jlw.web.query.TeacherOpenCourseMergeResourcesInfoQuery;
|
|
|
|
import com.ibeetl.jlw.web.query.TeacherOpenCourseMergeResourcesInfoQuery;
|
|
|
|
|
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
import org.apache.commons.logging.Log;
|
|
|
|
import org.apache.commons.logging.Log;
|
|
|
|
import org.apache.commons.logging.LogFactory;
|
|
|
|
import org.apache.commons.logging.LogFactory;
|
|
|
|
import org.beetl.sql.core.engine.PageQuery;
|
|
|
|
import org.beetl.sql.core.engine.PageQuery;
|
|
|
|
|
|
|
|
import org.beetl.sql.core.query.LambdaQuery;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
|
import org.springframework.validation.BindingResult;
|
|
|
|
import org.springframework.validation.BindingResult;
|
|
|
@ -46,6 +53,7 @@ import java.math.RoundingMode;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.Arrays;
|
|
|
|
import java.util.Arrays;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
import java.util.Objects;
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
|
|
import static cn.hutool.core.util.ArrayUtil.join;
|
|
|
|
import static cn.hutool.core.util.ArrayUtil.join;
|
|
|
@ -67,10 +75,18 @@ public class ResourcesInfoController{
|
|
|
|
private static final String MODEL = "/jlw/resourcesInfo";
|
|
|
|
private static final String MODEL = "/jlw/resourcesInfo";
|
|
|
|
private static final String API = "/api/resourcesInfo";
|
|
|
|
private static final String API = "/api/resourcesInfo";
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired private ResourcesInfoService resourcesInfoService;
|
|
|
|
@Autowired
|
|
|
|
|
|
|
|
private ResourcesInfoService resourcesInfoService;
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
|
|
|
private ResourcesInfoDao resourcesInfoDao;
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired private CourseInfoService courseInfoService;
|
|
|
|
@Autowired
|
|
|
|
@Autowired private UniversitiesCollegesJurisdictionCurriculumResourcesService universitiesCollegesJurisdictionCurriculumResourcesService;
|
|
|
|
private CourseInfoService courseInfoService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
|
|
|
private CourseInfoDao courseInfoDao;
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
|
|
|
private UniversitiesCollegesJurisdictionCurriculumResourcesService universitiesCollegesJurisdictionCurriculumResourcesService;
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
FileService fileService;
|
|
|
|
FileService fileService;
|
|
|
@ -78,6 +94,9 @@ public class ResourcesInfoController{
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
private TeacherOpenCourseMergeResourcesInfoDao teacherOpenCourseMergeResourcesInfoDao;
|
|
|
|
private TeacherOpenCourseMergeResourcesInfoDao teacherOpenCourseMergeResourcesInfoDao;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
|
|
|
private TeacherOpenCourseMergeCourseInfoDao teacherOpenCourseMergeCourseInfoDao;
|
|
|
|
|
|
|
|
|
|
|
|
/* 前端接口 */
|
|
|
|
/* 前端接口 */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -108,25 +127,140 @@ public class ResourcesInfoController{
|
|
|
|
@ResponseBody
|
|
|
|
@ResponseBody
|
|
|
|
public ModelAndView add(Long resourcesInfoId) {
|
|
|
|
public ModelAndView add(Long resourcesInfoId) {
|
|
|
|
ModelAndView view = new ModelAndView("/jlw/resourcesInfo/add.html");
|
|
|
|
ModelAndView view = new ModelAndView("/jlw/resourcesInfo/add.html");
|
|
|
|
if(null != resourcesInfoId){
|
|
|
|
// if(null != resourcesInfoId){
|
|
|
|
ResourcesInfo resourcesInfo = resourcesInfoService.queryById(resourcesInfoId);
|
|
|
|
// ResourcesInfo resourcesInfo = resourcesInfoService.queryById(resourcesInfoId);
|
|
|
|
|
|
|
|
// view.addObject("resourcesInfo", resourcesInfo);
|
|
|
|
|
|
|
|
// CourseInfo courseInfo = courseInfoService.queryById(resourcesInfo.getCourseInfoId());
|
|
|
|
|
|
|
|
// if(courseInfo != null && courseInfo.getCourseInfoParentId() != null){ //父节点不为空时 说明当前节点可能是二级节点也可能是三级节点
|
|
|
|
|
|
|
|
// CourseInfo courseInfoNew = new CourseInfo();
|
|
|
|
|
|
|
|
// courseInfoNew.setCourseInfoParentId(courseInfo.getCourseInfoId());//当前ID作为父ID去查询数据 如果存在则表示还有下级节点 否则没有则表示是三级节点
|
|
|
|
|
|
|
|
// List<CourseInfo> courseInfoList = courseInfoService.getValues(courseInfoNew);
|
|
|
|
|
|
|
|
// if(courseInfoList.size() > 0){ //二级节点
|
|
|
|
|
|
|
|
// view.addObject("courseInfoId", courseInfo.getCourseInfoParentId());
|
|
|
|
|
|
|
|
// view.addObject("twoChildNode", courseInfo.getCourseInfoId());
|
|
|
|
|
|
|
|
// view.addObject("threeChildNode", null);
|
|
|
|
|
|
|
|
// }else { //三级节点
|
|
|
|
|
|
|
|
// view.addObject("courseInfoId", courseInfoService.queryById(courseInfo.getCourseInfoParentId()).getCourseInfoParentId());
|
|
|
|
|
|
|
|
// view.addObject("twoChildNode", courseInfo.getCourseInfoParentId());
|
|
|
|
|
|
|
|
// view.addObject("threeChildNode", courseInfo.getCourseInfoId());
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }else {
|
|
|
|
|
|
|
|
// view.addObject("courseInfoId", courseInfo != null?courseInfo.getCourseInfoId():null);
|
|
|
|
|
|
|
|
// view.addObject("twoChildNode", null);
|
|
|
|
|
|
|
|
// view.addObject("threeChildNode", null);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }else {
|
|
|
|
|
|
|
|
// view.addObject("resourcesInfo", new ResourcesInfo());
|
|
|
|
|
|
|
|
// view.addObject("courseInfoId", null);
|
|
|
|
|
|
|
|
// view.addObject("twoChildNode", null);
|
|
|
|
|
|
|
|
// view.addObject("threeChildNode", null);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (ObjectUtil.isNotNull(resourcesInfoId)){
|
|
|
|
|
|
|
|
boolean b = false;
|
|
|
|
|
|
|
|
//判断是否系统授权资源
|
|
|
|
|
|
|
|
ResourcesInfo resourcesInfo = resourcesInfoDao.getSQLManager()
|
|
|
|
|
|
|
|
.lambdaQuery(ResourcesInfo.class)
|
|
|
|
|
|
|
|
.andEq(ResourcesInfo::getResourcesInfoId, resourcesInfoId)
|
|
|
|
|
|
|
|
.single();
|
|
|
|
view.addObject("resourcesInfo", resourcesInfo);
|
|
|
|
view.addObject("resourcesInfo", resourcesInfo);
|
|
|
|
CourseInfo courseInfo = courseInfoService.queryById(resourcesInfo.getCourseInfoId());
|
|
|
|
if (ObjectUtil.isNotNull(resourcesInfo)) {
|
|
|
|
if(courseInfo != null && courseInfo.getCourseInfoParentId() != null){ //父节点不为空时 说明当前节点可能是二级节点也可能是三级节点
|
|
|
|
|
|
|
|
CourseInfo courseInfoNew = new CourseInfo();
|
|
|
|
|
|
|
|
courseInfoNew.setCourseInfoParentId(courseInfo.getCourseInfoId());//当前ID作为父ID去查询数据 如果存在则表示还有下级节点 否则没有则表示是三级节点
|
|
|
|
//获取小节
|
|
|
|
List<CourseInfo> courseInfoList = courseInfoService.getValues(courseInfoNew);
|
|
|
|
CourseInfo sectionInfo = courseInfoDao.getById(resourcesInfo.getCourseInfoId());
|
|
|
|
if(courseInfoList.size() > 0){ //二级节点
|
|
|
|
|
|
|
|
view.addObject("courseInfoId", courseInfo.getCourseInfoParentId());
|
|
|
|
//判断是否系统授权课程
|
|
|
|
view.addObject("twoChildNode", courseInfo.getCourseInfoId());
|
|
|
|
if (ObjectUtil.isNull(sectionInfo)) {
|
|
|
|
view.addObject("threeChildNode", null);
|
|
|
|
TeacherOpenCourseMergeCourseInfo sectionCourseInfos = teacherOpenCourseMergeCourseInfoDao.getById(resourcesInfo.getCourseInfoId());
|
|
|
|
}else { //三级节点
|
|
|
|
if (ObjectUtil.isNotNull(sectionCourseInfos)) {
|
|
|
|
view.addObject("courseInfoId", courseInfoService.queryById(courseInfo.getCourseInfoParentId()).getCourseInfoParentId());
|
|
|
|
|
|
|
|
view.addObject("twoChildNode", courseInfo.getCourseInfoParentId());
|
|
|
|
TeacherOpenCourseMergeCourseInfo chapterCourseInfos = teacherOpenCourseMergeCourseInfoDao.getById(sectionCourseInfos.getCourseInfoParentId());
|
|
|
|
view.addObject("threeChildNode", courseInfo.getCourseInfoId());
|
|
|
|
if (ObjectUtil.isNotNull(chapterCourseInfos)) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TeacherOpenCourseMergeCourseInfo courseInfos = teacherOpenCourseMergeCourseInfoDao.getById(chapterCourseInfos.getCourseInfoParentId());
|
|
|
|
|
|
|
|
if (ObjectUtil.isNotNull(courseInfos)) {
|
|
|
|
|
|
|
|
b = true;
|
|
|
|
|
|
|
|
view.addObject("courseInfoId", courseInfos.getTeacherOpenCourseId());
|
|
|
|
|
|
|
|
view.addObject("twoChildNode", chapterCourseInfos.getTeacherOpenCourseMergeCourseInfoId());
|
|
|
|
|
|
|
|
view.addObject("threeChildNode", sectionCourseInfos.getTeacherOpenCourseMergeCourseInfoId());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
CourseInfo chapterInfo = courseInfoDao.getById(sectionInfo.getCourseInfoParentId());
|
|
|
|
|
|
|
|
if (ObjectUtil.isNotNull(chapterInfo)) {
|
|
|
|
|
|
|
|
CourseInfo courseInfo = courseInfoDao.getById(chapterInfo.getCourseInfoParentId());
|
|
|
|
|
|
|
|
if (ObjectUtil.isNotNull(courseInfo)) {
|
|
|
|
|
|
|
|
view.addObject("courseInfoId", courseInfo.getCourseInfoId());
|
|
|
|
|
|
|
|
view.addObject("twoChildNode", chapterInfo.getCourseInfoId());
|
|
|
|
|
|
|
|
view.addObject("threeChildNode", sectionInfo.getCourseInfoId());
|
|
|
|
|
|
|
|
b = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
view.addObject("courseInfoId", courseInfo != null?courseInfo.getCourseInfoId():null);
|
|
|
|
|
|
|
|
|
|
|
|
TeacherOpenCourseMergeResourcesInfo mergeResourcesInfo = teacherOpenCourseMergeResourcesInfoDao.getSQLManager()
|
|
|
|
|
|
|
|
.lambdaQuery(TeacherOpenCourseMergeResourcesInfo.class)
|
|
|
|
|
|
|
|
.andEq(TeacherOpenCourseMergeResourcesInfo::getTeacherOpenCourseMergeResourcesInfoId, resourcesInfoId)
|
|
|
|
|
|
|
|
.single();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ResourcesInfo resources = new ResourcesInfo();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (ObjectUtil.isNotNull(mergeResourcesInfo)) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
resources.setResourcesInfoId(mergeResourcesInfo.getTeacherOpenCourseMergeResourcesInfoId());
|
|
|
|
|
|
|
|
resources.setCourseInfoId(mergeResourcesInfo.getTeacherOpenCourseId());
|
|
|
|
|
|
|
|
resources.setResourcesInfoName(mergeResourcesInfo.getResourcesInfoName());
|
|
|
|
|
|
|
|
resources.setResourcesInfoType(mergeResourcesInfo.getResourcesInfoType());
|
|
|
|
|
|
|
|
resources.setResourcesInfoContent(mergeResourcesInfo.getResourcesInfoContent());
|
|
|
|
|
|
|
|
resources.setOrgId(mergeResourcesInfo.getOrgId());
|
|
|
|
|
|
|
|
resources.setUserId(mergeResourcesInfo.getUserId());
|
|
|
|
|
|
|
|
resources.setOrderIndex(mergeResourcesInfo.getOrderIndex());
|
|
|
|
|
|
|
|
resources.setAddType(FACULTY_ADD);
|
|
|
|
|
|
|
|
resources.setAddTime(mergeResourcesInfo.getAddTime());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TeacherOpenCourseMergeCourseInfo sectionCourseInfos = teacherOpenCourseMergeCourseInfoDao.getById(mergeResourcesInfo.getTeacherOpenCourseMergeCourseInfoId());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//判断是否系统授权课程
|
|
|
|
|
|
|
|
if (ObjectUtil.isNull(sectionCourseInfos)) {
|
|
|
|
|
|
|
|
//获取小节
|
|
|
|
|
|
|
|
CourseInfo sectionInfo = courseInfoDao.getById(mergeResourcesInfo.getTeacherOpenCourseMergeCourseInfoId());
|
|
|
|
|
|
|
|
if (ObjectUtil.isNotNull(sectionInfo)) {
|
|
|
|
|
|
|
|
//获取章节
|
|
|
|
|
|
|
|
CourseInfo chapterInfo = courseInfoDao.getById(sectionInfo.getCourseInfoParentId());
|
|
|
|
|
|
|
|
if (ObjectUtil.isNotNull(chapterInfo)) {
|
|
|
|
|
|
|
|
CourseInfo courseInfo = courseInfoDao.getById(chapterInfo.getCourseInfoParentId());
|
|
|
|
|
|
|
|
if (ObjectUtil.isNotNull(courseInfo)) {
|
|
|
|
|
|
|
|
view.addObject("courseInfoId", courseInfo.getCourseInfoId());
|
|
|
|
|
|
|
|
view.addObject("twoChildNode", chapterInfo.getCourseInfoId());
|
|
|
|
|
|
|
|
view.addObject("threeChildNode", sectionInfo.getCourseInfoId());
|
|
|
|
|
|
|
|
b = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TeacherOpenCourseMergeCourseInfo chapterCourseInfos = teacherOpenCourseMergeCourseInfoDao.getById(sectionCourseInfos.getCourseInfoParentId());
|
|
|
|
|
|
|
|
if (ObjectUtil.isNotNull(chapterCourseInfos)) {
|
|
|
|
|
|
|
|
TeacherOpenCourseMergeCourseInfo courseInfos = teacherOpenCourseMergeCourseInfoDao.getById(chapterCourseInfos.getCourseInfoParentId());
|
|
|
|
|
|
|
|
if (ObjectUtil.isNotNull(courseInfos)) {
|
|
|
|
|
|
|
|
view.addObject("courseInfoId", courseInfos.getTeacherOpenCourseId());
|
|
|
|
|
|
|
|
view.addObject("twoChildNode", chapterCourseInfos.getTeacherOpenCourseMergeCourseInfoId());
|
|
|
|
|
|
|
|
view.addObject("threeChildNode", sectionCourseInfos.getTeacherOpenCourseMergeCourseInfoId());
|
|
|
|
|
|
|
|
b = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
view.addObject("resourcesInfo", resources);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!b) {
|
|
|
|
|
|
|
|
view.addObject("courseInfoId", null);
|
|
|
|
view.addObject("twoChildNode", null);
|
|
|
|
view.addObject("twoChildNode", null);
|
|
|
|
view.addObject("threeChildNode", null);
|
|
|
|
view.addObject("threeChildNode", null);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -136,6 +270,9 @@ public class ResourcesInfoController{
|
|
|
|
view.addObject("twoChildNode", null);
|
|
|
|
view.addObject("twoChildNode", null);
|
|
|
|
view.addObject("threeChildNode", null);
|
|
|
|
view.addObject("threeChildNode", null);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return view;
|
|
|
|
return view;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -182,21 +319,7 @@ public class ResourcesInfoController{
|
|
|
|
@ResponseBody
|
|
|
|
@ResponseBody
|
|
|
|
public JsonResult<PageQuery> getCurriculumResourceManagementList(ResourcesInfoQuery condition, @SCoreUser CoreUser coreUser) {
|
|
|
|
public JsonResult<PageQuery> getCurriculumResourceManagementList(ResourcesInfoQuery condition, @SCoreUser CoreUser coreUser) {
|
|
|
|
PageQuery page = condition.getPageQuery();
|
|
|
|
PageQuery page = condition.getPageQuery();
|
|
|
|
|
|
|
|
condition.setOrgId(coreUser.isAdmin() ? null : coreUser.getOrgId());
|
|
|
|
if (coreUser.isUniAdmin()) {
|
|
|
|
|
|
|
|
condition.setOrgIdPlural(join(Arrays.asList(coreUser.getOrgId(), 1L).toArray(), ","));
|
|
|
|
|
|
|
|
// 查询已经授权的课程ID。
|
|
|
|
|
|
|
|
// 理论课程:授权表universities_colleges_jurisdiction_curriculum_resources,查询理论课程授权给院校的数据
|
|
|
|
|
|
|
|
Serializable courseInfoIds = defaultIfNull(condition.getCourseInfoId(), condition.getCourseInfoIds());
|
|
|
|
|
|
|
|
ResourcesCourseInfoAuthDetailsVO resourcesCourseInfoAuthDetails =
|
|
|
|
|
|
|
|
universitiesCollegesJurisdictionCurriculumResourcesService.getResourcesCourseInfoAuthDetails(coreUser.getOrgId());
|
|
|
|
|
|
|
|
Serializable ifNullCourseInfoIds = defaultIfNull(courseInfoIds, listJoin(resourcesCourseInfoAuthDetails.getTheoryCourseList(), CourseInfo::getCourseInfoId));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String ids = Arrays.stream(ifNullCourseInfoIds.toString().split(",")).map(item -> "_" + item + "_").collect(Collectors.joining("|"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 如果为空字符串,那么代表这个学校,还没有授权的课程,所以是不会显示任何东西的。
|
|
|
|
|
|
|
|
condition.setCourseInfoIds(StrUtil.blankToDefault(ids, "未授权应用"));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
resourcesInfoService.getCurriculumResourceManagementList(page);
|
|
|
|
resourcesInfoService.getCurriculumResourceManagementList(page);
|
|
|
|
return JsonResult.success(page);
|
|
|
|
return JsonResult.success(page);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -213,7 +336,8 @@ public class ResourcesInfoController{
|
|
|
|
} catch (Exception e) {
|
|
|
|
} catch (Exception e) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
resourcesInfoList.add(JSONObject.parseObject(resourcesInfoJson, ResourcesInfo.class));
|
|
|
|
resourcesInfoList.add(JSONObject.parseObject(resourcesInfoJson, ResourcesInfo.class));
|
|
|
|
} catch (Exception e1) {}
|
|
|
|
} catch (Exception e1) {
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
ToolUtils.deleteNullList(resourcesInfoList);
|
|
|
|
ToolUtils.deleteNullList(resourcesInfoList);
|
|
|
|
if (null != resourcesInfoList && resourcesInfoList.size() > 0) {
|
|
|
|
if (null != resourcesInfoList && resourcesInfoList.size() > 0) {
|
|
|
@ -366,7 +490,6 @@ public class ResourcesInfoController{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping(MODEL + "/delete.json")
|
|
|
|
@PostMapping(MODEL + "/delete.json")
|
|
|
|
@Function("resourcesInfo.delete")
|
|
|
|
@Function("resourcesInfo.delete")
|
|
|
|
@ResponseBody
|
|
|
|
@ResponseBody
|
|
|
@ -413,10 +536,10 @@ public class ResourcesInfoController{
|
|
|
|
* 只传左元素,表示:拖动元素 在 左元素的左侧;
|
|
|
|
* 只传左元素,表示:拖动元素 在 左元素的左侧;
|
|
|
|
* 只传右元素,表示:拖动元素 在 右元素的右侧;
|
|
|
|
* 只传右元素,表示:拖动元素 在 右元素的右侧;
|
|
|
|
* 左右元素都传,则拖动元素放置在两个元素的中间。
|
|
|
|
* 左右元素都传,则拖动元素放置在两个元素的中间。
|
|
|
|
*
|
|
|
|
* <p>
|
|
|
|
* 左侧(上) ==> 右侧(下)
|
|
|
|
* 左侧(上) ==> 右侧(下)
|
|
|
|
* 小数值 ==> 大数值
|
|
|
|
* 小数值 ==> 大数值
|
|
|
|
*
|
|
|
|
* <p>
|
|
|
|
* 数值越小,越靠前
|
|
|
|
* 数值越小,越靠前
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param id 拖动元素的ID
|
|
|
|
* @param id 拖动元素的ID
|
|
|
|