package com.hotwj.platform.resourceManagement.driverInfo.controller;

import com.hotwj.platform.resourceManagement.driverInfo.domain.bo.DriverPageBo;
import com.hotwj.platform.resourceManagement.driverInfo.domain.vo.DriverPageVo;
import com.hotwj.platform.resourceManagement.driverInfo.service.IDriverPageService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.dromara.common.mybatis.core.page.PageQuery;
import org.dromara.common.mybatis.core.page.TableDataInfo;
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;

@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/resourceManagement/driver-info")
@Tag(name = "驾驶员综合信息管理", description = "驾驶员综合信息管理相关接口")
public class DriverPageController {

    private final IDriverPageService driverPageService;

    //@SaCheckPermission("resourceManagement:driverInfo:list")
    @GetMapping("/page")
    @Operation(summary = "分页查询驾驶员信息", description = "获取驾驶员综合信息列表，包含车辆绑定、驾驶证、从业资格证等关联信息")
    public TableDataInfo<DriverPageVo> page(DriverPageBo bo, PageQuery pageQuery) {
        return driverPageService.queryPage(pageQuery, bo);
    }
}
