|
@@ -45,7 +45,7 @@ public class StudentServeServiceImpl implements StudentServeService {
|
|
|
@Autowired
|
|
|
private StudentServeService studentServeService;
|
|
|
@Autowired
|
|
|
- private SysConfigService sysConfigService;
|
|
|
+ private SysConfigDao sysConfigDao;
|
|
|
@Autowired
|
|
|
private ClassGroupStudentMapperDao classGroupStudentMapperDao;
|
|
|
@Autowired
|
|
@@ -311,9 +311,9 @@ public class StudentServeServiceImpl implements StudentServeService {
|
|
|
Date nextMonday = Date.from(sunDayDate.plusDays(1).atStartOfDay(DateUtil.zoneId).toInstant());
|
|
|
|
|
|
Set<String> holidayDays = new HashSet<>();
|
|
|
- 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 = sysConfigDao.findConfigValue(SysConfigService.HOLIDAY_SETTING);
|
|
|
+ if(StringUtils.isNotEmpty(holidaySetting)){
|
|
|
+ holidayDays = new HashSet<>(JSON.parseArray(holidaySetting, String.class));
|
|
|
}
|
|
|
LocalDate everyDay=monDayDate;
|
|
|
boolean weekInHoliday = true;
|
|
@@ -910,10 +910,18 @@ public class StudentServeServiceImpl implements StudentServeService {
|
|
|
result.put("isAssignHomework", 0);
|
|
|
return result;
|
|
|
}
|
|
|
+ String configValue = sysConfigDao.findConfigValue(SysConfigService.HOMEWORK_OPEN_FLAG);
|
|
|
+ if(StringUtils.isEmpty(configValue)){
|
|
|
+ configValue = "0";
|
|
|
+ }
|
|
|
List<Integer> studentIds=new ArrayList<>();
|
|
|
if(StringUtils.isNotBlank(studentIdsStr)){
|
|
|
- //获取有会员的学员数
|
|
|
- result.put("memberNum", studentDao.getMemberNum(studentIdsStr));
|
|
|
+ if(configValue.equals("0")){
|
|
|
+ result.put("memberNum",0);
|
|
|
+ }else {
|
|
|
+ //获取有会员的学员数
|
|
|
+ result.put("memberNum", studentDao.getMemberNum(studentIdsStr));
|
|
|
+ }
|
|
|
studentIds= Arrays.asList(studentIdsStr.split(",")).stream().map(id->Integer.valueOf(id)).collect(Collectors.toList());
|
|
|
}
|
|
|
|
|
@@ -925,14 +933,20 @@ public class StudentServeServiceImpl implements StudentServeService {
|
|
|
result.put("isAssignHomework", 0);
|
|
|
return result;
|
|
|
}
|
|
|
- MusicGroup musicGroup = musicGroupDao.get(courseSchedule.getMusicGroupId());
|
|
|
- if(musicGroup != null){
|
|
|
- result.put("courseViewType", CourseViewTypeEnum.MEMBER_FEE);
|
|
|
+ if(configValue.equals("0")){
|
|
|
+ result.put("memberNum",0);
|
|
|
+ result.put("courseViewType", CourseViewTypeEnum.COURSE_FEE);
|
|
|
}else {
|
|
|
- List<BasicUserDto> students = courseScheduleStudentPaymentDao.findStudents(courseScheduleId);
|
|
|
- Set<Integer> collect = students.stream().map(e -> e.getUserId()).collect(Collectors.toSet());
|
|
|
- result.put("memberNum", studentDao.getMemberNum(StringUtils.join(collect,",")));
|
|
|
+ MusicGroup musicGroup = musicGroupDao.get(courseSchedule.getMusicGroupId());
|
|
|
+ if(musicGroup != null){
|
|
|
+ result.put("courseViewType", musicGroup.getCourseViewType());
|
|
|
+ }else if(result.get("memberNum") == null){
|
|
|
+ List<BasicUserDto> students = courseScheduleStudentPaymentDao.findStudents(courseScheduleId);
|
|
|
+ Set<Integer> collect = students.stream().map(e -> e.getUserId()).collect(Collectors.toSet());
|
|
|
+ result.put("memberNum", studentDao.getMemberNum(StringUtils.join(collect,",")));
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
localDate=LocalDateTime.ofInstant(courseSchedule.getClassDate().toInstant(), DateUtil.zoneId).toLocalDate();
|
|
|
List<CourseScheduleStudentPayment> courseScheduleStudentPayments = courseScheduleStudentPaymentDao.findByCourseSchedule(courseScheduleId);
|
|
|
if(CollectionUtils.isEmpty(courseScheduleStudentPayments)){
|