Browse Source

Merge branch 'master' of http://git.dayaedu.com/yonge/mec

yonge 5 năm trước cách đây
mục cha
commit
33e2202378
19 tập tin đã thay đổi với 197 bổ sung83 xóa
  1. 7 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/MusicGroupPaymentEntitiesDao.java
  2. 6 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/SubjectDao.java
  3. 14 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/StudentRegistration.java
  4. 7 0
      mec-biz/src/main/java/com/ym/mec/biz/service/MusicGroupService.java
  5. 6 0
      mec-biz/src/main/java/com/ym/mec/biz/service/SubjectService.java
  6. 2 2
      mec-biz/src/main/java/com/ym/mec/biz/service/VipGroupService.java
  7. 38 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java
  8. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleTeacherSalaryServiceImpl.java
  9. 14 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupServiceImpl.java
  10. 30 26
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentWithdrawServiceImpl.java
  11. 5 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/SubjectServiceImpl.java
  12. 38 43
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupServiceImpl.java
  13. 3 0
      mec-biz/src/main/resources/config/mybatis/MusicGroupPaymentEntitiesMapper.xml
  14. 1 0
      mec-biz/src/main/resources/config/mybatis/StudentManageDao.xml
  15. 2 1
      mec-biz/src/main/resources/config/mybatis/StudentPaymentOrderMapper.xml
  16. 3 5
      mec-biz/src/main/resources/config/mybatis/SubjectMapper.xml
  17. 3 3
      mec-biz/src/main/resources/config/mybatis/TeacherMapper.xml
  18. 6 0
      mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherSubjectController.java
  19. 11 0
      mec-web/src/main/java/com/ym/mec/web/controller/MusicGroupController.java

+ 7 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/MusicGroupPaymentEntitiesDao.java

@@ -18,4 +18,11 @@ public interface MusicGroupPaymentEntitiesDao extends BaseDAO<Integer, MusicGrou
      * @param musicGroupId
      */
     void delByGroupId(String musicGroupId);
+
+    /**
+     * 根据乐团编号查询
+     * @param musicGroupId
+     * @return
+     */
+    List<MusicGroupPaymentEntities> findByMusicGroupId(String musicGroupId);
 }

+ 6 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/SubjectDao.java

@@ -86,4 +86,10 @@ public interface SubjectDao extends BaseDAO<Integer, Subject> {
      * @describe 根据科目编号获取部门编号,部门名称
      */
     List<Map<Long,String>> findBySubjecIds(@Param("subjectIds") List<String> subjectIds);
+
+    /**
+     * 获取子级列表
+     * @return
+     */
+    List<Subject> findSubSubjects();
 }

+ 14 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/StudentRegistration.java

@@ -7,6 +7,8 @@ import io.swagger.annotations.ApiModelProperty;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 
 import java.math.BigDecimal;
+import java.sql.DatabaseMetaData;
+import java.sql.Date;
 
 /**
  * 对应数据库表(student_registration):
@@ -70,6 +72,9 @@ public class StudentRegistration {
     @ApiModelProperty(value = "家长单位", required = false)
     private String parentsCompany;
 
+    @ApiModelProperty(value = "生日", required = false)
+    private Date birthdate;
+
     @ApiModelProperty(value = "缴费状态(1-已缴费 0-未交费)", required = false)
     private YesOrNoEnum paymentStatus;
 
@@ -86,6 +91,15 @@ public class StudentRegistration {
         return musicGroupStatus;
     }
 
+
+    public Date getBirthdate() {
+        return birthdate;
+    }
+
+    public void setBirthdate(Date birthdate) {
+        this.birthdate = birthdate;
+    }
+
     public void setMusicGroupStatus(ClassGroupStudentStatusEnum musicGroupStatus) {
         this.musicGroupStatus = musicGroupStatus;
     }

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

@@ -134,4 +134,11 @@ public interface MusicGroupService extends BaseService<String, MusicGroup> {
 	 * @param subFeeSettingDto
 	 */
 	void updateBaseInfo(SubFeeSettingDto subFeeSettingDto);
+
+	/**
+	 * 获取修改乐团时的基本信息数据
+	 * @param musicGroupId
+	 * @return
+	 */
+	SubFeeSettingDto findMusicGroupBasicInfo(String musicGroupId);
 }

+ 6 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/SubjectService.java

@@ -76,4 +76,10 @@ public interface SubjectService extends BaseService<Integer, Subject> {
      * @describe 根据部门编号列表获取部门编号,名称map
      */
     Map<Long,String> findSubjectMapBySubjectIdsList(List<String> subjectIdsList);
+
+    /**
+     * 获取子级科目列表
+     * @return
+     */
+    List<Subject> findSubSubjects();
 }

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

@@ -136,8 +136,8 @@ public interface VipGroupService extends BaseService<Long, VipGroup> {
      * @describe 更新vip课班级人数及状态
      * @author Joburgess
      * @date 2019/10/20
-     * @param vipGroupId:
-     * @param num:
+     * @param vipGroupId: vip课编号
+     * @param num: 人数
      * @return void
      */
     void updateVipGroupStudentNumAndStatus(Long vipGroupId,Integer num);

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

@@ -12,6 +12,7 @@ import com.ym.mec.biz.dal.page.CourseScheduleQueryInfo;
 import com.ym.mec.biz.dal.page.StudentCourseScheduleRecordQueryInfo;
 import com.ym.mec.biz.service.ClassGroupService;
 import com.ym.mec.biz.service.CourseScheduleService;
+import com.ym.mec.biz.service.CourseScheduleTeacherSalaryService;
 import com.ym.mec.biz.service.SysConfigService;
 import com.ym.mec.biz.service.SysMessageService;
 import com.ym.mec.common.dal.BaseDAO;
@@ -54,6 +55,12 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 	@Autowired
 	private SysMessageService sysMessageService;
 	@Autowired
+	private CourseScheduleTeacherSalaryService courseScheduleTeacherSalaryService;
+	@Autowired
+	private VipGroupDao vipGroupDao;
+	@Autowired
+	private TeacherDefaultVipGroupSalaryDao teacherDefaultVipGroupSalaryDao;
+	@Autowired
 	private CourseScheduleTeacherSalaryDao courseScheduleTeacherSalaryDao;
 	
 	@Autowired
@@ -346,11 +353,28 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 				checkStudentIsRepeat(repeatClassGroupIds);
 				courseScheduleDao.update(newCourseSchedule);
 			}
-			if(oldCourseSchedule.getType()== CourseSchedule.CourseScheduleType.VIP){
-				if(!oldCourseSchedule.getActualTeacherId().equals(newCourseSchedule.getActualTeacherId())){
 
+			//被修改的教师编号列表,需要将预计薪水置零
+			List<Integer> beReplaceTeacherIds=new ArrayList<>();
+
+			if(oldCourseSchedule.getType()== CourseSchedule.CourseScheduleType.VIP){
+				if(Objects.isNull(oldCourseSchedule.getActualTeacherId())||!oldCourseSchedule.getActualTeacherId().equals(newCourseSchedule.getActualTeacherId())){
+					VipGroup byCourseSchedule = vipGroupDao.findByCourseSchedule(newCourseSchedule.getId().intValue());
+					TeacherDefaultVipGroupSalary byTeacherAndCategory = teacherDefaultVipGroupSalaryDao.findByTeacherAndCategory(newCourseSchedule.getActualTeacherId(), byCourseSchedule.getVipGroupCategoryId());
+					List<CourseSchedule> courseSchedules=new ArrayList<>();
+					coursesByDates.add(newCourseSchedule);
+					courseScheduleTeacherSalaryService.createCourseScheduleTeacherVipSalary(byCourseSchedule,
+							courseSchedules,
+							byTeacherAndCategory.getOnlineClassesSalary(),
+							byTeacherAndCategory.getOfflineClassesSalary());
+					beReplaceTeacherIds.add(oldCourseSchedule.getActualTeacherId().intValue());
 				}
 			}else{
+				if(Objects.isNull(oldCourseSchedule.getActualTeacherId())||!oldCourseSchedule.getActualTeacherId().equals(newCourseSchedule.getActualTeacherId())){
+					//如果主教被修改则调整课酬记录
+
+					beReplaceTeacherIds.add(oldCourseSchedule.getActualTeacherId().intValue());
+				}
 				List<CourseScheduleTeacherSalary> courseTeachingTeacherList=courseTeachingTeacherMaps.get(newCourseSchedule.getId());
 				//当前设置的课程助教编号列表
 				List<Integer> currentCourseTeachingTeacherIds=new ArrayList<>();
@@ -361,7 +385,19 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 				List<Integer> newTeachingTeacherIdList = newCourseSchedule.getTeachingTeacherIdList();
 				//找出重复的助教编号
 				List<Integer> foundInCurrentCourseTeachingTeacherIds = newTeachingTeacherIdList.stream().filter(currentCourseTeachingTeacherIds::contains).collect(Collectors.toList());
+
+				newTeachingTeacherIdList.forEach(newTeacherId->{
+					//如果不在重复列表中,则需要生成对应的课酬记录
+					if(!foundInCurrentCourseTeachingTeacherIds.contains(newTeacherId)){
+						//计算修改后的助教的课酬
+
+
+						beReplaceTeacherIds.add(oldCourseSchedule.getActualTeacherId().intValue());
+					}
+				});
 			}
+			//将被修改的教师预计薪水置零
+			courseScheduleTeacherSalaryDao.batchUpdateTeacherExpectSalary(newCourseSchedule.getId().intValue(),beReplaceTeacherIds);
 		});
 	}
 

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

@@ -69,7 +69,7 @@ public class CourseScheduleTeacherSalaryServiceImpl extends BaseServiceImpl<Long
 				CourseScheduleTeacherSalary courseScheduleTeacherSalary=new CourseScheduleTeacherSalary();
 				courseScheduleTeacherSalary.setCourseScheduleId(courseSchedules.get(i).getId());
 				courseScheduleTeacherSalary.setTeacherRole(TeachTypeEnum.BISHOP);
-				courseScheduleTeacherSalary.setUserId(vipGroup.getUserId());
+				courseScheduleTeacherSalary.setUserId(courseSchedules.get(i).getActualTeacherId().intValue());
 				courseScheduleTeacherSalary.setClassGroupId(courseSchedules.get(i).getClassGroupId());
 
 				Map<String,BigDecimal> feeInfo = vipGroupService.countVipGroupPredictFee(vipGroup,

+ 14 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupServiceImpl.java

@@ -21,6 +21,7 @@ import com.ym.mec.common.service.impl.BaseServiceImpl;
 import com.ym.mec.im.ImFeignService;
 import com.ym.mec.util.collection.MapUtil;
 
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Propagation;
@@ -568,4 +569,17 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
 			musicGroupPaymentCalenderDao.batchAdd(calender,musicGroupId);
 		}
 	}
+
+	@Override
+	public SubFeeSettingDto findMusicGroupBasicInfo(String musicGroupId) {
+		SubFeeSettingDto subFeeSettingDto = new SubFeeSettingDto();
+		//获取乐团信息
+		subFeeSettingDto.setMusicGroup(musicGroupDao.get(musicGroupId));
+		//获取付费主体
+		subFeeSettingDto.setMusicGroupPaymentEntities(musicGroupPaymentEntitiesDao.findByMusicGroupId(musicGroupId));
+		//获取缴费周期
+		List<Integer> paymentMonth = musicGroupPaymentCalenderDao.findByMusicGroupId(musicGroupId).stream().map(e -> e.getPaymentMonth()).collect(Collectors.toList());
+		subFeeSettingDto.setMonths(paymentMonth);
+		return subFeeSettingDto;
+	}
 }

+ 30 - 26
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentWithdrawServiceImpl.java

@@ -9,6 +9,7 @@ import com.ym.mec.biz.dal.dto.WithdrawInfoDto;
 import com.ym.mec.biz.dal.entity.StudentWithdraw;
 import com.ym.mec.biz.dal.entity.SysUserCashAccount;
 import com.ym.mec.biz.dal.entity.SysUserCashAccountDetail;
+import com.ym.mec.biz.dal.enums.DealStatusEnum;
 import com.ym.mec.biz.dal.enums.PlatformCashAccountDetailTypeEnum;
 import com.ym.mec.biz.dal.enums.PlatformCashAccountStatusEnum;
 import com.ym.mec.biz.dal.enums.TransTypeEnum;
@@ -51,9 +52,6 @@ public class StudentWithdrawServiceImpl extends BaseServiceImpl<String, StudentW
 
 	private static final Logger log = LoggerFactory.getLogger(StudentWithdrawServiceImpl.class);
 
-//	@Qualifier("auth-server")
-//	@Autowired
-//	private SysUserFeignService sysUserFeignService;
 	@Autowired
 	private SysUserCashAccountService cashAccountService;
 	@Autowired
@@ -78,9 +76,13 @@ public class StudentWithdrawServiceImpl extends BaseServiceImpl<String, StudentW
 			}
 			//第三方提现到用户银行卡
 			//用户个人虚拟账户金额减少
-			updateCashAccount(sysUserCashAccount, withdrawDto);
+
+//			updateCashAccount(sysUserCashAccount, withdrawDto);
 			//生成提现记录(缺少银行流水号,交易状态,用户承担的费用,平台承担的费用)
-			saveStudentWithdraw(withdrawDto);
+			Integer withdrawId = saveStudentWithdraw(withdrawDto);
+
+			accountDetailService.addCashAccountDetail(withdrawDto.getUserId(),withdrawDto.getAmount(),withdrawId +"","",
+					PlatformCashAccountDetailTypeEnum.WITHDRAW,TransTypeEnum.FAST_PAYMENT, DealStatusEnum.ING,"");
 		} catch (Exception e) {
 			log.error("用户提现出现异常 {}", e.getMessage(), e);
 			throw new BizException(e.getMessage());
@@ -89,6 +91,26 @@ public class StudentWithdrawServiceImpl extends BaseServiceImpl<String, StudentW
 		}
 		return true;
 	}
+	/**
+	 * 修改用户账户余额,保存账户明细
+	 *
+	 * @param withdrawDto
+	 */
+	private void updateCashAccount(SysUserCashAccount sysUserCashAccount, WithdrawDto withdrawDto) {
+		BigDecimal balance = sysUserCashAccount.getBalance().subtract(withdrawDto.getAmount());
+		SysUserCashAccount account = new SysUserCashAccount();
+		account.setUserId(sysUserCashAccount.getUserId());
+		account.setBalance(balance);
+		account.setUpdateTime(new Date());
+		cashAccountService.update(account);
+		SysUserCashAccountDetail cashAccountDetail = new SysUserCashAccountDetail();
+		cashAccountDetail.setUserId(withdrawDto.getUserId());
+		cashAccountDetail.setType(PlatformCashAccountDetailTypeEnum.WITHDRAW);
+		cashAccountDetail.setAmount(withdrawDto.getAmount());
+		cashAccountDetail.setBalance(balance);
+		cashAccountDetail.setCreateTime(new Date());
+		cashAccountDetailService.insert(cashAccountDetail);
+	}
 
 	@Override
 	public PageInfo<WithdrawInfoDto> queryWithdrawPage(CashAccountDetail cashAccountDetail) {
@@ -146,33 +168,14 @@ public class StudentWithdrawServiceImpl extends BaseServiceImpl<String, StudentW
 		}
 	}
 
-	/**
-	 * 修改用户账户余额,保存账户明细
-	 *
-	 * @param withdrawDto
-	 */
-	private void updateCashAccount(SysUserCashAccount sysUserCashAccount, WithdrawDto withdrawDto) {
-		BigDecimal balance = sysUserCashAccount.getBalance().subtract(withdrawDto.getAmount());
-		SysUserCashAccount account = new SysUserCashAccount();
-		account.setUserId(sysUserCashAccount.getUserId());
-		account.setBalance(balance);
-		account.setUpdateTime(new Date());
-		cashAccountService.update(account);
-		SysUserCashAccountDetail cashAccountDetail = new SysUserCashAccountDetail();
-		cashAccountDetail.setUserId(withdrawDto.getUserId());
-		cashAccountDetail.setType(PlatformCashAccountDetailTypeEnum.WITHDRAW);
-		cashAccountDetail.setAmount(withdrawDto.getAmount());
-		cashAccountDetail.setBalance(balance);
-		cashAccountDetail.setCreateTime(new Date());
-		cashAccountDetailService.insert(cashAccountDetail);
-	}
+
 
 	/**
 	 * 保存提现记录
 	 *
 	 * @param withdrawDto
 	 */
-	private void saveStudentWithdraw(WithdrawDto withdrawDto) {
+	private Integer saveStudentWithdraw(WithdrawDto withdrawDto) {
 		IdWorker idWorker = new IdWorker(0, 0);
 		StudentWithdraw studentWithdraw = new StudentWithdraw();
 		studentWithdraw.setWithdrawNo(idWorker.nextId());
@@ -181,6 +184,7 @@ public class StudentWithdrawServiceImpl extends BaseServiceImpl<String, StudentW
 		studentWithdraw.setAmount(withdrawDto.getAmount());
 		studentWithdraw.setCreateTime(new Date());
 		insert(studentWithdraw);
+		return studentWithdraw.getId();
 	}
 
 }

+ 5 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/SubjectServiceImpl.java

@@ -155,4 +155,9 @@ public class SubjectServiceImpl extends BaseServiceImpl<Integer, Subject>  imple
         Map<Long,String> subjectIdAndName = MapUtil.convertMybatisMap(bySubjecIds);
         return subjectIdAndName;
     }
+
+    @Override
+    public List<Subject> findSubSubjects() {
+        return subjectDao.findSubSubjects();
+    }
 }

+ 38 - 43
mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupServiceImpl.java

@@ -465,6 +465,10 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 		TeacherDefaultVipGroupSalary teacherDefaultVipGroupSalary = teacherDefaultVipGroupSalaryDao.findByTeacherAndCategory(teacherId.longValue(),
 				vipGroup.getVipGroupCategoryId());
 
+		if(Objects.isNull(vipGroup.getVipGroupActivityId())){
+			throw new BizException("请指定活动方案");
+		}
+
 		VipGroupActivity vipGroupActivity = vipGroupActivityDao.get(vipGroup.getVipGroupActivityId().intValue());
 
 		if(Objects.isNull(vipGroupActivity)){
@@ -487,51 +491,42 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 		BigDecimal onlineVipGroupCharge = onlineClassesUnitPrice.multiply(onlineClassNum);
 		BigDecimal offlineVipGroupCharge = offlineClassesUnitPrice.multiply(offlineClassNum);
 
-		if(vipGroup.getOnlineClassesNum()>0){
-			//教师课酬线上单课酬计算
-			switch (vipGroupSalarySettlementDto.getOnlineSalarySettlement().getSalarySettlementType()){
-				case TEACHER_DEFAULT:
-					if(Objects.isNull(teacherDefaultVipGroupSalary)){
-						throw new BizException("未设置教师默认课酬");
-					}
-					results.put("onlineTeacherSalary",teacherDefaultVipGroupSalary.getOfflineClassesSalary().multiply(classTimeDuty));
-					break;
-				case RATIO_DISCOUNT:
-					results.put("onlineTeacherSalary",onlineClassesUnitPrice.multiply((vipGroupSalarySettlementDto.getOnlineSalarySettlement().getSettlementValue())));
-					break;
-				case FIXED_SALARY:
-					results.put("onlineTeacherSalary",vipGroupSalarySettlementDto.getOnlineSalarySettlement().getSettlementValue());
-					break;
-				default:
-					throw new BizException("未指定课酬结算标准!");
-			}
-		}else{
-			results.put("onlineTeacherSalary",new BigDecimal(0));
-		}
-
-		if(vipGroup.getOfflineClassesNum()>0){
-			//教师线下单课酬计算
-			switch (vipGroupSalarySettlementDto.getOfflineSalarySettlement().getSalarySettlementType()){
-				case TEACHER_DEFAULT:
-					if(Objects.isNull(teacherDefaultVipGroupSalary)){
-						throw new BizException("未设置教师默认课酬");
-					}
-					results.put("offlineTeacherSalary",teacherDefaultVipGroupSalary.getOfflineClassesSalary().multiply(classTimeDuty));
-					break;
-				case RATIO_DISCOUNT:
-					results.put("offlineTeacherSalary",offlineClassesUnitPrice.multiply(vipGroupSalarySettlementDto.getOfflineSalarySettlement().getSettlementValue()));
-					break;
-				case FIXED_SALARY:
-					results.put("offlineTeacherSalary",vipGroupSalarySettlementDto.getOfflineSalarySettlement().getSettlementValue());
-					break;
-				default:
-					throw new BizException("未指定课酬结算标准!");
-			}
-		}else{
-			results.put("offlineTeacherSalary",new BigDecimal(0));
+		//教师课酬线上单课酬计算
+		switch (vipGroupSalarySettlementDto.getOnlineSalarySettlement().getSalarySettlementType()){
+			case TEACHER_DEFAULT:
+				if(Objects.isNull(teacherDefaultVipGroupSalary)){
+					throw new BizException("未设置教师默认课酬");
+				}
+				results.put("onlineTeacherSalary",teacherDefaultVipGroupSalary.getOfflineClassesSalary().multiply(classTimeDuty));
+				break;
+			case RATIO_DISCOUNT:
+				results.put("onlineTeacherSalary",onlineClassesUnitPrice.multiply((vipGroupSalarySettlementDto.getOnlineSalarySettlement().getSettlementValue())));
+				break;
+			case FIXED_SALARY:
+				results.put("onlineTeacherSalary",vipGroupSalarySettlementDto.getOnlineSalarySettlement().getSettlementValue());
+				break;
+			default:
+				throw new BizException("未指定课酬结算标准!");
+		}
+
+		//教师线下单课酬计算
+		switch (vipGroupSalarySettlementDto.getOfflineSalarySettlement().getSalarySettlementType()){
+			case TEACHER_DEFAULT:
+				if(Objects.isNull(teacherDefaultVipGroupSalary)){
+					throw new BizException("未设置教师默认课酬");
+				}
+				results.put("offlineTeacherSalary",teacherDefaultVipGroupSalary.getOfflineClassesSalary().multiply(classTimeDuty));
+				break;
+			case RATIO_DISCOUNT:
+				results.put("offlineTeacherSalary",offlineClassesUnitPrice.multiply(vipGroupSalarySettlementDto.getOfflineSalarySettlement().getSettlementValue()));
+				break;
+			case FIXED_SALARY:
+				results.put("offlineTeacherSalary",vipGroupSalarySettlementDto.getOfflineSalarySettlement().getSettlementValue());
+				break;
+			default:
+				throw new BizException("未指定课酬结算标准!");
 		}
 
-
 		if(computeTotalPrice){
 			//课程购买费用计算
 			BigDecimal totalPrice;

+ 3 - 0
mec-biz/src/main/resources/config/mybatis/MusicGroupPaymentEntitiesMapper.xml

@@ -83,4 +83,7 @@
 	<select id="queryCount" resultType="int">
 		SELECT COUNT(*) FROM music_group_payment_entities
 	</select>
+    <select id="findByMusicGroupId" resultMap="MusicGroupPaymentEntities">
+		SELECT * FROM music_group_payment_entities WHERE music_group_id_ = #{musicGroupId}
+	</select>
 </mapper>

+ 1 - 0
mec-biz/src/main/resources/config/mybatis/StudentManageDao.xml

@@ -328,6 +328,7 @@
         LEFT JOIN `subject` s ON s.id_ = sr.actual_subject_id_
         LEFT JOIN music_group mg ON sr.music_group_id_ = mg.id_
         <include refid="queryMusicGroupStudentSql"/>
+        ORDER BY sr.create_time_ DESC
         <include refid="global.limit"/>
     </select>
     <select id="countMusicGroupStudent" resultType="java.lang.Integer">

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

@@ -144,7 +144,8 @@
 
     <!-- 分页查询 -->
     <select id="queryPage" resultMap="PaymentOrderAndStudentInfo" parameterType="map">
-        SELECT spo.*,u.username_ FROM student_payment_order spo left join sys_user u on spo.user_id_ = u.id_
+        SELECT spo.*,u.username_ FROM student_payment_order spo
+        left join sys_user u on spo.user_id_ = u.id_
         <include refid="queryPaymentOrder"/>
         ORDER BY spo.id_
         <include refid="global.limit"/>

+ 3 - 5
mec-biz/src/main/resources/config/mybatis/SubjectMapper.xml

@@ -29,11 +29,6 @@
     <!-- 向数据库增加一条记录 -->
     <insert id="insert" parameterType="com.ym.mec.biz.dal.entity.Subject" useGeneratedKeys="true" keyColumn="id"
             keyProperty="id">
-        <!--
-        <selectKey resultClass="int" keyProperty="id" >
-        SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL
-        </selectKey>
-        -->
         INSERT INTO subject (id_,name_,code_,parent_subject_id_,create_time_,update_time_)
         VALUES(#{id},#{name},#{code},#{parentSubjectId},now(),now())
     </insert>
@@ -138,6 +133,9 @@
             #{subjectId}
         </foreach>
     </select>
+    <select id="findSubSubjects" resultMap="Subject">
+        SELECT * FROM `subject` WHERE parent_subject_id_ != 0
+    </select>
 
     <sql id="querySubPageSql">
         <where>

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

@@ -54,7 +54,7 @@
         su.gender_,su.nation_,su.birthdate_,su.email_,su.im_token_
         FROM teacher t
         LEFT JOIN sys_user su ON t.id_ = su.id_
-        WHERE t.id_ = #{userId} AND su.del_flag_ = 0
+        WHERE t.id_ = #{id} AND su.del_flag_ = 0
     </select>
 
     <!-- 全查询 -->
@@ -133,12 +133,12 @@
                 introduction_ = #{introduction},
             </if>
         </set>
-        WHERE id_ = #{userId}
+        WHERE id_ = #{id}
     </update>
 
     <!-- 根据主键删除一条记录 -->
     <update id="delete">
-        DELETE FROM teacher WHERE id_ = #{userId}
+        DELETE FROM teacher WHERE id_ = #{id}
     </update>
 
     <update id="updateUser" parameterType="com.ym.mec.auth.api.entity.SysUser">

+ 6 - 0
mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherSubjectController.java

@@ -27,4 +27,10 @@ public class TeacherSubjectController extends BaseController {
         return succeed(subjectService.findTeacherSubjects());
     }
 
+    @ApiOperation(value = "获取子集科目列表")
+    @GetMapping("/findSubSubjects")
+    public Object findSubSubjects(){
+        return succeed(subjectService.findSubSubjects());
+    }
+
 }

+ 11 - 0
mec-web/src/main/java/com/ym/mec/web/controller/MusicGroupController.java

@@ -8,6 +8,7 @@ import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.page.QueryInfo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+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.*;
@@ -30,6 +31,16 @@ public class MusicGroupController extends BaseController {
         return succeed();
     }
 
+    @ApiOperation(value = "获取乐团调整--基本信息数据")
+    @PostMapping("/findMusicGroupBasicInfo")
+    @PreAuthorize("@pcs.hasPermissions('musicGroup/findMusicGroupBasicInfo')")
+    public Object findMusicGroupBasicInfo(String musicGroupId){
+        if(StringUtils.isEmpty(musicGroupId)){
+            return failed("参数校验失败");
+        }
+        return succeed(musicGroupService.findMusicGroupBasicInfo(musicGroupId));
+    }
+
     @ApiOperation(value = "根据乐团编号查询乐团详情")
     @GetMapping("/get")
     @PreAuthorize("@pcs.hasPermissions('musicGroup/get')")