From 1bce00f5b3614ca12b683dfe8a3cf733e1ed68b6 Mon Sep 17 00:00:00 2001 From: EricsHu <hrr145632> Date: 星期五, 26 五月 2023 16:25:22 +0800 Subject: [PATCH] 11 --- src/main/java/com/qxueyou/scc/school/service/impl/CoursewareService.java | 120 ++++++++++++++++++++++++++++++------------------------------ 1 files changed, 60 insertions(+), 60 deletions(-) diff --git a/src/main/java/com/qxueyou/scc/school/service/impl/CoursewareService.java b/src/main/java/com/qxueyou/scc/school/service/impl/CoursewareService.java index ab511b2..4b3ef1b 100644 --- a/src/main/java/com/qxueyou/scc/school/service/impl/CoursewareService.java +++ b/src/main/java/com/qxueyou/scc/school/service/impl/CoursewareService.java @@ -38,7 +38,7 @@ import com.qxueyou.scc.teach.subject.model.SubjectChapter; /** - * 课件管理 + * 璇句欢绠$悊 * * @author lihanqi * @@ -66,7 +66,7 @@ IOrgTextService orgTextService; /** - * 新增章节 + * 鏂板绔犺妭 * * @param name * @param parentChapterId @@ -74,7 +74,7 @@ */ public Result addOrUpdateChapter(String chapterId, String subjectId, String name, String parentChapterId){ if(StringUtils.isEmpty(subjectId) || StringUtils.isEmpty(name)){ - return new Result(false, "参数错误"); + return new Result(false, "鍙傛暟閿欒"); } SubjectChapter objSchChapter = null; if(StringUtils.isEmpty(chapterId)){ @@ -99,17 +99,17 @@ } /** - * 删除章节 + * 鍒犻櫎绔犺妭 * * @param chapterId * @return */ public Result deleteChapter(String[] chapterIds){ if(chapterIds.length == 0){ - return new Result(false, "参数错误"); + return new Result(false, "鍙傛暟閿欒"); } int iCount = 0; - for(String chapterId : chapterIds){//级联删除课件 + for(String chapterId : chapterIds){//绾ц仈鍒犻櫎璇句欢 SubjectChapter chapter = this.read(SubjectChapter.class, chapterId); if(chapter != null && StringUtils.isEmpty(chapter.getParentChapterId())){ iCount += this.findCount("from SchCourseware where chapterId = ? and cType = ?", CollectionUtils.newList(chapterId, 6)); @@ -121,13 +121,13 @@ } /** - * 拷贝课件 + * 鎷疯礉璇句欢 * - * @param type 课件类型 - * @param id 主键 - * @param subjectId 课程 - * @param collegeCourseId 科目 - * @param chapterId 章节 + * @param type 璇句欢绫诲瀷 + * @param id 涓婚敭 + * @param subjectId 璇剧▼ + * @param collegeCourseId 绉戠洰 + * @param chapterId 绔犺妭 * @return */ public Result doCopyCourseware(String type, String id, String subjectId, String collegeCourseId, String chapterId){ @@ -176,13 +176,13 @@ } /** - * 移动课件 + * 绉诲姩璇句欢 * - * @param type 课件类型 - * @param id 主键 - * @param subjectId 课程 - * @param collegeCourseId 科目 - * @param chapterId 章节 + * @param type 璇句欢绫诲瀷 + * @param id 涓婚敭 + * @param subjectId 璇剧▼ + * @param collegeCourseId 绉戠洰 + * @param chapterId 绔犺妭 * @return */ public Result doMoveCourseware(String type, String id, String subjectId, String collegeCourseId, String chapterId){ @@ -251,7 +251,7 @@ } /** - * 删除课件 + * 鍒犻櫎璇句欢 * * @param types * @param ids @@ -290,7 +290,7 @@ } /** - * 下发课件 + * 涓嬪彂璇句欢 * * @param types * @param ids @@ -310,7 +310,7 @@ } /** - * 下发课件到子机构 + * 涓嬪彂璇句欢鍒板瓙鏈烘瀯 * * @param id * @param sourceOrgId @@ -323,7 +323,7 @@ CollectionUtils.newList(id, sourceOrgId), SchCourseware.class); if(courseware == null){ - return new Result(false, "原课件不存在"); + return new Result(false, "鍘熻浠朵笉瀛樺湪"); } SchCourseware newCourseware = new SchCourseware(); try { @@ -335,14 +335,14 @@ this.save(newCourseware); } catch (Exception e) { - log.error("机构下发课件报错:课件id:"+id+",子机构id:"+targetOrgId, e); + log.error("鏈烘瀯涓嬪彂璇句欢鎶ラ敊锛氳浠秈d锛�"+id+",瀛愭満鏋刬d锛�"+targetOrgId, e); } return new Result(true); } /** - * 撤回 + * 鎾ゅ洖 * * @param id * @param orgId @@ -361,7 +361,7 @@ } /** - * 查询已下发的班级 + * 鏌ヨ宸蹭笅鍙戠殑鐝骇 * * @param types * @param ids @@ -409,7 +409,7 @@ } /** - * 课件分类 + * 璇句欢鍒嗙被 * * @param types * @param ids @@ -442,27 +442,27 @@ } /** - * 课件树排序 + * 璇句欢鏍戞帓搴� * - * @param ids[] 排序的id - * @param type 排序类型 - * @param parentId 父节点id + * @param ids[] 鎺掑簭鐨刬d + * @param type 鎺掑簭绫诲瀷 + * @param parentId 鐖惰妭鐐筰d * @return */ public Result doOrder(String[] ids, String type, String parentId){ for(int i=0;i<ids.length;i++){ int index = ids.length - i; - if("courseCategory".equals(type)){//科目类别 + if("courseCategory".equals(type)){//绉戠洰绫诲埆 this.bulkUpdate("update OrgCategoryLevel set orderNum = ? where categoryLevelId = ?", new Object[]{index, ids[i]}); - }else if("course".equals(type)){//科目 + }else if("course".equals(type)){//绉戠洰 this.bulkUpdate("update OrgCollegeCourse set orderNum = ? where collegeCourseId = ? and courseCategoryId = ?", new Object[]{index, ids[i], parentId}); - }else if("subject".equals(type)){//课程 + }else if("subject".equals(type)){//璇剧▼ this.bulkUpdate("update SchSubject set orderNum = ? where subjectId = ? ", new Object[]{index, ids[i]}); - }else if("chapter".equals(type)){//章 + }else if("chapter".equals(type)){//绔� this.bulkUpdate("update SchChapter set orderNum = ? where chapterId = ? and subjectId = ?", new Object[]{index, ids[i], parentId}); - }else if("section".equals(type)){//节 + }else if("section".equals(type)){//鑺� this.bulkUpdate("update SchChapter set orderNum = ? where chapterId = ? and parentChapterId = ?", new Object[]{index, ids[i], parentId}); - }else if("classSubject".equals(type)){//班级课程 + }else if("classSubject".equals(type)){//鐝骇璇剧▼ this.bulkUpdate("update SchClassSubject set orderNum = ? where classSubjectId = ? ", new Object[]{index, ids[i]}); } } @@ -470,10 +470,10 @@ return new Result(true); } - /*****************************************************班主任课件管理**************************************************************************************************/ + /*****************************************************鐝富浠昏浠剁鐞�**************************************************************************************************/ /** - * 删除课件 + * 鍒犻櫎璇句欢 * * @param types * @param ids @@ -495,13 +495,13 @@ } /** - * 拷贝课件 + * 鎷疯礉璇句欢 * - * @param type 课件类型 - * @param id 主键 - * @param subjectId 课程 - * @param collegeCourseId 科目 - * @param chapterId 章节 + * @param type 璇句欢绫诲瀷 + * @param id 涓婚敭 + * @param subjectId 璇剧▼ + * @param collegeCourseId 绉戠洰 + * @param chapterId 绔犺妭 * @return */ public Result doCopyClassCourseware(String type, String id, String subjectId, String chapterId){ @@ -547,7 +547,7 @@ } /** - * 发布和停用 + * 鍙戝竷鍜屽仠鐢� * * @param types * @param ids @@ -592,11 +592,11 @@ } /** - * 删除课程和章节级联删除课件 + * 鍒犻櫎璇剧▼鍜岀珷鑺傜骇鑱斿垹闄よ浠� * - * @param subjectId 机构课程id - * @param chapterId 章节id - * @param classSubjectId 班级课程id + * @param subjectId 鏈烘瀯璇剧▼id + * @param chapterId 绔犺妭id + * @param classSubjectId 鐝骇璇剧▼id * @return */ public Result deleteCourseWare(String subjectId, String chapterId){ @@ -606,7 +606,7 @@ if(StringUtils.isNotEmpty(chapter.getParentChapterId())){ newChapterId = chapter.getParentChapterId(); }else{ - //删除章节练习 + //鍒犻櫎绔犺妭缁冧範 this.bulkUpdate("update ExerciseGroup set deleteFlag = ? where chapterId = ? and type = ?", new Object[]{true, chapterId, ExerciseGroup.TYPE_CHAPTER_ITEM}); this.bulkUpdate("update SchCourseware set deleteFlag = ? where chapterId = ? and cType = ?", new Object[]{true, chapterId, 6}); } @@ -626,7 +626,7 @@ this.bulkUpdate("update SchCourseware set subjectId = null where subjectId = ?", new Object[]{subjectId}); - //删除章节练习 + //鍒犻櫎绔犺妭缁冧範 this.bulkUpdate("update ExerciseGroup set deleteFlag = ? where subjectId = ? and type = ?", new Object[]{true, subjectId, ExerciseGroup.TYPE_CHAPTER_ITEM}); this.bulkUpdate("update SchCourseware set deleteFlag = ? where subjectId = ? and cType = ?", new Object[]{true, subjectId, 6}); } @@ -634,7 +634,7 @@ } /** - * 同步更新课件课程名称 + * 鍚屾鏇存柊璇句欢璇剧▼鍚嶇О * * @param subjectId * @param subjectName @@ -650,7 +650,7 @@ } /** - * 设置学分 + * 璁剧疆瀛﹀垎 */ public Result updateCoursewareScore(String id, int score) { if(StringUtils.isNotEmpty(id)){ @@ -661,16 +661,16 @@ /** - * 查询课件 + * 鏌ヨ璇句欢 */ public List<Map<String, Object>> queryCourseware(String id, String type) { if(type.equals("category")) { List<Map<String, Object>> items=new ArrayList<Map<String, Object>>(); - //查询项目列表 + //鏌ヨ椤圭洰鍒楄〃 String hql1="select collegeCourseId as id from OrgCollegeCourse where courseCategoryId=? and deleteFlag is false "; List<String> courseList =find(hql1, CollectionUtils.newList(id),String.class); - //查询机构课程 + //鏌ヨ鏈烘瀯璇剧▼ for (String courseId : courseList) { List<Map<String, Object>> result = queryCoursewareByCourseId(courseId); items.addAll(result); @@ -688,7 +688,7 @@ /** - * 根据项目id查询所有机构课程的课件 + * 鏍规嵁椤圭洰id鏌ヨ鎵�鏈夋満鏋勮绋嬬殑璇句欢 * @param id * @return */ @@ -706,7 +706,7 @@ } /** - * 根据项目id查询课件 + * 鏍规嵁椤圭洰id鏌ヨ璇句欢 * @param courseId * @return */ @@ -757,7 +757,7 @@ /** - * 获取排序 + * 鑾峰彇鎺掑簭 * * @param isOrg * @param subjectId @@ -767,7 +767,7 @@ @Override public Map<String, Integer> getOrder(boolean isOrg, String subjectId, String chapterId){ Map<String, Integer> result = new HashMap<>(); - //同步排序 + //鍚屾鎺掑簭 int subjectOrder = 0; int chapterOrder = 0; int partOrder = 0; -- Gitblit v1.8.0