Commit b0ae363d authored by 黄奎's avatar 黄奎

页面修改

parent a1d0c270
......@@ -1134,29 +1134,10 @@ namespace Edu.Module.Course
/// <param name="classId"></param>
/// <param name="groupId"></param>
/// <returns></returns>
public List<RB_Order_ViewModel> GetClassOrderList_V2(int classId, int groupId)
public List<RB_Order_ViewModel> GetClassOrderList_V2(int classId, int groupId,int SourceId)
{
var cModel = classRepository.GetEntity(classId);
//获取订单列表
var orderList = orderRepository.GetList(new RB_Order_ViewModel() { Group_Id = groupId, ClassId = classId });
//if (orderList.Any())
//{
// string orderIds = string.Join(",", orderList.Select(x => x.OrderId));
// //获取备注列表
// var remarkList = order_RemarkRepository.GetList(new RB_Order_Remark_ViewModel() { }, orderIds);
// //获取名单列表
// var guestList = order_GuestRepository.GetList(new RB_Order_Guest_ViewModel() { OrderIds = orderIds });
// foreach (var item in orderList)
// {
// item.SaleRemarkList = remarkList.Where(x => x.OrderId == item.OrderId && x.Type == 1).ToList();
// item.TeacherRemarkList = remarkList.Where(x => x.OrderId == item.OrderId && x.Type == 2).ToList();
// item.RectorRemarkList = remarkList.Where(x => x.OrderId == item.OrderId && x.Type == 3).ToList();
// item.DirectorRemarkList = remarkList.Where(x => x.OrderId == item.OrderId && x.Type == 4).ToList();
// item.GuestList = guestList.Where(x => x.OrderId == item.OrderId).ToList();
// }
//}
var orderList = orderRepository.GetList(new RB_Order_ViewModel() { Group_Id = groupId, ClassId = classId,SourceId=SourceId });
return orderList;
}
......
......@@ -43,14 +43,19 @@ namespace Edu.WebApi.Controllers.Finance
{
return ApiResult.Failed("班级Id不存在");
}
RB_Finance_Extend model = new RB_Finance_Extend() { TCID = classId, OrderSource = OrderResourceEnum.Education, RB_Group_Id = base.UserInfo.Group_Id, FinanceType = 2 };
RB_Finance_Extend model = new RB_Finance_Extend() { TCID = classId, OrderSource = OrderResourceEnum.Education, RB_Group_Id = base.UserInfo.Group_Id, FinanceType = 2 };
if (SourceId > 0)
{
model.TCID = SourceId;
model.OrderSource = OrderResourceEnum.EducationStudy;
}
var financeList = financeModule.GetFinanceInfoList(model).Where(t => (t.Status == FinanceAuditStatus.InReview || t.Status == FinanceAuditStatus.Pass || t.Status == FinanceAuditStatus.CTemporary)).ToList();
//收入
decimal IncomeReceive = 0;//应收
decimal IncomeActual = 0;//实收
var orderList = orderModule.GetClassOrderList_V2(classId, base.UserInfo.Group_Id).Where(x => (int)x.OrderState < 3);
var orderList = orderModule.GetClassOrderList_V2(classId, base.UserInfo.Group_Id,SourceId).Where(x => (int)x.OrderState < 3);
IncomeReceive = (orderList != null && orderList.Any()) ? orderList.Sum(x => x.PreferPrice) : 0;
IncomeActual = (orderList != null && orderList.Any()) ? orderList.Sum(x => x.Income) : 0;
......@@ -129,7 +134,6 @@ namespace Edu.WebApi.Controllers.Finance
OtherFiniceReciveList = recultFiniceList.Where(t => t.Type == WFTempLateClassEnum.IN && t.OrderID <= 0),//其他收入
OtherFinicePayList = recultFiniceList.Where(t => t.Type == WFTempLateClassEnum.OUT),//其他支出
//退费,班级费用(书本,房租等),提成,课时费确定 在弄
};
return ApiResult.Success("", resultData);
}
......@@ -146,6 +150,7 @@ namespace Edu.WebApi.Controllers.Finance
{
int classId = base.ParmJObj.GetInt("ClassId", 0);
int schoolId = base.ParmJObj.GetInt("School_Id");
int SourceId = base.ParmJObj.GetInt("SourceId");
List<ExcelDataSource> slist = new List<ExcelDataSource>();
string ExcelName = "用户列表" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".xls";
if (classId <= 0)
......@@ -162,7 +167,7 @@ namespace Edu.WebApi.Controllers.Finance
//收入
decimal IncomeReceive = 0;//应收
decimal IncomeActual = 0;//实收
var orderList = orderModule.GetClassOrderList_V2(classId, base.UserInfo.Group_Id).Where(x => (int)x.OrderState < 3);
var orderList = orderModule.GetClassOrderList_V2(classId, base.UserInfo.Group_Id,SourceId).Where(x => (int)x.OrderState < 3);
IncomeReceive = (orderList != null && orderList.Any()) ? orderList.Sum(x => x.PreferPrice) : 0;
IncomeActual = (orderList != null && orderList.Any()) ? orderList.Sum(x => x.Income) : 0;
......@@ -194,26 +199,6 @@ namespace Edu.WebApi.Controllers.Finance
List<RB_Finance_Extend> financeReciveList = financeList.Where(t => t.Type == WFTempLateClassEnum.IN).ToList();
List<RB_Finance_Extend> financePayList = financeList.Where(t => t.Type == WFTempLateClassEnum.OUT).ToList();
//var recultFiniceList = financeList.Select(x => new
//{
// x.FrID,
// x.Type,
// x.TCID,
// x.OrderID,
// x.Money,
// x.PayMoney,
// AirTotalMoney = x.AirTotalMoney ?? 0,
// AirTotalPayMoney = x.AirTotalPayMoney ?? 0,
// CostTypeList = x.CostTypeList.Distinct().ToList(),
// x.OrderSource,
// AuditList = x.AuditList.Select(t => new { t.AuditEmId, t.AuditEmName, AuditDate = t.AuditDate.HasValue ? t.AuditDate.Value.ToString("yyyy/MM/dd") : "" }),
// StatusStr = EnumHelper.ToName(x.Status.Value),
// x.RB_CreateByName,
// CreateDate = x.CreateDate.Value.ToString("yyyy-MM-dd"),
// TradeDate = x.TradeDate.HasValue ? x.TradeDate.Value.ToString("yyyy-MM-dd") : "",
// TradeWayList = x.BankList?.Select(y => new { y.AccountType, y.Alias, y.BankNo, TypeName = EnumHelper.ToName(y.Type), y.CurrencyName, y.OriginalMoney, y.Money, y.Rate })
//});
#endregion
try
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment