From 7c7b9179c6eb924910ac4b86465cb6340258dbb3 Mon Sep 17 00:00:00 2001 From: ndbs Date: Fri, 16 Sep 2022 14:14:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=A6=E7=94=9F=E6=AF=95=E4=B8=9A=E7=AE=A1?= =?UTF-8?q?=E7=90=86:=20=E6=8B=86=E5=88=86=E6=A1=A3=E6=A1=88=E5=85=B3?= =?UTF-8?q?=E7=B3=BB=E4=BA=8E=E7=BB=84=E7=BB=87=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/StuInfoBasicController.cs | 4 +- .../Views/StuInfoBasic/Graduate.js | 18 ++++-- .../StuInfoBasic/GraduateFileTransfer.cshtml | 6 +- .../StuInfoBasic/GraduateFileTransfer.js | 60 ++++++++++++++++--- .../StuInfoBasic/StuInfoBasicBLL.cs | 20 +++---- .../StuInfoBasic/StuInfoBasicEntity.cs | 16 ++++- .../StuInfoBasic/StuInfoBasicIBLL.cs | 2 +- .../StuInfoBasic/StuInfoBasicService.cs | 48 +++++++++++---- 8 files changed, 133 insertions(+), 41 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicController.cs index 3c31c9d9c..d779513c5 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicController.cs @@ -497,9 +497,9 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers [HttpPost] [AjaxOnly] - public ActionResult IsFileTransfer(string keyValue, string status) + public ActionResult IsFileTransfer(string keyValue, string status,string fort) { - stuInfoBasicIBLL.IsFileTransfer(keyValue, status); + stuInfoBasicIBLL.IsFileTransfer(keyValue, status, fort); return Success("操作成功"); } /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Graduate.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Graduate.js index 8f5d48af5..b0bf978c2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Graduate.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Graduate.js @@ -39,7 +39,7 @@ var bootstrap = function ($, learun) { }); $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); $('#FinishSchoolMark').lrselect({ - data: [{ text: "已毕业", value: "2" },{ text: "准许毕业", value: "1" }, { text: "待准许", value: "0" }], + data: [{ text: "已毕业", value: "2" }, { text: "准许毕业", value: "1" }, { text: "待准许", value: "0" }], text: "text", value: "value" }) @@ -47,12 +47,12 @@ var bootstrap = function ($, learun) { $('#lr_refresh').on('click', function () { location.reload(); }); - + //归档 $('#lr_store').on('click', function () { learun.layerConfirm('1.毕业生归档必须在6-8月份进行;
2.归档后的学生信息如:操行、奖惩、成绩、毕业证书等只有通过毕业生信息管理才能查询或打印;
3.毕业学生的账户将自动取消;
4.学生所占的床位也将自动退掉;
5.学生所在的班级置为已毕业班级;
6.归档操作后不可撤消,请谨慎操作!', function (res) { if (res) { - learun.httpAsync('post', top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/StuStore', { }, function () { + learun.httpAsync('post', top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/StuStore', {}, function () { refreshGirdData(); }); } @@ -176,11 +176,19 @@ var bootstrap = function ($, learun) { }, { label: "毕业证领取时间", name: "DiplomaReceiveDate", width: 130, align: "left" }, { - label: "档案与组织关系转出状态", name: "FileTransferStatus", width: 150, align: "left", formatter: function (cellvalue) { + label: "档案转出状态", name: "FileTransferStatus", width: 100, align: "left", + formatter: function (cellvalue) { + return cellvalue == "1" ? "已转出" : "未转出" + } + }, + { label: "档案转出时间", name: "FileTransferDate", width: 130, align: "left" }, + { + label: "组织关系转出状态", name: "TissueStatus", width: 110, align: "left", + formatter: function (cellvalue) { return cellvalue == "1" ? "已转出" : "未转出" } }, - { label: "档案与组织关系转出时间", name: "FileTransferDate", width: 150, align: "left" }, + { label: "组织关系转出时间", name: "TissueDate", width: 130, align: "left" } ], mainId: 'StuId', isPage: true, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/GraduateFileTransfer.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/GraduateFileTransfer.cshtml index bee2196c7..28b483019 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/GraduateFileTransfer.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/GraduateFileTransfer.cshtml @@ -49,8 +49,10 @@ diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/GraduateFileTransfer.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/GraduateFileTransfer.js index f2001f724..8405fcd53 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/GraduateFileTransfer.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/GraduateFileTransfer.js @@ -47,7 +47,7 @@ var bootstrap = function ($, learun) { $('#lr_refresh').on('click', function () { location.reload(); }); - //档案与组织关系转出 + //档案关系转出 $('#lr_filetransfer').on('click', function () { var keyValue = $('#gridtable').jfGridValue('StuId'); var FileTransferStatus = $('#gridtable').jfGridValue('FileTransferStatus'); @@ -55,16 +55,16 @@ var bootstrap = function ($, learun) { if (FileTransferStatus.indexOf('1') != -1) { return learun.alert.warning("选中项包括已转出数据!"); } - learun.layerConfirm('是否确认转出档案与组织关系!', function (res) { + learun.layerConfirm('是否确认转出档案关系!', function (res) { if (res) { - learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/IsFileTransfer', { keyValue: keyValue, status: '1' }, function () { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/IsFileTransfer', { keyValue: keyValue, status: '1', fort: '0' }, function () { refreshGirdData(); }); } }); } }) - //取消档案与组织关系转出 + //取消档案关系转出 $('#lr_cancelfiletransfer').on('click', function () { var keyValue = $('#gridtable').jfGridValue('StuId'); var FileTransferStatus = $('#gridtable').jfGridValue('FileTransferStatus'); @@ -74,9 +74,45 @@ var bootstrap = function ($, learun) { return learun.alert.warning("选中项包括未转出数据!"); } } - learun.layerConfirm('是否确认取消转出档案与组织关系!', function (res) { + learun.layerConfirm('是否确认取消转出档案关系!', function (res) { if (res) { - learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/IsFileTransfer', { keyValue: keyValue, status: '0' }, function () { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/IsFileTransfer', { keyValue: keyValue, status: '0', fort: '0' }, function () { + refreshGirdData(); + }); + } + }); + } + }) + //组织关系转出 + $('#lr_Tissue').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('StuId'); + var FileTransferStatus = $('#gridtable').jfGridValue('TissueStatus'); + if (learun.checkrow(keyValue)) { + if (FileTransferStatus.indexOf('1') != -1) { + return learun.alert.warning("选中项包括已转出数据!"); + } + learun.layerConfirm('是否确认转出组织关系!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/IsFileTransfer', { keyValue: keyValue, status: '1', fort: '1' }, function () { + refreshGirdData(); + }); + } + }); + } + }) + //取消组织关系转出 + $('#lr_cancelTissue').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('StuId'); + var FileTransferStatus = $('#gridtable').jfGridValue('TissueStatus'); + if (learun.checkrow(keyValue)) { + for (var i = 0; i < FileTransferStatus.split(',').length; i++) { + if (FileTransferStatus.split(',')[i] != 1) { + return learun.alert.warning("选中项包括未转出数据!"); + } + } + learun.layerConfirm('是否确认取消转出组织关系!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/IsFileTransfer', { keyValue: keyValue, status: '0', fort: '1' }, function () { refreshGirdData(); }); } @@ -165,11 +201,19 @@ var bootstrap = function ($, learun) { }, { label: "毕业时间", name: "FinishSchoolDate", width: 130, align: "left" }, { - label: "档案与组织关系转出状态", name: "FileTransferStatus", width: 150, align: "left", formatter: function (cellvalue) { + label: "档案转出状态", name: "FileTransferStatus", width: 100, align: "left", + formatter: function (cellvalue) { + return cellvalue == "1" ? "已转出" : "未转出" + } + }, + { label: "档案转出时间", name: "FileTransferDate", width: 130, align: "left" }, + { + label: "组织关系转出状态", name: "TissueStatus", width: 110, align: "left", + formatter: function (cellvalue) { return cellvalue == "1" ? "已转出" : "未转出" } }, - { label: "档案与组织关系转出时间", name: "FileTransferDate", width: 100, align: "left" }, + { label: "组织关系转出时间", name: "TissueDate", width: 130, align: "left" }, ], mainId: 'StuId', isPage: true, diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicBLL.cs index b643bbb5a..af294f537 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicBLL.cs @@ -91,11 +91,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 根据专业顺序生成毕业证号 /// /// - public void CreateGraduateNoByMajor(string CityCode,string SchoolCode,string MajorList) + public void CreateGraduateNoByMajor(string CityCode, string SchoolCode, string MajorList) { try { - stuInfoBasicService.CreateGraduateNoByMajor(CityCode,SchoolCode,MajorList); + stuInfoBasicService.CreateGraduateNoByMajor(CityCode, SchoolCode, MajorList); } catch (Exception ex) { @@ -247,8 +247,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } - - + + #endregion @@ -398,11 +398,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 主键 /// /// - public void GetCard(string keyValue,string status) + public void GetCard(string keyValue, string status) { try { - stuInfoBasicService.GetCard(keyValue,status); + stuInfoBasicService.GetCard(keyValue, status); } catch (Exception ex) { @@ -536,11 +536,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 主键 /// /// - public void IsFileTransfer(string keyValue, string status) + public void IsFileTransfer(string keyValue, string status, string fort) { try { - stuInfoBasicService.IsFileTransfer(keyValue, status); + stuInfoBasicService.IsFileTransfer(keyValue, status, fort); } catch (Exception ex) { @@ -602,11 +602,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// /// 准许毕业 /// - public void AllowGraduate(string stuNo,string status) + public void AllowGraduate(string stuNo, string status) { try { - stuInfoBasicService.AllowGraduate(stuNo,status); + stuInfoBasicService.AllowGraduate(stuNo, status); } catch (Exception ex) { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicEntity.cs index a91cc5a86..99cc714b8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicEntity.cs @@ -873,17 +873,29 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration [Column("DIPLOMARECEIVEDATE")] public DateTime? DiplomaReceiveDate { get; set; } /// - /// 档案与组织关系转出状态 + /// 档案关系转出状态 /// /// [Column("FILETRANSFERSTATUS")] public string FileTransferStatus { get; set; } /// - /// 档案与组织关系转出状态时间 + /// 档案关系转出状态时间 /// /// [Column("FILETRANSFERDATE")] public DateTime? FileTransferDate { get; set; } + /// + /// 组织关系转出状态 + /// + /// + [Column("TISSUESTATUS")] + public string TissueStatus { get; set; } + /// + /// 组织关系转出状态时间 + /// + /// + [Column("TISSUEDATE")] + public DateTime? TissueDate { get; set; } #endregion #region 扩展操作 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicIBLL.cs index 1ca1bb039..e9201ee79 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicIBLL.cs @@ -90,7 +90,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 档案与组织关系转出 /// /// - void IsFileTransfer(string keyValue, string status); + void IsFileTransfer(string keyValue, string status,string fort); void StuStore(); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs index dd29b2fe6..c126dcd57 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs @@ -569,7 +569,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration this.BaseRepository().Insert(annexEntity); } } - + } } catch (Exception ex) @@ -948,7 +948,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 主键 /// /// - public void IsFileTransfer(string keyValue, string status) + public void IsFileTransfer(string keyValue, string status, string fort) { var db = this.BaseRepository("CollegeMIS").BeginTrans(); try @@ -959,12 +959,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration var keyValueArr = keyValue.Split(','); foreach (var item in keyValueArr) { - var sql = $"UPDATE StuInfoBasic SET FileTransferStatus='{status}',FileTransferDate='{now}' WHERE StuId='{item}'"; - db.ExecuteBySql(sql); + if (fort == "0") + { + //档案 + var sql = $"UPDATE StuInfoBasic SET FileTransferStatus='{status}',FileTransferDate='{now}' WHERE StuId='{item}'"; + db.ExecuteBySql(sql); - //判断离校手续是否全办完 且 毕业状态为准许毕业,若同时满足则修改毕业状态为已毕业和毕业时间; - var sql2 = $"update StuInfoBasic set FinishSchoolMark='2',FinishSchoolDate='{now}' where StuId='{item}' and FinishSchoolMark='1' and ReturnBooksStatus='1' and EmployAgreeStatus='1' and FeeSettleStatus='1' and CheckOutStatus='1' and CardDeregistrateStatus='1' and DiplomaReceiveStatus='1' "; - db.ExecuteBySql(sql2); + //判断离校手续是否全办完 且 毕业状态为准许毕业,若同时满足则修改毕业状态为已毕业和毕业时间; + var sql2 = $"update StuInfoBasic set FinishSchoolMark='2',FinishSchoolDate='{now}' where StuId='{item}' and FinishSchoolMark='1' and ReturnBooksStatus='1' and EmployAgreeStatus='1' and FeeSettleStatus='1' and CheckOutStatus='1' and CardDeregistrateStatus='1' and DiplomaReceiveStatus='1' and TissueStatus='1'"; + db.ExecuteBySql(sql2); + } + else + { + //组织 + var sql1 = $"UPDATE StuInfoBasic SET TissueStatus='{status}',TissueDate='{now}' WHERE StuId='{item}'"; + db.ExecuteBySql(sql1); + + //判断离校手续是否全办完 且 毕业状态为准许毕业,若同时满足则修改毕业状态为已毕业和毕业时间; + var sql2 = $"update StuInfoBasic set FinishSchoolMark='2',FinishSchoolDate='{now}' where StuId='{item}' and FinishSchoolMark='1' and ReturnBooksStatus='1' and EmployAgreeStatus='1' and FeeSettleStatus='1' and CheckOutStatus='1' and CardDeregistrateStatus='1' and DiplomaReceiveStatus='1' and FileTransferStatus= '1'"; + db.ExecuteBySql(sql2); + } + + ////判断离校手续是否全办完 且 毕业状态为准许毕业,若同时满足则修改毕业状态为已毕业和毕业时间; + //var sql2 = $"update StuInfoBasic set FinishSchoolMark='2',FinishSchoolDate='{now}' where StuId='{item}' and FinishSchoolMark='1' and ReturnBooksStatus='1' and EmployAgreeStatus='1' and FeeSettleStatus='1' and CheckOutStatus='1' and CardDeregistrateStatus='1' and DiplomaReceiveStatus='1' "; + //db.ExecuteBySql(sql2); } } else @@ -973,8 +991,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration var keyValueArr = keyValue.Split(','); foreach (var item in keyValueArr) { - var sql = $"UPDATE StuInfoBasic SET FileTransferStatus='{status}',FileTransferDate=null WHERE StuId='{item}'"; - db.ExecuteBySql(sql); + if (fort == "0") + { + var sql = $"UPDATE StuInfoBasic SET FileTransferStatus='{status}',FileTransferDate=null WHERE StuId='{item}'"; + db.ExecuteBySql(sql); + } + else + { + var sql1 = $"UPDATE StuInfoBasic SET TissueStatus='{status}',TissueDate=null WHERE StuId='{item}'"; + db.ExecuteBySql(sql1); + } //判断毕业状态是否为已毕业,若是,则毕业状态修改为准许毕业,毕业时间为空; var sql2 = $"UPDATE StuInfoBasic SET FinishSchoolMark='1',FinishSchoolDate=null WHERE StuId='{item}' and FinishSchoolMark='2' "; @@ -1140,8 +1166,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration FieldName = columnName, UpdateBy = loginUser.userId, UpdateTime = DateTime.Now, - StuChangeType="09", - StuChangeRemark="点击学籍信息管理-修改按钮进行操作" + StuChangeType = "09", + StuChangeRemark = "点击学籍信息管理-修改按钮进行操作" }; changeEntity.Create(); list.Add(changeEntity);