完成务工者考勤模块
This commit is contained in:
@ -84,6 +84,9 @@ public class WgzAppController {
|
||||
@Autowired
|
||||
private IWgzAttendanceService iWgzAttendanceService;
|
||||
|
||||
@Autowired
|
||||
private IWgzReissueacardService iWgzReissueacardService;
|
||||
|
||||
|
||||
/**
|
||||
* 【注册】务工者注册
|
||||
@ -243,6 +246,16 @@ public class WgzAppController {
|
||||
return AjaxResult.success(iWgzDailyClockService.userCheckDailyNewspaper(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 【考勤打卡】【打卡】 提交上下班打卡·查看当前用户的打卡状态(0上班 1下班 2请假)
|
||||
*/
|
||||
@ApiOperation("【考勤打卡】【打卡】 提交上下班打卡·用户今日打卡状态(0上班 1下班 2请假)")
|
||||
@PreAuthorize("@ss.hasPermi('wgzApp:user:userClockingCondition')")
|
||||
@GetMapping("/WgzAppUserClockingCondition")
|
||||
public AjaxResult<WgzAppUserClockingConditionRes> userClockingCondition() {
|
||||
return AjaxResult.success(iWgzAttendanceService.userClockingCondition());
|
||||
}
|
||||
|
||||
/**
|
||||
* 【考勤打卡】【打卡】 提交上下班打卡
|
||||
*/
|
||||
@ -250,7 +263,47 @@ public class WgzAppController {
|
||||
@PreAuthorize("@ss.hasPermi('wgzApp:user:userSubmitTheClock')")
|
||||
@PostMapping("/WgzAppUserSubmitTheClock")
|
||||
public AjaxResult<Boolean> userSubmitTheClock(@Validated @RequestBody WgzAppSubmitTheClockReq req) {
|
||||
return AjaxResult.success(true);
|
||||
return AjaxResult.success(iWgzAttendanceService.userSubmitTheClock(req));
|
||||
}
|
||||
|
||||
/**
|
||||
* 【考勤打卡】【打卡日历】 打卡日历记录
|
||||
*/
|
||||
@ApiOperation("【考勤打卡】【打卡日历】 打卡日历记录)")
|
||||
@PreAuthorize("@ss.hasPermi('wgzApp:user:userPunchTheCalendarRecord')")
|
||||
@GetMapping("/WgzAppUserPunchTheCalendarRecord")
|
||||
public AjaxResult<WgzAppPunchTheCalendarRecordRes> userPunchTheCalendarRecord() {
|
||||
return AjaxResult.success(iWgzAttendanceService.userPunchTheCalendarRecord());
|
||||
}
|
||||
|
||||
/**
|
||||
* 【考勤打卡】【打卡日历】 补卡申请列表
|
||||
*/
|
||||
@ApiOperation("【考勤打卡】【打卡日历】 补卡申请列表")
|
||||
@PreAuthorize("@ss.hasPermi('wgzApp:user:userCardReplacementApplicationList')")
|
||||
@GetMapping("/WgzAppUserCardReplacementApplicationList")
|
||||
public AjaxResult<WgzAppCardReplacementApplicationRes> userCardReplacementApplication() {
|
||||
return AjaxResult.success(iWgzAttendanceService.userCardReplacementApplication());
|
||||
}
|
||||
|
||||
/**
|
||||
* 【考勤打卡】【打卡日历】 补卡申请
|
||||
*/
|
||||
@ApiOperation("【考勤打卡】【打卡日历】 补卡申请)")
|
||||
@PreAuthorize("@ss.hasPermi('wgzApp:user:userCardReplacementApplication')")
|
||||
@PostMapping("/WgzAppUserCardReplacementApplication")
|
||||
public AjaxResult<Boolean> userCardReplacementApplication(@Validated @RequestBody WgzAppCardReplacementApplicationReq req) {
|
||||
return AjaxResult.success(iWgzReissueacardService.userCardReplacementApplication(req));
|
||||
}
|
||||
|
||||
/**
|
||||
* 【考勤打卡】【打卡日历】 补卡记录
|
||||
*/
|
||||
@ApiOperation("【考勤打卡】【打卡日历】 补卡记录)")
|
||||
@PreAuthorize("@ss.hasPermi('wgzApp:user:userReplacementCardRecord')")
|
||||
@GetMapping("/WgzAppUserReplacementCardRecord")
|
||||
public TableDataInfo<WgzReplacementCardRecordRes> userReplacementCardRecord(@Validated WgzAppReplacementCardRecordReq req) {
|
||||
return iWgzReissueacardService.userReplacementCardRecord(req);
|
||||
}
|
||||
|
||||
|
||||
|
@ -0,0 +1,108 @@
|
||||
package com.ruoyi.web.controller.wgz.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
|
||||
import com.ruoyi.wgz.domain.WgzReissueacard;
|
||||
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.WgzReissueacardQueryBo;
|
||||
import com.ruoyi.wgz.service.IWgzReissueacardService;
|
||||
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/reissueacard")
|
||||
public class WgzReissueacardController extends BaseController {
|
||||
|
||||
private final IWgzReissueacardService iWgzReissueacardService;
|
||||
|
||||
/**
|
||||
* 查询补卡申请列表
|
||||
*/
|
||||
@ApiOperation("查询补卡申请列表")
|
||||
@PreAuthorize("@ss.hasPermi('wgz:reissueacard:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<WgzReissueacard> list(@Validated WgzReissueacardQueryBo bo) {
|
||||
return iWgzReissueacardService.queryPageList(bo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出补卡申请列表
|
||||
*/
|
||||
@ApiOperation("导出补卡申请列表")
|
||||
@PreAuthorize("@ss.hasPermi('wgz:reissueacard:export')")
|
||||
@Log(title = "补卡申请", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult<WgzReissueacard> export(@Validated WgzReissueacardQueryBo bo) {
|
||||
List<WgzReissueacard> list = iWgzReissueacardService.queryList(bo);
|
||||
ExcelUtil<WgzReissueacard> util = new ExcelUtil<WgzReissueacard>(WgzReissueacard.class);
|
||||
return util.exportExcel(list, "补卡申请");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取补卡申请详细信息
|
||||
*/
|
||||
@ApiOperation("获取补卡申请详细信息")
|
||||
@PreAuthorize("@ss.hasPermi('wgz:reissueacard:query')")
|
||||
@GetMapping("/{id}")
|
||||
public AjaxResult<WgzReissueacard> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(iWgzReissueacardService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增补卡申请
|
||||
*/
|
||||
@ApiOperation("新增补卡申请")
|
||||
@PreAuthorize("@ss.hasPermi('wgz:reissueacard:add')")
|
||||
@Log(title = "补卡申请", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit
|
||||
@PostMapping()
|
||||
public AjaxResult<Void> add(@Validated @RequestBody WgzReissueacard bo) {
|
||||
return toAjax(iWgzReissueacardService.insert(bo) ? 1 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改补卡申请
|
||||
*/
|
||||
@ApiOperation("修改补卡申请")
|
||||
@PreAuthorize("@ss.hasPermi('wgz:reissueacard:edit')")
|
||||
@Log(title = "补卡申请", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit
|
||||
@PutMapping()
|
||||
public AjaxResult<Void> edit(@Validated @RequestBody WgzReissueacard bo) {
|
||||
return toAjax(iWgzReissueacardService.update(bo) ? 1 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除补卡申请
|
||||
*/
|
||||
@ApiOperation("删除补卡申请")
|
||||
@PreAuthorize("@ss.hasPermi('wgz:reissueacard:remove')")
|
||||
@Log(title = "补卡申请" , businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(iWgzReissueacardService.deleteWithValidByIds(Arrays.asList(ids), true) ? 1 : 0);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user