Commit 039227e6 authored by 黄奎's avatar 黄奎

页面修改

parent f791d6e5
......@@ -3,6 +3,7 @@ using Edu.Common.Plugin;
using Edu.Model.CacheModel;
using Edu.Model.Entity.User;
using Edu.Model.ViewModel.Customer;
using Edu.Model.ViewModel.DataStatistics;
using Edu.Model.ViewModel.User;
using Edu.Repository.Customer;
using Edu.Repository.System;
......@@ -103,7 +104,6 @@ namespace Edu.Module.User
var TotalData = student_OrderGuestRepository.GetStudentFollowUpStat(demodel);
//查询每月续费介绍情况
var ROList = student_RenewOrderRepository.GetStuMonthList(demodel.Group_Id);
//学习目的
string goalIds = string.Join(",", slist.Select(qitem => qitem.StuPurpose));
var goalList = learningGoalsRepository.GetLearningGoalsListRepository(new Model.ViewModel.System.RB_LearningGoals_Extend()
......@@ -241,48 +241,40 @@ namespace Edu.Module.User
item.StuChannelName = channelList?.FirstOrDefault(qitem => qitem.Id == item.StuChannel)?.Name ?? "";
item.StuPurposeName = goalList?.FirstOrDefault(qitem => qitem.Id == item.StuPurpose)?.Name ?? "";
item.AdvisorList = advisorList?.Where(qitem => qitem.StuId == item.StuId)?.ToList();
var StuObj = new
var followModel = new StudentFollowStatic()
{
item.StuId,
item.StuName,
item.StuTel,
item.StuRealMobile,
StuId = item.StuId,
StuName = item.StuName,
StuTel = item.StuTel,
StuRealMobile = item.StuRealMobile,
ContractSTime = item.followUpTime,
item.CourseName,
CourseName = item.CourseName,
JapanBaseInfo = item.JapanBaseInfo.ToName(),
item.StuBirthStr,
item.StuGuestState,
StuBirthStr = item.StuBirthStr,
StuGuestState = item.StuGuestState,
StuGuestStateName = item.StuGuestState.ToName(),
MonthList = MonthObjList,
item.CreateBy,
item.CreateByName,
AssistList = item.AssistList.Select(qitem => new
{
qitem.Id,
qitem.StuId,
qitem.AssistId,
qitem.AssistName,
qitem.AssistType,
AssistTypeName = qitem.AssistType.ToName()
}),
item.StuChannel,
item.StuChannelName,
item.CreateType,
CreateBy = item.CreateBy,
CreateByName = item.CreateByName,
AssistList = item.AssistList,
StuChannel = item.StuChannel,
StuChannelName = item.StuChannelName,
CreateType=item.CreateType,
CreateTypeName = item.CreateType.ToName(),
item.StuSourceId,
item.StuSourceIdName,
item.EnterpriseName,
item.StuPurpose,
item.StuPurposeName,
item.AdvisorWinRate,
item.AdvisorExpectDate,
item.AdvisorStatus,
item.AdvisorStatusName,
item.AdvisorList,
StuSourceId= item.StuSourceId,
StuSourceIdName= item.StuSourceIdName,
EnterpriseName= item.EnterpriseName,
StuPurpose= item.StuPurpose,
StuPurposeName= item.StuPurposeName,
AdvisorWinRate= item.AdvisorWinRate,
AdvisorExpectDate = item.AdvisorExpectDate,
AdvisorStatus=item.AdvisorStatus,
AdvisorStatusName= item.AdvisorStatusName,
AdvisorList=item.AdvisorList,
BeginClassDate = Common.ConvertHelper.FormatDate(item.BeginClassDate),
GraduationTime = Common.ConvertHelper.FormatDate(item.GraduationTime),
};
RList.Add(StuObj);
RList.Add(followModel);
}
//续费 学员介绍
List<object> RList2 = new List<object>();
......
......@@ -95,8 +95,13 @@ WHERE 1=1
/// <returns></returns>
public List<RB_Student_Follow_Extend> GetStudentFollowUpMonthList(string stuIds, int group_Id)
{
string sql = $@"SELECT f.*,f1.Remark,f1.CreateTime FROM
(SELECT StuId,AssistType,DATE_FORMAT(CreateTime,'%Y-%m') as MonthStr,MAX(Id) AS Id FROM rb_student_follow WHERE Group_Id ={group_Id} and `Status` =0 and StuId in ({stuIds}) and AssistType in(2,4)
string sql = $@"
SELECT f.*,f1.Remark,f1.CreateTime
FROM
(
SELECT StuId,AssistType,DATE_FORMAT(CreateTime,'%Y-%m') as MonthStr,MAX(Id) AS Id
FROM rb_student_follow
WHERE Group_Id ={group_Id} and `Status` =0 and StuId in ({stuIds}) AND AssistType in(2,4)
GROUP BY StuId,AssistType,DATE_FORMAT(CreateTime,'%Y-%m')
) f
INNER JOIN rb_student_follow f1 on f.Id = f1.Id
......@@ -112,11 +117,13 @@ INNER JOIN rb_student_follow f1 on f.Id = f1.Id
/// <returns></returns>
public List<RB_Student_Follow_Extend> GetStudentRenewMonthList(string stuIds, int group_Id)
{
string sql = $@"SELECT s.StuId,DATE_FORMAT(o.CreateTime,'%Y-%m') AS MonthStr FROM rb_student s
INNER JOIN rb_student_orderguest sog on s.StuId = sog.Student_Id
INNER JOIN rb_order o on sog.OrderId = o.OrderId
INNER JOIN rb_order_guest og on og.Id = sog.GuestId
where s.Group_Id ={group_Id} and s.`Status` =0 and sog.`Status` =0 and o.OrderState <>3 and (o.RenewOrderId >0 or og.RenewState =2) and s.StuId in({stuIds})
string sql = $@"
SELECT s.StuId,DATE_FORMAT(o.CreateTime,'%Y-%m') AS MonthStr
FROM rb_student s
INNER JOIN rb_student_orderguest sog on s.StuId = sog.Student_Id
INNER JOIN rb_order o on sog.OrderId = o.OrderId
INNER JOIN rb_order_guest og on og.Id = sog.GuestId
WHERE s.Group_Id ={group_Id} and s.`Status` =0 and sog.`Status` =0 and o.OrderState <>3 and (o.RenewOrderId >0 or og.RenewState =2) and s.StuId in({stuIds})
GROUP BY s.StuId,DATE_FORMAT(o.CreateTime,'%Y-%m')
";
return Get<RB_Student_Follow_Extend>(sql).ToList();
......@@ -130,10 +137,12 @@ GROUP BY s.StuId,DATE_FORMAT(o.CreateTime,'%Y-%m')
/// <returns></returns>
public List<RB_Student_Follow_Extend> GetStudentIntroductionMonthList(string stuIds, int group_Id)
{
string sql = $@"SELECT s.StuSourceId as StuId,DATE_FORMAT(o.CreateTime,'%Y-%m') AS MonthStr,COUNT(0) AS StuNum FROM rb_student s
INNER JOIN rb_student_orderguest sog on s.StuId = sog.Student_Id
INNER JOIN rb_order o on sog.OrderId = o.OrderId
INNER JOIN rb_order_guest og on og.Id = sog.GuestId
string sql = $@"
SELECT s.StuSourceId as StuId,DATE_FORMAT(o.CreateTime,'%Y-%m') AS MonthStr,COUNT(0) AS StuNum
FROM rb_student s
INNER JOIN rb_student_orderguest sog on s.StuId = sog.Student_Id
INNER JOIN rb_order o on sog.OrderId = o.OrderId
INNER JOIN rb_order_guest og on og.Id = sog.GuestId
where s.Group_Id ={group_Id} and s.`Status` =0 and sog.`Status` =0 and o.OrderState <>3 and s.CreateType =4 and s.StuSourceId in({stuIds})
GROUP BY s.StuSourceId,DATE_FORMAT(o.CreateTime,'%Y-%m')
";
......
......@@ -45,8 +45,9 @@ WHERE 1=1
/// <returns></returns>
public List<RB_Student_RenewOrder_Extend> GetStuMonthList(int group_Id)
{
string sql = $@"SELECT r.Type,r.`Month`,COUNT(0) as OrderNum FROM rb_student_reneworder r
INNER JOIN rb_order o on r.OrderId = o.OrderId
string sql = $@"
SELECT r.Type,r.`Month`,COUNT(0) as OrderNum
FROM rb_student_reneworder r INNER JOIN rb_order o on r.OrderId = o.OrderId
WHERE r.Group_Id ={group_Id} and r.`Status` =0 and o.OrderState <>3
GROUP BY r.Type,r.`Month`";
return Get<RB_Student_RenewOrder_Extend>(sql).ToList();
......
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