package org.jeecg.modules.stm.audit.service.impl;

import org.jeecg.modules.stm.audit.entity.AuditTask;
import org.jeecg.modules.stm.audit.mapper.AuditTaskMapper;
import org.jeecg.modules.stm.audit.service.IAuditTaskService;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.stm.utils.StmConstans;

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


/**
 * @Description: 任务分配
 * @Author: jeecg-boot
 * @Date:   2024-12-21
 * @Version: V1.0
 */
@Service
public class AuditTaskServiceImpl extends ServiceImpl<AuditTaskMapper, AuditTask> implements IAuditTaskService {
    @Override
    public List<Map<String,Object>> getAllTask(String userid,Integer actId){
        return this.baseMapper.getAllTask(userid,actId);
    }

    @Override
    public void copyCheckItem2ProjectItem(List<Integer> checkids,Integer projectid,Integer comeFrom){
        if(comeFrom.intValue()== StmConstans.Audit_TASK_COME_FROM_RULE) {
            this.baseMapper.copyCheckItem2ProjectItem(checkids,projectid);
        } else {
            this.baseMapper.copyInnerCheckItem2ProjectItem(checkids,projectid);
        }

    }
}
