|
|
@@ -310,7 +310,7 @@ public class CourseTableServiceImpl extends ServiceImpl<CourseTableMapper, Cours
|
|
|
swapCourseTable.setWeeksCn(courseTableBak.getWeeksCn());
|
|
|
courseTableMapper.updateById(swapCourseTable);
|
|
|
//提交调课接口
|
|
|
- sendExchange(courseTableBak, swapCourseTableBak);
|
|
|
+ sendExchange(courseTableBak, swapCourseTableBak, courseAdjust);
|
|
|
|
|
|
}else if(CourseAdjustTypeEnum.courseSubstitute.getCode().equals(courseAdjust.getAdjustType())){
|
|
|
CourseTable courseTable = courseTableMapper.selectById(courseAdjust.getCourseId());
|
|
|
@@ -335,6 +335,7 @@ public class CourseTableServiceImpl extends ServiceImpl<CourseTableMapper, Cours
|
|
|
jsonObject.addProperty("timetableId", courseTable.getJianyueId());
|
|
|
jsonObject.addProperty("isCycles", Boolean.FALSE);
|
|
|
jsonObject.addProperty("reason", courseAdjust.getReason());
|
|
|
+ jsonObject.addProperty("teacherId", courseAdjust.getUserId());
|
|
|
JsonArray extendIds = new JsonArray();
|
|
|
extendIds.add(courseTable.getTeacherId());
|
|
|
jsonObject.add("extendIds", extendIds);
|
|
|
@@ -344,6 +345,7 @@ public class CourseTableServiceImpl extends ServiceImpl<CourseTableMapper, Cours
|
|
|
//生成签名
|
|
|
String sign = ScheduleUtil.createSign(timestamp);
|
|
|
String result = ScheduleUtil.doPost(url, jsonObject.toString(), sign, timestamp);
|
|
|
+ System.out.println(result);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -352,15 +354,17 @@ public class CourseTableServiceImpl extends ServiceImpl<CourseTableMapper, Cours
|
|
|
* @param swapCourseTable
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
- void sendExchange(CourseTable courseTable, CourseTable swapCourseTable) throws Exception {
|
|
|
+ void sendExchange(CourseTable courseTable, CourseTable swapCourseTable, WfCourseAdjust courseAdjust) throws Exception {
|
|
|
String url = ScheduleUtil.apiUrl + "RescheduleApply/Extend/Submit";
|
|
|
JsonObject jsonObject = new JsonObject();
|
|
|
jsonObject.addProperty("timetableId", courseTable.getJianyueId());
|
|
|
jsonObject.addProperty("isCycles", Boolean.FALSE);
|
|
|
-
|
|
|
- JsonArray extendIds = new JsonArray();
|
|
|
- extendIds.add(courseTable.getTeacherId());
|
|
|
- jsonObject.add("extendIds", extendIds);
|
|
|
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
|
|
+ jsonObject.addProperty("date", swapCourseTable.getScheduleDate().format(formatter));
|
|
|
+ jsonObject.addProperty("numberOfDay", swapCourseTable.getTimeNumber());
|
|
|
+ jsonObject.addProperty("rescheduleId", swapCourseTable.getJianyueId());
|
|
|
+ jsonObject.addProperty("reason", courseAdjust.getReason());
|
|
|
+ jsonObject.addProperty("teacherId", courseAdjust.getUserId());
|
|
|
|
|
|
//获取时间戳
|
|
|
long timestamp = System.currentTimeMillis();
|