diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFScheme/NodeForm.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFScheme/NodeForm.cshtml index c9e4f65f6..beebc1a61 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFScheme/NodeForm.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFScheme/NodeForm.cshtml @@ -199,6 +199,7 @@  添加节点执行人  添加表字段  添加分管校长 +  添加部门负责人  移除 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFScheme/NodeForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFScheme/NodeForm.js index b03b2762c..f5b67d8b2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFScheme/NodeForm.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFScheme/NodeForm.js @@ -185,6 +185,9 @@ var bootstrap = function ($, learun) { case '7': return '分管校长'; break; + case '8': + return '部门负责人'; + break; } } }, @@ -350,7 +353,19 @@ var bootstrap = function ($, learun) { } }); }); - + //添加部门负责人 + $('#lr_form_deptmaster').on('click', function () { + learun.layerConfirm('是否确认增加部门负责人?', function (res) { + if (res) { + var data = { auditorId: 'bmfzrid', type: '8', auditorName: '部门负责人' }; + if (!isRepeat(data.auditorId)) { + data.id = learun.newGuid(); + auditors.push(data); + $('#auditor_girdtable').jfGridSet('refreshdata', auditors); + } + } + }); + }); /*表单添加*/ $('#workform_girdtable').jfGrid({ headData: [ diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessBLL.cs index a30cccfe6..a10328c61 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessBLL.cs @@ -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; }