Browse Source

Merge remote-tracking branch 'origin/saas' into saas

# Conflicts:
#	mec-biz/src/main/java/com/ym/mec/biz/service/impl/EmployeeServiceImpl.java
hgw 3 years ago
parent
commit
ce2510ccc2
23 changed files with 109 additions and 76 deletions
  1. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentRegistrationDao.java
  2. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/service/StudentManageService.java
  3. 39 33
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java
  4. 2 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/EmployeeServiceImpl.java
  5. 3 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupServiceImpl.java
  6. 7 3
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/OnlineMusicGroupServiceImpl.java
  7. 2 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentManageServiceImpl.java
  8. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentPaymentOrderServiceImpl.java
  9. 0 3
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentRegistrationServiceImpl.java
  10. 4 3
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentServeServiceImpl.java
  11. 12 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/TeacherCourseStatisticsServiceImpl.java
  12. 3 3
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupActivityServiceImpl.java
  13. 6 3
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupServiceImpl.java
  14. 1 1
      mec-biz/src/main/resources/config/mybatis/ClassGroupMapper.xml
  15. 1 1
      mec-biz/src/main/resources/config/mybatis/StudentGoodsSellMapper.xml
  16. 1 1
      mec-biz/src/main/resources/config/mybatis/StudentRegistrationMapper.xml
  17. 2 3
      mec-biz/src/main/resources/config/mybatis/VipGroupMapper.xml
  18. 4 7
      mec-student/src/main/java/com/ym/mec/student/controller/StudentManageController.java
  19. 1 0
      mec-web/src/main/java/com/ym/mec/web/controller/ActivityPlanController.java
  20. 1 1
      mec-web/src/main/java/com/ym/mec/web/controller/ExportController.java
  21. 1 1
      mec-web/src/main/java/com/ym/mec/web/controller/SysMusicScoreCategoriesController.java
  22. 8 1
      mec-web/src/main/java/com/ym/mec/web/controller/TaskController.java
  23. 8 2
      mec-web/src/main/java/com/ym/mec/web/controller/education/EduStudentRegistrationController.java

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentRegistrationDao.java

@@ -324,7 +324,7 @@ public interface StudentRegistrationDao extends BaseDAO<Long, StudentRegistratio
      *
      *
      * @return
      * @return
      */
      */
-    List<StudentRegisterPerDto> queryStudentPer1(String month);
+    List<StudentRegisterPerDto> queryStudentPer1(@Param("teantId") Integer tenantId, @Param("month")String month);
 
 
     /**
     /**
      * 获取乐团报名信息和学校信息
      * 获取乐团报名信息和学校信息

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

@@ -159,7 +159,7 @@ public interface StudentManageService {
      * 获取激活比例
      * 获取激活比例
      * @return
      * @return
      */
      */
-    List<StudentRegisterPerDto> queryStudentPer();
+    List<StudentRegisterPerDto> queryStudentPer(Integer tenantId);
 
 
     /**
     /**
      * 获取有课没有激活的列表(变更为所有有课学生)
      * 获取有课没有激活的列表(变更为所有有课学生)

+ 39 - 33
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java

@@ -679,7 +679,8 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 			dayOfWeekMap.put(dto.getDayOfWeek(), list);
 			dayOfWeekMap.put(dto.getDayOfWeek(), list);
 		}
 		}
 
 
-		Calendar calendar = Calendar.getInstance();
+        Integer tenantId = TenantContextHolder.getTenantId();
+        Calendar calendar = Calendar.getInstance();
 		Date now = new Date();
 		Date now = new Date();
 		List<CourseTimeDto> courseTimeDtoList = null;
 		List<CourseTimeDto> courseTimeDtoList = null;
 		List<CourseSchedule> courseScheduleList = new ArrayList<CourseSchedule>();
 		List<CourseSchedule> courseScheduleList = new ArrayList<CourseSchedule>();
@@ -688,9 +689,9 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 		List<TeacherAttendance> teacherAttendances = new ArrayList<TeacherAttendance>();
 		List<TeacherAttendance> teacherAttendances = new ArrayList<TeacherAttendance>();
 		Set<String> holidayDays = new HashSet<>();
 		Set<String> holidayDays = new HashSet<>();
 		if (isJumpHoliday) {
 		if (isJumpHoliday) {
-			SysConfig holidaySetting = sysConfigService.findByParamName(SysConfigService.HOLIDAY_SETTING);
-			if(Objects.nonNull(holidaySetting)&&StringUtils.isNotBlank(holidaySetting.getParanValue())){
-				holidayDays = new HashSet<>(JSON.parseArray(holidaySetting.getParanValue(), String.class));
+			String holidaySetting = sysTenantConfigService.getTenantConfigValue(SysConfigService.HOLIDAY_SETTING,tenantId);
+			if(StringUtils.isNotBlank(holidaySetting)){
+				holidayDays = new HashSet<>(JSON.parseArray(holidaySetting, String.class));
 			}
 			}
 		}
 		}
 		calendar.setTime(startDate);
 		calendar.setTime(startDate);
@@ -1761,12 +1762,12 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 		List<Date> courseStartDates = new ArrayList<>();
 		List<Date> courseStartDates = new ArrayList<>();
 
 
 		Set<String> holidayDays = new HashSet<>();
 		Set<String> holidayDays = new HashSet<>();
-
-		if (courseAdjustInfo.isHoliday()) {
-			SysConfig holidaySetting = sysConfigService.findByParamName(SysConfigService.HOLIDAY_SETTING);
-			if(StringUtils.isNotBlank(holidaySetting.getParanValue())){
-				holidayDays = new HashSet<>(JSON.parseArray(holidaySetting.getParanValue(), String.class));
-			}
+        Integer tenantId = TenantContextHolder.getTenantId();
+        if (courseAdjustInfo.isHoliday()) {
+            String holidaySetting = sysTenantConfigService.getTenantConfigValue(SysConfigService.HOLIDAY_SETTING,tenantId);
+            if(StringUtils.isNotBlank(holidaySetting)){
+                holidayDays = new HashSet<>(JSON.parseArray(holidaySetting, String.class));
+            }
 		}
 		}
 
 
 		Map<String, List<CourseSchedule>> result = new HashMap<String, List<CourseSchedule>>(){{
 		Map<String, List<CourseSchedule>> result = new HashMap<String, List<CourseSchedule>>(){{
@@ -2543,11 +2544,12 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 
 
 		Set<String> holidayDays = new HashSet<>();
 		Set<String> holidayDays = new HashSet<>();
 
 
-		if (vipGroupCourseAdjustInfo.isHoliday()) {
-			SysConfig holidaySetting = sysConfigService.findByParamName(SysConfigService.HOLIDAY_SETTING);
-			if(StringUtils.isNotBlank(holidaySetting.getParanValue())){
-				holidayDays = new HashSet<>(JSON.parseArray(holidaySetting.getParanValue(), String.class));
-			}
+        Integer tenantId = TenantContextHolder.getTenantId();
+        if (vipGroupCourseAdjustInfo.isHoliday()) {
+            String holidaySetting = sysTenantConfigService.getTenantConfigValue(SysConfigService.HOLIDAY_SETTING,tenantId);
+            if(StringUtils.isNotBlank(holidaySetting)){
+                holidayDays = new HashSet<>(JSON.parseArray(holidaySetting, String.class));
+            }
 		}
 		}
 
 
         while (true) {
         while (true) {
@@ -2781,12 +2783,13 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 		int betweenDays = 0;
 		int betweenDays = 0;
 		//节假日
 		//节假日
 		Set<String> holidayDays = new HashSet<>();
 		Set<String> holidayDays = new HashSet<>();
-		if(Objects.nonNull(courseAdjustInfo.getPauseDate())&&Objects.nonNull(courseAdjustInfo.getRecoveryDate())){
+        Integer tenantId = TenantContextHolder.getTenantId();
+        if(Objects.nonNull(courseAdjustInfo.getPauseDate())&&Objects.nonNull(courseAdjustInfo.getRecoveryDate())){
 			if (courseAdjustInfo.getHoliday()) {
 			if (courseAdjustInfo.getHoliday()) {
-				SysConfig holidaySetting = sysConfigService.findByParamName(SysConfigService.HOLIDAY_SETTING);
-				if(Objects.nonNull(holidaySetting)&&StringUtils.isNotBlank(holidaySetting.getParanValue())){
-					holidayDays = new HashSet<>(JSON.parseArray(holidaySetting.getParanValue(), String.class));
-				}
+                String holidaySetting = sysTenantConfigService.getTenantConfigValue(SysConfigService.HOLIDAY_SETTING,tenantId);
+                if(StringUtils.isNotBlank(holidaySetting)){
+                    holidayDays = new HashSet<>(JSON.parseArray(holidaySetting, String.class));
+                }
 			}
 			}
 
 
 			LocalDate pauseDate = LocalDate.parse(courseAdjustInfo.getPauseDate(), DateUtil.dateFormatter);
 			LocalDate pauseDate = LocalDate.parse(courseAdjustInfo.getPauseDate(), DateUtil.dateFormatter);
@@ -3049,11 +3052,12 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 
 
 		Set<String> holidayDays = new HashSet<>();
 		Set<String> holidayDays = new HashSet<>();
 
 
-		if (coursePostPoneInfo.isSkipHoliday()) {
-			SysConfig holidaySetting = sysConfigService.findByParamName(SysConfigService.HOLIDAY_SETTING);
-			if(Objects.nonNull(holidaySetting)&&StringUtils.isNotBlank(holidaySetting.getParanValue())){
-				holidayDays = new HashSet<>(JSON.parseArray(holidaySetting.getParanValue(), String.class));
-			}
+        Integer tenantId = TenantContextHolder.getTenantId();
+        if (coursePostPoneInfo.isSkipHoliday()) {
+            String holidaySetting = sysTenantConfigService.getTenantConfigValue(SysConfigService.HOLIDAY_SETTING,tenantId);
+            if(StringUtils.isNotBlank(holidaySetting)){
+                holidayDays = new HashSet<>(JSON.parseArray(holidaySetting, String.class));
+            }
 		}
 		}
 
 
         classGroupCourseSchedulesWithDate.sort(Comparator.comparing(CourseSchedule::getStartClassTime));
         classGroupCourseSchedulesWithDate.sort(Comparator.comparing(CourseSchedule::getStartClassTime));
@@ -3130,10 +3134,11 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 		Set<String> holidayDays = new HashSet<>();
 		Set<String> holidayDays = new HashSet<>();
 
 
 		if (vipGroupCourseAdjustInfo.isHoliday()) {
 		if (vipGroupCourseAdjustInfo.isHoliday()) {
-			SysConfig holidaySetting = sysConfigService.findByParamName(SysConfigService.HOLIDAY_SETTING);
-			if(Objects.nonNull(holidaySetting)&&StringUtils.isNotBlank(holidaySetting.getParanValue())){
-				holidayDays = new HashSet<>(JSON.parseArray(holidaySetting.getParanValue(), String.class));
-			}
+            Integer tenantId = TenantContextHolder.getTenantId();
+            String holidaySetting = sysTenantConfigService.getTenantConfigValue(SysConfigService.HOLIDAY_SETTING,tenantId);
+            if(StringUtils.isNotBlank(holidaySetting)){
+                holidayDays = new HashSet<>(JSON.parseArray(holidaySetting, String.class));
+            }
 		}
 		}
 
 
         List<CourseSchedule> courseSchedules = new ArrayList<>();
         List<CourseSchedule> courseSchedules = new ArrayList<>();
@@ -4576,10 +4581,11 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
         Set<String> holidayDays = new HashSet<>();
         Set<String> holidayDays = new HashSet<>();
 
 
 		if (courseGenerateInfo.isSkipHoliday()) {
 		if (courseGenerateInfo.isSkipHoliday()) {
-			SysConfig holidaySetting = sysConfigService.findByParamName(SysConfigService.HOLIDAY_SETTING);
-			if(Objects.nonNull(holidaySetting)&&StringUtils.isNotBlank(holidaySetting.getParanValue())){
-				holidayDays = new HashSet<>(JSON.parseArray(holidaySetting.getParanValue(), String.class));
-			}
+            Integer tenantId = TenantContextHolder.getTenantId();
+            String holidaySetting = sysTenantConfigService.getTenantConfigValue(SysConfigService.HOLIDAY_SETTING,tenantId);
+            if(StringUtils.isNotBlank(holidaySetting)){
+                holidayDays = new HashSet<>(JSON.parseArray(holidaySetting, String.class));
+            }
 		}
 		}
 
 
         List<CourseSchedule> courseSchedules = new ArrayList<>();
         List<CourseSchedule> courseSchedules = new ArrayList<>();

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

@@ -118,7 +118,8 @@ public class EmployeeServiceImpl extends BaseServiceImpl<Integer, Employee>  imp
 			}
 			}
 		}
 		}
         if (StringUtils.isBlank(employee.getPassword())) {
         if (StringUtils.isBlank(employee.getPassword())) {
-            employee.setPassword(new BCryptPasswordEncoder().encode(ParamEnum.INIT_PASSWORD.getCode().toString()));
+            int phoneStrLen = employee.getPhone().length();
+            employee.setPassword(new BCryptPasswordEncoder().encode("gym" + employee.getPhone().substring(phoneStrLen - 4, phoneStrLen)));
         }
         }
         employee.setUserType("SYSTEM");
         employee.setUserType("SYSTEM");
 		teacherDao.addSysUser(employee);
 		teacherDao.addSysUser(employee);

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

@@ -1327,8 +1327,8 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
         List<StudentPaymentOrderDetail> applyOrder = studentPaymentOrderDetailService.findApplyOrderSuccess(musicGroupId, DealStatusEnum.SUCCESS);
         List<StudentPaymentOrderDetail> applyOrder = studentPaymentOrderDetailService.findApplyOrderSuccess(musicGroupId, DealStatusEnum.SUCCESS);
         if (applyOrder != null && applyOrder.size() > 0) {
         if (applyOrder != null && applyOrder.size() > 0) {
             //是否购买了乐器,支持无乐器乐团
             //是否购买了乐器,支持无乐器乐团
-            long count = applyOrder.stream().filter(e -> StringUtils.isNotEmpty(e.getGoodsIdList())).count();
-            if (count > 0l) {
+            long count = applyOrder.stream().filter(e -> e != null && StringUtils.isNotEmpty(e.getGoodsIdList())).count();
+            if (count > 0L) {
                 Map<String, Object> param = new HashMap<>();
                 Map<String, Object> param = new HashMap<>();
                 param.put("musicGroupId", musicGroupId);
                 param.put("musicGroupId", musicGroupId);
                 param.put("tenantId", musicGroup.getTenantId());
                 param.put("tenantId", musicGroup.getTenantId());
@@ -3172,6 +3172,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
             e.setRepairUserName(repairUserNameMap.get(e.getRepairUserId()));
             e.setRepairUserName(repairUserNameMap.get(e.getRepairUserId()));
             e.setDirectorUserName(directorUserNameMap.get(e.getDirectorUserId()));
             e.setDirectorUserName(directorUserNameMap.get(e.getDirectorUserId()));
             e.setPayNum(payNumMap.get(e.getId()) == null ? 0 : payNumMap.get(e.getId()));
             e.setPayNum(payNumMap.get(e.getId()) == null ? 0 : payNumMap.get(e.getId()));
+            e.setGroupMemberNum(e.getGroupMemberNum() == null ? 0 : e.getGroupMemberNum());
             e.setChargeTypeName(chargeTypeNameMap.get(e.getChargeTypeId()));
             e.setChargeTypeName(chargeTypeNameMap.get(e.getChargeTypeId()));
             e.setHasVerifyMusicalList(purchaseListMap.get(e.getId()) != null);
             e.setHasVerifyMusicalList(purchaseListMap.get(e.getId()) != null);
             if (e.getStatus().equals(MusicGroupStatusEnum.PREPARE) || e.getStatus().equals(MusicGroupStatusEnum.PROGRESS)) {
             if (e.getStatus().equals(MusicGroupStatusEnum.PREPARE) || e.getStatus().equals(MusicGroupStatusEnum.PROGRESS)) {

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

@@ -15,6 +15,7 @@ import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.entity.ImGroupMember;
 import com.ym.mec.common.entity.ImGroupMember;
 import com.ym.mec.common.entity.ImGroupModel;
 import com.ym.mec.common.entity.ImGroupModel;
 import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.exception.BizException;
+import com.ym.mec.common.tenant.TenantContextHolder;
 import com.ym.mec.im.ImFeignService;
 import com.ym.mec.im.ImFeignService;
 import com.ym.mec.thirdparty.message.MessageSenderPluginContext;
 import com.ym.mec.thirdparty.message.MessageSenderPluginContext;
 import com.ym.mec.util.date.DateUtil;
 import com.ym.mec.util.date.DateUtil;
@@ -82,6 +83,8 @@ public class OnlineMusicGroupServiceImpl implements OnlineMusicGroupService {
     private ImGroupMemberService imGroupMemberService;
     private ImGroupMemberService imGroupMemberService;
     @Autowired
     @Autowired
     private SysMessageService sysMessageService;
     private SysMessageService sysMessageService;
+    @Autowired
+    private SysTenantConfigService sysTenantConfigService;
 
 
     @Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED)
     @Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED)
     @Override
     @Override
@@ -419,9 +422,10 @@ public class OnlineMusicGroupServiceImpl implements OnlineMusicGroupService {
         Set<String> holidayDays = new HashSet<>();
         Set<String> holidayDays = new HashSet<>();
 
 
         if (skipHoliday) {
         if (skipHoliday) {
-            SysConfig holidaySetting = sysConfigService.findByParamName(SysConfigService.HOLIDAY_SETTING);
-            if(Objects.nonNull(holidaySetting)&&StringUtils.isNotBlank(holidaySetting.getParanValue())){
-                holidayDays = new HashSet<>(JSON.parseArray(holidaySetting.getParanValue(), String.class));
+            Integer tenantId = TenantContextHolder.getTenantId();
+            String holidaySetting = sysTenantConfigService.getTenantConfigValue(SysConfigService.HOLIDAY_SETTING,tenantId);
+            if(StringUtils.isNotBlank(holidaySetting)){
+                holidayDays = new HashSet<>(JSON.parseArray(holidaySetting, String.class));
             }
             }
         }
         }
 
 

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

@@ -760,9 +760,9 @@ public class StudentManageServiceImpl implements StudentManageService {
     }
     }
 
 
     @Override
     @Override
-    public List<StudentRegisterPerDto> queryStudentPer() {
+    public List<StudentRegisterPerDto> queryStudentPer(Integer tenantId) {
         String format = DateUtil.format(DateUtil.addDays(new Date(), -1), DateUtil.ISO_EXPANDED_DATE_FORMAT);
         String format = DateUtil.format(DateUtil.addDays(new Date(), -1), DateUtil.ISO_EXPANDED_DATE_FORMAT);
-        return studentRegistrationDao.queryStudentPer1(format);
+        return studentRegistrationDao.queryStudentPer1(tenantId, format);
     }
     }
 
 
     @Override
     @Override

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

@@ -808,7 +808,7 @@ public class StudentPaymentOrderServiceImpl extends BaseServiceImpl<Long, Studen
             String musicGroupId = order.getMusicGroupId();
             String musicGroupId = order.getMusicGroupId();
             Integer userId = order.getUserId();
             Integer userId = order.getUserId();
             List<StudentPaymentOrder> oldStudentPaymentOrderList = this.queryByCondition(GroupType.MUSIC,musicGroupId, userId, DealStatusEnum.SUCCESS, OrderTypeEnum.APPLY);
             List<StudentPaymentOrder> oldStudentPaymentOrderList = this.queryByCondition(GroupType.MUSIC,musicGroupId, userId, DealStatusEnum.SUCCESS, OrderTypeEnum.APPLY);
-            if(oldStudentPaymentOrderList != null && oldStudentPaymentOrderList.size() > 0){
+            if(oldStudentPaymentOrderList == null || oldStudentPaymentOrderList.size() == 0){
                 StudentRegistration studentRegistration = studentRegistrationService.getStudentRegister(musicGroupId, userId);
                 StudentRegistration studentRegistration = studentRegistrationService.getStudentRegister(musicGroupId, userId);
                 MusicGroupSubjectPlan musicOneSubjectClassPlan = musicGroupSubjectPlanService.getMusicOneSubjectClassPlan(musicGroupId, studentRegistration.getActualSubjectId());
                 MusicGroupSubjectPlan musicOneSubjectClassPlan = musicGroupSubjectPlanService.getMusicOneSubjectClassPlan(musicGroupId, studentRegistration.getActualSubjectId());
                 musicOneSubjectClassPlan.setPaidStudentNum(musicOneSubjectClassPlan.getPaidStudentNum() == null?0:musicOneSubjectClassPlan.getPaidStudentNum() - 1);
                 musicOneSubjectClassPlan.setPaidStudentNum(musicOneSubjectClassPlan.getPaidStudentNum() == null?0:musicOneSubjectClassPlan.getPaidStudentNum() - 1);

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

@@ -470,9 +470,6 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
         sysUser.setOrganId(studentRegistration.getOrganId());
         sysUser.setOrganId(studentRegistration.getOrganId());
 
 
         Boolean updateNameFlag = false;
         Boolean updateNameFlag = false;
-//        if (sysUser.getRealName() == null) {
-//            sysUser.setRealName(studentRegistration.getParentsName());
-//        }
 
 
         if (StringUtils.isEmpty(sysUser.getUsername())) {
         if (StringUtils.isEmpty(sysUser.getUsername())) {
             sysUser.setUsername(studentRegistration.getName());
             sysUser.setUsername(studentRegistration.getName());

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

@@ -7,6 +7,7 @@ import com.ym.mec.biz.dal.entity.*;
 import com.ym.mec.biz.dal.enums.*;
 import com.ym.mec.biz.dal.enums.*;
 import com.ym.mec.biz.service.StudentServeService;
 import com.ym.mec.biz.service.StudentServeService;
 import com.ym.mec.biz.service.SysConfigService;
 import com.ym.mec.biz.service.SysConfigService;
+import com.ym.mec.biz.service.SysTenantConfigService;
 import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.tenant.TenantContextHolder;
 import com.ym.mec.common.tenant.TenantContextHolder;
 import com.ym.mec.util.date.DateUtil;
 import com.ym.mec.util.date.DateUtil;
@@ -47,7 +48,7 @@ public class StudentServeServiceImpl implements StudentServeService {
     @Autowired
     @Autowired
     private StudentServeService studentServeService;
     private StudentServeService studentServeService;
     @Autowired
     @Autowired
-    private SysConfigDao sysConfigDao;
+    private SysTenantConfigService sysTenantConfigService;
     @Autowired
     @Autowired
     private ClassGroupStudentMapperDao classGroupStudentMapperDao;
     private ClassGroupStudentMapperDao classGroupStudentMapperDao;
     @Autowired
     @Autowired
@@ -316,8 +317,8 @@ public class StudentServeServiceImpl implements StudentServeService {
         Date nextMonday = Date.from(sunDayDate.plusDays(1).atStartOfDay(DateUtil.zoneId).toInstant());
         Date nextMonday = Date.from(sunDayDate.plusDays(1).atStartOfDay(DateUtil.zoneId).toInstant());
 
 
         Set<String> holidayDays = new HashSet<>();
         Set<String> holidayDays = new HashSet<>();
-        String holidaySetting = sysConfigDao.findConfigValue(SysConfigService.HOLIDAY_SETTING);
-        if(StringUtils.isNotEmpty(holidaySetting)){
+        String holidaySetting = sysTenantConfigService.getTenantConfigValue(SysConfigService.HOLIDAY_SETTING,tenantId);
+        if(StringUtils.isNotBlank(holidaySetting)){
             holidayDays = new HashSet<>(JSON.parseArray(holidaySetting, String.class));
             holidayDays = new HashSet<>(JSON.parseArray(holidaySetting, String.class));
         }
         }
         LocalDate everyDay=monDayDate;
         LocalDate everyDay=monDayDate;

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

@@ -8,6 +8,7 @@ import com.ym.mec.biz.dal.entity.SysConfig;
 import com.ym.mec.biz.dal.entity.TeacherCourseStatistics;
 import com.ym.mec.biz.dal.entity.TeacherCourseStatistics;
 import com.ym.mec.biz.dal.page.TeacherCourseStatisticsQueryInfo;
 import com.ym.mec.biz.dal.page.TeacherCourseStatisticsQueryInfo;
 import com.ym.mec.biz.service.SysConfigService;
 import com.ym.mec.biz.service.SysConfigService;
+import com.ym.mec.biz.service.SysTenantConfigService;
 import com.ym.mec.biz.service.TeacherCourseStatisticsService;
 import com.ym.mec.biz.service.TeacherCourseStatisticsService;
 import com.ym.mec.common.dal.BaseDAO;
 import com.ym.mec.common.dal.BaseDAO;
 import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.page.PageInfo;
@@ -16,6 +17,7 @@ import com.ym.mec.common.tenant.TenantContextHolder;
 import com.ym.mec.util.collection.MapUtil;
 import com.ym.mec.util.collection.MapUtil;
 import com.ym.mec.util.date.DateUtil;
 import com.ym.mec.util.date.DateUtil;
 
 
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
@@ -30,6 +32,8 @@ public class TeacherCourseStatisticsServiceImpl extends BaseServiceImpl<Long, Te
     private TeacherCourseStatisticsDao teacherCourseStatisticsDao;
     private TeacherCourseStatisticsDao teacherCourseStatisticsDao;
     @Autowired
     @Autowired
     private SysConfigService sysConfigService;
     private SysConfigService sysConfigService;
+    @Autowired
+    private SysTenantConfigService sysTenantConfigService;
 
 
     @Override
     @Override
     public BaseDAO<Long, TeacherCourseStatistics> getDAO() {
     public BaseDAO<Long, TeacherCourseStatistics> getDAO() {
@@ -63,8 +67,14 @@ public class TeacherCourseStatisticsServiceImpl extends BaseServiceImpl<Long, Te
         if (teacherCourseStatisticsList.size() == 0) {
         if (teacherCourseStatisticsList.size() == 0) {
             return;
             return;
         }
         }
-        SysConfig salaryConfig = sysConfigService.findByParamName(SysConfigService.WARNING_MIN_COURSE_SALARY);
-        JSONObject salaryConfigObject = JSON.parseObject(salaryConfig.getParanValue());
+        Integer tenantId = TenantContextHolder.getTenantId();
+        String configValue = sysTenantConfigService.getTenantConfigValue(SysConfigService.WARNING_MIN_COURSE_SALARY, tenantId);
+        JSONObject salaryConfigObject;
+        if(StringUtils.isNotEmpty(configValue)){
+            salaryConfigObject = JSON.parseObject(configValue);
+        }else {
+            salaryConfigObject = new JSONObject();
+        }
 
 
         List<Integer> userIds = teacherCourseStatisticsList.stream().map(TeacherCourseStatistics::getUserId).collect(Collectors.toList());
         List<Integer> userIds = teacherCourseStatisticsList.stream().map(TeacherCourseStatistics::getUserId).collect(Collectors.toList());
         List<TeacherCourseStatistics> teCourseSalaryStaticsAndTypes = teacherCourseStatisticsDao.findUserCourseSalaryByUserIds(userIds, startDate, endDate);
         List<TeacherCourseStatistics> teCourseSalaryStaticsAndTypes = teacherCourseStatisticsDao.findUserCourseSalaryByUserIds(userIds, startDate, endDate);

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

@@ -137,11 +137,11 @@ public class VipGroupActivityServiceImpl extends BaseServiceImpl<Integer, VipGro
 				checkSettlement(vipGroupSalarySettlement.getGivePracticeSalarySettlement());
 				checkSettlement(vipGroupSalarySettlement.getGivePracticeSalarySettlement());
 			}
 			}
 			vipGroupActivityAddDto.setSalarySettlementJson(JSON.toJSONString(vipGroupActivityAddDto.getVipGroupSalarySettlement()));
 			vipGroupActivityAddDto.setSalarySettlementJson(JSON.toJSONString(vipGroupActivityAddDto.getVipGroupSalarySettlement()));
-			ActivityApplyStudentType applyToStudentType = getApplyToStudentType(vipGroupActivityAddDto.getApplyToStudentType());
 			super.update(vipGroupActivityAddDto);
 			super.update(vipGroupActivityAddDto);
-			applyToStudentType.setActivityId(vipGroupActivityAddDto.getId());
-			activityApplyStudentTypeDao.updateByActivity(applyToStudentType);
 		}
 		}
+		ActivityApplyStudentType applyToStudentType = getApplyToStudentType(vipGroupActivityAddDto.getApplyToStudentType());
+		applyToStudentType.setActivityId(vipGroupActivityAddDto.getId());
+		activityApplyStudentTypeDao.updateByActivity(applyToStudentType);
 		return vipGroupActivityAddDto;
 		return vipGroupActivityAddDto;
 	}
 	}
 
 

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

@@ -158,6 +158,8 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
     @Autowired
     @Autowired
     private SysConfigService sysConfigService;
     private SysConfigService sysConfigService;
     @Autowired
     @Autowired
+    private SysTenantConfigService sysTenantConfigService;
+    @Autowired
     private SysCouponCodeService sysCouponCodeService;
     private SysCouponCodeService sysCouponCodeService;
     @Autowired
     @Autowired
     private ActivityUserMapperService activityUserMapperService;
     private ActivityUserMapperService activityUserMapperService;
@@ -1591,9 +1593,10 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
             Set<String> holidayDays = new HashSet<>();
             Set<String> holidayDays = new HashSet<>();
 
 
             if (skipHoliday) {
             if (skipHoliday) {
-                SysConfig holidaySetting = sysConfigService.findByParamName(SysConfigService.HOLIDAY_SETTING);
-                if (Objects.nonNull(holidaySetting) && StringUtils.isNotBlank(holidaySetting.getParanValue())) {
-                    holidayDays = new HashSet<>(JSON.parseArray(holidaySetting.getParanValue(), String.class));
+                Integer tenantId = TenantContextHolder.getTenantId();
+                String holidaySetting = sysTenantConfigService.getTenantConfigValue(SysConfigService.HOLIDAY_SETTING,tenantId);
+                if(StringUtils.isNotBlank(holidaySetting)){
+                    holidayDays = new HashSet<>(JSON.parseArray(holidaySetting, String.class));
                 }
                 }
             }
             }
 
 

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

@@ -1035,7 +1035,7 @@
         FROM music_group mg
         FROM music_group mg
         LEFT JOIN class_group cg ON cg.music_group_id_ = mg.id_
         LEFT JOIN class_group cg ON cg.music_group_id_ = mg.id_
         LEFT JOIN class_group_student_mapper cgsm ON cgsm.class_group_id_ = cg.id_
         LEFT JOIN class_group_student_mapper cgsm ON cgsm.class_group_id_ = cg.id_
-        WHERE FIND_IN_SET(mg.id_,#{musicGroupIds}) AND cg.group_type_ = 'MUSIC' AND mgsf.user_id_ = #{userId} AND cgsm.user_id_ = #{userId}
+        WHERE FIND_IN_SET(mg.id_,#{musicGroupIds}) AND cg.group_type_ = 'MUSIC' AND cgsm.user_id_ = #{userId}
         GROUP BY mg.id_,mgsf.payment_status_
         GROUP BY mg.id_,mgsf.payment_status_
     </select>
     </select>
 
 

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

@@ -119,7 +119,7 @@
 		<where>
 		<where>
 			sgs.tenant_id_ = #{tenantId}
 			sgs.tenant_id_ = #{tenantId}
 			<if test="teacherId != null">
 			<if test="teacherId != null">
-				sgs.teacher_id_ = #{teacherId}
+				AND sgs.teacher_id_ = #{teacherId}
 			</if>
 			</if>
 			<if test="studentId != null">
 			<if test="studentId != null">
 				AND sgs.user_id_ = #{studentId}
 				AND sgs.user_id_ = #{studentId}

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

@@ -909,7 +909,7 @@
         SELECT o.name_ organ_name_, md.total_num_ student_num_, md.activate_num_ per_num_, md.percent_ per_
         SELECT o.name_ organ_name_, md.total_num_ student_num_, md.activate_num_ per_num_, md.percent_ per_
         FROM index_base_month_data md
         FROM index_base_month_data md
         LEFT JOIN organization o ON o.id_ = md.organ_id_
         LEFT JOIN organization o ON o.id_ = md.organ_id_
-        WHERE data_type_ = 'ACTIVATION_RATE'
+        WHERE data_type_ = 'ACTIVATION_RATE' and md.tenant_id_ = #{tenantId}
         AND month_ = #{month}
         AND month_ = #{month}
         ORDER BY md.percent_ DESC, o.id_
         ORDER BY md.percent_ DESC, o.id_
     </select>
     </select>

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

@@ -596,10 +596,9 @@
         FROM
         FROM
         sys_user_cash_account suca
         sys_user_cash_account suca
         LEFT JOIN sys_user su ON suca.user_id_=su.id_
         LEFT JOIN sys_user su ON suca.user_id_=su.id_
-        WHERE
-            suca.tenant_id_ = #{tenantId}
+        WHERE suca.tenant_id_ = #{tenantId}
         AND su.user_type_ LIKE '%STUDENT%'
         AND su.user_type_ LIKE '%STUDENT%'
-#         suca.course_balance_ >0
+#         suca.course_balance_ > 0
         <if test="search!=null and search!=''">
         <if test="search!=null and search!=''">
             AND (su.username_ LIKE CONCAT('%',#{search},'%') OR su.phone_ LIKE CONCAT('%',#{search},'%'))
             AND (su.username_ LIKE CONCAT('%',#{search},'%') OR su.phone_ LIKE CONCAT('%',#{search},'%'))
         </if>
         </if>

+ 4 - 7
mec-student/src/main/java/com/ym/mec/student/controller/StudentManageController.java

@@ -16,10 +16,7 @@ import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
 import org.springframework.http.HttpStatus;
 import org.springframework.http.MediaType;
 import org.springframework.http.MediaType;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartFile;
 
 
 import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.client.SysUserFeignService;
@@ -319,9 +316,9 @@ public class StudentManageController extends BaseController {
      * 学员注册激活比例列表
      * 学员注册激活比例列表
      * @return
      * @return
      */
      */
-    @GetMapping(value = "studentManage/queryStudentPer")
-    public Object queryStudentPer() {
-        return succeed(studentManageService.queryStudentPer());
+    @GetMapping(value = "studentManage/queryStudentPer/{tenantId}")
+    public Object queryStudentPer(@ApiParam(value = "机构Id", required = true) @PathVariable("tenantId") Integer tenantId) {
+        return succeed(studentManageService.queryStudentPer(tenantId));
     }
     }
 
 
 
 

+ 1 - 0
mec-web/src/main/java/com/ym/mec/web/controller/ActivityPlanController.java

@@ -7,6 +7,7 @@ import com.ym.mec.biz.service.ActivityPlanService;
 import com.ym.mec.biz.service.OrganizationService;
 import com.ym.mec.biz.service.OrganizationService;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.exception.BizException;
+import com.yonge.log.model.AuditLogAnnotation;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;

+ 1 - 1
mec-web/src/main/java/com/ym/mec/web/controller/ExportController.java

@@ -202,7 +202,7 @@ public class ExportController extends BaseController {
             HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"分部", "乐团编号", "乐团名称","合作单位", "乐团状态",
             HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"分部", "乐团编号", "乐团名称","合作单位", "乐团状态",
                     "收费模式","收费类型","乐团主管","成团人数", "在读人数", "申请时间", "成团时间", "清单状态"}, new String[]{
                     "收费模式","收费类型","乐团主管","成团人数", "在读人数", "申请时间", "成团时间", "清单状态"}, new String[]{
                     "organName", "id", "name","cooperationOrganName", "status.msg", "courseViewType.msg","chargeTypeName",
                     "organName", "id", "name","cooperationOrganName", "status.msg", "courseViewType.msg","chargeTypeName",
-                    "educationalTeacherName", "teamTeacherName", "groupMemberNum","payNum"
+                    "educationalTeacherName", /*"teamTeacherName", 和标题对不上*/"groupMemberNum","payNum"
                     ,"createTime","updateTime","hasVerifyMusicalList?'已确认':'未确认'"}, rows);
                     ,"createTime","updateTime","hasVerifyMusicalList?'已确认':'未确认'"}, rows);
             response.setContentType("application/octet-stream");
             response.setContentType("application/octet-stream");
             response.setHeader("Content-Disposition", "attac:wq" +
             response.setHeader("Content-Disposition", "attac:wq" +

+ 1 - 1
mec-web/src/main/java/com/ym/mec/web/controller/SysMusicScoreCategoriesController.java

@@ -76,7 +76,7 @@ public class SysMusicScoreCategoriesController extends BaseController {
     @GetMapping("/queryTree")
     @GetMapping("/queryTree")
     @PreAuthorize("@pcs.hasPermissions('sysMusicScoreCategories/queryTree')")
     @PreAuthorize("@pcs.hasPermissions('sysMusicScoreCategories/queryTree')")
     public Object queryTree(MusicScoreQueryInfo queryInfo) {
     public Object queryTree(MusicScoreQueryInfo queryInfo) {
-        queryInfo.setOrganId(organizationService.getEmployeeOrgan(queryInfo.getOrganId()));
+        //queryInfo.setOrganId(organizationService.getEmployeeOrgan(queryInfo.getOrganId()));
         return succeed(sysMusicScoreCategoriesService.queryTree(queryInfo));
         return succeed(sysMusicScoreCategoriesService.queryTree(queryInfo));
     }
     }
 
 

+ 8 - 1
mec-web/src/main/java/com/ym/mec/web/controller/TaskController.java

@@ -299,7 +299,14 @@ public class TaskController extends BaseController {
 	// 统计老师课酬
 	// 统计老师课酬
 	@GetMapping("/teacherCourseStatistic")
 	@GetMapping("/teacherCourseStatistic")
 	public void teacherCourseStatisticsService() throws Exception {
 	public void teacherCourseStatisticsService() throws Exception {
-		teacherCourseStatisticsService.teacherCourseStatistic();
+		List<TenantInfo> tenantInfos = tenantInfoService.list(new QueryWrapper<TenantInfo>().eq("state_",1));
+		if(tenantInfos != null && tenantInfos.size() > 0){
+			for (TenantInfo tenantInfo : tenantInfos) {
+				TenantContextHolder.setTenantId(tenantInfo.getId());
+				teacherCourseStatisticsService.teacherCourseStatistic();
+				TenantContextHolder.clearTenantId();
+			}
+		}
 	}
 	}
 
 
 	// 更新历史陪练课至已结束
 	// 更新历史陪练课至已结束

+ 8 - 2
mec-web/src/main/java/com/ym/mec/web/controller/education/EduStudentRegistrationController.java

@@ -2,6 +2,7 @@ package com.ym.mec.web.controller.education;
 
 
 import com.ym.mec.biz.dal.dao.MusicGroupDao;
 import com.ym.mec.biz.dal.dao.MusicGroupDao;
 import com.ym.mec.biz.dal.dto.StudentPreRegistrationDto;
 import com.ym.mec.biz.dal.dto.StudentPreRegistrationDto;
+import com.ym.mec.biz.dal.entity.MusicGroup;
 import com.ym.mec.biz.dal.entity.StudentInstrument;
 import com.ym.mec.biz.dal.entity.StudentInstrument;
 import com.ym.mec.biz.dal.entity.StudentPreRegistration;
 import com.ym.mec.biz.dal.entity.StudentPreRegistration;
 import com.ym.mec.biz.dal.page.StudentInstrumentQueryInfo;
 import com.ym.mec.biz.dal.page.StudentInstrumentQueryInfo;
@@ -54,7 +55,12 @@ public class EduStudentRegistrationController extends BaseController {
     @ApiOperation(value = "乐团预报名列表分页查询")
     @ApiOperation(value = "乐团预报名列表分页查询")
     @GetMapping("/queryPreApplyList")
     @GetMapping("/queryPreApplyList")
     public Object queryPreApplyList(StudentPreRegistrationQueryInfo queryInfo) {
     public Object queryPreApplyList(StudentPreRegistrationQueryInfo queryInfo) {
-    	ModelMap model = new ModelMap();
+        MusicGroup musicGroup = musicGroupDao.get(queryInfo.getMusicGroupId());
+
+        ModelMap model = new ModelMap();
+        //FIX:2238 直接从乐团组获取tenantId
+        queryInfo.setTenantId(musicGroup.getTenantId());
+
     	PageInfo<StudentPreRegistrationDto> dataList = studentPreRegistrationService.queryListForPage(queryInfo);
     	PageInfo<StudentPreRegistrationDto> dataList = studentPreRegistrationService.queryListForPage(queryInfo);
     	model.put("dataList", dataList);
     	model.put("dataList", dataList);
     	
     	
@@ -77,7 +83,7 @@ public class EduStudentRegistrationController extends BaseController {
     	model.put("cloudTeacher", cloudTeacher);
     	model.put("cloudTeacher", cloudTeacher);
     	model.put("total", studentPreRegistrationList.size());
     	model.put("total", studentPreRegistrationList.size());
     	
     	
-    	model.put("musicGroup", musicGroupDao.get(queryInfo.getMusicGroupId()));
+    	model.put("musicGroup", musicGroup);
     	
     	
         return succeed(model);
         return succeed(model);
     }
     }