package com.pusong.business.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.pusong.business.domain.PsContractInfo;
import com.pusong.business.domain.PsTaskMain;
import com.pusong.business.domain.vo.PsContractInfoVo;
import com.pusong.business.domain.vo.PsTaskAppointVo;
import com.pusong.business.domain.vo.PsTaskMainVo;
import com.pusong.common.mybatis.annotation.DataColumn;
import com.pusong.common.mybatis.annotation.DataPermission;
import com.pusong.common.mybatis.core.mapper.BaseMapperPlus;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 主任务Mapper接口
 *
 * @author wls
 * @date 2024-08-07
 */
public interface PsTaskMainMapper extends BaseMapper<PsTaskMain> {
    @DataPermission({
            @DataColumn(key = "deptName", value = "main.create_dept"),
            @DataColumn(key = "userName", value = "main.create_by")
    })
    Page<PsTaskMainVo> queryTaskPageList(@Param("page") Page<PsTaskMain> page, @Param(Constants.WRAPPER) Wrapper<PsTaskMain> queryWrapper);



    Page<PsTaskMainVo> queryInvoiceTaskPageList(@Param("page") Page<PsTaskMain> page, @Param(Constants.WRAPPER) Wrapper<PsTaskMain> queryWrapper);


    @DataPermission({
            @DataColumn(key = "deptName", value = "appo.create_dept"),
            @DataColumn(key = "userName", value = "appo.executor")
    })
    Page<PsTaskMainVo> queryChildTaskPageList(@Param("page") Page<PsTaskMain> page, @Param(Constants.WRAPPER) Wrapper<PsTaskMain> queryWrapper);


    List<PsTaskAppointVo> queryByMainId(@Param("mainId") Long mainId);

}
