@@ -392,7 +392,20 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
}; | }; | ||||
return Success(jsonData); | return Success(jsonData); | ||||
} | } | ||||
/// <summary> | |||||
/// | |||||
/// </summary> | |||||
/// <param name="queryJson"></param> | |||||
/// <param name="type">1:军训管理;2:学费管理</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetMilitaryStatistics(string queryJson,int type) | |||||
{ | |||||
var result = stuEnrollIBLL.GetMilitaryStatistics(queryJson, type); | |||||
return Success(result); | |||||
} | |||||
[HttpGet] | [HttpGet] | ||||
[AjaxOnly] | [AjaxOnly] | ||||
public ActionResult GetDormitorys(string pagination, string queryJson) | public ActionResult GetDormitorys(string pagination, string queryJson) | ||||
@@ -550,14 +563,6 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
} | } | ||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult GetMilitaryStatistics(string DeptNo, string MajorNo, string ClassNo) | |||||
{ | |||||
var result = stuEnrollIBLL.GetMilitaryStatistics(DeptNo, MajorNo, ClassNo); | |||||
return Success(result); | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 获取左侧树形数据 | /// 获取左侧树形数据 | ||||
@@ -57,7 +57,7 @@ | |||||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | <a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | ||||
</div> | </div> | ||||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | <div class=" btn-group btn-group-sm" learun-authorize="yes"> | ||||
<a id="lr_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查看</a> | |||||
<a id="lr_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查看流程进度</a> | |||||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | <a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | ||||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i> 提交</a> | <a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i> 提交</a> | ||||
@@ -67,7 +67,7 @@ var bootstrap = function ($, learun) { | |||||
width: 600, | width: 600, | ||||
height: 400, | height: 400, | ||||
callBack: function (id) { | callBack: function (id) { | ||||
top[id].save(); | |||||
top[id].save(); | |||||
return refreshGirdData('', ''); | return refreshGirdData('', ''); | ||||
} | } | ||||
}); | }); | ||||
@@ -165,9 +165,16 @@ var bootstrap = function ($, learun) { | |||||
eye: function () { | eye: function () { | ||||
var processId = $('#gridtable').jfGridValue('SupportProcessId') || ''; | var processId = $('#gridtable').jfGridValue('SupportProcessId') || ''; | ||||
var title = $('#gridtable').jfGridValue('StuName'); | var title = $('#gridtable').jfGridValue('StuName'); | ||||
var SupportStatus = $('#gridtable').jfGridValue('SupportStatus'); | |||||
if (SupportStatus == '0') { | |||||
return learun.alert.warning('该项目暂无流程进度!'); | |||||
} | |||||
if (learun.checkrow(processId)) { | if (learun.checkrow(processId)) { | ||||
learun.frameTab.open({ F_ModuleId: 'monitor' + processId, F_FullName: '查看-' + title, F_UrlAddress: '/LR_NewWorkFlow/NWFProcess/MonitorDetailsIndex?processId=' + processId }); | |||||
learun.frameTab.open({ | |||||
F_ModuleId: 'monitor' + processId, | |||||
F_FullName: '查看-' + title, | |||||
F_UrlAddress: '/LR_NewWorkFlow/NWFProcess/MonitorDetailsIndex?processId=' + processId | |||||
}); | |||||
} | } | ||||
} | } | ||||
@@ -11,18 +11,18 @@ var bootstrap = function ($, learun) { | |||||
init: function () { | init: function () { | ||||
page.initGird(); | page.initGird(); | ||||
page.bind(); | page.bind(); | ||||
page.refreshMoney(); | |||||
//page.refreshMoney(); | |||||
}, | }, | ||||
bind: function () { | bind: function () { | ||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | ||||
page.refreshMoney(); | |||||
//page.refreshMoney(); | |||||
page.search(queryJson); | page.search(queryJson); | ||||
}, 380, 400); | }, 380, 400); | ||||
$("#IsMilitary").lrDataItemSelect({ code: "jyYewOrNot" }); | $("#IsMilitary").lrDataItemSelect({ code: "jyYewOrNot" }); | ||||
$('#Year').lrselect({ | $('#Year').lrselect({ | ||||
url:top.$.rootUrl+'/EducationalAdministration/StuEnroll/GetYearListByClass', | |||||
value:"year", | |||||
text:"year", | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetYearListByClass', | |||||
value: "year", | |||||
text: "year", | |||||
}) | }) | ||||
$('#DeptNo').lrselect({ | $('#DeptNo').lrselect({ | ||||
@@ -198,7 +198,7 @@ var bootstrap = function ($, learun) { | |||||
formatter: function (value, row) { | formatter: function (value, row) { | ||||
if (row.IsMilitary) { | if (row.IsMilitary) { | ||||
return '<span class=\"label label-success\">军训</span>'; | return '<span class=\"label label-success\">军训</span>'; | ||||
} else if (row.IsMilitary==false) { | |||||
} else if (row.IsMilitary == false) { | |||||
return '<span class=\"label label-warning\">不军训</span>'; | return '<span class=\"label label-warning\">不军训</span>'; | ||||
} else { | } else { | ||||
return "未处理"; | return "未处理"; | ||||
@@ -326,27 +326,34 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
page.search(); | page.search(); | ||||
}, | }, | ||||
refreshMoney: function () { | |||||
var deptNo = $("#DeptNo").lrselectGet(); | |||||
var majorNo = $("#MajorNo").lrselectGet(); | |||||
var classNo = $("#ClassNo").lrselectGet(); | |||||
$.post( | |||||
top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetMilitaryStatistics', | |||||
{ | |||||
DeptNo: deptNo, | |||||
MajorNo: majorNo, | |||||
ClassNo: classNo | |||||
}, | |||||
function (res) { | |||||
$("#allAmount").html(res.data.aa); | |||||
$("#isAmount").html(res.data.bb); | |||||
}, "json"); | |||||
refreshMoney: function (queryJson) { | |||||
learun.httpAsyncGetWithParam(top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetMilitaryStatistics', { queryJson: queryJson, type: 1 }, function (res) { | |||||
$("#allAmount").html(res.data.aa); | |||||
$("#isAmount").html(res.data.bb); | |||||
}); | |||||
//var deptNo = $("#DeptNo").lrselectGet(); | |||||
//var majorNo = $("#MajorNo").lrselectGet(); | |||||
//var classNo = $("#ClassNo").lrselectGet(); | |||||
//$.post( | |||||
// top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetMilitaryStatistics', | |||||
// { | |||||
// DeptNo: deptNo, | |||||
// MajorNo: majorNo, | |||||
// ClassNo: classNo | |||||
// }, | |||||
// function (res) { | |||||
// $("#allAmount").html(res.data.aa); | |||||
// $("#isAmount").html(res.data.bb); | |||||
// }, "json"); | |||||
}, | }, | ||||
search: function (param) { | search: function (param) { | ||||
param = param || {}; | param = param || {}; | ||||
param.SqlParameter = ' AND IsReport=1'; | param.SqlParameter = ' AND IsReport=1'; | ||||
param.Grade = "20"; | |||||
//param.Grade = "20"; | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | ||||
page.refreshMoney(JSON.stringify(param)); | |||||
} | } | ||||
}; | }; | ||||
refreshGirdData = function () { | refreshGirdData = function () { | ||||
@@ -11,12 +11,12 @@ var bootstrap = function ($, learun) { | |||||
init: function () { | init: function () { | ||||
page.initGird(); | page.initGird(); | ||||
page.bind(); | page.bind(); | ||||
page.refreshMoney(); | |||||
//page.refreshMoney(); | |||||
}, | }, | ||||
bind: function () { | bind: function () { | ||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | ||||
page.search(queryJson); | page.search(queryJson); | ||||
page.refreshMoney(); | |||||
//page.refreshMoney(); | |||||
}, 380, 400); | }, 380, 400); | ||||
$("#IsSubsidize1").lrDataItemSelect({ code: "jyYewOrNot" }); | $("#IsSubsidize1").lrDataItemSelect({ code: "jyYewOrNot" }); | ||||
$('#Year').lrselect({ | $('#Year').lrselect({ | ||||
@@ -400,27 +400,30 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
page.search(); | page.search(); | ||||
}, | }, | ||||
refreshMoney: function () { | |||||
var deptNo = $("#DeptNo").lrselectGet(); | |||||
var majorNo = $("#MajorNo").lrselectGet(); | |||||
var classNo = $("#ClassNo").lrselectGet(); | |||||
$.post( | |||||
top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetHelpStatistics', | |||||
{ | |||||
DeptNo: deptNo, | |||||
MajorNo: majorNo, | |||||
ClassNo: classNo | |||||
}, | |||||
function (res) { | |||||
$("#allAmount").html(res.data.aa); | |||||
$("#isAmount").html(res.data.bb); | |||||
}, "json"); | |||||
refreshMoney: function (queryJson) { | |||||
learun.httpAsyncGetWithParam(top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetMilitaryStatistics', { queryJson: queryJson,type:2 }, function (res) { | |||||
console.log(res); | |||||
$("#allAmount").html(res.data.aa); | |||||
$("#isAmount").html(res.data.bb); | |||||
}); | |||||
//$.post( | |||||
// top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetHelpStatistics', | |||||
// { | |||||
// DeptNo: deptNo, | |||||
// MajorNo: majorNo, | |||||
// ClassNo: classNo | |||||
// }, | |||||
// function (res) { | |||||
// $("#allAmount").html(res.data.aa); | |||||
// $("#isAmount").html(res.data.bb); | |||||
// }, "json"); | |||||
}, | }, | ||||
search: function (param) { | search: function (param) { | ||||
param = param || {}; | param = param || {}; | ||||
param.SqlParameter = ' AND IsReport=1'; | param.SqlParameter = ' AND IsReport=1'; | ||||
param.Grade = "20"; | |||||
//param.Grade = "20"; | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | ||||
page.refreshMoney(JSON.stringify(param)); | |||||
} | } | ||||
}; | }; | ||||
refreshGirdData = function () { | refreshGirdData = function () { | ||||
@@ -240,11 +240,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
} | } | ||||
public object GetMilitaryStatistics(string DeptNo, string MajorNo, string ClassNo) | |||||
public object GetMilitaryStatistics(string queryJson,int type) | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
return stuEnrollService.GetMilitaryStatistics(DeptNo, MajorNo, ClassNo); | |||||
return stuEnrollService.GetMilitaryStatistics(queryJson, type); | |||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||
@@ -100,7 +100,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
object GetStuInfo(string stuId); | object GetStuInfo(string stuId); | ||||
object GetCheckInStatistics(string DeptNo, string MajorNo, string ClassNo); | object GetCheckInStatistics(string DeptNo, string MajorNo, string ClassNo); | ||||
object GetHelpStatistics(string DeptNo, string MajorNo, string ClassNo); | object GetHelpStatistics(string DeptNo, string MajorNo, string ClassNo); | ||||
object GetMilitaryStatistics(string DeptNo, string MajorNo, string ClassNo); | |||||
object GetMilitaryStatistics(string queryJson,int type); | |||||
void GetMoney(); | void GetMoney(); | ||||
void RelationPhoto(); | void RelationPhoto(); | ||||
void Synchronization(); | void Synchronization(); | ||||
@@ -346,6 +346,287 @@ t.SupportChangeTime,t.SupportChangeUserName | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// | |||||
/// </summary> | |||||
/// <param name="queryJson">查询条件</param> | |||||
/// <param name="type">1:军训;2:学费</param> | |||||
/// <returns></returns> | |||||
internal object GetMilitaryStatistics(string queryJson, int type) | |||||
{ | |||||
//try | |||||
//{ | |||||
// var data = this.BaseRepository("CollegeMIS").FindList<StuEnrollEntity>() | |||||
// //.Where(a => string.IsNullOrEmpty(DeptNo) || a.DeptNo == DeptNo) | |||||
// //.Where(a => string.IsNullOrEmpty(MajorNo) || a.MajorNo == MajorNo) | |||||
// //.Where(a => string.IsNullOrEmpty(ClassNo) || a.ClassNo == ClassNo) | |||||
// ; | |||||
// var aa = data.Count(a => a.IsMilitary == true); | |||||
// var bb = data.Count(a => a.IsMilitary == false); | |||||
// return new { aa, bb }; | |||||
//} | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT "); | |||||
strSql.Append(@" | |||||
t.StuId, | |||||
t.StuName,IsMilitary,IsSubsidize1 | |||||
"); | |||||
strSql.Append(" FROM StuEnroll t "); | |||||
strSql.Append(" WHERE 1=1 "); | |||||
var queryParam = queryJson.ToJObject(); | |||||
// 虚拟参数 | |||||
var dp = new DynamicParameters(new { }); | |||||
if (!queryParam["IDCard"].IsEmpty()) | |||||
{ | |||||
dp.Add("IDCard", "%" + queryParam["IDCard"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.IDCard Like @IDCard "); | |||||
} | |||||
if (!queryParam["Year"].IsEmpty()) | |||||
{ | |||||
dp.Add("Year", "%" + queryParam["Year"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.ClassNo Like @Year "); | |||||
} | |||||
//sql条件 | |||||
if (!queryParam["SqlParameter"].IsEmpty()) | |||||
{ | |||||
strSql.Append(queryParam["SqlParameter"].ToString()); | |||||
} | |||||
if (!queryParam["RegistrationNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("RegistrationNo", "%" + queryParam["RegistrationNo"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.RegistrationNo Like @RegistrationNo "); | |||||
} | |||||
if (!queryParam["Admissions"].IsEmpty()) | |||||
{ | |||||
dp.Add("Admissions", queryParam["Admissions"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.Admissions = @Admissions "); | |||||
} | |||||
if (!queryParam["DeptNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.DeptNo = @DeptNo "); | |||||
} | |||||
if (!queryParam["MajorNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.MajorNo = @MajorNo "); | |||||
} | |||||
if (!queryParam["Grade"].IsEmpty()) | |||||
{ | |||||
dp.Add("Grade", queryParam["Grade"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.Grade = @Grade "); | |||||
} | |||||
if (!queryParam["ClassNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.ClassNo = @ClassNo "); | |||||
} | |||||
if (!queryParam["IsAllocation"].IsEmpty()) | |||||
{ | |||||
var IsAllocation = Convert.ToBoolean(queryParam["IsAllocation"].ToString()); | |||||
if (IsAllocation) | |||||
{ | |||||
strSql.Append(" AND (t.ClassNo IS NOT NULL AND t.ClassNo<>'')"); | |||||
} | |||||
else | |||||
{ | |||||
strSql.Append(" AND (t.ClassNo IS NULL OR t.ClassNo='')"); | |||||
} | |||||
} | |||||
if (!queryParam["IsAllocationDormitory"].IsEmpty()) | |||||
{ | |||||
var IsAllocation = Convert.ToBoolean(queryParam["IsAllocationDormitory"].ToString()); | |||||
if (IsAllocation) | |||||
{ | |||||
strSql.Append(" AND (t.DormitoryNo IS NOT NULL AND t.DormitoryNo<>'')"); | |||||
} | |||||
else | |||||
{ | |||||
strSql.Append(" AND (t.DormitoryNo IS NULL OR t.DormitoryNo='')"); | |||||
} | |||||
} | |||||
if (!queryParam["StuName"].IsEmpty()) | |||||
{ | |||||
dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.StuName Like @StuName "); | |||||
} | |||||
if (!queryParam["Status"].IsEmpty()) | |||||
{ | |||||
dp.Add("Status", queryParam["Status"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.Status = @Status "); | |||||
} | |||||
if (!queryParam["Gender"].IsEmpty()) | |||||
{ | |||||
dp.Add("Gender", Convert.ToBoolean(queryParam["Gender"].ToString()), DbType.Boolean); | |||||
strSql.Append(" AND t.Gender = @Gender "); | |||||
} | |||||
if (!queryParam["PayList"].IsEmpty()) | |||||
{ | |||||
strSql.Append(" AND t.Status>=3 AND t.Status<6 "); | |||||
} | |||||
if (!queryParam["IsCheckIn"].IsEmpty()) | |||||
{ | |||||
if (queryParam["IsCheckIn"].ToString() == "null") | |||||
{ | |||||
strSql.Append(" AND t.IsCheckIn is null "); | |||||
} | |||||
else | |||||
{ | |||||
dp.Add("IsCheckIn", queryParam["IsCheckIn"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.IsCheckIn = @IsCheckIn "); | |||||
} | |||||
} | |||||
if (!queryParam["IsSubsidize1"].IsEmpty()) | |||||
{ | |||||
if (queryParam["IsSubsidize1"].ToString() == "null") | |||||
{ | |||||
strSql.Append(" AND t.IsSubsidize1 is null "); | |||||
} | |||||
else | |||||
{ | |||||
dp.Add("IsSubsidize1", queryParam["IsSubsidize1"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.IsSubsidize1 = @IsSubsidize1 "); | |||||
} | |||||
} | |||||
if (!queryParam["IsMilitary"].IsEmpty()) | |||||
{ | |||||
if (queryParam["IsMilitary"].ToString() == "null") | |||||
{ | |||||
strSql.Append(" AND t.IsMilitary is null "); | |||||
} | |||||
else | |||||
{ | |||||
dp.Add("IsMilitary", queryParam["IsMilitary"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.IsMilitary = @IsMilitary "); | |||||
} | |||||
} | |||||
if (!queryParam["IsPay"].IsEmpty()) | |||||
{ | |||||
if (queryParam["IsPay"].ToString() == "null") | |||||
{ | |||||
strSql.Append(" AND t.IsPay is null "); | |||||
} | |||||
else | |||||
{ | |||||
dp.Add("IsPay", queryParam["IsPay"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.IsPay = @IsPay "); | |||||
} | |||||
} | |||||
if (!queryParam["IsMug"].IsEmpty()) | |||||
{ | |||||
if (queryParam["IsMug"].ToString() == "null") | |||||
{ | |||||
strSql.Append(" AND t.IsMug is null "); | |||||
} | |||||
else | |||||
{ | |||||
dp.Add("IsMug", queryParam["IsMug"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.IsMug = @IsMug "); | |||||
} | |||||
} | |||||
if (!queryParam["IsTakeCloths"].IsEmpty()) | |||||
{ | |||||
if (queryParam["IsTakeCloths"].ToString() == "null") | |||||
{ | |||||
strSql.Append(" AND t.IsTakeCloths is null "); | |||||
} | |||||
else | |||||
{ | |||||
dp.Add("IsTakeCloths", queryParam["IsTakeCloths"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.IsTakeCloths = @IsTakeCloths "); | |||||
} | |||||
} | |||||
if (!queryParam["IsQuantity"].IsEmpty()) | |||||
{ | |||||
if (queryParam["IsQuantity"].ToString() == "null") | |||||
{ | |||||
strSql.Append(" AND t.IsQuantity is null "); | |||||
} | |||||
else | |||||
{ | |||||
dp.Add("IsQuantity", queryParam["IsQuantity"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.IsQuantity = @IsQuantity "); | |||||
} | |||||
} | |||||
if (!queryParam["IsGetBeddingArticle"].IsEmpty()) | |||||
{ | |||||
if (queryParam["IsGetBeddingArticle"].ToString() == "null") | |||||
{ | |||||
strSql.Append(" AND t.IsGetBeddingArticle is null "); | |||||
} | |||||
else | |||||
{ | |||||
dp.Add("IsGetBeddingArticle", queryParam["IsGetBeddingArticle"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.IsGetBeddingArticle = @IsGetBeddingArticle "); | |||||
} | |||||
} | |||||
//获取班主任所带的班级 | |||||
var roleid = this.BaseRepository().FindEntity<RoleEntity>(a => a.F_FullName == "班主任")?.F_RoleId; | |||||
var userInfo = LoginUserInfo.Get(); | |||||
var sqlClasses = ""; | |||||
if (!string.IsNullOrEmpty(roleid)) | |||||
{ | |||||
if (userInfo.roleIds.Contains(roleid)) | |||||
{ | |||||
var classes = this.BaseRepository("CollegeMIS").FindList<ClassInfoEntity>(a => a.ClassDiredctorNo == userInfo.account).Select(a => a.ClassNo).ToList(); | |||||
if (classes != null) | |||||
{ | |||||
foreach (var item in classes) | |||||
{ | |||||
sqlClasses += $"'{item}',"; | |||||
} | |||||
sqlClasses = sqlClasses.TrimEnd(','); | |||||
} | |||||
} | |||||
if (!string.IsNullOrEmpty(sqlClasses)) | |||||
{ | |||||
strSql.Append($" AND t.ClassNo IN({sqlClasses})"); | |||||
} | |||||
} | |||||
var list = this.BaseRepository("CollegeMIS").FindList<StuEnrollEntity>(strSql.ToString(), dp); | |||||
int aa = 0, bb = 0; | |||||
if (type == 1) | |||||
{ | |||||
aa = list.Count(x => x.IsMilitary == true); | |||||
bb = list.Count(x => x.IsMilitary == false); | |||||
} | |||||
else if (type == 2) | |||||
{ | |||||
aa = list.Count(x => x.IsSubsidize1 == true); | |||||
bb = list.Count(x => x.IsSubsidize1 == false); | |||||
} | |||||
return new { aa, bb }; | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 获取页面显示列表数据 | /// 获取页面显示列表数据 | ||||
/// <summary> | /// <summary> | ||||
@@ -959,32 +1240,6 @@ t.SupportChangeTime,t.SupportChangeUserName | |||||
} | } | ||||
} | } | ||||
internal object GetMilitaryStatistics(string DeptNo, string MajorNo, string ClassNo) | |||||
{ | |||||
try | |||||
{ | |||||
var data = this.BaseRepository("CollegeMIS").FindList<StuEnrollEntity>() | |||||
.Where(a => string.IsNullOrEmpty(DeptNo) || a.DeptNo == DeptNo) | |||||
.Where(a => string.IsNullOrEmpty(MajorNo) || a.MajorNo == MajorNo) | |||||
.Where(a => string.IsNullOrEmpty(ClassNo) || a.ClassNo == ClassNo) | |||||
; | |||||
var aa = data.Count(a => a.IsMilitary == true); | |||||
var bb = data.Count(a => a.IsMilitary == false); | |||||
return new { aa, bb }; | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 获取页面显示列表数据 | /// 获取页面显示列表数据 | ||||
@@ -2217,7 +2472,7 @@ t.SupportChangeTime,t.SupportChangeUserName | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
var entity = this.BaseRepository("CollegeMIS").FindEntity<StuEnrollEntity>(x=>x.SupportProcessId== processId); | |||||
var entity = this.BaseRepository("CollegeMIS").FindEntity<StuEnrollEntity>(x => x.SupportProcessId == processId); | |||||
//if (!string.IsNullOrEmpty(entity.Photo)) | //if (!string.IsNullOrEmpty(entity.Photo)) | ||||
//{ | //{ | ||||
// var path = this.BaseRepository().FindEntity<AnnexesFileEntity>(a => a.F_Id == entity.Photo)?.F_FilePath; | // var path = this.BaseRepository().FindEntity<AnnexesFileEntity>(a => a.F_Id == entity.Photo)?.F_FilePath; | ||||
@@ -2241,7 +2496,7 @@ t.SupportChangeTime,t.SupportChangeUserName | |||||
} | } | ||||
} | } | ||||
} | } | ||||
#endregion 获取数据 | #endregion 获取数据 | ||||
#region 提交数据 | #region 提交数据 | ||||