package com.ruoyi.hywz.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.hywz.common.enums.InvoiceNodeEnum;
import com.ruoyi.hywz.entity.AdsMatHyxtInvoiceApplyD;
import com.ruoyi.hywz.entity.AdsMatHyxtTaskHistoryD;
import com.ruoyi.hywz.entity.AdsMatHyxtTaskRunD;

import java.util.Map;

/**
 * <p>
 * 待办任务表 服务类
 * </p>
 *
 * @author mybatisplus-generator
 * @date 2024-04-08 14:25:45
 */
public interface IAdsMatHyxtTaskRunDService extends IService<AdsMatHyxtTaskRunD> {

    /**
     * 获取当前登录用户【待办任务、已办任务】数量
     */
    Map<String, Integer> getTaskNum();

    /**
     * 创建开票申请流程
     */
    void createInvoiceTask(AdsMatHyxtInvoiceApplyD applyD, SysUser owner);

    void delete(String businessId);

    void delete(String businessId, InvoiceNodeEnum node);

    AdsMatHyxtTaskRunD getOneByBusinessId(String businessId);

    void updateTask(String id, Integer currentNode, String nodeLabel, SysUser applyUser, SysUser ownerUser);

    void auditRollback(AdsMatHyxtTaskHistoryD historyD, AdsMatHyxtTaskRunD taskRunD);

    void createTask(String taskId, SysUser ownerUser);

}
