@@ -119,6 +119,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
public ActionResult GetFormData(string keyValue) | public ActionResult GetFormData(string keyValue) | ||||
{ | { | ||||
var StuLeaveManagementData = stuLeaveManagementIBLL.GetStuLeaveManagementEntity(keyValue); | var StuLeaveManagementData = stuLeaveManagementIBLL.GetStuLeaveManagementEntity(keyValue); | ||||
StuLeaveManagementData.num = stuLeaveManagementIBLL.Num(StuLeaveManagementData.CreateUserNo); | |||||
var jsonData = new | var jsonData = new | ||||
{ | { | ||||
StuLeaveManagement = StuLeaveManagementData, | StuLeaveManagement = StuLeaveManagementData, | ||||
@@ -136,6 +137,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
public ActionResult GetFormDataByProcessId(string processId) | public ActionResult GetFormDataByProcessId(string processId) | ||||
{ | { | ||||
var StuLeaveManagementData = stuLeaveManagementIBLL.GetEntityByProcessId(processId); | var StuLeaveManagementData = stuLeaveManagementIBLL.GetEntityByProcessId(processId); | ||||
StuLeaveManagementData.num = stuLeaveManagementIBLL.Num(StuLeaveManagementData.CreateUserNo); | |||||
var jsonData = new | var jsonData = new | ||||
{ | { | ||||
StuLeaveManagement = StuLeaveManagementData, | StuLeaveManagement = StuLeaveManagementData, | ||||
@@ -15,9 +15,13 @@ | |||||
<div class="lr-form-item-title">返校时间<font face="宋体">*</font></div> | <div class="lr-form-item-title">返校时间<font face="宋体">*</font></div> | ||||
<input id="EndTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ minDate:'#F{$dp.$D(\'StartTime\')}',dateFmt:'yyyy-MM-dd HH:mm:ss',onpicked: function () { $('#EndTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | <input id="EndTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ minDate:'#F{$dp.$D(\'StartTime\')}',dateFmt:'yyyy-MM-dd HH:mm:ss',onpicked: function () { $('#EndTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="StuLeaveManagement"> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuLeaveManagement"> | |||||
<div class="lr-form-item-title">请假天数<font face="宋体">*</font></div> | <div class="lr-form-item-title">请假天数<font face="宋体">*</font></div> | ||||
<input id="LeaveDay" type="text" class="form-control" isvalid="yes" checkexpession="PositiveFloatint" /> | |||||
<input id="LeaveDay" type="number" class="form-control" isvalid="yes" checkexpession="PositiveFloatint" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuLeaveManagement"> | |||||
<div class="lr-form-item-title">未销假次数</div> | |||||
<input id="num" readonly type="text" class="form-control" /> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="StuLeaveManagement"> | <div class="col-xs-12 lr-form-item" data-table="StuLeaveManagement"> | ||||
<div class="lr-form-item-title">附件上传</div> | <div class="lr-form-item-title">附件上传</div> | ||||
@@ -15,10 +15,14 @@ | |||||
<div class="lr-form-item-title">返校时间<font face="宋体">*</font></div> | <div class="lr-form-item-title">返校时间<font face="宋体">*</font></div> | ||||
<input id="EndTime" readonly type="text" class="form-control lr-input-wdatepicker" isvalid="yes" checkexpession="NotNull" /> | <input id="EndTime" readonly type="text" class="form-control lr-input-wdatepicker" isvalid="yes" checkexpession="NotNull" /> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="StuLeaveManagement"> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuLeaveManagement"> | |||||
<div class="lr-form-item-title">请假天数<font face="宋体">*</font></div> | <div class="lr-form-item-title">请假天数<font face="宋体">*</font></div> | ||||
<input id="LeaveDay" readonly type="text" class="form-control" isvalid="yes" checkexpession="PositiveFloatint" /> | <input id="LeaveDay" readonly type="text" class="form-control" isvalid="yes" checkexpession="PositiveFloatint" /> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="StuLeaveManagement"> | |||||
<div class="lr-form-item-title">未销假次数</div> | |||||
<input id="num" readonly type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuLeaveManagement"> | <div class="col-xs-12 lr-form-item" data-table="StuLeaveManagement"> | ||||
<div class="lr-form-item-title">附件上传</div> | <div class="lr-form-item-title">附件上传</div> | ||||
<div id="Files" readonly></div> | <div id="Files" readonly></div> | ||||
@@ -190,6 +190,27 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
#endregion | #endregion | ||||
/// <summary> | |||||
/// 未销假实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
public int Num(string CreateUserNo) | |||||
{ | |||||
try | |||||
{ | |||||
return stuLeaveManagementService.CreateUserNo(CreateUserNo); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
} | } | ||||
} | } |
@@ -126,6 +126,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
public string ClassDiredctorNo { get; set; } | public string ClassDiredctorNo { get; set; } | ||||
[NotMapped] | [NotMapped] | ||||
public string ClassTutorNo { get; set; } | public string ClassTutorNo { get; set; } | ||||
[NotMapped] | |||||
public int? num { get; set; } | |||||
#endregion | #endregion | ||||
} | } | ||||
} | } | ||||
@@ -63,5 +63,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
void ChangeStatusByProcessId(string status, string processId, string userId); | void ChangeStatusByProcessId(string status, string processId, string userId); | ||||
#endregion | #endregion | ||||
int Num(string CreateUserNo); | |||||
} | } | ||||
} | } |
@@ -42,12 +42,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
var dp = new DynamicParameters(new { }); | var dp = new DynamicParameters(new { }); | ||||
if (!queryParam["LeaveType"].IsEmpty()) | 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 "); | strSql.Append(" AND t.LeaveType = @LeaveType "); | ||||
} | } | ||||
if (!queryParam["CheckStatus"].IsEmpty()) | 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 "); | strSql.Append(" AND t.CheckStatus = @CheckStatus "); | ||||
} | } | ||||
if (!queryParam["StuNo"].IsEmpty()) | if (!queryParam["StuNo"].IsEmpty()) | ||||
@@ -93,7 +93,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
// strSql.Append(" ) "); | // 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) | catch (Exception ex) | ||||
{ | { | ||||
@@ -168,7 +168,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
this.BaseRepository("CollegeMIS").Delete<StuLeaveManagementEntity>(t=>t.Id == keyValue); | |||||
this.BaseRepository("CollegeMIS").Delete<StuLeaveManagementEntity>(t => t.Id == keyValue); | |||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||
@@ -263,6 +263,35 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
#endregion | #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; | |||||
} | |||||
} | |||||
} | } | ||||
} | } |