package com.jeeplus.human.depart.handover.mapper;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jeeplus.human.depart.handover.domain.Handover;
import com.jeeplus.human.depart.handover.domain.HandoverProject;
import com.jeeplus.sys.domain.WorkAttachmentInfo;
import com.jeeplus.sys.service.dto.UserDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 王强
 * @version 1.0
 * @date 2023-10-27 9:02
 */
@Mapper
@InterceptorIgnore(tenantLine = "true")
public interface HandoverMapper extends BaseMapper<Handover> {

    Handover getById(@Param("id") String id);


    void updateStatusById(@Param("id") String id, @Param("type") String type);

    Handover getUserInfoById(@Param("handoverId") String handoverId);

    /**
     * 根据签章id查询具体信息
     * @param signatureContractId
     * @return
     */
    Handover queryByContractId(@Param("signatureContractId") String signatureContractId);

    /**
     * 修改签章附件在签章服务器中的文件保存路径
     * @param handover
     */
    void updateSignatureUrl(Handover handover);

    /**
     * 根据离职申请表id查询离职申请表id
     * @param userId
     * @return
     */
    String getUserInfoByUserId(@Param("userId")String userId);

    /**
     * 根据AttachmentFla 和AttachmentId 查询附件信息
     * @param id
     * @param attachmentFlag
     * @return
     */
    List<WorkAttachmentInfo> findListByIdAndAttachmentFlag(@Param("id") String id, @Param("attachmentFlag")String attachmentFlag);
    @InterceptorIgnore(tenantLine = "true")
    Integer findIsExit(@Param("id") String id, @Param("name")String name);

}

