| | |
| | | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| | | import cn.iocoder.yudao.module.hrm.controller.admin.attendance.vo.HrmEmployeeScheduleBatchSaveReqVO; |
| | | import cn.iocoder.yudao.module.hrm.controller.admin.attendance.vo.HrmEmployeeScheduleBatchSaveRespVO; |
| | | import cn.iocoder.yudao.module.hrm.controller.admin.attendance.vo.HrmEmployeeScheduleLeaveRespVO; |
| | | import cn.iocoder.yudao.module.hrm.controller.admin.attendance.vo.HrmEmployeeScheduleListReqVO; |
| | | import cn.iocoder.yudao.module.hrm.controller.admin.attendance.vo.HrmEmployeeScheduleRespVO; |
| | | import cn.iocoder.yudao.module.hrm.controller.admin.attendance.vo.HrmEmployeeScheduleSaveReqVO; |
| | | import cn.iocoder.yudao.module.hrm.service.attendance.HrmEmployeeScheduleService; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import jakarta.annotation.Resource; |
| | | import jakarta.validation.Valid; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.util.List; |
| | | |
| | | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| | |
| | | return success(employeeScheduleService.batchSaveSchedule(reqVO)); |
| | | } |
| | | |
| | | @GetMapping("/leave-list") |
| | | @Operation(summary = "获得日期范围内审批通过的请假记录(排班日历展示用)") |
| | | @Parameter(name = "startDate", description = "开始日期", required = true, example = "2026-11-01") |
| | | @Parameter(name = "endDate", description = "结束日期(含)", required = true, example = "2026-11-30") |
| | | @PreAuthorize("@ss.hasPermission('hrm:employee-schedule:query')") |
| | | public CommonResult<List<HrmEmployeeScheduleLeaveRespVO>> getApprovedLeaveList( |
| | | @RequestParam("startDate") @DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate startDate, |
| | | @RequestParam("endDate") @DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate endDate) { |
| | | return success(employeeScheduleService.getApprovedLeaveList(startDate, endDate)); |
| | | } |
| | | |
| | | } |