瀏覽代碼

Merge branch 'exam_song' of http://git.dayaedu.com/yonge/mec into test

zouxuan 4 年之前
父節點
當前提交
0297167ab4
共有 38 個文件被更改,包括 1009 次插入122 次删除
  1. 1 1
      codegen/src/main/resources/generateConfigration.xml
  2. 47 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/SysExamSongAccompanimentDao.java
  3. 43 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/ExamSongDto.java
  4. 1 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/Goods.java
  5. 12 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/MusicGroupSubjectGoodsGroup.java
  6. 11 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/StudentPaymentOrderDetail.java
  7. 157 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/SysExamSongAccompaniment.java
  8. 10 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/page/SysExamSongQueryInfo.java
  9. 8 0
      mec-biz/src/main/java/com/ym/mec/biz/service/MusicGroupPaymentCalenderDetailService.java
  10. 8 0
      mec-biz/src/main/java/com/ym/mec/biz/service/StudentPaymentOrderService.java
  11. 18 0
      mec-biz/src/main/java/com/ym/mec/biz/service/SysExamSongAccompanimentService.java
  12. 7 0
      mec-biz/src/main/java/com/ym/mec/biz/service/SysExamSongService.java
  13. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/service/UploadFileService.java
  14. 49 43
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java
  15. 45 12
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupPaymentCalenderDetailServiceImpl.java
  16. 2 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupPaymentCalenderServiceImpl.java
  17. 16 14
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupSubjectPlanServiceImpl.java
  18. 3 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentManageServiceImpl.java
  19. 2 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentPaymentOrderDetailServiceImpl.java
  20. 26 4
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentPaymentOrderServiceImpl.java
  21. 2 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentVisitServiceImpl.java
  22. 76 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/SysExamSongAccompanimentServiceImpl.java
  23. 75 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/SysExamSongServiceImpl.java
  24. 4 5
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/TeacherDefaultPracticeGroupSalaryServiceImpl.java
  25. 1 0
      mec-biz/src/main/resources/config/contracts/product2.ftl
  26. 16 4
      mec-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml
  27. 4 3
      mec-biz/src/main/resources/config/mybatis/IndexBaseMonthDataMapper.xml
  28. 6 3
      mec-biz/src/main/resources/config/mybatis/StudentManageDao.xml
  29. 2 1
      mec-biz/src/main/resources/config/mybatis/StudentPaymentOrderMapper.xml
  30. 195 0
      mec-biz/src/main/resources/config/mybatis/SysExamSongAccompanimentMapper.xml
  31. 5 6
      mec-biz/src/main/resources/config/mybatis/SysExamSongMapper.xml
  32. 1 1
      mec-student/src/main/java/com/ym/mec/student/controller/StudentOrderController.java
  33. 33 0
      mec-student/src/main/java/com/ym/mec/student/controller/SysExamSongAccompanimentController.java
  34. 63 0
      mec-teacher/src/main/java/com/ym/mec/teacher/controller/SysExamSongAccompanimentController.java
  35. 0 7
      mec-teacher/src/main/java/com/ym/mec/teacher/controller/SysExamSongController.java
  36. 8 0
      mec-web/src/main/java/com/ym/mec/web/controller/MusicGroupPaymentCalenderDetailController.java
  37. 45 0
      mec-web/src/main/java/com/ym/mec/web/controller/SysExamSongAccompanimentController.java
  38. 6 12
      mec-web/src/main/java/com/ym/mec/web/controller/SysExamSongController.java

+ 1 - 1
codegen/src/main/resources/generateConfigration.xml

@@ -8,7 +8,7 @@
 		<catalog>mec_dev</catalog>
 		<schema>mec_dev</schema>
 	</dbConfiguration>
-	<srcBase>/Users/zouxuan/Documents/javabean</srcBase>
+	<srcBase>/Users/chenxiaoyu/Documents/javabean</srcBase>
 	<pojoPackageName>com.ym.mec.biz.dal.entity</pojoPackageName>
 	<daoPackageName>com.ym.mec.biz.dal.dao</daoPackageName>
 	<servicePackageName>com.ym.mec.biz.service</servicePackageName>

+ 47 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/SysExamSongAccompanimentDao.java

@@ -0,0 +1,47 @@
+package com.ym.mec.biz.dal.dao;
+
+
+import com.ym.mec.biz.dal.entity.SysExamSongAccompaniment;
+import com.ym.mec.common.dal.BaseDAO;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+import java.util.Map;
+
+public interface SysExamSongAccompanimentDao extends BaseDAO<Integer, SysExamSongAccompaniment> {
+
+
+    /**
+     * 批量新增
+     * @param sysExamSongAccompaniments
+     * @param sysExamSongId
+     */
+    void batchInsert(@Param("sysExamSongAccompaniments") List<SysExamSongAccompaniment> sysExamSongAccompaniments, @Param("sysExamSongId") Integer sysExamSongId);
+
+    void deleteBySongId(Integer examSongId);
+
+    void batchUpdate(@Param("sysExamSongAccompaniment") List<SysExamSongAccompaniment> sysExamSongAccompaniment);
+
+    /**
+     * 获取已存在的声部
+     * @param sysExamSongId
+     * @param examSongAccIds
+     * @return
+     */
+    List<Integer> findSubjectByExamId(@Param("sysExamSongId") Integer sysExamSongId, @Param("examSongAccIds") List<Integer> examSongAccIds);
+
+    /**
+     * 批量删除
+     * @param delExamSongAccompanimentIds
+     */
+    void batchDel(@Param("delExamSongAccompanimentIds") List<Integer> delExamSongAccompanimentIds);
+
+    /**
+     * 用于学生端,教师端分页查询伴奏列表
+     * @param params
+     * @return
+     */
+    List<SysExamSongAccompaniment> queryAccPage(Map<String, Object> params);
+
+    int findAccCount(Map<String, Object> params);
+}

+ 43 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/ExamSongDto.java

@@ -0,0 +1,43 @@
+package com.ym.mec.biz.dal.dto;
+
+import com.ym.mec.biz.dal.entity.SysExamSong;
+import com.ym.mec.biz.dal.entity.SysExamSongAccompaniment;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.List;
+
+public class ExamSongDto {
+
+    @ApiModelProperty(value = "曲目",required = false)
+    private SysExamSong sysExamSong;
+
+    @ApiModelProperty(value = "伴奏",required = false)
+    private List<SysExamSongAccompaniment> sysExamSongAccompaniments;
+
+    @ApiModelProperty(value = "需要删除的id",required = false)
+    private List<Integer> delExamSongAccompanimentIds;
+
+    public List<Integer> getDelExamSongAccompanimentIds() {
+        return delExamSongAccompanimentIds;
+    }
+
+    public void setDelExamSongAccompanimentIds(List<Integer> delExamSongAccompanimentIds) {
+        this.delExamSongAccompanimentIds = delExamSongAccompanimentIds;
+    }
+
+    public SysExamSong getSysExamSong() {
+        return sysExamSong;
+    }
+
+    public void setSysExamSong(SysExamSong sysExamSong) {
+        this.sysExamSong = sysExamSong;
+    }
+
+    public List<SysExamSongAccompaniment> getSysExamSongAccompaniments() {
+        return sysExamSongAccompaniments;
+    }
+
+    public void setSysExamSongAccompaniments(List<SysExamSongAccompaniment> sysExamSongAccompaniments) {
+        this.sysExamSongAccompaniments = sysExamSongAccompaniments;
+    }
+}

+ 1 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/Goods.java

@@ -111,6 +111,7 @@ public class Goods {
 	private String complementGoodsIdList;
 
 	/** 辅件列表 */
+	@ApiModelProperty(value = "辅件列表(子商品)",required = false)
 	private List<Goods> goodsList;
 
 	/** 声部列表编号 */

+ 12 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/MusicGroupSubjectGoodsGroup.java

@@ -64,6 +64,10 @@ public class MusicGroupSubjectGoodsGroup {
 	private String coursePurchaseTypeJson;
 
 
+	@ApiModelProperty(value = "子商品列表",required = false)
+	private List<Goods> childGoodsList;
+
+
 	/**  */
 	private java.util.Date createTime;
 	
@@ -215,4 +219,12 @@ public class MusicGroupSubjectGoodsGroup {
 	public void setGroupRemissionCourseFee(Integer groupRemissionCourseFee) {
 		this.groupRemissionCourseFee = groupRemissionCourseFee;
 	}
+
+	public List<Goods> getChildGoodsList() {
+		return childGoodsList;
+	}
+
+	public void setChildGoodsList(List<Goods> childGoodsList) {
+		this.childGoodsList = childGoodsList;
+	}
 }

+ 11 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/StudentPaymentOrderDetail.java

@@ -51,6 +51,9 @@ public class StudentPaymentOrderDetail {
 	//减免费用
 	private BigDecimal remitFee;
 
+	@ApiModelProperty(value = "子商品列表",required = false)
+	private List<Goods> childGoodsList;
+
 	public void setId(Long id){
 		this.id = id;
 	}
@@ -143,4 +146,12 @@ public class StudentPaymentOrderDetail {
 	public void setRemitFee(BigDecimal remitFee) {
 		this.remitFee = remitFee;
 	}
+
+	public List<Goods> getChildGoodsList() {
+		return childGoodsList;
+	}
+
+	public void setChildGoodsList(List<Goods> childGoodsList) {
+		this.childGoodsList = childGoodsList;
+	}
 }

+ 157 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/SysExamSongAccompaniment.java

@@ -0,0 +1,157 @@
+package com.ym.mec.biz.dal.entity;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+/**
+ * 对应数据库表(sys_exam_song_accompaniment):
+ */
+public class SysExamSongAccompaniment {
+
+	/**  */
+	private Integer id;
+	
+	/**  */
+	private Integer examSongId;
+	
+	/**  */
+	private Integer subjectId;
+
+	/**  */
+	private String subjectName;
+	
+	/**  */
+	private String mp3Url;
+	
+	/**  */
+	private String xmlUrl;
+
+	/**  */
+	private String examSongName;
+
+	/**  */
+	private String type;
+
+	/**  */
+	private String url;
+
+	/**  */
+	private int delFlag;
+
+	private Integer speed;
+	
+	/**  */
+	private java.util.Date createTime;
+	
+	/**  */
+	private java.util.Date updateTime;
+
+	public String getUrl() {
+		return url;
+	}
+
+	public void setUrl(String url) {
+		this.url = url;
+	}
+
+	public String getExamSongName() {
+		return examSongName;
+	}
+
+	public void setExamSongName(String examSongName) {
+		this.examSongName = examSongName;
+	}
+
+	public String getType() {
+		return type;
+	}
+
+	public void setType(String type) {
+		this.type = type;
+	}
+
+	public String getSubjectName() {
+		return subjectName;
+	}
+
+	public void setSubjectName(String subjectName) {
+		this.subjectName = subjectName;
+	}
+
+	public int getDelFlag() {
+		return delFlag;
+	}
+
+	public void setDelFlag(int delFlag) {
+		this.delFlag = delFlag;
+	}
+
+	public Integer getSpeed() {
+		return speed;
+	}
+
+	public void setSpeed(Integer speed) {
+		this.speed = speed;
+	}
+
+	public void setId(Integer id){
+		this.id = id;
+	}
+	
+	public Integer getId(){
+		return this.id;
+	}
+			
+	public void setExamSongId(Integer examSongId){
+		this.examSongId = examSongId;
+	}
+	
+	public Integer getExamSongId(){
+		return this.examSongId;
+	}
+			
+	public void setSubjectId(Integer subjectId){
+		this.subjectId = subjectId;
+	}
+	
+	public Integer getSubjectId(){
+		return this.subjectId;
+	}
+			
+	public void setMp3Url(String mp3Url){
+		this.mp3Url = mp3Url;
+	}
+	
+	public String getMp3Url(){
+		return this.mp3Url;
+	}
+			
+	public void setXmlUrl(String xmlUrl){
+		this.xmlUrl = xmlUrl;
+	}
+	
+	public String getXmlUrl(){
+		return this.xmlUrl;
+	}
+			
+	public void setCreateTime(java.util.Date createTime){
+		this.createTime = createTime;
+	}
+	
+	public java.util.Date getCreateTime(){
+		return this.createTime;
+	}
+			
+	public void setUpdateTime(java.util.Date updateTime){
+		this.updateTime = updateTime;
+	}
+	
+	public java.util.Date getUpdateTime(){
+		return this.updateTime;
+	}
+			
+	@Override
+	public String toString() {
+		return ToStringBuilder.reflectionToString(this);
+	}
+
+}

+ 10 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/page/SysExamSongQueryInfo.java

@@ -14,6 +14,16 @@ public class SysExamSongQueryInfo extends QueryInfo {
     @ApiModelProperty(value = "类型",required = true)
     private String type;
 
+    private Integer sysExamSongId;
+
+    public Integer getSysExamSongId() {
+        return sysExamSongId;
+    }
+
+    public void setSysExamSongId(Integer sysExamSongId) {
+        this.sysExamSongId = sysExamSongId;
+    }
+
     public Integer getCreateUserId() {
         return createUserId;
     }

+ 8 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/MusicGroupPaymentCalenderDetailService.java

@@ -104,4 +104,12 @@ public interface MusicGroupPaymentCalenderDetailService extends BaseService<Long
      * @return java.util.List<com.ym.mec.biz.dal.entity.MusicGroup>
      */
     List<MusicGroup> getNoPaymentStudentMusicGroups(String organIds);
+
+    /**
+     * 主动发送学员待续费通知
+     * @param calenderDetailId
+     * @param studentIds
+     * @return
+     */
+    void pushWaitRenewMessage(Long calenderDetailId, String studentIds);
 }

+ 8 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/StudentPaymentOrderService.java

@@ -139,4 +139,12 @@ public interface StudentPaymentOrderService extends BaseService<Long, StudentPay
 	 * @return
 	 */
 	List<StudentPaymentOrder> reConfirmOrder(Date startTime,Date endTime);
+
+	/**
+	 * 获取学生报名的订单
+	 * @param studentId
+	 * @param musicGroupId
+	 * @return
+	 */
+	List<StudentPaymentOrderExportDto> getUserApplyOrders(Integer studentId,String musicGroupId);
 }

+ 18 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/SysExamSongAccompanimentService.java

@@ -0,0 +1,18 @@
+package com.ym.mec.biz.service;
+
+
+import com.ym.mec.biz.dal.entity.SysExamSongAccompaniment;
+import com.ym.mec.biz.dal.page.SysExamSongQueryInfo;
+import com.ym.mec.common.page.PageInfo;
+import com.ym.mec.common.service.BaseService;
+
+import java.util.List;
+
+public interface SysExamSongAccompanimentService extends BaseService<Integer, SysExamSongAccompaniment> {
+
+    void updateAcc(SysExamSongAccompaniment sysExamSongAccompaniment);
+
+    List<SysExamSongAccompaniment> queryAll(SysExamSongQueryInfo queryInfo);
+
+    PageInfo<SysExamSongAccompaniment> queryAccPage(SysExamSongQueryInfo queryInfo);
+}

+ 7 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/SysExamSongService.java

@@ -1,9 +1,16 @@
 package com.ym.mec.biz.service;
 
 
+import com.ym.mec.biz.dal.dto.ExamSongDto;
 import com.ym.mec.biz.dal.entity.SysExamSong;
+import com.ym.mec.biz.dal.page.SysExamSongQueryInfo;
 import com.ym.mec.common.service.BaseService;
 
 public interface SysExamSongService extends BaseService<Integer, SysExamSong> {
 
+    void add(ExamSongDto examSongDto);
+
+    void del(Integer sysExamSongId);
+
+    void updateExamSong(ExamSongDto examSongDto);
 }

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

@@ -32,7 +32,7 @@ public class UploadFileService {
 	private int maxSize;
 
 	/** 支持的扩展名 */
-	@Value("${common.upload.supportExtensions:jpg,jpeg,gif,png,mp3,mid,midi,aac,m4a,mp4}")
+	@Value("${common.upload.supportExtensions:jpg,jpeg,gif,png,mp3,mid,midi,aac,m4a,mp4,xml}")
 	private String supportExtensions;
 
 	/** 文件根目录 */

+ 49 - 43
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java

@@ -3333,6 +3333,13 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 				// 删除课酬
 				List<Long> courseScheduleIdList = new ArrayList<Long>();
 				courseScheduleIdList.add(courseScheduleId);
+
+				List<CourseScheduleTeacherSalary> oldCourseScheduleTeacherSalaryList = courseScheduleTeacherSalaryDao.findByCourseSchedules(courseScheduleIds);
+				Map<Long, List<CourseScheduleTeacherSalary>> courseSalaryListMap = new HashMap<>();
+				if(!CollectionUtils.isEmpty(oldCourseScheduleTeacherSalaryList)){
+					courseSalaryListMap = oldCourseScheduleTeacherSalaryList.stream().collect(Collectors.groupingBy(CourseScheduleTeacherSalary::getCourseScheduleId));
+				}
+
 				courseScheduleTeacherSalaryDao.batchDeleteByCourseScheduleIds(courseScheduleIdList);
 
 				for (Integer teacherId : newTeacherIdList) {
@@ -3365,20 +3372,20 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 						ts.setExpectSalary(teacherSalary);
 
 					} else if (newCourseSchedule.getGroupType() == PRACTICE) {
-						PracticeGroup practiceGroup = practiceGroupDao.get(Long.valueOf(newCourseSchedule.getMusicGroupId()));
-						if(Objects.isNull(practiceGroup)){
-							throw new BizException("课程组信息错误");
-						}
+						SysConfig practiceCourseSalaryConfig = sysConfigService.findByParamName(SysConfigService.PRACTICE_COURSE_SALARY);
+						BigDecimal freeTeacherSalary = new BigDecimal(practiceCourseSalaryConfig.getParanValue());
+
 						List<TeacherDefaultPracticeGroupSalary> teacherDefaultPracticeGroupSalaryList = teacherDefaultPracticeGroupSalaryDao
 								.queryByUserId(teacherId);
-						if (teacherDefaultPracticeGroupSalaryList != null && teacherDefaultPracticeGroupSalaryList.size() > 0) {
-							ts.setExpectSalary(teacherDefaultPracticeGroupSalaryList.get(0).getMainTeacherSalary());
-						} else {
-							throw new BizException("请设置老师 的网管课课酬");
-						}
-						if(Objects.nonNull(practiceGroup)&& !PracticeGroupType.CHARGE.equals(practiceGroup.getType()) && !PracticeGroupType.COME_ON_PACKAGE.equals(practiceGroup.getType())){
-							SysConfig practiceCourseSalaryConfig = sysConfigService.findByParamName(SysConfigService.PRACTICE_COURSE_SALARY);
-							ts.setExpectSalary(new BigDecimal(practiceCourseSalaryConfig.getParanValue()));
+						List<CourseScheduleTeacherSalary> teacherSalaries = courseSalaryListMap.get(ts.getCourseScheduleId());
+						if(!CollectionUtils.isEmpty(teacherSalaries)&&freeTeacherSalary.compareTo(teacherSalaries.get(0).getExpectSalary())==0){
+							ts.setExpectSalary(freeTeacherSalary);
+						}else{
+							if (teacherDefaultPracticeGroupSalaryList != null && teacherDefaultPracticeGroupSalaryList.size() > 0) {
+								ts.setExpectSalary(teacherDefaultPracticeGroupSalaryList.get(0).getMainTeacherSalary());
+							} else {
+								throw new BizException("请设置老师 的网管课课酬");
+							}
 						}
 					}
 					if(ts.getExpectSalary() == null){
@@ -4579,26 +4586,26 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
         courseScheduleDao.update(oldCourseSchedule);
 
         PracticeGroup practiceGroup = practiceGroupDao.get(Long.valueOf(oldCourseSchedule.getMusicGroupId()));
-		if(practiceGroup.getType() != TRIAL){
-			if(CHARGE.equals(practiceGroup.getType())||COME_ON_PACKAGE.equals(practiceGroup.getType())){
+
+		List<CourseScheduleTeacherSalary> courseScheduleTeacherSalaries = courseScheduleTeacherSalaryDao.findByCourseSchedule(courseScheduleId);
+		if(!CollectionUtils.isEmpty(courseScheduleTeacherSalaries)){
+			SysConfig practiceCourseSalaryConfig = sysConfigService.findByParamName(SysConfigService.PRACTICE_COURSE_SALARY);
+			BigDecimal teacherSalary = new BigDecimal(practiceCourseSalaryConfig.getParanValue());
+			for (CourseScheduleTeacherSalary courseScheduleTeacherSalary : courseScheduleTeacherSalaries) {
+				courseScheduleTeacherSalary.setUserId(teacherId);
+				if(teacherSalary.compareTo(courseScheduleTeacherSalary.getExpectSalary())==0){
+					continue;
+				}
 				List<TeacherDefaultPracticeGroupSalary> teacherDefaultPracticeGroupSalaries = teacherDefaultPracticeGroupSalaryDao.queryByUserId(teacherId);
 				if(teacherDefaultPracticeGroupSalaries == null || teacherDefaultPracticeGroupSalaries.size() == 0){
 					throw new BizException("请设置老师默认课酬");
 				}
-				courseScheduleTeacherSalaryDao.batchUpdateTeacher(courseScheduleIds,teacherId);
-			}else{
-				List<CourseScheduleTeacherSalary> courseScheduleTeacherSalaries = courseScheduleTeacherSalaryDao.findByCourseSchedule(courseScheduleId);
-				if(!CollectionUtils.isEmpty(courseScheduleTeacherSalaries)){
-					SysConfig practiceCourseSalaryConfig = sysConfigService.findByParamName(SysConfigService.PRACTICE_COURSE_SALARY);
-					BigDecimal teacherSalary = new BigDecimal(practiceCourseSalaryConfig.getParanValue());
-					for (CourseScheduleTeacherSalary courseScheduleTeacherSalary : courseScheduleTeacherSalaries) {
-						courseScheduleTeacherSalary.setUserId(teacherId);
-						courseScheduleTeacherSalary.setExpectSalary(teacherSalary);
-					}
-					courseScheduleTeacherSalaryDao.batchUpdate(courseScheduleTeacherSalaries);
-				}
+				courseScheduleTeacherSalary.setExpectSalary(teacherDefaultPracticeGroupSalaries.get(0).getMainTeacherSalary());
 			}
+			courseScheduleTeacherSalaryDao.batchUpdate(courseScheduleTeacherSalaries);
 		}
+
+
         teacherAttendanceDao.batchUpdateTeacher(courseScheduleIds,teacherId);
 		//删除申述
 		courseScheduleComplaintsDao.delByCourseScheduleId(courseScheduleId);
@@ -4683,25 +4690,24 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 			courseScheduleDao.batchUpdate(courseSchedules);
 			Set<Long> courseScheduleIds = courseSchedules.stream().map(e -> e.getId()).collect(Collectors.toSet());
 			if(practiceGroup.getType() != TRIAL){
-				if(CHARGE == practiceGroup.getType() || COME_ON_PACKAGE.equals(practiceGroup.getType())){
-					List<TeacherDefaultPracticeGroupSalary> teacherDefaultPracticeGroupSalaries = teacherDefaultPracticeGroupSalaryDao.queryByUserId(teacherId);
-					if(teacherDefaultPracticeGroupSalaries == null || teacherDefaultPracticeGroupSalaries.size() == 0){
-						throw new BizException("请设置老师默认课酬");
-					}
-					courseScheduleTeacherSalaryDao.batchUpdateTeacher(courseScheduleIds,teacherId);
-				}else{
-					List<CourseSchedule> groupNotStartCourses = courseScheduleDao.findGroupNotStartCourses(practiceGroupId, PRACTICE);
-					if(!CollectionUtils.isEmpty(groupNotStartCourses)){
-						SysConfig practiceCourseSalaryConfig = sysConfigService.findByParamName(SysConfigService.PRACTICE_COURSE_SALARY);
-						BigDecimal teacherSalary = new BigDecimal(practiceCourseSalaryConfig.getParanValue());
-						List<Long> courseIds = groupNotStartCourses.stream().map(CourseSchedule::getId).collect(Collectors.toList());
-						List<CourseScheduleTeacherSalary> courseScheduleTeacherSalaries = courseScheduleTeacherSalaryDao.findByCourseSchedules(courseIds);
-						for (CourseScheduleTeacherSalary courseScheduleTeacherSalary : courseScheduleTeacherSalaries) {
-							courseScheduleTeacherSalary.setUserId(teacherId);
-							courseScheduleTeacherSalary.setExpectSalary(teacherSalary);
+				List<CourseSchedule> groupNotStartCourses = courseScheduleDao.findGroupNotStartCourses(practiceGroupId, PRACTICE);
+				if(!CollectionUtils.isEmpty(groupNotStartCourses)){
+					SysConfig practiceCourseSalaryConfig = sysConfigService.findByParamName(SysConfigService.PRACTICE_COURSE_SALARY);
+					BigDecimal teacherSalary = new BigDecimal(practiceCourseSalaryConfig.getParanValue());
+					List<Long> courseIds = groupNotStartCourses.stream().map(CourseSchedule::getId).collect(Collectors.toList());
+					List<CourseScheduleTeacherSalary> courseScheduleTeacherSalaries = courseScheduleTeacherSalaryDao.findByCourseSchedules(courseIds);
+					for (CourseScheduleTeacherSalary courseScheduleTeacherSalary : courseScheduleTeacherSalaries) {
+						courseScheduleTeacherSalary.setUserId(teacherId);
+						if(teacherSalary.compareTo(courseScheduleTeacherSalary.getExpectSalary())==0){
+							continue;
 						}
-						courseScheduleTeacherSalaryDao.batchUpdate(courseScheduleTeacherSalaries);
+						List<TeacherDefaultPracticeGroupSalary> teacherDefaultPracticeGroupSalaries = teacherDefaultPracticeGroupSalaryDao.queryByUserId(teacherId);
+						if(teacherDefaultPracticeGroupSalaries == null || teacherDefaultPracticeGroupSalaries.size() == 0){
+							throw new BizException("请设置老师默认课酬");
+						}
+						courseScheduleTeacherSalary.setExpectSalary(teacherDefaultPracticeGroupSalaries.get(0).getMainTeacherSalary());
 					}
+					courseScheduleTeacherSalaryDao.batchUpdate(courseScheduleTeacherSalaries);
 				}
 			}
 			teacherAttendanceDao.batchUpdateTeacher(courseScheduleIds,teacherId);

+ 45 - 12
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupPaymentCalenderDetailServiceImpl.java

@@ -86,12 +86,13 @@ public class MusicGroupPaymentCalenderDetailServiceImpl extends BaseServiceImpl<
 		Date date = new Date();
 		MusicGroupPaymentCalender calender = musicGroupPaymentCalenderService.get(calenderDetails.get(0).getMusicGroupPaymentCalenderId());
 		//缴费项目已结束,并且没有单独开启缴费的学员,不能修改缴费金额
-		if(calender.getStatus() == OVER){
-			List<MusicGroupPaymentCalenderDetail> paymentCalenderDetails = calenderDetails.stream().filter(e -> e.getOpenFlag() == YesOrNoEnum.NO).collect(Collectors.toList());
-			if(paymentCalenderDetails != null && paymentCalenderDetails.size() > 0){
-				throw new BizException("修改失败:存在未开启缴费的学员");
-			}
-		}
+//		if(calender.getStatus() == OVER){
+//			List<MusicGroupPaymentCalenderDetail> paymentCalenderDetails = calenderDetails.stream().filter(e -> e.getOpenFlag() == YesOrNoEnum.NO).collect(Collectors.toList());
+//			if(paymentCalenderDetails != null && paymentCalenderDetails.size() > 0){
+//				throw new BizException("修改失败:存在未开启缴费的学员");
+//			}
+//		}
+		//为了解决学员欠费数量的问题,只要学员没有缴费就可以修改金额
 		Set<Integer> studentIds = new HashSet<>();
 				calenderDetails.forEach(e->{
 			if(e.getPaymentStatus() == null || e.getPaymentStatus() != NON_PAYMENT){
@@ -110,7 +111,7 @@ public class MusicGroupPaymentCalenderDetailServiceImpl extends BaseServiceImpl<
 		});
 		musicGroupPaymentCalenderDetailDao.batchUpdate(calenderDetails);
 		//推送消息
-		if (calender.getPayUserType() == STUDENT && studentIds.size() > 0) {
+		/*if (calender.getPayUserType() == STUDENT && studentIds.size() > 0) {
 			String musicGroupId = calenderDetails.get(0).getMusicGroupId();
 			Map<Integer, String> push = new HashMap<>();
 			for (Integer userId : studentIds) {
@@ -129,7 +130,7 @@ public class MusicGroupPaymentCalenderDetailServiceImpl extends BaseServiceImpl<
 				sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.AWSMS, MessageTypeEnum.STUDENT_SMS_WAIT_RENEW_MESSAGE, studentMaps,
 						null, 0, memo, null, musicGroup.getName());
 			}
-		}
+		}*/
 	}
 
 	@Override
@@ -145,8 +146,8 @@ public class MusicGroupPaymentCalenderDetailServiceImpl extends BaseServiceImpl<
 		}
 		int length = ids.split(",").length;
 		Date date = new Date();
-		Long calenderId = calenderDetails.get(0).getMusicGroupPaymentCalenderId();
-		MusicGroupPaymentCalender calender = musicGroupPaymentCalenderService.get(calenderId);
+//		Long calenderId = calenderDetails.get(0).getMusicGroupPaymentCalenderId();
+//		MusicGroupPaymentCalender calender = musicGroupPaymentCalenderService.get(calenderId);
 		calenderDetails.forEach(e->{
 			e.setUpdateTime(date);
 			e.setOpen(1);
@@ -156,7 +157,7 @@ public class MusicGroupPaymentCalenderDetailServiceImpl extends BaseServiceImpl<
 		musicGroupPaymentCalenderDetailDao.batchUpdate(calenderDetails);
 		Set<Integer> studentIds = calenderDetails.stream().map(e -> e.getUserId()).collect(Collectors.toSet());
 		//推送消息
-		if (calender.getPayUserType() == STUDENT && studentIds.size() > 0) {
+		/*if (calender.getPayUserType() == STUDENT && studentIds.size() > 0) {
 			Map<Integer, String> push = new HashMap<>();
 			for (Integer userId : studentIds) {
 				push.put(userId, userId + "");
@@ -173,7 +174,7 @@ public class MusicGroupPaymentCalenderDetailServiceImpl extends BaseServiceImpl<
 				sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.AWSMS, MessageTypeEnum.STUDENT_SMS_WAIT_RENEW_MESSAGE, studentMaps,
 						null, 0, memo, null, musicGroup.getName());
 			}
-		}
+		}*/
 		StringBuffer append = new StringBuffer("操作成功: 成功开启缴费").append(studentIds.size()).append("条,失败").append(length - studentIds.size()).append("条");
 		return append.toString();
 	}
@@ -590,4 +591,36 @@ public class MusicGroupPaymentCalenderDetailServiceImpl extends BaseServiceImpl<
 		}
 		return musicGroupPaymentCalenderDetailDao.getNoPaymentStudentMusicGroups(organIds);
 	}
+
+	@Override
+	public void pushWaitRenewMessage(Long calenderDetailId, String studentIds) {
+		MusicGroupPaymentCalenderDetail calenderDetail = musicGroupPaymentCalenderDetailDao.get(calenderDetailId);
+		if(calenderDetail == null){
+			throw new BizException("缴费详情不存在");
+		}
+		Long calenderId = calenderDetail.getMusicGroupPaymentCalenderId();
+		MusicGroupPaymentCalender paymentCalender = musicGroupPaymentCalenderDao.get(calenderId);
+		if(paymentCalender.getStatus() != OPEN && calenderDetail.getOpenFlag() != YesOrNoEnum.YES){
+			throw new BizException("操作失败:请开启缴费");
+		}
+		//未缴费
+		HashSet<String> strings = new HashSet<>(Arrays.asList(studentIds.split(",")));
+		Map<Integer,String> studentMaps = MapUtil.convertMybatisMap(musicGroupPaymentCalenderDetailDao.queryNoPaymentAndNotZeroStudent(calenderId,strings));
+		if(studentMaps.size() > 0){
+			MusicGroup musicGroup = musicGroupDao.get(paymentCalender.getMusicGroupId());
+			String baseUrl = sysConfigDao.findConfigValue(SysConfigService.BASE_API_URL);
+			String memo = "4?" + baseUrl + "/#/musicGroupRenew?calenderId="+calenderId+"&id=" + musicGroup.getId();
+			Map<Integer, String> push = new HashMap<>();
+			for (String userId : strings) {
+				push.put(Integer.parseInt(userId), userId);
+			}
+			// 发送续费通知
+			sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.JIGUANG, MessageTypeEnum.STUDENT_PUSH_WAIT_RENEW_MESSAGE, push,
+					null, 0, memo, "STUDENT", musicGroup.getName());
+			sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.AWSMS, MessageTypeEnum.STUDENT_SMS_WAIT_RENEW_MESSAGE, studentMaps,
+					null, 0, memo, null, musicGroup.getName());
+		}else {
+			throw new BizException("操作失败:没有待续费学员");
+		}
+	}
 }

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

@@ -1160,7 +1160,7 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 
 	//推送待续费通知
 	public void pushWaitRenewMessage(Long calenderId,MusicGroup musicGroup,Set<Integer> studentIds){
-		if(studentIds == null){
+		/*if(studentIds == null){
 			studentIds = musicGroupPaymentCalenderDetailDao.queryNoPaymentStudentIds(calenderId);
 		}
 		if (studentIds.size() > 0) {
@@ -1180,7 +1180,7 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 				sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.AWSMS, MessageTypeEnum.STUDENT_SMS_WAIT_RENEW_MESSAGE, studentMaps,
 						null, 0, memo, null, musicGroup.getName());
 			}
-		}
+		}*/
 	}
 
     @Override

+ 16 - 14
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupSubjectPlanServiceImpl.java

@@ -10,6 +10,7 @@ import com.ym.mec.biz.dal.dao.*;
 import com.ym.mec.biz.dal.dto.MusicGroupGoodsAndDiscountDto;
 import com.ym.mec.biz.dal.entity.*;
 import com.ym.mec.biz.dal.enums.KitGroupPurchaseTypeEnum;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -107,24 +108,25 @@ public class MusicGroupSubjectPlanServiceImpl extends BaseServiceImpl<Integer, M
         //乐团乐器及辅件信息
         List<MusicGroupSubjectGoodsGroup> goodsGroups = musicGroupSubjectGoodsGroupService.findGoodsGroup(musicGroupId, subjectId);
 
-        List<Goods> accessoriesList = goodsService.findGoodsBySubId(subjectId, GoodsType.ACCESSORIES.getCode());
-
-        goodsGroups.forEach(goodsGroup -> {
-            if (goodsGroup.getType().equals(GoodsType.INSTRUMENT)) {
-                goodsGroup.getGoodsList().forEach(goods -> {
-                    goods.setGoodsList(accessoriesList);
-                });
+        for (MusicGroupSubjectGoodsGroup goodsGroup : goodsGroups) {
+            String childGoodIds = "";
+            for (Goods goods : goodsGroup.getGoodsList()) {
+                if (StringUtils.isNotBlank(goods.getComplementGoodsIdList())) {
+                    childGoodIds += StringUtils.isNotBlank(childGoodIds) ? "," : "" + goods.getComplementGoodsIdList();
+                }
             }
-        });
-        //获取声部(科目)下其他商品
-        List<Goods> otherGoods = goodsService.findTypeGoods("OTHER");
+            if(StringUtils.isNotBlank(childGoodIds)) {
+                goodsGroup.setChildGoodsList(goodsDao.findGoodsByIds(childGoodIds));
+            }
+        }
+
 
+        //获取声部(科目)下其他商品
         MusicGroupSubjectGoodsAndInfoDto musicGroupSubjectGoodsAndInfo = new MusicGroupSubjectGoodsAndInfoDto();
         musicGroupSubjectGoodsAndInfo.setMusicGroupSubjectPlan(musicOneSubjectClassPlan);
         musicGroupSubjectGoodsAndInfo.setCourseScheduleInfo(courseForm);
         musicGroupSubjectGoodsAndInfo.setMusicGroupPaymentCalender(musicGroupRegCalender);
         musicGroupSubjectGoodsAndInfo.setMusicGroupSubjectGoodsGroupList(goodsGroups);
-        musicGroupSubjectGoodsAndInfo.setOtherGoods(otherGoods);
         musicGroupSubjectGoodsAndInfo.setMusicGroup(musicGroup);
         return musicGroupSubjectGoodsAndInfo;
     }
@@ -145,14 +147,14 @@ public class MusicGroupSubjectPlanServiceImpl extends BaseServiceImpl<Integer, M
     }
 
     @Override
-    public void addApplyStudentNum(String musicGroupId, Integer subjectId, int num){
+    public void addApplyStudentNum(String musicGroupId, Integer subjectId, int num) {
         boolean flag = false;
         for (int i = 10; i >= 1; i--) {
             MusicGroupSubjectPlan musicOneSubjectClassPlan = musicGroupSubjectPlanDao.getMusicOneSubjectClassPlan(musicGroupId, subjectId);
-            if(musicOneSubjectClassPlan == null){
+            if (musicOneSubjectClassPlan == null) {
                 MusicGroup musicGroup = musicGroupService.get(musicGroupId);
                 Subject subject = subjectService.get(subjectId);
-                throw new BizException("操作失败:{}乐团缺少{}声部",musicGroup.getName(),subject.getName());
+                throw new BizException("操作失败:{}乐团缺少{}声部", musicGroup.getName(), subject.getName());
             }
             int applyNum = musicOneSubjectClassPlan.getApplyStudentNum() == null ? 0 : musicOneSubjectClassPlan.getApplyStudentNum();
             musicOneSubjectClassPlan.setApplyStudentNum(applyNum + num);

+ 3 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentManageServiceImpl.java

@@ -116,6 +116,9 @@ public class StudentManageServiceImpl implements StudentManageService {
         Map<String, Object> params = new HashMap<String, Object>();
         MapUtil.populateMap(params, queryInfo);
 
+        String[] organIds = queryInfo.getOrganId().split(",");
+        params.put("organIds", organIds);
+
         List<StudentManageListDto> dataList = null;
         int count = studentManageDao.countStudentByOrganId(params);
         if (count > 0) {

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

@@ -231,6 +231,8 @@ public class StudentPaymentOrderDetailServiceImpl extends BaseServiceImpl<Long,
                     goods.setSellCount(goods.getSellCount() + 1);
                 }
             }
+            if(StringUtils.isBlank(goods.getComplementGoodsIdList())) continue;
+            goods.setGoodsList(goodsService.findGoodsByIds(goods.getComplementGoodsIdList()));
         }
         return goodies;
     }

+ 26 - 4
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentPaymentOrderServiceImpl.java

@@ -11,6 +11,8 @@ import java.util.List;
 import java.util.Map;
 import java.util.stream.Collectors;
 
+import com.ym.mec.biz.dal.dao.*;
+import com.ym.mec.biz.dal.entity.StudentPaymentOrderDetail;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Lazy;
@@ -18,10 +20,6 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import com.alibaba.fastjson.JSON;
-import com.ym.mec.biz.dal.dao.StudentPaymentOrderDao;
-import com.ym.mec.biz.dal.dao.StudentPaymentRouteOrderDao;
-import com.ym.mec.biz.dal.dao.SysConfigDao;
-import com.ym.mec.biz.dal.dao.SysUserCashAccountDao;
 import com.ym.mec.biz.dal.dto.PageInfoOrder;
 import com.ym.mec.biz.dal.dto.SporadicChargeInfoDto;
 import com.ym.mec.biz.dal.dto.StudentPaymentOrderDto;
@@ -95,6 +93,8 @@ public class StudentPaymentOrderServiceImpl extends BaseServiceImpl<Long, Studen
     private IdGeneratorService idGeneratorService;
     @Autowired
     private SysConfigDao sysConfigDao;
+    @Autowired
+    private GoodsDao goodsDao;
 
     @Override
     public BaseDAO<Long, StudentPaymentOrder> getDAO() {
@@ -516,4 +516,26 @@ public class StudentPaymentOrderServiceImpl extends BaseServiceImpl<Long, Studen
         }
         return orders;
     }
+
+    @Override
+    public List<StudentPaymentOrderExportDto> getUserApplyOrders(Integer studentId, String musicGroupId) {
+        List<StudentPaymentOrderExportDto> orders = studentPaymentOrderDao.getUserApplyOrders(studentId, musicGroupId);
+        for (StudentPaymentOrderExportDto order : orders) {
+            if(order.getOrderDetailList()==null) continue;
+            for (StudentPaymentOrderDetail studentPaymentOrderDetail : order.getOrderDetailList()) {
+                if(studentPaymentOrderDetail.getGoodsList()==null) continue;
+
+                String childGoodIds = "";
+                for (Goods goods : studentPaymentOrderDetail.getGoodsList()) {
+                    if (StringUtils.isNotBlank(goods.getComplementGoodsIdList())) {
+                        childGoodIds += StringUtils.isNotBlank(childGoodIds) ? "," : "" + goods.getComplementGoodsIdList();
+                    }
+                }
+                if(StringUtils.isNotBlank(childGoodIds)) {
+                    studentPaymentOrderDetail.setChildGoodsList(goodsDao.findGoodsByIds(childGoodIds));
+                }
+            }
+        }
+        return orders;
+    }
 }

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

@@ -53,13 +53,13 @@ public class StudentVisitServiceImpl extends BaseServiceImpl<Integer, StudentVis
         SysUser user = teacherDao.getUser(studentVisit.getStudentId());
         studentVisit.setOrganId(user.getOrganId());
         studentVisit.setCreateTime(now);
-        if(Objects.nonNull(studentVisit.getObjectId())){
+        if(Objects.nonNull(studentVisit.getObjectId()) && "考勤申诉".equals(studentVisit.getPurpose())){
             CourseScheduleStudentPayment courseScheduleStudentPayment = courseScheduleStudentPaymentDao.get(studentVisit.getObjectId());
             if(Objects.isNull(courseScheduleStudentPayment)){
                 throw new BizException("学员课程信息不存在");
             }
             StudentAttendance studentAttendance = studentAttendanceDao.findByStatusAndCourseScheduleId(courseScheduleStudentPayment.getUserId(), courseScheduleStudentPayment.getCourseScheduleId().intValue());
-            if (studentAttendance == null && "考勤申诉".equals(studentVisit.getPurpose())) {
+            if (studentAttendance == null) {
                 studentAttendance = new StudentAttendance();
                 studentAttendance.setClassGroupId(courseScheduleStudentPayment.getClassGroupId());
                 studentAttendance.setCourseScheduleId(courseScheduleStudentPayment.getCourseScheduleId());

+ 76 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/SysExamSongAccompanimentServiceImpl.java

@@ -0,0 +1,76 @@
+package com.ym.mec.biz.service.impl;
+
+
+import com.ym.mec.biz.dal.dao.SysExamSongAccompanimentDao;
+import com.ym.mec.biz.dal.entity.SysExamSongAccompaniment;
+import com.ym.mec.biz.dal.page.SysExamSongQueryInfo;
+import com.ym.mec.biz.service.SysExamSongAccompanimentService;
+import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.exception.BizException;
+import com.ym.mec.common.page.PageInfo;
+import com.ym.mec.common.service.impl.BaseServiceImpl;
+import com.ym.mec.util.collection.MapUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+@Service
+public class SysExamSongAccompanimentServiceImpl extends BaseServiceImpl<Integer, SysExamSongAccompaniment> implements SysExamSongAccompanimentService {
+	
+	@Autowired
+	private SysExamSongAccompanimentDao sysExamSongAccompanimentDao;
+
+	@Override
+	public BaseDAO<Integer, SysExamSongAccompaniment> getDAO() {
+		return sysExamSongAccompanimentDao;
+	}
+
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	public void updateAcc(SysExamSongAccompaniment sysExamSongAccompaniment) {
+		SysExamSongAccompaniment accompaniment = sysExamSongAccompanimentDao.get(sysExamSongAccompaniment.getId());
+		if(accompaniment == null){
+			throw new BizException("操作失败:伴奏信息不存在");
+		}
+		List<Integer> idList = new ArrayList<>();
+		idList.add(accompaniment.getId());
+		List<Integer> subjectIds = sysExamSongAccompanimentDao.findSubjectByExamId(accompaniment.getExamSongId(),idList);
+		if(subjectIds.size() > 0 && subjectIds.contains(accompaniment.getId())){
+			throw new BizException("操作失败:请勿提交重复的伴奏声部");
+		}
+		sysExamSongAccompanimentDao.update(sysExamSongAccompaniment);
+	}
+
+	@Override
+	public List<SysExamSongAccompaniment> queryAll(SysExamSongQueryInfo queryInfo) {
+		Map<String, Object> params = new HashMap<>();
+		MapUtil.populateMap(params, queryInfo);
+		return sysExamSongAccompanimentDao.queryPage(params);
+	}
+
+	@Override
+	public PageInfo<SysExamSongAccompaniment> queryAccPage(SysExamSongQueryInfo queryInfo) {
+		PageInfo<SysExamSongAccompaniment> pageInfo = new PageInfo<>(queryInfo.getPage(), queryInfo.getRows());
+		Map<String, Object> params = new HashMap<String, Object>();
+		MapUtil.populateMap(params, queryInfo);
+
+		List<SysExamSongAccompaniment> dataList = null;
+		int count = sysExamSongAccompanimentDao.findAccCount(params);
+		if (count > 0) {
+			pageInfo.setTotal(count);
+			params.put("offset", pageInfo.getOffset());
+			dataList = sysExamSongAccompanimentDao.queryAccPage(params);
+		}
+		if (count == 0) {
+			dataList = new ArrayList<>();
+		}
+		pageInfo.setRows(dataList);
+		return pageInfo;
+	}
+}

+ 75 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/SysExamSongServiceImpl.java

@@ -1,23 +1,97 @@
 package com.ym.mec.biz.service.impl;
 
 
+import com.ym.mec.auth.api.client.SysUserFeignService;
+import com.ym.mec.auth.api.entity.SysUser;
+import com.ym.mec.biz.dal.dao.SysExamSongAccompanimentDao;
 import com.ym.mec.biz.dal.dao.SysExamSongDao;
+import com.ym.mec.biz.dal.dto.ExamSongDto;
 import com.ym.mec.biz.dal.entity.SysExamSong;
+import com.ym.mec.biz.dal.entity.SysExamSongAccompaniment;
 import com.ym.mec.biz.service.SysExamSongService;
 import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.service.impl.BaseServiceImpl;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.stream.Collectors;
 
 @Service
 public class SysExamSongServiceImpl extends BaseServiceImpl<Integer, SysExamSong> implements SysExamSongService {
 	
 	@Autowired
 	private SysExamSongDao sysExamSongDao;
+	@Autowired
+	private SysExamSongAccompanimentDao sysExamSongAccompanimentDao;
+	@Autowired
+	private SysUserFeignService sysUserFeignService;
 
 	@Override
 	public BaseDAO<Integer, SysExamSong> getDAO() {
 		return sysExamSongDao;
 	}
-	
+
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	public void add(ExamSongDto examSongDto) {
+		SysUser sysUser = sysUserFeignService.queryUserInfo();
+		if(sysUser == null){
+			throw new BizException("请登录");
+		}
+		SysExamSong sysExamSong = examSongDto.getSysExamSong();
+		sysExamSong.setCreateUserId(sysUser.getId());
+		sysExamSongDao.insert(sysExamSong);
+		List<SysExamSongAccompaniment> sysExamSongAccompaniment = examSongDto.getSysExamSongAccompaniments();
+		if(sysExamSongAccompaniment != null && sysExamSongAccompaniment.size() > 0){
+			sysExamSongAccompanimentDao.batchInsert(sysExamSongAccompaniment,sysExamSong.getId());
+		}
+	}
+
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	public void del(Integer sysExamSongId) {
+		sysExamSongDao.delete(sysExamSongId);
+		sysExamSongAccompanimentDao.deleteBySongId(sysExamSongId);
+	}
+
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	public void updateExamSong(ExamSongDto examSongDto) {
+		SysExamSong sysExamSong = examSongDto.getSysExamSong();
+		sysExamSongDao.update(sysExamSong);
+		List<Integer> delExamSongAccompanimentIds = examSongDto.getDelExamSongAccompanimentIds();
+		if(delExamSongAccompanimentIds != null && delExamSongAccompanimentIds.size() > 0){
+			sysExamSongAccompanimentDao.batchDel(delExamSongAccompanimentIds);
+		}
+		List<SysExamSongAccompaniment> sysExamSongAccompaniment = examSongDto.getSysExamSongAccompaniments();
+		if(sysExamSongAccompaniment != null && sysExamSongAccompaniment.size() > 0){
+			List<Integer> subjectIdList = sysExamSongAccompaniment.stream().map(e -> e.getSubjectId()).collect(Collectors.toList());
+			subjectIdList.removeAll(Collections.singleton(null));
+			if(subjectIdList.size() > 0){
+				List<Integer> idList = sysExamSongAccompaniment.stream().map(e -> e.getId()).collect(Collectors.toList());
+				List<Integer> subjectIds = sysExamSongAccompanimentDao.findSubjectByExamId(sysExamSong.getId(),idList);
+				int subjectSize = subjectIds.size() + subjectIdList.size();
+				subjectIdList.addAll(subjectIds);
+				int size = new HashSet<>(subjectIdList).size();
+				if(size < subjectSize){
+					throw new BizException("操作失败:请勿提交重复的伴奏声部");
+				}
+			}
+			//获取需要修改的伴奏
+			List<SysExamSongAccompaniment> updateCollect = sysExamSongAccompaniment.stream().filter(e -> e.getId() != null).collect(Collectors.toList());
+			if(updateCollect.size() > 0){
+				sysExamSongAccompanimentDao.batchUpdate(updateCollect);
+			}
+			//获取需要新增的伴奏
+			List<SysExamSongAccompaniment> addCollect = sysExamSongAccompaniment.stream().filter(e -> e.getId() == null).collect(Collectors.toList());
+			if(addCollect.size() > 0){
+				sysExamSongAccompanimentDao.batchInsert(addCollect,sysExamSong.getId());
+			}
+		}
+	}
 }

+ 4 - 5
mec-biz/src/main/java/com/ym/mec/biz/service/impl/TeacherDefaultPracticeGroupSalaryServiceImpl.java

@@ -87,6 +87,7 @@ public class TeacherDefaultPracticeGroupSalaryServiceImpl extends BaseServiceImp
 					}
 
 					SysConfig practiceCourseSalaryConfig = sysConfigService.findByParamName(SysConfigService.PRACTICE_COURSE_SALARY);
+					BigDecimal freeTeacherSalary = new BigDecimal(practiceCourseSalaryConfig.getParanValue());
 
 					Date date = new Date();
 
@@ -95,12 +96,10 @@ public class TeacherDefaultPracticeGroupSalaryServiceImpl extends BaseServiceImp
 					for (CourseScheduleTeacherSalary ts : updateTeacherSalaryList) {
 						if (origSalary != null && origSalary.getMainTeacherSalary().compareTo(ts.getExpectSalary()) == 0
 								&& origSalary.getMainTeacherSalary().compareTo(salary) != 0) {
-							PracticeGroup practiceGroup = idGroupMap.get(Long.valueOf(ts.getMusicGroupId()));
-							if(Objects.nonNull(practiceGroup)&& !PracticeGroupType.CHARGE.equals(practiceGroup.getType()) && !PracticeGroupType.COME_ON_PACKAGE.equals(practiceGroup.getType())){
-								ts.setExpectSalary(new BigDecimal(practiceCourseSalaryConfig.getParanValue()));
-							}else{
-								ts.setExpectSalary(salary);
+							if(freeTeacherSalary.compareTo(ts.getExpectSalary())==0){
+								continue;
 							}
+							ts.setExpectSalary(salary);
 							ts.setUpdateTime(date);
 							list.add(ts);
 						}

+ 1 - 0
mec-biz/src/main/resources/config/contracts/product2.ftl

@@ -33,6 +33,7 @@
         h1 {
             font-size: 16px;
             text-align: center;
+            margin-bottom: 8px;
         }
         h2 {
             font-size: 16px;

+ 16 - 4
mec-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml

@@ -2398,7 +2398,13 @@
             LEFT JOIN organization o ON cs.organ_id_=o.id_
             LEFT JOIN course_schedule_teacher_salary csts ON csts.course_schedule_id_ = cs.id_
             left join teacher_attendance ta on ta.course_schedule_id_ = cs.id_
-            LEFT JOIN student_attendance sa ON sa.course_schedule_id_ = cs.id_
+            <if test="searchType == 'ERR_ATTENDANCE'">
+                LEFT JOIN course_schedule_student_payment cssp ON cssp.course_schedule_id_ = cs.id_
+                LEFT JOIN student_attendance sa ON sa.course_schedule_id_ = cs.id_ AND cssp.user_id_ = sa.user_id_
+            </if>
+            <if test="searchType != 'ERR_ATTENDANCE'">
+                LEFT JOIN student_attendance sa ON sa.course_schedule_id_ = cs.id_
+            </if>
             <include refid="endFindCourseSchedulesCondition"/>
         GROUP BY
             cs.class_date_,
@@ -2416,7 +2422,13 @@
         COUNT(DISTINCT cs.id_)
         FROM
         course_schedule cs
-        LEFT JOIN student_attendance sa ON sa.course_schedule_id_ = cs.id_
+        <if test="searchType == 'ERR_ATTENDANCE'">
+            LEFT JOIN course_schedule_student_payment cssp ON cssp.course_schedule_id_ = cs.id_
+            LEFT JOIN student_attendance sa ON sa.course_schedule_id_ = cs.id_ AND cssp.user_id_ = sa.user_id_
+        </if>
+        <if test="searchType != 'ERR_ATTENDANCE'">
+            LEFT JOIN student_attendance sa ON sa.course_schedule_id_ = cs.id_
+        </if>
         LEFT JOIN teacher_attendance ta on ta.course_schedule_id_ = cs.id_
         LEFT JOIN course_schedule_teacher_salary csts ON csts.course_schedule_id_ = cs.id_
         <include refid="endFindCourseSchedulesCondition"/>
@@ -2541,8 +2553,8 @@
         <if test="searchType == 'ERR_ATTENDANCE'">
             AND ta.teacher_id_ = cs.actual_teacher_id_
             AND cs.status_ = 'OVER'
-            AND ta.sign_in_status_ IS NOT NULL AND ta.sign_out_status_ IS NOT NULL
-            AND (ta.sign_in_status_ = 0 OR ta.sign_out_status_ = 0 OR (sa.id_ IS NULL OR (sa.status_ != 'NORMAL' AND sa.visit_flag_ = 0))) AND ta.dispose_content_ IS NULL
+            AND (((ta.sign_in_status_ = 0 OR ta.sign_out_status_ = 0) AND ta.dispose_content_ IS NULL) OR (sa.id_ IS NULL OR (sa.status_ != 'NORMAL' AND sa.visit_flag_ = 0)))
+            AND (ta.dispose_content_ IS NOT NULL OR (ta.sign_in_status_ IS NOT NULL AND ta.sign_out_status_ IS NOT NULL))
             AND (cs.new_course_id_ IS NULL OR cs.new_course_id_=cs.id_)
         </if>
         <if test="searchType == 'NO_ATTENDANCE'">

+ 4 - 3
mec-biz/src/main/resources/config/mybatis/IndexBaseMonthDataMapper.xml

@@ -740,11 +740,12 @@
     <select id="getAttendanceError" resultType="int">
 		SELECT COUNT(DISTINCT c.id_) FROM (SELECT cs.id_ FROM course_schedule cs
 		LEFT JOIN teacher_attendance ta ON ta.course_schedule_id_ = cs.id_
-		LEFT JOIN student_attendance sa ON sa.course_schedule_id_ = cs.id_
+		LEFT JOIN course_schedule_student_payment cssp ON cssp.course_schedule_id_ = cs.id_
+		LEFT JOIN student_attendance sa ON sa.course_schedule_id_ = cssp.course_schedule_id_ AND cssp.user_id_ = sa.user_id_
 		WHERE ta.teacher_id_ = cs.actual_teacher_id_
 		AND cs.status_ = 'OVER' AND cs.del_flag_ = 0 AND cs.class_date_ >= '2021-02-01'
-		AND ta.sign_in_status_ IS NOT NULL AND ta.sign_out_status_ IS NOT NULL
-		AND (ta.sign_in_status_ = 0 OR ta.sign_out_status_ = 0 OR (sa.id_ IS NULL OR (sa.status_ != 'NORMAL' AND sa.visit_flag_ = 0))) AND ta.dispose_content_ IS NULL
+		AND (((ta.sign_in_status_ = 0 OR ta.sign_out_status_ = 0) AND ta.dispose_content_ IS NULL) OR (sa.id_ IS NULL OR (sa.status_ != 'NORMAL' AND sa.visit_flag_ = 0)))
+		AND (ta.dispose_content_ IS NOT NULL OR (ta.sign_in_status_ IS NOT NULL AND ta.sign_out_status_ IS NOT NULL))
 		AND (cs.new_course_id_ IS NULL OR cs.new_course_id_=cs.id_)
 		<if test="organIds!=null and organIds.size() > 0">
 			AND cs.organ_id_ IN

+ 6 - 3
mec-biz/src/main/resources/config/mybatis/StudentManageDao.xml

@@ -153,7 +153,7 @@
 
     <select id="findStudentsByOrganId" resultMap="studentManageListDto">
         SELECT o.`name_` organ_name_,s.`user_id_` ,su.`username_` ,su.`phone_` parents_phone_,su.`real_name_` ,su.`gender_` , su.organ_id_,
-		tu.`real_name_` teacher_name_,IF(s.service_tag_=2,0,s.service_tag_) service_tag_ ,s.`operating_tag_` , s.care_package_, s.come_on_package_, suca.`course_balance_` ,
+		tu.`real_name_` teacher_name_,CASE s.service_tag_ WHEN 2 THEN 0 ELSE s.service_tag_ END service_tag_ ,s.`operating_tag_` , s.care_package_, s.come_on_package_, suca.`course_balance_` ,
 		sub.`name_` music_group_subject_ ,su.birthdate_,s.subject_id_list_,s.teacher_id_,case when su.password_ is null then false else true end isActive_,s.is_new_user_,case when sut.user_id_ is null then 0 else 1 end is_signed_contract_
 		FROM `student` s LEFT JOIN `sys_user` su on s.`user_id_` = su.`id_`
 		LEFT JOIN `organization` o on o.`id_` = su.`organ_id_`
@@ -168,8 +168,11 @@
     <sql id="findStudentsByOrganIdSql">
         <where>
                 su.del_flag_ = 0
-            <if test="organId != null and organId != ''">
-                AND FIND_IN_SET(su.organ_id_,#{organId})
+            <if test="organIds != null and organIds.length>0">
+                AND su.organ_id_ IN
+                <foreach collection="organIds" item="organId" open="(" close=")" separator=",">
+                    #{organId}
+                </foreach>
             </if>
             <if test="search != null and search != ''">
                 AND (su.phone_ LIKE CONCAT('%',#{search},'%') OR su.username_ LIKE CONCAT('%',#{search},'%') OR su.id_ LIKE CONCAT('%',#{search},'%'))

+ 2 - 1
mec-biz/src/main/resources/config/mybatis/StudentPaymentOrderMapper.xml

@@ -854,13 +854,14 @@
             <collection property="goodsList" ofType="com.ym.mec.biz.dal.entity.Goods">
                 <result column="goods_id" property="id"/>
                 <result column="goods_name" property="name"/>
+                <result column="complementGoodsIdList" property="complementGoodsIdList"/>
             </collection>
         </collection>
     </resultMap>
     <select id="getUserApplyOrders" resultMap="applyOrderAndDetail" parameterType="map">
         SELECT spo.*,spod.id_ detail_id_,spod.type_ detail_type_,spod.price_
         detail_price_,spod.kit_group_purchase_type_ detail_kit_group_purchase_type_,
-        g.id_ goods_id, g.name_ goods_name
+        g.id_ goods_id, g.name_ goods_name,g.complement_goods_id_list_ complementGoodsIdList
         FROM student_payment_order spo
         LEFT JOIN student_payment_order_detail spod on spo.id_ = spod.payment_order_id_
         LEFT JOIN goods g on FIND_IN_SET(g.id_,spod.goods_id_list_)

+ 195 - 0
mec-biz/src/main/resources/config/mybatis/SysExamSongAccompanimentMapper.xml

@@ -0,0 +1,195 @@
+<?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.biz.dal.dao.SysExamSongAccompanimentDao">
+	
+	<resultMap type="com.ym.mec.biz.dal.entity.SysExamSongAccompaniment" id="SysExamSongAccompaniment">
+		<result column="id_" property="id" />
+		<result column="exam_song_id_" property="examSongId" />
+		<result column="subject_id_" property="subjectId" />
+		<result column="subject_name_" property="subjectName" />
+		<result column="mp3_url_" property="mp3Url" />
+		<result column="xml_url_" property="xmlUrl" />
+		<result column="name_" property="examSongName" />
+		<result column="type_" property="type" />
+		<result column="url_" property="url" />
+		<result column="del_flag_" property="delFlag" />
+		<result column="speed_" property="speed" />
+		<result column="create_time_" property="createTime" />
+		<result column="update_time_" property="updateTime" />
+	</resultMap>
+	
+	<!-- 根据主键查询一条记录 -->
+	<select id="get" resultMap="SysExamSongAccompaniment" >
+		SELECT sesa.*,ses.name_,ses.type_,ses.url_
+		FROM sys_exam_song_accompaniment sesa
+		LEFT JOIN sys_exam_song ses ON ses.id_ = sesa.exam_song_id_
+		WHERE sesa.id_ = #{id}
+	</select>
+	
+	<!-- 全查询 -->
+	<select id="findAll" resultMap="SysExamSongAccompaniment">
+		SELECT * FROM sys_exam_song_accompaniment ORDER BY id_
+	</select>
+	
+	<!-- 向数据库增加一条记录 -->
+	<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.SysExamSongAccompaniment" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
+		INSERT INTO sys_exam_song_accompaniment (exam_song_id_,subject_id_,mp3_url_,xml_url_,speed_,create_time_,update_time_)
+		VALUES(#{examSongId},#{subjectId},#{mp3Url},#{xmlUrl},#{speed},NOW(),NOW())
+	</insert>
+	<insert id="batchInsert">
+		INSERT INTO sys_exam_song_accompaniment (exam_song_id_,subject_id_,mp3_url_,xml_url_,speed_,create_time_,update_time_)
+		VALUES
+		<foreach collection="sysExamSongAccompaniments" item="item"  separator=",">
+			(#{sysExamSongId},#{item.subjectId},#{item.mp3Url},#{item.xmlUrl},#{item.speed},NOW(),NOW())
+		</foreach>
+	</insert>
+
+	<!-- 根据主键查询一条记录 -->
+	<update id="update" parameterType="com.ym.mec.biz.dal.entity.SysExamSongAccompaniment">
+		UPDATE sys_exam_song_accompaniment <set>
+		<if test="subjectId != null">
+		subject_id_ = #{subjectId},
+		</if>
+		<if test="speed != null">
+			speed_ = #{speed},
+		</if>
+		<if test="xmlUrl != null">
+		xml_url_ = #{xmlUrl},
+		</if>
+		<if test="examSongId != null">
+		exam_song_id_ = #{examSongId},
+		</if>
+		<if test="mp3Url != null">
+		mp3_url_ = #{mp3Url},
+		</if>
+		update_time_ = NOW()
+	</set> WHERE id_ = #{id}
+	</update>
+	
+	<!-- 根据主键删除一条记录 -->
+	<update id="delete" >
+		UPDATE sys_exam_song_accompaniment SET del_flag_ = 1,update_time_ = NOW() WHERE id_ = #{id}
+	</update>
+
+	<!-- 根据主键删除一条记录 -->
+	<update id="deleteBySongId" >
+		UPDATE sys_exam_song_accompaniment SET del_flag_ = 1,update_time_ = NOW() WHERE exam_song_id_ = #{examSongId}
+	</update>
+	<update id="batchUpdate">
+		<foreach collection="sysExamSongAccompaniment" item="item" separator=";">
+			UPDATE sys_exam_song_accompaniment
+			<set>
+			<if test="item.speed != null">
+				speed_ = #{item.speed},
+			</if>
+			<if test="item.subjectId != null">
+				subject_id_ = #{item.subjectId},
+			</if>
+			<if test="item.xmlUrl != null">
+				xml_url_ = #{item.xmlUrl},
+			</if>
+			<if test="item.examSongId != null">
+				exam_song_id_ = #{item.examSongId},
+			</if>
+			<if test="item.mp3Url != null">
+				mp3_url_ = #{item.mp3Url},
+			</if>
+			update_time_ = NOW()
+		</set> WHERE id_ = #{item.id}
+		</foreach>
+	</update>
+    <update id="batchDel">
+		UPDATE sys_exam_song_accompaniment SET del_flag_ = 1,update_time_ = NOW() WHERE id_ IN
+		<foreach collection="delExamSongAccompanimentIds" item="item" open="(" close=")" separator=",">
+			#{item}
+		</foreach>
+
+	</update>
+
+    <!-- 分页查询 -->
+	<select id="queryPage" resultMap="SysExamSongAccompaniment" parameterType="map">
+		SELECT sesa.*,s.name_ subject_name_
+		FROM sys_exam_song_accompaniment sesa
+		LEFT JOIN `subject` s ON s.id_ = sesa.subject_id_
+		<where>
+			sesa.del_flag_ = 0
+			<if test="subjectId != null">
+				AND sesa.subject_id_ = #{subjectId}
+			</if>
+			<if test="sysExamSongId != null">
+				AND sesa.exam_song_id_ = #{sysExamSongId}
+			</if>
+		</where>
+		ORDER BY sesa.id_ DESC
+		<include refid="global.limit"/>
+	</select>
+	
+	<!-- 查询当前表的总记录数 -->
+	<select id="queryCount" resultType="int">
+		SELECT COUNT(*) FROM sys_exam_song_accompaniment
+	</select>
+
+	<select id="findSubjectByExamId" resultType="java.lang.Integer">
+		SELECT subject_id_ FROM sys_exam_song_accompaniment
+		<where>
+				del_flag_ = 0
+			<if test="sysExamSongId != null">
+				AND exam_song_id_ = #{sysExamSongId}
+			</if>
+			<if test="examSongAccIds != null and examSongAccIds.size > 0">
+				AND id_ NOT IN
+				<foreach collection="examSongAccIds" open="(" close=")" item="item" separator=",">
+					#{item}
+				</foreach>
+			</if>
+		</where>
+	</select>
+	<select id="queryAccPage" resultMap="SysExamSongAccompaniment">
+		SELECT sesa.*,ses.name_,ses.type_,ses.url_
+		FROM sys_exam_song_accompaniment sesa
+		LEFT JOIN sys_exam_song ses ON ses.id_ = sesa.exam_song_id_
+		<include refid="queryPageSql"/>
+		<include refid="global.limit"/>
+	</select>
+	<select id="findAccCount" resultType="java.lang.Integer">
+		SELECT COUNT(DISTINCT sesa.id_) FROM sys_exam_song_accompaniment sesa
+		LEFT JOIN sys_exam_song ses ON ses.id_ = sesa.exam_song_id_
+		<include refid="queryPageSql"/>
+	</select>
+	<sql id="queryPageSql">
+		<where>
+			sesa.del_flag_ = 0
+			<if test="search != null and search != ''">
+				AND (sesa.id_ = #{search} OR ses.name_ LIKE CONCAT('%',#{search},'%'))
+			</if>
+			<if test="subjectId != null">
+				AND sesa.subject_id_ = #{subjectId}
+			</if>
+			<if test="type != null and type == 'COMMON'">
+				AND ses.type_ = #{type}
+			</if>
+			<if test="type != null and type == 'ALL'">
+				<if test="createUserId != null">
+					AND (ses.type_ = 'COMMON' OR (ses.create_user_id_ = #{createUserId} AND ses.type_ = 'PERSON'))
+				</if>
+			</if>
+			<if test="type != null and type == 'PERSON'">
+				<if test="createUserId != null">
+					AND ses.type_ = #{type} AND ses.create_user_id_ = #{createUserId}
+				</if>
+				<if test="createUserId == null">
+					AND ses.type_ = #{type}
+				</if>
+			</if>
+			<if test="type == null or type == ''">
+				<if test="createUserId != null">
+					AND ses.create_user_id_ = #{createUserId}
+				</if>
+			</if>
+		</where>
+	</sql>
+</mapper>

+ 5 - 6
mec-biz/src/main/resources/config/mybatis/SysExamSongMapper.xml

@@ -62,7 +62,9 @@
 		<if test="speed != null">
 		speed_ = #{speed},
 		</if>
-		update_time_ = NOW()
+		<if test="updateTime != null">
+			update_time_ = NOW()
+		</if>
 		</set>
 		 WHERE id_ = #{id}
 	</update>
@@ -98,16 +100,13 @@
 					AND ses.create_user_id_ = #{createUserId}
 				</if>
 			</if>
-			<if test="subjectId != null">
-				AND FIND_IN_SET(#{subjectId},ses.subject_ids_)
-			</if>
 		</where>
 	</sql>
 	<!-- 分页查询 -->
 	<select id="queryPage" resultMap="SysExamSong" parameterType="map">
-		SELECT ses.*,GROUP_CONCAT(s.name_) subject_names_,su.real_name_ create_user_name_ FROM sys_exam_song ses
+		SELECT ses.*,su.real_name_ create_user_name_
+		FROM sys_exam_song ses
 		LEFT JOIN sys_user su ON ses.create_user_id_ = su.id_
-		LEFT JOIN `subject` s ON FIND_IN_SET(s.id_,ses.subject_ids_)
 		<include refid="queryPageSql"/>
 		GROUP BY ses.id_
 		ORDER BY ses.id_ DESC

+ 1 - 1
mec-student/src/main/java/com/ym/mec/student/controller/StudentOrderController.java

@@ -776,7 +776,7 @@ public class StudentOrderController extends BaseController {
         if (sysUser == null) {
             return failed(HttpStatus.FORBIDDEN, "请登录");
         }
-        return succeed(studentPaymentOrderDao.getUserApplyOrders(sysUser.getId(), musicGroupId));
+        return succeed(studentPaymentOrderService.getUserApplyOrders(sysUser.getId(), musicGroupId));
     }
 
     @GetMapping("/reConfirmOrder")

+ 33 - 0
mec-student/src/main/java/com/ym/mec/student/controller/SysExamSongAccompanimentController.java

@@ -0,0 +1,33 @@
+package com.ym.mec.student.controller;
+
+import com.ym.mec.biz.dal.entity.SysExamSongAccompaniment;
+import com.ym.mec.biz.dal.page.SysExamSongQueryInfo;
+import com.ym.mec.biz.service.SysExamSongAccompanimentService;
+import com.ym.mec.common.controller.BaseController;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+@RequestMapping("sysExamSongAccompaniment")
+@Api(tags = "曲库伴奏服务")
+@RestController
+public class SysExamSongAccompanimentController extends BaseController {
+
+    @Autowired
+    private SysExamSongAccompanimentService sysExamSongAccompanimentService;
+
+    @ApiOperation(value = "分页查询")
+    @GetMapping("/queryPage")
+    public Object queryPage(SysExamSongQueryInfo queryInfo) {
+        queryInfo.setType("COMMON");
+        return succeed(sysExamSongAccompanimentService.queryPage(queryInfo));
+    }
+
+    @ApiOperation(value = "详情")
+    @GetMapping("/getDetail")
+    public Object queryPage(Integer id) {
+        return succeed(sysExamSongAccompanimentService.get(id));
+    }
+
+}

+ 63 - 0
mec-teacher/src/main/java/com/ym/mec/teacher/controller/SysExamSongAccompanimentController.java

@@ -0,0 +1,63 @@
+package com.ym.mec.teacher.controller;
+
+import com.ym.mec.auth.api.client.SysUserFeignService;
+import com.ym.mec.auth.api.entity.SysUser;
+import com.ym.mec.biz.dal.entity.SysExamSongAccompaniment;
+import com.ym.mec.biz.dal.page.SysExamSongQueryInfo;
+import com.ym.mec.biz.service.SysExamSongAccompanimentService;
+import com.ym.mec.common.controller.BaseController;
+import com.ym.mec.common.exception.BizException;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+@RequestMapping("sysExamSongAccompaniment")
+@Api(tags = "曲库伴奏服务")
+@RestController
+public class SysExamSongAccompanimentController extends BaseController {
+
+    @Autowired
+    private SysExamSongAccompanimentService sysExamSongAccompanimentService;
+    @Autowired
+    private SysUserFeignService sysUserFeignService;
+
+    @ApiOperation(value = "修改")
+    @PostMapping("/update")
+    public Object update(@RequestBody SysExamSongAccompaniment sysExamSongAccompaniment) {
+        sysExamSongAccompanimentService.updateAcc(sysExamSongAccompaniment);
+        return succeed();
+    }
+
+    @ApiOperation(value = "删除")
+    @PostMapping("/del/{id}")
+    public Object del(@ApiParam(value = "收费类型编号", required = true) @PathVariable("id") Integer id) {
+        sysExamSongAccompanimentService.delete(id);
+        return succeed();
+    }
+
+    @ApiOperation(value = "分页查询")
+    @GetMapping("/queryPage")
+    public Object queryPage(SysExamSongQueryInfo queryInfo) {
+        String type = queryInfo.getType();
+        if(StringUtils.isEmpty(type)){
+            queryInfo.setType("ALL");
+        }
+        SysUser sysUser = sysUserFeignService.queryUserInfo();
+        if(sysUser == null){
+            throw new BizException("请登录");
+        }
+        queryInfo.setCreateUserId(sysUser.getId());
+        return succeed(sysExamSongAccompanimentService.queryPage(queryInfo));
+    }
+
+    @ApiOperation(value = "详情")
+    @GetMapping("/getDetail")
+    public Object getDetail(Integer id) {
+        return succeed(sysExamSongAccompanimentService.get(id));
+    }
+
+}

+ 0 - 7
mec-teacher/src/main/java/com/ym/mec/teacher/controller/SysExamSongController.java

@@ -25,13 +25,6 @@ public class SysExamSongController extends BaseController {
     @Autowired
     private SysUserFeignService sysUserFeignService;
 
-    @ApiOperation(value = "修改")
-    @PostMapping("/update")
-    public Object update(@RequestBody SysExamSong sysExamSong) {
-        sysExamSongService.update(sysExamSong);
-        return succeed();
-    }
-
     @ApiOperation(value = "新增")
     @PostMapping("/add")
     public Object add(@RequestBody SysExamSong sysExamSong) {

+ 8 - 0
mec-web/src/main/java/com/ym/mec/web/controller/MusicGroupPaymentCalenderDetailController.java

@@ -16,6 +16,7 @@ import io.swagger.annotations.ApiOperation;
 import java.math.BigDecimal;
 import java.util.Arrays;
 import java.util.List;
+import java.util.Set;
 
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -105,6 +106,13 @@ public class MusicGroupPaymentCalenderDetailController extends BaseController {
         return succeed;
     }
 
+    @ApiOperation(value = "发送学员待续费通知")
+    @PostMapping("/sendWaitRenewMessage")
+    @PreAuthorize("@pcs.hasPermissions('musicGroupPaymentCalenderDetail/sendWaitRenewMessage')")
+    public HttpResponseResult sendWaitRenewMessage(Long calenderDetailId, String studentIds) {
+        musicGroupPaymentCalenderDetailService.pushWaitRenewMessage(calenderDetailId,studentIds);
+        return succeed();
+    }
 
     @ApiOperation(value = "未缴费学员列表")
     @GetMapping("/queryArrearageStudents")

+ 45 - 0
mec-web/src/main/java/com/ym/mec/web/controller/SysExamSongAccompanimentController.java

@@ -0,0 +1,45 @@
+package com.ym.mec.web.controller;
+
+import com.ym.mec.biz.dal.entity.SysExamSongAccompaniment;
+import com.ym.mec.biz.dal.page.SysExamSongQueryInfo;
+import com.ym.mec.biz.service.SysExamSongAccompanimentService;
+import com.ym.mec.common.controller.BaseController;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+@RequestMapping("sysExamSongAccompaniment")
+@Api(tags = "曲库伴奏服务")
+@RestController
+public class SysExamSongAccompanimentController extends BaseController {
+
+    @Autowired
+    private SysExamSongAccompanimentService sysExamSongAccompanimentService;
+
+    @ApiOperation(value = "修改")
+    @PostMapping("/update")
+    @PreAuthorize("@pcs.hasPermissions('sysExamSongAccompaniment/update')")
+    public Object update(@RequestBody SysExamSongAccompaniment sysExamSongAccompaniment) {
+        sysExamSongAccompanimentService.updateAcc(sysExamSongAccompaniment);
+        return succeed();
+    }
+
+    @ApiOperation(value = "删除")
+    @PostMapping("/del/{id}")
+    @PreAuthorize("@pcs.hasPermissions('sysExamSongAccompaniment/del')")
+    public Object del(@ApiParam(value = "收费类型编号", required = true) @PathVariable("id") Integer id) {
+        sysExamSongAccompanimentService.delete(id);
+        return succeed();
+    }
+
+    @ApiOperation(value = "分页查询")
+    @GetMapping("/queryPage")
+    @PreAuthorize("@pcs.hasPermissions('sysExamSongAccompaniment/queryPage')")
+    public Object queryPage(SysExamSongQueryInfo queryInfo) {
+        return succeed(sysExamSongAccompanimentService.queryAll(queryInfo));
+    }
+
+}

+ 6 - 12
mec-web/src/main/java/com/ym/mec/web/controller/SysExamSongController.java

@@ -2,6 +2,7 @@ package com.ym.mec.web.controller;
 
 import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.entity.SysUser;
+import com.ym.mec.biz.dal.dto.ExamSongDto;
 import com.ym.mec.biz.dal.entity.SysExamSong;
 import com.ym.mec.biz.dal.page.SysExamSongQueryInfo;
 import com.ym.mec.biz.service.SysExamSongService;
@@ -21,27 +22,20 @@ public class SysExamSongController extends BaseController {
 
     @Autowired
     private SysExamSongService sysExamSongService;
-    @Autowired
-    private SysUserFeignService sysUserFeignService;
 
     @ApiOperation(value = "修改")
     @PostMapping("/update")
     @PreAuthorize("@pcs.hasPermissions('sysExamSong/update')")
-    public Object update(@RequestBody SysExamSong sysExamSong) {
-        sysExamSongService.update(sysExamSong);
+    public Object update(@RequestBody ExamSongDto examSongDto) {
+        sysExamSongService.updateExamSong(examSongDto);
         return succeed();
     }
 
     @ApiOperation(value = "新增")
     @PostMapping("/add")
     @PreAuthorize("@pcs.hasPermissions('sysExamSong/add')")
-    public Object add(@RequestBody SysExamSong sysExamSong) {
-        SysUser sysUser = sysUserFeignService.queryUserInfo();
-        if(sysUser == null){
-            throw new BizException("请登录");
-        }
-        sysExamSong.setCreateUserId(sysUser.getId());
-        sysExamSongService.insert(sysExamSong);
+    public Object add(@RequestBody ExamSongDto examSongDto) {
+        sysExamSongService.add(examSongDto);
         return succeed();
     }
 
@@ -49,7 +43,7 @@ public class SysExamSongController extends BaseController {
     @PostMapping("/del/{id}")
     @PreAuthorize("@pcs.hasPermissions('sysExamSong/del')")
     public Object del(@ApiParam(value = "收费类型编号", required = true) @PathVariable("id") Integer id) {
-        sysExamSongService.delete(id);
+        sysExamSongService.del(id);
         return succeed();
     }