|
|
@@ -1,6 +1,7 @@
|
|
|
package com.usoftchina.smartschool.school.wxschool.basic.service.impl;
|
|
|
|
|
|
import com.usoftchina.smartschool.school.po.ClazzDO;
|
|
|
+import com.usoftchina.smartschool.school.po.InOutRecordDO;
|
|
|
import com.usoftchina.smartschool.school.po.OutInRecordDO;
|
|
|
import com.usoftchina.smartschool.school.po.StudentDO;
|
|
|
import com.usoftchina.smartschool.school.wxschool.basic.service.WxOutInRecordService;
|
|
|
@@ -13,9 +14,7 @@ import com.usoftchina.smartschool.school.wxschool.utils.ObjectUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
+import java.util.*;
|
|
|
|
|
|
|
|
|
@Service
|
|
|
@@ -83,5 +82,20 @@ public class WxOutInRecordServiceImpl implements WxOutInRecordService {
|
|
|
throw new Exception("暂无数据");
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public InOutRecordDO getInOutRecordById(Long id){
|
|
|
+ InOutRecordDO inOutRecordDO = outInRecordMapper.selectRecordById(id);
|
|
|
+ Date date = inOutRecordDO.getRecordDate();
|
|
|
+ Calendar calendar = Calendar.getInstance();
|
|
|
+ calendar.setTime(date);
|
|
|
+ String[] weekDays = { "星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六" };
|
|
|
+ int weekday = calendar.get(Calendar.DAY_OF_WEEK) - 1;
|
|
|
+ if (weekday < 0) {
|
|
|
+ weekday = 0;
|
|
|
+ }
|
|
|
+ inOutRecordDO.setWeekDays(weekDays[weekday]);
|
|
|
+ return inOutRecordDO;
|
|
|
+ }
|
|
|
|
|
|
}
|