Commit 94ee406d authored by 黄奎's avatar 黄奎

页面修改

parent fa19bc31
This diff is collapsed.
......@@ -56,11 +56,11 @@ WHERE 1=1
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Student_Static_Extend> GetStudentStaticMonthListRepository(RB_Student_Static_Extend query)
public List<RB_Student_Static_Extend> GetStudentStaticMonthListRepository(RB_Student_Static_Extend query,bool isYear=false)
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT CONCAT(DATE_FORMAT(A.Date, '%Y-%m'),'-01') AS Date,SUM(A.PushCount) AS PushCount,SUM(A.NewCount) AS NewCount,SUM(A.CommunicationCount) AS CommunicationCount
SELECT CONCAT(DATE_FORMAT(A.Date, '%Y-%m'),'-01') AS Date,A.YearStr,A.MonthStr,SUM(A.PushCount) AS PushCount,SUM(A.NewCount) AS NewCount,SUM(A.CommunicationCount) AS CommunicationCount
,SUM(A.TrialLessonCount) AS TrialLessonCount,SUM(A.NotContacted) AS NotContacted,SUM(A.JPCount) AS JPCount,SUM(A.KRCount) AS KRCount,SUM(A.FRCount) AS FRCount
,SUM(A.JPStudyCount) AS JPStudyCount,SUM(A.KRStudyCount) AS KRStudyCount,SUM(A.YGAStudyCount) AS YGAStudyCount,SUM(A.USStudyCount) AS USStudyCount
,SUM(A.SGStudyCount) AS SGStudyCount,SUM(A.AXStudyCount) AS AXStudyCount,SUM(A.OtherCount) AS OtherCount,SUM(A.ClassACount) AS ClassACount,SUM(A.ClassBCount) AS ClassBCount
......@@ -78,12 +78,19 @@ WHERE 1=1 AND A.Date<>'0001-01-01 00:00:00'
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Student_Static_Extend.Group_Id), query.Group_Id);
}
if (query.YearStr > 0)
{
if (isYear)
{
builder.AppendFormat(" AND A.{0}<={1} ", nameof(RB_Student_Static_Extend.YearStr), query.YearStr);
}
else
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Student_Static_Extend.YearStr), query.YearStr);
}
}
}
builder.AppendFormat(" GROUP BY DATE_FORMAT(A.Date, '%Y-%m') ");
builder.AppendFormat(" ORDER BY DATE_FORMAT(A.Date, '%Y-%m') ASC ", nameof(RB_Student_Static_Extend.Id));
builder.AppendFormat(" ORDER BY DATE_FORMAT(A.Date, '%Y-%m') ASC ");
return Get<RB_Student_Static_Extend>(builder.ToString()).ToList();
}
......
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