package digital.laboratory.platform.reagent.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
import digital.laboratory.platform.reagent.dto.AuditAndApproveDTO;
import digital.laboratory.platform.reagent.dto.ComplianceCheckDTO;
import digital.laboratory.platform.reagent.entity.ComplianceCheck;
import digital.laboratory.platform.reagent.vo.ComplianceCheckVO;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * (符合性检查记录表)服务类
 *
 * @author Zhang Xiaolong created at  2023-03-10
 * @describe (符合性检查记录表) 服务类
 */
public interface ComplianceCheckService extends IService<ComplianceCheck> {

    IPage<ComplianceCheckVO> getComplianceCheckVOPage (IPage<ComplianceCheck> page, QueryWrapper<ComplianceCheck> qw);
    List<ComplianceCheckVO> getComplianceCheckVOList (QueryWrapper<ComplianceCheck> qw) ;

    ComplianceCheckVO getComplianceCheckVO(String complianceCheckId);

    @Transactional
        //新增标准物质符合性检查
    ComplianceCheck addCheck(ComplianceCheckDTO complianceCheckDTO, DLPUser dlpUser);

    List<ComplianceCheck> addCheckList(List<ComplianceCheckDTO> list, DLPUser dlpUser);

    Boolean delCheckById(String complianceCheckId);

    ComplianceCheck editCheckById(ComplianceCheckDTO complianceCheckDTO);

    ComplianceCheck addScheme(ComplianceCheckDTO complianceCheckDTO);

    //提交符合性检查
    ComplianceCheck commitCheck(ComplianceCheckDTO complianceCheckDTO, DLPUser dlpUser);

    ComplianceCheck primaryAuditCheck (AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser);

    //二级审核
    ComplianceCheck secondaryAuditCheck(AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser);
}
