package cn.stylefeng.workflow.instance.modular.task.strategy.samesubmit;

import cn.stylefeng.workflow.api.entity.task.RuTask;
import cn.stylefeng.workflow.api.enums.strategy.SamePersonApprovalPolicyEnum;
import cn.stylefeng.workflow.instance.modular.task.strategy.samesubmit.base.SameSubmitRule;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Component;

@Component
@Deprecated
public class SameSubmitTurnDeptLeaderRule extends SameSubmitRule {

    @Resource
    private SameSubmitTurnLeaderRule sameSubmitTurnLeaderRule;

    @Override
    public SamePersonApprovalPolicyEnum getSameSubmitRuleType() {
        return SamePersonApprovalPolicyEnum.TURN_TO_DEPT_LEADER;
    }

    @Override
    public RuTask processTask(RuTask originTask, Long applicant, Long applicantOrgId) {
        return sameSubmitTurnLeaderRule.processTask(originTask, applicant, applicantOrgId);
    }

}
