package com.ktg.iscs.mapper;

import com.ktg.common.mapper.BaseMapperX;
import com.ktg.iscs.domain.IsJobTicketLock;
import com.ktg.iscs.domain.vo.hardwareApi.JobTicketLockVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 作业票关联锁Mapper接口
 *
 * @author cgj
 * @date 2024-11-18
 */
@Mapper
public interface IsJobTicketLockMapper extends BaseMapperX<IsJobTicketLock>
{
    /**
     * 查询作业票关联锁
     *
     * @param recordId 作业票关联锁主键
     * @return 作业票关联锁
     */
    IsJobTicketLock selectIsJobTicketLockByRecordId(Long recordId);

    /**
     * 查询作业票关联锁列表
     *
     * @param isJobTicketLock 作业票关联锁
     * @return 作业票关联锁集合
     */
    List<IsJobTicketLock> selectIsJobTicketLockList(IsJobTicketLock isJobTicketLock);

    /**
     * 新增作业票关联锁
     *
     * @param isJobTicketLock 作业票关联锁
     * @return 结果
     */
    int insertIsJobTicketLock(IsJobTicketLock isJobTicketLock);

    /**
     * 修改作业票关联锁
     *
     * @param isJobTicketLock 作业票关联锁
     * @return 结果
     */
    int updateIsJobTicketLock(IsJobTicketLock isJobTicketLock);

    /**
     * 删除作业票关联锁
     *
     * @param recordId 作业票关联锁主键
     * @return 结果
     */
    int deleteIsJobTicketLockByRecordId(Long recordId);

    /**
     * 批量删除作业票关联锁
     *
     * @param recordIds 需要删除的数据主键集合
     * @return 结果
     */
    int deleteIsJobTicketLockByRecordIds(Long[] recordIds);

    List<JobTicketLockVO> getTicketLockByTicketId(@Param(value = "ticketId") Long ticketId);

    IsJobTicketLock getLockJobByBfc(@Param(value = "nfc") String nfc, @Param(value = "ticketId") Long ticketId);

    List<IsJobTicketLock> getLockJob(@Param(value = "lockId") Long lockId);

}
