package com.qmth.sop.business.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.qmth.sop.business.bean.params.FlowApproveParam;
import com.qmth.sop.business.bean.result.TBQualityProblemApplyResult;
import com.qmth.sop.business.entity.SysUser;
import com.qmth.sop.business.entity.TBQualityProblemApply;
import com.qmth.sop.common.enums.InfluenceDegreeEnum;
import com.qmth.sop.common.enums.QualityProblemReasonEnum;
import com.qmth.sop.common.enums.QualityProblemTypeEnum;

import java.util.List;
import java.util.Map;

/**
 * 质量问题反馈表 服务类
 *
 * @author: shudonghui
 * @date: 2023-08-14 14:00:01
 * @version: 1.0
 * @email: shudonghui@qmth.com.cn
 * @Company: www.qmth.com.cn
 */
public interface TBQualityProblemApplyService extends IService<TBQualityProblemApply> {

    /**
     * 查询列表
     *
     * @param iPage
     * @return
     */
    IPage<TBQualityProblemApplyResult> query(IPage<Map> iPage, Long serviceId, Long userId, QualityProblemTypeEnum type, QualityProblemReasonEnum reason, InfluenceDegreeEnum degree, String custom, String problemNo, Long startTime, Long endTime);

    /**
     * 新增修改质量问题反馈表
     *
     * @param tbQualityProblemApply
     */
    Boolean saveTBQualityProblemApply(TBQualityProblemApply tbQualityProblemApply) throws InterruptedException;

    /**
     * 质量问题反馈审核
     *
     * @param flowApproveParam
     * @return
     */
    Boolean flowApprove(FlowApproveParam flowApproveParam) throws InterruptedException;

    /**
     * 删除质量问题反馈表
     *
     * @param ids
     */
    Boolean delete(long[] ids);


    List<SysUser> userList();
}