Commit 57689a45 authored by 黄奎's avatar 黄奎

页面修改

parent 20822a95
......@@ -29,5 +29,10 @@ namespace Edu.Model.ViewModel.DataStatistics
/// 教师姓名
/// </summary>
public string TeacherName { get; set; }
/// <summary>
/// 教师编号
/// </summary>
public int TeacherId { get; set; }
}
}
......@@ -24,6 +24,11 @@ namespace Edu.Model.ViewModel.User
/// 部门编号
/// </summary>
public int DeptId { get; set; }
/// <summary>
/// 老师考核得分
/// </summary>
public decimal AssessmentScore { get; set; }
}
/// <summary>
......
using Edu.Model.CacheModel;
using Edu.Model.ViewModel.DataStatistics;
using Edu.Model.ViewModel.User;
using Edu.Model.ViewModel.WeChat;
using Edu.Repository.DataStatistics;
using Edu.Repository.User;
using System;
using System.Collections.Generic;
......@@ -24,6 +26,11 @@ namespace Edu.Module.User
/// </summary>
private readonly RB_AccountRepository accountRepository = new RB_AccountRepository();
/// <summary>
/// 教师考核仓储层对象
/// </summary>
private readonly RB_Teacher_AssessmentRepository teacher_AssessmentRepository = new RB_Teacher_AssessmentRepository();
/// <summary>
/// 教师行为数据数据每日统计
/// </summary>
......@@ -515,17 +522,26 @@ namespace Edu.Module.User
qDate += "-01";
//跟踪列表
var followList = teacher_StaticRepository.GetTeacherFollowByProcRepository(qDate);
//老师考核数据
var teacherAssessmentList = teacher_AssessmentRepository.GetTeacherAssessmentListRepository(new RB_Teacher_Assessment_Extend()
{
YearStr = query.YearStr,
MonthStr = query.MonthStr,
Group_Id = query.Group_Id,
});
var list = teacher_StaticRepository.GetTeacherStaticMonthExtListRepository(query);
if (list != null && list.Count > 0)
{
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();
item.AssessmentScore = tempAssessment?.TotalScore ?? 0;
item.TotalScore = (item.StudentCount + item.AttendClassHourScore + item.OnLineInteractiveScore + item.RenewScore
+ item.UpgradeScore + item.TransScore + item.TrialSpeakScore - item.TruancyScore - item.WithdrawsScore - item.ComplaintScore
- item.TeacherBeLateScore + item.MiniAppPractiseScore + item.MiniAppTimeScore
+ item.N5ClassHoursScore * 1 + item.N4ClassHoursScore * 2 + item.N3ClassHoursScore * 3 + item.N2ClassHoursScore * 4 + item.N1ClassHoursScore * 5
+ item.ActivityNum +(tempFollow?.FinishTimes ?? 0)
+ item.ActivityNum + (tempFollow?.FinishTimes ?? 0) + item.AssessmentScore
);
}
......@@ -533,6 +549,7 @@ namespace Edu.Module.User
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();
int teacherCount = 1;
var teacherModel = teacherList.FirstOrDefault(qitem => qitem.AccountId == item.TeacherId);
string DateStr = "";
......@@ -595,6 +612,7 @@ namespace Edu.Module.User
item.ActivityNum,
FinishTimes= tempFollow?.FinishTimes??0,
FollowCount = tempFollow?.FollowCount ?? 0,
item.AssessmentScore,
});
}
var tempList = list?.Where(qitem => !string.IsNullOrEmpty(Common.ConvertHelper.FormatDate(qitem.Date)))?.ToList();
......@@ -646,6 +664,7 @@ namespace Edu.Module.User
ActivityNum = tempList?.Sum(qitem => qitem.ActivityNum),
FinishTimes = followList?.Sum(qitem => qitem.FinishTimes),
FollowCount = followList?.Sum(qitem => qitem.FollowCount),
AssessmentScore = tempList?.Sum(qitem => qitem.AssessmentScore),
});
}
return dataList;
......
......@@ -60,7 +60,7 @@ WHERE 1=1
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT A.*,IFNULL(C.TeacherName,'') AS TeacherName
SELECT A.*,IFNULL(C.TeacherName,'') AS TeacherName,C.TId AS TeacherId
FROM RB_Teacher_Assessment AS A LEFT JOIN rb_account AS B ON A.TeacherAccountId=B.Id
LEFT JOIN rb_teacher AS C ON B.AccountId=C.TId
WHERE 1=1
......
......@@ -209,6 +209,7 @@ namespace Edu.WebApi.Controllers.User
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},
......@@ -242,6 +243,7 @@ namespace Edu.WebApi.Controllers.User
columns.Add(new ExcelColumn(dObj.GetStringValue("MiniAppPractiseScore")));
columns.Add(new ExcelColumn(dObj.GetStringValue("MiniAppTimeScore")));
columns.Add(new ExcelColumn(dObj.GetStringValue("ActivityNum")));
columns.Add(new ExcelColumn(dObj.GetStringValue("AssessmentScore")));
columns.Add(new ExcelColumn(dObj.GetStringValue("TotalScore")));
columns.Add(new ExcelColumn(dObj.GetStringValue("AvgScore")));
columns.Add(new ExcelColumn(dObj.GetStringValue("ScoreGap")));
......
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