package com.ktg.iscs.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ktg.common.core.domain.AjaxResult;
import com.ktg.iscs.domain.IsJobCard;
import com.ktg.iscs.domain.vo.card.IsJobCardInfoRespVO;
import com.ktg.iscs.domain.vo.card.IsJobCardLoginReqVO;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * 工作卡Service接口
 *
 * @author cgj
 * @date 2024-11-12
 */
public interface IIsJobCardService extends IService<IsJobCard>
{
    /**
     * 查询工作卡
     *
     * @param cardId 工作卡主键
     * @return 工作卡
     */
    IsJobCard selectIsJobCardByCardId(Long cardId);

    /**
     * 查询工作卡列表
     *
     * @param isJobCard 工作卡
     * @return 工作卡集合
     */
    List<IsJobCard> selectIsJobCardList(IsJobCard isJobCard);

    /**
     * 新增工作卡
     *
     * @param isJobCard 工作卡
     * @return 结果
     */
    int insertIsJobCard(IsJobCard isJobCard);

    /**
     * 修改工作卡
     *
     * @param isJobCard 工作卡
     * @return 结果
     */
    int updateIsJobCard(IsJobCard isJobCard);

    /**
     * 批量删除工作卡
     *
     * @param cardIds 需要删除的工作卡主键集合
     * @return 结果
     */
    int deleteIsJobCardByCardIds(String cardIds);

    /**
     * 删除工作卡信息
     *
     * @param cardId 工作卡主键
     * @return 结果
     */
    int deleteIsJobCardByCardId(Long cardId);

    String loginByCard(IsJobCardLoginReqVO reqVO);

    /**
     * 刷卡登录
     */
    AjaxResult loginByCard1(IsJobCardLoginReqVO reqVO);


    IsJobCardInfoRespVO getCardInfoByLoginUser(HttpServletRequest request);

    IsJobCard getCardInfoByCardNfc(String cardNfc);

    Page<IsJobCard> getIsJobCardPage(Page<IsJobCard> page, IsJobCard isJobCard);

    Boolean insertIsJobCardByCabinet(IsJobCard isJobCard);
}
