| | |
| | | package com.xiaopeng.maintenance.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.xiaopeng.api.model.maintenance.XpClockIn; |
| | | import com.xiaopeng.common.core.domain.R; |
| | | import com.xiaopeng.common.core.web.page.PageInfo; |
| | | import com.xiaopeng.common.security.service.TokenService; |
| | |
| | | * 打卡管理 Controller |
| | | * |
| | | * @author xiaochen |
| | | * @since 2026-02-06 |
| | | * @author mitao |
| | | * @date 2026-02-14 |
| | | * @since 2026-02-06 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | |
| | | private IXpClockInService xpClockInService; |
| | | @Autowired |
| | | private TokenService tokenService; |
| | | |
| | | @ApiOperation(value = "校验是否在打卡范围内", tags = "运维APP-排班与考勤") |
| | | @PostMapping("/maintenance-app/api/v1/clock/verifyRange") |
| | | public R<Boolean> verifyRange(@RequestBody VerifyRangeDTO dto) { |
| | |
| | | |
| | | @ApiOperation(value = "排班考勤打卡统计列表", tags = {"管理后台-运维执行"}) |
| | | @PostMapping("/api/v1/clock/getClockInStatistics") |
| | | public R<PageInfo<ClockInStatisticsDto>> getClockInStatistics(@RequestBody ClockInStatisticsVo vo){ |
| | | public R<PageInfo<ClockInStatisticsDto>> getClockInStatistics(@RequestBody ClockInStatisticsVo vo) { |
| | | PageInfo<ClockInStatisticsDto> clockInStatistics = xpClockInService.getClockInStatistics(vo); |
| | | return R.ok(clockInStatistics); |
| | | } |
| | |
| | | |
| | | @ApiOperation(value = "排班考勤打卡统计导出", tags = {"管理后台-运维执行"}) |
| | | @PostMapping("/api/v1/clock/exportClockInStatistics") |
| | | public void exportClockInStatistics(@RequestBody ClockInStatisticsVo vo, HttpServletResponse response){ |
| | | public void exportClockInStatistics(@RequestBody ClockInStatisticsVo vo, HttpServletResponse response) { |
| | | xpClockInService.exportClockInStatistics(vo, response); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "排班考勤打卡统计详情列表", tags = {"管理后台-运维执行"}) |
| | | @PostMapping("/api/v1/clock/getClockInStatisticsDetails") |
| | | public R<GetClockInStatisticsDetailsDto> getClockInStatisticsDetails(@RequestBody ClockInStatisticsDetailsVo query){ |
| | | public R<GetClockInStatisticsDetailsDto> getClockInStatisticsDetails(@RequestBody ClockInStatisticsDetailsVo query) { |
| | | GetClockInStatisticsDetailsDto clockInStatisticsDetails = xpClockInService.getClockInStatisticsDetails(query); |
| | | return R.ok(clockInStatisticsDetails); |
| | | } |
| | |
| | | |
| | | @ApiOperation(value = "排班考勤打卡统计详情导出", tags = {"管理后台-运维执行"}) |
| | | @PostMapping("/api/v1/clock/exportClockInStatisticsDetails") |
| | | public void exportClockInStatisticsDetails(@RequestBody ClockInStatisticsDetailsVo query, HttpServletResponse response){ |
| | | public void exportClockInStatisticsDetails(@RequestBody ClockInStatisticsDetailsVo query, HttpServletResponse response) { |
| | | xpClockInService.exportClockInStatisticsDetails(query, response); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "获取打卡详情", tags = "运维APP-排班与考勤") |
| | | @PostMapping("/maintenance-app/api/v1/clock/getClockInfo") |
| | | public R<XpClockIn> getClockInfo(){ |
| | | Long id = tokenService.getLoginOperationUser().getId(); |
| | | XpClockIn one = xpClockInService.getOne(new QueryWrapper<XpClockIn>().eq("app_user_id", id) |
| | | .eq("is_deleted", 0).last(" and DATE(create_time) = DATE(NOW())")); |
| | | return R.ok(one); |
| | | } |
| | | |
| | | } |
| | | |