|
|
@@ -42,12 +42,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration |
|
|
|
var dp = new DynamicParameters(new { }); |
|
|
|
if (!queryParam["LeaveType"].IsEmpty()) |
|
|
|
{ |
|
|
|
dp.Add("LeaveType",queryParam["LeaveType"].ToString(), DbType.String); |
|
|
|
dp.Add("LeaveType", queryParam["LeaveType"].ToString(), DbType.String); |
|
|
|
strSql.Append(" AND t.LeaveType = @LeaveType "); |
|
|
|
} |
|
|
|
if (!queryParam["CheckStatus"].IsEmpty()) |
|
|
|
{ |
|
|
|
dp.Add("CheckStatus",queryParam["CheckStatus"].ToString(), DbType.String); |
|
|
|
dp.Add("CheckStatus", queryParam["CheckStatus"].ToString(), DbType.String); |
|
|
|
strSql.Append(" AND t.CheckStatus = @CheckStatus "); |
|
|
|
} |
|
|
|
if (!queryParam["StuNo"].IsEmpty()) |
|
|
@@ -93,7 +93,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration |
|
|
|
// strSql.Append(" ) "); |
|
|
|
// } |
|
|
|
//} |
|
|
|
return this.BaseRepository("CollegeMIS").FindList<StuLeaveManagementEntity>(strSql.ToString(),dp, pagination); |
|
|
|
return this.BaseRepository("CollegeMIS").FindList<StuLeaveManagementEntity>(strSql.ToString(), dp, pagination); |
|
|
|
} |
|
|
|
catch (Exception ex) |
|
|
|
{ |
|
|
@@ -168,7 +168,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration |
|
|
|
{ |
|
|
|
try |
|
|
|
{ |
|
|
|
this.BaseRepository("CollegeMIS").Delete<StuLeaveManagementEntity>(t=>t.Id == keyValue); |
|
|
|
this.BaseRepository("CollegeMIS").Delete<StuLeaveManagementEntity>(t => t.Id == keyValue); |
|
|
|
} |
|
|
|
catch (Exception ex) |
|
|
|
{ |
|
|
@@ -263,6 +263,35 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration |
|
|
|
} |
|
|
|
|
|
|
|
#endregion |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// 未销假次数 |
|
|
|
/// </summary> |
|
|
|
/// <param name="CreateUserNo"></param> |
|
|
|
/// <returns></returns> |
|
|
|
public int CreateUserNo(string CreateUserNo) |
|
|
|
{ |
|
|
|
try |
|
|
|
{ |
|
|
|
var HisTime = DateTime.Now.AddDays(-30); |
|
|
|
StringBuilder sb = new StringBuilder(); |
|
|
|
sb.Append(@"SELECT count(*) as num FROM StuLeaveManagement t |
|
|
|
left join StuCancelLeaveManagement t2 on t.Id=t2.LeaveId WHERE 1=1 and(t2.CheckStatus !=2 or t2.CheckStatus is null) |
|
|
|
and t.checktime <='" + DateTime.Now + "' and t.checktime >='" + HisTime + "' and t.CreateUserNo='" + CreateUserNo + "' "); |
|
|
|
var data = this.BaseRepository("CollegeMIS").FindList<StuLeaveManagementEntity>(sb.ToString()); |
|
|
|
if (data.Count() > 0) |
|
|
|
{ |
|
|
|
foreach (var item in data) |
|
|
|
{ |
|
|
|
return Convert.ToInt32(item.num); |
|
|
|
} |
|
|
|
} |
|
|
|
return 0; |
|
|
|
} |
|
|
|
catch (Exception e) |
|
|
|
{ |
|
|
|
Console.WriteLine(e); |
|
|
|
throw; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |