From 1fcad64039f7787c91d45022dd2f40faafbf70e9 Mon Sep 17 00:00:00 2001 From: ndbs Date: Wed, 12 Oct 2022 15:47:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=AC=E5=BC=80=E9=80=89=E8=B0=83=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E4=BA=BA=E5=91=98=E6=8A=A5=E5=90=8D=E8=A1=A8=20?= =?UTF-8?q?=E9=9C=80=E6=B1=82=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/WorkStaff/Index.js | 67 +++++++++++++------ .../Modules/RecruiterPeopleApi.cs | 16 +++++ .../WorkStaff/WorkStaffBLL.cs | 24 ++++++- .../WorkStaff/WorkStaffEntity.cs | 17 ++++- .../WorkStaff/WorkStaffIBLL.cs | 6 ++ .../WorkStaff/WorkStaffService.cs | 23 +++++++ 6 files changed, 130 insertions(+), 23 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/WorkStaff/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/WorkStaff/Index.js index 170f7077a..33aa35abf 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/WorkStaff/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/WorkStaff/Index.js @@ -55,7 +55,7 @@ var bootstrap = function ($, learun) { if (learun.checkrow(keyValue)) { learun.layerConfirm('是否确认删除该项!', function (res) { if (res) { - learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/WorkStaff/DeleteForm', { keyValue: keyValue}, function () { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/WorkStaff/DeleteForm', { keyValue: keyValue }, function () { refreshGirdData(); }); } @@ -72,9 +72,10 @@ var bootstrap = function ($, learun) { $('#gridtable').lrAuthorizeJfGrid({ url: top.$.rootUrl + '/EducationalAdministration/WorkStaff/GetPageList', headData: [ - { label: "姓名", name: "Name", width: 100, align: "left"}, - { label: "性别", name: "Gender", width: 100, align: "left"}, - { label: "民族", name: "Nationality", width: 100, align: "left"}, + { label: "姓名", name: "Name", width: 100, align: "left" }, + { label: "性别", name: "Gender", width: 100, align: "left" }, + { label: "身份证号", name: "IdentityCardNo", width: 120, align: "left" }, + { label: "民族", name: "Nationality", width: 100, align: "left" }, { label: "出生年月日", name: "Birthday", width: 100, align: "left", formatter: function (cellvalue) { @@ -93,28 +94,56 @@ var bootstrap = function ($, learun) { return learun.formatDate(cellvalue, 'yyyy-MM-dd'); } }, - { label: "籍贯", name: "Origin", width: 100, align: "left"}, - { label: "健康状况", name: "HealthStatus", width: 100, align: "left"}, - { label: "有何专长", name: "Speciality", width: 100, align: "left"}, - { label: "现单位及职务", name: "NowComPany", width: 100, align: "left"}, - { label: "报名岗位", name: "ApplyPost", width: 100, align: "left"}, - { label: "全日制教育", name: "TimeEducation", width: 100, align: "left"}, - { label: "毕业院校及专业", name: "T_SchoolMajor", width: 100, align: "left"}, - { label: "在职教育", name: "ServiceEducation", width: 100, align: "left"}, - { label: "通讯地址", name: "Address", width: 100, align: "left"}, - { label: "手机号码", name: "Mobile", width: 100, align: "left"}, - { label: "个人简历", name: "Resume", width: 100, align: "left"}, - { label: "奖惩情况", name: "RandP", width: 100, align: "left"}, - { label: "近三年年度考核情况", name: "Triennium", width: 100, align: "left"}, + { label: "籍贯", name: "Origin", width: 100, align: "left" }, + { label: "健康状况", name: "HealthStatus", width: 100, align: "left" }, + { label: "有何专长", name: "Speciality", width: 100, align: "left" }, + { label: "现单位及职务", name: "NowComPany", width: 100, align: "left" }, + { label: "报名岗位", name: "ApplyPost", width: 100, align: "left" }, + { label: "全日制教育", name: "TimeEducation", width: 100, align: "left" }, + { label: "毕业院校", name: "T_School", width: 100, align: "left" }, + { label: "所属专业", name: "T_Major", width: 100, align: "left" }, + { label: "在职教育", name: "ServiceEducation", width: 100, align: "left" }, + { label: "通讯地址", name: "Address", width: 100, align: "left" }, + { label: "手机号码", name: "Mobile", width: 100, align: "left" }, + { label: "个人简历", name: "Resume", width: 100, align: "left" }, + { label: "奖惩情况", name: "RandP", width: 100, align: "left" }, + { label: "近三年年度考核情况", name: "Triennium", width: 100, align: "left" }, + { + label: "附件", name: "FilePath", width: 500, align: "center", + formatterAsync: function (callback, value, row, op, $cell) { + $.ajax({ + url: '/LR_SystemModule/Annexes/GetAnnexesFileList', + data: { folderId: value }, + type: 'GET', + dataType: "json", + async: false, + cache: false, + success: function (res) { + var bb = ''; + $.each(res.data, function (i, item) { + bb += item.F_FileName.substring(0, item.F_FileName.indexOf(".")) + ',' + }) + //$.each(res.data, function(i, item) { + // bb += '' + + // item.F_FileName.substring(0,item.F_FileName.indexOf(".")) + + // ',   '; + //}) + callback(bb); + } + }); + } + }, ], - mainId:'ID', + mainId: 'ID', isPage: true }); page.search(); }, search: function (param) { param = param || {}; - $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; refreshGirdData = function () { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/RecruiterPeopleApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/RecruiterPeopleApi.cs index 0806d81ae..57d09d5c6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/RecruiterPeopleApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/RecruiterPeopleApi.cs @@ -166,6 +166,22 @@ namespace Learun.Application.WebApi { var model = this.GetReqData(); WorkStaffEntity entity = model.strEntity.ToObject(); + var models = workStaffIBLL.GetIDCard(entity.IdentityCardNo); + + if (string.IsNullOrEmpty(models.ID)) + { + if (model != null) + { + return Fail("身份证号已存在!"); + } + } + else + { + if (model != null && models.ID != entity.ID) + { + return Fail("身份证号已存在!"); + } + } workStaffIBLL.SaveEntity(model.keyValue, entity, entity.WorkStaffSonEntities); return Success("保存成功!"); } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/WorkStaff/WorkStaffBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/WorkStaff/WorkStaffBLL.cs index c7b812501..a5b64b83f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/WorkStaff/WorkStaffBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/WorkStaff/WorkStaffBLL.cs @@ -66,7 +66,29 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } - + /// + /// 获取WorkStaff表实体数据 + /// + /// 主键 + /// + public WorkStaffEntity GetIDCard(string keyValue) + { + try + { + return workStaffService.GetIDCard(keyValue); + } + 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/WorkStaff/WorkStaffEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/WorkStaff/WorkStaffEntity.cs index 040fdfc15..e5e4599a7 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/WorkStaff/WorkStaffEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/WorkStaff/WorkStaffEntity.cs @@ -36,6 +36,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration [Column("HEAD")] public string Head { get; set; } /// + /// 身份证号 + /// + [Column("IDENTITYCARDNO")] + public string IdentityCardNo { get; set; } + /// /// 民族 /// [Column("NATIONALITY")] @@ -86,10 +91,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration [Column("TIMEEDUCATION")] public string TimeEducation { get; set; } /// - /// 毕业院校系及专业 + /// 毕业院校 /// - [Column("T_SCHOOLMAJOR")] - public string T_SchoolMajor { get; set; } + [Column("T_SCHOOL")] + public string T_School { get; set; } + /// + /// 所学专业 + /// + [Column("T_MAJOR")] + public string T_Major { get; set; } + /// /// 在职教育 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/WorkStaff/WorkStaffIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/WorkStaff/WorkStaffIBLL.cs index 4375cdf6d..c3bb9b007 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/WorkStaff/WorkStaffIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/WorkStaff/WorkStaffIBLL.cs @@ -27,6 +27,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 主键 /// WorkStaffEntity GetWorkStaffEntity(string keyValue); + /// + /// 获取WorkStaff表实体数据 + /// + /// 主键 + /// + WorkStaffEntity GetIDCard(string keyValue); #endregion #region 提交数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/WorkStaff/WorkStaffService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/WorkStaff/WorkStaffService.cs index 6a843b242..3d323e818 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/WorkStaff/WorkStaffService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/WorkStaff/WorkStaffService.cs @@ -91,6 +91,29 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + /// + /// 获取WorkStaff表实体数据 + /// + /// 主键 + /// + public WorkStaffEntity GetIDCard(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } #endregion #region 提交数据