Commit 7f837acc authored by 黄奎's avatar 黄奎

页面修改

parent 0c6c3402
...@@ -26,5 +26,10 @@ namespace Edu.Model.ViewModel.User ...@@ -26,5 +26,10 @@ namespace Edu.Model.ViewModel.User
return Common.ConvertHelper.FormatDate2(this.Date); return Common.ConvertHelper.FormatDate2(this.Date);
} }
} }
/// <summary>
/// 查询待收金额不为0的数据
/// </summary>
public int IsQueryNotMoney { get; set; }
} }
} }
...@@ -25,5 +25,10 @@ namespace Edu.Model.ViewModel.User ...@@ -25,5 +25,10 @@ namespace Edu.Model.ViewModel.User
return Common.ConvertHelper.FormatDate2(this.Date); return Common.ConvertHelper.FormatDate2(this.Date);
} }
} }
/// <summary>
/// 查询待收金额不为0的数据
/// </summary>
public int IsQueryNotMoney { get; set; }
} }
} }
...@@ -26,6 +26,11 @@ namespace Edu.Model.ViewModel.User ...@@ -26,6 +26,11 @@ namespace Edu.Model.ViewModel.User
return Common.ConvertHelper.FormatDate2(this.Date); return Common.ConvertHelper.FormatDate2(this.Date);
} }
} }
/// <summary>
/// 查询待收金额不为0的数据
/// </summary>
public int IsQueryNotMoney { get; set; }
} }
/// <summary> /// <summary>
......
This diff is collapsed.
...@@ -45,6 +45,10 @@ WHERE 1=1 ...@@ -45,6 +45,10 @@ WHERE 1=1
{ {
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Student_Company_Extend.Times), query.Times); builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Student_Company_Extend.Times), query.Times);
} }
if (query.IsQueryNotMoney == 1)
{
builder.AppendFormat(" AND (A.{0}<>0 OR A.{1}<>0) ", nameof(RB_Student_Company_Extend.OrderNotMoney), nameof(RB_Student_Company_Extend.StudyOrderNotMoney));
}
} }
builder.AppendFormat(" ORDER BY A.{0} ASC ", nameof(RB_Student_Company_Extend.Id)); builder.AppendFormat(" ORDER BY A.{0} ASC ", nameof(RB_Student_Company_Extend.Id));
return Get<RB_Student_Company_Extend>(builder.ToString()).ToList(); return Get<RB_Student_Company_Extend>(builder.ToString()).ToList();
......
...@@ -43,6 +43,10 @@ WHERE 1=1 ...@@ -43,6 +43,10 @@ WHERE 1=1
{ {
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Student_Market_Extend.Times), query.Times); builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Student_Market_Extend.Times), query.Times);
} }
if (query.IsQueryNotMoney == 1)
{
builder.AppendFormat(" AND (A.{0}<>0 OR A.{1}<>0) ", nameof(RB_Student_Market_Extend.OrderNotMoney), nameof(RB_Student_Market_Extend.StudyOrderNotMoney));
}
} }
builder.AppendFormat(" ORDER BY A.{0} ASC ", nameof(RB_Student_Static_Extend.Id)); builder.AppendFormat(" ORDER BY A.{0} ASC ", nameof(RB_Student_Static_Extend.Id));
return Get<RB_Student_Market_Extend>(builder.ToString()).ToList(); return Get<RB_Student_Market_Extend>(builder.ToString()).ToList();
......
...@@ -46,6 +46,10 @@ WHERE 1=1 ...@@ -46,6 +46,10 @@ WHERE 1=1
{ {
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Student_Static_Extend.Times), query.Times); builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Student_Static_Extend.Times), query.Times);
} }
if (query.IsQueryNotMoney == 1)
{
builder.AppendFormat(" AND (A.{0}<>0 OR A.{1}<>0) ", nameof(RB_Student_Static_Extend.OrderNotMoney), nameof(RB_Student_Static_Extend.StudyOrderNotMoney));
}
} }
builder.AppendFormat(" ORDER BY A.{0} ASC ", nameof(RB_Student_Static_Extend.Id)); builder.AppendFormat(" ORDER BY A.{0} ASC ", nameof(RB_Student_Static_Extend.Id));
return Get<RB_Student_Static_Extend>(builder.ToString()).ToList(); return Get<RB_Student_Static_Extend>(builder.ToString()).ToList();
......
...@@ -999,48 +999,10 @@ namespace Edu.WebApi.Controllers.User ...@@ -999,48 +999,10 @@ namespace Edu.WebApi.Controllers.User
return File(byteData1, "application/octet-stream", excelName); return File(byteData1, "application/octet-stream", excelName);
} }
} }
/// <summary>
/// 初始化课程顾问部学员统计数据
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult InitStudentStatic()
{
var userInfo = base.UserInfo;
string StartTime = base.ParmJObj.GetStringValue("StartTime");
if (string.IsNullOrEmpty(StartTime))
{
StartTime = Common.ConvertHelper.FormatDate(DateTime.Now);
}
StartTime = "2021-12-21";
string EndTime = Common.ConvertHelper.FormatDate(DateTime.Now);
bool flag = studentStatModule.CreateStudentStaticModule(userInfo, StartTime, EndTime);
return flag ? ApiResult.Success() : ApiResult.Failed();
}
#endregion #endregion
#region 市场部客户数据统计 #region 市场部客户数据统计
/// <summary>
/// 初始化市场部学员统计数据
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult InitStudentMarket()
{
var userInfo = base.UserInfo;
string StartTime = base.ParmJObj.GetStringValue("StartTime");
if (string.IsNullOrEmpty(StartTime))
{
StartTime = Common.ConvertHelper.FormatDate(DateTime.Now);
}
StartTime = "2021-12-21";
string EndTime = Common.ConvertHelper.FormatDate(DateTime.Now);
bool flag = studentStatModule.CreateStudentMarketModule(userInfo, StartTime, EndTime);
return flag ? ApiResult.Success() : ApiResult.Failed();
}
/// <summary> /// <summary>
/// 市场部客户数据每日统计 /// 市场部客户数据每日统计
/// </summary> /// </summary>
...@@ -2018,12 +1980,17 @@ namespace Edu.WebApi.Controllers.User ...@@ -2018,12 +1980,17 @@ namespace Edu.WebApi.Controllers.User
} }
} }
#endregion
#region 刷新待收金额和初始化数据
/// <summary> /// <summary>
/// 初始化全公司学员统计数据 /// 初始化学员统计数据
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
public ApiResult InitStudentCompany() public ApiResult InitStudentData()
{ {
var userInfo = base.UserInfo; var userInfo = base.UserInfo;
string StartTime = base.ParmJObj.GetStringValue("StartTime"); string StartTime = base.ParmJObj.GetStringValue("StartTime");
...@@ -2034,9 +2001,21 @@ namespace Edu.WebApi.Controllers.User ...@@ -2034,9 +2001,21 @@ namespace Edu.WebApi.Controllers.User
StartTime = "2021-12-21"; StartTime = "2021-12-21";
string EndTime = Common.ConvertHelper.FormatDate(DateTime.Now); string EndTime = Common.ConvertHelper.FormatDate(DateTime.Now);
bool flag = studentStatModule.CreateStudentCompanyModule(userInfo, StartTime, EndTime); bool flag = studentStatModule.CreateStudentCompanyModule(userInfo, StartTime, EndTime);
flag = studentStatModule.CreateStudentMarketModule(userInfo, StartTime, EndTime);
flag = studentStatModule.CreateStudentStaticModule(userInfo, StartTime, EndTime);
return flag ? ApiResult.Success() : ApiResult.Failed(); return flag ? ApiResult.Success() : ApiResult.Failed();
} }
#endregion /// <summary>
/// 初始化全公司学员统计数据
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult RefreshStudentNotMoney()
{
bool flag = studentStatModule.CalcStudentNotMoneyModule();
return flag ? ApiResult.Success() : ApiResult.Failed();
}
#endregion
} }
} }
...@@ -85,6 +85,9 @@ namespace Edu.WebApi.Timers ...@@ -85,6 +85,9 @@ namespace Edu.WebApi.Timers
static System.Timers.Timer dealStudentProgressTimer;//处理学员上课进度 static System.Timers.Timer dealStudentProgressTimer;//处理学员上课进度
static System.Timers.Timer dealStudentNotMoneyTimer;//处理学员待收金额
public static void RunTimer() public static void RunTimer()
{ {
timer1 = new System.Timers.Timer timer1 = new System.Timers.Timer
...@@ -150,6 +153,13 @@ namespace Edu.WebApi.Timers ...@@ -150,6 +153,13 @@ namespace Edu.WebApi.Timers
}; };
dealStudentProgressTimer.Elapsed += new System.Timers.ElapsedEventHandler(DealStudentProgressModule); dealStudentProgressTimer.Elapsed += new System.Timers.ElapsedEventHandler(DealStudentProgressModule);
dealStudentProgressTimer.Enabled = true; dealStudentProgressTimer.Enabled = true;
dealStudentNotMoneyTimer = new System.Timers.Timer()
{
Interval = (1000 * 60) * (60*4) //1小时检查一次
};
dealStudentNotMoneyTimer.Elapsed += new System.Timers.ElapsedEventHandler(DealStudentNotMoneyData);
dealStudentNotMoneyTimer.Enabled = true;
} }
public static void RunStop() public static void RunStop()
...@@ -163,6 +173,7 @@ namespace Edu.WebApi.Timers ...@@ -163,6 +173,7 @@ namespace Edu.WebApi.Timers
finishGuest.Enabled = false; finishGuest.Enabled = false;
marketTimer.Enabled = false; marketTimer.Enabled = false;
dealStudentProgressTimer.Enabled = false; dealStudentProgressTimer.Enabled = false;
dealStudentNotMoneyTimer.Enabled = false;
} }
/// <summary> /// <summary>
...@@ -177,6 +188,7 @@ namespace Edu.WebApi.Timers ...@@ -177,6 +188,7 @@ namespace Edu.WebApi.Timers
private static int guestfinish_Timer = 0; private static int guestfinish_Timer = 0;
private static int marketconsultant_Timer = 0; private static int marketconsultant_Timer = 0;
private static int dealstudentprogress_Timer = 0; private static int dealstudentprogress_Timer = 0;
private static int dealStudentNotMoney_Timer = 0;
private static readonly string createMarkDataKey = "createMarkDataKey"; private static readonly string createMarkDataKey = "createMarkDataKey";
...@@ -239,6 +251,20 @@ namespace Edu.WebApi.Timers ...@@ -239,6 +251,20 @@ namespace Edu.WebApi.Timers
} }
} }
/// <summary>
/// 定时更新学员统计待收金额
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
public static void DealStudentNotMoneyData(object sender, System.Timers.ElapsedEventArgs e)
{
if (Interlocked.Exchange(ref dealStudentNotMoney_Timer, 1) == 0)
{
studentStatModule.CalcStudentNotMoneyModule();
Interlocked.Exchange(ref dealStudentNotMoney_Timer, 0);
}
}
/// <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