package cn.iocoder.yudao.module.hrm.controller.admin.workhour; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.module.hrm.controller.admin.workhour.vo.HrmEmployeeWorkHourReqVO; import cn.iocoder.yudao.module.hrm.controller.admin.workhour.vo.HrmEmployeeWorkHourRespVO; import cn.iocoder.yudao.module.hrm.service.workhour.HrmWorkHourStatisticsService; import cn.iocoder.yudao.module.mes.api.task.dto.MesProWorkHourSummaryReqDTO; import cn.iocoder.yudao.module.mes.api.task.dto.MesProWorkHourSummaryRespDTO; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.annotation.Resource; import org.springframework.security.access.prepost.PreAuthorize; 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; import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; @Tag(name = "管理后台 - HRM 工时统计") @RestController @RequestMapping("/hrm/work-hour-statistics") @Validated public class HrmWorkHourStatisticsController { @Resource private HrmWorkHourStatisticsService workHourStatisticsService; @GetMapping("/employee-summary") @Operation(summary = "员工工时统计(考勤口径)") @PreAuthorize("@ss.hasPermission('hrm:work-hour-statistics:query')") public CommonResult> getEmployeeWorkHourSummary( HrmEmployeeWorkHourReqVO reqVO) { return success(workHourStatisticsService.getEmployeeWorkHourSummary(reqVO)); } @GetMapping("/team-summary") @Operation(summary = "班组工时统计(报工口径)") @PreAuthorize("@ss.hasPermission('hrm:work-hour-statistics:query')") public CommonResult> getTeamWorkHourSummary( MesProWorkHourSummaryReqDTO reqDTO) { return success(workHourStatisticsService.getTeamWorkHourSummary(reqDTO)); } }