|
@@ -20,6 +20,7 @@ import com.ym.mec.common.page.PageInfo;
|
|
|
import com.ym.mec.common.page.QueryInfo;
|
|
|
import com.ym.mec.common.service.impl.BaseServiceImpl;
|
|
|
import com.ym.mec.im.ImFeignService;
|
|
|
+import com.ym.mec.jiari.JiaRiFeignService;
|
|
|
import com.ym.mec.util.collection.MapUtil;
|
|
|
import com.ym.mec.util.date.DateConvertor;
|
|
|
import com.ym.mec.util.date.DateUtil;
|
|
@@ -82,6 +83,8 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
|
private StudentRegistrationService studentRegistrationService;
|
|
|
@Autowired
|
|
|
private ImFeignService imFeignService;
|
|
|
+ @Autowired
|
|
|
+ private JiaRiFeignService jiaRiFeignService;
|
|
|
|
|
|
|
|
|
@Override
|
|
@@ -846,8 +849,19 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
|
List<CourseScheduleStudentPayment> courseScheduleStudentPaymentList = new ArrayList<>();
|
|
|
BigDecimal expectPrice = new BigDecimal("0");
|
|
|
int times = 0;
|
|
|
+
|
|
|
+ Map<String, Integer> holidayDays = new HashMap<>();
|
|
|
+ if(classGroup4MixDto.getHoliday()) {
|
|
|
+ Map<Integer, Map<String, Integer>> holiday = jiaRiFeignService.query(now.getYear());
|
|
|
+ holidayDays = holiday.get(now.getYear());
|
|
|
+ }
|
|
|
+
|
|
|
WhileNode:
|
|
|
while (true) {
|
|
|
+ if (classGroup4MixDto.getHoliday() && !holidayDays.containsKey(now.format(DateTimeFormatter.ofPattern("MM-dd")))) {
|
|
|
+ now = now.plusDays(1);
|
|
|
+ continue;
|
|
|
+ }
|
|
|
int dayOfWeek = now.getDayOfWeek().getValue();//当前星期
|
|
|
for (CourseTimeDto courseTimeDto : classGroup4MixDto.getCourseTimeDtoList()) {
|
|
|
if (!courseTimeDto.getDayOfWeek().equals(dayOfWeek)) continue;
|
|
@@ -1037,8 +1051,18 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
|
List<CourseScheduleStudentPayment> courseScheduleStudentPaymentList = new ArrayList<>();
|
|
|
BigDecimal expectPrice = new BigDecimal("0");
|
|
|
int times = 0;
|
|
|
+ Map<String, Integer> holidayDays = new HashMap<>();
|
|
|
+ if(classGroup4MixDto.getHoliday()) {
|
|
|
+ Map<Integer, Map<String, Integer>> holiday = jiaRiFeignService.query(now.getYear());
|
|
|
+ holidayDays = holiday.get(now.getYear());
|
|
|
+ }
|
|
|
+
|
|
|
WhileNode:
|
|
|
while (true) {
|
|
|
+ if (classGroup4MixDto.getHoliday() && !holidayDays.containsKey(now.format(DateTimeFormatter.ofPattern("MM-dd")))) {
|
|
|
+ now = now.plusDays(1);
|
|
|
+ continue;
|
|
|
+ }
|
|
|
int dayOfWeek = now.getDayOfWeek().getValue();
|
|
|
for (CourseTimeDto courseTimeDto : classGroup4MixDto.getCourseTimeDtoList()) {
|
|
|
if (!courseTimeDto.getDayOfWeek().equals(dayOfWeek)) continue;
|
|
@@ -1225,8 +1249,23 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
|
List<CourseScheduleStudentPayment> courseScheduleStudentPaymentList = new ArrayList<>();
|
|
|
BigDecimal expectPrice = new BigDecimal("0");
|
|
|
int times = 0;
|
|
|
+ Map<String, Integer> holidayDays = new HashMap<>();
|
|
|
+ if(classGroup4MixDto.getHoliday()) {
|
|
|
+ Map<Integer, Map<String, Integer>> holiday = jiaRiFeignService.query(now.getYear());
|
|
|
+ holidayDays = holiday.get(now.getYear());
|
|
|
+ }
|
|
|
+
|
|
|
WhileNode:
|
|
|
while (true) {
|
|
|
+ if (classGroup4MixDto.getHoliday() && !holidayDays.containsKey(now.format(DateTimeFormatter.ofPattern("MM-dd")))) {
|
|
|
+ now = now.plusDays(1);
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ if (!holidayDays.containsKey(now.format(DateTimeFormatter.ofPattern("MM-dd")))) {
|
|
|
+ now = now.plusDays(1);
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
int dayOfWeek = now.getDayOfWeek().getValue();
|
|
|
for (CourseTimeDto courseTimeDto : classGroup4MixDto.getCourseTimeDtoList()) {
|
|
|
if (!courseTimeDto.getDayOfWeek().equals(dayOfWeek)) continue;
|