diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CdDept/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CdDept/Form.cshtml index 53d942360..04db19fdc 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CdDept/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CdDept/Form.cshtml @@ -29,7 +29,7 @@
系部负责人
- +
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/CdDept/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CdDept/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CdDept/Form.js index 33c707c15..4d03e2191 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CdDept/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CdDept/Form.js @@ -16,6 +16,7 @@ var bootstrap = function ($, learun) { }, bind: function () { $('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); + $('#DeptDirector').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_encode', text: 'f_realname' }); }, initData: function () { if (!!keyValue) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CdDept/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CdDept/Index.js index 6d07fb33c..3d233f7c6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CdDept/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CdDept/Index.js @@ -90,7 +90,18 @@ var bootstrap = function ($, learun) { { label: "名称缩写", name: "DeptShortName", width: 100, align: "left" }, { label: "英文名称", name: "DeptEnBrief", width: 100, align: "left" }, { label: "排序号", name: "DeptSort", width: 100, align: "left" }, - { label: "系部负责人", name: "DeptDirector", width: 100, align: "left" }, + { + label: "系部负责人", name: "DeptDirector", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata', + key: value, + keyId: 'f_encode', + callback: function (_data) { + callback(_data['f_realname']); + } + }); + } + }, ], mainId: 'DeptId', isMultiselect: true, 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 135173b3e..a37b69a45 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 @@ -201,6 +201,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 9aa16f454..3ff473d09 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 @@ -191,6 +191,9 @@ var bootstrap = function ($, learun) { case '9': return '班主任/辅导员'; break; + case '10': + return '系部负责人'; + break; } } }, @@ -382,6 +385,19 @@ var bootstrap = function ($, learun) { } }); }); + //添加系部负责人 + $('#lr_form_deptdiredctor').on('click', function () { + learun.layerConfirm('是否确认增加系部负责人?', function (res) { + if (res) { + var data = { auditorId: 'xbfzrid', type: '10', 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 f6195ed00..1e640d77d 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 @@ -48,6 +48,7 @@ namespace Learun.Application.WorkFlow private ImgIBLL imgIBLL = new ImgBLL(); private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL(); private ClassInfoIBLL classInfoIBLL = new ClassInfoBLL(); + private CdDeptIBLL deptIbll = new CdDeptBLL(); #region 获取数据 /// @@ -639,6 +640,7 @@ namespace Learun.Application.WorkFlow switch (item.type)//1.岗位2.角色3.用户4.上下级5.表单指定字段6.某一个节点执行人 //liang 20200813 新增type=7 分管校长 //dyy 20220715 新增type=9 班主任/辅导员 + //liang 20230315 新增type=10 系部负责人 { case 1:// 岗位 var userRelationList = userRelationIBLL.GetUserIdList(item.auditorId); @@ -947,7 +949,7 @@ namespace Learun.Application.WorkFlow //判断用户所在班级是否有班主任/辅导员:如果有,找到班主任/辅导员;如果没有,不发; string diredctorId = "";//班主任 string tutorId = "";//辅导员 - var stuInfoBasicEntity = stuInfoBasicIBLL.GetStuNoByAccount(paramConfig.CurrentUser.Account); + var stuInfoBasicEntity = stuInfoBasicIBLL.GetStuNoByAccount(paramConfig.CreateUser.Account); if (stuInfoBasicEntity != null) { var classInfoEntity = classInfoIBLL.GetClassInfoEntityByClassNo(stuInfoBasicEntity.ClassNo); @@ -986,6 +988,29 @@ namespace Learun.Application.WorkFlow } } break; + case 10://liang 20230315 新增type=10 系部负责人 + var stuInfoBasicEntitydept = stuInfoBasicIBLL.GetStuNoByAccount(paramConfig.CreateUser.Account); + if (stuInfoBasicEntitydept != null) + { + var deptinfo = deptIbll.GetCdDeptEntityByNo(stuInfoBasicEntitydept.DeptNo); + if (deptinfo != null) + { + var directorEntity = userIBLL.GetEntityByAccount(deptinfo.DeptDirector); + if (directorEntity != null) + { + if (!list.Exists(m => m.Id == directorEntity.F_UserId)) + { + list.Add(new NWFUserInfo() + { + Id = directorEntity.F_UserId, + Account = directorEntity.F_Account, + Name = directorEntity.F_RealName + }); + } + } + } + } + break; } } }