| | |
| | | import com.ruoyi.staff.dto.PersonalAttendanceRecordsDto; |
| | | import com.ruoyi.staff.pojo.PersonalAttendanceRecords; |
| | | import com.ruoyi.staff.service.PersonalAttendanceRecordsService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import jakarta.annotation.Resource; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/personalAttendanceRecords") |
| | | @Api(tags = "人员打卡签到") |
| | | @Tag(name = "人员打卡签到") |
| | | public class PersonalAttendanceRecordsController { |
| | | @Resource |
| | | private PersonalAttendanceRecordsService personalAttendanceRecordsService; |
| | | |
| | | @ApiOperation("新增打卡签到") |
| | | @Operation(summary = "新增打卡签到") |
| | | @PostMapping("") |
| | | public AjaxResult add(@RequestBody PersonalAttendanceRecordsDto personalAttendanceRecordsDto){ |
| | | return AjaxResult.success(personalAttendanceRecordsService.add(personalAttendanceRecordsDto)); |
| | | } |
| | | |
| | | @ApiOperation("分页查询打卡签到") |
| | | @Operation(summary = "分页查询打卡签到") |
| | | @GetMapping("/listPage") |
| | | public AjaxResult listPage(Page page, PersonalAttendanceRecordsDto personalAttendanceRecordsDto){ |
| | | return AjaxResult.success(personalAttendanceRecordsService.listPage(page, personalAttendanceRecordsDto)); |
| | | } |
| | | |
| | | @ApiOperation("获取当前人的考勤相关数据") |
| | | @Operation(summary = "获取当前人的考勤相关数据") |
| | | @GetMapping("/today") |
| | | public AjaxResult todayInfo(PersonalAttendanceRecordsDto personalAttendanceRecordsDto){ |
| | | return AjaxResult.success(personalAttendanceRecordsService.todayInfo(personalAttendanceRecordsDto)); |
| | | } |
| | | |
| | | @ApiOperation("导出打卡签到") |
| | | @Operation(summary = "导出打卡签到") |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, PersonalAttendanceRecordsDto personalAttendanceRecordsDto) { |
| | | personalAttendanceRecordsService.export(response, personalAttendanceRecordsDto); |