package com.chushang.inspection.work.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.chushang.datascope.annotation.DataScope;
import com.chushang.inspection.work.po.WrkInfo;
import com.chushang.inspection.work.query.ReviewedQuery;
import com.chushang.inspection.work.query.WrkAppQuery;
import com.chushang.inspection.work.query.WrkInfoQuery;
import com.chushang.inspection.work.vo.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
  * @auther: zhao
  * @date: 2024/6/26 17:13
  */
public interface WrkInfoMapper extends BaseMapper<WrkInfo> {
    @DataScope(deptAlias = "i")
    List<WrkInfoDetailsVO> queryDispatchPage(@Param("query") WrkInfoQuery query,
                                          Page<WrkInfoDetailsVO> page);
    @DataScope(deptAlias = "i")
    List<WrkInfoDetailsVO> queryArchivePage(@Param("query") ReviewedQuery query,
                                            Page<WrkInfoDetailsVO> page);
    @DataScope(deptAlias = "i")
    List<WrkListAppVO> queryAppPage(@Param("query") WrkAppQuery query, Page<WrkListAppVO> page);

    List<WrkInfoDetailsVO> listInsTemplate(@Param("query") ReviewedQuery query);

    WrkInfoDetailsVO getWrkInfoDetails(@Param("wrkId") Long wrkId);

    @DataScope(deptAlias = "i")
    List<WrkInfoExportVO> exportDispatchPage(@Param("query") WrkInfoQuery query);
}
