|
|
@@ -58,6 +58,7 @@ import java.time.LocalDateTime;
|
|
|
import java.time.ZoneId;
|
|
|
import java.time.format.DateTimeFormatter;
|
|
|
import java.util.ArrayList;
|
|
|
+import java.util.Date;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
@@ -231,11 +232,10 @@ public class CourseTableServiceImpl extends ServiceImpl<CourseTableMapper, Cours
|
|
|
* 调课顶课查询
|
|
|
*/
|
|
|
@Override
|
|
|
- public List<CourseListVo> getAdjustList(Long teacherId, String adjustDate) {
|
|
|
+ public List<CourseListVo> getAdjustList(Long teacherId, Date adjustDate) {
|
|
|
CourseTableAdjustDto dto = new CourseTableAdjustDto();
|
|
|
- if(!StrUtil.isEmpty(adjustDate)){
|
|
|
- DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss");
|
|
|
- LocalDateTime localDateTime = LocalDateTime.parse(adjustDate, formatter);
|
|
|
+ if(!ObjectUtil.isEmpty(adjustDate)){
|
|
|
+ LocalDateTime localDateTime = adjustDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime();
|
|
|
DayOfWeek dayOfWeek = localDateTime.getDayOfWeek();
|
|
|
dto.setWeek(dayOfWeek.getValue());
|
|
|
}
|
|
|
@@ -245,7 +245,7 @@ public class CourseTableServiceImpl extends ServiceImpl<CourseTableMapper, Cours
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public String getPreCheck(Integer preCheckType, Long courseId, Long swapCourseId, String swapDate, Long subTeacherId) {
|
|
|
+ public String getPreCheck(Integer preCheckType, Long courseId, Long swapCourseId, Date swapDate, Long subTeacherId) {
|
|
|
if(preCheckType != null){
|
|
|
if(preCheckType == 1){
|
|
|
CourseTable courseTable = courseTableMapper.selectById(courseId);
|
|
|
@@ -306,7 +306,7 @@ public class CourseTableServiceImpl extends ServiceImpl<CourseTableMapper, Cours
|
|
|
* @param swapCourseTable 对调的课程
|
|
|
* @return 检查结果
|
|
|
*/
|
|
|
- JsonObject getExtendPreCheck(String swapDate, CourseTable courseTable, CourseTable swapCourseTable) throws Exception {
|
|
|
+ JsonObject getExtendPreCheck(Date swapDate, CourseTable courseTable, CourseTable swapCourseTable) throws Exception {
|
|
|
JsonParser jsonParser = new JsonParser();
|
|
|
String url = ScheduleUtil.apiUrl + "RescheduleApply/Extend/PreTesting";
|
|
|
JsonObject jsonObject = new JsonObject();
|
|
|
@@ -316,7 +316,8 @@ public class CourseTableServiceImpl extends ServiceImpl<CourseTableMapper, Cours
|
|
|
// jsonObject.addProperty("endDate", "2024-01-31");
|
|
|
// jsonObject.addProperty("dayOfweek", 5);
|
|
|
jsonObject.addProperty("numberOfday", swapCourseTable.getTimeNumber());
|
|
|
- jsonObject.addProperty("date", swapDate);
|
|
|
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
|
|
+ jsonObject.addProperty("date", swapDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime().format(formatter));
|
|
|
jsonObject.addProperty("reschduleId", courseTable.getJianyueId());
|
|
|
|
|
|
//获取时间戳
|