Commit 2c6dd821 authored by liudong1993's avatar liudong1993

Merge branch 'master' of http://gitlab.oytour.com/Kui2/education

parents c4182a63 9cfeacbc
......@@ -231,7 +231,5 @@ namespace Edu.Model.Entity.Sell
/// 续费状态 1正常 2续费
/// </summary>
public int RenewState { get; set; }
}
}
......@@ -56,5 +56,10 @@ namespace Edu.Model.ViewModel.User
/// 班级状态
/// </summary>
public ClassStatusEnum ClassStatus { get; set; }
/// <summary>
/// 续费状态 1正常 2续费
/// </summary>
public int RenewState { get; set; }
}
}
......@@ -4842,8 +4842,8 @@ namespace Edu.Module.Course
/// <param name="student_stuId"></param>
public void GetStudentCurrentOrderModule(int student_stuId, out int newClassStatus, out string classStatusName, out int classId, out decimal SurplusClassHours)
{
newClassStatus = 1;
classStatusName = "学习中";
newClassStatus = 0;
classStatusName = "";
SurplusClassHours = 0;
classId = 0;
ClassStatusEnum classStatus = 0;
......
......@@ -105,7 +105,7 @@ namespace Edu.Module.User
{
var tempOrderList = stuOrderList?.Where(qitem => qitem.Student_Id == item.StuId)?.ToList();
item.OrderCount = tempOrderList?.Count() ?? 0;
item.RenewOrderCount = tempOrderList?.Where(qitem => qitem.StuJoinType == Common.Enum.Sale.OrderJoinTypeEnum.RenewOrder)?.Count()??0;
item.RenewOrderCount = tempOrderList?.Where(qitem => qitem.RenewState == 2)?.Count()??0;
item.StuGuestState = tempOrderList?.OrderByDescending(qitem => qitem.OrderId)?.LastOrDefault()?.StuGuestState ?? 0;
item.AreaName = (destinationList?.FirstOrDefault(qitem => qitem.ID == item.ProviceId)?.Name ?? "")
+ "/" + (destinationList?.FirstOrDefault(qitem => qitem.ID == item.CityId)?.Name ?? "")
......
......@@ -23,10 +23,10 @@ namespace Edu.Repository.User
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT A.*,IFNULL(B.ClassName,'') AS ClassName,IFNULL(B.ClassNo,'') AS ClassNo,IFNULL(C.JoinType,0) AS StuJoinType,IFNULL(D.GuestState,0) AS StuGuestState
,C.OrderState,IFNULL(D.TotalHours,0) AS TotalHours,IFNULL(D.CompleteHours,0) AS CompleteHours,IFNULL(B.ClassStatus,0) AS ClassStatus
FROM RB_Student_OrderGuest AS A LEFT JOIN rb_class AS B ON A.ClassId=B.ClassId
LEFT JOIN rb_order AS C ON A.OrderId=C.OrderId
LEFT JOIN rb_order_guest AS D ON A.GuestId=D.Id
,C.OrderState,IFNULL(D.TotalHours,0) AS TotalHours,IFNULL(D.CompleteHours,0) AS CompleteHours,IFNULL(B.ClassStatus,0) AS ClassStatus,IFNULL(D.RenewState,0) AS RenewState
FROM RB_Student_OrderGuest AS A INNER JOIN rb_class AS B ON A.ClassId=B.ClassId
INNER JOIN rb_order AS C ON A.OrderId=C.OrderId
INNER JOIN rb_order_guest AS D ON A.GuestId=D.Id
WHERE 1=1
");
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Student_OrderGuest_ViewModel.Status), (int)DateStateEnum.Normal);
......
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