package com.zhgd.xmgl.modules.basicdata.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zhgd.annotation.DataScope;
import com.zhgd.xmgl.modules.basicdata.dto.WorkerInfoDto;
import com.zhgd.xmgl.modules.basicdata.entity.WorkerInfo;
import com.zhgd.xmgl.modules.basicdata.statistics.WorkerAttributeStat;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @Description: 人员
 * @author： pengj
 * @date：   2023-03-13
 * @version： V1.0
 */
@Mapper
@DataScope
public interface WorkerInfoMapper extends BaseMapper<WorkerInfo> {

    Page<WorkerInfoDto> getDetailPageList(Page page, @Param(Constants.WRAPPER) Wrapper<WorkerInfo> wrapper);

    Page<WorkerInfo> getPageList(Page page, @Param(Constants.WRAPPER) Wrapper<WorkerInfo> wrapper);

    Map<String, Object> statisticsMap();

    List<WorkerAttributeStat> statGroupByNation();

    List<WorkerAttributeStat> statGroupByWorkerType();

    List<WorkerAttributeStat> statGroupByRegister();

    List<WorkerInfo> statAge();

    Map<String, Object> getByType();

    Page<Map<String, Object>> attendStat(Page page, @Param(Constants.WRAPPER) Wrapper<WorkerInfo> wrapper);
}
