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

页面修改

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