Commit 98eb4c32 authored by 黄奎's avatar 黄奎

页面修改

parent ea044bd0
...@@ -275,5 +275,14 @@ namespace Edu.Model.Entity.User ...@@ -275,5 +275,14 @@ namespace Edu.Model.Entity.User
/// </summary> /// </summary>
public decimal GradeTestScore { get; set; } public decimal GradeTestScore { get; set; }
/// <summary>
/// 跟踪学员条数
/// </summary>
public decimal FinishFollow { get; set; }
/// <summary>
/// 总跟进条数
/// </summary>
public decimal TotalFollow { get; set; }
} }
} }
\ No newline at end of file
...@@ -30,25 +30,4 @@ namespace Edu.Model.ViewModel.User ...@@ -30,25 +30,4 @@ namespace Edu.Model.ViewModel.User
/// </summary> /// </summary>
public decimal AssessmentScore { get; set; } public decimal AssessmentScore { get; set; }
} }
/// <summary>
/// 老师跟踪信息
/// </summary>
public class TeacherFollow
{
/// <summary>
/// 教师编号
/// </summary>
public int TeacherId { get; set; }
/// <summary>
/// 跟踪学员条数
/// </summary>
public decimal FollowCount { get; set; }
/// <summary>
/// 完成次数
/// </summary>
public decimal FinishTimes { get; set; }
}
} }
...@@ -97,6 +97,16 @@ namespace Edu.Module.Customer ...@@ -97,6 +97,16 @@ namespace Edu.Module.Customer
consultant_DataRepository.ClearConsultantRepository(); consultant_DataRepository.ClearConsultantRepository();
} }
/// <summary>
/// 检测指定日期是否已经生成数据
/// </summary>
/// <param name="Date"></param>
/// <returns></returns>
public bool CheckMarketDataModule(string Date)
{
return market_DataRepository.CheckMarketDataExistsRepository(Date);
}
/// <summary> /// <summary>
/// 生成市场部统计数据 /// 生成市场部统计数据
/// </summary> /// </summary>
...@@ -307,6 +317,19 @@ namespace Edu.Module.Customer ...@@ -307,6 +317,19 @@ namespace Edu.Module.Customer
} }
} }
/// <summary>
/// 检测指定日期是否已经生成数据
/// </summary>
/// <param name="Date"></param>
/// <returns></returns>
public bool CheckConsultantDataModule(string Date)
{
return consultant_DataRepository.CheckConsultantDataExistsRepository(Date);
}
/// <summary> /// <summary>
/// 生成课程顾问部数据 /// 生成课程顾问部数据
/// </summary> /// </summary>
......
...@@ -259,18 +259,18 @@ namespace Edu.Module.User ...@@ -259,18 +259,18 @@ namespace Edu.Module.User
AssistList = item.AssistList, AssistList = item.AssistList,
StuChannel = item.StuChannel, StuChannel = item.StuChannel,
StuChannelName = item.StuChannelName, StuChannelName = item.StuChannelName,
CreateType=item.CreateType, CreateType = item.CreateType,
CreateTypeName = item.CreateType.ToName(), CreateTypeName = item.CreateType.ToName(),
StuSourceId= item.StuSourceId, StuSourceId = item.StuSourceId,
StuSourceIdName= item.StuSourceIdName, StuSourceIdName = item.StuSourceIdName,
EnterpriseName= item.EnterpriseName, EnterpriseName = item.EnterpriseName,
StuPurpose= item.StuPurpose, StuPurpose = item.StuPurpose,
StuPurposeName= item.StuPurposeName, StuPurposeName = item.StuPurposeName,
AdvisorWinRate= item.AdvisorWinRate, AdvisorWinRate = item.AdvisorWinRate,
AdvisorExpectDate = item.AdvisorExpectDate, AdvisorExpectDate = item.AdvisorExpectDate,
AdvisorStatus=item.AdvisorStatus, AdvisorStatus = item.AdvisorStatus,
AdvisorStatusName= item.AdvisorStatusName, AdvisorStatusName = item.AdvisorStatusName,
AdvisorList=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),
}; };
...@@ -3045,6 +3045,16 @@ namespace Edu.Module.User ...@@ -3045,6 +3045,16 @@ namespace Edu.Module.User
return yearList; return yearList;
} }
/// <summary>
/// 检测指定日期是否已经生成统计数据
/// </summary>
/// <param name="Date"></param>
/// <returns></returns>
public bool CheckStudentStaticModule(string Date)
{
return student_StaticRepository.CheckStudentStaticExistsRepository(Date);
}
/// <summary> /// <summary>
/// 生成每天数据 /// 生成每天数据
/// </summary> /// </summary>
...@@ -3362,6 +3372,17 @@ namespace Edu.Module.User ...@@ -3362,6 +3372,17 @@ namespace Edu.Module.User
#endregion #endregion
#region 市场部客户数据统计 #region 市场部客户数据统计
/// <summary>
/// 检测指定日期是否已经生成数据
/// </summary>
/// <param name="Date"></param>
/// <returns></returns>
public bool CheckStudentMarketModule(string Date)
{
return student_MarketRepository.CheckStudentMarketExistsRepository(Date);
}
/// <summary> /// <summary>
/// 生成市场部每天数据 /// 生成市场部每天数据
/// </summary> /// </summary>
...@@ -6286,7 +6307,7 @@ namespace Edu.Module.User ...@@ -6286,7 +6307,7 @@ namespace Edu.Module.User
StudyOrderMoney = Math.Round(monthList?.Average(qitem => qitem.StudyOrderMoney) ?? 0, 2), StudyOrderMoney = Math.Round(monthList?.Average(qitem => qitem.StudyOrderMoney) ?? 0, 2),
OrderNotMoney = Math.Round(monthList?.Average(qitem => qitem.OrderNotMoney) ?? 0, 2), OrderNotMoney = Math.Round(monthList?.Average(qitem => qitem.OrderNotMoney) ?? 0, 2),
StudyOrderNotMoney = Math.Round(monthList?.Average(qitem => qitem.StudyOrderNotMoney) ?? 0, 2), StudyOrderNotMoney = Math.Round(monthList?.Average(qitem => qitem.StudyOrderNotMoney) ?? 0, 2),
ClassStudentCount= Math.Round(monthList?.Average(qitem => qitem.ClassStudentCount) ?? 0, 2), ClassStudentCount = Math.Round(monthList?.Average(qitem => qitem.ClassStudentCount) ?? 0, 2),
}; };
var sumModel = new RB_Student_Company_Extend() var sumModel = new RB_Student_Company_Extend()
...@@ -6325,7 +6346,7 @@ namespace Edu.Module.User ...@@ -6325,7 +6346,7 @@ namespace Edu.Module.User
StudyOrderMoney = monthList?.Sum(qitem => qitem.StudyOrderMoney) ?? 0, StudyOrderMoney = monthList?.Sum(qitem => qitem.StudyOrderMoney) ?? 0,
OrderNotMoney = monthList?.Sum(qitem => qitem.OrderNotMoney) ?? 0, OrderNotMoney = monthList?.Sum(qitem => qitem.OrderNotMoney) ?? 0,
StudyOrderNotMoney = monthList?.Sum(qitem => qitem.StudyOrderNotMoney) ?? 0, StudyOrderNotMoney = monthList?.Sum(qitem => qitem.StudyOrderNotMoney) ?? 0,
ClassStudentCount= monthList?.Sum(qitem => qitem.ClassStudentCount) ?? 0, ClassStudentCount = monthList?.Sum(qitem => qitem.ClassStudentCount) ?? 0,
}; };
monthList.Add(avgModel); monthList.Add(avgModel);
monthList.Add(sumModel); monthList.Add(sumModel);
...@@ -8545,6 +8566,17 @@ namespace Edu.Module.User ...@@ -8545,6 +8566,17 @@ namespace Edu.Module.User
return yearList; return yearList;
} }
/// <summary>
/// 检测指定日期是否已经生成数据
/// </summary>
/// <param name="Date"></param>
/// <returns></returns>
public bool CheckStudentCompanyModule (string Date)
{
return student_CompanyRepository.CheckStudentCompanyExistsRepository(Date);
}
/// <summary> /// <summary>
/// 生成全公司每天数据 /// 生成全公司每天数据
/// </summary> /// </summary>
...@@ -8895,7 +8927,7 @@ namespace Edu.Module.User ...@@ -8895,7 +8927,7 @@ namespace Edu.Module.User
{ {
if (item.Times == 1) if (item.Times == 1)
{ {
var lastMonthDay =new DateTime(item.YearStr,item.MonthStr,1).AddMonths(-1); var lastMonthDay = new DateTime(item.YearStr, item.MonthStr, 1).AddMonths(-1);
var lastMonthLastTimeList = student_StaticRepository.GetStudentStaticListRepository(new RB_Student_Static_Extend() var lastMonthLastTimeList = student_StaticRepository.GetStudentStaticListRepository(new RB_Student_Static_Extend()
{ {
YearStr = lastMonthDay.Year, YearStr = lastMonthDay.Year,
......
...@@ -96,17 +96,17 @@ namespace Edu.Module.User ...@@ -96,17 +96,17 @@ namespace Edu.Module.User
AttendClassHourScore = (item.AttendClassHourScore - firstModel.AttendClassHourScore) / firstModel.AttendClassHourScore * 100; AttendClassHourScore = (item.AttendClassHourScore - firstModel.AttendClassHourScore) / firstModel.AttendClassHourScore * 100;
} }
//decimal OnLineInteractive = 0; decimal OnLineInteractive = 0;
//if (firstModel.OnLineInteractive > 0) if (firstModel.OnLineInteractive > 0)
//{ {
// OnLineInteractive = (item.OnLineInteractive - firstModel.OnLineInteractive) / firstModel.OnLineInteractive * 100; OnLineInteractive = (item.OnLineInteractive - firstModel.OnLineInteractive) / firstModel.OnLineInteractive * 100;
//} }
//decimal OnLineInteractiveScore = 0; decimal OnLineInteractiveScore = 0;
//if (firstModel.OnLineInteractiveScore > 0) if (firstModel.OnLineInteractiveScore > 0)
//{ {
// OnLineInteractiveScore = (item.OnLineInteractiveScore - firstModel.OnLineInteractiveScore) / firstModel.OnLineInteractiveScore * 100; OnLineInteractiveScore = (item.OnLineInteractiveScore - firstModel.OnLineInteractiveScore) / firstModel.OnLineInteractiveScore * 100;
//} }
decimal Renew = 0; decimal Renew = 0;
if (firstModel.Renew > 0) if (firstModel.Renew > 0)
...@@ -288,8 +288,6 @@ namespace Edu.Module.User ...@@ -288,8 +288,6 @@ namespace Edu.Module.User
MiniAppTimeScore = (item.MiniAppTimeScore - firstModel.MiniAppTimeScore) / firstModel.MiniAppTimeScore * 100; MiniAppTimeScore = (item.MiniAppTimeScore - firstModel.MiniAppTimeScore) / firstModel.MiniAppTimeScore * 100;
} }
decimal ActivityNum = 0; decimal ActivityNum = 0;
if (firstModel.ActivityNum > 0) if (firstModel.ActivityNum > 0)
{ {
...@@ -337,6 +335,16 @@ namespace Edu.Module.User ...@@ -337,6 +335,16 @@ namespace Edu.Module.User
{ {
ScoreGap = (item.ScoreGap - firstModel.ScoreGap) / firstModel.ScoreGap * 100; ScoreGap = (item.ScoreGap - firstModel.ScoreGap) / firstModel.ScoreGap * 100;
} }
decimal FinishFollow = 0;
if (firstModel.FinishFollow > 0)
{
FinishFollow = (item.FinishFollow - firstModel.FinishFollow) / firstModel.FinishFollow * 100;
}
decimal TotalFollow = 0;
if (firstModel.TotalFollow > 0)
{
TotalFollow = (item.TotalFollow - firstModel.TotalFollow) / firstModel.TotalFollow * 100;
}
subObj = new subObj = new
{ {
...@@ -345,8 +353,8 @@ namespace Edu.Module.User ...@@ -345,8 +353,8 @@ namespace Edu.Module.User
StudentCount = Math.Round(StudentCount, 2) + "%", StudentCount = Math.Round(StudentCount, 2) + "%",
AttendClassHour = Math.Round(AttendClassHour, 2) + "%", AttendClassHour = Math.Round(AttendClassHour, 2) + "%",
AttendClassHourScore = Math.Round(AttendClassHourScore, 2) + "%", AttendClassHourScore = Math.Round(AttendClassHourScore, 2) + "%",
//OnLineInteractive = Math.Round(OnLineInteractive, 2) + "%", OnLineInteractive = Math.Round(OnLineInteractive, 2) + "%",
//OnLineInteractiveScore = Math.Round(OnLineInteractiveScore, 2) + "%", OnLineInteractiveScore = Math.Round(OnLineInteractiveScore, 2) + "%",
Renew = Math.Round(Renew, 2) + "%", Renew = Math.Round(Renew, 2) + "%",
RenewScore = Math.Round(RenewScore, 2) + "%", RenewScore = Math.Round(RenewScore, 2) + "%",
Upgrade = Math.Round(Upgrade, 2) + "%", Upgrade = Math.Round(Upgrade, 2) + "%",
...@@ -385,6 +393,8 @@ namespace Edu.Module.User ...@@ -385,6 +393,8 @@ namespace Edu.Module.User
AvgScore = Math.Round(AvgScore, 2) + "%", AvgScore = Math.Round(AvgScore, 2) + "%",
ScoreGap = Math.Round(ScoreGap, 2) + "%", ScoreGap = Math.Round(ScoreGap, 2) + "%",
ActivityNum = Math.Round(ActivityNum, 2) + "%", ActivityNum = Math.Round(ActivityNum, 2) + "%",
FinishFollow = Math.Round(FinishFollow, 2) + "%",
TotalFollow = Math.Round(TotalFollow, 2) + "%",
}; };
} }
firstModel = item; firstModel = item;
...@@ -394,20 +404,25 @@ namespace Edu.Module.User ...@@ -394,20 +404,25 @@ namespace Edu.Module.User
+ firstModel.N2ClassHoursScore * 1 + firstModel.N1ClassHoursScore * 1 + firstModel.MiniAppPractiseScore + firstModel.MiniAppTimeScore + firstModel.N2ClassHoursScore * 1 + firstModel.N1ClassHoursScore * 1 + firstModel.MiniAppPractiseScore + firstModel.MiniAppTimeScore
+ firstModel.ActivityNum + firstModel.SpeakClassScore + firstModel.SpeakVipScore * 2 - firstModel.SpeakFailScore + firstModel.GradeTestScore + firstModel.ActivityNum + firstModel.SpeakClassScore + firstModel.SpeakVipScore * 2 - firstModel.SpeakFailScore + firstModel.GradeTestScore
//+ firstModel.N5ClassHoursScore * 1 + firstModel.N4ClassHoursScore * 2 + firstModel.N3ClassHoursScore * 3 //+ firstModel.N5ClassHoursScore * 1 + firstModel.N4ClassHoursScore * 2 + firstModel.N3ClassHoursScore * 3
//+ firstModel.OnLineInteractiveScore + firstModel.OnLineInteractiveScore
); );
firstModel.AvgScore = Math.Round(firstModel.TotalScore / teacherCount, 2); firstModel.AvgScore = Math.Round(firstModel.TotalScore / teacherCount, 2);
firstModel.ScoreGap = firstModel.TotalScore - firstModel.AvgScore; firstModel.ScoreGap = firstModel.TotalScore - firstModel.AvgScore;
index++; index++;
} }
if (item.TotalFollow > 0)
{
item.OnLineInteractive = Math.Round((Convert.ToDecimal(item.FinishFollow) / Convert.ToDecimal(item.TotalFollow) * 10), 2);
}
item.OnLineInteractiveScore = item.OnLineInteractive;
item.TotalScore = (item.StudentCount + item.AttendClassHourScore + item.RenewScore item.TotalScore = (item.StudentCount + item.AttendClassHourScore + item.RenewScore
+ item.UpgradeScore + item.TransScore + item.TrialSpeakScore - item.TruancyScore - item.WithdrawsScore - item.ComplaintScore + item.UpgradeScore + item.TransScore + item.TrialSpeakScore - item.TruancyScore - item.WithdrawsScore - item.ComplaintScore
- item.TeacherBeLateScore - item.TeacherBeLateScore
+ item.N2ClassHoursScore * 1 + item.N1ClassHoursScore * 1 + item.MiniAppPractiseScore + item.MiniAppTimeScore + item.N2ClassHoursScore * 1 + item.N1ClassHoursScore * 1 + item.MiniAppPractiseScore + item.MiniAppTimeScore
+ item.ActivityNum + item.SpeakClassScore + item.SpeakVipScore * 2 - item.SpeakFailScore + item.GradeTestScore + item.ActivityNum + item.SpeakClassScore + item.SpeakVipScore * 2 - item.SpeakFailScore + item.GradeTestScore
//+item.N5ClassHoursScore * 1 + item.N4ClassHoursScore * 2 + item.N3ClassHoursScore * 3 + item.OnLineInteractiveScore
//+ item.OnLineInteractiveScore
); );
item.AvgScore = Math.Round(item.TotalScore / teacherCount, 2); item.AvgScore = Math.Round(item.TotalScore / teacherCount, 2);
item.ScoreGap = item.TotalScore - item.AvgScore; item.ScoreGap = item.TotalScore - item.AvgScore;
...@@ -418,8 +433,8 @@ namespace Edu.Module.User ...@@ -418,8 +433,8 @@ namespace Edu.Module.User
item.StudentCount, item.StudentCount,
item.AttendClassHour, item.AttendClassHour,
item.AttendClassHourScore, item.AttendClassHourScore,
//item.OnLineInteractive, item.OnLineInteractive,
//item.OnLineInteractiveScore, item.OnLineInteractiveScore,
item.Renew, item.Renew,
item.RenewScore, item.RenewScore,
item.Upgrade, item.Upgrade,
...@@ -458,6 +473,8 @@ namespace Edu.Module.User ...@@ -458,6 +473,8 @@ namespace Edu.Module.User
item.SpeakVipScore, item.SpeakVipScore,
item.SpeakFailScore, item.SpeakFailScore,
item.GradeTestScore, item.GradeTestScore,
item.TotalFollow,
item.FinishFollow,
}); });
if (DateStr.Contains("总数") && index > 1) if (DateStr.Contains("总数") && index > 1)
{ {
...@@ -472,8 +489,8 @@ namespace Edu.Module.User ...@@ -472,8 +489,8 @@ namespace Edu.Module.User
StudentCount = tempList?.Sum(qitem => qitem.StudentCount), StudentCount = tempList?.Sum(qitem => qitem.StudentCount),
AttendClassHour = tempList?.Sum(qitem => qitem.AttendClassHour), AttendClassHour = tempList?.Sum(qitem => qitem.AttendClassHour),
AttendClassHourScore = tempList?.Sum(qitem => qitem.AttendClassHourScore), AttendClassHourScore = tempList?.Sum(qitem => qitem.AttendClassHourScore),
//OnLineInteractive = tempList?.Sum(qitem => qitem.OnLineInteractive), OnLineInteractive = tempList?.Sum(qitem => qitem.OnLineInteractive),
//OnLineInteractiveScore = tempList?.Sum(qitem => qitem.OnLineInteractiveScore), OnLineInteractiveScore = tempList?.Sum(qitem => qitem.OnLineInteractiveScore),
Renew = tempList?.Sum(qitem => qitem.Renew), Renew = tempList?.Sum(qitem => qitem.Renew),
RenewScore = tempList?.Sum(qitem => qitem.RenewScore), RenewScore = tempList?.Sum(qitem => qitem.RenewScore),
Upgrade = tempList?.Sum(qitem => qitem.Upgrade), Upgrade = tempList?.Sum(qitem => qitem.Upgrade),
...@@ -512,6 +529,8 @@ namespace Edu.Module.User ...@@ -512,6 +529,8 @@ namespace Edu.Module.User
SpeakVipScore = tempList?.Sum(qitem => qitem.SpeakVipScore), SpeakVipScore = tempList?.Sum(qitem => qitem.SpeakVipScore),
SpeakFailScore = tempList?.Sum(qitem => qitem.SpeakFailScore), SpeakFailScore = tempList?.Sum(qitem => qitem.SpeakFailScore),
GradeTestScore = tempList?.Sum(qitem => qitem.GradeTestScore), GradeTestScore = tempList?.Sum(qitem => qitem.GradeTestScore),
FinishFollow = tempList?.Sum(qitem => qitem.FinishFollow),
TotalFollow = tempList?.Sum(qitem => qitem.TotalFollow),
}); });
} }
return dataList; return dataList;
...@@ -556,9 +575,7 @@ namespace Edu.Module.User ...@@ -556,9 +575,7 @@ namespace Edu.Module.User
{ {
qDate += DateTime.Now.Month; qDate += DateTime.Now.Month;
} }
qDate += "-01";
//跟踪列表
var followList = teacher_StaticRepository.GetTeacherFollowByProcRepository(qDate);
//老师考核数据 //老师考核数据
var teacherAssessmentList = teacher_AssessmentRepository.GetTeacherAssessmentListRepository(new RB_Teacher_Assessment_Extend() var teacherAssessmentList = teacher_AssessmentRepository.GetTeacherAssessmentListRepository(new RB_Teacher_Assessment_Extend()
{ {
...@@ -571,23 +588,29 @@ namespace Edu.Module.User ...@@ -571,23 +588,29 @@ namespace Edu.Module.User
{ {
foreach (var item in list) foreach (var item in list)
{ {
var tempFollow = followList.Where(qitem => qitem.TeacherId == item.TeacherId)?.FirstOrDefault();
var tempAssessment = teacherAssessmentList?.Where(qitem => qitem.TeacherId == item.TeacherId)?.FirstOrDefault(); var tempAssessment = teacherAssessmentList?.Where(qitem => qitem.TeacherId == item.TeacherId)?.FirstOrDefault();
item.AssessmentScore = tempAssessment?.TotalScore ?? 0; item.AssessmentScore = tempAssessment?.TotalScore ?? 0;
item.OnLineInteractive = 0;
if (item.TotalFollow > 0)
{
item.OnLineInteractive = Math.Round((Convert.ToDecimal(item.FinishFollow) / Convert.ToDecimal(item.TotalFollow) * 10), 2);
}
item.OnLineInteractiveScore = item.OnLineInteractive;
item.TotalScore = (item.StudentCount + item.AttendClassHourScore + item.RenewScore item.TotalScore = (item.StudentCount + item.AttendClassHourScore + item.RenewScore
+ item.UpgradeScore + item.TransScore + item.TrialSpeakScore - item.TruancyScore - item.WithdrawsScore - item.ComplaintScore + item.UpgradeScore + item.TransScore + item.TrialSpeakScore - item.TruancyScore - item.WithdrawsScore - item.ComplaintScore
- item.TeacherBeLateScore + item.MiniAppPractiseScore + item.MiniAppTimeScore - item.TeacherBeLateScore + item.MiniAppPractiseScore + item.MiniAppTimeScore
+ item.N2ClassHoursScore * 1 + item.N1ClassHoursScore * 1 + item.N2ClassHoursScore * 1 + item.N1ClassHoursScore * 1
+ item.ActivityNum + (tempFollow?.FinishTimes ?? 0) + item.AssessmentScore + item.ActivityNum +item.OnLineInteractiveScore+ item.AssessmentScore
+ item.SpeakClassScore+item.SpeakVipScore*2-item.SpeakFailScore+ item.GradeTestScore + item.SpeakClassScore + item.SpeakVipScore * 2 - item.SpeakFailScore + item.GradeTestScore
//+ item.N5ClassHoursScore * 1 + item.N4ClassHoursScore * 2 + item.N3ClassHoursScore * 3
//+ item.OnLineInteractiveScore
); );
} }
foreach (var item in list) foreach (var item in list)
{ {
var tempFollow = followList.Where(qitem => qitem.TeacherId == item.TeacherId)?.FirstOrDefault();
var tempAssessment = teacherAssessmentList?.Where(qitem => qitem.TeacherId == item.TeacherId)?.FirstOrDefault(); var tempAssessment = teacherAssessmentList?.Where(qitem => qitem.TeacherId == item.TeacherId)?.FirstOrDefault();
int teacherCount = 1; int teacherCount = 1;
var teacherModel = teacherList.FirstOrDefault(qitem => qitem.AccountId == item.TeacherId); var teacherModel = teacherList.FirstOrDefault(qitem => qitem.AccountId == item.TeacherId);
...@@ -595,26 +618,26 @@ namespace Edu.Module.User ...@@ -595,26 +618,26 @@ namespace Edu.Module.User
var tempDataList = new List<RB_Teacher_Static_Extend>(); var tempDataList = new List<RB_Teacher_Static_Extend>();
if (teacherModel != null) if (teacherModel != null)
{ {
DateStr= teacherModel.AccountName; DateStr = teacherModel.AccountName;
string teacherIds = string.Join(",", teacherList.Where(qitem => qitem.Dept_Id == teacherModel.Dept_Id).Select(qitem => qitem.AccountId)); string teacherIds = string.Join(",", teacherList.Where(qitem => qitem.Dept_Id == teacherModel.Dept_Id).Select(qitem => qitem.AccountId));
teacherCount = list.Where(qitem => qitem.TotalScore>0 && teacherIds.Contains(item.TeacherId.ToString())).Count(); teacherCount = list.Where(qitem => qitem.TotalScore > 0 && teacherIds.Contains(item.TeacherId.ToString())).Count();
tempDataList = list.Where(qitem => teacherIds.Contains(item.TeacherId.ToString()))?.ToList(); tempDataList = list.Where(qitem => teacherIds.Contains(item.TeacherId.ToString()))?.ToList();
} }
item.AvgScore = Math.Round((tempDataList?.Sum(qitem=>qitem.TotalScore)??0) / teacherCount, 2); item.AvgScore = Math.Round((tempDataList?.Sum(qitem => qitem.TotalScore) ?? 0) / teacherCount, 2);
item.ScoreGap = item.TotalScore - item.AvgScore; item.ScoreGap = item.TotalScore - item.AvgScore;
dataList.Add(new dataList.Add(new
{ {
item.Id, item.Id,
item.TeacherId, item.TeacherId,
AccountId= teacherModel?.Id??0, AccountId = teacherModel?.Id ?? 0,
Dept_Id= teacherModel?.Dept_Id??0, Dept_Id = teacherModel?.Dept_Id ?? 0,
DateStr, DateStr,
item.StudentCount, item.StudentCount,
item.AttendClassHour, item.AttendClassHour,
item.AttendClassHourScore, item.AttendClassHourScore,
//item.OnLineInteractive, item.OnLineInteractive,
//item.OnLineInteractiveScore, item.OnLineInteractiveScore,
item.Renew, item.Renew,
item.RenewScore, item.RenewScore,
item.Upgrade, item.Upgrade,
...@@ -649,8 +672,8 @@ namespace Edu.Module.User ...@@ -649,8 +672,8 @@ namespace Edu.Module.User
item.AvgScore, item.AvgScore,
item.ScoreGap, item.ScoreGap,
item.ActivityNum, item.ActivityNum,
FinishTimes= tempFollow?.FinishTimes??0, item.FinishFollow,
FollowCount = tempFollow?.FollowCount ?? 0, item.TotalFollow,
item.AssessmentScore, item.AssessmentScore,
item.SpeakClassScore, item.SpeakClassScore,
item.SpeakVipScore, item.SpeakVipScore,
...@@ -662,15 +685,15 @@ namespace Edu.Module.User ...@@ -662,15 +685,15 @@ namespace Edu.Module.User
dataList.Add(new dataList.Add(new
{ {
Id = 0, Id = 0,
TeacherId=0, TeacherId = 0,
AccountId =0, AccountId = 0,
Dept_Id =0, Dept_Id = 0,
DateStr = "月总数", DateStr = "月总数",
StudentCount = tempList?.Sum(qitem => qitem.StudentCount), StudentCount = tempList?.Sum(qitem => qitem.StudentCount),
AttendClassHour = tempList?.Sum(qitem => qitem.AttendClassHour), AttendClassHour = tempList?.Sum(qitem => qitem.AttendClassHour),
AttendClassHourScore = tempList?.Sum(qitem => qitem.AttendClassHourScore), AttendClassHourScore = tempList?.Sum(qitem => qitem.AttendClassHourScore),
//OnLineInteractive = tempList?.Sum(qitem => qitem.OnLineInteractive), OnLineInteractive = tempList?.Sum(qitem => qitem.OnLineInteractive),
//OnLineInteractiveScore = tempList?.Sum(qitem => qitem.OnLineInteractiveScore), OnLineInteractiveScore = tempList?.Sum(qitem => qitem.OnLineInteractiveScore),
Renew = tempList?.Sum(qitem => qitem.Renew), Renew = tempList?.Sum(qitem => qitem.Renew),
RenewScore = tempList?.Sum(qitem => qitem.RenewScore), RenewScore = tempList?.Sum(qitem => qitem.RenewScore),
Upgrade = tempList?.Sum(qitem => qitem.Upgrade), Upgrade = tempList?.Sum(qitem => qitem.Upgrade),
...@@ -705,8 +728,8 @@ namespace Edu.Module.User ...@@ -705,8 +728,8 @@ namespace Edu.Module.User
AvgScore = tempList?.Sum(qitem => qitem.AvgScore), AvgScore = tempList?.Sum(qitem => qitem.AvgScore),
ScoreGap = tempList?.Sum(qitem => qitem.ScoreGap), ScoreGap = tempList?.Sum(qitem => qitem.ScoreGap),
ActivityNum = tempList?.Sum(qitem => qitem.ActivityNum), ActivityNum = tempList?.Sum(qitem => qitem.ActivityNum),
FinishTimes = followList?.Sum(qitem => qitem.FinishTimes), FinishFollow = tempList?.Sum(qitem => qitem.FinishFollow),
FollowCount = followList?.Sum(qitem => qitem.FollowCount), TotalFollow = tempList?.Sum(qitem => qitem.TotalFollow),
AssessmentScore = tempList?.Sum(qitem => qitem.AssessmentScore), AssessmentScore = tempList?.Sum(qitem => qitem.AssessmentScore),
SpeakClassScore = tempList?.Sum(qitem => qitem.SpeakClassScore), SpeakClassScore = tempList?.Sum(qitem => qitem.SpeakClassScore),
SpeakVipScore = tempList?.Sum(qitem => qitem.SpeakVipScore), SpeakVipScore = tempList?.Sum(qitem => qitem.SpeakVipScore),
...@@ -772,7 +795,7 @@ namespace Edu.Module.User ...@@ -772,7 +795,7 @@ namespace Edu.Module.User
AvgScore = tempData?.AvgScore ?? 0, AvgScore = tempData?.AvgScore ?? 0,
ScoreGap = tempData?.ScoreGap ?? 0, ScoreGap = tempData?.ScoreGap ?? 0,
ActivityNum = tempData?.ActivityNum ?? 0, ActivityNum = tempData?.ActivityNum ?? 0,
SpeakClassScore= tempData?.SpeakClassScore ?? 0, SpeakClassScore = tempData?.SpeakClassScore ?? 0,
SpeakVipScore = tempData?.SpeakVipScore ?? 0, SpeakVipScore = tempData?.SpeakVipScore ?? 0,
SpeakFailScore = tempData?.SpeakFailScore ?? 0, SpeakFailScore = tempData?.SpeakFailScore ?? 0,
GradeTestScore = tempData?.GradeTestScore ?? 0, GradeTestScore = tempData?.GradeTestScore ?? 0,
...@@ -2836,6 +2859,16 @@ namespace Edu.Module.User ...@@ -2836,6 +2859,16 @@ namespace Edu.Module.User
return yearList; return yearList;
} }
/// <summary>
/// 检测指定日期是否已经生成数据
/// </summary>
/// <param name="Date"></param>
/// <returns></returns>
public bool CheckTeacherStaticExistsModule(string Date)
{
return teacher_StaticRepository.CheckTeacherStaticExistsRepository(Date);
}
/// <summary> /// <summary>
/// 生成教师行为每天数据 /// 生成教师行为每天数据
/// </summary> /// </summary>
...@@ -2867,13 +2900,11 @@ namespace Edu.Module.User ...@@ -2867,13 +2900,11 @@ namespace Edu.Module.User
int Days = (endTime - date).Days; int Days = (endTime - date).Days;
for (int i = 0; i < Days; i++) for (int i = 0; i < Days; i++)
{ {
var newDate = date.AddDays(i); var newDate = date.AddDays(i);
Common.Plugin.LogHelper.Write("开始:"+Common.ConvertHelper.FormatDate(newDate));
//获取老师迟到早退信息 //获取老师迟到早退信息
checkList = Edu.ThirdCore.QYWinXin.QYWeiXinHelper.GetWeChatCheckList(workUserIds, newDate); checkList = Edu.ThirdCore.QYWinXin.QYWeiXinHelper.GetWeChatCheckList(workUserIds, newDate);
//获取老师与学员沟通次数 //获取老师与学员沟通次数
messageList = Edu.ThirdCore.QYWinXin.QYWeiXinHelper.GetWechatStudentStatic(workUserIds, newDate); //messageList = Edu.ThirdCore.QYWinXin.QYWeiXinHelper.GetWechatStudentStatic(workUserIds, newDate);
int times = 1; int times = 1;
int newDay = newDate.Day; int newDay = newDate.Day;
//本月最后一天 //本月最后一天
...@@ -2915,9 +2946,14 @@ namespace Edu.Module.User ...@@ -2915,9 +2946,14 @@ namespace Edu.Module.User
YearStr = newDate.Year, YearStr = newDate.Year,
MonthStr = newDate.Month, MonthStr = newDate.Month,
TeacherId = item.AccountId, TeacherId = item.AccountId,
FinishFollow= procModel?.FinishFollow??0,
TotalFollow = procModel?.TotalFollow ?? 0,
}; };
//newModel.OnLineInteractive = messageList.Where(qitem => qitem.Acctid == item.WorkUserId)?.FirstOrDefault()?.MessageCount ?? 0; if (newModel.TotalFollow > 0)
//newModel.OnLineInteractiveScore = newModel.OnLineInteractive; {
newModel.OnLineInteractive = Math.Round((Convert.ToDecimal(newModel.FinishFollow) / Convert.ToDecimal(newModel.TotalFollow) * 10), 2);
}
newModel.OnLineInteractive = newModel.OnLineInteractiveScore;
//newModel.N5ClassHours = procModel?.N5ClassHours ?? 0; //newModel.N5ClassHours = procModel?.N5ClassHours ?? 0;
//newModel.N5ClassHoursScore = procModel?.N5ClassHoursScore ?? 0; //newModel.N5ClassHoursScore = procModel?.N5ClassHoursScore ?? 0;
//newModel.N4ClassHours = procModel?.N4ClassHours ?? 0; //newModel.N4ClassHours = procModel?.N4ClassHours ?? 0;
...@@ -2927,12 +2963,13 @@ namespace Edu.Module.User ...@@ -2927,12 +2963,13 @@ namespace Edu.Module.User
//newModel.TrialSpeak = procModel?.TrialSpeak ?? 0; //newModel.TrialSpeak = procModel?.TrialSpeak ?? 0;
//newModel.TrialSpeakScore = procModel?.TrialSpeakScore ?? 0; //newModel.TrialSpeakScore = procModel?.TrialSpeakScore ?? 0;
newModel.SpeakClassScore= procModel?.SpeakClassScore ?? 0; newModel.SpeakClassScore = procModel?.SpeakClassScore ?? 0;
newModel.SpeakVipScore = procModel?.SpeakVipScore ?? 0; newModel.SpeakVipScore = procModel?.SpeakVipScore ?? 0;
newModel.SpeakFailScore = procModel?.SpeakFailScore ?? 0; newModel.SpeakFailScore = procModel?.SpeakFailScore ?? 0;
newModel.GradeTestScore = procModel?.GradeTestScore ?? 0; newModel.GradeTestScore = procModel?.GradeTestScore ?? 0;
//HK 2022-05-05 徐总要求 修改为0
newModel.TeacherBeLate = checkList.Where(qitem=>qitem.Acctid==item.WorkUserId)?.Where(qitem => qitem.ExceptionCount > 0)?.Count() ?? 0; newModel.StudentCount = 0;
newModel.TeacherBeLate = checkList.Where(qitem => qitem.Acctid == item.WorkUserId)?.Where(qitem => qitem.ExceptionCount > 0)?.Count() ?? 0;
newModel.TeacherBeLateScore = newModel.TeacherBeLate; newModel.TeacherBeLateScore = newModel.TeacherBeLate;
newModel.TotalScore = (newModel.StudentCount + newModel.AttendClassHourScore + newModel.RenewScore newModel.TotalScore = (newModel.StudentCount + newModel.AttendClassHourScore + newModel.RenewScore
+ newModel.UpgradeScore + newModel.TransScore + newModel.UpgradeScore + newModel.TransScore
...@@ -2940,13 +2977,10 @@ namespace Edu.Module.User ...@@ -2940,13 +2977,10 @@ namespace Edu.Module.User
+ newModel.MiniAppPractiseScore + newModel.MiniAppTimeScore + newModel.MiniAppPractiseScore + newModel.MiniAppTimeScore
+ newModel.ActivityNum + newModel.N2ClassHoursScore * 1 + newModel.N1ClassHoursScore * 1 + newModel.ActivityNum + newModel.N2ClassHoursScore * 1 + newModel.N1ClassHoursScore * 1
+ newModel.SpeakClassScore + newModel.SpeakVipScore * 2 - newModel.SpeakFailScore + newModel.GradeTestScore + newModel.SpeakClassScore + newModel.SpeakVipScore * 2 - newModel.SpeakFailScore + newModel.GradeTestScore
// + newModel.N5ClassHoursScore * 1 + newModel.N4ClassHoursScore * 2 + newModel.N3ClassHoursScore * 3 + newModel.OnLineInteractiveScore
// + newModel.OnLineInteractiveScore + newModel.TrialSpeakScore
); );
newModel.AvgScore = Math.Round(newModel.TotalScore / teacherCount, 2); newModel.AvgScore = Math.Round(newModel.TotalScore / teacherCount, 2);
newModel.ScoreGap = newModel.TotalScore - newModel.AvgScore; newModel.ScoreGap = newModel.TotalScore - newModel.AvgScore;
if (newDay >= 1 && newDay <= 10) if (newDay >= 1 && newDay <= 10)
{ {
times = 1; times = 1;
...@@ -2967,16 +3001,15 @@ namespace Edu.Module.User ...@@ -2967,16 +3001,15 @@ namespace Edu.Module.User
StudentCount = lastMonthLastTimeList?.Sum(qitem => qitem.StudentCount) ?? 0, StudentCount = lastMonthLastTimeList?.Sum(qitem => qitem.StudentCount) ?? 0,
AttendClassHour = lastMonthLastTimeList?.Sum(qitem => qitem.AttendClassHour) ?? 0, AttendClassHour = lastMonthLastTimeList?.Sum(qitem => qitem.AttendClassHour) ?? 0,
AttendClassHourScore = lastMonthLastTimeList?.Sum(qitem => qitem.AttendClassHourScore) ?? 0, AttendClassHourScore = lastMonthLastTimeList?.Sum(qitem => qitem.AttendClassHourScore) ?? 0,
//OnLineInteractive = lastMonthLastTimeList?.Sum(qitem => qitem.OnLineInteractive) ?? 0, OnLineInteractive = lastMonthLastTimeList?.Sum(qitem => qitem.OnLineInteractive) ?? 0,
//OnLineInteractiveScore = lastMonthLastTimeList?.Sum(qitem => qitem.OnLineInteractiveScore) ?? 0, OnLineInteractiveScore = lastMonthLastTimeList?.Sum(qitem => qitem.OnLineInteractiveScore) ?? 0,
Renew = lastMonthLastTimeList?.Sum(qitem => qitem.Renew) ?? 0, Renew = lastMonthLastTimeList?.Sum(qitem => qitem.Renew) ?? 0,
RenewScore = lastMonthLastTimeList?.Sum(qitem => qitem.RenewScore) ?? 0, RenewScore = lastMonthLastTimeList?.Sum(qitem => qitem.RenewScore) ?? 0,
Upgrade = lastMonthLastTimeList?.Sum(qitem => qitem.Upgrade) ?? 0, Upgrade = lastMonthLastTimeList?.Sum(qitem => qitem.Upgrade) ?? 0,
UpgradeScore = lastMonthLastTimeList?.Sum(qitem => qitem.UpgradeScore) ?? 0, UpgradeScore = lastMonthLastTimeList?.Sum(qitem => qitem.UpgradeScore) ?? 0,
Trans = lastMonthLastTimeList?.Sum(qitem => qitem.Trans) ?? 0, Trans = lastMonthLastTimeList?.Sum(qitem => qitem.Trans) ?? 0,
TransScore = lastMonthLastTimeList?.Sum(qitem => qitem.TransScore) ?? 0, TransScore = lastMonthLastTimeList?.Sum(qitem => qitem.TransScore) ?? 0,
//TrialSpeak = lastMonthLastTimeList?.Sum(qitem => qitem.TrialSpeak) ?? 0,
//TrialSpeakScore = lastMonthLastTimeList?.Sum(qitem => qitem.TrialSpeakScore) ?? 0,
Truancy = lastMonthLastTimeList?.Sum(qitem => qitem.Truancy) ?? 0, Truancy = lastMonthLastTimeList?.Sum(qitem => qitem.Truancy) ?? 0,
TruancyScore = lastMonthLastTimeList?.Sum(qitem => qitem.TruancyScore) ?? 0, TruancyScore = lastMonthLastTimeList?.Sum(qitem => qitem.TruancyScore) ?? 0,
Withdraws = lastMonthLastTimeList?.Sum(qitem => qitem.Withdraws) ?? 0, Withdraws = lastMonthLastTimeList?.Sum(qitem => qitem.Withdraws) ?? 0,
...@@ -3007,6 +3040,8 @@ namespace Edu.Module.User ...@@ -3007,6 +3040,8 @@ namespace Edu.Module.User
SpeakVipScore = lastMonthLastTimeList?.Sum(qitem => qitem.SpeakVipScore) ?? 0, SpeakVipScore = lastMonthLastTimeList?.Sum(qitem => qitem.SpeakVipScore) ?? 0,
SpeakFailScore = lastMonthLastTimeList?.Sum(qitem => qitem.SpeakFailScore) ?? 0, SpeakFailScore = lastMonthLastTimeList?.Sum(qitem => qitem.SpeakFailScore) ?? 0,
GradeTestScore = lastMonthLastTimeList?.Sum(qitem => qitem.GradeTestScore) ?? 0, GradeTestScore = lastMonthLastTimeList?.Sum(qitem => qitem.GradeTestScore) ?? 0,
FinishFollow = lastMonthLastTimeList?.Sum(qitem => qitem.FinishFollow) ?? 0,
TotalFollow = lastMonthLastTimeList?.LastOrDefault()?.TotalFollow ?? 0,
YearStr = newDate.Year, YearStr = newDate.Year,
MonthStr = newDate.Month, MonthStr = newDate.Month,
TeacherId = item.AccountId, TeacherId = item.AccountId,
...@@ -3038,16 +3073,15 @@ namespace Edu.Module.User ...@@ -3038,16 +3073,15 @@ namespace Edu.Module.User
StudentCount = curMonthFirstTimeList?.Sum(qitem => qitem.StudentCount) ?? 0, StudentCount = curMonthFirstTimeList?.Sum(qitem => qitem.StudentCount) ?? 0,
AttendClassHour = curMonthFirstTimeList?.Sum(qitem => qitem.AttendClassHour) ?? 0, AttendClassHour = curMonthFirstTimeList?.Sum(qitem => qitem.AttendClassHour) ?? 0,
AttendClassHourScore = curMonthFirstTimeList?.Sum(qitem => qitem.AttendClassHourScore) ?? 0, AttendClassHourScore = curMonthFirstTimeList?.Sum(qitem => qitem.AttendClassHourScore) ?? 0,
//OnLineInteractive = curMonthFirstTimeList?.Sum(qitem => qitem.OnLineInteractive) ?? 0, OnLineInteractive = curMonthFirstTimeList?.Sum(qitem => qitem.OnLineInteractive) ?? 0,
//OnLineInteractiveScore = curMonthFirstTimeList?.Sum(qitem => qitem.OnLineInteractiveScore) ?? 0, OnLineInteractiveScore = curMonthFirstTimeList?.Sum(qitem => qitem.OnLineInteractiveScore) ?? 0,
Renew = curMonthFirstTimeList?.Sum(qitem => qitem.Renew) ?? 0, Renew = curMonthFirstTimeList?.Sum(qitem => qitem.Renew) ?? 0,
RenewScore = curMonthFirstTimeList?.Sum(qitem => qitem.RenewScore) ?? 0, RenewScore = curMonthFirstTimeList?.Sum(qitem => qitem.RenewScore) ?? 0,
Upgrade = curMonthFirstTimeList?.Sum(qitem => qitem.Upgrade) ?? 0, Upgrade = curMonthFirstTimeList?.Sum(qitem => qitem.Upgrade) ?? 0,
UpgradeScore = curMonthFirstTimeList?.Sum(qitem => qitem.UpgradeScore) ?? 0, UpgradeScore = curMonthFirstTimeList?.Sum(qitem => qitem.UpgradeScore) ?? 0,
Trans = curMonthFirstTimeList?.Sum(qitem => qitem.Trans) ?? 0, Trans = curMonthFirstTimeList?.Sum(qitem => qitem.Trans) ?? 0,
TransScore = curMonthFirstTimeList?.Sum(qitem => qitem.TransScore) ?? 0, TransScore = curMonthFirstTimeList?.Sum(qitem => qitem.TransScore) ?? 0,
//TrialSpeak = curMonthFirstTimeList?.Sum(qitem => qitem.TrialSpeak) ?? 0,
//TrialSpeakScore = curMonthFirstTimeList?.Sum(qitem => qitem.TrialSpeakScore) ?? 0,
Truancy = curMonthFirstTimeList?.Sum(qitem => qitem.Truancy) ?? 0, Truancy = curMonthFirstTimeList?.Sum(qitem => qitem.Truancy) ?? 0,
TruancyScore = curMonthFirstTimeList?.Sum(qitem => qitem.TruancyScore) ?? 0, TruancyScore = curMonthFirstTimeList?.Sum(qitem => qitem.TruancyScore) ?? 0,
Withdraws = curMonthFirstTimeList?.Sum(qitem => qitem.Withdraws) ?? 0, Withdraws = curMonthFirstTimeList?.Sum(qitem => qitem.Withdraws) ?? 0,
...@@ -3078,6 +3112,8 @@ namespace Edu.Module.User ...@@ -3078,6 +3112,8 @@ namespace Edu.Module.User
SpeakVipScore = curMonthFirstTimeList?.Sum(qitem => qitem.SpeakVipScore) ?? 0, SpeakVipScore = curMonthFirstTimeList?.Sum(qitem => qitem.SpeakVipScore) ?? 0,
SpeakFailScore = curMonthFirstTimeList?.Sum(qitem => qitem.SpeakFailScore) ?? 0, SpeakFailScore = curMonthFirstTimeList?.Sum(qitem => qitem.SpeakFailScore) ?? 0,
GradeTestScore = curMonthFirstTimeList?.Sum(qitem => qitem.GradeTestScore) ?? 0, GradeTestScore = curMonthFirstTimeList?.Sum(qitem => qitem.GradeTestScore) ?? 0,
FinishFollow = curMonthFirstTimeList?.Sum(qitem => qitem.FinishFollow) ?? 0,
TotalFollow = curMonthFirstTimeList?.LastOrDefault()?.TotalFollow ?? 0,
YearStr = newDate.Year, YearStr = newDate.Year,
MonthStr = newDate.Month, MonthStr = newDate.Month,
TeacherId = item.AccountId, TeacherId = item.AccountId,
...@@ -3109,8 +3145,8 @@ namespace Edu.Module.User ...@@ -3109,8 +3145,8 @@ namespace Edu.Module.User
StudentCount = curMonthSecondTimeList?.Sum(qitem => qitem.StudentCount) ?? 0, StudentCount = curMonthSecondTimeList?.Sum(qitem => qitem.StudentCount) ?? 0,
AttendClassHour = curMonthSecondTimeList?.Sum(qitem => qitem.AttendClassHour) ?? 0, AttendClassHour = curMonthSecondTimeList?.Sum(qitem => qitem.AttendClassHour) ?? 0,
AttendClassHourScore = curMonthSecondTimeList?.Sum(qitem => qitem.AttendClassHourScore) ?? 0, AttendClassHourScore = curMonthSecondTimeList?.Sum(qitem => qitem.AttendClassHourScore) ?? 0,
//OnLineInteractive = curMonthSecondTimeList?.Sum(qitem => qitem.OnLineInteractive) ?? 0, OnLineInteractive = curMonthSecondTimeList?.Sum(qitem => qitem.OnLineInteractive) ?? 0,
//OnLineInteractiveScore = curMonthSecondTimeList?.Sum(qitem => qitem.OnLineInteractiveScore) ?? 0, OnLineInteractiveScore = curMonthSecondTimeList?.Sum(qitem => qitem.OnLineInteractiveScore) ?? 0,
Renew = curMonthSecondTimeList?.Sum(qitem => qitem.Renew) ?? 0, Renew = curMonthSecondTimeList?.Sum(qitem => qitem.Renew) ?? 0,
RenewScore = curMonthSecondTimeList?.Sum(qitem => qitem.RenewScore) ?? 0, RenewScore = curMonthSecondTimeList?.Sum(qitem => qitem.RenewScore) ?? 0,
Upgrade = curMonthSecondTimeList?.Sum(qitem => qitem.Upgrade) ?? 0, Upgrade = curMonthSecondTimeList?.Sum(qitem => qitem.Upgrade) ?? 0,
...@@ -3149,6 +3185,8 @@ namespace Edu.Module.User ...@@ -3149,6 +3185,8 @@ namespace Edu.Module.User
SpeakVipScore = curMonthSecondTimeList?.Sum(qitem => qitem.SpeakVipScore) ?? 0, SpeakVipScore = curMonthSecondTimeList?.Sum(qitem => qitem.SpeakVipScore) ?? 0,
SpeakFailScore = curMonthSecondTimeList?.Sum(qitem => qitem.SpeakFailScore) ?? 0, SpeakFailScore = curMonthSecondTimeList?.Sum(qitem => qitem.SpeakFailScore) ?? 0,
GradeTestScore = curMonthSecondTimeList?.Sum(qitem => qitem.GradeTestScore) ?? 0, GradeTestScore = curMonthSecondTimeList?.Sum(qitem => qitem.GradeTestScore) ?? 0,
FinishFollow = curMonthSecondTimeList?.Sum(qitem => qitem.FinishFollow) ?? 0,
TotalFollow = curMonthSecondTimeList?.LastOrDefault()?.TotalFollow ?? 0,
YearStr = newDate.Year, YearStr = newDate.Year,
MonthStr = newDate.Month, MonthStr = newDate.Month,
TeacherId = item.AccountId, TeacherId = item.AccountId,
...@@ -3188,16 +3226,14 @@ namespace Edu.Module.User ...@@ -3188,16 +3226,14 @@ namespace Edu.Module.User
StudentCount = curMonthThirdTimeList?.Sum(qitem => qitem.StudentCount) ?? 0, StudentCount = curMonthThirdTimeList?.Sum(qitem => qitem.StudentCount) ?? 0,
AttendClassHour = curMonthThirdTimeList?.Sum(qitem => qitem.AttendClassHour) ?? 0, AttendClassHour = curMonthThirdTimeList?.Sum(qitem => qitem.AttendClassHour) ?? 0,
AttendClassHourScore = curMonthThirdTimeList?.Sum(qitem => qitem.AttendClassHourScore) ?? 0, AttendClassHourScore = curMonthThirdTimeList?.Sum(qitem => qitem.AttendClassHourScore) ?? 0,
//OnLineInteractive = curMonthThirdTimeList?.Sum(qitem => qitem.OnLineInteractive) ?? 0,
//OnLineInteractiveScore = curMonthThirdTimeList?.Sum(qitem => qitem.OnLineInteractiveScore) ?? 0,
Renew = curMonthThirdTimeList?.Sum(qitem => qitem.Renew) ?? 0, Renew = curMonthThirdTimeList?.Sum(qitem => qitem.Renew) ?? 0,
RenewScore = curMonthThirdTimeList?.Sum(qitem => qitem.RenewScore) ?? 0, RenewScore = curMonthThirdTimeList?.Sum(qitem => qitem.RenewScore) ?? 0,
Upgrade = curMonthThirdTimeList?.Sum(qitem => qitem.Upgrade) ?? 0, Upgrade = curMonthThirdTimeList?.Sum(qitem => qitem.Upgrade) ?? 0,
UpgradeScore = curMonthThirdTimeList?.Sum(qitem => qitem.UpgradeScore) ?? 0, UpgradeScore = curMonthThirdTimeList?.Sum(qitem => qitem.UpgradeScore) ?? 0,
Trans = curMonthThirdTimeList?.Sum(qitem => qitem.Trans) ?? 0, Trans = curMonthThirdTimeList?.Sum(qitem => qitem.Trans) ?? 0,
TransScore = curMonthThirdTimeList?.Sum(qitem => qitem.TransScore) ?? 0, TransScore = curMonthThirdTimeList?.Sum(qitem => qitem.TransScore) ?? 0,
//TrialSpeak = curMonthThirdTimeList?.Sum(qitem => qitem.TrialSpeak) ?? 0,
//TrialSpeakScore = curMonthThirdTimeList?.Sum(qitem => qitem.TrialSpeakScore) ?? 0,
Truancy = curMonthThirdTimeList?.Sum(qitem => qitem.Truancy) ?? 0, Truancy = curMonthThirdTimeList?.Sum(qitem => qitem.Truancy) ?? 0,
TruancyScore = curMonthThirdTimeList?.Sum(qitem => qitem.TruancyScore) ?? 0, TruancyScore = curMonthThirdTimeList?.Sum(qitem => qitem.TruancyScore) ?? 0,
Withdraws = curMonthThirdTimeList?.Sum(qitem => qitem.Withdraws) ?? 0, Withdraws = curMonthThirdTimeList?.Sum(qitem => qitem.Withdraws) ?? 0,
...@@ -3228,6 +3264,8 @@ namespace Edu.Module.User ...@@ -3228,6 +3264,8 @@ namespace Edu.Module.User
SpeakVipScore = curMonthThirdTimeList?.Sum(qitem => qitem.SpeakVipScore) ?? 0, SpeakVipScore = curMonthThirdTimeList?.Sum(qitem => qitem.SpeakVipScore) ?? 0,
SpeakFailScore = curMonthThirdTimeList?.Sum(qitem => qitem.SpeakFailScore) ?? 0, SpeakFailScore = curMonthThirdTimeList?.Sum(qitem => qitem.SpeakFailScore) ?? 0,
GradeTestScore = curMonthThirdTimeList?.Sum(qitem => qitem.GradeTestScore) ?? 0, GradeTestScore = curMonthThirdTimeList?.Sum(qitem => qitem.GradeTestScore) ?? 0,
FinishFollow = curMonthThirdTimeList?.Sum(qitem => qitem.FinishFollow) ?? 0,
TotalFollow = curMonthThirdTimeList?.LastOrDefault()?.TotalFollow ?? 0,
YearStr = newDate.Year, YearStr = newDate.Year,
MonthStr = newDate.Month, MonthStr = newDate.Month,
TeacherId = item.AccountId, TeacherId = item.AccountId,
...@@ -3282,12 +3320,18 @@ namespace Edu.Module.User ...@@ -3282,12 +3320,18 @@ namespace Edu.Module.User
SpeakVipScore = procModelList?.Sum(qitem => qitem.SpeakVipScore) ?? 0, SpeakVipScore = procModelList?.Sum(qitem => qitem.SpeakVipScore) ?? 0,
SpeakFailScore = procModelList?.Sum(qitem => qitem.SpeakFailScore) ?? 0, SpeakFailScore = procModelList?.Sum(qitem => qitem.SpeakFailScore) ?? 0,
GradeTestScore = procModelList?.Sum(qitem => qitem.GradeTestScore) ?? 0, GradeTestScore = procModelList?.Sum(qitem => qitem.GradeTestScore) ?? 0,
FinishFollow = procModelList?.Sum(qitem => qitem.FinishFollow) ?? 0,
TotalFollow = procModelList?.LastOrDefault()?.TotalFollow??0,
YearStr = newDate.Year, YearStr = newDate.Year,
MonthStr = newDate.Month, MonthStr = newDate.Month,
TeacherId = 0, TeacherId = 0,
}; };
//newModel2.OnLineInteractive = messageList?.Sum(qitem => qitem.MessageCount) ?? 0; if (newModel2.TotalFollow > 0)
//newModel2.OnLineInteractiveScore = newModel2.OnLineInteractive; {
newModel2.OnLineInteractive = Math.Round((Convert.ToDecimal(newModel2.FinishFollow) / Convert.ToDecimal(newModel2.TotalFollow) * 10), 2);
}
newModel2.OnLineInteractiveScore = newModel2.OnLineInteractive;
newModel2.TeacherBeLate = checkList?.Where(qitem => qitem.ExceptionCount > 0)?.Count() ?? 0; newModel2.TeacherBeLate = checkList?.Where(qitem => qitem.ExceptionCount > 0)?.Count() ?? 0;
newModel2.TeacherBeLateScore = newModel2.TeacherBeLate; newModel2.TeacherBeLateScore = newModel2.TeacherBeLate;
...@@ -3297,8 +3341,7 @@ namespace Edu.Module.User ...@@ -3297,8 +3341,7 @@ namespace Edu.Module.User
- newModel2.TeacherBeLateScore + newModel2.MiniAppPractiseScore + newModel2.MiniAppTimeScore - newModel2.TeacherBeLateScore + newModel2.MiniAppPractiseScore + newModel2.MiniAppTimeScore
+ newModel2.ActivityNum + newModel2.N2ClassHoursScore * 1 + newModel2.N1ClassHoursScore * 1 + newModel2.ActivityNum + newModel2.N2ClassHoursScore * 1 + newModel2.N1ClassHoursScore * 1
+ newModel2.SpeakClassScore + newModel2.SpeakVipScore * 2 - newModel2.SpeakFailScore + newModel2.GradeTestScore + newModel2.SpeakClassScore + newModel2.SpeakVipScore * 2 - newModel2.SpeakFailScore + newModel2.GradeTestScore
//+ newModel2.N5ClassHoursScore * 1 + newModel2.N4ClassHoursScore * 2 + newModel2.N3ClassHoursScore * 3 + newModel2.OnLineInteractiveScore
//+ newModel2.OnLineInteractiveScore
); );
newModel2.AvgScore = Math.Round(newModel2.TotalScore / teacherCount, 2); newModel2.AvgScore = Math.Round(newModel2.TotalScore / teacherCount, 2);
newModel2.ScoreGap = newModel2.TotalScore - newModel2.AvgScore; newModel2.ScoreGap = newModel2.TotalScore - newModel2.AvgScore;
...@@ -3322,8 +3365,8 @@ namespace Edu.Module.User ...@@ -3322,8 +3365,8 @@ namespace Edu.Module.User
StudentCount = lastMonthLastTimeList?.Sum(qitem => qitem.StudentCount) ?? 0, StudentCount = lastMonthLastTimeList?.Sum(qitem => qitem.StudentCount) ?? 0,
AttendClassHour = lastMonthLastTimeList?.Sum(qitem => qitem.AttendClassHour) ?? 0, AttendClassHour = lastMonthLastTimeList?.Sum(qitem => qitem.AttendClassHour) ?? 0,
AttendClassHourScore = lastMonthLastTimeList?.Sum(qitem => qitem.AttendClassHourScore) ?? 0, AttendClassHourScore = lastMonthLastTimeList?.Sum(qitem => qitem.AttendClassHourScore) ?? 0,
//OnLineInteractive = lastMonthLastTimeList?.Sum(qitem => qitem.OnLineInteractive) ?? 0, OnLineInteractive = lastMonthLastTimeList?.Sum(qitem => qitem.OnLineInteractive) ?? 0,
//OnLineInteractiveScore = lastMonthLastTimeList?.Sum(qitem => qitem.OnLineInteractiveScore) ?? 0, OnLineInteractiveScore = lastMonthLastTimeList?.Sum(qitem => qitem.OnLineInteractiveScore) ?? 0,
Renew = lastMonthLastTimeList?.Sum(qitem => qitem.Renew) ?? 0, Renew = lastMonthLastTimeList?.Sum(qitem => qitem.Renew) ?? 0,
RenewScore = lastMonthLastTimeList?.Sum(qitem => qitem.RenewScore) ?? 0, RenewScore = lastMonthLastTimeList?.Sum(qitem => qitem.RenewScore) ?? 0,
Upgrade = lastMonthLastTimeList?.Sum(qitem => qitem.Upgrade) ?? 0, Upgrade = lastMonthLastTimeList?.Sum(qitem => qitem.Upgrade) ?? 0,
...@@ -3340,12 +3383,7 @@ namespace Edu.Module.User ...@@ -3340,12 +3383,7 @@ namespace Edu.Module.User
ComplaintScore = lastMonthLastTimeList?.Sum(qitem => qitem.ComplaintScore) ?? 0, ComplaintScore = lastMonthLastTimeList?.Sum(qitem => qitem.ComplaintScore) ?? 0,
TeacherBeLate = lastMonthLastTimeList?.Sum(qitem => qitem.TeacherBeLate) ?? 0, TeacherBeLate = lastMonthLastTimeList?.Sum(qitem => qitem.TeacherBeLate) ?? 0,
TeacherBeLateScore = lastMonthLastTimeList?.Sum(qitem => qitem.TeacherBeLateScore) ?? 0, TeacherBeLateScore = lastMonthLastTimeList?.Sum(qitem => qitem.TeacherBeLateScore) ?? 0,
//N5ClassHours = lastMonthLastTimeList?.Sum(qitem => qitem.N5ClassHours) ?? 0,
//N5ClassHoursScore = lastMonthLastTimeList?.Sum(qitem => qitem.N5ClassHoursScore) ?? 0,
//N4ClassHours = lastMonthLastTimeList?.Sum(qitem => qitem.N4ClassHours) ?? 0,
//N4ClassHoursScore = lastMonthLastTimeList?.Sum(qitem => qitem.N4ClassHoursScore) ?? 0,
//N3ClassHours = lastMonthLastTimeList?.Sum(qitem => qitem.N3ClassHours) ?? 0,
//N3ClassHoursScore = lastMonthLastTimeList?.Sum(qitem => qitem.N3ClassHoursScore) ?? 0,
N2ClassHours = lastMonthLastTimeList?.Sum(qitem => qitem.N2ClassHours) ?? 0, N2ClassHours = lastMonthLastTimeList?.Sum(qitem => qitem.N2ClassHours) ?? 0,
N2ClassHoursScore = lastMonthLastTimeList?.Sum(qitem => qitem.N2ClassHoursScore) ?? 0, N2ClassHoursScore = lastMonthLastTimeList?.Sum(qitem => qitem.N2ClassHoursScore) ?? 0,
N1ClassHours = lastMonthLastTimeList?.Sum(qitem => qitem.N1ClassHours) ?? 0, N1ClassHours = lastMonthLastTimeList?.Sum(qitem => qitem.N1ClassHours) ?? 0,
...@@ -3362,6 +3400,8 @@ namespace Edu.Module.User ...@@ -3362,6 +3400,8 @@ namespace Edu.Module.User
SpeakVipScore = lastMonthLastTimeList?.Sum(qitem => qitem.SpeakVipScore) ?? 0, SpeakVipScore = lastMonthLastTimeList?.Sum(qitem => qitem.SpeakVipScore) ?? 0,
SpeakFailScore = lastMonthLastTimeList?.Sum(qitem => qitem.SpeakFailScore) ?? 0, SpeakFailScore = lastMonthLastTimeList?.Sum(qitem => qitem.SpeakFailScore) ?? 0,
GradeTestScore = lastMonthLastTimeList?.Sum(qitem => qitem.GradeTestScore) ?? 0, GradeTestScore = lastMonthLastTimeList?.Sum(qitem => qitem.GradeTestScore) ?? 0,
FinishFollow = lastMonthLastTimeList?.Sum(qitem => qitem.FinishFollow) ?? 0,
TotalFollow = lastMonthLastTimeList?.LastOrDefault()?.TotalFollow??0,
YearStr = newDate.Year, YearStr = newDate.Year,
MonthStr = newDate.Month, MonthStr = newDate.Month,
TeacherId = 0, TeacherId = 0,
...@@ -3392,8 +3432,8 @@ namespace Edu.Module.User ...@@ -3392,8 +3432,8 @@ namespace Edu.Module.User
StudentCount = curMonthFirstTimeList?.Sum(qitem => qitem.StudentCount) ?? 0, StudentCount = curMonthFirstTimeList?.Sum(qitem => qitem.StudentCount) ?? 0,
AttendClassHour = curMonthFirstTimeList?.Sum(qitem => qitem.AttendClassHour) ?? 0, AttendClassHour = curMonthFirstTimeList?.Sum(qitem => qitem.AttendClassHour) ?? 0,
AttendClassHourScore = curMonthFirstTimeList?.Sum(qitem => qitem.AttendClassHourScore) ?? 0, AttendClassHourScore = curMonthFirstTimeList?.Sum(qitem => qitem.AttendClassHourScore) ?? 0,
//OnLineInteractive = curMonthFirstTimeList?.Sum(qitem => qitem.OnLineInteractive) ?? 0, OnLineInteractive = curMonthFirstTimeList?.Sum(qitem => qitem.OnLineInteractive) ?? 0,
//OnLineInteractiveScore = curMonthFirstTimeList?.Sum(qitem => qitem.OnLineInteractiveScore) ?? 0, OnLineInteractiveScore = curMonthFirstTimeList?.Sum(qitem => qitem.OnLineInteractiveScore) ?? 0,
Renew = curMonthFirstTimeList?.Sum(qitem => qitem.Renew) ?? 0, Renew = curMonthFirstTimeList?.Sum(qitem => qitem.Renew) ?? 0,
RenewScore = curMonthFirstTimeList?.Sum(qitem => qitem.RenewScore) ?? 0, RenewScore = curMonthFirstTimeList?.Sum(qitem => qitem.RenewScore) ?? 0,
Upgrade = curMonthFirstTimeList?.Sum(qitem => qitem.Upgrade) ?? 0, Upgrade = curMonthFirstTimeList?.Sum(qitem => qitem.Upgrade) ?? 0,
...@@ -3432,6 +3472,8 @@ namespace Edu.Module.User ...@@ -3432,6 +3472,8 @@ namespace Edu.Module.User
SpeakVipScore = curMonthFirstTimeList?.Sum(qitem => qitem.SpeakVipScore) ?? 0, SpeakVipScore = curMonthFirstTimeList?.Sum(qitem => qitem.SpeakVipScore) ?? 0,
SpeakFailScore = curMonthFirstTimeList?.Sum(qitem => qitem.SpeakFailScore) ?? 0, SpeakFailScore = curMonthFirstTimeList?.Sum(qitem => qitem.SpeakFailScore) ?? 0,
GradeTestScore = curMonthFirstTimeList?.Sum(qitem => qitem.GradeTestScore) ?? 0, GradeTestScore = curMonthFirstTimeList?.Sum(qitem => qitem.GradeTestScore) ?? 0,
FinishFollow = curMonthFirstTimeList?.Sum(qitem => qitem.FinishFollow) ?? 0,
TotalFollow = curMonthFirstTimeList?.LastOrDefault()?.TotalFollow ?? 0,
YearStr = newDate.Year, YearStr = newDate.Year,
MonthStr = newDate.Month, MonthStr = newDate.Month,
}; };
...@@ -3461,8 +3503,8 @@ namespace Edu.Module.User ...@@ -3461,8 +3503,8 @@ namespace Edu.Module.User
StudentCount = curMonthSecondTimeList?.Sum(qitem => qitem.StudentCount) ?? 0, StudentCount = curMonthSecondTimeList?.Sum(qitem => qitem.StudentCount) ?? 0,
AttendClassHour = curMonthSecondTimeList?.Sum(qitem => qitem.AttendClassHour) ?? 0, AttendClassHour = curMonthSecondTimeList?.Sum(qitem => qitem.AttendClassHour) ?? 0,
AttendClassHourScore = curMonthSecondTimeList?.Sum(qitem => qitem.AttendClassHourScore) ?? 0, AttendClassHourScore = curMonthSecondTimeList?.Sum(qitem => qitem.AttendClassHourScore) ?? 0,
//OnLineInteractive = curMonthSecondTimeList?.Sum(qitem => qitem.OnLineInteractive) ?? 0, OnLineInteractive = curMonthSecondTimeList?.Sum(qitem => qitem.OnLineInteractive) ?? 0,
//OnLineInteractiveScore = curMonthSecondTimeList?.Sum(qitem => qitem.OnLineInteractiveScore) ?? 0, OnLineInteractiveScore = curMonthSecondTimeList?.Sum(qitem => qitem.OnLineInteractiveScore) ?? 0,
Renew = curMonthSecondTimeList?.Sum(qitem => qitem.Renew) ?? 0, Renew = curMonthSecondTimeList?.Sum(qitem => qitem.Renew) ?? 0,
RenewScore = curMonthSecondTimeList?.Sum(qitem => qitem.RenewScore) ?? 0, RenewScore = curMonthSecondTimeList?.Sum(qitem => qitem.RenewScore) ?? 0,
Upgrade = curMonthSecondTimeList?.Sum(qitem => qitem.Upgrade) ?? 0, Upgrade = curMonthSecondTimeList?.Sum(qitem => qitem.Upgrade) ?? 0,
...@@ -3501,6 +3543,8 @@ namespace Edu.Module.User ...@@ -3501,6 +3543,8 @@ namespace Edu.Module.User
SpeakVipScore = curMonthSecondTimeList?.Sum(qitem => qitem.SpeakVipScore) ?? 0, SpeakVipScore = curMonthSecondTimeList?.Sum(qitem => qitem.SpeakVipScore) ?? 0,
SpeakFailScore = curMonthSecondTimeList?.Sum(qitem => qitem.SpeakFailScore) ?? 0, SpeakFailScore = curMonthSecondTimeList?.Sum(qitem => qitem.SpeakFailScore) ?? 0,
GradeTestScore = curMonthSecondTimeList?.Sum(qitem => qitem.GradeTestScore) ?? 0, GradeTestScore = curMonthSecondTimeList?.Sum(qitem => qitem.GradeTestScore) ?? 0,
FinishFollow = curMonthSecondTimeList?.Sum(qitem => qitem.FinishFollow) ?? 0,
TotalFollow = curMonthSecondTimeList?.LastOrDefault()?.TotalFollow ?? 0,
YearStr = newDate.Year, YearStr = newDate.Year,
MonthStr = newDate.Month, MonthStr = newDate.Month,
}; };
...@@ -3538,8 +3582,8 @@ namespace Edu.Module.User ...@@ -3538,8 +3582,8 @@ namespace Edu.Module.User
StudentCount = curMonthThirdTimeList?.Sum(qitem => qitem.StudentCount) ?? 0, StudentCount = curMonthThirdTimeList?.Sum(qitem => qitem.StudentCount) ?? 0,
AttendClassHour = curMonthThirdTimeList?.Sum(qitem => qitem.AttendClassHour) ?? 0, AttendClassHour = curMonthThirdTimeList?.Sum(qitem => qitem.AttendClassHour) ?? 0,
AttendClassHourScore = curMonthThirdTimeList?.Sum(qitem => qitem.AttendClassHourScore) ?? 0, AttendClassHourScore = curMonthThirdTimeList?.Sum(qitem => qitem.AttendClassHourScore) ?? 0,
//OnLineInteractive = curMonthThirdTimeList?.Sum(qitem => qitem.OnLineInteractive) ?? 0, OnLineInteractive = curMonthThirdTimeList?.Sum(qitem => qitem.OnLineInteractive) ?? 0,
//OnLineInteractiveScore = curMonthThirdTimeList?.Sum(qitem => qitem.OnLineInteractiveScore) ?? 0, OnLineInteractiveScore = curMonthThirdTimeList?.Sum(qitem => qitem.OnLineInteractiveScore) ?? 0,
Renew = curMonthThirdTimeList?.Sum(qitem => qitem.Renew) ?? 0, Renew = curMonthThirdTimeList?.Sum(qitem => qitem.Renew) ?? 0,
RenewScore = curMonthThirdTimeList?.Sum(qitem => qitem.RenewScore) ?? 0, RenewScore = curMonthThirdTimeList?.Sum(qitem => qitem.RenewScore) ?? 0,
Upgrade = curMonthThirdTimeList?.Sum(qitem => qitem.Upgrade) ?? 0, Upgrade = curMonthThirdTimeList?.Sum(qitem => qitem.Upgrade) ?? 0,
...@@ -3578,6 +3622,8 @@ namespace Edu.Module.User ...@@ -3578,6 +3622,8 @@ namespace Edu.Module.User
SpeakVipScore = curMonthThirdTimeList?.Sum(qitem => qitem.SpeakVipScore) ?? 0, SpeakVipScore = curMonthThirdTimeList?.Sum(qitem => qitem.SpeakVipScore) ?? 0,
SpeakFailScore = curMonthThirdTimeList?.Sum(qitem => qitem.SpeakFailScore) ?? 0, SpeakFailScore = curMonthThirdTimeList?.Sum(qitem => qitem.SpeakFailScore) ?? 0,
GradeTestScore = curMonthThirdTimeList?.Sum(qitem => qitem.GradeTestScore) ?? 0, GradeTestScore = curMonthThirdTimeList?.Sum(qitem => qitem.GradeTestScore) ?? 0,
FinishFollow = curMonthThirdTimeList?.Sum(qitem => qitem.FinishFollow) ?? 0,
TotalFollow = curMonthThirdTimeList?.LastOrDefault()?.TotalFollow ?? 0,
YearStr = newDate.Year, YearStr = newDate.Year,
MonthStr = newDate.Month, MonthStr = newDate.Month,
TeacherId = 0, TeacherId = 0,
......
...@@ -121,6 +121,23 @@ WHERE 1=1 ...@@ -121,6 +121,23 @@ WHERE 1=1
return newId > 0; return newId > 0;
} }
/// <summary>
/// 检测指定日期是否已经生成数据
/// </summary>
/// <param name="Date"></param>
/// <returns></returns>
public bool CheckConsultantDataExistsRepository(string Date)
{
int result = 0;
string sql = string.Format("SELECT COUNT(1) FROM RB_Consultant_Data WHERE DATE_FORMAT(Date,'%y/%m/%d')= DATE_FORMAT('{0}','%y/%m/%d') ", Date);
var obj = base.ExecuteScalar(sql);
if (obj != null)
{
Int32.TryParse(obj.ToString(), out result);
}
return result > 0;
}
/// <summary> /// <summary>
/// 清除课程顾问部历史数据 /// 清除课程顾问部历史数据
/// </summary> /// </summary>
......
...@@ -84,5 +84,7 @@ WHERE 1=1 ...@@ -84,5 +84,7 @@ WHERE 1=1
} }
return Get<RB_Consultant_Goal_Extend>(builder.ToString()).ToList(); return Get<RB_Consultant_Goal_Extend>(builder.ToString()).ToList();
} }
} }
} }
...@@ -111,6 +111,23 @@ WHERE 1=1 ...@@ -111,6 +111,23 @@ WHERE 1=1
return newId > 0; return newId > 0;
} }
/// <summary>
/// 检测指定日期是否已经生成数据
/// </summary>
/// <param name="Date"></param>
/// <returns></returns>
public bool CheckMarketDataExistsRepository(string Date)
{
int result = 0;
string sql = string.Format("SELECT COUNT(1) FROM RB_Market_Data WHERE DATE_FORMAT(Date,'%y/%m/%d')= DATE_FORMAT('{0}','%y/%m/%d') ", Date);
var obj = base.ExecuteScalar(sql);
if (obj != null)
{
Int32.TryParse(obj.ToString(), out result);
}
return result > 0;
}
/// <summary> /// <summary>
/// 清楚历史数据 /// 清楚历史数据
/// </summary> /// </summary>
......
...@@ -145,6 +145,23 @@ WHERE 1=1 AND A.Date<>'0001-01-01 00:00:00' ...@@ -145,6 +145,23 @@ WHERE 1=1 AND A.Date<>'0001-01-01 00:00:00'
return list?.FirstOrDefault(); return list?.FirstOrDefault();
} }
/// <summary>
/// 检测指定日期是否已经生成数据
/// </summary>
/// <param name="Date"></param>
/// <returns></returns>
public bool CheckStudentCompanyExistsRepository(string Date)
{
int result = 0;
string sql = string.Format("SELECT COUNT(1) FROM RB_Student_Company WHERE DATE_FORMAT(Date,'%y/%m/%d')= DATE_FORMAT('{0}','%y/%m/%d') ", Date);
var obj = base.ExecuteScalar(sql);
if (obj != null)
{
Int32.TryParse(obj.ToString(), out result);
}
return result > 0;
}
/// <summary> /// <summary>
/// 清楚全公司客户统计数据 /// 清楚全公司客户统计数据
/// </summary> /// </summary>
......
...@@ -141,6 +141,23 @@ WHERE 1=1 AND A.Date<>'0001-01-01 00:00:00' ...@@ -141,6 +141,23 @@ WHERE 1=1 AND A.Date<>'0001-01-01 00:00:00'
return list?.FirstOrDefault(); return list?.FirstOrDefault();
} }
/// <summary>
/// 检测指定日期是否已经生成数据
/// </summary>
/// <param name="Date"></param>
/// <returns></returns>
public bool CheckStudentMarketExistsRepository(string Date)
{
int result = 0;
string sql = string.Format("SELECT COUNT(1) FROM RB_Student_Market WHERE DATE_FORMAT(Date,'%y/%m/%d')= DATE_FORMAT('{0}','%y/%m/%d') ", Date);
var obj = base.ExecuteScalar(sql);
if (obj != null)
{
Int32.TryParse(obj.ToString(), out result);
}
return result > 0;
}
/// <summary> /// <summary>
/// 清除市场部客户数据统计信息 /// 清除市场部客户数据统计信息
/// </summary> /// </summary>
......
...@@ -146,6 +146,25 @@ WHERE 1=1 AND A.Date<>'0001-01-01 00:00:00' ...@@ -146,6 +146,25 @@ WHERE 1=1 AND A.Date<>'0001-01-01 00:00:00'
return list?.FirstOrDefault(); return list?.FirstOrDefault();
} }
/// <summary>
/// 检测指定日期是否已经生成数据
/// </summary>
/// <param name="Date"></param>
/// <returns></returns>
public bool CheckStudentStaticExistsRepository(string Date)
{
int result = 0;
string sql = string.Format("SELECT COUNT(1) FROM RB_Student_Static WHERE DATE_FORMAT(Date,'%y/%m/%d')= DATE_FORMAT('{0}','%y/%m/%d') ", Date);
var obj = base.ExecuteScalar(sql);
if (obj != null)
{
Int32.TryParse(obj.ToString(), out result);
}
return result > 0;
}
/// <summary> /// <summary>
/// 清楚数据 /// 清楚数据
/// </summary> /// </summary>
......
...@@ -29,7 +29,8 @@ SELECT DATE_FORMAT(A.Date, '%Y-%m-%d') AS Date,A.YearStr,SUM(StudentCount) AS St ...@@ -29,7 +29,8 @@ SELECT DATE_FORMAT(A.Date, '%Y-%m-%d') AS Date,A.YearStr,SUM(StudentCount) AS St
,SUM(N4ClassHoursScore) AS N4ClassHoursScore,SUM(N3ClassHours) AS N3ClassHours,SUM(N3ClassHoursScore) AS N3ClassHoursScore,SUM(N2ClassHours) AS N2ClassHours,SUM(N2ClassHoursScore) AS N2ClassHoursScore ,SUM(N4ClassHoursScore) AS N4ClassHoursScore,SUM(N3ClassHours) AS N3ClassHours,SUM(N3ClassHoursScore) AS N3ClassHoursScore,SUM(N2ClassHours) AS N2ClassHours,SUM(N2ClassHoursScore) AS N2ClassHoursScore
,SUM(N1ClassHours) AS N1ClassHours,SUM(N1ClassHoursScore) AS N1ClassHoursScore,SUM(MiniAppPractise) AS MiniAppPractise,SUM(MiniAppPractiseScore) AS MiniAppPractiseScore,SUM(MiniAppTime) AS MiniAppTime ,SUM(N1ClassHours) AS N1ClassHours,SUM(N1ClassHoursScore) AS N1ClassHoursScore,SUM(MiniAppPractise) AS MiniAppPractise,SUM(MiniAppPractiseScore) AS MiniAppPractiseScore,SUM(MiniAppTime) AS MiniAppTime
,SUM(MiniAppTimeScore) AS MiniAppTimeScore,SUM(TotalScore) AS TotalScore,SUM(AvgScore) AS AvgScore,SUM(ScoreGap) AS ScoreGap,SUM(ActivityNum) AS ActivityNum ,SUM(MiniAppTimeScore) AS MiniAppTimeScore,SUM(TotalScore) AS TotalScore,SUM(AvgScore) AS AvgScore,SUM(ScoreGap) AS ScoreGap,SUM(ActivityNum) AS ActivityNum
,SUM(SpeakClassScore) AS SpeakClassScore,SUM(SpeakVipScore) AS SpeakVipScore,SUM(GradeTestScore) AS GradeTestScore,SUM(SpeakFailScore) AS SpeakFailScore ,SUM(SpeakClassScore) AS SpeakClassScore,SUM(SpeakVipScore) AS SpeakVipScore,SUM(GradeTestScore) AS GradeTestScore,SUM(SpeakFailScore) AS SpeakFailScore,SUM(FinishFollow) AS FinishFollow
,MAX(TotalFollow) AS TotalFollow
FROM RB_Teacher_Static AS A FROM RB_Teacher_Static AS A
WHERE 1=1 WHERE 1=1
"); ");
...@@ -88,7 +89,8 @@ SELECT A.TeacherId,CONCAT(DATE_FORMAT(A.Date, '%Y-%m'),'-01') AS Date,A.YearStr, ...@@ -88,7 +89,8 @@ SELECT A.TeacherId,CONCAT(DATE_FORMAT(A.Date, '%Y-%m'),'-01') AS Date,A.YearStr,
,SUM(N4ClassHoursScore) AS N4ClassHoursScore,SUM(N3ClassHours) AS N3ClassHours,SUM(N3ClassHoursScore) AS N3ClassHoursScore,SUM(N2ClassHours) AS N2ClassHours,SUM(N2ClassHoursScore) AS N2ClassHoursScore ,SUM(N4ClassHoursScore) AS N4ClassHoursScore,SUM(N3ClassHours) AS N3ClassHours,SUM(N3ClassHoursScore) AS N3ClassHoursScore,SUM(N2ClassHours) AS N2ClassHours,SUM(N2ClassHoursScore) AS N2ClassHoursScore
,SUM(N1ClassHours) AS N1ClassHours,SUM(N1ClassHoursScore) AS N1ClassHoursScore,SUM(MiniAppPractise) AS MiniAppPractise,SUM(MiniAppPractiseScore) AS MiniAppPractiseScore,SUM(MiniAppTime) AS MiniAppTime ,SUM(N1ClassHours) AS N1ClassHours,SUM(N1ClassHoursScore) AS N1ClassHoursScore,SUM(MiniAppPractise) AS MiniAppPractise,SUM(MiniAppPractiseScore) AS MiniAppPractiseScore,SUM(MiniAppTime) AS MiniAppTime
,SUM(MiniAppTimeScore) AS MiniAppTimeScore,SUM(TotalScore) AS TotalScore,SUM(AvgScore) AS AvgScore,SUM(ScoreGap) AS ScoreGap,SUM(ActivityNum) AS ActivityNum ,SUM(MiniAppTimeScore) AS MiniAppTimeScore,SUM(TotalScore) AS TotalScore,SUM(AvgScore) AS AvgScore,SUM(ScoreGap) AS ScoreGap,SUM(ActivityNum) AS ActivityNum
,SUM(SpeakClassScore) AS SpeakClassScore,SUM(SpeakVipScore) AS SpeakVipScore,SUM(GradeTestScore) AS GradeTestScore,SUM(SpeakFailScore) AS SpeakFailScore ,SUM(SpeakClassScore) AS SpeakClassScore,SUM(SpeakVipScore) AS SpeakVipScore,SUM(GradeTestScore) AS GradeTestScore,SUM(SpeakFailScore) AS SpeakFailScore,SUM(FinishFollow) AS FinishFollow
,MAX(TotalFollow) AS TotalFollow
FROM RB_Teacher_Static AS A FROM RB_Teacher_Static AS A
WHERE 1=1 AND A.Date<>'0001-01-01 00:00:00' AND A.TeacherId>0 WHERE 1=1 AND A.Date<>'0001-01-01 00:00:00' AND A.TeacherId>0
"); ");
...@@ -133,7 +135,8 @@ SELECT CONCAT(DATE_FORMAT(A.Date, '%Y-%m'),'-01') AS Date,A.YearStr,SUM(StudentC ...@@ -133,7 +135,8 @@ SELECT CONCAT(DATE_FORMAT(A.Date, '%Y-%m'),'-01') AS Date,A.YearStr,SUM(StudentC
,SUM(N4ClassHoursScore) AS N4ClassHoursScore,SUM(N3ClassHours) AS N3ClassHours,SUM(N3ClassHoursScore) AS N3ClassHoursScore,SUM(N2ClassHours) AS N2ClassHours,SUM(N2ClassHoursScore) AS N2ClassHoursScore ,SUM(N4ClassHoursScore) AS N4ClassHoursScore,SUM(N3ClassHours) AS N3ClassHours,SUM(N3ClassHoursScore) AS N3ClassHoursScore,SUM(N2ClassHours) AS N2ClassHours,SUM(N2ClassHoursScore) AS N2ClassHoursScore
,SUM(N1ClassHours) AS N1ClassHours,SUM(N1ClassHoursScore) AS N1ClassHoursScore,SUM(MiniAppPractise) AS MiniAppPractise,SUM(MiniAppPractiseScore) AS MiniAppPractiseScore,SUM(MiniAppTime) AS MiniAppTime ,SUM(N1ClassHours) AS N1ClassHours,SUM(N1ClassHoursScore) AS N1ClassHoursScore,SUM(MiniAppPractise) AS MiniAppPractise,SUM(MiniAppPractiseScore) AS MiniAppPractiseScore,SUM(MiniAppTime) AS MiniAppTime
,SUM(MiniAppTimeScore) AS MiniAppTimeScore,SUM(TotalScore) AS TotalScore,SUM(AvgScore) AS AvgScore,SUM(ScoreGap) AS ScoreGap,SUM(ActivityNum) AS ActivityNum ,SUM(MiniAppTimeScore) AS MiniAppTimeScore,SUM(TotalScore) AS TotalScore,SUM(AvgScore) AS AvgScore,SUM(ScoreGap) AS ScoreGap,SUM(ActivityNum) AS ActivityNum
,SUM(SpeakClassScore) AS SpeakClassScore,SUM(SpeakVipScore) AS SpeakVipScore,SUM(GradeTestScore) AS GradeTestScore,SUM(SpeakFailScore) AS SpeakFailScore ,SUM(SpeakClassScore) AS SpeakClassScore,SUM(SpeakVipScore) AS SpeakVipScore,SUM(GradeTestScore) AS GradeTestScore,SUM(SpeakFailScore) AS SpeakFailScore,SUM(FinishFollow) AS FinishFollow
,MAX(TotalFollow) AS TotalFollow
FROM RB_Teacher_Static AS A FROM RB_Teacher_Static AS A
WHERE 1=1 AND A.Date<>'0001-01-01 00:00:00' WHERE 1=1 AND A.Date<>'0001-01-01 00:00:00'
"); ");
...@@ -185,7 +188,8 @@ SELECT CONCAT(A.YearStr,'-01','-01') AS Date,A.YearStr,SUM(StudentCount) AS Stud ...@@ -185,7 +188,8 @@ SELECT CONCAT(A.YearStr,'-01','-01') AS Date,A.YearStr,SUM(StudentCount) AS Stud
,SUM(N4ClassHoursScore) AS N4ClassHoursScore,SUM(N3ClassHours) AS N3ClassHours,SUM(N3ClassHoursScore) AS N3ClassHoursScore,SUM(N2ClassHours) AS N2ClassHours,SUM(N2ClassHoursScore) AS N2ClassHoursScore ,SUM(N4ClassHoursScore) AS N4ClassHoursScore,SUM(N3ClassHours) AS N3ClassHours,SUM(N3ClassHoursScore) AS N3ClassHoursScore,SUM(N2ClassHours) AS N2ClassHours,SUM(N2ClassHoursScore) AS N2ClassHoursScore
,SUM(N1ClassHours) AS N1ClassHours,SUM(N1ClassHoursScore) AS N1ClassHoursScore,SUM(MiniAppPractise) AS MiniAppPractise,SUM(MiniAppPractiseScore) AS MiniAppPractiseScore,SUM(MiniAppTime) AS MiniAppTime ,SUM(N1ClassHours) AS N1ClassHours,SUM(N1ClassHoursScore) AS N1ClassHoursScore,SUM(MiniAppPractise) AS MiniAppPractise,SUM(MiniAppPractiseScore) AS MiniAppPractiseScore,SUM(MiniAppTime) AS MiniAppTime
,SUM(MiniAppTimeScore) AS MiniAppTimeScore,SUM(TotalScore) AS TotalScore,SUM(AvgScore) AS AvgScore,SUM(ScoreGap) AS ScoreGap,SUM(ActivityNum) AS ActivityNum ,SUM(MiniAppTimeScore) AS MiniAppTimeScore,SUM(TotalScore) AS TotalScore,SUM(AvgScore) AS AvgScore,SUM(ScoreGap) AS ScoreGap,SUM(ActivityNum) AS ActivityNum
,SUM(SpeakClassScore) AS SpeakClassScore,SUM(SpeakVipScore) AS SpeakVipScore,SUM(GradeTestScore) AS GradeTestScore,SUM(SpeakFailScore) AS SpeakFailScore ,SUM(SpeakClassScore) AS SpeakClassScore,SUM(SpeakVipScore) AS SpeakVipScore,SUM(GradeTestScore) AS GradeTestScore,SUM(SpeakFailScore) AS SpeakFailScore,SUM(FinishFollow) AS FinishFollow
,MAX(TotalFollow) AS TotalFollow
FROM RB_Teacher_Static AS A FROM RB_Teacher_Static AS A
WHERE 1=1 AND A.Date<>'0001-01-01 00:00:00' WHERE 1=1 AND A.Date<>'0001-01-01 00:00:00'
"); ");
...@@ -225,16 +229,23 @@ WHERE 1=1 AND A.Date<>'0001-01-01 00:00:00' ...@@ -225,16 +229,23 @@ WHERE 1=1 AND A.Date<>'0001-01-01 00:00:00'
return list; return list;
} }
/// <summary> /// <summary>
/// 根据存储过程统计教师跟踪信息 /// 检测指定日期是否已经生成数据
/// </summary> /// </summary>
/// <param name="DateStr"></param> /// <param name="Date"></param>
/// <returns></returns> /// <returns></returns>
public List<TeacherFollow> GetTeacherFollowByProcRepository(string DateStr) public bool CheckTeacherStaticExistsRepository(string Date)
{ {
string sql = string.Format("call proc_teacher_follow('{0}') ", DateStr); int result = 0;
var list = Get<TeacherFollow>(sql).ToList(); string sql = string.Format("SELECT COUNT(1) FROM RB_Teacher_Static WHERE DATE_FORMAT(Date,'%y/%m/%d')= DATE_FORMAT('{0}','%y/%m/%d') ", Date);
return list; var obj = base.ExecuteScalar(sql);
if (obj != null)
{
Int32.TryParse(obj.ToString(), out result);
}
return result > 0;
} }
/// <summary> /// <summary>
......
...@@ -43,22 +43,24 @@ namespace Edu.WebApi.Controllers.DataService ...@@ -43,22 +43,24 @@ namespace Edu.WebApi.Controllers.DataService
query.Group_Id = base.UserInfo.Group_Id; query.Group_Id = base.UserInfo.Group_Id;
var result = teacherAssessmentModule.GetAssessmentTypeListModule(query); var result = teacherAssessmentModule.GetAssessmentTypeListModule(query);
List<object> list = new List<object>(); List<object> list = new List<object>();
List<object> header = new List<object>(); List<object> header = new List<object>
header.Add(new {
new
{ {
name = "TypeName", name = "TypeName",
label = "类别", label = "类别",
field = "TypeName", field = "TypeName",
align = "left" align = "left"
}); },
header.Add(new new
{ {
name = "SubtypeList", name = "SubtypeList",
label = "内容", label = "内容",
field = "SubtypeList", field = "SubtypeList",
align = "left" align = "left"
}); }
};
if (result != null && result.Count > 0) if (result != null && result.Count > 0)
{ {
var optionList = new List<SubtypeItem>(); var optionList = new List<SubtypeItem>();
......
...@@ -37,11 +37,6 @@ namespace Edu.WebApi.Controllers.User ...@@ -37,11 +37,6 @@ namespace Edu.WebApi.Controllers.User
/// </summary> /// </summary>
private readonly StudentStatModule studentStatModule = new StudentStatModule(); private readonly StudentStatModule studentStatModule = new StudentStatModule();
/// <summary>
/// OKR处理类
/// </summary>
private readonly OKRPeriodModule okrPeriodModule = new OKRPeriodModule();
/// <summary> /// <summary>
/// 员工处理类 /// 员工处理类
/// </summary> /// </summary>
......
...@@ -74,9 +74,9 @@ namespace Edu.WebApi.Controllers.User ...@@ -74,9 +74,9 @@ namespace Edu.WebApi.Controllers.User
ExcelRows = new List<ExcelColumn>() ExcelRows = new List<ExcelColumn>()
{ {
new ExcelColumn("日期"){ CellWidth=15}, new ExcelColumn("日期"){ CellWidth=15},
new ExcelColumn("学生人次"){ CellWidth=15}, new ExcelColumn("班主任与学生互动"){ CellWidth=15},
new ExcelColumn("班主任与学生互动得分"){ CellWidth=15},
new ExcelColumn("上课时数"){ CellWidth=15}, new ExcelColumn("上课时数"){ CellWidth=15},
//new ExcelColumn("线上与学生互动数"){ CellWidth=10},
new ExcelColumn("续约(含留学)"){ CellWidth=15}, new ExcelColumn("续约(含留学)"){ CellWidth=15},
new ExcelColumn("学生升级"){ CellWidth=15}, new ExcelColumn("学生升级"){ CellWidth=15},
new ExcelColumn("考级升级"){ CellWidth=15}, new ExcelColumn("考级升级"){ CellWidth=15},
...@@ -109,9 +109,9 @@ namespace Edu.WebApi.Controllers.User ...@@ -109,9 +109,9 @@ namespace Edu.WebApi.Controllers.User
{ {
new ExcelColumn(dObj.GetStringValue("DateStr")) new ExcelColumn(dObj.GetStringValue("DateStr"))
}; };
columns.Add(new ExcelColumn(dObj.GetStringValue("StudentCount"))); columns.Add(new ExcelColumn(dObj.GetStringValue("FinishFollow") +"/"+ dObj.GetStringValue("TotalFollow")));
columns.Add(new ExcelColumn(dObj.GetStringValue("OnLineInteractiveScore")));
columns.Add(new ExcelColumn(dObj.GetStringValue("AttendClassHourScore"))); columns.Add(new ExcelColumn(dObj.GetStringValue("AttendClassHourScore")));
//columns.Add(new ExcelColumn(dObj.GetStringValue("OnLineInteractiveScore")));
columns.Add(new ExcelColumn(dObj.GetStringValue("RenewScore"))); columns.Add(new ExcelColumn(dObj.GetStringValue("RenewScore")));
columns.Add(new ExcelColumn(dObj.GetStringValue("UpgradeScore"))); columns.Add(new ExcelColumn(dObj.GetStringValue("UpgradeScore")));
columns.Add(new ExcelColumn(dObj.GetStringValue("GradeTestScore"))); columns.Add(new ExcelColumn(dObj.GetStringValue("GradeTestScore")));
...@@ -195,10 +195,9 @@ namespace Edu.WebApi.Controllers.User ...@@ -195,10 +195,9 @@ namespace Edu.WebApi.Controllers.User
ExcelRows = new List<ExcelColumn>() ExcelRows = new List<ExcelColumn>()
{ {
new ExcelColumn("老师"){ CellWidth=15}, new ExcelColumn("老师"){ CellWidth=15},
new ExcelColumn("学生人次"){ CellWidth=15},
new ExcelColumn("班主任学生互动"){ CellWidth=15}, new ExcelColumn("班主任学生互动"){ CellWidth=15},
new ExcelColumn("班主任学生互动得分"){ CellWidth=15},
new ExcelColumn("上课时数"){ CellWidth=15}, new ExcelColumn("上课时数"){ CellWidth=15},
//new ExcelColumn("线上与学生互动数"){ CellWidth=10},
new ExcelColumn("续约(含留学)"){ CellWidth=15}, new ExcelColumn("续约(含留学)"){ CellWidth=15},
new ExcelColumn("学生升级"){ CellWidth=15}, new ExcelColumn("学生升级"){ CellWidth=15},
new ExcelColumn("考级升级"){ CellWidth=15}, new ExcelColumn("考级升级"){ CellWidth=15},
...@@ -232,10 +231,10 @@ namespace Edu.WebApi.Controllers.User ...@@ -232,10 +231,10 @@ namespace Edu.WebApi.Controllers.User
{ {
new ExcelColumn(dObj.GetStringValue("DateStr")) new ExcelColumn(dObj.GetStringValue("DateStr"))
}; };
columns.Add(new ExcelColumn(dObj.GetStringValue("StudentCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("FinishTimes") + "/" + dObj.GetStringValue("FollowCount"))); columns.Add(new ExcelColumn(dObj.GetStringValue("FinishFollow") + "/" + dObj.GetStringValue("TotalFollow")));
columns.Add(new ExcelColumn(dObj.GetStringValue("OnLineInteractiveScore")));
columns.Add(new ExcelColumn(dObj.GetStringValue("AttendClassHourScore"))); columns.Add(new ExcelColumn(dObj.GetStringValue("AttendClassHourScore")));
//columns.Add(new ExcelColumn(dObj.GetStringValue("OnLineInteractiveScore")));
columns.Add(new ExcelColumn(dObj.GetStringValue("RenewScore"))); columns.Add(new ExcelColumn(dObj.GetStringValue("RenewScore")));
columns.Add(new ExcelColumn(dObj.GetStringValue("UpgradeScore"))); columns.Add(new ExcelColumn(dObj.GetStringValue("UpgradeScore")));
columns.Add(new ExcelColumn(dObj.GetStringValue("GradeTestScore"))); columns.Add(new ExcelColumn(dObj.GetStringValue("GradeTestScore")));
...@@ -318,7 +317,7 @@ namespace Edu.WebApi.Controllers.User ...@@ -318,7 +317,7 @@ namespace Edu.WebApi.Controllers.User
ExcelRows = new List<ExcelColumn>() ExcelRows = new List<ExcelColumn>()
{ {
new ExcelColumn("日期"){ CellWidth=15}, new ExcelColumn("日期"){ CellWidth=15},
new ExcelColumn("学生人次"){ CellWidth=15}, //new ExcelColumn("学生人次"){ CellWidth=15},
new ExcelColumn("上课时数"){ CellWidth=15}, new ExcelColumn("上课时数"){ CellWidth=15},
//new ExcelColumn("线上与学生互动数"){ CellWidth=10}, //new ExcelColumn("线上与学生互动数"){ CellWidth=10},
new ExcelColumn("续约(含留学)"){ CellWidth=15}, new ExcelColumn("续约(含留学)"){ CellWidth=15},
...@@ -353,7 +352,7 @@ namespace Edu.WebApi.Controllers.User ...@@ -353,7 +352,7 @@ namespace Edu.WebApi.Controllers.User
{ {
new ExcelColumn(dObj.GetStringValue("DateStr")) new ExcelColumn(dObj.GetStringValue("DateStr"))
}; };
columns.Add(new ExcelColumn(dObj.GetStringValue("StudentCount"))); //columns.Add(new ExcelColumn(dObj.GetStringValue("StudentCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("AttendClassHourScore"))); columns.Add(new ExcelColumn(dObj.GetStringValue("AttendClassHourScore")));
columns.Add(new ExcelColumn(dObj.GetStringValue("OnLineInteractiveScore"))); columns.Add(new ExcelColumn(dObj.GetStringValue("OnLineInteractiveScore")));
columns.Add(new ExcelColumn(dObj.GetStringValue("RenewScore"))); columns.Add(new ExcelColumn(dObj.GetStringValue("RenewScore")));
...@@ -647,7 +646,7 @@ namespace Edu.WebApi.Controllers.User ...@@ -647,7 +646,7 @@ namespace Edu.WebApi.Controllers.User
{ {
StartTime = Common.ConvertHelper.FormatDate(DateTime.Now); StartTime = Common.ConvertHelper.FormatDate(DateTime.Now);
} }
StartTime = "2021-12-21"; StartTime = "2022-05-01";
string EndTime = Common.ConvertHelper.FormatDate(DateTime.Now); string EndTime = Common.ConvertHelper.FormatDate(DateTime.Now);
Task.Run(() => Task.Run(() =>
{ {
......
...@@ -147,7 +147,7 @@ namespace Edu.WebApi.Timers ...@@ -147,7 +147,7 @@ namespace Edu.WebApi.Timers
marketTimer = new System.Timers.Timer() marketTimer = new System.Timers.Timer()
{ {
Interval = (1000 * 60) * (5) //5分钟执行一次 Interval = (1000 * 60) * (2) //5分钟执行一次
}; };
marketTimer.Elapsed += new System.Timers.ElapsedEventHandler(DealMarketConsultantData); marketTimer.Elapsed += new System.Timers.ElapsedEventHandler(DealMarketConsultantData);
marketTimer.Enabled = true; marketTimer.Enabled = true;
...@@ -196,7 +196,6 @@ namespace Edu.WebApi.Timers ...@@ -196,7 +196,6 @@ namespace Edu.WebApi.Timers
private static int dealStudentNotMoney_Timer = 0; private static int dealStudentNotMoney_Timer = 0;
private static readonly string createMarkDataKey = "createMarkDataKey";
private static readonly string dealStudentProgress = "dealStudentProgress"; private static readonly string dealStudentProgress = "dealStudentProgress";
/// <summary> /// <summary>
...@@ -235,27 +234,39 @@ namespace Edu.WebApi.Timers ...@@ -235,27 +234,39 @@ namespace Edu.WebApi.Timers
if (Interlocked.Exchange(ref marketconsultant_Timer, 1) == 0) if (Interlocked.Exchange(ref marketconsultant_Timer, 1) == 0)
{ {
var today = DateTime.Now; var today = DateTime.Now;
if (today.Hour >= 8 && today.Hour <= 10)
{
var currentDate = Common.ConvertHelper.FormatDate(today); var currentDate = Common.ConvertHelper.FormatDate(today);
string cacheData = redis.Get(createMarkDataKey); var startDate = Common.ConvertHelper.FormatDate(today.AddDays(-1));
if (string.IsNullOrEmpty(cacheData)) if (!marketConsultantModule.CheckConsultantDataModule(startDate))
{ {
redis.Set(createMarkDataKey, currentDate); marketConsultantModule.CreateConsultantDataModule(today);
cacheData = currentDate; Common.Plugin.LogHelper.Write("CreateConsultantDataModule:" + startDate);
} }
if (!string.IsNullOrEmpty(cacheData) && cacheData != currentDate) if (!marketConsultantModule.CheckMarketDataModule(startDate))
{ {
marketConsultantModule.CreateConsultantDataModule(today);
marketConsultantModule.CreateMarketDataModule(today); marketConsultantModule.CreateMarketDataModule(today);
Common.Plugin.LogHelper.Write("CreateMarketDataModule:" + startDate);
}
//缓存信息
UserInfo user = UserReidsCache.GetUserLoginInfo("1"); UserInfo user = UserReidsCache.GetUserLoginInfo("1");
var startDate = Common.ConvertHelper.FormatDate(today.AddDays(-1)); if (!studentStatModule.CheckStudentStaticModule(startDate))
{
studentStatModule.CreateStudentStaticModule(user, startDate, currentDate, isInit: false); studentStatModule.CreateStudentStaticModule(user, startDate, currentDate, isInit: false);
Common.Plugin.LogHelper.Write("CreateStudentStaticModule:" + startDate);
}
if (!studentStatModule.CheckStudentMarketModule(startDate))
{
studentStatModule.CreateStudentMarketModule(user, startDate, currentDate, isInit: false); studentStatModule.CreateStudentMarketModule(user, startDate, currentDate, isInit: false);
Common.Plugin.LogHelper.Write("CreateStudentMarketModule:" + startDate);
}
if (!studentStatModule.CheckStudentCompanyModule(startDate))
{
studentStatModule.CreateStudentCompanyModule(user, startDate, currentDate, isInit: false); studentStatModule.CreateStudentCompanyModule(user, startDate, currentDate, isInit: false);
teacherStaticModule.CreateTeacherStaticModule(user, startDate, currentDate, isInit: false); Common.Plugin.LogHelper.Write("CreateStudentCompanyModule:" + startDate);
redis.Set(createMarkDataKey, currentDate);
} }
if (!teacherStaticModule.CheckTeacherStaticExistsModule(startDate))
{
teacherStaticModule.CreateTeacherStaticModule(user, startDate, currentDate, isInit: false);
Common.Plugin.LogHelper.Write("CreateTeacherStaticModule:" + startDate);
} }
Interlocked.Exchange(ref marketconsultant_Timer, 0); Interlocked.Exchange(ref marketconsultant_Timer, 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