package com.ruoyi.web.controller.bgt;


import com.ruoyi.bgt.domain.dto.BgtAttendanceDTO;
import com.ruoyi.bgt.domain.dto.BgtAttendanceDetailDTO;
import com.ruoyi.bgt.domain.vo.BgtAttendanceDetailVO;
import com.ruoyi.bgt.domain.vo.BgtAttendanceVO;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.wgz.service.IWgzAttendanceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(value = "App包工头考勤控制器", tags = {"App包工头考勤管理"})
@RequiredArgsConstructor(onConstructor_ = @Autowired)
@RestController
@RequestMapping("/app/bgt/attendance")
public class AppBgtAttendanceController {

	private final IWgzAttendanceService attendanceService;

	@ApiOperation("App包工头总体考勤情况")
	@GetMapping("attendance")
	public AjaxResult<BgtAttendanceVO> attendanceDetail(@Validated BgtAttendanceDTO dto) {
		return AjaxResult.success(attendanceService.attendanceDetail(dto));
	}

	@ApiOperation("App包工头考勤统计详情")
	@GetMapping("attendanceDetail")
	public AjaxResult<BgtAttendanceDetailVO> attendanceDetail(@Validated BgtAttendanceDetailDTO dto) {
		return AjaxResult.success(attendanceService.bgtAttendanceDetail(dto));
	}


}
