|
@@ -1,5 +1,7 @@
|
|
|
package com.ym.mec.teacher.controller;
|
|
|
|
|
|
+import com.ym.mec.auth.api.client.SysUserFeignService;
|
|
|
+import com.ym.mec.auth.api.entity.SysUser;
|
|
|
import com.ym.mec.biz.dal.dto.StudentAttendanceDto;
|
|
|
import com.ym.mec.biz.dal.dto.TeacherSignOutDto;
|
|
|
import com.ym.mec.biz.dal.page.TeacherAttendanceQueryInfo;
|
|
@@ -10,8 +12,11 @@ import com.ym.mec.common.controller.BaseController;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.http.HttpStatus;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
+import java.util.Objects;
|
|
|
+
|
|
|
@RequestMapping("teacherAttendance")
|
|
|
@Api(tags = "教师签到服务")
|
|
|
@RestController
|
|
@@ -25,6 +30,8 @@ public class TeacherAttendanceController extends BaseController {
|
|
|
|
|
|
@Autowired
|
|
|
private ClassGroupService classGroupService;
|
|
|
+ @Autowired
|
|
|
+ private SysUserFeignService sysUserFeignService;
|
|
|
|
|
|
@ApiOperation(value = "新增教师签到")
|
|
|
@PostMapping("/add")
|
|
@@ -50,4 +57,14 @@ public class TeacherAttendanceController extends BaseController {
|
|
|
studentAttendanceService.addStudentAttendances(studentAttendanceInfo);
|
|
|
return succeed();
|
|
|
}
|
|
|
+
|
|
|
+ @ApiOperation(value = "获取签退详情")
|
|
|
+ @GetMapping("/getTeacherSignDetail")
|
|
|
+ public Object getTeacherSignDetail(Integer courseScheduleId){
|
|
|
+ SysUser user = sysUserFeignService.queryUserInfo();
|
|
|
+ if(Objects.isNull(user)){
|
|
|
+ return failed(HttpStatus.FORBIDDEN,"请登录");
|
|
|
+ }
|
|
|
+ return succeed(teacherAttendanceService.getTeacherSignDetail(courseScheduleId, user.getId()));
|
|
|
+ }
|
|
|
}
|