Beispiel #1
0
 public async Task SubmitApproval(Leave leave)
 {
     var approver = _personDomainService.FindNextApprover(
         leave.Approver.PersonId,
         leave.LeaderMaxLevel);
     await _leaveDomainService.SubmitApproval(leave, Approver.FromPerson(approver));
 }
Beispiel #2
0
        public void SubmitApproval(Domain.Leave.Entity.Leave leave)
        {
            //获取下一个批准人
            var approver = _personDomainService.FindNextApprover(leave.Approver.PersonId, leave.MaxLeaderLevel);

            //获取批准人级别
            leave.CurrentApprovalInfo.ApproverLevel = _personDomainService.FindById(leave.Approver.PersonId).RoleLevel;
            _leaveDomainService.SubmitApproval(leave, Approver.FromPerson(approver));
        }
Beispiel #3
0
 public async Task CreateLeaveInfo(Leave leave)
 {
     var leaderMaxLevel = _approvalRuleDomainService.GetLeaderMaxLevel(
         leave.Applicant.PersonType,
         leave.Type.ToString(),
         leave.GetDuration());
     var approver = _personDomainService.FindFirstApprover(leave.Applicant.PersonId, leaderMaxLevel);
     await _leaveDomainService.CreateLeave(leave, leaderMaxLevel, Approver.FromPerson(approver));
 }
Beispiel #4
0
        public void CreateLeaveInfo(Domain.Leave.Entity.Leave leave)
        {
            var maxLeaderLevel = _approvalRuleDomainService.GetLeaderMaxLevel(leave.Applicant.PersonType, leave.LeaveType, leave.Duration);
            var approver       = _personDomainService.FindFirstApprover(leave.Applicant.PersonId, maxLeaderLevel);

            //查贸易
            //if(approver == null)
            //{
            //    approver = leave.Approver;
            //}
            _leaveDomainService.CreateLeave(leave, maxLeaderLevel, Approver.FromPerson(approver));
        }