Commit d489acd7 authored by liudong1993's avatar liudong1993

订单统计

parent 80bb0b15
......@@ -1270,6 +1270,116 @@ namespace Edu.WebApi.Controllers.Course
return ApiResult.Success("", pageModel);
}
/// <summary>
/// 获取我的留学就业订单列表
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult GetStudyOrderPageListStatistics()
{
var userInfo = base.UserInfo;
ResultPageModel pageModel = JsonHelper.DeserializeObject<ResultPageModel>(RequestParm.Msg.ToString());
RB_Order_ViewModel demodel = new RB_Order_ViewModel()
{
OrderId = base.ParmJObj.GetInt("OrderId"),
GuestName = base.ParmJObj.GetStringValue("GuestName"),
StartTime = base.ParmJObj.GetStringValue("StartTime"),
EndTime = base.ParmJObj.GetStringValue("EndTime"),
Q_NotCollect = base.ParmJObj.GetInt("Q_NotCollect"),
OrderState = (OrderStateEnum)base.ParmJObj.GetInt("OrderState"),
Q_OrderState = base.ParmJObj.GetInt("Q_OrderState"),
Q_OrderBy = base.ParmJObj.GetInt("Q_OrderBy"),
PlatformTax = base.ParmJObj.GetDecimal("PlatformTax"),
EnterID = base.ParmJObj.GetInt("EnterID")
};
demodel.Group_Id = userInfo.Group_Id;
var orderList = orderModule.GetStudyOrderPageModule(pageModel.PageIndex, pageModel.PageSize, out long count, demodel);
var orderS = orderModule.GetStudyOrderStatisticsModule(demodel);
pageModel.Count = Convert.ToInt32(count);
pageModel.PageData = new
{
Statistics = new
{
PreferPrice = orderS?.PreferPrice ?? 0,
Income = orderS?.Income ?? 0,
DueInMoney = orderS?.DueInMoney ?? 0,
GuestNum = orderS?.GuestNum ?? 0,
CancelNum = orderS?.CancelNum ?? 0,
CommissionMoney = orderS?.CommissionMoney ?? 0,
ExtraRewardMoney = orderS?.ExtraRewardMoney ?? 0
},
List = orderList.Select(x => new
{
x.OrderId,
x.ClassId,
x.OrderType,
x.SourceId,
x.ClassSchoolId,
ClassName = x.StudyName,
x.TradeWay,
x.Class_Price,
x.Unit_Price,
x.GuestNum,
x.PreferPrice,
x.Income,
x.Refund,
x.DiscountMoney,
x.PlatformTax,
DueInMoney = x.PreferPrice - (x.Income - x.Refund + x.PlatformTax + x.DiscountMoney),
x.OrderState,
OrderStateName = x.OrderState.ToName(),
x.EnterID,
EnterName = UserReidsCache.GetUserLoginInfo(x.EnterID)?.AccountName ?? "",
x.CommissionMoney,
x.ExtraRewardMoney,
x.ExtraDeductMoney,
x.IsCommissionGive,
CreateTime = x.CreateTime.ToString("yyyy-MM-dd HH:mm:ss"),
x.SaleRemark,
x.TeacherRemark,
x.RectorRemark,
x.DirectorRemark,
x.OfferId,
SaleRemarkList = x.SaleRemarkList.Select(z => new
{
z.Id,
z.Content,
CreateBy = z.CreateByName,
CreateTime = z.CreateTime.ToString("yyyy-MM-dd HH:mm:ss")
}),
TeacherRemarkList = x.TeacherRemarkList.Select(z => new
{
z.Id,
z.Content,
CreateBy = z.CreateByName,
CreateTime = z.CreateTime.ToString("yyyy-MM-dd HH:mm:ss")
}),
RectorRemarkList = x.RectorRemarkList.Select(z => new
{
z.Id,
z.Content,
CreateBy = z.CreateByName,
CreateTime = z.CreateTime.ToString("yyyy-MM-dd HH:mm:ss")
}),
DirectorRemarkList = x.DirectorRemarkList.Select(z => new
{
z.Id,
z.Content,
CreateBy = z.CreateByName,
CreateTime = z.CreateTime.ToString("yyyy-MM-dd HH:mm:ss")
}),
GuestList = x.GuestList.Select(z => new
{
z.Id,
z.GuestName,
z.GuestState
})
})
};
return ApiResult.Success("", pageModel);
}
/// <summary>
/// 订单转交
......
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