Commit b6e46530 authored by 黄奎's avatar 黄奎

页面修改

parent 3263318e
...@@ -474,338 +474,24 @@ namespace Edu.Module.User ...@@ -474,338 +474,24 @@ namespace Edu.Module.User
/// <returns></returns> /// <returns></returns>
public List<object> GetTeacherStaticMonthExtListModule(RB_Teacher_Static_Extend query) public List<object> GetTeacherStaticMonthExtListModule(RB_Teacher_Static_Extend query)
{ {
var teacherList = new List<RB_Account_ViewModel>();
var queryTeacher = new RB_Account_ViewModel() { AccountType = Common.Enum.User.AccountTypeEnum.Teacher }; var queryTeacher = new RB_Account_ViewModel() { AccountType = Common.Enum.User.AccountTypeEnum.Teacher };
if (query.DeptId > 0) var teacherList = accountRepository.GetAccountListExtRepository(queryTeacher);
{
queryTeacher.Dept_Id = query.DeptId;
teacherList = accountRepository.GetAccountListExtRepository(queryTeacher);
query.QTeacherIds = string.Join(",", teacherList.Select(qitem => qitem.AccountId));
}
else
{
teacherList = accountRepository.GetAccountListExtRepository(queryTeacher);
query.QTeacherIds = "";
}
int teacherCount = 1;
if (teacherList != null && teacherList.Count > 0)
{
teacherCount = teacherList.Count;
}
List<object> dataList = new List<object>(); List<object> dataList = new List<object>();
var list = teacher_StaticRepository.GetTeacherStaticMonthExtListRepository(query); var list = teacher_StaticRepository.GetTeacherStaticMonthExtListRepository(query);
if (list != null && list.Count > 0) if (list != null && list.Count > 0)
{ {
int index = 0;
var firstModel = new RB_Teacher_Static_Extend();
foreach (var item in list) foreach (var item in list)
{ {
string DateStr = Common.ConvertHelper.FormatMonthDay(item.Date); int teacherCount = 1;
object subObj = new object(); var teacherModel = teacherList.FirstOrDefault(qitem => qitem.AccountId == item.TeacherId);
if (string.IsNullOrEmpty(DateStr)) string DateStr = "";
if (teacherModel != null)
{ {
if (index == 0) DateStr= teacherModel.AccountName;
{ teacherCount = teacherList.Where(qitem => qitem.Dept_Id == teacherModel.Dept_Id).Count();
DateStr = "上期总数";
}
else
{
DateStr = "总数";
}
if (index > 0)
{
decimal StudentCount = 0;
if (firstModel.StudentCount > 0)
{
StudentCount = (item.StudentCount - firstModel.StudentCount) / firstModel.StudentCount * 100;
}
decimal AttendClassHour = 0;
if (firstModel.AttendClassHour > 0)
{
AttendClassHour = (item.AttendClassHour - firstModel.AttendClassHour) / firstModel.AttendClassHour * 100;
}
decimal AttendClassHourScore = 0;
if (firstModel.AttendClassHourScore > 0)
{
AttendClassHourScore = (item.AttendClassHourScore - firstModel.AttendClassHourScore) / firstModel.AttendClassHourScore * 100;
}
decimal OnLineInteractive = 0;
if (firstModel.OnLineInteractive > 0)
{
OnLineInteractive = (item.OnLineInteractive - firstModel.OnLineInteractive) / firstModel.OnLineInteractive * 100;
}
decimal OnLineInteractiveScore = 0;
if (firstModel.OnLineInteractiveScore > 0)
{
OnLineInteractiveScore = (item.OnLineInteractiveScore - firstModel.OnLineInteractiveScore) / firstModel.OnLineInteractiveScore * 100;
}
decimal Renew = 0;
if (firstModel.Renew > 0)
{
Renew = (item.Renew - firstModel.Renew) / firstModel.Renew * 100;
}
decimal RenewScore = 0;
if (firstModel.RenewScore > 0)
{
RenewScore = (item.RenewScore - firstModel.RenewScore) / firstModel.RenewScore * 100;
}
decimal Upgrade = 0;
if (firstModel.Upgrade > 0)
{
Upgrade = (item.Upgrade - firstModel.Upgrade) / firstModel.Upgrade * 100;
}
decimal UpgradeScore = 0;
if (firstModel.UpgradeScore > 0)
{
UpgradeScore = (item.UpgradeScore - firstModel.UpgradeScore) / firstModel.UpgradeScore * 100;
}
decimal Trans = 0;
if (firstModel.Trans > 0)
{
Trans = (item.Trans - firstModel.Trans) / firstModel.Trans * 100;
}
decimal TransScore = 0;
if (firstModel.TransScore > 0)
{
TransScore = (item.TransScore - firstModel.TransScore) / firstModel.TransScore * 100;
}
decimal TrialSpeak = 0;
if (firstModel.TrialSpeak > 0)
{
TrialSpeak = (item.TrialSpeak - firstModel.TrialSpeak) / firstModel.TrialSpeak * 100;
}
decimal TrialSpeakScore = 0;
if (firstModel.TrialSpeakScore > 0)
{
TrialSpeakScore = (item.TrialSpeakScore - firstModel.TrialSpeakScore) / firstModel.TrialSpeakScore * 100;
}
decimal Truancy = 0;
if (firstModel.Truancy > 0)
{
Truancy = (item.Truancy - firstModel.Truancy) / firstModel.Truancy * 100;
}
decimal TruancyScore = 0;
if (firstModel.TruancyScore > 0)
{
TruancyScore = (item.TruancyScore - firstModel.TruancyScore) / firstModel.TruancyScore * 100;
}
decimal Withdraws = 0;
if (firstModel.Withdraws > 0)
{
Withdraws = (item.Withdraws - firstModel.Withdraws) / firstModel.Withdraws * 100;
}
decimal WithdrawsScore = 0;
if (firstModel.WithdrawsScore > 0)
{
WithdrawsScore = (item.WithdrawsScore - firstModel.WithdrawsScore) / firstModel.WithdrawsScore * 100;
}
decimal Complaint = 0;
if (firstModel.Complaint > 0)
{
Complaint = (item.Complaint - firstModel.Complaint) / firstModel.Complaint * 100;
}
decimal ComplaintScore = 0;
if (firstModel.ComplaintScore > 0)
{
ComplaintScore = (item.ComplaintScore - firstModel.ComplaintScore) / firstModel.ComplaintScore * 100;
}
decimal TeacherBeLate = 0;
if (firstModel.TeacherBeLate > 0)
{
TeacherBeLate = (item.TeacherBeLate - firstModel.TeacherBeLate) / firstModel.TeacherBeLate * 100;
}
decimal TeacherBeLateScore = 0;
if (firstModel.TeacherBeLateScore > 0)
{
TeacherBeLateScore = (item.TeacherBeLateScore - firstModel.TeacherBeLateScore) / firstModel.TeacherBeLateScore * 100;
}
decimal N5ClassHours = 0;
if (firstModel.N5ClassHours > 0)
{
N5ClassHours = (item.N5ClassHours - firstModel.N5ClassHours) / firstModel.N5ClassHours * 100;
}
decimal N5ClassHoursScore = 0;
if (firstModel.N5ClassHoursScore > 0)
{
N5ClassHoursScore = (item.N5ClassHoursScore - firstModel.N5ClassHoursScore) / firstModel.N5ClassHoursScore * 100;
}
decimal N4ClassHours = 0;
if (firstModel.N4ClassHours > 0)
{
N4ClassHours = (item.N4ClassHours - firstModel.N4ClassHours) / firstModel.N4ClassHours * 100;
}
decimal N4ClassHoursScore = 0;
if (firstModel.N4ClassHoursScore > 0)
{
N4ClassHoursScore = (item.N4ClassHoursScore - firstModel.N4ClassHoursScore) / firstModel.N4ClassHoursScore * 100;
}
decimal N3ClassHours = 0;
if (firstModel.N3ClassHours > 0)
{
N3ClassHours = (item.N3ClassHours - firstModel.N3ClassHours) / firstModel.N3ClassHours * 100;
}
decimal N3ClassHoursScore = 0;
if (firstModel.N3ClassHoursScore > 0)
{
N3ClassHoursScore = (item.N3ClassHoursScore - firstModel.N3ClassHoursScore) / firstModel.N3ClassHoursScore * 100;
}
decimal N2ClassHours = 0;
if (firstModel.N2ClassHours > 0)
{
N2ClassHours = (item.N2ClassHours - firstModel.N2ClassHours) / firstModel.N2ClassHours * 100;
}
decimal N2ClassHoursScore = 0;
if (firstModel.N2ClassHoursScore > 0)
{
N2ClassHoursScore = (item.N2ClassHoursScore - firstModel.N2ClassHoursScore) / firstModel.N2ClassHoursScore * 100;
}
decimal N1ClassHours = 0;
if (firstModel.N1ClassHours > 0)
{
N1ClassHours = (item.N1ClassHours - firstModel.N1ClassHours) / firstModel.N1ClassHours * 100;
}
decimal N1ClassHoursScore = 0;
if (firstModel.N1ClassHoursScore > 0)
{
N1ClassHoursScore = (item.N1ClassHoursScore - firstModel.N1ClassHoursScore) / firstModel.N1ClassHoursScore * 100;
}
decimal MiniAppPractise = 0;
if (firstModel.MiniAppPractise > 0)
{
MiniAppPractise = (item.MiniAppPractise - firstModel.MiniAppPractise) / firstModel.MiniAppPractise * 100;
}
decimal MiniAppPractiseScore = 0;
if (firstModel.MiniAppPractiseScore > 0)
{
MiniAppPractiseScore = (item.MiniAppPractiseScore - firstModel.MiniAppPractiseScore) / firstModel.MiniAppPractiseScore * 100;
}
decimal MiniAppTime = 0;
if (firstModel.MiniAppTime > 0)
{
MiniAppTime = (item.MiniAppTime - firstModel.MiniAppTime) / firstModel.MiniAppTime * 100;
}
decimal MiniAppTimeScore = 0;
if (firstModel.MiniAppTimeScore > 0)
{
MiniAppTimeScore = (item.MiniAppTimeScore - firstModel.MiniAppTimeScore) / firstModel.MiniAppTimeScore * 100;
}
decimal ActivityNum = 0;
if (firstModel.ActivityNum > 0)
{
ActivityNum = (item.ActivityNum - firstModel.ActivityNum) / firstModel.ActivityNum * 100;
}
decimal TotalScore = 0;
if (firstModel.TotalScore > 0)
{
TotalScore = (item.TotalScore - firstModel.TotalScore) / firstModel.TotalScore * 100;
}
decimal AvgScore = 0;
if (firstModel.AvgScore > 0)
{
AvgScore = (item.AvgScore - firstModel.AvgScore) / firstModel.AvgScore * 100;
}
decimal ScoreGap = 0;
if (firstModel.ScoreGap > 0)
{
ScoreGap = (item.ScoreGap - firstModel.ScoreGap) / firstModel.ScoreGap * 100;
}
subObj = new
{
Id = 0,
DateStr = "环比成长",
StudentCount = Math.Round(StudentCount, 2) + "%",
AttendClassHour = Math.Round(AttendClassHour, 2) + "%",
AttendClassHourScore = Math.Round(AttendClassHourScore, 2) + "%",
OnLineInteractive = Math.Round(OnLineInteractive, 2) + "%",
OnLineInteractiveScore = Math.Round(OnLineInteractiveScore, 2) + "%",
Renew = Math.Round(Renew, 2) + "%",
RenewScore = Math.Round(RenewScore, 2) + "%",
Upgrade = Math.Round(Upgrade, 2) + "%",
UpgradeScore = Math.Round(UpgradeScore, 2) + "%",
Trans = Math.Round(Trans, 2) + "%",
TransScore = Math.Round(TransScore, 2) + "%",
TrialSpeak = Math.Round(TrialSpeak, 2) + "%",
TrialSpeakScore = Math.Round(TrialSpeakScore, 2) + "%",
Truancy = Math.Round(Truancy, 2) + "%",
TruancyScore = Math.Round(TruancyScore, 2) + "%",
Withdraws = Math.Round(Withdraws, 2) + "%",
WithdrawsScore = Math.Round(WithdrawsScore, 2) + "%",
Complaint = Math.Round(Complaint, 2) + "%",
ComplaintScore = Math.Round(ComplaintScore, 2) + "%",
TeacherBeLate = Math.Round(TeacherBeLate, 2) + "%",
TeacherBeLateScore = Math.Round(TeacherBeLateScore, 2) + "%",
N5ClassHours = Math.Round(N5ClassHours, 2) + "%",
N5ClassHoursScore = Math.Round(N5ClassHoursScore, 2) + "%",
N4ClassHours = Math.Round(N4ClassHours, 2) + "%",
N4ClassHoursScore = Math.Round(N4ClassHoursScore, 2) + "%",
N3ClassHours = Math.Round(N3ClassHours, 2) + "%",
N3ClassHoursScore = Math.Round(N3ClassHoursScore, 2) + "%",
N2ClassHours = Math.Round(N2ClassHours, 2) + "%",
N2ClassHoursScore = Math.Round(N2ClassHoursScore, 2) + "%",
N1ClassHours = Math.Round(N1ClassHours, 2) + "%",
N1ClassHoursScore = Math.Round(N1ClassHoursScore, 2) + "%",
MiniAppPractise = Math.Round(MiniAppPractise, 2) + "%",
MiniAppPractiseScore = Math.Round(MiniAppPractiseScore, 2) + "%",
MiniAppTime = Math.Round(MiniAppTime, 2) + "%",
MiniAppTimeScore = Math.Round(MiniAppTimeScore, 2) + "%",
TotalScore = Math.Round(TotalScore, 2) + "%",
AvgScore = Math.Round(AvgScore, 2) + "%",
ScoreGap = Math.Round(ScoreGap, 2) + "%",
ActivityNum = Math.Round(ActivityNum, 2) + "%",
};
}
firstModel = item;
firstModel.TotalScore = (firstModel.StudentCount + firstModel.AttendClassHourScore + firstModel.OnLineInteractiveScore + firstModel.RenewScore
+ firstModel.UpgradeScore + firstModel.TransScore + firstModel.TrialSpeakScore - firstModel.TruancyScore - firstModel.WithdrawsScore - firstModel.ComplaintScore
- firstModel.TeacherBeLateScore + firstModel.N2ClassHoursScore + firstModel.N1ClassHoursScore + firstModel.MiniAppPractiseScore + firstModel.MiniAppTimeScore
+ firstModel.ActivityNum
);
firstModel.AvgScore = Math.Round(firstModel.TotalScore / teacherCount, 2);
firstModel.ScoreGap = firstModel.TotalScore - firstModel.AvgScore;
index++;
} }
item.TotalScore = (item.StudentCount + item.AttendClassHourScore + item.OnLineInteractiveScore + item.RenewScore item.TotalScore = (item.StudentCount + item.AttendClassHourScore + item.OnLineInteractiveScore + 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.N2ClassHoursScore + item.N1ClassHoursScore + item.MiniAppPractiseScore + item.MiniAppTimeScore - item.TeacherBeLateScore + item.N2ClassHoursScore + item.N1ClassHoursScore + item.MiniAppPractiseScore + item.MiniAppTimeScore
...@@ -857,10 +543,6 @@ namespace Edu.Module.User ...@@ -857,10 +543,6 @@ namespace Edu.Module.User
item.ScoreGap, item.ScoreGap,
item.ActivityNum, item.ActivityNum,
}); });
if (DateStr.Contains("总数") && index > 1)
{
dataList.Add(subObj);
}
} }
var tempList = list?.Where(qitem => !string.IsNullOrEmpty(Common.ConvertHelper.FormatDate(qitem.Date)))?.ToList(); var tempList = list?.Where(qitem => !string.IsNullOrEmpty(Common.ConvertHelper.FormatDate(qitem.Date)))?.ToList();
dataList.Add(new dataList.Add(new
......
...@@ -88,7 +88,7 @@ SELECT A.TeacherId,CONCAT(DATE_FORMAT(A.Date, '%Y-%m'),'-01') AS Date,A.YearStr, ...@@ -88,7 +88,7 @@ SELECT A.TeacherId,CONCAT(DATE_FORMAT(A.Date, '%Y-%m'),'-01') AS Date,A.YearStr,
,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
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' AND A.TeacherId>0
"); ");
if (query != null) if (query != null)
{ {
...@@ -98,14 +98,11 @@ WHERE 1=1 AND A.Date<>'0001-01-01 00:00:00' ...@@ -98,14 +98,11 @@ WHERE 1=1 AND A.Date<>'0001-01-01 00:00:00'
} }
if (query.YearStr > 0) if (query.YearStr > 0)
{ {
if (isYear) builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Teacher_Static_Extend.YearStr), query.YearStr);
{ }
builder.AppendFormat(" AND A.{0}<={1} ", nameof(RB_Teacher_Static_Extend.YearStr), query.YearStr); if (query.MonthStr > 0)
} {
else builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Teacher_Static_Extend.MonthStr), query.MonthStr);
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Teacher_Static_Extend.YearStr), query.YearStr);
}
} }
} }
builder.AppendFormat(" GROUP BY DATE_FORMAT(A.Date, '%Y-%m'),A.TeacherId "); builder.AppendFormat(" GROUP BY DATE_FORMAT(A.Date, '%Y-%m'),A.TeacherId ");
......
...@@ -47,6 +47,104 @@ namespace Edu.WebApi.Controllers.User ...@@ -47,6 +47,104 @@ namespace Edu.WebApi.Controllers.User
return ApiResult.Success(data: list); return ApiResult.Success(data: list);
} }
/// <summary>
/// 下载教师行为数据每日统计
/// </summary>
/// <returns></returns>
[HttpPost]
[Obsolete]
public FileContentResult DownLoadTeacherDay()
{
var query = new RB_Teacher_Static_Extend()
{
YearStr = base.ParmJObj.GetInt("YearStr"),
MonthStr = base.ParmJObj.GetInt("MonthStr"),
TeacherId = base.ParmJObj.GetInt("TeacherId"),
DeptId = base.ParmJObj.GetInt("DeptId"),
};
query.Group_Id = base.UserInfo.Group_Id;
var list = teacherStaticModule.GetTeacherStaticListModule(query);
string excelName = "教师行为数据每日统计.xls";
List<ExcelDataSource> slist = new List<ExcelDataSource>();
try
{
ExcelDataSource header = new ExcelDataSource
{
ExcelRows = new List<ExcelColumn>()
{
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},
new ExcelColumn("学生投诉(次)"){ CellWidth=15},
new ExcelColumn("老师迟到早退(次)"){ CellWidth=15},
new ExcelColumn("N5课程时数"){ CellWidth=15},
new ExcelColumn("N4课程时数"){ CellWidth=15},
new ExcelColumn("N3课程时数"){ CellWidth=15},
new ExcelColumn("N2课程时数"){ CellWidth=15},
new ExcelColumn("N1课程时数"){ 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},
}
};
slist.Add(header);
foreach (var item in list)
{
JObject dObj = JObject.Parse(JsonHelper.Serialize(item));
var columns = new List<ExcelColumn>
{
new ExcelColumn(dObj.GetStringValue("DateStr"))
};
columns.Add(new ExcelColumn(dObj.GetStringValue("StudentCount")));
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("UpgradeScore")));
columns.Add(new ExcelColumn(dObj.GetStringValue("TransScore")));
columns.Add(new ExcelColumn(dObj.GetStringValue("TrialSpeakScore")));
columns.Add(new ExcelColumn(dObj.GetStringValue("TruancyScore")));
columns.Add(new ExcelColumn(dObj.GetStringValue("WithdrawsScore")));
columns.Add(new ExcelColumn(dObj.GetStringValue("ComplaintScore")));
columns.Add(new ExcelColumn(dObj.GetStringValue("TeacherBeLateScore")));
columns.Add(new ExcelColumn(dObj.GetStringValue("N5ClassHoursScore")));
columns.Add(new ExcelColumn(dObj.GetStringValue("N4ClassHoursScore")));
columns.Add(new ExcelColumn(dObj.GetStringValue("N3ClassHoursScore")));
columns.Add(new ExcelColumn(dObj.GetStringValue("N2ClassHoursScore")));
columns.Add(new ExcelColumn(dObj.GetStringValue("N1ClassHoursScore")));
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("TotalScore")));
columns.Add(new ExcelColumn(dObj.GetStringValue("AvgScore")));
columns.Add(new ExcelColumn(dObj.GetStringValue("ScoreGap")));
var dataRow = new ExcelDataSource()
{
ExcelRows = columns
};
slist.Add(dataRow);
}
var byteData = ExcelTempLateHelper.ToExcelExtend(slist);
return File(byteData, "application/octet-stream", excelName);
}
catch (Exception ex)
{
LogHelper.Write(ex, "DownLoadTeacherDay");
var byteData1 = ExcelTempLateHelper.ToExcelExtend(slist);
return File(byteData1, "application/octet-stream", excelName);
}
}
/// <summary> /// <summary>
/// 教师行为数据月度统计 /// 教师行为数据月度统计
/// </summary> /// </summary>
...@@ -64,23 +162,22 @@ namespace Edu.WebApi.Controllers.User ...@@ -64,23 +162,22 @@ namespace Edu.WebApi.Controllers.User
return ApiResult.Success(data: list); return ApiResult.Success(data: list);
} }
/// <summary> /// <summary>
/// 下载教师行为数据每日统计 /// 下载教师行为数据每日统计
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
[Obsolete] [Obsolete]
public FileContentResult DownLoadTeacherDay() public FileContentResult DownLoadTeacherMonthStatic()
{ {
var query = new RB_Teacher_Static_Extend() var query = new RB_Teacher_Static_Extend()
{ {
YearStr = base.ParmJObj.GetInt("YearStr"), YearStr = base.ParmJObj.GetInt("YearStr"),
MonthStr = base.ParmJObj.GetInt("MonthStr"), MonthStr = base.ParmJObj.GetInt("MonthStr"),
TeacherId = base.ParmJObj.GetInt("TeacherId"),
DeptId = base.ParmJObj.GetInt("DeptId"),
}; };
query.Group_Id = base.UserInfo.Group_Id; query.Group_Id = base.UserInfo.Group_Id;
var list = teacherStaticModule.GetTeacherStaticListModule(query); var list = teacherStaticModule.GetTeacherStaticMonthExtListModule(query);
string excelName = "教师行为数据每日统计.xls"; string excelName = "教师行为数据每日统计.xls";
List<ExcelDataSource> slist = new List<ExcelDataSource>(); List<ExcelDataSource> slist = new List<ExcelDataSource>();
try try
...@@ -155,12 +252,13 @@ namespace Edu.WebApi.Controllers.User ...@@ -155,12 +252,13 @@ namespace Edu.WebApi.Controllers.User
} }
catch (Exception ex) catch (Exception ex)
{ {
LogHelper.Write(ex, "DownLoadTeacherDay"); LogHelper.Write(ex, "DownLoadTeacherMonthStatic");
var byteData1 = ExcelTempLateHelper.ToExcelExtend(slist); var byteData1 = ExcelTempLateHelper.ToExcelExtend(slist);
return File(byteData1, "application/octet-stream", excelName); return File(byteData1, "application/octet-stream", excelName);
} }
} }
/// <summary> /// <summary>
/// 教师行为数据每月统计 /// 教师行为数据每月统计
/// </summary> /// </summary>
......
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