Forráskód Böngészése

Merge branch 'saas' of http://git.dayaedu.com/yonge/mec into zx_saas_0906

# Conflicts:
#	mec-biz/src/main/java/com/ym/mec/biz/dal/wrapper/StudentWrapper.java
zouxuan 6 hónapja
szülő
commit
f7c507ca9d
17 módosított fájl, 291 hozzáadás és 25 törlés
  1. 10 0
      cms/src/main/java/com/ym/mec/cms/dal/dao/SysUserDao.java
  2. 133 0
      cms/src/main/java/com/ym/mec/cms/dal/entity/Teacher.java
  3. 26 3
      cms/src/main/java/com/ym/mec/cms/service/impl/SysNewsTypeServiceImpl.java
  4. 43 0
      cms/src/main/resources/config/mybatis/SysUserMapper.xml
  5. 16 1
      mec-application/src/main/java/com/ym/mec/teacher/controller/LessonCoursewareController.java
  6. 19 0
      mec-application/src/main/java/com/ym/mec/teacher/controller/SysMusicScoreController.java
  7. 1 1
      mec-application/src/main/java/com/ym/mec/teacher/controller/TeacherCourseScheduleController.java
  8. 6 6
      mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/service/impl/CbsQrCodeScanServiceImpl.java
  9. 2 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/SysMusicScoreAccompanimentDao.java
  10. 10 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/Teacher.java
  11. 0 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/wrapper/StudentWrapper.java
  12. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/service/SysMusicScoreAccompanimentService.java
  13. 7 5
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentCourseHomeworkServiceImpl.java
  14. 2 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/SysMusicScoreAccompanimentServiceImpl.java
  15. 1 3
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/SysMusicScoreServiceImpl.java
  16. 9 0
      mec-biz/src/main/resources/config/mybatis/SysMusicScoreAccompanimentMapper.xml
  17. 5 1
      mec-biz/src/main/resources/config/mybatis/TeacherMapper.xml

+ 10 - 0
cms/src/main/java/com/ym/mec/cms/dal/dao/SysUserDao.java

@@ -0,0 +1,10 @@
+package com.ym.mec.cms.dal.dao;
+
+import com.ym.mec.cms.dal.entity.Teacher;
+import org.apache.ibatis.annotations.Param;
+
+public interface SysUserDao {
+
+
+    Teacher getTeacherById(@Param("userId") Integer userId);
+}

+ 133 - 0
cms/src/main/java/com/ym/mec/cms/dal/entity/Teacher.java

@@ -0,0 +1,133 @@
+package com.ym.mec.cms.dal.entity;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 对应数据库表(teacher):
+ */
+@Data
+public class Teacher {
+
+	private Integer id;
+
+	/** 职务类型(指导老师、教务老师、教学主管) */
+	@ApiModelProperty(value = "职务类型(指导老师 ADVISER、教务老师 ACADEMIC、教学主管 TEACHING)", required = false)
+	private String jobType;
+
+	/** 工作性质(兼职、全职) */
+	@ApiModelProperty(value = "工作性质(兼职 PART_JOB、全职FULL_JOB)", required = false)
+	private String jobNature;
+
+	/** 是否试用期 */
+	@ApiModelProperty(value = "是否试用期1是,0否", required = false)
+	private String isProbationPeriod;
+
+	/** 学历 */
+	@ApiModelProperty(value = "学历", required = false)
+	private String educationBackground;
+
+	/** 毕业学校 */
+	@ApiModelProperty(value = "毕业学校", required = false)
+	private String graduateSchool;
+
+	/** 技术职称 */
+	@ApiModelProperty(value = "技术职称", required = false)
+	private String technicalTitles;
+
+
+	/** 所属分部名称 */
+	@ApiModelProperty(value = "教师所属分部编号", required = false)
+	private Integer teacherOrganId;
+
+	/** 工作单位 */
+	@ApiModelProperty(value = "工作单位", required = false)
+	private String workUnit;
+
+	/** 专业技能(支持多个,用|分隔),对应科目表编号 */
+	@ApiModelProperty(value = "专业技能(支持多个,用逗号分隔),对应科目表编号", required = false)
+	private String subjectId;
+
+	/** 入职时间 */
+	@ApiModelProperty(value = "入职时间", required = false)
+	private Date entryDate;
+
+	/** 证件类型 */
+	@ApiModelProperty(value = "证件类型", required = false)
+	private String certificateType;
+
+	/** 证件号码 */
+	@ApiModelProperty(value = "证件号码", required = false)
+	private String certificateNum;
+
+	/** 流动范围(多个用|分开) */
+	@ApiModelProperty(value = "流动范围(多个用逗号分开)", required = false)
+	private String flowOrganRange;
+
+	/** 流动范围(多个用|分开) */
+	@ApiModelProperty(value = "流动范围编号", required = false)
+	private String flowOrganRangeId;
+
+	@ApiModelProperty(value = "老师介绍", required = false)
+	private String introduction;
+
+	@ApiModelProperty(value = "VIP课数量", required = false)
+	private Integer vipNum;
+
+	@ApiModelProperty(value = "试听课数量", required = false)
+	private Integer demoNum;
+	
+	@ApiModelProperty(value = "离职时间", required = false)
+	private Date demissionDate;
+	
+	@ApiModelProperty(value = "转正时间", required = false)
+	private Date formalStaffDate;
+	
+	@ApiModelProperty(value = "是否支持课程奖励规则活动", required = false)
+	private Boolean isSupportCourseScheduleRewardsRules;
+	
+	@ApiModelProperty(value = "是否支持额外的网管课", required = false)
+	private Boolean isSupportExtraPracticeLesson;
+	
+	@ApiModelProperty(value = "身份证正面照", required = false)
+	private String idcardFrontImg;
+	
+	@ApiModelProperty(value = "身份证反面照", required = false)
+	private String idcardBackImg;
+	
+	@ApiModelProperty(value = "手持身份证照", required = false)
+	private String idcardHandImg;
+
+	private Integer lectureNum;
+	
+	private String memo;
+	
+	private String contractUrl;
+
+	private BigDecimal serviceIndex;
+
+	@ApiModelProperty(value = "是否结算课酬")
+	private Boolean isSettlementSalary = true;
+
+	@ApiModelProperty(value = "社保部门id",required = false)
+	private Integer deptId;
+
+	@ApiModelProperty(value = "部门ids",required = false)
+	private String deptIds;
+
+	@ApiModelProperty(value = "岗位管理部门",required = false)
+	private String postDeptIds;
+
+	@ApiModelProperty(value = "云教练限制")
+	private Boolean coursewareLimit;
+
+    @ApiModelProperty("IM绑定设备")
+    private String imDeviceId;
+
+	@ApiModelProperty(value = "是否可以查看云课堂", required = false)
+	private Boolean coursewareFlag = true;
+
+}

+ 26 - 3
cms/src/main/java/com/ym/mec/cms/service/impl/SysNewsTypeServiceImpl.java

@@ -1,11 +1,14 @@
 package com.ym.mec.cms.service.impl;
 
+import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.cms.dal.dao.SysConfigDao;
 import com.ym.mec.cms.dal.dao.SysNewsInformationDao;
 import com.ym.mec.cms.dal.dao.SysNewsTypeDao;
+import com.ym.mec.cms.dal.dao.SysUserDao;
 import com.ym.mec.cms.dal.entity.SysNewsInformation;
 import com.ym.mec.cms.dal.entity.SysNewsType;
 import com.ym.mec.cms.dal.entity.SysNewsTypeTree;
+import com.ym.mec.cms.dal.entity.Teacher;
 import com.ym.mec.cms.service.SysNewsTypeService;
 import com.ym.mec.common.dal.BaseDAO;
 import com.ym.mec.common.service.impl.BaseServiceImpl;
@@ -34,6 +37,8 @@ public class SysNewsTypeServiceImpl extends BaseServiceImpl<Integer, SysNewsType
     private WebFeignService webFeignService;
     @Resource
     private SysConfigDao sysConfigDao;
+    @Resource
+    private SysUserDao sysUserDao;
 
     @Override
     public BaseDAO<Integer, SysNewsType> getDAO() {
@@ -65,13 +70,31 @@ public class SysNewsTypeServiceImpl extends BaseServiceImpl<Integer, SysNewsType
 
     public List<SysNewsType> listWithTree(Integer id, String memo,Integer userId,String organIds) {
         SysNewsType newsType = sysNewsTypeDao.get(id);
-        //获取需要排除的用户编号
-        String excludeUserIds = sysConfigDao.findConfigValue("exclude_user_ids");
+        //老师端,按钮配置
         String excludeFunctionIds = null;
+        if(id == 23){
+            Teacher teacher = sysUserDao.getTeacherById(userId);
+            if(teacher != null){
+                //是否禁用云课堂
+                if(teacher.getCoursewareFlag()){
+                    excludeFunctionIds = "1925";
+                }
+                //是否禁用云教练
+                if(teacher.getCoursewareLimit()){
+                    if(StringUtils.isNotEmpty(excludeFunctionIds)){
+                        excludeFunctionIds += ",1374";
+                    }else {
+                        excludeFunctionIds = "1374";
+                    }
+                }
+            }
+        }
+        /*//获取需要排除的用户编号
+        String excludeUserIds = sysConfigDao.findConfigValue("exclude_user_ids");
         if(StringUtils.isNotEmpty(excludeUserIds) && excludeUserIds.contains(userId.toString())){
             //获取需要排除的功能点编号
             excludeFunctionIds = sysConfigDao.findConfigValue("exclude_function_ids");
-        }
+        }*/
         List<SysNewsType> all = sysNewsTypeDao.findAll(null);
         String startTime = DateUtil.format(DateUtil.getFirstDayOfMonth(DateUtil.addMonths(new Date(), -1)),DateUtil.ISO_EXPANDED_DATE_FORMAT);
         for (SysNewsType e : all) {

+ 43 - 0
cms/src/main/resources/config/mybatis/SysUserMapper.xml

@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<!-- 这个文件是自动生成的。 不要修改此文件。所有改动将在下次重新自动生成时丢失。 -->
+<mapper namespace="com.ym.mec.cms.dal.dao.SysUserDao">
+
+    <resultMap type="com.ym.mec.cms.dal.entity.Teacher" id="Teacher">
+        <result column="id_" property="id"/>
+        <result column="teacher_organ_id_" property="teacherOrganId"/>
+        <result column="job_type_" property="jobType"/>
+        <result column="job_nature_" property="jobNature"/>
+        <result column="is_probation_period_" property="isProbationPeriod"/>
+        <result column="education_background_" property="educationBackground"/>
+        <result column="graduate_school_" property="graduateSchool"/>
+        <result column="technical_titles_" property="technicalTitles"/>
+        <result column="work_unit_" property="workUnit"/>
+        <result column="subject_id_" property="subjectId"/>
+        <result column="entry_date_" property="entryDate"/>
+        <result column="demission_date_" property="demissionDate"/>
+        <result column="formal_staff_date_" property="formalStaffDate"/>
+        <result column="certificate_type_" property="certificateType"/>
+        <result column="certificate_num_" property="certificateNum"/>
+        <result column="flow_organ_range_" property="flowOrganRange"/>
+        <result column="introduction_" property="introduction"/>
+        <result column="is_support_extra_practice_lesson_" property="isSupportExtraPracticeLesson"/>
+        <result column="is_support_course_schedule_rewards_rules_" property="isSupportCourseScheduleRewardsRules"/>
+        <result column="idcard_front_img_" property="idcardFrontImg"/>
+        <result column="idcard_back_img_" property="idcardBackImg"/>
+        <result column="idcard_hand_img_" property="idcardHandImg"/>
+        <result column="memo_" property="memo"/>
+        <result column="lecture_num_" property="lectureNum"/>
+        <result column="dept_id_" property="deptId"/>
+        <result column="dept_ids_" property="deptIds"/>
+        <result column="post_dept_ids_" property="postDeptIds"/>
+        <result column="is_settlement_salary_" property="isSettlementSalary"/>
+        <result column="contract_url_" property="contractUrl"/>
+        <result column="courseware_limit_" property="coursewareLimit"/>
+        <result column="courseware_flag_" property="coursewareFlag"/>
+    </resultMap>
+
+    <select id="getTeacherById" resultMap="Teacher">
+        SELECT * FROM teacher WHERE id_ = #{userId}
+    </select>
+</mapper>

+ 16 - 1
mec-application/src/main/java/com/ym/mec/teacher/controller/LessonCoursewareController.java

@@ -7,7 +7,9 @@ import com.dayaedu.cbs.openfeign.wrapper.courseware.CbsLessonCoursewareDetailWra
 import com.dayaedu.cbs.openfeign.wrapper.courseware.CbsLessonCoursewareWrapper;
 import com.microsvc.toolkit.common.response.paging.QueryInfo;
 import com.ym.mec.auth.api.entity.SysUser;
+import com.ym.mec.biz.dal.dao.TeacherDao;
 import com.ym.mec.biz.dal.entity.Subject;
+import com.ym.mec.biz.dal.entity.Teacher;
 import com.ym.mec.biz.dal.wrapper.LessonCoursewareWrapper;
 import com.ym.mec.biz.service.CbsMusicScoreCategoriesService;
 import com.ym.mec.biz.service.LessonCoursewareService;
@@ -15,6 +17,7 @@ import com.ym.mec.biz.service.OrganizationService;
 import com.ym.mec.biz.service.SysUserService;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.entity.HttpResponseResult;
+import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.page.PageUtil;
 import io.swagger.annotations.Api;
@@ -41,12 +44,24 @@ public class LessonCoursewareController extends BaseController {
 	private OrganizationService organizationService;
 	@Resource
 	private CbsMusicScoreCategoriesService cbsMusicScoreCategoriesService;
+	@Resource
+	private TeacherDao teacherDao;
 
 	@ApiOperation(value = "分页查询已添加的课件")
 	@PostMapping("/queryLessonCourseware")
 	public HttpResponseResult<PageInfo<LessonCoursewareWrapper.LessonCoursewareDto>> queryLessonCourseware(@RequestBody LessonCoursewareWrapper.LessonCoursewareQuery query){
+		//判断用户是否可以访问云练习
+		Integer userId = sysUserService.getUserId();
+		Teacher teacher = teacherDao.get(userId);
+		if (teacher == null) {
+			throw new BizException("老师信息不存在");
+		}
+		//用户是否可以使用云课堂
+		if(teacher.getCoursewareFlag()){
+			throw new BizException("您没有权限使用云课堂");
+		}
 		query.setEnable(true);
-		query.setTeacherId(sysUserService.getUserId());
+		query.setTeacherId(userId);
 		IPage<LessonCoursewareWrapper.LessonCoursewareDto> pages = lessonCoursewareService.selectPage(QueryInfo.getPage(query), query);
 		return succeed(PageUtil.pageInfo(pages));
 	}

+ 19 - 0
mec-application/src/main/java/com/ym/mec/teacher/controller/SysMusicScoreController.java

@@ -1,11 +1,16 @@
 package com.ym.mec.teacher.controller;
 
+import com.ym.mec.biz.dal.dao.TeacherDao;
 import com.ym.mec.biz.dal.entity.SysMusicScore;
+import com.ym.mec.biz.dal.entity.Teacher;
 import com.ym.mec.biz.dal.enums.ClientTypeEnum;
 import com.ym.mec.biz.dal.page.SysExamSongQueryInfo;
 import com.ym.mec.biz.service.SysMusicScoreService;
+import com.ym.mec.biz.service.SysUserService;
+import com.ym.mec.biz.service.TeacherService;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.entity.HttpResponseResult;
+import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.page.PageInfo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -22,10 +27,24 @@ public class SysMusicScoreController extends BaseController {
 
     @Resource
     private SysMusicScoreService sysMusicScoreService;
+    @Resource
+    private TeacherDao teacherDao;
+    @Resource
+    private SysUserService sysUserService;
 
     @ApiOperation(value = "分页查询")
     @GetMapping("/queryPage2")
     public HttpResponseResult<PageInfo<SysMusicScore>> queryPage2(SysExamSongQueryInfo queryInfo) {
+        //判断用户是否可以访问云练习
+        Integer userId = sysUserService.getUserId();
+        Teacher teacher = teacherDao.get(userId);
+        if (teacher == null) {
+            throw new BizException("老师信息不存在");
+        }
+        //是否限制用户使用云教练
+        if(teacher.getCoursewareLimit()){
+            throw new BizException("您没有权限使用云练习");
+        }
         queryInfo.setType("COMMON");
         queryInfo.setClientFlag(true);
         queryInfo.setClientType(ClientTypeEnum.SMART_PRACTICE);

+ 1 - 1
mec-application/src/main/java/com/ym/mec/teacher/controller/TeacherCourseScheduleController.java

@@ -137,7 +137,7 @@ public class TeacherCourseScheduleController extends BaseController {
     @PostMapping("/getRecentCourseSchedule")
     public HttpResponseResult<CourseScheduleDto> getRecentCourseSchedule(Long courseId){
         CourseScheduleDto courseScheduleDto = scheduleService.getRecentCourseSchedule(sysUserService.getUserId(), courseId);
-        if(courseScheduleDto.getTeachMode() == TeachModeEnum.OFFLINE && courseScheduleDto.getStatus() != CourseStatusEnum.UNDERWAY
+        if(courseScheduleDto != null && courseScheduleDto.getTeachMode() == TeachModeEnum.OFFLINE && courseScheduleDto.getStatus() != CourseStatusEnum.UNDERWAY
                 && StringUtils.isNotEmpty(courseScheduleDto.getCoursewareDetailId())){
             //获取课件详情列表
             R<CbsLessonCoursewareDetailWrapper.LessonCoursewareDetail> voR = coursewareFeignService.lessonCoursewareDetailDetail(Long.parseLong(courseScheduleDto.getCoursewareDetailId()));

+ 6 - 6
mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/service/impl/CbsQrCodeScanServiceImpl.java

@@ -27,8 +27,8 @@ public class CbsQrCodeScanServiceImpl{
     private SysUserService sysUserService;
     @Resource
     private SysUserFeignService sysUserFeignService;
-    @Resource
-    private SysConfigDao sysConfigDao;
+//    @Resource
+//    private SysConfigDao sysConfigDao;
 
     public CbsQrCodeScanWrapper.UserInfo userInfo(CbsQrCodeScanWrapper.QrCodeScanUserInfoReq req) {
         CbsQrCodeScanWrapper.UserInfo userInfo = new CbsQrCodeScanWrapper.UserInfo();
@@ -46,10 +46,10 @@ public class CbsQrCodeScanServiceImpl{
             throw new BizException(HttpStatus.UNAUTHORIZED.value(), "用户不存在");
         }
         //获取需要排除的用户编号
-        String excludeUserIds = sysConfigDao.findConfigValue("exclude_user_ids");
-        if(StringUtils.isNotEmpty(excludeUserIds) && excludeUserIds.contains(sysUser.getId().toString())){
-            throw new BizException("扫码登陆失败: 用户已锁定");
-        }
+//        String excludeUserIds = sysConfigDao.findConfigValue("exclude_user_ids");
+//        if(StringUtils.isNotEmpty(excludeUserIds) && excludeUserIds.contains(sysUser.getId().toString())){
+//            throw new BizException("扫码登陆失败: 用户已锁定");
+//        }
         //调用登陆接口
         HttpResponseResult<Map<String,Object>> result = sysUserFeignService.smsLogin(phone, "qr_teacher", UUID.randomUUID().toString(), "qr_teacher");
         if (result != null){

+ 2 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/SysMusicScoreAccompanimentDao.java

@@ -16,6 +16,8 @@ public interface SysMusicScoreAccompanimentDao extends BaseDAO<String, SysMusicS
 
     List<SysMusicScoreAccompaniment> queryAccPage(Map<String, Object> params);
 
+    List<SysMusicScoreAccompaniment> queryAccPage1(@Param("musicScoreIds") List<Integer> musicScoreIds);
+
     int findAccCount(Map<String, Object> params);
 
     /**

+ 10 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/Teacher.java

@@ -137,12 +137,21 @@ public class Teacher extends SysUser {
 	@ApiModelProperty(value = "云教练限制")
 	private Boolean coursewareLimit;
 
+	@ApiModelProperty(value = "是否禁用云课堂", required = false)
+	private Boolean coursewareFlag = true;
 
     @ApiModelProperty("IM绑定设备")
     private String imDeviceId;
 
+	public Boolean getCoursewareFlag() {
+		return coursewareFlag;
+	}
+
+	public void setCoursewareFlag(Boolean coursewareFlag) {
+		this.coursewareFlag = coursewareFlag;
+	}
 
-    public String getImDeviceId() {
+	public String getImDeviceId() {
         return imDeviceId;
     }
 

+ 0 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/wrapper/StudentWrapper.java

@@ -6,7 +6,6 @@ import com.ym.mec.biz.dal.entity.CooperationOrgan;
 import com.ym.mec.biz.dal.enums.*;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
-import io.swagger.annotations.ApiOperation;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/SysMusicScoreAccompanimentService.java

@@ -20,7 +20,7 @@ public interface SysMusicScoreAccompanimentService extends BaseService<String, S
 
     List<SysMusicScoreAccompaniment> queryAccPage(SysExamSongQueryInfo queryInfo);
 
-    List<SysMusicScoreAccompaniment> queryAccPage(Map<String, Object> params,List<CbsMusicSheetWrapper.MusicSheetApplication> applications);
+    List<SysMusicScoreAccompaniment> queryAccPage(List<Integer> musicSheetIds,List<CbsMusicSheetWrapper.MusicSheetApplication> applications);
 
     List<SysMusicScoreAccompaniment> queryAccPage(Map<String, Object> params);
 

+ 7 - 5
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentCourseHomeworkServiceImpl.java

@@ -237,11 +237,13 @@ public class StudentCourseHomeworkServiceImpl extends BaseServiceImpl<Long, Stud
         courseHomeworkStudentDetail.setHomeworkOpenFlag(Integer.parseInt(configValue));
         if(StringUtils.isNotEmpty(courseHomeworkStudentDetail.getMusicScoreId())){
             List<SysMusicScore> sysMusicScoreList = sysMusicScoreDao.findByIds(courseHomeworkStudentDetail.getMusicScoreId());
-            courseHomeworkStudentDetail.setSysMusicScoreList(sysMusicScoreList);
-            SysMusicScore sysMusicScore = sysMusicScoreList.get(0);
-            courseHomeworkStudentDetail.setSysMusicScore(sysMusicScore);
-            courseHomeworkStudentDetail.setMusicScoreId(sysMusicScore.getId().toString());
-            courseHomeworkStudentDetail.setMusicScoreName(sysMusicScore.getName());
+            if(CollectionUtils.isNotEmpty(sysMusicScoreList)){
+                courseHomeworkStudentDetail.setSysMusicScoreList(sysMusicScoreList);
+                SysMusicScore sysMusicScore = sysMusicScoreList.get(0);
+                courseHomeworkStudentDetail.setSysMusicScore(sysMusicScore);
+                courseHomeworkStudentDetail.setMusicScoreId(sysMusicScore.getId().toString());
+                courseHomeworkStudentDetail.setMusicScoreName(sysMusicScore.getName());
+            }
         }
         Student student = studentDao.get(userId.intValue());
         courseHomeworkStudentDetail.setHasMember(student.getMemberRankSettingId()==null?0:1);

+ 2 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/SysMusicScoreAccompanimentServiceImpl.java

@@ -326,8 +326,8 @@ public class SysMusicScoreAccompanimentServiceImpl extends BaseServiceImpl<Strin
 	}
 
 	@Override
-	public List<SysMusicScoreAccompaniment> queryAccPage(Map<String, Object> params,List<CbsMusicSheetWrapper.MusicSheetApplication> applications) {
-		return this.initAccompaniment(sysMusicScoreAccompanimentDao.queryAccPage(params),applications);
+	public List<SysMusicScoreAccompaniment> queryAccPage(List<Integer> musicSheetIds,List<CbsMusicSheetWrapper.MusicSheetApplication> applications) {
+		return this.initAccompaniment(sysMusicScoreAccompanimentDao.queryAccPage1(musicSheetIds),applications);
 	}
 
 

+ 1 - 3
mec-biz/src/main/java/com/ym/mec/biz/service/impl/SysMusicScoreServiceImpl.java

@@ -162,9 +162,7 @@ public class SysMusicScoreServiceImpl extends BaseServiceImpl<Integer, SysMusicS
             if(CollectionUtils.isNotEmpty(applications)){
                 //获取原音
                 List<Integer> musicSheetIds = records.stream().map(SysMusicScore::getId).collect(Collectors.toList());
-                Map<String, Object> params = new HashMap<>();
-                params.put("musicScoreIds", musicSheetIds);
-                List<SysMusicScoreAccompaniment> accompaniments = sysMusicScoreAccompanimentService.queryAccPage(params,applications);
+                List<SysMusicScoreAccompaniment> accompaniments = sysMusicScoreAccompanimentService.queryAccPage(musicSheetIds,applications);
 
                 Map<Long, CbsMusicSheetWrapper.MusicSheetApplication> musicSheetApplicationMap = applications
                         .stream().collect(Collectors.toMap(CbsMusicSheetWrapper.MusicSheetApplication::getId, Function.identity()));

+ 9 - 0
mec-biz/src/main/resources/config/mybatis/SysMusicScoreAccompanimentMapper.xml

@@ -138,6 +138,15 @@
 		<include refid="queryPageSql"/>
 		ORDER BY ses.order_,ses.name_
 	</select>
+	<select id="queryAccPage1" resultMap="SysMusicScoreAccompaniment">
+		SELECT ses.id_ exam_song_id_,ses.name_,ses.type_,ses.url_,ses.cbs_music_categories_id_ categories_id_,ses.metronome_url_,ses.cbs_music_sheet_id_
+		FROM sys_music_score ses
+		where ses.id_ IN
+			<foreach collection="musicScoreIds" separator="," item="item" open="(" close=")">
+				#{item}
+			</foreach>
+		ORDER BY ses.order_,ses.name_
+	</select>
 
 	<select id="findAccCount" resultType="java.lang.Integer">
 		SELECT COUNT(DISTINCT ses.id_)

+ 5 - 1
mec-biz/src/main/resources/config/mybatis/TeacherMapper.xml

@@ -62,6 +62,7 @@
         <result column="contract_url_" property="contractUrl"/>
         <result column="tenant_id_" property="tenantId"/>
         <result column="courseware_limit_" property="coursewareLimit"/>
+        <result column="courseware_flag_" property="coursewareFlag"/>
     </resultMap>
     
     <resultMap type="com.ym.mec.biz.dal.dto.TeacherDefaultSalaryDto" id="TeacherDefaultSalaryDto">
@@ -118,7 +119,7 @@
         su.real_name_,su.id_card_no_,su.password_,su.salt_,su.phone_,su.avatar_,
         su.lock_flag_,su.del_flag_,su.wx_openid_,su.qq_openid_,su.user_type_,
         su.gender_,su.nation_,su.birthdate_,su.email_,su.im_token_,su.username_,su.organ_id_,
-        t.is_settlement_salary_,su.tenant_id_, t.courseware_limit_
+        t.is_settlement_salary_,su.tenant_id_, t.courseware_limit_, t.courseware_flag_
         FROM teacher t
         LEFT JOIN sys_user su ON t.id_ = su.id_
         WHERE t.id_ = #{id} AND su.del_flag_ = '0'
@@ -323,6 +324,9 @@
             <if test="coursewareLimit != null">
                 courseware_limit_ = #{coursewareLimit},
             </if>
+            <if test="coursewareFlag != null">
+                courseware_flag_ = #{coursewareFlag},
+            </if>
         </set>
         WHERE id_ = #{id} and tenant_id_ = #{tenantId}
     </update>