考勤打卡模块
This commit is contained in:
		| @ -81,6 +81,9 @@ public class WgzAppController { | ||||
| 	@Autowired | ||||
| 	private IBgtProjectRecruitApplyService iBgtProjectRecruitApplyService; | ||||
|  | ||||
| 	@Autowired | ||||
| 	private IWgzAttendanceService iWgzAttendanceService; | ||||
|  | ||||
|  | ||||
| 	/** | ||||
| 	 * 【注册】务工者注册 | ||||
| @ -88,7 +91,7 @@ public class WgzAppController { | ||||
| 	@ApiOperation("APP务工者-注册") | ||||
| 	@PreAuthorize("@ss.hasPermi('wgzApp:user:register')") | ||||
| 	@PostMapping("/wgzRegister") | ||||
| 	public AjaxResult<Boolean> userRegister(@Validated @RequestBody WgzAppUserRegisterReq bo) { | ||||
| 	public AjaxResult<Boolean> userRegister(@Validated @RequestBody WgzAppRegisterReq bo) { | ||||
| 		return AjaxResult.success(iWgzUserService.userRegister(bo)); | ||||
| 	} | ||||
|  | ||||
| @ -215,7 +218,7 @@ public class WgzAppController { | ||||
| 	@ApiOperation("日报-日报日历") | ||||
| 	@PreAuthorize("@ss.hasPermi('wgzApp:user:userDailyCalendar')") | ||||
| 	@GetMapping("/WgzUserDailyCalendar") | ||||
| 	public AjaxResult<WgzUserDailyCalendarRes> userDailyCalendar(@Validated WgzAppUserDailyCalendarReq req) { | ||||
| 	public AjaxResult<WgzUserDailyCalendarRes> userDailyCalendar(@Validated WgzAppDailyCalendarReq req) { | ||||
| 		WgzUserDailyCalendarRes wfzUserDailyCalendarRes = iWgzDailyClockService.userDailyCalendar(req); | ||||
| 		return AjaxResult.success(wfzUserDailyCalendarRes); | ||||
| 	} | ||||
| @ -226,12 +229,12 @@ public class WgzAppController { | ||||
| 	@ApiOperation("日报-日报日历·日报记录") | ||||
| 	@PreAuthorize("@ss.hasPermi('wgzApp:user:userDailyRecord')") | ||||
| 	@GetMapping("/WgzUserDailyRecord") | ||||
| 	public TableDataInfo<WgzAppUserDailyRecordRes> userDailyRecord(@Validated WgzAppUserDailyRecordReq req) { | ||||
| 	public TableDataInfo<WgzAppUserDailyRecordRes> userDailyRecord(@Validated WgzAppDailyRecordReq req) { | ||||
| 		return iWgzDailyClockService.userDailyRecord(req); | ||||
| 	} | ||||
|  | ||||
| 	/** | ||||
| 	 * 【日报】日报日历·日报记录 | ||||
| 	 * 【日报】日报日历·查看日报 | ||||
| 	 */ | ||||
| 	@ApiOperation("日报-日报日历·查看日报") | ||||
| 	@PreAuthorize("@ss.hasPermi('wgzApp:user:userCheckDailyNewspaper')") | ||||
| @ -246,7 +249,7 @@ public class WgzAppController { | ||||
| 	@ApiOperation("【考勤打卡】【打卡】 提交上下班打卡)") | ||||
| 	@PreAuthorize("@ss.hasPermi('wgzApp:user:userSubmitTheClock')") | ||||
| 	@PostMapping("/WgzAppUserSubmitTheClock") | ||||
| 	public AjaxResult<Boolean> userSubmitTheClock() { | ||||
| 	public AjaxResult<Boolean> userSubmitTheClock(@Validated @RequestBody WgzAppSubmitTheClockReq req) { | ||||
| 		return AjaxResult.success(true); | ||||
| 	} | ||||
|  | ||||
|  | ||||
| @ -0,0 +1,108 @@ | ||||
| package com.ruoyi.web.controller.wgz.controller; | ||||
|  | ||||
| import java.util.List; | ||||
| import java.util.Arrays; | ||||
|  | ||||
| import com.ruoyi.wgz.domain.WgzAttendance; | ||||
| import lombok.RequiredArgsConstructor; | ||||
| import javax.validation.constraints.*; | ||||
| import org.springframework.security.access.prepost.PreAuthorize; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.web.bind.annotation.*; | ||||
| import org.springframework.validation.annotation.Validated; | ||||
| import com.ruoyi.common.annotation.RepeatSubmit; | ||||
| import com.ruoyi.common.annotation.Log; | ||||
| import com.ruoyi.common.core.controller.BaseController; | ||||
| import com.ruoyi.common.core.domain.AjaxResult; | ||||
| import com.ruoyi.common.enums.BusinessType; | ||||
| import com.ruoyi.wgz.bo.WgzAttendanceQueryBo; | ||||
| import com.ruoyi.wgz.service.IWgzAttendanceService; | ||||
| import com.ruoyi.common.utils.poi.ExcelUtil; | ||||
| import com.ruoyi.common.core.page.TableDataInfo; | ||||
| import io.swagger.annotations.Api; | ||||
| import io.swagger.annotations.ApiOperation; | ||||
|  | ||||
| /** | ||||
|  * 考勤打卡Controller | ||||
|  * | ||||
|  * @author ruoyi | ||||
|  * @date 2025-02-20 | ||||
|  */ | ||||
| @Api(value = "考勤打卡控制器", tags = {"考勤打卡管理"}) | ||||
| @RequiredArgsConstructor(onConstructor_ = @Autowired) | ||||
| @RestController | ||||
| @RequestMapping("/wgz/attendance") | ||||
| public class WgzAttendanceController extends BaseController { | ||||
|  | ||||
|     private final IWgzAttendanceService iWgzAttendanceService; | ||||
|  | ||||
|     /** | ||||
|      * 查询考勤打卡列表 | ||||
|      */ | ||||
|     @ApiOperation("查询考勤打卡列表") | ||||
|     @PreAuthorize("@ss.hasPermi('wgz:attendance:list')") | ||||
|     @GetMapping("/list") | ||||
|     public TableDataInfo<WgzAttendance> list(@Validated WgzAttendanceQueryBo bo) { | ||||
|         return iWgzAttendanceService.queryPageList(bo); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 导出考勤打卡列表 | ||||
|      */ | ||||
|     @ApiOperation("导出考勤打卡列表") | ||||
|     @PreAuthorize("@ss.hasPermi('wgz:attendance:export')") | ||||
|     @Log(title = "考勤打卡", businessType = BusinessType.EXPORT) | ||||
|     @GetMapping("/export") | ||||
|     public AjaxResult<WgzAttendance> export(@Validated WgzAttendanceQueryBo bo) { | ||||
|         List<WgzAttendance> list = iWgzAttendanceService.queryList(bo); | ||||
|         ExcelUtil<WgzAttendance> util = new ExcelUtil<WgzAttendance>(WgzAttendance.class); | ||||
|         return util.exportExcel(list, "考勤打卡"); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 获取考勤打卡详细信息 | ||||
|      */ | ||||
|     @ApiOperation("获取考勤打卡详细信息") | ||||
|     @PreAuthorize("@ss.hasPermi('wgz:attendance:query')") | ||||
|     @GetMapping("/{id}") | ||||
|     public AjaxResult<WgzAttendance> getInfo(@NotNull(message = "主键不能为空") | ||||
|                                                   @PathVariable("id") Long id) { | ||||
|         return AjaxResult.success(iWgzAttendanceService.queryById(id)); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 新增考勤打卡 | ||||
|      */ | ||||
|     @ApiOperation("新增考勤打卡") | ||||
|     @PreAuthorize("@ss.hasPermi('wgz:attendance:add')") | ||||
|     @Log(title = "考勤打卡", businessType = BusinessType.INSERT) | ||||
|     @RepeatSubmit | ||||
|     @PostMapping() | ||||
|     public AjaxResult<Void> add(@Validated @RequestBody WgzAttendance bo) { | ||||
|         return toAjax(iWgzAttendanceService.insert(bo) ? 1 : 0); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 修改考勤打卡 | ||||
|      */ | ||||
|     @ApiOperation("修改考勤打卡") | ||||
|     @PreAuthorize("@ss.hasPermi('wgz:attendance:edit')") | ||||
|     @Log(title = "考勤打卡", businessType = BusinessType.UPDATE) | ||||
|     @RepeatSubmit | ||||
|     @PutMapping() | ||||
|     public AjaxResult<Void> edit(@Validated @RequestBody WgzAttendance bo) { | ||||
|         return toAjax(iWgzAttendanceService.update(bo) ? 1 : 0); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 删除考勤打卡 | ||||
|      */ | ||||
|     @ApiOperation("删除考勤打卡") | ||||
|     @PreAuthorize("@ss.hasPermi('wgz:attendance:remove')") | ||||
|     @Log(title = "考勤打卡" , businessType = BusinessType.DELETE) | ||||
|     @DeleteMapping("/{ids}") | ||||
|     public AjaxResult<Void> remove(@NotEmpty(message = "主键不能为空") | ||||
|                                        @PathVariable Long[] ids) { | ||||
|         return toAjax(iWgzAttendanceService.deleteWithValidByIds(Arrays.asList(ids), true) ? 1 : 0); | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user