diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserBLL.cs b/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserBLL.cs index 7f88d0db0..dc2182b7e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserBLL.cs @@ -220,6 +220,29 @@ namespace Learun.Application.Organization } } } + /// + /// 用户列表(根据部门主键) + /// + /// 部门主键 + /// + public List GetListByDepartmentIds(string departmentId) + { + try + { + return userService.GetListByDepartmentIds(departmentId); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } public List GetUserByDepartmentId(string departmentId) { try diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserIBLL.cs index a22d35fe8..1472103c9 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserIBLL.cs @@ -30,6 +30,7 @@ namespace Learun.Application.Organization /// List GetList(string companyId, string departmentId, string keyword); List GetListByDepartmentId(string departmentId); + List GetListByDepartmentIds(string departmentId); List GetUserByDepartmentId(string departmentId); bool GetAny(); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserService.cs b/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserService.cs index e1b3d1a20..4cc8bce5b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserService.cs @@ -571,6 +571,25 @@ namespace Learun.Application.Organization } } } + public List GetListByDepartmentIds(string departmentId) + { + try + { + var ids = departmentId.Split(','); + return this.BaseRepository().FindList(a=> ids.Contains(a.F_DepartmentId)).ToList(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Controllers/UserController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Controllers/UserController.cs index 8f6d7e8b3..cdbd2adc1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Controllers/UserController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Controllers/UserController.cs @@ -146,6 +146,18 @@ namespace Learun.Application.Web.Areas.LR_OrganizationModule.Controllers return JsonResult(data); } /// + /// 根据部门获取用户 + /// + /// 部门主键 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetListByDepartmentIds(string departmentId) + { + var data = userIBLL.GetListByDepartmentIds(departmentId); + return JsonResult(data); + } + /// /// 获取本部门的人员 /// /// 公司主键 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_ManagementPlan/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_ManagementPlan/Form.cshtml index cd8c772af..c48c70cc3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_ManagementPlan/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_ManagementPlan/Form.cshtml @@ -23,6 +23,10 @@
部门*
+
+
接收人员*
+
+
附件上传
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_ManagementPlan/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_ManagementPlan/Form.js index 05b49adf1..e5d0dc23e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_ManagementPlan/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_ManagementPlan/Form.js @@ -39,8 +39,16 @@ var bootstrap = function ($, learun) { // 是否允许搜索 allowSearch: true, // 访问数据接口地址 - url: top.$.rootUrl + '/LR_OrganizationModule/Department/GetTree' + url: top.$.rootUrl + '/LR_OrganizationModule/Department/GetTree', + select: function (val) { + var departmentIds = val.map(t => t.id).toString(); + $('#MPReceiveUser').lrselectRefresh({ + url: top.$.rootUrl + '/LR_OrganizationModule/User/GetListByDepartmentIds?departmentId=' + departmentIds + }) + } }); + + $('#MPReceiveUser').lrselect({ type: 'multiple', allowSearch: true, value: 'F_UserId', text:'F_RealName' }) $('#MPMonth').lrDataItemSelect({ code: 'MPMonth' }); $('#MPFile').lrUploader(); }, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_ManagementPlan/IndexManagement.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_ManagementPlan/IndexManagement.js index 56d33c997..aba0afcad 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_ManagementPlan/IndexManagement.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_ManagementPlan/IndexManagement.js @@ -147,7 +147,16 @@ var bootstrap = function ($, learun) { label: "部门", name: "MPDepartment", width: 250, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.httpAsyncGet(top.$.rootUrl + '/LR_OrganizationModule/Department/GetDepartmentList?listId=' + value, function (res) { - console.log(res); + if (res.code == learun.httpCode.success) { + callback(res.data); + } + }); + } + }, + { + label: "接收人", name: "MPReceiveUser", width: 250, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.httpAsyncGet(top.$.rootUrl + '/LR_OrganizationModule/User/GetListByUserIds?keyValue=' + value, function (res) { if (res.code == learun.httpCode.success) { callback(res.data); } @@ -169,7 +178,6 @@ var bootstrap = function ($, learun) { async: false, cache: false, success: function (res) { - console.log(res); var bb = ''; $.each(res.data, function (i, item) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_PerformanceTracking/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_PerformanceTracking/Form.cshtml index e2e89ec5a..77820ead7 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_PerformanceTracking/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_PerformanceTracking/Form.cshtml @@ -19,6 +19,10 @@
部门*
+
+
接收人员*
+
+
材料名称
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_PerformanceTracking/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_PerformanceTracking/Form.js index 08e2a573f..f5008e50f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_PerformanceTracking/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_PerformanceTracking/Form.js @@ -38,8 +38,16 @@ var bootstrap = function ($, learun) { // 是否允许搜索 allowSearch: true, // 访问数据接口地址 - url: top.$.rootUrl + '/LR_OrganizationModule/Department/GetTree' + url: top.$.rootUrl + '/LR_OrganizationModule/Department/GetTree', + select: function (val) { + var departmentIds = val.map(t => t.id).toString(); + $('#MPReceiveUser').lrselectRefresh({ + url: top.$.rootUrl + '/LR_OrganizationModule/User/GetListByDepartmentIds?departmentId=' + departmentIds + }) + } }); + + $('#MPReceiveUser').lrselect({ type: 'multiple', allowSearch: true, value: 'F_UserId', text:'F_RealName' }) $('#MPFile').lrUploader(); $('#MPMonth').lrDataItemSelect({ code: 'MPMonth' }); }, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_PerformanceTracking/IndexManagement.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_PerformanceTracking/IndexManagement.js index 189c23db8..39563a03f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_PerformanceTracking/IndexManagement.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_PerformanceTracking/IndexManagement.js @@ -147,6 +147,16 @@ var bootstrap = function ($, learun) { }); } }, + { + label: "接收人", name: "MPReceiveUser", width: 250, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.httpAsyncGet(top.$.rootUrl + '/LR_OrganizationModule/User/GetListByUserIds?keyValue=' + value, function (res) { + if (res.code == learun.httpCode.success) { + callback(res.data); + } + }); + } + }, { label: "模板材料", name: "MPFile", width: 200, align: "left", formatterAsync: function (callback, value, row, op, $cell) { $.ajax({ diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_QualityObjectives/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_QualityObjectives/Form.cshtml index 4bb1e5581..ca6e0c03b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_QualityObjectives/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_QualityObjectives/Form.cshtml @@ -24,6 +24,10 @@
部门*
+
+
接收人员*
+
+
提交截止日期
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_QualityObjectives/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_QualityObjectives/Form.js index 663786eb7..10d8689c5 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_QualityObjectives/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_QualityObjectives/Form.js @@ -38,8 +38,16 @@ var bootstrap = function ($, learun) { // 是否允许搜索 allowSearch: true, // 访问数据接口地址 - url: top.$.rootUrl + '/LR_OrganizationModule/Department/GetTree' + url: top.$.rootUrl + '/LR_OrganizationModule/Department/GetTree', + select: function (val) { + var departmentIds = val.map(t => t.id).toString(); + $('#MPReceiveUser').lrselectRefresh({ + url: top.$.rootUrl + '/LR_OrganizationModule/User/GetListByDepartmentIds?departmentId=' + departmentIds + }) + } }); + + $('#MPReceiveUser').lrselect({ type: 'multiple', allowSearch: true, value: 'F_UserId', text:'F_RealName' }) $('#MPMonth').lrDataItemSelect({ code: 'MPMonth' }); $('#MPFile').lrUploader(); }, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_QualityObjectives/IndexManagement.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_QualityObjectives/IndexManagement.js index 72130b1c2..4fea6580c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_QualityObjectives/IndexManagement.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_QualityObjectives/IndexManagement.js @@ -147,6 +147,17 @@ var bootstrap = function ($, learun) { }); } }, + { + label: "接收人", name: "MPReceiveUser", width: 250, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.httpAsyncGet(top.$.rootUrl + '/LR_OrganizationModule/User/GetListByUserIds?keyValue=' + value, function (res) { + if (res.code == learun.httpCode.success) { + callback(res.data); + } + }); + } + }, + { label: "模板材料", name: "MPFile", width: 200, align: "left", formatterAsync: function (callback, value, row, op, $cell) { $.ajax({ diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MP_ManagementPlan/MP_ManageMentPlanEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MP_ManagementPlan/MP_ManageMentPlanEntity.cs index bb209c1e7..157c54875 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MP_ManagementPlan/MP_ManageMentPlanEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MP_ManagementPlan/MP_ManageMentPlanEntity.cs @@ -61,6 +61,12 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement [Column("MPDEPARTMENT")] public string MPDepartment { get; set; } /// + /// 接收人 + /// + /// + [Column("MPRECEIVEUSER")] + public string MPReceiveUser { get; set; } + /// /// 项目名称 /// /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MP_ManagementPlan/MP_ManagementPlanService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MP_ManagementPlan/MP_ManagementPlanService.cs index 28225cb5f..f1caabb20 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MP_ManagementPlan/MP_ManagementPlanService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MP_ManagementPlan/MP_ManagementPlanService.cs @@ -51,6 +51,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement t.MPFileTwoRemark, t.MPUploaderTwo, t.MPMonth, + t.MPReceiveUser, t.MPUploadTime "); strSql.Append(" FROM MP_ManageMentPlan t "); @@ -60,10 +61,13 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement // 虚拟参数 var dp = new DynamicParameters(new { }); + //接收人的查看条件 if (!queryParam["isUser"].IsEmpty()) { var month = (int.Parse(DateTime.Now.ToString("MM")) - 1).ToString(); var yearNo = Common.GetSemesterAndYear().AcademicYearShort; + var currentUserId = LoginUserInfo.Get().userId; + strSql.Append(" AND t.MPReceiveUser like '%" + currentUserId + "%'"); strSql.Append(" AND t.MPMonth = '" + month + "' "); strSql.Append(" AND t.MPAcademicYearNo = '" + yearNo + "' "); } @@ -231,7 +235,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement try { var data = this.BaseRepository("CollegeMIS") - .FindList(a => a.ParentId==ParentId); + .FindList(a => a.ParentId == ParentId); return data; } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MP_PerformanceTracking/MP_PerformanceTrackingService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MP_PerformanceTracking/MP_PerformanceTrackingService.cs index de32dc64d..fbe5e87d4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MP_PerformanceTracking/MP_PerformanceTrackingService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MP_PerformanceTracking/MP_PerformanceTrackingService.cs @@ -51,6 +51,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement t.MPFileTwoRemark, t.MPUploaderTwo, t.MPMonth, + t.MPReceiveUser, t.MPUploadTime "); strSql.Append(" FROM MP_ManageMentPlan t "); @@ -63,6 +64,8 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement { var month = (int.Parse(DateTime.Now.ToString("MM")) - 1).ToString(); var yearNo = Common.GetSemesterAndYear().AcademicYearShort; + var currentUserId = LoginUserInfo.Get().userId; + strSql.Append(" AND t.MPReceiveUser like '%" + currentUserId + "%'"); strSql.Append(" AND t.MPMonth = '" + month + "' "); strSql.Append(" AND t.MPAcademicYearNo = '" + yearNo + "' "); } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MP_QualityObjectives/MP_QualityObjectivesService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MP_QualityObjectives/MP_QualityObjectivesService.cs index 405bb4c71..02fdf7bd8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MP_QualityObjectives/MP_QualityObjectivesService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MP_QualityObjectives/MP_QualityObjectivesService.cs @@ -51,6 +51,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement t.ParentId, t.MPUploaderTwo, t.MPMonth, + t.MPReceiveUser, t.MPUploadTime "); strSql.Append(" FROM MP_ManageMentPlan t "); @@ -63,6 +64,8 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement { var month = (int.Parse(DateTime.Now.ToString("MM")) - 1).ToString(); var yearNo = Common.GetSemesterAndYear().AcademicYearShort; + var currentUserId = LoginUserInfo.Get().userId; + strSql.Append(" AND t.MPReceiveUser like '%" + currentUserId + "%'"); strSql.Append(" AND t.MPMonth = '" + month + "' "); strSql.Append(" AND t.MPAcademicYearNo = '" + yearNo + "' "); }