Commit 83deee39 authored by liudong1993's avatar liudong1993

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

parents 8ff638e1 803af54b
......@@ -4873,6 +4873,7 @@ namespace Edu.Module.Course
{
List<object> subList = new List<object>();
var tempSubList = checkList?.Where(qitem => qitem.OrderId == item.OrderId)?.OrderByDescending(qitem => qitem.ClassDate)?.ToList();
var tempOrder = stuOrderList?.FirstOrDefault(qitem => qitem.OrderId == item.OrderId);
list.Add(new
{
item.OrderId,
......@@ -4881,6 +4882,8 @@ namespace Edu.Module.Course
item.RoomName,
item.TeacherName,
item.TeacherHead,
TotalHours= tempOrder?.TotalHours??0,
CompleteHours= tempOrder?.CompleteHours??0,
SubList = tempSubList?.Select(qitem => new
{
ClassData = Common.ConvertHelper.FormatDate2(qitem.ClassDate),
......
......@@ -37,6 +37,11 @@ namespace Edu.Repository.User
/// </summary>
private readonly RB_StageRepository stageRepository = new RB_StageRepository();
/// <summary>
/// 同业客户仓储层对象
/// </summary>
private readonly RB_CustomerRepository customerRepository = new RB_CustomerRepository();
/// <summary>
/// 获取学生列表
/// </summary>
......@@ -166,10 +171,7 @@ WHERE 1=1
{
builder.AppendFormat(" AND t.{0}={1} ", nameof(RB_Student_ViewModel.AreaId), query.AreaId);
}
if (query.CreateBy > 0)
{
builder.AppendFormat(" AND t.{0}={1} ", nameof(RB_Student_ViewModel.CreateBy), query.CreateBy);
}
if (query.StuStage > 0)
{
builder.AppendFormat(" AND t.{0}={1} ", nameof(RB_Student_ViewModel.StuStage), (int)query.StuStage);
......@@ -199,17 +201,28 @@ WHERE 1=1
//全部
if (query.BelongType == 1)
{
builder.AppendFormat(@"
AND ( t.CreateBy={0}
OR t.StuId IN (SELECT StuId FROM rb_student_assist WHERE AssistId={0} AND `Status`=0)
)
", query.CreateBy);
}
//我负责的
if (query.BelongType == 2)
if (query.BelongType == 2 && query.CreateBy>0)
{
builder.AppendFormat(" AND t.{0}={1} ", nameof(RB_Student_ViewModel.CreateBy), query.CreateBy);
}
//我协同的
if (query.BelongType == 3)
{
builder.AppendFormat(" AND t.StuId IN (SELECT StuId FROM rb_student_assist WHERE AssistId={0} AND `Status`=0) ", query.CreateBy);
}
}
else
{
if (query.CreateBy > 0)
{
builder.AppendFormat(" AND t.{0}={1} ", nameof(RB_Student_ViewModel.CreateBy), query.CreateBy);
}
}
}
......@@ -342,7 +355,25 @@ WHERE o.OrderState=1 and og.`Status`=0 and sog.`Status`=0 and og.GuestState=1 an
}
if (oldModel.StuSourceId != model.StuSourceId)
{
logContent += string.Format("来源人:由【{0}】=>【{1}】,", oldModel.StuSourceId, model.StuSourceId);
string oldName = "";
string newName = "";
if (oldModel.CreateType == Common.Enum.User.StuCreateTypeEnum.InternalIntroduction)
{
oldName = accountRepository.GetEmployeeInfo(oldModel.StuSourceId)?.EmployeeName ?? "";
}
if (oldModel.CreateType == Common.Enum.User.StuCreateTypeEnum.TransIntroduction)
{
oldName = customerRepository.GetEntity(oldModel.StuSourceId)?.CustomerName ?? "";
}
if (model.CreateType == Common.Enum.User.StuCreateTypeEnum.InternalIntroduction)
{
newName = accountRepository.GetEmployeeInfo(model.StuSourceId)?.EmployeeName ?? "";
}
if (model.CreateType == Common.Enum.User.StuCreateTypeEnum.TransIntroduction)
{
newName = customerRepository.GetEntity(model.StuSourceId)?.CustomerName ?? "";
}
logContent += string.Format("来源人:由【{0}】=>【{1}】,", oldName, newName);
}
Dictionary<string, object> fileds = new Dictionary<string, object>()
{
......@@ -537,10 +568,7 @@ WHERE 1=1
{
builder.AppendFormat(" AND t.{0}={1} ", nameof(RB_Student_ViewModel.Group_Id), query.Group_Id);
}
if (query.School_Id > -1)
{
builder.AppendFormat(" AND t.{0}={1} ", nameof(RB_Student_ViewModel.School_Id), query.School_Id);
}
if (!string.IsNullOrWhiteSpace(query.StuTel))
{
builder.AppendFormat(" AND t.{0}='{1}' ", nameof(RB_Student_ViewModel.StuTel), query.StuTel);
......
......@@ -62,6 +62,8 @@ namespace Edu.WebApi.Controllers.B2BApp
GuestName=base.ParmJObj.GetStringValue("GuestName"),
Q_StudentId=base.ParmJObj.GetInt("Q_StudentId"),
};
//query.Q_StudentId = 0;
//query.CustomerId = 0;
var list = orderModule.GetMyOrderPageList(pageModel.PageIndex, pageModel.PageSize, out long rowsCount, query);
List<RB_Class_Time_ViewModel> timeList = new List<RB_Class_Time_ViewModel>();
List<RB_Customer_BalanceDetail_ViewModel> balanceList = new List<RB_Customer_BalanceDetail_ViewModel>();
......@@ -124,7 +126,7 @@ namespace Edu.WebApi.Controllers.B2BApp
{
var customer = base.AppletCustomerInfo;
int StuId = base.ParmJObj.GetInt("StuId");
//StuId = 0;
var obj = classModule.AppCustomerGetClassPlan(StuId);
return ApiResult.Success(data: obj);
}
......
......@@ -52,7 +52,7 @@ namespace Edu.WebApi.Controllers.Duty
};
if (query.IsQueryAll != 1)
{
query.CreateBy = base.UserInfo.Id;
// query.CreateBy = base.UserInfo.Id;
}
var list = visitorReserveModule.GetVisitorReservePageModule(pageModel.PageIndex, pageModel.PageSize, out long rowsCount, query);
foreach (var item in list)
......
......@@ -675,6 +675,7 @@ namespace Edu.WebApi.Controllers.User
{
query.CreateBy = base.UserInfo.Id;
}
int PlanId = base.ParmJObj.GetInt("PlanId");
if (PlanId > 0)
{
......
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