From f4a2bd6867e2aa15aed309c0fd6dd2564cb24e67 Mon Sep 17 00:00:00 2001 From: dyy <18335927079@163.com> Date: Fri, 21 May 2021 09:48:12 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91=E6=95=99?= =?UTF-8?q?=E5=B8=88=E4=BF=A1=E6=81=AF=E7=AE=A1=E7=90=86=EF=BC=9A=E6=95=99?= =?UTF-8?q?=E8=82=B2=E7=BB=8F=E5=8E=86=E6=94=B9=E4=B8=BA=E6=95=99=E5=B8=88?= =?UTF-8?q?=E5=AD=A6=E5=8E=86=E5=8F=98=E6=9B=B4=E7=AE=A1=E7=90=86=EF=BC=9B?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=98=AF=E5=90=A6=E5=90=8C=E6=AD=A5=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=EF=BC=9B=E6=95=99=E5=B8=88=E5=AD=A6=E5=8E=86=E5=8F=98?= =?UTF-8?q?=E6=9B=B4=E7=BB=9F=E8=AE=A1=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PM_EducationExperienceController.cs | 32 ++++++++ .../Views/EmpInfo/Form.cshtml | 2 +- .../Views/EmpInfo/Form.js | 6 +- .../Views/EmpInfo/Index.js | 10 +-- .../Views/PM_EducationExperience/Form.cshtml | 4 + .../Views/PM_EducationExperience/Form.js | 3 +- .../Views/PM_EducationExperience/Index.js | 6 +- .../StatisticIndex.cshtml | 31 +++++++ .../PM_EducationExperience/StatisticIndex.js | 82 +++++++++++++++++++ .../Learun.Application.Web.csproj | 2 + .../Views/UserCenter/IndexInTeacher.cshtml | 2 +- .../PM_EducationExperienceBLL.cs | 24 ++++++ .../PM_EducationExperienceEntity.cs | 5 ++ .../PM_EducationExperienceIBLL.cs | 7 ++ .../PM_EducationExperienceService.cs | 57 ++++++++++++- 15 files changed, 259 insertions(+), 14 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PM_EducationExperience/StatisticIndex.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PM_EducationExperience/StatisticIndex.js diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/PM_EducationExperienceController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/PM_EducationExperienceController.cs index baa79d67b..c3e14258d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/PM_EducationExperienceController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/PM_EducationExperienceController.cs @@ -38,6 +38,16 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } + + /// + /// 主页面-统计 + /// + /// + [HttpGet] + public ActionResult StatisticIndex() + { + return View(); + } #endregion #region 获取数据 @@ -77,6 +87,28 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers }; return Success(jsonData); } + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageStatisticList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = pM_EducationExperienceIBLL.GetPageStatisticList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + #endregion #region 提交数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.cshtml index 8c1f1934a..48208212b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.cshtml @@ -31,7 +31,7 @@
+
+
是否同步
+
+
专业描述
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PM_EducationExperience/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PM_EducationExperience/Form.js index 7d4775158..39932757e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PM_EducationExperience/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PM_EducationExperience/Form.js @@ -16,8 +16,9 @@ var bootstrap = function ($, learun) { page.initData(); }, bind: function () { - $('#Education').lrDataItemSelect({ code: 'CollegeType' }); + $('#Education').lrDataItemSelect({ code: 'CollegeType', allowSearch: true }); $('#EducationalSystem').lrDataItemSelect({ code: 'EductionalSystme' }); + $('#IsSync').lrDataItemSelect({ code: 'YesOrNoBit' }); }, initData: function () { if (!!keyValue) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PM_EducationExperience/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PM_EducationExperience/Index.js index 05782b125..bf58c86ca 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PM_EducationExperience/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PM_EducationExperience/Index.js @@ -145,6 +145,9 @@ var bootstrap = function ($, learun) { }, { label: "专业描述", name: "Describe", width: 100, align: "left" }, { label: "备注", name: "Remark", width: 100, align: "left" }, + { + label: "是否同步", name: "IsSync", width: 100, align: "left", formatter: function (cellvalue) { return cellvalue == true ? "是" : "否" } + }, { label: "提交状态", name: "SubmitStatus", width: 100, align: "left", formatter: function (cellvalue) { @@ -153,7 +156,8 @@ var bootstrap = function ($, learun) { }, ], mainId: 'ID', - isPage: true + isPage: true, + sidx:'UpdateTime desc' }); page.search(); }, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PM_EducationExperience/StatisticIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PM_EducationExperience/StatisticIndex.cshtml new file mode 100644 index 000000000..6b7791ec1 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PM_EducationExperience/StatisticIndex.cshtml @@ -0,0 +1,31 @@ +@{ + ViewBag.Title = "教育经历统计"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
教师姓名
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/PM_EducationExperience/StatisticIndex.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PM_EducationExperience/StatisticIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PM_EducationExperience/StatisticIndex.js new file mode 100644 index 000000000..69bd60e4a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PM_EducationExperience/StatisticIndex.js @@ -0,0 +1,82 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2020-03-30 14:00 + * 描 述:教育经历统计 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 200, 400); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/PM_EducationExperience/GetPageStatisticList', + headData: [ + { + label: "教师", name: "EmpId", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', + key: value, + keyId: 'empid', + callback: function (_data) { + callback(_data['empname']); + } + }); + } + }, + { + label: "学历", name: "Education", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'CollegeType', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { label: "变更时间", name: "UpdateTime", width: 130, align: "left" }, + { + label: "变更人", name: "Updater", width: 100, align: "left", + formatterAsync: function (callback, value, row) { + learun.clientdata.getAsync('user', { + key: value, + callback: function (item) { + callback(item.name); + } + }); + } + }, + ], + mainId: 'ID', + isPage: true, + sidx:'UpdateTime desc' + }); + page.search(); + }, + search: function (param) { + param = param || {}; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + page.search(); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index f1e817fd3..d3589a34d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -952,6 +952,7 @@ + @@ -7185,6 +7186,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/UserCenter/IndexInTeacher.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/UserCenter/IndexInTeacher.cshtml index d78388a52..85c58d17d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/UserCenter/IndexInTeacher.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/UserCenter/IndexInTeacher.cshtml @@ -13,7 +13,7 @@
  • 基本信息
  • @if (ViewBag.UserType == "教师" || ViewBag.UserType == "管理员") { -
  • 教育经历
  • +
  • 教师学历变更记录
  • 专业技术职务经历
  • 工人技术等级经历
  • 工作简历
  • diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PM_EducationExperience/PM_EducationExperienceBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PM_EducationExperience/PM_EducationExperienceBLL.cs index cc602bfc5..270863c25 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PM_EducationExperience/PM_EducationExperienceBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PM_EducationExperience/PM_EducationExperienceBLL.cs @@ -89,6 +89,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetPageStatisticList(Pagination pagination, string queryJson) + { + try + { + return pM_EducationExperienceService.GetPageStatisticList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } #endregion #region 提交数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PM_EducationExperience/PM_EducationExperienceEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PM_EducationExperience/PM_EducationExperienceEntity.cs index 3db8f238b..7cfa3be8b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PM_EducationExperience/PM_EducationExperienceEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PM_EducationExperience/PM_EducationExperienceEntity.cs @@ -77,6 +77,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// [Column("REMARK")] public string Remark { get; set; } + /// + /// 是否同步 + /// + [Column("ISSYNC")] + public bool? IsSync { get; set; } #endregion #region 扩展操作 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PM_EducationExperience/PM_EducationExperienceIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PM_EducationExperience/PM_EducationExperienceIBLL.cs index 4f21e7acf..0c7c2752a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PM_EducationExperience/PM_EducationExperienceIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PM_EducationExperience/PM_EducationExperienceIBLL.cs @@ -34,6 +34,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 查询参数 /// IEnumerable GetListByEmpId(string empId); + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageStatisticList(Pagination pagination, string queryJson); #endregion #region 提交数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PM_EducationExperience/PM_EducationExperienceService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PM_EducationExperience/PM_EducationExperienceService.cs index 0bc7e12c5..d2570a040 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PM_EducationExperience/PM_EducationExperienceService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PM_EducationExperience/PM_EducationExperienceService.cs @@ -103,6 +103,49 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetPageStatisticList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT t.* "); + strSql.Append(" FROM PM_EducationExperience t "); + strSql.Append(" left join EmpInfo e on t.EmpId=e.EmpId "); + strSql.Append(" WHERE 1=1 and t.IsSync=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["EmpId"].IsEmpty()) + { + dp.Add("EmpId", queryParam["EmpId"].ToString(), DbType.String); + strSql.Append(" AND t.EmpId = @EmpId "); + } + if (!queryParam["EmpName"].IsEmpty()) + { + dp.Add("EmpName", "%" + queryParam["EmpName"].ToString() + "%", DbType.String); + strSql.Append(" AND e.EmpName like @EmpName "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + #endregion #region 提交数据 @@ -138,21 +181,31 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// public void SaveEntity(string keyValue, PM_EducationExperienceEntity entity) { + var db = this.BaseRepository("CollegeMIS").BeginTrans(); try { if (!string.IsNullOrEmpty(keyValue)) { entity.Modify(keyValue); - this.BaseRepository("CollegeMIS").Update(entity); + db.Update(entity); } else { entity.Create(); - this.BaseRepository("CollegeMIS").Insert(entity); + db.Insert(entity); } + + //“是否同步”:选是,则更新教师表; + if (entity.IsSync.HasValue && entity.IsSync.Value == true) + { + db.ExecuteBySql("update EmpInfo set HighestRecord='" + entity.Education + "' where EmpId='" + entity.EmpId + "' "); + } + + db.Commit(); } catch (Exception ex) { + db.Rollback(); if (ex is ExceptionEx) { throw;