|
@@ -0,0 +1,43 @@
|
|
|
+package com.ym.mec.web.controller;
|
|
|
+
|
|
|
+import com.ym.mec.common.controller.BaseController;
|
|
|
+import com.ym.mec.common.security.SecurityUtils;
|
|
|
+import com.ym.mec.web.dal.entity.Teacher;
|
|
|
+import com.ym.mec.web.dal.entity.TeacherAttendance;
|
|
|
+import com.ym.mec.web.dal.page.TeacherAttendanceQueryInfo;
|
|
|
+import com.ym.mec.web.dal.page.TeacherQueryInfo;
|
|
|
+import com.ym.mec.web.service.ClassGroupService;
|
|
|
+import com.ym.mec.web.service.TeacherAttendanceService;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import io.swagger.annotations.ApiParam;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import java.util.Date;
|
|
|
+
|
|
|
+@RequestMapping("teacherAttendance")
|
|
|
+@Api(tags = "教师签到服务")
|
|
|
+@RestController
|
|
|
+public class TeacherAttendanceController extends BaseController {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private TeacherAttendanceService teacherAttendanceService;
|
|
|
+
|
|
|
+ @ApiOperation(value = "新增教师签到")
|
|
|
+ @PostMapping("/add")
|
|
|
+ public Object add(@RequestBody TeacherAttendance teacherAttendance) {
|
|
|
+ Date date = new Date();
|
|
|
+ teacherAttendance.setSignInTime(date);
|
|
|
+ teacherAttendance.setCreateTime(date);
|
|
|
+ teacherAttendanceService.insert(teacherAttendance);
|
|
|
+ return succeed();
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "分页查询教师签到列表")
|
|
|
+ @PostMapping("/queryPage")
|
|
|
+ public Object queryPage(@RequestBody TeacherAttendanceQueryInfo queryInfo) {
|
|
|
+ return succeed(teacherAttendanceService.queryPage(queryInfo));
|
|
|
+ }
|
|
|
+
|
|
|
+}
|