From 02de75bdded6cea36ab763453898c1792f3dc1ed Mon Sep 17 00:00:00 2001 From: liangkun Date: Tue, 6 Jul 2021 14:36:52 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=B5=81=E5=AE=A1?= =?UTF-8?q?=E6=89=B9=E4=BA=BA=E5=A2=9E=E5=8A=A0=E9=83=A8=E9=97=A8=E8=B4=9F?= =?UTF-8?q?=E8=B4=A3=E4=BA=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/NWFScheme/NodeForm.cshtml | 1 + .../Views/NWFScheme/NodeForm.js | 16 ++ .../Process/NWFProcessBLL.cs | 212 ++++++++++++------ 3 files changed, 165 insertions(+), 64 deletions(-) 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..17c49f579 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,6 +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({ 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 32901ca50..bd0438667 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 @@ -534,7 +534,7 @@ namespace Learun.Application.WorkFlow foreach (var item in nodeAuditorList) { switch (item.type)//1.岗位2.角色3.用户4.上下级5.表单指定字段6.某一个节点执行人 - //liang 20200813 新增type=7 分管校长 + //liang 20200813 新增type=7 分管校长 20210706增加部门负责人type=8 { case 1:// 岗位 var userRelationList = userRelationIBLL.GetUserIdList(item.auditorId); @@ -547,17 +547,35 @@ namespace Learun.Application.WorkFlow { if (userEntity.F_DepartmentId == paramConfig.CreateUser.DepartmentId) { - list.Add(new NWFUserInfo() + if (!list.Exists(m => m.Id == userEntity.F_UserId)) { - Id = userEntity.F_UserId, - Account = userEntity.F_Account, - Name = userEntity.F_RealName - }); + list.Add(new NWFUserInfo() + { + Id = userEntity.F_UserId, + Account = userEntity.F_Account, + Name = userEntity.F_RealName + }); + } } } else if (item.condition == 2) { if (userEntity.F_CompanyId == paramConfig.CreateUser.CompanyId) + { + if (!list.Exists(m => m.Id == userEntity.F_UserId)) + { + list.Add(new NWFUserInfo() + { + Id = userEntity.F_UserId, + Account = userEntity.F_Account, + Name = userEntity.F_RealName + }); + } + } + } + else + { + if (!list.Exists(m => m.Id == userEntity.F_UserId)) { list.Add(new NWFUserInfo() { @@ -567,15 +585,6 @@ namespace Learun.Application.WorkFlow }); } } - else - { - list.Add(new NWFUserInfo() - { - Id = userEntity.F_UserId, - Account = userEntity.F_Account, - Name = userEntity.F_RealName - }); - } } } break; @@ -591,24 +600,30 @@ namespace Learun.Application.WorkFlow { if (userEntity.F_DepartmentId == paramConfig.CreateUser.DepartmentId) { - list.Add(new NWFUserInfo() + if (!list.Exists(m => m.Id == userEntity.F_UserId)) { - Id = userEntity.F_UserId, - Account = userEntity.F_Account, - Name = userEntity.F_RealName - }); + list.Add(new NWFUserInfo() + { + Id = userEntity.F_UserId, + Account = userEntity.F_Account, + Name = userEntity.F_RealName + }); + } } } else if (item.condition == 2) { if (userEntity.F_CompanyId == paramConfig.CreateUser.CompanyId) { - list.Add(new NWFUserInfo() + if (!list.Exists(m => m.Id == userEntity.F_UserId)) { - Id = userEntity.F_UserId, - Account = userEntity.F_Account, - Name = userEntity.F_RealName - }); + list.Add(new NWFUserInfo() + { + Id = userEntity.F_UserId, + Account = userEntity.F_Account, + Name = userEntity.F_RealName + }); + } } } else if (item.condition == 3) // 需要存在上级关系 @@ -619,12 +634,15 @@ namespace Learun.Application.WorkFlow if (postIBLL.IsUp(postList1, postList2)) { - list.Add(new NWFUserInfo() + if (!list.Exists(m => m.Id == userEntity.F_UserId)) { - Id = userEntity.F_UserId, - Account = userEntity.F_Account, - Name = userEntity.F_RealName - }); + list.Add(new NWFUserInfo() + { + Id = userEntity.F_UserId, + Account = userEntity.F_Account, + Name = userEntity.F_RealName + }); + } } } else if (item.condition == 4) // 需要存在下级关系 @@ -634,6 +652,21 @@ namespace Learun.Application.WorkFlow var postList2 = userRelationIBLL.GetObjectIds(userEntity.F_UserId, 2);// 节点审核人岗位 if (postIBLL.IsDown(postList1, postList2)) + { + if (!list.Exists(m => m.Id == userEntity.F_UserId)) + { + list.Add(new NWFUserInfo() + { + Id = userEntity.F_UserId, + Account = userEntity.F_Account, + Name = userEntity.F_RealName + }); + } + } + } + else + { + if (!list.Exists(m => m.Id == userEntity.F_UserId)) { list.Add(new NWFUserInfo() { @@ -643,15 +676,6 @@ namespace Learun.Application.WorkFlow }); } } - else - { - list.Add(new NWFUserInfo() - { - Id = userEntity.F_UserId, - Account = userEntity.F_Account, - Name = userEntity.F_RealName - }); - } } } break; @@ -664,12 +688,15 @@ namespace Learun.Application.WorkFlow var userEntity3 = userIBLL.GetEntityByUserId(userItem); if (userEntity3 != null) { - list.Add(new NWFUserInfo() + if (!list.Exists(m => m.Id == userEntity3.F_UserId)) { - Id = userEntity3.F_UserId, - Account = userEntity3.F_Account, - Name = userEntity3.F_RealName - }); + list.Add(new NWFUserInfo() + { + Id = userEntity3.F_UserId, + Account = userEntity3.F_Account, + Name = userEntity3.F_RealName + }); + } } } } @@ -695,12 +722,15 @@ namespace Learun.Application.WorkFlow var userEntity = userIBLL.GetEntityByUserId(userRelationItem.F_UserId); if (userEntity != null) { - list.Add(new NWFUserInfo() + if (!list.Exists(m => m.Id == userEntity.F_UserId)) { - Id = userEntity.F_UserId, - Account = userEntity.F_Account, - Name = userEntity.F_RealName - }); + list.Add(new NWFUserInfo() + { + Id = userEntity.F_UserId, + Account = userEntity.F_Account, + Name = userEntity.F_RealName + }); + } } } break; @@ -723,12 +753,15 @@ namespace Learun.Application.WorkFlow var userEntity5 = userIBLL.GetEntityByUserId(row[0].ToString()); if (userEntity5 != null) { - list.Add(new NWFUserInfo() + if (!list.Exists(m => m.Id == userEntity5.F_UserId)) { - Id = userEntity5.F_UserId, - Account = userEntity5.F_Account, - Name = userEntity5.F_RealName - }); + list.Add(new NWFUserInfo() + { + Id = userEntity5.F_UserId, + Account = userEntity5.F_Account, + Name = userEntity5.F_RealName + }); + } } } } @@ -741,12 +774,15 @@ namespace Learun.Application.WorkFlow var userEntity6 = userIBLL.GetEntityByUserId(task.F_CreateUserId); if (userEntity6 != null) { - list.Add(new NWFUserInfo() + if (!list.Exists(m => m.Id == userEntity6.F_UserId)) { - Id = userEntity6.F_UserId, - Account = userEntity6.F_Account, - Name = userEntity6.F_RealName - }); + list.Add(new NWFUserInfo() + { + Id = userEntity6.F_UserId, + Account = userEntity6.F_Account, + Name = userEntity6.F_RealName + }); + } } } break; @@ -782,12 +818,60 @@ namespace Learun.Application.WorkFlow if (null != userEntity7) { - list.Add(new NWFUserInfo() + if (!list.Exists(m => m.Id == userEntity7.F_UserId)) { - Id = userEntity7.F_UserId, - Account = userEntity7.F_Account, - Name = userEntity7.F_RealName - }); + list.Add(new NWFUserInfo() + { + Id = userEntity7.F_UserId, + Account = userEntity7.F_Account, + Name = userEntity7.F_RealName + }); + } + } + } + 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 + }); + } + } } From ca3c4b1e19c42077aedfbdf7ab9a3bbcdc24be9c Mon Sep 17 00:00:00 2001 From: edy Date: Thu, 8 Jul 2021 15:17:52 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=B7=A5=E8=B5=84=E6=9D=A1=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E6=94=B9=E4=B8=8B=E6=8B=89=E6=A1=86=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E5=B7=A5=E8=B5=84=E6=9D=A1=E5=AF=BC=E5=85=A5=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/Emp_Payroll/Form.cshtml | 196 +++++++++--------- .../Views/Emp_Payroll/Form.js | 1 + .../Views/Emp_Payroll/Index.js | 15 +- .../Views/Emp_PayrollOnce/Form.cshtml | 2 +- .../Views/Emp_PayrollOnce/Form.js | 1 + .../Views/Emp_PayrollOnce/Index.js | 15 +- .../Emp_Payroll/EMP_PayrollEntity.cs | 5 + .../Emp_PayrollOnce/EMP_PayrollOnceEntity.cs | 5 + 8 files changed, 139 insertions(+), 101 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Emp_Payroll/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Emp_Payroll/Form.cshtml index 743372a2a..20c2e3fcb 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Emp_Payroll/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Emp_Payroll/Form.cshtml @@ -3,201 +3,201 @@ Layout = "~/Views/Shared/_Form.cshtml"; }
-
+
姓名
- +
-
+
岗位工资
- +
-
+
薪级工资
- +
-
+
提高百分之十
- +
-
+
校内补贴
- +
-
+
临时性补贴
- +
-
+
职级工资
- +
-
+
级差补贴
- +
-
+
绩效工资
- +
-
+
绩效工资减少额
- +
-
+
月发一次性绩效
- +
-
+
倾斜
- +
-
+
课时费
- +
-
+
超课时
- +
-
+
培训课酬
- +
-
+
奖金
- +
-
+
婴补
- +
-
+
班主任
- +
-
+
骨干津贴
- +
-
+
职务补
- +
-
+
加班费
- +
-
+
值班费
- +
-
+
考务费
- +
-
+
安全绩效
- +
-
+
医药费
- +
-
+
防暑降温
- +
-
+
房补
- +
-
+
物业补贴
- +
-
+
采暖补贴
- +
-
+
综合补助
- +
-
+
综治奖
- +
-
+
补发
- +
-
+
应发合计
- +
-
+
失保
- +
-
+
养保
- +
-
+
职业年金
- +
-
+
房积金
- +
-
+
医保
- +
-
+
房租
- +
-
+
网费
- +
-
+
考核扣款
- +
-
+
其他扣款
- +
-
+
代扣个税
- +
-
+
扣款合计
- +
-
+
纳税收入
- +
-
+
免税收入
- +
-
+
应发合计
- +
-
+
发放月份
- +
-
+
发放年份
- +
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/Emp_Payroll/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Emp_Payroll/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Emp_Payroll/Form.js index 3299045e3..270578388 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Emp_Payroll/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Emp_Payroll/Form.js @@ -15,6 +15,7 @@ var bootstrap = function ($, learun) { page.initData(); }, bind: function () { + $('#UserId').lrDataSourceSelect({ code: 'TeacherInfo', value: 'f_userid', text: 'f_realname' }); }, initData: function () { if (!!keyValue) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Emp_Payroll/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Emp_Payroll/Index.js index 51c123b2a..92ad7abcf 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Emp_Payroll/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Emp_Payroll/Index.js @@ -90,7 +90,20 @@ var bootstrap = function ($, learun) { $('#gridtable').jfGrid({ url: top.$.rootUrl + '/PersonnelManagement/Emp_Payroll/GetPageList', headData: [ - { label: "姓名", name: "SalaryName", width: 100, align: "left" }, + //{ label: "姓名", name: "UserId", width: 100, align: "left" }, + { + label: "名称", name: "UserId", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'TeacherInfo', + key: value, + keyId: 'f_userid', + callback: function (_data) { + callback(_data['f_realname']); + } + }); + } + }, { label: "岗位工资", name: "PostSalary", width: 100, align: "left", statistics: true }, { label: "薪级工资", name: "PayWages", width: 100, align: "left", statistics: true }, { label: "提高百分之十", name: "UpTenpercent", width: 100, align: "left", statistics: true }, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Emp_PayrollOnce/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Emp_PayrollOnce/Form.cshtml index a4ae88c9c..3800b3f68 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Emp_PayrollOnce/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Emp_PayrollOnce/Form.cshtml @@ -5,7 +5,7 @@
姓名
- +
发放月份
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Emp_PayrollOnce/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Emp_PayrollOnce/Form.js index a69e5a247..5d2e61a07 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Emp_PayrollOnce/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Emp_PayrollOnce/Form.js @@ -15,6 +15,7 @@ var bootstrap = function ($, learun) { page.initData(); }, bind: function () { + $('#UserId').lrDataSourceSelect({ code: 'TeacherInfo', value: 'f_userid', text: 'f_realname' }); }, initData: function () { if (!!keyValue) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Emp_PayrollOnce/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Emp_PayrollOnce/Index.js index 59cb3bc07..4aaf52b94 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Emp_PayrollOnce/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Emp_PayrollOnce/Index.js @@ -90,7 +90,20 @@ var bootstrap = function ($, learun) { $('#gridtable').jfGrid({ url: top.$.rootUrl + '/PersonnelManagement/Emp_PayrollOnce/GetPageList', headData: [ - { label: "姓名", name: "SalaryName", width: 100, align: "left" }, + //{ label: "姓名", name: "UserId", width: 100, align: "left" }, + { + label: "名称", name: "UserId", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'TeacherInfo', + key: value, + keyId: 'f_userid', + callback: function (_data) { + callback(_data['f_realname']); + } + }); + } + }, { label: "应发金额", name: "TotalPayAmount", width: 100, align: "left", statistics: true }, { label: "实发金额", name: "FinalPayAmount", width: 100, align: "left", statistics: true }, { label: "发放月份", name: "IssueMonth", width: 100, align: "left" }, diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Emp_Payroll/EMP_PayrollEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Emp_Payroll/EMP_PayrollEntity.cs index 3d1acc738..c8f7fab71 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Emp_Payroll/EMP_PayrollEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Emp_Payroll/EMP_PayrollEntity.cs @@ -20,6 +20,11 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement /// [Column("SALARYID")] public string SalaryID { get; set; } + /// + /// 教师编码 + /// + [Column("USERID")] + public string UserId { get; set; } /// /// SalaryName /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Emp_PayrollOnce/EMP_PayrollOnceEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Emp_PayrollOnce/EMP_PayrollOnceEntity.cs index ceebc772c..443f10db7 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Emp_PayrollOnce/EMP_PayrollOnceEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Emp_PayrollOnce/EMP_PayrollOnceEntity.cs @@ -20,6 +20,11 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement /// [Column("SALARYID")] public string SalaryID { get; set; } + /// + /// 教师编码 + /// + [Column("USERID")] + public string UserId { get; set; } /// /// 姓名 ///