package com.hw.qms.mapper;

import java.util.List;
import com.hw.qms.domain.QmsQualityInstance;
import com.hw.qms.domain.QmsQualityInstanceActivity;

/**
 * 质检工单Mapper接口
 *
 * @author xins
 * @date 2024-01-23
 */
public interface QmsQualityInstanceMapper
{
    /**
     * 查询质检工单
     *
     * @param qualityInstanceId 质检工单主键
     * @return 质检工单
     */
    public QmsQualityInstance selectQmsQualityInstanceByQualityInstanceId(Long qualityInstanceId);

    /**
     * 查询质检工单列表
     *
     * @param qmsQualityInstance 质检工单
     * @return 质检工单集合
     */
    public List<QmsQualityInstance> selectQmsQualityInstanceList(QmsQualityInstance qmsQualityInstance);

    /**
     * 新增质检工单
     *
     * @param qmsQualityInstance 质检工单
     * @return 结果
     */
    public int insertQmsQualityInstance(QmsQualityInstance qmsQualityInstance);

    /**
     * 修改质检工单
     *
     * @param qmsQualityInstance 质检工单
     * @return 结果
     */
    public int updateQmsQualityInstance(QmsQualityInstance qmsQualityInstance);

    /**
     * 删除质检工单
     *
     * @param qualityInstanceId 质检工单主键
     * @return 结果
     */
    public int deleteQmsQualityInstanceByQualityInstanceId(Long qualityInstanceId);

    /**
     * 批量删除质检工单
     *
     * @param qualityInstanceIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteQmsQualityInstanceByQualityInstanceIds(Long[] qualityInstanceIds);

    /**
     * 批量删除质检工单实例节点
     *
     * @param qualityInstanceIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteQmsQualityInstanceActivityByQualityInstanceIds(Long[] qualityInstanceIds);

    /**
     * 批量新增质检工单实例节点
     *
     * @param qmsQualityInstanceActivityList 质检工单实例节点列表
     * @return 结果
     */
    public int batchQmsQualityInstanceActivity(List<QmsQualityInstanceActivity> qmsQualityInstanceActivityList);


    /**
     * 通过质检工单主键删除质检工单实例节点信息
     *
     * @param qualityInstanceId 质检工单ID
     * @return 结果
     */
    public int deleteQmsQualityInstanceActivityByQualityInstanceId(Long qualityInstanceId);



    /**
     * 查询质检工单
     *
     * @param checkResultId 质检结果ID
     * @return 质检工单
     */
    public QmsQualityInstance selectQmsQualityInstanceByCheckResultId(Long checkResultId);
}
