|
|
@@ -18,6 +18,7 @@ using Learun.Cache.Factory; |
|
|
|
using Newtonsoft.Json; |
|
|
|
using Learun.Application.TwoDevelopment.LR_Desktop; |
|
|
|
using Learun.Application.TwoDevelopment.PersonnelManagement; |
|
|
|
using DocumentFormat.OpenXml.Spreadsheet; |
|
|
|
|
|
|
|
namespace Learun.Application.Web.Controllers |
|
|
|
{ |
|
|
@@ -56,6 +57,8 @@ namespace Learun.Application.Web.Controllers |
|
|
|
private TeachSwitchIBLL teachSwitchIBLL = new TeachSwitchBLL(); |
|
|
|
private StuSaverecordIBLL stuSaverecordIBLL = new StuSaverecordBLL(); |
|
|
|
private StuConsumptionIBLL stuConsumptionIBLL = new StuConsumptionBLL(); |
|
|
|
private YKTStateMentIBLL yktStateMentIbll = new YKTStateMentBLL(); |
|
|
|
private LoginStatisticsIBLL loginStatisticsIBLL = new LoginStatisticsBLL(); |
|
|
|
|
|
|
|
#region 统一身份认证2.0 |
|
|
|
/// <summary> |
|
|
@@ -401,12 +404,12 @@ namespace Learun.Application.Web.Controllers |
|
|
|
ViewBag.StuSaveRecordTotalNum = stuSaveRecordList.FirstOrDefault().ODDFARE; |
|
|
|
} |
|
|
|
//红湖付款码余额 |
|
|
|
ViewBag.StuConsumptionTotalNum = 0; |
|
|
|
var stuConsumptionList = stuConsumptionIBLL.GetListByAccount(userInfo.account); |
|
|
|
if (stuConsumptionList.Any()) |
|
|
|
{ |
|
|
|
ViewBag.StuConsumptionTotalNum = stuConsumptionList.Select(x => x.OPFARE.ToDecimal()).Sum(); |
|
|
|
} |
|
|
|
ViewBag.StuConsumptionTotalNum = GetConsumption(userInfo); |
|
|
|
//var stuConsumptionList = stuConsumptionIBLL.GetListByAccount(userInfo.account); |
|
|
|
//if (stuConsumptionList.Any()) |
|
|
|
//{ |
|
|
|
// ViewBag.StuConsumptionTotalNum = stuConsumptionList.Select(x => x.OPFARE.ToDecimal()).Sum(); |
|
|
|
//} |
|
|
|
//常用链接 |
|
|
|
var userfunctionlist = perm_FunctionIBLL.GetListByUserId(userInfo.userId); |
|
|
|
var ff = userfunctionlist.GroupBy(x => x.FTName).Select(x => new Perm_FunctionEntity() |
|
|
@@ -1401,12 +1404,12 @@ namespace Learun.Application.Web.Controllers |
|
|
|
ViewBag.StuSaveRecordTotalNum = stuSaveRecordList.FirstOrDefault().ODDFARE; |
|
|
|
} |
|
|
|
//红湖付款码余额 |
|
|
|
ViewBag.StuConsumptionTotalNum = 0; |
|
|
|
var stuConsumptionList = stuConsumptionIBLL.GetListByAccount(userInfo.account); |
|
|
|
if (stuConsumptionList.Any()) |
|
|
|
{ |
|
|
|
ViewBag.StuConsumptionTotalNum = stuConsumptionList.Select(x => x.OPFARE.ToDecimal()).Sum(); |
|
|
|
} |
|
|
|
ViewBag.StuConsumptionTotalNum = GetConsumption(userInfo); |
|
|
|
//var stuConsumptionList = stuConsumptionIBLL.GetListByAccount(userInfo.account); |
|
|
|
//if (stuConsumptionList.Any()) |
|
|
|
//{ |
|
|
|
// ViewBag.StuConsumptionTotalNum = stuConsumptionList.Select(x => x.OPFARE.ToDecimal()).Sum(); |
|
|
|
//} |
|
|
|
//常用链接 |
|
|
|
var userfunctionlist = perm_FunctionIBLL.GetListByUserId(userInfo.userId); |
|
|
|
var ff = userfunctionlist.GroupBy(x => x.FTName).Select(x => new Perm_FunctionEntity() |
|
|
@@ -1424,10 +1427,56 @@ namespace Learun.Application.Web.Controllers |
|
|
|
ViewBag.FunctionList = ff; |
|
|
|
ViewBag.FunctionListStr = JsonConvert.SerializeObject(ViewBag.FunctionList); |
|
|
|
|
|
|
|
ViewBag.LoginCount=GetLoginCount(userInfo); |
|
|
|
|
|
|
|
return View(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private decimal GetConsumption(Util.UserInfo userInfo) |
|
|
|
{ |
|
|
|
try |
|
|
|
{ |
|
|
|
//var userInfo = LoginUserInfo.Get(); |
|
|
|
Pagination paginationobj=new Pagination() { page=1,rows=10000}; |
|
|
|
var um = new { EmpNo = userInfo.account, EmpName = userInfo.realName }; |
|
|
|
var umj=um.ToJson(); |
|
|
|
var data = new List<YKTStateMentEntity>(); |
|
|
|
if (userInfo.Description == "学生") |
|
|
|
{ |
|
|
|
data= yktStateMentIbll.GetPageList(paginationobj, umj).ToList(); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
data = yktStateMentIbll.GetTeacherPageList(paginationobj, umj).ToList() ; |
|
|
|
|
|
|
|
} |
|
|
|
return data.Select(x => x.Moneys).DefaultIfEmpty().Sum(); |
|
|
|
} |
|
|
|
catch (Exception) |
|
|
|
{ |
|
|
|
return 0.0M; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
private int GetLoginCount(Util.UserInfo userInfo) |
|
|
|
{ |
|
|
|
try |
|
|
|
{ |
|
|
|
Pagination paginationobj = new Pagination() { page = 1, rows = 1000 }; |
|
|
|
var um = new { Account = userInfo.account }; |
|
|
|
var umj = um.ToJson(); |
|
|
|
var data = loginStatisticsIBLL.GetList(paginationobj, umj).ToList(); |
|
|
|
|
|
|
|
return data.Select(x => x.sumnum??0).DefaultIfEmpty().Sum(); |
|
|
|
} |
|
|
|
catch (Exception) |
|
|
|
{ |
|
|
|
return 0; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// 网上办事大厅拖拽版-效率优先模式 |
|
|
|
/// </summary> |
|
|
@@ -1731,12 +1780,12 @@ namespace Learun.Application.Web.Controllers |
|
|
|
ViewBag.StuSaveRecordTotalNum = stuSaveRecordList.FirstOrDefault().ODDFARE; |
|
|
|
} |
|
|
|
//红湖付款码余额 |
|
|
|
ViewBag.StuConsumptionTotalNum = 0; |
|
|
|
var stuConsumptionList = stuConsumptionIBLL.GetListByAccount(userInfo.account); |
|
|
|
if (stuConsumptionList.Any()) |
|
|
|
{ |
|
|
|
ViewBag.StuConsumptionTotalNum = stuConsumptionList.Select(x => x.OPFARE.ToDecimal()).Sum(); |
|
|
|
} |
|
|
|
ViewBag.StuConsumptionTotalNum = GetConsumption(userInfo); |
|
|
|
//var stuConsumptionList = stuConsumptionIBLL.GetListByAccount(userInfo.account); |
|
|
|
//if (stuConsumptionList.Any()) |
|
|
|
//{ |
|
|
|
// ViewBag.StuConsumptionTotalNum = stuConsumptionList.Select(x => x.OPFARE.ToDecimal()).Sum(); |
|
|
|
//} |
|
|
|
//常用链接 |
|
|
|
var userfunctionlist = perm_FunctionIBLL.GetListByUserId(userInfo.userId); |
|
|
|
var ff = userfunctionlist.GroupBy(x => x.FTName).Select(x => new Perm_FunctionEntity() |
|
|
@@ -1754,6 +1803,7 @@ namespace Learun.Application.Web.Controllers |
|
|
|
ViewBag.FunctionList = ff; |
|
|
|
ViewBag.FunctionListStr = JsonConvert.SerializeObject(ViewBag.FunctionList); |
|
|
|
|
|
|
|
ViewBag.LoginCount = GetLoginCount(userInfo); |
|
|
|
|
|
|
|
return View(); |
|
|
|
} |
|
|
@@ -1948,6 +1998,7 @@ namespace Learun.Application.Web.Controllers |
|
|
|
} |
|
|
|
ViewBag.SearchModule = searchmodulelist; |
|
|
|
|
|
|
|
ViewBag.LoginCount = GetLoginCount(userInfo); |
|
|
|
|
|
|
|
return View(); |
|
|
|
} |
|
|
|