|
@@ -129,7 +129,7 @@ class JianyuekbScheduleTaskTest2 {
|
|
doExecute();
|
|
doExecute();
|
|
}
|
|
}
|
|
public void doExecute() {
|
|
public void doExecute() {
|
|
- String sql = "SELECT * FROM course_receive_msg WHERE delete_mark = 0 AND is_callback IS NULL";
|
|
|
|
|
|
+ String sql = "SELECT * FROM course_receive_msg WHERE delete_mark = 0 AND is_callback = -1";
|
|
List<Map<String, Object>> receiveMsgs = SqlRunnerAdapter.db().selectList(sql);
|
|
List<Map<String, Object>> receiveMsgs = SqlRunnerAdapter.db().selectList(sql);
|
|
if(receiveMsgs.isEmpty()){
|
|
if(receiveMsgs.isEmpty()){
|
|
return;
|
|
return;
|
|
@@ -206,19 +206,19 @@ class JianyuekbScheduleTaskTest2 {
|
|
long between = ChronoUnit.DAYS.between(startDateObj, endDateObj);
|
|
long between = ChronoUnit.DAYS.between(startDateObj, endDateObj);
|
|
int times = Integer.parseInt(((between / 7) + 1) + "");
|
|
int times = Integer.parseInt(((between / 7) + 1) + "");
|
|
|
|
|
|
- for (int index = 0; index < times; index ++) {
|
|
|
|
- LocalDate statrTime = startDateObj.plusDays(index * 7L);
|
|
|
|
- String startDate = statrTime.format(formatter);
|
|
|
|
- LocalDate endTime = statrTime.plusDays(6L);
|
|
|
|
- if(endTime.isAfter(endDateObj)){
|
|
|
|
- endTime = endDateObj;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- String endDate = endTime.format(formatter);
|
|
|
|
- //获取课表并存到数据库
|
|
|
|
- JsonArray scheduleInfo = dataUtil.getScheduleInfoByGrade(eduYearSerialNo, startDate, endDate);
|
|
|
|
- allScheduleInfo.addAll(scheduleInfo);
|
|
|
|
- }
|
|
|
|
|
|
+// for (int index = 0; index < times; index ++) {
|
|
|
|
+// LocalDate statrTime = startDateObj.plusDays(index * 7L);
|
|
|
|
+// String startDate = statrTime.format(formatter);
|
|
|
|
+// LocalDate endTime = statrTime.plusDays(6L);
|
|
|
|
+// if(endTime.isAfter(endDateObj)){
|
|
|
|
+// endTime = endDateObj;
|
|
|
|
+// }
|
|
|
|
+//
|
|
|
|
+// String endDate = endTime.format(formatter);
|
|
|
|
+// //获取课表并存到数据库
|
|
|
|
+// JsonArray scheduleInfo = dataUtil.getScheduleInfoByGrade(eduYearSerialNo, startDate, endDate);
|
|
|
|
+// allScheduleInfo.addAll(scheduleInfo);
|
|
|
|
+// }
|
|
|
|
|
|
updSql = "update course_receive_msg set is_callback = 1 where id = " + receiveMsg.get("id").toString();
|
|
updSql = "update course_receive_msg set is_callback = 1 where id = " + receiveMsg.get("id").toString();
|
|
SqlRunnerAdapter.db().update(updSql);
|
|
SqlRunnerAdapter.db().update(updSql);
|
|
@@ -327,6 +327,9 @@ class JianyuekbScheduleTaskTest2 {
|
|
}
|
|
}
|
|
|
|
|
|
for (WfCourseAdjust courseAdjust : list) {
|
|
for (WfCourseAdjust courseAdjust : list) {
|
|
|
|
+ if(courseAdjust.getUserId() == 14954805813957L){
|
|
|
|
+ System.out.println(courseAdjust.getId());
|
|
|
|
+ }
|
|
List<CourseTable> courseList = courseTableService.list(
|
|
List<CourseTable> courseList = courseTableService.list(
|
|
new MPJLambdaWrapper<CourseTable>()
|
|
new MPJLambdaWrapper<CourseTable>()
|
|
.select(CourseTable::getId)
|
|
.select(CourseTable::getId)
|
|
@@ -345,6 +348,7 @@ class JianyuekbScheduleTaskTest2 {
|
|
if(courseList.size() != courseCount){
|
|
if(courseList.size() != courseCount){
|
|
//表明课程变化了,需要重新申请,需要将原来的申请作废并进行微信消息通知
|
|
//表明课程变化了,需要重新申请,需要将原来的申请作废并进行微信消息通知
|
|
courseAdjust.setEnabledMark(EnabledMark.DISABLED.getCode());
|
|
courseAdjust.setEnabledMark(EnabledMark.DISABLED.getCode());
|
|
|
|
+
|
|
courseAdjust.setCancelReason("由于课表更新,当前调/顶课课程发生变化,该调顶课已失效,请重新发起调顶课");
|
|
courseAdjust.setCancelReason("由于课表更新,当前调/顶课课程发生变化,该调顶课已失效,请重新发起调顶课");
|
|
cancelList.add(courseAdjust);
|
|
cancelList.add(courseAdjust);
|
|
List<String> thing16Str = new ArrayList<>();
|
|
List<String> thing16Str = new ArrayList<>();
|