Переглянути джерело

Merge remote-tracking branch 'origin/master'

Joburgess 4 роки тому
батько
коміт
ddc3662fca
32 змінених файлів з 120 додано та 167 видалено
  1. 9 4
      codegen/pom.xml
  2. 0 1
      mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/service/impl/SysMenuServiceImpl.java
  3. 3 3
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/ClassGroupDao.java
  4. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/LuckDrawPrize.java
  5. 0 2
      mec-biz/src/main/java/com/ym/mec/biz/service/MusicGroupPaymentCalenderCourseSettingsService.java
  6. 0 6
      mec-biz/src/main/java/com/ym/mec/biz/service/MusicGroupPaymentCalenderService.java
  7. 2 3
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/ClassGroupServiceImpl.java
  8. 25 17
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/EmployeeServiceImpl.java
  9. 3 3
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/LuckDrawPrizeServiceImpl.java
  10. 7 64
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupPaymentCalenderServiceImpl.java
  11. 2 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupServiceImpl.java
  12. 3 3
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/PayServiceImpl.java
  13. 10 10
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/SellOrderServiceImpl.java
  14. 2 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentPaymentRouteOrderServiceImpl.java
  15. 2 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentRegistrationServiceImpl.java
  16. 4 4
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/SubjectChangeServiceImpl.java
  17. 24 20
      mec-biz/src/main/resources/config/mybatis/ClassGroupMapper.xml
  18. 1 1
      mec-biz/src/main/resources/config/mybatis/MusicGroupPaymentCalenderMapper.xml
  19. 1 1
      mec-biz/src/main/resources/config/mybatis/SellOrderMapper.xml
  20. 1 0
      mec-biz/src/main/resources/config/mybatis/StudentPaymentOrderMapper.xml
  21. 0 1
      mec-im/src/main/java/com/ym/service/Impl/RoomServiceImpl.java
  22. 0 8
      mec-web/src/main/java/com/ym/mec/web/controller/EmployeeController.java
  23. 6 0
      pom.xml
  24. 5 0
      workflowy/pom.xml
  25. 2 2
      workflowy/src/main/java/org/snaker/engine/access/AbstractDBAccess.java
  26. 1 1
      workflowy/src/main/java/org/snaker/engine/access/Page.java
  27. 1 1
      workflowy/src/main/java/org/snaker/engine/access/QueryFilter.java
  28. 1 1
      workflowy/src/main/java/org/snaker/engine/access/dialect/SQLServerDialect.java
  29. 1 1
      workflowy/src/main/java/org/snaker/engine/core/OrderService.java
  30. 1 1
      workflowy/src/main/java/org/snaker/engine/helper/StringHelper.java
  31. 1 1
      workflowy/src/main/java/org/snaker/engine/impl/SchedulerInterceptor.java
  32. 1 1
      workflowy/src/main/java/org/snaker/engine/parser/impl/SubProcessParser.java

+ 9 - 4
codegen/pom.xml

@@ -23,10 +23,15 @@
 			<groupId>org.freemarker</groupId>
 			<artifactId>freemarker</artifactId>
 		</dependency>
-		
+
 		<dependency>
-            <groupId>mysql</groupId>
-            <artifactId>mysql-connector-java</artifactId>
-        </dependency>
+			<groupId>mysql</groupId>
+			<artifactId>mysql-connector-java</artifactId>
+		</dependency>
+
+		<dependency>
+			<groupId>com.ym</groupId>
+			<artifactId>mec-util</artifactId>
+		</dependency>
 	</dependencies>
 </project>

+ 0 - 1
mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/service/impl/SysMenuServiceImpl.java

@@ -3,7 +3,6 @@ package com.ym.mec.auth.service.impl;
 import java.util.List;
 import java.util.stream.Collectors;
 
-import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 

+ 3 - 3
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/ClassGroupDao.java

@@ -240,7 +240,7 @@ public interface ClassGroupDao extends BaseDAO<Integer, ClassGroup> {
      * @param userId
      * @return
      */
-    List<ImGroupModel> queryEducationGroups(@Param("userId") Integer userId);
+    List<ImGroupModel> queryEducationGroups(@Param("userId") Integer userId, @Param("organId") Integer organId);
 
     /**
      * 获取运营主管关联的群列表
@@ -248,7 +248,7 @@ public interface ClassGroupDao extends BaseDAO<Integer, ClassGroup> {
      * @param userId
      * @return
      */
-    List<ImGroupModel> queryTeamTeacherGroups(@Param("userId") Integer userId);
+    List<ImGroupModel> queryTeamTeacherGroups(@Param("userId") Integer userId, @Param("organId") Integer organId);
 
     /**
      * 获取乐队指导关联的群列表
@@ -256,7 +256,7 @@ public interface ClassGroupDao extends BaseDAO<Integer, ClassGroup> {
      * @param userId
      * @return
      */
-    List<ImGroupModel> queryDirectorGroups(@Param("userId") Integer userId);
+    List<ImGroupModel> queryDirectorGroups(@Param("userId") Integer userId, @Param("organId") Integer organId);
 
     /**
      * 获取未分配合奏的单技班列表

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

@@ -2,7 +2,7 @@ package com.ym.mec.biz.dal.entity;
 
 import java.util.Date;
 
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
 
 import com.ym.mec.common.enums.BaseEnum;
 

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

@@ -1,9 +1,7 @@
 package com.ym.mec.biz.service;
 
-import com.ym.mec.biz.dal.entity.MusicGroupOrganizationCourseSettingsDetail;
 import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalenderCourseSettings;
 import com.ym.mec.common.service.BaseService;
-
 import java.util.List;
 import java.util.Map;
 

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

@@ -55,12 +55,6 @@ public interface MusicGroupPaymentCalenderService extends BaseService<Long, Musi
 	void batchInsert(List<MusicGroupPaymentCalender> musicGroupPaymentCalenders);
 
 	/**
-	 * 修改缴费日期
-	 * @param paymentCalender
-	 */
-    void updateStartTime(MusicGroupPaymentCalender paymentCalender);
-
-	/**
 	 * 删除
 	 * @param id
 	 */

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

@@ -3361,9 +3361,8 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
                         if (defaultUnitPrice == null) {
                             throw new BizException("请先设置分部课程类型单价");
                         }
-                        if (courseSettings.getCourseCurrentPrice()
-                                .divide(new BigDecimal(courseSettings.getCourseTotalMinuties()), CommonConstants.DECIMAL_FINAL_PLACE, BigDecimal.ROUND_DOWN)
-                                .compareTo(defaultUnitPrice.getUnitPrice()) != 0) {
+                        if (defaultUnitPrice.getUnitPrice().multiply(new BigDecimal(courseSettings.getCourseTotalMinuties())).setScale(0, BigDecimal.ROUND_HALF_UP)
+                                .compareTo(courseSettings.getCourseCurrentPrice()) != 0) {
                             status = AUDITING;
                             break;
                         }

+ 25 - 17
mec-biz/src/main/java/com/ym/mec/biz/service/impl/EmployeeServiceImpl.java

@@ -216,6 +216,7 @@ public class EmployeeServiceImpl extends BaseServiceImpl<Integer, Employee>  imp
 	}
 
 	@Override
+	@Transactional(rollbackFor = Exception.class)
 	public void level(List<EmployeeLevelDto> employeeLevelDtos) {
 		Integer levelUserId = employeeLevelDtos.get(0).getLevelUserId();
 		List<ImGroupModel> imGroupModels = new ArrayList<>();
@@ -227,25 +228,32 @@ public class EmployeeServiceImpl extends BaseServiceImpl<Integer, Employee>  imp
 			Map<Integer, List<EmployeeLevelDto>> organIdMap = levelDtos.stream().collect(Collectors.groupingBy(e -> e.getOrganId()));
 			Set<Integer> organIds = organIdMap.keySet();
 			for (Integer organId : organIds) {
-
+				List<EmployeeLevelDto> levelDtoList = organIdMap.get(organId);
+				for (EmployeeLevelDto employeeLevelDto : levelDtoList) {
+					switch (roleName){
+						case "education":
+							//教务老师所需加入的群组
+							imGroupModels.addAll(classGroupDao.queryEducationGroups(levelUserId,organId));
+							break;
+						case "teamTeacher":
+							//运营主管所需加入的群组
+							imGroupModels.addAll(classGroupDao.queryTeamTeacherGroups(levelUserId,organId));
+							break;
+						case "director":
+							//乐队指导所需加入的群组
+							imGroupModels.addAll(classGroupDao.queryDirectorGroups(levelUserId,organId));
+							break;
+					}
+				}
 			}
-//			switch (roleName){
-//				case "education":
-//					//教务老师所需加入的群组
-//					imGroupModels.addAll(classGroupDao.queryEducationGroups(levelUserId));
-//					break;
-//				case "education":
-//					//教务老师所需加入的群组
-//					imGroupModels.addAll(classGroupDao.queryEducationGroups(levelUserId));
-//					break;
-//			}
-			//运营主管
-			imGroupModels.addAll(classGroupDao.queryTeamTeacherGroups(levelUserId));
-			//乐队指导
-			imGroupModels.addAll(classGroupDao.queryDirectorGroups(levelUserId));
 		}
-//		imFeignService.groupBatchJoin();
-		employeeDao.employeeLevel(employeeLevelDtos);
+		//❤️用户加群
+//		imFeignService.groupBatchJoin(imGroupModels);
+		//原有员工退群
+		List<ImGroupModel> groupModels = classGroupDao.queryTeacherQuitGroups(levelUserId);
+//		imFeignService.groupBatchQuit(groupModels);
+//		employeeDao.employeeLevel(employeeLevelDtos);
 		//用户退群和加群
+		employeeDao.updateUserDemissionDate(levelUserId);
 	}
 }

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

@@ -3,8 +3,8 @@ package com.ym.mec.biz.service.impl;
 import java.util.Date;
 import java.util.List;
 
-import org.apache.commons.lang.StringUtils;
-import org.apache.commons.lang.math.RandomUtils;
+import org.apache.commons.lang3.RandomUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Propagation;
@@ -93,7 +93,7 @@ public class LuckDrawPrizeServiceImpl extends BaseServiceImpl<Integer, LuckDrawP
 		// 抽奖逻辑
 		List<LuckDrawPrize> luckDraws = luckDrawPrizeDao.queryEnabledList(group);
 		if (luckDraws != null) {
-			int randomNum = RandomUtils.nextInt(DRAW_BASE_NUMBER);
+			int randomNum = RandomUtils.nextInt(0, DRAW_BASE_NUMBER);
 			double start = 0;
 			double chances = 0;
 			for (LuckDrawPrize luckDraw : luckDraws) {

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

@@ -4,6 +4,7 @@ import static com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender.PayUserType.SC
 import static com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender.PayUserType.STUDENT;
 import static com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender.PaymentCalenderStatusEnum.AUDITING;
 import static com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender.PaymentCalenderStatusEnum.REJECT;
+import static com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender.PaymentType.ADD_COURSE;
 import static com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender.PaymentType.ADD_STUDENT;
 import static com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender.PaymentType.MUSIC_APPLY;
 import static com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender.PaymentType.MUSIC_RENEW;
@@ -85,7 +86,6 @@ import com.ym.mec.biz.service.MusicGroupPaymentCalenderDetailService;
 import com.ym.mec.biz.service.MusicGroupPaymentCalenderService;
 import com.ym.mec.biz.service.SysConfigService;
 import com.ym.mec.biz.service.SysMessageService;
-import com.ym.mec.common.constant.CommonConstants;
 import com.ym.mec.common.dal.BaseDAO;
 import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.page.PageInfo;
@@ -261,7 +261,7 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 						}
 						if (courseSettings.getCourseTotalMinuties() != 0) {
 							
-							if (defaultUnitPrice.getUnitPrice().multiply(new BigDecimal(courseSettings.getCourseTotalMinuties()))
+							if (defaultUnitPrice.getUnitPrice().multiply(new BigDecimal(courseSettings.getCourseTotalMinuties())).setScale(0, BigDecimal.ROUND_HALF_UP)
 									.compareTo(courseSettings.getCourseCurrentPrice()) != 0) {
 
 								status = AUDITING;
@@ -366,7 +366,7 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 			if (musicGroupPaymentCalender.getDeadlinePaymentDate() == null && payUserType == PayUserType.STUDENT) {
 				musicGroupPaymentCalender.setDeadlinePaymentDate(DateUtil.addDays(musicGroupPaymentCalender.getStartPaymentDate(), 3));
 			}
-			if (paymentType != ADD_STUDENT) {
+			if (paymentType != ADD_STUDENT && paymentType != ADD_COURSE) {
 				int count = musicGroupPaymentCalenderDao.queryIntersectionByValidDate(musicGroupId, musicGroupPaymentCalender.getPayUserType(),
 						musicGroupPaymentCalender.getPaymentValidStartDate(), musicGroupPaymentCalender.getPaymentValidEndDate(), null);
 				if (count > 0) {
@@ -498,7 +498,6 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 		if(status != PaymentCalenderStatusEnum.REJECT){
 			throw new BizException("只有[拒绝]状态的缴费才能修改");
 		}
-
 		String musicGroupId = musicGroupPaymentCalenderDto.getMusicGroupId();
 
 		PaymentType paymentType = musicGroupPaymentCalenderDto.getPaymentType();
@@ -571,7 +570,7 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 						throw new BizException("请先设置分部课程类型单价");
 					}
 					if (courseSettings.getCourseTotalMinuties() != 0) {
-						if (defaultUnitPrice.getUnitPrice().multiply(new BigDecimal(courseSettings.getCourseTotalMinuties()))
+						if (defaultUnitPrice.getUnitPrice().multiply(new BigDecimal(courseSettings.getCourseTotalMinuties())).setScale(0, BigDecimal.ROUND_HALF_UP)
 								.compareTo(courseSettings.getCourseCurrentPrice()) != 0) {
 
 							status = AUDITING;
@@ -674,7 +673,7 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 			if (musicGroupPaymentCalender.getDeadlinePaymentDate() == null && payUserType == PayUserType.STUDENT) {
 				musicGroupPaymentCalender.setDeadlinePaymentDate(DateUtil.addDays(musicGroupPaymentCalender.getStartPaymentDate(), 3));
 			}
-			if (paymentType != ADD_STUDENT) {
+			if (paymentType != ADD_STUDENT && paymentType != ADD_COURSE) {
 				int count = musicGroupPaymentCalenderDao.queryIntersectionByValidDate(musicGroupId, musicGroupPaymentCalender.getPayUserType(),
 						musicGroupPaymentCalender.getPaymentValidStartDate(), musicGroupPaymentCalender.getPaymentValidEndDate(), null);
 				if (count > 0) {
@@ -860,7 +859,7 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 						maps.get(e));
 				Map<Integer, String> receivers1 = new HashMap<>(1);
 				receivers1.put(calenderPushDto.getTeacherId(), calenderPushDto.getTeacherId().toString());
-				sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.JIGUANG, MessageTypeEnum.SMS_PAYMENT_DETAIL, receivers, null, 0,
+				sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.JIGUANG, MessageTypeEnum.SMS_PAYMENT_DETAIL, receivers1, null, 0,
 						null, "SYSTEM", calenderPushDto.getMusicGroupName(), calenderPushDto.getPaymentValidStartDate(), calenderPushDto.getPaymentValidEndDate(),
 						maps.get(e));
 			});
@@ -894,7 +893,7 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 						null, null, e.getMusicGroupName(), e.getPaymentValidStartDate(), e.getPaymentValidEndDate());
 				Map<Integer, String> receivers1 = new HashMap<>(1);
 				receivers1.put(e.getTeacherId(), e.getTeacherId().toString());
-				sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.JIGUANG, MessageTypeEnum.SMS_PAYMENT_CREATE, receivers, null, 0,
+				sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.JIGUANG, MessageTypeEnum.SMS_PAYMENT_CREATE, receivers1, null, 0,
 						null, "SYSTEM", e.getMusicGroupName(), e.getPaymentValidStartDate(), e.getPaymentValidEndDate());
 			});
 		}
@@ -1183,62 +1182,6 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 
 	@Override
 	@Transactional(rollbackFor = Exception.class)
-	public void updateStartTime(MusicGroupPaymentCalender paymentCalender) {
-		MusicGroupPaymentCalender calender = musicGroupPaymentCalenderDao.get(paymentCalender.getId());
-		if (calender == null) {
-			throw new BizException("缴费信息不存在");
-		}
-		if (calender.getStatus() == null || calender.getStatus() != PaymentCalenderStatusEnum.NO) {
-			throw new BizException("修改失败,缴费状态不匹配");
-		}
-		Date date = new Date();
-		if(paymentCalender.getPaymentType() != ADD_STUDENT){
-			int count = musicGroupPaymentCalenderDao.queryIntersectionByValidDate(paymentCalender.getMusicGroupId(), paymentCalender.getPayUserType(), paymentCalender.getPaymentValidStartDate(),
-					paymentCalender.getPaymentValidEndDate(), paymentCalender.getId());
-			if (count > 0) {
-				throw new BizException("缴费有效期存在冲突,请修改缴费有效期");
-			}
-		}
-		calender.setStartPaymentDate(paymentCalender.getStartPaymentDate());
-		calender.setDeadlinePaymentDate(paymentCalender.getDeadlinePaymentDate());
-		calender.setPaymentValidStartDate(paymentCalender.getPaymentValidStartDate());
-		calender.setPaymentValidEndDate(paymentCalender.getPaymentValidEndDate());
-		calender.setPaymentPattern(paymentCalender.getPaymentPattern());
-		calender.setUpdateTime(date);
-		if (paymentCalender.getDeadlinePaymentDate().before(date) && !DateUtil.isSameDay(date, paymentCalender.getDeadlinePaymentDate())) {
-			calender.setStatus(PaymentCalenderStatusEnum.OVER);
-		} else if (date.after(paymentCalender.getStartPaymentDate()) || DateUtil.isSameDay(date, paymentCalender.getStartPaymentDate())) {
-			calender.setStatus(PaymentCalenderStatusEnum.OPEN);
-			// 修改Fee缴费状态为未缴费
-			musicGroupStudentFeeDao.updatePaymentStatus(calender.getId(), "NON_PAYMENT");
-			List<MusicGroupPaymentCalenderDetail> details = musicGroupPaymentCalenderDetailDao.queryByCalenderId(calender.getId(),null);
-			Set<Integer> studentIds = details.stream().map(e -> e.getUserId()).collect(Collectors.toSet());
-			if (paymentCalender.getPayUserType() == STUDENT && studentIds.size() > 0) {
-				Map<Integer, String> push = new HashMap<>();
-				for (Integer userId : studentIds) {
-					push.put(userId, userId + "");
-				}
-				MusicGroup musicGroup = musicGroupDao.get(calender.getMusicGroupId());
-				String configValue = sysConfigDao.findConfigValue(SysConfigService.BASE_API_URL);
-				String memo = "4?" + configValue + "/#/musicGroupRenew?calenderId="+calender.getId()+"&id=" + calender.getMusicGroupId();
-				// 发送续费通知
-				sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.JIGUANG, MessageTypeEnum.STUDENT_PUSH_WAIT_RENEW_MESSAGE, push,
-						null, 0, memo, "STUDENT", musicGroup.getName());
-				//获取未缴费且不是0元的学员列表
-				Map<Integer,String> studentMaps = MapUtil.convertMybatisMap(musicGroupPaymentCalenderDetailDao.queryNoPaymentAndNotZeroStudent(calender.getId(),studentIds));
-				if(studentMaps.size() > 0){
-					sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.AWSMS, MessageTypeEnum.STUDENT_PUSH_WAIT_RENEW_MESSAGE, studentMaps,
-							null, 0, memo, null, musicGroup.getName());
-				}
-			}
-		} else {
-			calender.setStatus(PaymentCalenderStatusEnum.NO);
-		}
-		musicGroupPaymentCalenderDao.update(calender);
-	}
-
-	@Override
-	@Transactional(rollbackFor = Exception.class)
 	public void del(Long id) {
 		if (id == null) {
 			throw new BizException("参数校验失败");

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

@@ -2144,9 +2144,9 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
             if (musicGroup.getOwnershipType() != null && musicGroup.getOwnershipType() == CooperationOrgan.OwnershipType.OWN) {
                 // 发送续费结果通知
                 sysMessageService.batchSendMessage(MessageSender.JIGUANG, MessageTypeEnum.STUDENT_SMS_MUSIC_GROUP_RENEW_SUCCESS, push, null, 0, "1", "STUDENT",
-                        studentRegistration.getParentsName(), studentPaymentOrder.getActualAmount());
+                        studentRegistration.getName(), studentPaymentOrder.getActualAmount());
                 sysMessageService.batchSendMessage(MessageSender.AWSMS, MessageTypeEnum.STUDENT_SMS_MUSIC_GROUP_RENEW_SUCCESS, yimei, null, 0, "1", "",
-                        studentRegistration.getParentsName(), studentPaymentOrder.getActualAmount());
+                        studentRegistration.getName(), studentPaymentOrder.getActualAmount());
             }
             studentRegistrationService.updateUserSurplusCourseFee(userId, musicGroupId, studentPaymentOrder.getExpectAmount(), "乐团续费", userId);
             return true;

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

@@ -320,9 +320,9 @@ public class PayServiceImpl implements PayService {
             BigDecimal routingMoney = null;
 
             if (routeScaleDto.getFeeType() == null) {
-                routingFee = routingAmount.multiply(new BigDecimal(routeScaleDto.getScale())).divide(new BigDecimal(100), 2, BigDecimal.ROUND_HALF_UP);
-                routeBalanceAmount = balanceAmount.multiply(new BigDecimal(routeScaleDto.getScale())).divide(new BigDecimal(100), 2, BigDecimal.ROUND_HALF_UP);
-                routingMoney = amount.multiply(new BigDecimal(routeScaleDto.getScale())).divide(new BigDecimal(100), 2, BigDecimal.ROUND_HALF_UP);
+                routingFee = routingAmount.multiply(new BigDecimal(routeScaleDto.getScale())).divide(new BigDecimal(100), 2, BigDecimal.ROUND_DOWN);
+                routeBalanceAmount = balanceAmount.multiply(new BigDecimal(routeScaleDto.getScale())).divide(new BigDecimal(100), 2, BigDecimal.ROUND_DOWN);
+                routingMoney = amount.multiply(new BigDecimal(routeScaleDto.getScale())).divide(new BigDecimal(100), 2, BigDecimal.ROUND_DOWN);
             } else {
                 routingFee = routeScaleDto.getAmount();
                 routeBalanceAmount = routeScaleDto.getBalance();

+ 10 - 10
mec-biz/src/main/java/com/ym/mec/biz/service/impl/SellOrderServiceImpl.java

@@ -75,7 +75,7 @@ public class SellOrderServiceImpl extends BaseServiceImpl<Integer, SellOrder> im
         }
 
         BigDecimal hasRouteBalance = BigDecimal.ZERO;
-        BigDecimal goodsTotalBalance = goodsTotalPrice.multiply(balance).divide(totalAmount, 2, BigDecimal.ROUND_HALF_UP);
+        BigDecimal goodsTotalBalance = goodsTotalPrice.multiply(balance).divide(totalAmount, 2, BigDecimal.ROUND_DOWN);
         AccountType accountType = sysPaymentConfigService.checkAccountType(PaymentChannelEnum.valueOf(order.getPaymentChannel()), order.getMerNos());
 
         List<SellOrder> sellOrderList = goodsService.subtractStock(goodsIds, accountType);
@@ -91,7 +91,7 @@ public class SellOrderServiceImpl extends BaseServiceImpl<Integer, SellOrder> im
             }
             goodsPrice = nowGoods.getDiscountPrice();
 
-            BigDecimal goodsBalance = goodsTotalBalance.multiply(goodsPrice).divide(goodsTotalPrice, 2, BigDecimal.ROUND_HALF_UP);
+            BigDecimal goodsBalance = goodsTotalBalance.multiply(goodsPrice).divide(goodsTotalPrice, 2, BigDecimal.ROUND_DOWN);
             if (i == goodsNum) {
                 goodsBalance = goodsTotalBalance.subtract(hasRouteBalance);
             }
@@ -120,8 +120,8 @@ public class SellOrderServiceImpl extends BaseServiceImpl<Integer, SellOrder> im
                 BigDecimal sellOrderActualAmount = BigDecimal.ZERO;
                 BigDecimal sellOrderBalance = BigDecimal.ZERO;
                 if (complementPrice.compareTo(BigDecimal.ZERO) > 0) {
-                    sellOrderActualAmount = complementGoodsPrice.get(sellOrder.getGoodsId()).multiply(new BigDecimal(sellOrder.getNum())).multiply(goodsPrice).divide(complementPrice, 2, BigDecimal.ROUND_HALF_UP);
-                    sellOrderBalance = complementGoodsPrice.get(sellOrder.getGoodsId()).multiply(new BigDecimal(sellOrder.getNum())).multiply(goodsBalance).divide(complementPrice, 2, BigDecimal.ROUND_HALF_UP);
+                    sellOrderActualAmount = complementGoodsPrice.get(sellOrder.getGoodsId()).multiply(new BigDecimal(sellOrder.getNum())).multiply(goodsPrice).divide(complementPrice, 2, BigDecimal.ROUND_DOWN);
+                    sellOrderBalance = complementGoodsPrice.get(sellOrder.getGoodsId()).multiply(new BigDecimal(sellOrder.getNum())).multiply(goodsBalance).divide(complementPrice, 2, BigDecimal.ROUND_DOWN);
                 }
 
                 complementGoodsNum = complementGoodsNum - sellOrder.getNum();
@@ -175,7 +175,7 @@ public class SellOrderServiceImpl extends BaseServiceImpl<Integer, SellOrder> im
         BigDecimal detailTotalPrice = orderDetails.stream().map(StudentPaymentOrderDetail::getPrice).reduce(BigDecimal.ZERO, BigDecimal::add);
         //商品销售占的余额
         BigDecimal detailTotalBalance = detailTotalPrice.compareTo(BigDecimal.ZERO) <= 0 ? BigDecimal.ZERO :
-                detailTotalPrice.multiply(totalBalance).divide(totalPrice, 2, BigDecimal.ROUND_HALF_UP);
+                detailTotalPrice.multiply(totalBalance).divide(totalPrice, 2, BigDecimal.ROUND_DOWN);
 
         int i = 1;
         BigDecimal detailRouteBalance = BigDecimal.ZERO;
@@ -184,7 +184,7 @@ public class SellOrderServiceImpl extends BaseServiceImpl<Integer, SellOrder> im
 
         for (StudentPaymentOrderDetail orderDetail : orderDetails) {
             BigDecimal detailBalance = orderDetail.getPrice().compareTo(BigDecimal.ZERO) <= 0 ? BigDecimal.ZERO :
-                    orderDetail.getPrice().multiply(detailTotalBalance).divide(detailTotalPrice, 2, BigDecimal.ROUND_HALF_UP);
+                    orderDetail.getPrice().multiply(detailTotalBalance).divide(detailTotalPrice, 2, BigDecimal.ROUND_DOWN);
             if (i == orderDetails.size()) {
                 detailBalance = detailTotalBalance.subtract(detailRouteBalance);
             }
@@ -202,8 +202,8 @@ public class SellOrderServiceImpl extends BaseServiceImpl<Integer, SellOrder> im
                 BigDecimal expectAmount = BigDecimal.ZERO;
                 BigDecimal balance = BigDecimal.ZERO;
                 if (goodsTotalPrice.compareTo(BigDecimal.ZERO) > 0) {
-                    expectAmount = goods.getGroupPurchasePrice().multiply(orderDetail.getPrice()).divide(goodsTotalPrice, 2, BigDecimal.ROUND_HALF_UP);
-                    balance = goods.getGroupPurchasePrice().multiply(detailBalance).divide(goodsTotalPrice, 2, BigDecimal.ROUND_HALF_UP);
+                    expectAmount = goods.getGroupPurchasePrice().multiply(orderDetail.getPrice()).divide(goodsTotalPrice, 2, BigDecimal.ROUND_DOWN);
+                    balance = goods.getGroupPurchasePrice().multiply(detailBalance).divide(goodsTotalPrice, 2, BigDecimal.ROUND_DOWN);
                 }
                 if (j == orderDetail.getGoodsList().size()) {
                     expectAmount = orderDetail.getPrice().subtract(routePrice);
@@ -235,8 +235,8 @@ public class SellOrderServiceImpl extends BaseServiceImpl<Integer, SellOrder> im
                     BigDecimal sellOrderExpectAmount = BigDecimal.ZERO;
                     BigDecimal sellOrderBalance = BigDecimal.ZERO;
                     if (complementPrice.compareTo(BigDecimal.ZERO) > 0) {
-                        sellOrderExpectAmount = complementGoodsPrice.get(sellOrder.getGoodsId()).multiply(new BigDecimal(sellOrder.getNum())).multiply(expectAmount).divide(complementPrice, 2, BigDecimal.ROUND_HALF_UP);
-                        sellOrderBalance = complementGoodsPrice.get(sellOrder.getGoodsId()).multiply(new BigDecimal(sellOrder.getNum())).multiply(balance).divide(complementPrice, 2, BigDecimal.ROUND_HALF_UP);
+                        sellOrderExpectAmount = complementGoodsPrice.get(sellOrder.getGoodsId()).multiply(new BigDecimal(sellOrder.getNum())).multiply(expectAmount).divide(complementPrice, 2, BigDecimal.ROUND_DOWN);
+                        sellOrderBalance = complementGoodsPrice.get(sellOrder.getGoodsId()).multiply(new BigDecimal(sellOrder.getNum())).multiply(balance).divide(complementPrice, 2, BigDecimal.ROUND_DOWN);
                     }
                     complementGoodsNum = complementGoodsNum - sellOrder.getNum();
                     if (complementGoodsNum <= 0) {

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

@@ -241,7 +241,7 @@ public class StudentPaymentRouteOrderServiceImpl extends BaseServiceImpl<Long, S
 
                     BigDecimal actualAmount = BigDecimal.ZERO;
                     if (goodsTotalPrice.compareTo(BigDecimal.ZERO) != 0) {
-                        actualAmount = studentPaymentRouteOrder.getSaleAmount().multiply(goods.getGroupPurchasePrice().multiply(new BigDecimal(nums))).divide(goodsTotalPrice, 2, BigDecimal.ROUND_HALF_UP);
+                        actualAmount = studentPaymentRouteOrder.getSaleAmount().multiply(goods.getGroupPurchasePrice().multiply(new BigDecimal(nums))).divide(goodsTotalPrice, 2, BigDecimal.ROUND_DOWN);
                     }
                     if (i == jsonObj.entrySet().size()) {
                         actualAmount = studentPaymentRouteOrder.getSaleAmount().subtract(hasRouteAmount);
@@ -267,7 +267,7 @@ public class StudentPaymentRouteOrderServiceImpl extends BaseServiceImpl<Long, S
                         }
                         BigDecimal sellOrderActualAmount = BigDecimal.ZERO;
                         if (complementPrice.compareTo(BigDecimal.ZERO) > 0) {
-                            sellOrderActualAmount = complementGoodsPrice.get(sellOrder.getGoodsId()).multiply(new BigDecimal(sellOrder.getNum())).multiply(actualAmount).divide(complementPrice, 2, BigDecimal.ROUND_HALF_UP);
+                            sellOrderActualAmount = complementGoodsPrice.get(sellOrder.getGoodsId()).multiply(new BigDecimal(sellOrder.getNum())).multiply(actualAmount).divide(complementPrice, 2, BigDecimal.ROUND_DOWN);
                         }
                         goodsNum = goodsNum - sellOrder.getNum();
                         if (goodsNum <= 0) {

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

@@ -1052,13 +1052,13 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
                 map.put(studentPaymentOrder.getUserId(), studentRegistration.getParentsPhone());
                 sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.AWSMS,
                         MessageTypeEnum.STUDENT_SMS_PAYMENT_SUCCESS, map, null, 0, "1", "",
-                        studentRegistration.getParentsName(), studentPaymentOrder.getActualAmount());
+                        studentRegistration.getName(), studentPaymentOrder.getActualAmount());
                 //push
                 Map<Integer, String> map1 = new HashMap<>(1);
                 map1.put(studentPaymentOrder.getUserId(), studentPaymentOrder.getUserId().toString());
                 sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.JIGUANG,
                         MessageTypeEnum.STUDENT_SMS_PAYMENT_SUCCESS, map1, null, 0, "1", "STUDENT",
-                        studentRegistration.getParentsName(), studentPaymentOrder.getActualAmount());
+                        studentRegistration.getName(), studentPaymentOrder.getActualAmount());
             }
             try {
                 //生成课程协议

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

@@ -638,8 +638,8 @@ public class SubjectChangeServiceImpl extends BaseServiceImpl<Integer, SubjectCh
             BigDecimal goodsBalance = BigDecimal.ZERO;
 
             if (goodsTotalPrice.compareTo(BigDecimal.ZERO) > 0) {
-                goodsBalance = balance.multiply(goodsPrice).divide(goodsTotalPrice, 2, BigDecimal.ROUND_HALF_UP);
-                expectAmount = totalAmount.multiply(goodsPrice).divide(goodsTotalPrice, 2, BigDecimal.ROUND_HALF_UP);
+                goodsBalance = balance.multiply(goodsPrice).divide(goodsTotalPrice, 2, BigDecimal.ROUND_DOWN);
+                expectAmount = totalAmount.multiply(goodsPrice).divide(goodsTotalPrice, 2, BigDecimal.ROUND_DOWN);
             }
             if (i == goodsNum) {
                 goodsBalance = balance.subtract(hasRouteBalance);
@@ -677,8 +677,8 @@ public class SubjectChangeServiceImpl extends BaseServiceImpl<Integer, SubjectCh
                 BigDecimal sellOrderExpectAmount = BigDecimal.ZERO;
                 BigDecimal sellOrderBalance = BigDecimal.ZERO;
                 if (complementPrice.compareTo(BigDecimal.ZERO) > 0) {
-                    sellOrderExpectAmount = complementGoodsPrice.get(sellOrder.getGoodsId()).multiply(new BigDecimal(sellOrder.getNum())).multiply(expectAmount).divide(complementPrice, 2, BigDecimal.ROUND_HALF_UP);
-                    sellOrderBalance = complementGoodsPrice.get(sellOrder.getGoodsId()).multiply(new BigDecimal(sellOrder.getNum())).multiply(goodsBalance).divide(complementPrice, 2, BigDecimal.ROUND_HALF_UP);
+                    sellOrderExpectAmount = complementGoodsPrice.get(sellOrder.getGoodsId()).multiply(new BigDecimal(sellOrder.getNum())).multiply(expectAmount).divide(complementPrice, 2, BigDecimal.ROUND_DOWN);
+                    sellOrderBalance = complementGoodsPrice.get(sellOrder.getGoodsId()).multiply(new BigDecimal(sellOrder.getNum())).multiply(goodsBalance).divide(complementPrice, 2, BigDecimal.ROUND_DOWN);
                 }
                 complementGoodsNum = complementGoodsNum - sellOrder.getNum();
                 if (complementGoodsNum <= 0) {

+ 24 - 20
mec-biz/src/main/resources/config/mybatis/ClassGroupMapper.xml

@@ -312,6 +312,9 @@
         <result column="img_" property="img"/>
         <result column="teacher_ids_" property="teacherIds"/>
         <result column="group_name_" property="groupName"/>
+        <collection property="members" ofType="com.ym.mec.common.entity.ImGroupMember">
+            <result property="id" column="user_id_"/>
+        </collection>
     </resultMap>
     <select id="queryUserMusicGroups" resultMap="imGroupModel">
         SELECT cg.id_,CASE WHEN cg.group_name_ IS NULL OR cg.group_name_ = '' THEN cg.name_ ELSE cg.group_name_ END name_,
@@ -484,48 +487,49 @@
     </select>
 
     <select id="queryTeacherQuitGroups" resultMap="imGroupModel">
-        SELECT cg.id_,CASE WHEN cg.group_name_ IS NULL OR cg.group_name_ = '' THEN cg.name_ ELSE cg.group_name_ END name_
+        SELECT cg.id_,CASE WHEN cg.group_name_ IS NULL OR cg.group_name_ = '' THEN cg.name_ ELSE cg.group_name_ END name_,#{userId} user_id_
         FROM class_group_teacher_mapper cgtm
         LEFT JOIN class_group cg ON cgtm.class_group_id_ = cg.id_
-        LEFT JOIN music_group mg ON mg.id_ = cg.music_group_id_ AND cg.group_type_ = 'MUSIC'
-        LEFT JOIN vip_group vg ON vg.id_ = cg.music_group_id_ AND cg.group_type_ = 'VIP'
-        LEFT JOIN courses_group csg ON csg.id_ = cg.music_group_id_ AND cg.group_type_ = 'COMM'
-        WHERE cgtm.user_id_ != #{userId} AND (mg.team_teacher_id_ = #{userId} OR mg.educational_teacher_id_ = #{userId} OR mg.director_user_id_ = #{userId})
-        AND cg.del_flag_ = 0 AND ((mg.status_ = 'PROGRESS' OR vg.group_status_ = 2 OR csg.status_ = 'NORMAL')
-        OR (vg.group_status_ = 2 AND vg.educational_teacher_id_ =  #{userId}) OR (csg.status_ = 'NORMAL' AND csg.educational_teacher_id_ =  #{userId}))
+        LEFT JOIN music_group mg ON mg.id_ = cg.music_group_id_
+        LEFT JOIN vip_group vg ON vg.id_ = cg.music_group_id_
+        LEFT JOIN courses_group csg ON csg.id_ = cg.music_group_id_
+        WHERE cgtm.user_id_ != #{userId} AND cg.del_flag_ = 0
+        AND ((vg.group_status_ = 2 AND vg.educational_teacher_id_ =  #{userId} AND vg.organ_id_ = #{organId} AND cg.group_type_ = 'VIP')
+        OR (mg.status_ = 'PROGRESS' AND (mg.team_teacher_id_ = #{userId} OR mg.educational_teacher_id_ = #{userId} OR mg.director_user_id_ = #{userId})
+        AND mg.organ_id_ = #{organId} AND cg.group_type_ = 'MUSIC')
+        OR (csg.status_ = 'NORMAL' AND csg.educational_teacher_id_ =  #{userId} AND csg.organ_id_ = #{organId} AND cg.group_type_ = 'COMM'))
         GROUP BY cg.id_
     </select>
 
     <select id="queryEducationGroups" resultMap="imGroupModel">
-        SELECT cg.id_,CASE WHEN cg.group_name_ IS NULL OR cg.group_name_ = '' THEN cg.name_ ELSE cg.group_name_ END name_
+        SELECT cg.id_,CASE WHEN cg.group_name_ IS NULL OR cg.group_name_ = '' THEN cg.name_ ELSE cg.group_name_ END name_,#{userId} user_id_
         FROM class_group_teacher_mapper cgtm
         LEFT JOIN class_group cg ON cgtm.class_group_id_ = cg.id_
-        LEFT JOIN music_group mg ON mg.id_ = cg.music_group_id_ AND cg.group_type_ = 'MUSIC'
-        LEFT JOIN vip_group vg ON vg.id_ = cg.music_group_id_ AND cg.group_type_ = 'VIP'
-        LEFT JOIN courses_group csg ON csg.id_ = cg.music_group_id_ AND cg.group_type_ = 'COMM'
-        WHERE cgtm.user_id_ != #{userId} AND mg.educational_teacher_id_ = #{userId}
-        AND cg.del_flag_ = 0 AND ((mg.status_ = 'PROGRESS' OR vg.group_status_ = 2 OR csg.status_ = 'NORMAL')
-        OR (vg.group_status_ = 2 AND vg.educational_teacher_id_ =  #{userId}) OR (csg.status_ = 'NORMAL' AND csg.educational_teacher_id_ =  #{userId}))
+        LEFT JOIN music_group mg ON mg.id_ = cg.music_group_id_
+        LEFT JOIN vip_group vg ON vg.id_ = cg.music_group_id_
+        LEFT JOIN courses_group csg ON csg.id_ = cg.music_group_id_
+        WHERE cg.del_flag_ = 0 AND ((vg.group_status_ = 2 AND vg.educational_teacher_id_ =  #{userId} AND vg.organ_id_ = #{organId} AND cg.group_type_ = 'VIP')
+        OR (mg.status_ = 'PROGRESS' AND mg.educational_teacher_id_ =  #{userId} AND mg.organ_id_ = #{organId} AND cg.group_type_ = 'MUSIC')
+        OR (csg.status_ = 'NORMAL' AND csg.educational_teacher_id_ =  #{userId} AND csg.organ_id_ = #{organId} AND cg.group_type_ = 'COMM'))
         GROUP BY cg.id_
     </select>
 
     <select id="queryTeamTeacherGroups" resultMap="imGroupModel">
-        SELECT cg.id_,CASE WHEN cg.group_name_ IS NULL OR cg.group_name_ = '' THEN cg.name_ ELSE cg.group_name_ END name_
+        SELECT cg.id_,CASE WHEN cg.group_name_ IS NULL OR cg.group_name_ = '' THEN cg.name_ ELSE cg.group_name_ END name_,
+               mg.team_teacher_id_ user_id_
         FROM class_group_teacher_mapper cgtm
         LEFT JOIN class_group cg ON cgtm.class_group_id_ = cg.id_
         LEFT JOIN music_group mg ON mg.id_ = cg.music_group_id_
-        WHERE cgtm.user_id_ != #{userId} AND mg.team_teacher_id_ = #{userId}
-        AND cg.del_flag_ = 0 AND mg.status_ = 'PROGRESS' AND cg.group_type_ = 'MUSIC'
+        WHERE mg.team_teacher_id_ = #{userId} AND cg.del_flag_ = 0 AND mg.status_ = 'PROGRESS' AND cg.group_type_ = 'MUSIC'
         GROUP BY cg.id_
     </select>
 
     <select id="queryDirectorGroups" resultMap="imGroupModel">
-        SELECT cg.id_,CASE WHEN cg.group_name_ IS NULL OR cg.group_name_ = '' THEN cg.name_ ELSE cg.group_name_ END name_
+        SELECT cg.id_,CASE WHEN cg.group_name_ IS NULL OR cg.group_name_ = '' THEN cg.name_ ELSE cg.group_name_ END name_,mg.director_user_id_ user_id_
         FROM class_group_teacher_mapper cgtm
         LEFT JOIN class_group cg ON cgtm.class_group_id_ = cg.id_
         LEFT JOIN music_group mg ON mg.id_ = cg.music_group_id_ AND cg.group_type_ = 'MUSIC'
-        WHERE cgtm.user_id_ != #{userId} AND mg.director_user_id_ = #{userId}
-        AND cg.del_flag_ = 0 AND mg.status_ = 'PROGRESS'
+        WHERE mg.director_user_id_ = #{userId} AND cg.del_flag_ = 0 AND mg.status_ = 'PROGRESS'
         GROUP BY cg.id_
     </select>
 

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

@@ -323,7 +323,7 @@
         WHERE music_group_id_ = #{musicGroupId}
         AND (payment_valid_end_date_ IS NULL OR payment_valid_start_date_ BETWEEN #{paymentValidStartDate} AND #{paymentValidEndDate}
         OR payment_valid_end_date_ BETWEEN #{paymentValidStartDate} AND #{paymentValidEndDate}) AND payment_valid_start_date_ IS NOT NULL
-        AND mgpc.payment_type_ != 'ADD_STUDENT' AND mgpc.batch_no_ IS NOT NULL
+        AND mgpc.payment_type_ != 'ADD_STUDENT' AND mgpc.payment_type_ != 'ADD_COURSE' AND mgpc.batch_no_ IS NOT NULL
         <if test="payUserType != null">
         	and pay_user_type_ = #{payUserType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
         </if>

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

@@ -594,7 +594,7 @@
     <select id="getFeeByType" resultType="com.ym.mec.biz.dal.dto.StudentPaymentOrderExportDto">
         SELECT MAX(spo.expect_amount_)                                expectAmount,
                SUM(IF(g.type_ = 'INSTRUMENT', so.expect_amount_, 0))  musicalFee,
-               SUM(IF(g.type_ != 'INSTRUMENT' || g.type_ IS NULL, so.expect_amount_, 0)) teachingFee
+               SUM(IF(g.type_ IS NULL || g.type_ != 'INSTRUMENT',IFNULL(so.expect_amount_,0), 0)) teachingFee
         FROM student_payment_order spo
                  LEFT JOIN sell_order so ON spo.id_ = so.order_id_
                  LEFT JOIN goods g ON IF(so.parent_goods_id_ IS NOT NULL,g.id_ = so.parent_goods_id_,g.id_ = so.goods_id_)

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

@@ -861,5 +861,6 @@
         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_)
         WHERE spo.user_id_ = #{userId} AND spo.type_='APPLY' AND spo.music_group_id_=#{musicGroupId}
+        ORDER BY spo.id_ desc
     </select>
 </mapper>

+ 0 - 1
mec-im/src/main/java/com/ym/service/Impl/RoomServiceImpl.java

@@ -421,7 +421,6 @@ public class RoomServiceImpl implements RoomService {
             //如果设备号不为空,更新设备号
             RoleEnum roleEnum = RoleEnum.getEnumByValue(roomMember.getRole());
             if(roleEnum == RoleTeacher && StringUtils.isNotEmpty(deviceNum)){
-                signInSuccess(roomMember,deviceNum);
                 teacherAttendanceService.addTeacherAttendanceSignOut(firstCourseId.longValue(),Integer.parseInt(userId),deviceNum);
             }
             return;

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

@@ -121,14 +121,6 @@ public class EmployeeController extends BaseController {
         return failed("获取用户失败");
     }
 
-//    @ApiOperation(value = "删除员工")
-//    @PostMapping("/delete/{userId}")
-//    @PreAuthorize("@pcs.hasPermissions('employee/delete')")
-//    public Object update(@PathVariable("userId") Long userId) {
-//        employeeService.deleteEmployee(userId);
-//        return succeed();
-//    }
-
     @ApiOperation(value = "获取所有员工")
     @GetMapping("/findAll")
     @PreAuthorize("@pcs.hasPermissions('employee/findAll')")

+ 6 - 0
pom.xml

@@ -261,6 +261,12 @@
 		<dependency>
 			<groupId>org.springframework.cloud</groupId>
 			<artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
+			<exclusions>
+				<exclusion>
+					<groupId>commons-lang</groupId>
+					<artifactId>commons-lang</artifactId>
+				</exclusion>
+			</exclusions>
 		</dependency>
 	</dependencies>
 

+ 5 - 0
workflowy/pom.xml

@@ -64,6 +64,11 @@
 		</dependency>
 
 		<dependency>
+			<groupId>com.ym</groupId>
+			<artifactId>mec-util</artifactId>
+		</dependency>
+
+		<dependency>
 			<groupId>org.apache.commons</groupId>
 			<artifactId>commons-dbcp2</artifactId>
 			<scope>provided</scope>

+ 2 - 2
workflowy/src/main/java/org/snaker/engine/access/AbstractDBAccess.java

@@ -25,8 +25,8 @@ import java.util.List;
 import java.util.Map;
 import java.util.Properties;
 
-import org.apache.commons.lang.ArrayUtils;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.ArrayUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.snaker.engine.DBAccess;

+ 1 - 1
workflowy/src/main/java/org/snaker/engine/access/Page.java

@@ -16,7 +16,7 @@ package org.snaker.engine.access;
 
 import java.util.List;
 
-import org.apache.commons.lang.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.springframework.beans.factory.annotation.Value;
 
 /**

+ 1 - 1
workflowy/src/main/java/org/snaker/engine/access/QueryFilter.java

@@ -18,7 +18,7 @@ import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.snaker.engine.Completion;
 import org.snaker.engine.core.ServiceContext;
 import org.snaker.engine.helper.AssertHelper;

+ 1 - 1
workflowy/src/main/java/org/snaker/engine/access/dialect/SQLServerDialect.java

@@ -14,7 +14,7 @@
  */
 package org.snaker.engine.access.dialect;
 
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.snaker.engine.access.Page;
 import org.snaker.engine.helper.StringHelper;
 

+ 1 - 1
workflowy/src/main/java/org/snaker/engine/core/OrderService.java

@@ -17,7 +17,7 @@ package org.snaker.engine.core;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.snaker.engine.Completion;
 import org.snaker.engine.IOrderService;
 import org.snaker.engine.SnakerEngine;

+ 1 - 1
workflowy/src/main/java/org/snaker/engine/helper/StringHelper.java

@@ -14,7 +14,7 @@
  */
 package org.snaker.engine.helper;
 
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.snaker.engine.SnakerException;
 
 /**

+ 1 - 1
workflowy/src/main/java/org/snaker/engine/impl/SchedulerInterceptor.java

@@ -17,7 +17,7 @@ package org.snaker.engine.impl;
 import java.util.Date;
 import java.util.Map;
 
-import org.apache.commons.lang.math.NumberUtils;
+import org.apache.commons.lang3.math.NumberUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.snaker.engine.SnakerInterceptor;

+ 1 - 1
workflowy/src/main/java/org/snaker/engine/parser/impl/SubProcessParser.java

@@ -14,7 +14,7 @@
  */
 package org.snaker.engine.parser.impl;
 
-import org.apache.commons.lang.math.NumberUtils;
+import org.apache.commons.lang3.math.NumberUtils;
 import org.snaker.engine.helper.StringHelper;
 import org.snaker.engine.model.NodeModel;
 import org.snaker.engine.model.SubProcessModel;