Selaa lähdekoodia

办事大厅 一卡通信息 显示余额和消费

临城职教中职
ndbs 2 vuotta sitten
vanhempi
commit
82d9a62c8b
4 muutettua tiedostoa jossa 93 lisäystä ja 15 poistoa
  1. +37
    -14
      Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/SSOSystemController.cs
  2. +25
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/MealCardRunTab/MealCardRunTabBLL.cs
  3. +6
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/MealCardRunTab/MealCardRunTabIBLL.cs
  4. +25
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/MealCardRunTab/MealCardRunTabService.cs

+ 37
- 14
Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/SSOSystemController.cs Näytä tiedosto

@@ -56,6 +56,7 @@ namespace Learun.Application.Web.Controllers
private TeachSwitchIBLL teachSwitchIBLL = new TeachSwitchBLL();
private StuSaverecordIBLL stuSaverecordIBLL = new StuSaverecordBLL();
private StuConsumptionIBLL stuConsumptionIBLL = new StuConsumptionBLL();
private MealCardRunTabIBLL mealCardRunTabIBLL = new MealCardRunTabBLL();

#region 统一身份认证2.0
/// <summary>
@@ -1202,19 +1203,32 @@ namespace Learun.Application.Web.Controllers
ViewBag.AllCount = allCount;
ViewBag.FlowType = flowType;
ViewBag.FlowList = JsonConvert.SerializeObject(flowList);
//校园一卡通余额
ViewBag.StuSaveRecordTotalNum = 0;
var stuSaveRecordList = stuSaverecordIBLL.GetListByAccount(userInfo.account).OrderByDescending(x => x.UPLOADDATE);
if (stuSaveRecordList.Any())
var card = "";
if (userInfo.Description == "学生")
{
card = stuInfoData.Where(x => x.StuNo == userInfo.account).Select(x => x.IdentityCardNo).FirstOrDefault();
}
else if (userInfo.Description == "教师")
{
ViewBag.StuSaveRecordTotalNum = stuSaveRecordList.FirstOrDefault().ODDFARE;
card = teacherData.Where(x => x.EmpNo == userInfo.account).Select(x => x.IdentityCardNo).FirstOrDefault();
}
//校园一卡通余额
ViewBag.StuSaveRecordTotalNum = 0;
//红湖付款码余额
ViewBag.StuConsumptionTotalNum = 0;
var stuConsumptionList = stuConsumptionIBLL.GetListByAccount(userInfo.account);
if (stuConsumptionList.Any())
if (!string.IsNullOrEmpty(card))
{
ViewBag.StuConsumptionTotalNum = stuConsumptionList.Select(x => x.OPFARE.ToDecimal()).Sum();
var mealCardRunTabList = mealCardRunTabIBLL.GetListByAccount(card).OrderByDescending(x => x.centralTm);
if (mealCardRunTabList.Any())
{
ViewBag.StuSaveRecordTotalNum = mealCardRunTabList.FirstOrDefault().balance / 10000;
}

var mealCardRunTabListJY = mealCardRunTabIBLL.GetListByAccount(card);
if (mealCardRunTabListJY.Any())
{
ViewBag.StuConsumptionTotalNum = Math.Abs(mealCardRunTabListJY.Select(x => x.flowamount.ToDecimal() / 10000).Sum());
}
}
//常用链接
var userfunctionlist = perm_FunctionIBLL.GetListByUserId(userInfo.userId);
@@ -1532,19 +1546,28 @@ namespace Learun.Application.Web.Controllers
ViewBag.AllCount = allCount;
ViewBag.FlowType = flowType;
ViewBag.FlowList = JsonConvert.SerializeObject(flowList);
var card = "";
if (userInfo.Description == "学生")
{
card = stuInfoData.Where(x => x.StuNo == userInfo.account).Select(x => x.IdentityCardNo).FirstOrDefault();
}
else if (userInfo.Description == "教师")
{
card = teacherData.Where(x => x.EmpNo == userInfo.account).Select(x => x.IdentityCardNo).FirstOrDefault();
}
//校园一卡通余额
ViewBag.StuSaveRecordTotalNum = 0;
var stuSaveRecordList = stuSaverecordIBLL.GetListByAccount(userInfo.account).OrderByDescending(x => x.UPLOADDATE);
if (stuSaveRecordList.Any())
var mealCardRunTabList = mealCardRunTabIBLL.GetListByAccount(card).OrderByDescending(x => x.centralTm);
if (mealCardRunTabList.Any())
{
ViewBag.StuSaveRecordTotalNum = stuSaveRecordList.FirstOrDefault().ODDFARE;
ViewBag.StuSaveRecordTotalNum = mealCardRunTabList.FirstOrDefault().balance / 10000;
}
//红湖付款码余额
ViewBag.StuConsumptionTotalNum = 0;
var stuConsumptionList = stuConsumptionIBLL.GetListByAccount(userInfo.account);
if (stuConsumptionList.Any())
var mealCardRunTabListJY = mealCardRunTabIBLL.GetListByAccount(userInfo.IdentityCardNo);
if (mealCardRunTabListJY.Any())
{
ViewBag.StuConsumptionTotalNum = stuConsumptionList.Select(x => x.OPFARE.ToDecimal()).Sum();
ViewBag.StuConsumptionTotalNum = Math.Abs(mealCardRunTabListJY.Select(x => x.flowamount.ToDecimal() / 10000).Sum());
}
//常用链接
var userfunctionlist = perm_FunctionIBLL.GetListByUserId(userInfo.userId);


+ 25
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/MealCardRunTab/MealCardRunTabBLL.cs Näytä tiedosto

@@ -216,5 +216,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration

#endregion

/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<MealCardRunTabEntity> GetListByAccount(string account)
{
try
{
return mealCardRunTabService.GetListByAccount(account); ;
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}


}
}

+ 6
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/MealCardRunTab/MealCardRunTabIBLL.cs Näytä tiedosto

@@ -55,5 +55,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
void SaveEntity(string keyValue, MealCardRunTabEntity entity);
#endregion

/// <summary>
///
/// </summary>
/// <param name="account"></param>
/// <returns></returns>
IEnumerable<MealCardRunTabEntity> GetListByAccount(string account);
}
}

+ 25
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/MealCardRunTab/MealCardRunTabService.cs Näytä tiedosto

@@ -156,7 +156,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["accountNo"].IsEmpty())
{
dp.Add("accountNo", "%" + queryParam["accountNo"].ToString() + "%", DbType.String);
@@ -304,5 +304,29 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration

#endregion

/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<MealCardRunTabEntity> GetListByAccount(string account)
{
try
{
var user = LoginUserInfo.Get();
return this.BaseRepository("CollegeMIS").FindList<MealCardRunTabEntity>(x => x.personId == account && x.accountName == user.realName);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
}
}

Ladataan…
Peruuta
Tallenna