Commit 85c9a8d4 authored by 黄奎's avatar 黄奎

页面修改

parent 03237050
......@@ -25,6 +25,11 @@ namespace Edu.Model.ViewModel.Exam
/// </summary>
public int IsQueryWrong { get; set; }
/// <summary>
/// 是否查询已复习的
/// </summary>
public int IsQueryReview { get; set; }
/// <summary>
/// 分类编号
/// </summary>
......
......@@ -1335,6 +1335,8 @@ namespace Edu.Module.Customer
List<MarketChannelStaticModel> schoolDataList = new List<MarketChannelStaticModel>();
List<MarketChannelStaticModel> innerDataList = new List<MarketChannelStaticModel>();
List<MarketChannelStaticModel> transDataList = new List<MarketChannelStaticModel>();
//签约渠道
List<MarketChannelStaticModel> contractDataList = new List<MarketChannelStaticModel>();
foreach (var item in enumList)
{
if (item.Id == (int)StuCreateTypeEnum.EmployeeInput)
......@@ -1363,10 +1365,10 @@ namespace Edu.Module.Customer
var tempCusList = dataList?.Where(qitem => qitem.CreateType == StuCreateTypeEnum.CustomerInput && qitem.CategoryId == subItem.CategoryId)?.ToList();
var tempCustomer = customerList?.FirstOrDefault(qitem => qitem.CategoryId == subItem.CategoryId);
string channelName = tempCustomer?.CategoryName ?? "其他";
if (sItem.CatetoryType == CatetoryTypeEnum.Company)
//舒翰
if (subItem.CategoryId == 88)
{
customerDataList.Add(new MarketChannelStaticModel()
contractDataList.Add(new MarketChannelStaticModel()
{
ChannelName = channelName,
ChannelId = subItem.CategoryId,
......@@ -1376,17 +1378,32 @@ namespace Edu.Module.Customer
OrderIncome = tempCusList?.Sum(qitem => qitem.OrderIncome) ?? 0
});
}
if (sItem.CatetoryType == CatetoryTypeEnum.School)
else
{
schoolDataList.Add(new MarketChannelStaticModel()
if (sItem.CatetoryType == CatetoryTypeEnum.Company)
{
ChannelName = channelName,
ChannelId = subItem.CategoryId,
ClueCount = tempCusList?.Count() ?? 0,
VisitCount = tempCusList?.Sum(qitem => qitem.VisitCount) ?? 0,
OrderCount = tempCusList?.Sum(qitem => qitem.OrderCount) ?? 0,
OrderIncome = tempCusList?.Sum(qitem => qitem.OrderIncome) ?? 0
});
customerDataList.Add(new MarketChannelStaticModel()
{
ChannelName = channelName,
ChannelId = subItem.CategoryId,
ClueCount = tempCusList?.Count() ?? 0,
VisitCount = tempCusList?.Sum(qitem => qitem.VisitCount) ?? 0,
OrderCount = tempCusList?.Sum(qitem => qitem.OrderCount) ?? 0,
OrderIncome = tempCusList?.Sum(qitem => qitem.OrderIncome) ?? 0
});
}
if (sItem.CatetoryType == CatetoryTypeEnum.School)
{
schoolDataList.Add(new MarketChannelStaticModel()
{
ChannelName = channelName,
ChannelId = subItem.CategoryId,
ClueCount = tempCusList?.Count() ?? 0,
VisitCount = tempCusList?.Sum(qitem => qitem.VisitCount) ?? 0,
OrderCount = tempCusList?.Sum(qitem => qitem.OrderCount) ?? 0,
OrderIncome = tempCusList?.Sum(qitem => qitem.OrderIncome) ?? 0
});
}
}
}
}
......@@ -1448,6 +1465,7 @@ namespace Edu.Module.Customer
schoolDataList,
innerDataList,
transDataList,
contractDataList,
};
}
......
......@@ -1175,6 +1175,12 @@ namespace Edu.Module.Exam
int wordsWrongStartId = 0;
var list = student_PracticeRepository.GetStudentPracticeWrongStaticRepository(query);
var studuList = student_PracticeRepository.GetStudentPracticeListRepository(new RB_Student_Practice_Extend()
{
StudentId = query.StudentId,
IsQueryReview=1,
LevelType=query.LevelType
});
if (list != null && list.Count > 0)
{
var tempReadingList = list?.Where(qitem => qitem.Category == Common.Enum.Course.QuestionCategoryEnum.ReadingChoose)?.ToList();
......@@ -1183,11 +1189,24 @@ namespace Edu.Module.Exam
readingWrongTotalCount = tempReadingList.Sum(qitem => qitem.WrongCount);
}
var tempFinishReadingList = studuList?.Where(qitem => qitem.Category == Common.Enum.Course.QuestionCategoryEnum.ReadingChoose)?.ToList();
if (tempFinishReadingList != null && tempFinishReadingList.Count > 0)
{
readingWrongFinishCount = tempFinishReadingList.Count;
readingWrongStartId = tempFinishReadingList.Max(qitem => qitem.Id);
}
var tempListeningList = list?.Where(qitem => qitem.Category == Common.Enum.Course.QuestionCategoryEnum.Listening)?.ToList();
if (tempListeningList != null && tempListeningList.Count > 0)
{
listeningWrongTotalCount = tempListeningList.Sum(qitem => qitem.WrongCount);
}
var tempFinishListeningList = studuList?.Where(qitem => qitem.Category == Common.Enum.Course.QuestionCategoryEnum.Listening)?.ToList();
if (tempFinishListeningList != null && tempFinishListeningList.Count > 0)
{
listeningWrongFinishCount = tempFinishListeningList.Count;
listeningWrongStartId = tempFinishListeningList.Max(qitem => qitem.Id);
}
var tempGrammarList = list?.Where(qitem => qitem.Category == Common.Enum.Course.QuestionCategoryEnum.ChooseGrammarUse)?.ToList();
if (tempGrammarList != null && tempGrammarList.Count > 0)
......@@ -1195,6 +1214,13 @@ namespace Edu.Module.Exam
grammarWrongTotalCount = tempGrammarList.Sum(qitem => qitem.WrongCount);
}
var tempFinishGrammarList = studuList?.Where(qitem => qitem.Category == Common.Enum.Course.QuestionCategoryEnum.ChooseGrammarUse)?.ToList();
if (tempFinishGrammarList != null && tempFinishGrammarList.Count > 0)
{
grammarWrongFinishCount = tempFinishGrammarList.Count;
grammarWrongStartId = tempFinishGrammarList.Max(qitem => qitem.Id);
}
var tempWordsList = list?.Where(qitem =>
qitem.Category == Common.Enum.Course.QuestionCategoryEnum.ChooseWord
|| qitem.Category == Common.Enum.Course.QuestionCategoryEnum.ChooseMean
......@@ -1204,6 +1230,16 @@ namespace Edu.Module.Exam
{
wordsWrongTotalCount = tempWordsList.Sum(qitem => qitem.WrongCount);
}
var tempFinishWordsList = studuList?.Where(qitem =>
qitem.Category == Common.Enum.Course.QuestionCategoryEnum.ChooseWord
|| qitem.Category == Common.Enum.Course.QuestionCategoryEnum.ChooseMean
|| qitem.Category == Common.Enum.Course.QuestionCategoryEnum.ChooseWordUse)?.ToList();
if (tempFinishWordsList != null && tempFinishWordsList.Count > 0)
{
wordsWrongFinishCount = tempFinishWordsList.Count;
wordsWrongStartId = tempFinishWordsList.Max(qitem => qitem.Id);
}
}
var obj = new
{
......@@ -1234,10 +1270,6 @@ namespace Edu.Module.Exam
public List<RB_Student_Practice_Extend> GetPracticeWrongPageModule(int pageIndex, int pageSize, out long rowsCount, RB_Student_Practice_Extend query)
{
var list = student_PracticeRepository.GetStudentPracticePageRepository(pageIndex, pageSize, out rowsCount, query);
if (list != null && list.Count > 0)
{
}
return list;
}
......
......@@ -35,6 +35,10 @@ WHERE 1=1
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Student_Practice_Extend.Category), query.Category);
}
if (!string.IsNullOrEmpty(query.QCategoryIds))
{
builder.AppendFormat(" AND A.{0} IN({1}) ", nameof(RB_Student_Practice_Extend.Category), query.QCategoryIds);
}
if (query.LevelType > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Student_Practice_Extend.LevelType), (int)query.LevelType);
......@@ -43,6 +47,10 @@ WHERE 1=1
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Student_Practice_Extend.QuestionId), query.QuestionId);
}
if (query.IsQueryReview == 1)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Student_Practice_Extend.IsReview), 1);
}
}
return Get<RB_Student_Practice_Extend>(builder.ToString()).ToList();
}
......
......@@ -3128,6 +3128,11 @@ namespace Edu.WebApi.Controllers.User
{
list = JsonHelper.DeserializeObject<List<MarketChannelStaticModel>>(dataObj.GetStringValue("transDataList"));
}
//签约渠道
if (queryType == 5)
{
list = JsonHelper.DeserializeObject<List<MarketChannelStaticModel>>(dataObj.GetStringValue("contractDataList"));
}
int index = 1;
foreach (var item in list)
......
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