Kaynağa Gözat

一卡通消息金额统计修改,累计在线时长改为登录次数,bug修改

塔里木分支
dao 4 ay önce
ebeveyn
işleme
7689f0f346
4 değiştirilmiş dosya ile 114 ekleme ve 49 silme
  1. +69
    -18
      Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/SSOSystemController.cs
  2. +5
    -5
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/SSOSystem/DragModelOne.cshtml
  3. +27
    -26
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/SSOSystem/DragModelTwo.cshtml
  4. +13
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/YKTStateMent/YKTStateMentEntity.cs

+ 69
- 18
Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/SSOSystemController.cs Dosyayı Görüntüle

@@ -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();
}


+ 5
- 5
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/SSOSystem/DragModelOne.cshtml Dosyayı Görüntüle

@@ -43,9 +43,9 @@
+'<div class="inSec3Major">'
+'<div class="inSec3MajorImgBox">'
+'<div class="inSec3MajorImg"><img src="../../Content/images/DragSSO/indexSec3-3.png" alt=""></div>'
+'<span>图书馆借阅(未还) </span>'
+'<span>待办事项 </span>'
+ '</div>'
+ '<div class="inSec3MajorTxt"><span>0</span></div>'
+ '<div class="inSec3MajorTxt"><span>@ViewBag.TaskTotalNum</span></div>'
+'</div>'
+'<div class="inSec3Major">'
+'<div class="inSec3MajorImgBox">'
@@ -78,9 +78,9 @@
+'<div class="inSec3Major">'
+'<div class="inSec3MajorImgBox">'
+'<div class="inSec3MajorImg"><img src="../../Content/images/DragSSO/indexSec3-8.png" alt=""></div>'
+'<span>累计在线时长</span>'
+'<span>累计登录次数</span>'
+'</div>'
+ '<div class="inSec3MajorTxt"><span>0</span></div>'
+ '<div class="inSec3MajorTxt"><span>@ViewBag.LoginCount</span></div>'
+'</div>'
+'</div>'
+'</div>'
@@ -308,7 +308,7 @@
html += '</div>'
+ '</div>';
}
html+='</div>'
+'</div>'
+'</div>'


+ 27
- 26
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/SSOSystem/DragModelTwo.cshtml Dosyayı Görüntüle

@@ -44,9 +44,9 @@
+'<div class="inSec3Major">'
+'<div class="inSec3MajorImgBox">'
+'<div class="inSec3MajorImg"><img src="../../Content/images/DragSSO/indexSec3-3.png" alt=""></div>'
+'<span>图书馆借阅(未还) </span>'
+'<span>待办事项 </span>'
+ '</div>'
+ '<div class="inSec3MajorTxt"><span>0</span></div>'
+ '<div class="inSec3MajorTxt"><span>@ViewBag.TaskTotalNum</span></div>'
+'</div>'
+'<div class="inSec3Major">'
+'<div class="inSec3MajorImgBox">'
@@ -79,9 +79,9 @@
+'<div class="inSec3Major">'
+'<div class="inSec3MajorImgBox">'
+'<div class="inSec3MajorImg"><img src="../../Content/images/DragSSO/indexSec3-8.png" alt=""></div>'
+'<span>累计在线时长</span>'
+'<span>累计登录次数</span>'
+'</div>'
+ '<div class="inSec3MajorTxt"><span>0</span></div>'
+ '<div class="inSec3MajorTxt"><span>@ViewBag.LoginCount</span></div>'
+'</div>'
+'</div>'
+'</div>'
@@ -733,6 +733,7 @@
.desktopSetBox b {
font-weight: normal;
}

.searchLi > a {
width: 100%;
}
@@ -740,7 +741,7 @@
.searchLi > a > * {
display: inline-block;
vertical-align: middle;
}
}
</style>
<!-- / warpper -->
<div class="warpper">
@@ -766,23 +767,23 @@
</div>
<div class="searchR">
@*<div class="searchTop">
<span>服务角色</span>
<ul class="searchTopList">
<li class="active">全部</li>
<li>校领导</li>
<li>游客</li>
<li>教师</li>
<li>学生</li>
</ul>
</div>
<div class="searchTop">
<span>服务角色</span>
<ul class="searchTopList">
<li class="active">全部</li>
<li>最新应用</li>
<li>常用链接</li>
</ul>
</div>*@
<span>服务角色</span>
<ul class="searchTopList">
<li class="active">全部</li>
<li>校领导</li>
<li>游客</li>
<li>教师</li>
<li>学生</li>
</ul>
</div>
<div class="searchTop">
<span>服务角色</span>
<ul class="searchTopList">
<li class="active">全部</li>
<li>最新应用</li>
<li>常用链接</li>
</ul>
</div>*@
<div class="searchRBox">
@{
var searchModule = ViewBag.SearchModule as List<ModuleEntity>;
@@ -963,10 +964,10 @@
<!-- 第二级列表 -->
<ul class="inSec1List2 inSecShadow">
@*<li class="active">
<a href="/Home/Index?autoopen=92a85055-67f2-4a06-902a-f10ec5576d92" target="_blank">
<img src="~/Content/images/DragSSO/inSec1-2.png" alt="" /><span>人事管理系统</span>
</a>
</li>*@
<a href="/Home/Index?autoopen=92a85055-67f2-4a06-902a-f10ec5576d92" target="_blank">
<img src="~/Content/images/DragSSO/inSec1-2.png" alt="" /><span>人事管理系统</span>
</a>
</li>*@
</ul>
<!-- 第二级列表 -->
</div>


+ 13
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/YKTStateMent/YKTStateMentEntity.cs Dosyayı Görüntüle

@@ -26,6 +26,19 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// 消费金额
/// </summary>
public string MONEY { get; set; }

public decimal Moneys
{
get
{
if (decimal.TryParse(MONEY, out decimal result))
{

return result;
}
return 0;
}
}
/// <summary>
/// 余额
/// </summary>


Yükleniyor…
İptal
Kaydet