|
|
@@ -795,6 +795,52 @@ namespace Learun.Application.WorkFlow |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
break; |
|
|
|
case 8://liang 20210706新增部门负责人判断 |
|
|
|
//获取流程创建用户的分管领导 |
|
|
|
//判断用户所在部门是否有上级部门:如果有,找到上级部门的负责人;如果没有,找本部门的分管校长; |
|
|
|
string deptMasterId = ""; |
|
|
|
var selfDepart2 = departmentIBLL.GetEntity(paramConfig.CreateUser.DepartmentId); |
|
|
|
if (selfDepart2 != null) |
|
|
|
{ |
|
|
|
//本部门存在部门负责人 |
|
|
|
if (!string.IsNullOrEmpty(selfDepart2.F_Manager)) |
|
|
|
{ |
|
|
|
deptMasterId = selfDepart2.F_Manager; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
//本部门不存在就找上级部门 |
|
|
|
var parentDepart = departmentIBLL.GetEntity(selfDepart2.F_ParentId); |
|
|
|
if (parentDepart != null) |
|
|
|
{ |
|
|
|
if (!string.IsNullOrEmpty(selfDepart2.F_Manager)) |
|
|
|
{ |
|
|
|
deptMasterId = parentDepart.F_Manager; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
//找到部门负责人就增加审批人 |
|
|
|
if (!string.IsNullOrEmpty(deptMasterId)) |
|
|
|
{ |
|
|
|
var userEntity7 = userIBLL.GetEntityByUserId(deptMasterId); |
|
|
|
|
|
|
|
if (null != userEntity7) |
|
|
|
{ |
|
|
|
if (!list.Exists(m => m.Id == userEntity7.F_UserId)) |
|
|
|
{ |
|
|
|
list.Add(new NWFUserInfo() |
|
|
|
{ |
|
|
|
Id = userEntity7.F_UserId, |
|
|
|
Account = userEntity7.F_Account, |
|
|
|
Name = userEntity7.F_RealName |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
break; |
|
|
|
} |
|
|
|