package com.bonus.system.dept.controller;

import com.bonus.common.core.web.controller.BaseController;
import com.bonus.common.core.web.domain.AjaxResult;
import com.bonus.common.core.web.page.TableDataInfo;
import com.bonus.common.log.annotation.Log;
import com.bonus.common.log.enums.BusinessType;
import com.bonus.common.security.annotation.RequiresPermissions;
import com.bonus.system.dept.entity.EightMembersVacancyVo;
import com.bonus.system.dept.service.EightMembersVacancyService;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @className:EightMembersVacancyController
 * @author:cwchen
 * @date:2025-02-10-13:35
 * @version:1.0
 * @description:八大员缺员兼职查询-controller
 */
@ApiOperation("八大员缺员兼职查询")
@RestController
@RequestMapping("/eightMembersVacancy")
public class EightMembersVacancyController extends BaseController {

    @Resource(name = "EightMembersVacancyService")
    private EightMembersVacancyService service;

//    @RequiresPermissions("dept:eightMembers:query")
    @ApiOperation("八大员缺员兼职查询-列表查询")
    @GetMapping("/getList")
    @Log(title = "项目部角色管理->八大员缺员兼职查询->列表查询", businessType = BusinessType.QUERY)
    public TableDataInfo getList(EightMembersVacancyVo vo) {
        startPage();
        List<EightMembersVacancyVo> list = service.getList(vo);
        return getDataTable(list);
    }

    @ApiOperation("八大员缺员兼职查询-缺员项目部数量详情")
    @GetMapping("/getUnderStaffingList")
    @Log(title = "项目部角色管理->八大员缺员兼职查询->列表查询->缺员项目部详情", businessType = BusinessType.QUERY)
    public TableDataInfo getUnderStaffingList(EightMembersVacancyVo vo) {
        List<EightMembersVacancyVo.VacancyDetail> list = service.getUnderStaffingList(vo);
        return getDataTable(list);
    }

    @ApiOperation("八大员缺员兼职查询-兼职项目部数量详情")
    @GetMapping("/getPartTimeList")
    @Log(title = "项目部角色管理->八大员缺员兼职查询->列表查询->兼职项目部详情", businessType = BusinessType.QUERY)
    public TableDataInfo getPartTimeList(EightMembersVacancyVo vo) {
        List<EightMembersVacancyVo.VacancyDetail> list = service.getPartTimeList(vo);
        return getDataTable(list);
    }

    @ApiOperation("角色下拉选")
    @GetMapping("/getRoleList")
    public AjaxResult getRoleList() {
        return service.getRoleList();
    }
}
