From 3288bf8d9463fe04e99c3a428fc87bf636434859 Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Mon, 22 Aug 2022 14:20:18 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91?= =?UTF-8?q?=E5=8A=9E=E7=90=86=E7=A6=BB=E6=A0=A1=E6=89=8B=E7=BB=AD=EF=BC=9A?= =?UTF-8?q?=E6=AF=8F=E4=B8=AA=E9=A1=B5=E9=9D=A2=E5=8F=96=E6=B6=88=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E7=9A=84=E4=BC=98=E5=8C=96=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/StuInfoBasic/GraduateCardDeregistrate.js | 6 ++++++ .../Views/StuInfoBasic/GraduateCheckOut.js | 6 ++++++ .../Views/StuInfoBasic/GraduateDiplomaReceive.js | 6 ++++++ .../Views/StuInfoBasic/GraduateEmployAgree.js | 6 ++++++ .../Views/StuInfoBasic/GraduateFeeSettle.js | 6 ++++++ .../Views/StuInfoBasic/GraduateFileTransfer.js | 6 ++++++ .../Views/StuInfoBasic/GraduateReturnBooks.js | 6 ++++++ 7 files changed, 42 insertions(+) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/GraduateCardDeregistrate.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/GraduateCardDeregistrate.js index a398dc727..21899f1ff 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/GraduateCardDeregistrate.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/GraduateCardDeregistrate.js @@ -67,7 +67,13 @@ var bootstrap = function ($, learun) { //取消校园卡注销 $('#lr_cancelcardderegistrate').on('click', function () { var keyValue = $('#gridtable').jfGridValue('StuId'); + var CardDeregistrateStatus = $('#gridtable').jfGridValue('CardDeregistrateStatus'); if (learun.checkrow(keyValue)) { + for (var i = 0; i < CardDeregistrateStatus.split(',').length; i++) { + if (CardDeregistrateStatus.split(',')[i] != 1) { + return learun.alert.warning("选中项包括未注销数据!"); + } + } learun.layerConfirm('是否确认取消注销校园卡!', function (res) { if (res) { learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/IsCardDeregistrate', { keyValue: keyValue, status: '0' }, function () { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/GraduateCheckOut.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/GraduateCheckOut.js index 76d50f9b5..47c0d2308 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/GraduateCheckOut.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/GraduateCheckOut.js @@ -67,7 +67,13 @@ var bootstrap = function ($, learun) { //取消办理退住手续 $('#lr_cancelcheckout').on('click', function () { var keyValue = $('#gridtable').jfGridValue('StuId'); + var CheckOutStatus = $('#gridtable').jfGridValue('CheckOutStatus'); if (learun.checkrow(keyValue)) { + for (var i = 0; i < CheckOutStatus.split(',').length; i++) { + if (CheckOutStatus.split(',')[i] != 1) { + return learun.alert.warning("选中项包括未办理退住数据!"); + } + } learun.layerConfirm('是否确认取消办理退住手续!', function (res) { if (res) { learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/IsCheckOut', { keyValue: keyValue, status: '0' }, function () { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/GraduateDiplomaReceive.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/GraduateDiplomaReceive.js index bb62c012f..c40319e8f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/GraduateDiplomaReceive.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/GraduateDiplomaReceive.js @@ -67,7 +67,13 @@ var bootstrap = function ($, learun) { //取消毕业证领取 $('#lr_cancelgetcard').on('click', function () { var keyValue = $('#gridtable').jfGridValue('StuId'); + var DiplomaReceiveStatus = $('#gridtable').jfGridValue('DiplomaReceiveStatus'); if (learun.checkrow(keyValue)) { + for (var i = 0; i < DiplomaReceiveStatus.split(',').length; i++) { + if (DiplomaReceiveStatus.split(',')[i] != 1) { + return learun.alert.warning("选中项包括未领取数据!"); + } + } learun.layerConfirm('是否确认取消领取毕业证!', function (res) { if (res) { learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetCard', { keyValue: keyValue, status: '0' }, function () { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/GraduateEmployAgree.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/GraduateEmployAgree.js index 95917e329..2da57c622 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/GraduateEmployAgree.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/GraduateEmployAgree.js @@ -67,7 +67,13 @@ var bootstrap = function ($, learun) { //取消就业协议备案 $('#lr_cancelemployagree').on('click', function () { var keyValue = $('#gridtable').jfGridValue('StuId'); + var EmployAgreeStatus = $('#gridtable').jfGridValue('EmployAgreeStatus'); if (learun.checkrow(keyValue)) { + for (var i = 0; i < EmployAgreeStatus.split(',').length; i++) { + if (EmployAgreeStatus.split(',')[i] != 1) { + return learun.alert.warning("选中项包括未备案数据!"); + } + } learun.layerConfirm('是否确认取消备案就业协议!', function (res) { if (res) { learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/IsEmployAgree', { keyValue: keyValue, status: '0' }, function () { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/GraduateFeeSettle.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/GraduateFeeSettle.js index e32d8896a..ab806d828 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/GraduateFeeSettle.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/GraduateFeeSettle.js @@ -67,7 +67,13 @@ var bootstrap = function ($, learun) { //取消学杂费结算 $('#lr_cancelfeesettle').on('click', function () { var keyValue = $('#gridtable').jfGridValue('StuId'); + var FeeSettleStatus = $('#gridtable').jfGridValue('FeeSettleStatus'); if (learun.checkrow(keyValue)) { + for (var i = 0; i < FeeSettleStatus.split(',').length; i++) { + if (FeeSettleStatus.split(',')[i] != 1) { + return learun.alert.warning("选中项包括未结算数据!"); + } + } learun.layerConfirm('是否确认取消结算学杂费!', function (res) { if (res) { learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/IsFeeSettle', { keyValue: keyValue, status: '0' }, function () { 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 67eaf8261..f2001f724 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 @@ -67,7 +67,13 @@ var bootstrap = function ($, learun) { //取消档案与组织关系转出 $('#lr_cancelfiletransfer').on('click', function () { var keyValue = $('#gridtable').jfGridValue('StuId'); + var FileTransferStatus = $('#gridtable').jfGridValue('FileTransferStatus'); 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' }, function () { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/GraduateReturnBooks.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/GraduateReturnBooks.js index cc5d20685..bfe5f5e4d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/GraduateReturnBooks.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/GraduateReturnBooks.js @@ -67,7 +67,13 @@ var bootstrap = function ($, learun) { //取消图书资料归还 $('#lr_cancelreturnbooks').on('click', function () { var keyValue = $('#gridtable').jfGridValue('StuId'); + var ReturnBooksStatus = $('#gridtable').jfGridValue('ReturnBooksStatus'); if (learun.checkrow(keyValue)) { + for (var i = 0; i < ReturnBooksStatus.split(',').length; i++) { + if (ReturnBooksStatus.split(',')[i] != 1) { + return learun.alert.warning("选中项包括未归还数据!"); + } + } learun.layerConfirm('是否确认取消归还图书资料!', function (res) { if (res) { learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/IsReturnBooks', { keyValue: keyValue, status: '0' }, function () { From d05cb44e2cad618ef81e0d4e0a9de67037d92298 Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Mon, 22 Aug 2022 15:01:54 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91?= =?UTF-8?q?=E6=AF=95=E4=B8=9A=E8=AF=81=E8=B5=84=E6=A0=BC=E5=AE=A1=E6=A0=B8?= =?UTF-8?q?=EF=BC=9A=E5=87=86=E8=AE=B8=E3=80=81=E4=B8=8D=E5=87=86=E6=AF=95?= =?UTF-8?q?=E4=B8=9A=E6=8C=89=E9=92=AE=E5=AE=8C=E5=96=84=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../StuInfoBasic/StuInfoBasicService.cs | 28 +++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) 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 2613e4335..d71341038 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 @@ -395,15 +395,39 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// public void AllowGraduate(string stuNo, string status) { + var db = this.BaseRepository("CollegeMIS").BeginTrans(); try { - var list = stuNo.Split(',').ToList().Select(a => "'" + a + "'"); var stulist = string.Join(",", list); - this.BaseRepository("CollegeMIS").ExecuteBySql($"UPDATE dbo.StuInfoBasic SET FinishSchoolMark ='{status}' WHERE StuNo in({stulist})"); + + if (status == "1")//准许毕业 + { + //判断离校手续是否全办完,若满足则修改毕业状态为已毕业和毕业时间,若不满足则修改毕业状态为准许毕业; + foreach (var item in stuNo.Split(',')) + { + var itementity = db.FindEntity(x => x.StuNo == item); + if (itementity.ReturnBooksStatus == "1" && itementity.EmployAgreeStatus == "1" && itementity.FeeSettleStatus == "1" && itementity.CheckOutStatus == "1" && itementity.CardDeregistrateStatus == "1" && itementity.DiplomaReceiveStatus == "1" && itementity.FileTransferStatus == "1") + { + db.ExecuteBySql($"UPDATE dbo.StuInfoBasic SET FinishSchoolMark ='2',FinishSchoolDate='" + DateTime.Now + "' WHERE StuNo='" + item + "' "); + } + else + { + db.ExecuteBySql($"UPDATE dbo.StuInfoBasic SET FinishSchoolMark ='{status}',FinishSchoolDate=null WHERE StuNo='" + item + "' "); + } + } + } + else//不准毕业 + { + //毕业状态修改为不准毕业,毕业时间为空; + db.ExecuteBySql($"UPDATE dbo.StuInfoBasic SET FinishSchoolMark ='{status}',FinishSchoolDate=null WHERE StuNo in({stulist})"); + } + + db.Commit(); } catch (Exception ex) { + db.Rollback(); if (ex is ExceptionEx) { throw;