|
|
@@ -395,15 +395,39 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration |
|
|
|
/// </summary> |
|
|
|
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<StuInfoBasicEntity>(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; |
|
|
|