Commit c2e113d1 authored by 黄奎's avatar 黄奎

页面修改

parent 035f9290
......@@ -209,11 +209,11 @@ WHERE A.Status=0 AND C.Status=0 AND C.StuStage<>7 {0}
string curWeek = "";
if (!string.IsNullOrEmpty(query.STime))
{
curWeek += string.Format(" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d' )) = YEARWEEK('{0}') ", query.STime);
curWeek += string.Format(" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d'),1) = YEARWEEK('{0}',1) ", query.STime);
}
else
{
curWeek += string.Format(" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')) = YEARWEEK(now()) ");
curWeek += string.Format(" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d'),1) = YEARWEEK(now(),1) ");
}
var curWeekList = Get<RB_Student_Follow_Extend>(string.Format(sql, curWeek)).ToList();
dicList.Add("currentWeek", curWeekList);
......@@ -222,11 +222,11 @@ WHERE A.Status=0 AND C.Status=0 AND C.StuStage<>7 {0}
string lastWeek = "";
if (!string.IsNullOrEmpty(query.STime))
{
lastWeek += string.Format(" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')) = YEARWEEK('{0}')-1 ", query.STime);
lastWeek += string.Format(" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d'),1) = YEARWEEK('{0}',1)-1 ", query.STime);
}
else
{
lastWeek += string.Format(" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')) = YEARWEEK(now())-1 ");
lastWeek += string.Format(" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d'),1) = YEARWEEK(now(),1)-1 ");
}
var lastWeekList = Get<RB_Student_Follow_Extend>(string.Format(sql, lastWeek)).ToList();
dicList.Add("lastWeek", lastWeekList);
......@@ -308,11 +308,11 @@ WHERE A.Status=0 {0}
string curWeek = "";
if (!string.IsNullOrEmpty(query.STime))
{
curWeek += string.Format(" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d' )) = YEARWEEK('{0}') ", query.STime);
curWeek += string.Format(" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d' ),1) = YEARWEEK('{0}',1) ", query.STime);
}
else
{
curWeek += string.Format(" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')) = YEARWEEK(now()) ");
curWeek += string.Format(" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d'),1) = YEARWEEK(now(),1) ");
}
var curWeekList = Get<RB_Student_Follow_Extend>(string.Format(sql, curWeek)).ToList();
dicList.Add("currentWeek", curWeekList);
......@@ -321,11 +321,11 @@ WHERE A.Status=0 {0}
string lastWeek = "";
if (!string.IsNullOrEmpty(query.STime))
{
lastWeek += string.Format(" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')) = YEARWEEK('{0}')-1 ", query.STime);
lastWeek += string.Format(" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d'),1) = YEARWEEK('{0}',1)-1 ", query.STime);
}
else
{
lastWeek += string.Format(" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')) = YEARWEEK(now())-1 ");
lastWeek += string.Format(" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d'),1) = YEARWEEK(now(),1)-1 ");
}
var lastWeekList = Get<RB_Student_Follow_Extend>(string.Format(sql, lastWeek)).ToList();
dicList.Add("lastWeek", lastWeekList);
......@@ -413,11 +413,11 @@ SELECT Avg(FollowCount) AS FollowEffectiveCount FROM
string curWeek = "";
if (!string.IsNullOrEmpty(query.STime))
{
curWeek += string.Format(" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d' )) = YEARWEEK('{0}') ", query.STime);
curWeek += string.Format(" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d'),1) = YEARWEEK('{0}',1) ", query.STime);
}
else
{
curWeek += string.Format(" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')) = YEARWEEK(now()) ");
curWeek += string.Format(" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d'),1) = YEARWEEK(now(),1) ");
}
var curWeekList = Get<RB_Student_Follow_Extend>(string.Format(sql, curWeek)).ToList();
dicList.Add("currentWeek", curWeekList);
......@@ -426,11 +426,11 @@ SELECT Avg(FollowCount) AS FollowEffectiveCount FROM
string lastWeek = "";
if (!string.IsNullOrEmpty(query.STime))
{
lastWeek += string.Format(" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')) = YEARWEEK('{0}')-1 ", query.STime);
lastWeek += string.Format(" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d'),1) = YEARWEEK('{0}',1)-1 ", query.STime);
}
else
{
lastWeek += string.Format(" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')) = YEARWEEK(now())-1 ");
lastWeek += string.Format(" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d'),1) = YEARWEEK(now(),1)-1 ");
}
var lastWeekList = Get<RB_Student_Follow_Extend>(string.Format(sql, lastWeek)).ToList();
dicList.Add("lastWeek", lastWeekList);
......
......@@ -239,11 +239,11 @@ WHERE 1=1 AND B.Status=0 {0}
string curWeek = "";
if (!string.IsNullOrEmpty(query.StartDate))
{
curWeek += string.Format(" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d' )) = YEARWEEK('{0}') ", query.StartDate);
curWeek += string.Format(" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d'),1) = YEARWEEK('{0}',1) ", query.StartDate);
}
else
{
curWeek += string.Format(" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')) = YEARWEEK(now()) ");
curWeek += string.Format(" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d'),1) = YEARWEEK(now(),1) ");
}
var curWeekList = Get<RB_Student_Visit_Extend>(string.Format(sql, curWeek)).ToList();
dicList.Add("currentWeek", curWeekList);
......@@ -252,11 +252,11 @@ WHERE 1=1 AND B.Status=0 {0}
string lastWeek = "";
if (!string.IsNullOrEmpty(query.StartDate))
{
lastWeek += string.Format(" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')) = YEARWEEK('{0}')-1 ", query.StartDate);
lastWeek += string.Format(" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d'),1) = YEARWEEK('{0}',1)-1 ", query.StartDate);
}
else
{
lastWeek += string.Format(" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')) = YEARWEEK(now())-1 ");
lastWeek += string.Format(" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d'),1) = YEARWEEK(now(),1)-1 ");
}
var lastWeekList = Get<RB_Student_Visit_Extend>(string.Format(sql, lastWeek)).ToList();
dicList.Add("lastWeek", lastWeekList);
......
......@@ -355,11 +355,11 @@ WHERE 1=1 AND A.Status=0 {0}
string curWeek = "";
if (!string.IsNullOrEmpty(query.StartClassDate))
{
curWeek += string.Format(" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d' )) = YEARWEEK('{0}') ", query.StartClassDate);
curWeek += string.Format(" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d'),1) = YEARWEEK('{0}',1) ", query.StartClassDate);
}
else
{
curWeek += string.Format(" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')) = YEARWEEK(now()) ");
curWeek += string.Format(" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d'),1) = YEARWEEK(now(),1) ");
}
var curWeekList = Get<RB_Visitor_Reserve_Extend>(string.Format(sql, curWeek)).ToList();
dicList.Add("currentWeek", curWeekList);
......@@ -368,11 +368,11 @@ WHERE 1=1 AND A.Status=0 {0}
string lastWeek = "";
if (!string.IsNullOrEmpty(query.StartClassDate))
{
lastWeek += string.Format(" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')) = YEARWEEK('{0}')-1 ", query.StartClassDate);
lastWeek += string.Format(" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d'),1) = YEARWEEK('{0}',1)-1 ", query.StartClassDate);
}
else
{
lastWeek += string.Format(" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')) = YEARWEEK(now())-1 ");
lastWeek += string.Format(" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d'),1) = YEARWEEK(now(),1)-1 ");
}
var lastWeekList = Get<RB_Visitor_Reserve_Extend>(string.Format(sql, lastWeek)).ToList();
dicList.Add("lastWeek", lastWeekList);
......
......@@ -1297,11 +1297,11 @@ WHERE 1=1 AND A.OrderState IN(1,2) {0}
string curWeek = "";
if (!string.IsNullOrEmpty(query.StartTime))
{
curWeek += string.Format(" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d' )) = YEARWEEK('{0}') ", query.StartTime);
curWeek += string.Format(" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d'),1) = YEARWEEK('{0}',1) ", query.StartTime);
}
else
{
curWeek += string.Format(" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')) = YEARWEEK(now()) ");
curWeek += string.Format(" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d'),1) = YEARWEEK(now(),1) ");
}
var curWeekList = Get<RB_Order_ViewModel>(string.Format(sql, curWeek)).ToList();
dicList.Add("currentWeek", curWeekList);
......@@ -1310,11 +1310,11 @@ WHERE 1=1 AND A.OrderState IN(1,2) {0}
string lastWeek = "";
if (!string.IsNullOrEmpty(query.StartTime))
{
lastWeek += string.Format(" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')) = YEARWEEK('{0}')-1 ", query.StartTime);
lastWeek += string.Format(" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d'),1) = YEARWEEK('{0}',1)-1 ", query.StartTime);
}
else
{
lastWeek += string.Format(" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')) = YEARWEEK(now())-1 ");
lastWeek += string.Format(" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d'),1) = YEARWEEK(now(),1)-1 ");
}
var lastWeekList = Get<RB_Order_ViewModel>(string.Format(sql, lastWeek)).ToList();
dicList.Add("lastWeek", lastWeekList);
......
......@@ -866,7 +866,7 @@ GROUP BY A.StuStage ";
SELECT t.*,g.GroupName,s.SName
FROM rb_student AS t LEFT JOIN rb_group AS g ON t.Group_Id=g.GId
LEFT JOIN rb_school AS s ON t.School_Id=s.SId
WHERE 1=1 AND YEARWEEK(date_format(t.CreateTime, '%Y-%m-%d')) = YEARWEEK(now())
WHERE 1=1 AND YEARWEEK(date_format(t.CreateTime, '%Y-%m-%d'),1) = YEARWEEK(now(),1)
");
builder.AppendFormat(" AND t.{0}={1} ", nameof(RB_Student_ViewModel.Status), (int)DateStateEnum.Normal);
if (query != null)
......@@ -1047,11 +1047,11 @@ WHERE 1=1
string curWeek = "";
if (!string.IsNullOrEmpty(query.StartTime))
{
curWeek += string.Format(" AND YEARWEEK(date_format(CreateTime,'%Y-%m-%d' )) = YEARWEEK('{0}') ", query.StartTime);
curWeek += string.Format(" AND YEARWEEK(date_format(CreateTime,'%Y-%m-%d'),1) = YEARWEEK('{0}',1) ", query.StartTime);
}
else
{
curWeek += string.Format(" AND YEARWEEK(date_format(CreateTime,'%Y-%m-%d')) = YEARWEEK(now()) ");
curWeek += string.Format(" AND YEARWEEK(date_format(CreateTime,'%Y-%m-%d'),1) = YEARWEEK(now(),1) ");
}
var curWeekList=Get<RB_Student_ViewModel>(string.Format(builder.ToString(), curWeek)).ToList();
dicList.Add("currentWeek", curWeekList);
......@@ -1060,11 +1060,11 @@ WHERE 1=1
string lastWeek = "";
if (!string.IsNullOrEmpty(query.StartTime))
{
lastWeek += string.Format(" AND YEARWEEK(date_format(CreateTime,'%Y-%m-%d')) = YEARWEEK('{0}')-1 ", query.StartTime);
lastWeek += string.Format(" AND YEARWEEK(date_format(CreateTime,'%Y-%m-%d'),1) = YEARWEEK('{0}',1)-1 ", query.StartTime);
}
else
{
lastWeek += string.Format(" AND YEARWEEK(date_format(CreateTime,'%Y-%m-%d')) = YEARWEEK(now())-1 ");
lastWeek += string.Format(" AND YEARWEEK(date_format(CreateTime,'%Y-%m-%d'),1) = YEARWEEK(now(),1)-1 ");
}
var lastWeekList = Get<RB_Student_ViewModel>(string.Format(builder.ToString(), lastWeek)).ToList();
dicList.Add("lastWeek", lastWeekList);
......
......@@ -2672,8 +2672,8 @@ namespace Edu.WebApi.Controllers.User
ExcelDataSource subHeader = new ExcelDataSource() { ExcelRows = new List<ExcelColumn>() };
header.ExcelRows.Add(new ExcelColumn("员工") { Rowspan = 2, CellWidth = 15 });
subHeader.ExcelRows.Add(new ExcelColumn());
header.ExcelRows.Add(new ExcelColumn("名单") { CellWidth = 25 });
subHeader.ExcelRows.Add(new ExcelColumn("本月"));
header.ExcelRows.Add(new ExcelColumn("本月名单") { CellWidth = 25, Rowspan = 2 });
subHeader.ExcelRows.Add(new ExcelColumn(""));
header.ExcelRows.Add(new ExcelColumn("试听") { CellWidth = 15, Colspan = 2 });
subHeader.ExcelRows.Add(new ExcelColumn("本周"));
......@@ -2715,8 +2715,8 @@ namespace Edu.WebApi.Controllers.User
excelRows.Add(new ExcelColumn(UserReidsCache.GetUserLoginInfo(item.CreateBy)?.AccountName));
string curWeekStu = string.Join(",", item?.CurWeekStuList?.Select(qitem => qitem.StuName));
string curMonthStu = string.Join(",", item?.CurMonthStuList?.Select(qitem => qitem.StuName));
excelRows.Add(new ExcelColumn(curWeekStu));
excelRows.Add(new ExcelColumn(curWeekStu));
excelRows.Add(new ExcelColumn(curMonthStu));
//excelRows.Add(new ExcelColumn(curWeekStu));
excelRows.Add(new ExcelColumn(item.CurWeekTrialLesson.ToString()));
excelRows.Add(new ExcelColumn(item.CurMonthTrialLesson.ToString()));
......
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