Commit 438f6dbc authored by 黄奎's avatar 黄奎

新增字段

parent bbd50152
...@@ -249,5 +249,10 @@ namespace Edu.Model.Entity.User ...@@ -249,5 +249,10 @@ namespace Edu.Model.Entity.User
/// 活动次数 /// 活动次数
/// </summary> /// </summary>
public decimal ActivityNum { get; set; } public decimal ActivityNum { get; set; }
/// <summary>
/// 教师编号
/// </summary>
public int TeacherId { get; set; }
} }
} }
\ No newline at end of file
...@@ -38,5 +38,10 @@ namespace Edu.Model.ViewModel.WeChat ...@@ -38,5 +38,10 @@ namespace Edu.Model.ViewModel.WeChat
/// 班次Id /// 班次Id
/// </summary> /// </summary>
public int Scheduleid { get; set; } public int Scheduleid { get; set; }
/// <summary>
/// 聊天数据
/// </summary>
public int MessageCount { get; set; }
} }
} }
...@@ -283,7 +283,7 @@ namespace Edu.Module.EduTask ...@@ -283,7 +283,7 @@ namespace Edu.Module.EduTask
Requirement = "", Requirement = "",
CourseRate = CourseRateEnum.Advanced, CourseRate = CourseRateEnum.Advanced,
CurrentHours = 0, CurrentHours = 0,
ChapterGradeNo = 1, ChapterGradeNo = Num,
}); });
} }
if (courseChapterList != null && courseChapterList.Count > 0) if (courseChapterList != null && courseChapterList.Count > 0)
......
This diff is collapsed.
...@@ -43,6 +43,14 @@ WHERE 1=1 ...@@ -43,6 +43,14 @@ WHERE 1=1
{ {
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Teacher_Static_Extend.Times), query.Times); builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Teacher_Static_Extend.Times), query.Times);
} }
if (query.TeacherId > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Teacher_Static_Extend.TeacherId), query.TeacherId);
}
else
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Teacher_Static_Extend.TeacherId), 0);
}
} }
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_Teacher_Static_Extend>(builder.ToString()).ToList(); return Get<RB_Teacher_Static_Extend>(builder.ToString()).ToList();
...@@ -86,6 +94,14 @@ WHERE 1=1 AND A.Date<>'0001-01-01 00:00:00' ...@@ -86,6 +94,14 @@ WHERE 1=1 AND A.Date<>'0001-01-01 00:00:00'
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.TeacherId > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Teacher_Static_Extend.TeacherId), query.TeacherId);
}
else
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Teacher_Static_Extend.TeacherId), 0);
}
} }
builder.AppendFormat(" GROUP BY DATE_FORMAT(A.Date, '%Y-%m') "); builder.AppendFormat(" GROUP BY DATE_FORMAT(A.Date, '%Y-%m') ");
builder.AppendFormat(" ORDER BY DATE_FORMAT(A.Date, '%Y-%m') ASC "); builder.AppendFormat(" ORDER BY DATE_FORMAT(A.Date, '%Y-%m') ASC ");
...@@ -122,6 +138,14 @@ WHERE 1=1 AND A.Date<>'0001-01-01 00:00:00' ...@@ -122,6 +138,14 @@ WHERE 1=1 AND A.Date<>'0001-01-01 00:00:00'
{ {
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.TeacherId > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Teacher_Static_Extend.TeacherId), query.TeacherId);
}
else
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Teacher_Static_Extend.TeacherId), 0);
}
} }
builder.AppendFormat(" GROUP BY A.YearStr "); builder.AppendFormat(" GROUP BY A.YearStr ");
builder.AppendFormat(" ORDER BY A.YearStr ASC "); builder.AppendFormat(" ORDER BY A.YearStr ASC ");
...@@ -133,11 +157,11 @@ WHERE 1=1 AND A.Date<>'0001-01-01 00:00:00' ...@@ -133,11 +157,11 @@ WHERE 1=1 AND A.Date<>'0001-01-01 00:00:00'
/// </summary> /// </summary>
/// <param name="DateStr"></param> /// <param name="DateStr"></param>
/// <returns></returns> /// <returns></returns>
public RB_Teacher_Static_Extend GetTeacherStaticByProcRepository(string DateStr) public List<RB_Teacher_Static_Extend> GetTeacherStaticByProcRepository(string DateStr)
{ {
string sql = string.Format("call proc_teacher_static('{0}') ", DateStr); string sql = string.Format("call proc_teacher_static('{0}') ", DateStr);
var list = Get<RB_Teacher_Static_Extend>(sql); var list = Get<RB_Teacher_Static_Extend>(sql).ToList();
return list?.FirstOrDefault(); return list;
} }
/// <summary> /// <summary>
......
...@@ -746,9 +746,9 @@ namespace Edu.ThirdCore.QYWinXin ...@@ -746,9 +746,9 @@ namespace Edu.ThirdCore.QYWinXin
/// </summary> /// </summary>
/// <param name="userIds"></param> /// <param name="userIds"></param>
/// <param name="day"></param> /// <param name="day"></param>
public static int GetWechatStudentStatic(List<string> userIds, DateTime day) public static List<WechatCheck_ViewModel> GetWechatStudentStatic(List<string> userIds, DateTime day)
{ {
int message_cnt = 0; List<WechatCheck_ViewModel> list = new List<WechatCheck_ViewModel>();
string WX_CorpId = "ww8418f1889fdded76"; string WX_CorpId = "ww8418f1889fdded76";
//客户联系秘钥 //客户联系秘钥
string Employee_Secret = "Jpn1_rq00KHuCef4fGAjcsg1dH02ncTPvH5rxshyD9c"; string Employee_Secret = "Jpn1_rq00KHuCef4fGAjcsg1dH02ncTPvH5rxshyD9c";
...@@ -756,32 +756,40 @@ namespace Edu.ThirdCore.QYWinXin ...@@ -756,32 +756,40 @@ namespace Edu.ThirdCore.QYWinXin
DateTime start = new DateTime(day.Year, day.Month, day.Day, 0, 0, 0); DateTime start = new DateTime(day.Year, day.Month, day.Day, 0, 0, 0);
long startt = Common.ConvertHelper.ConvertDateTimeInt(start); long startt = Common.ConvertHelper.ConvertDateTimeInt(start);
long endt = Common.ConvertHelper.ConvertDateTimeInt(start); long endt = Common.ConvertHelper.ConvertDateTimeInt(start);
var request = new
{
start_time = startt,
end_time = endt,
userid = userIds,
partyid=new List<int>()
};
string url = string.Format("https://qyapi.weixin.qq.com/cgi-bin/externalcontact/get_user_behavior_data?access_token={0}", token); string url = string.Format("https://qyapi.weixin.qq.com/cgi-bin/externalcontact/get_user_behavior_data?access_token={0}", token);
var Rmsg = HttpHelper.HttpPost(url, JsonHelper.Serialize(request), ""); foreach (var item in userIds)
if (!string.IsNullOrEmpty(Rmsg))
{ {
JObject root = JObject.Parse(Rmsg); WechatCheck_ViewModel model = new WechatCheck_ViewModel()
if (root.GetInt("errcode") == 0)
{ {
JArray behavior_data = JArray.Parse(root.GetStringValue("behavior_data")); Acctid = item
if (behavior_data != null && behavior_data.Count > 0) };
var request = new
{
start_time = startt,
end_time = endt,
userid = new List<string>() { item},
partyid = new List<int>()
};
var Rmsg = HttpHelper.HttpPost(url, JsonHelper.Serialize(request), "");
if (!string.IsNullOrEmpty(Rmsg))
{
JObject root = JObject.Parse(Rmsg);
if (root.GetInt("errcode") == 0)
{ {
foreach (var jItem in behavior_data) JArray behavior_data = JArray.Parse(root.GetStringValue("behavior_data"));
if (behavior_data != null && behavior_data.Count > 0)
{ {
JObject sObj = JObject.Parse(jItem.ToString()); foreach (var jItem in behavior_data)
message_cnt += sObj.GetInt("message_cnt"); {
JObject sObj = JObject.Parse(jItem.ToString());
model.MessageCount= sObj.GetInt("message_cnt");
}
} }
} }
} }
list.Add(model);
} }
return message_cnt; return list;
} }
#endregion #endregion
} }
......
...@@ -38,7 +38,8 @@ namespace Edu.WebApi.Controllers.User ...@@ -38,7 +38,8 @@ namespace Edu.WebApi.Controllers.User
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"),
}; };
query.Group_Id = base.UserInfo.Group_Id; query.Group_Id = base.UserInfo.Group_Id;
var list = teacherStaticModule.GetTeacherStaticListModule(query); var list = teacherStaticModule.GetTeacherStaticListModule(query);
...@@ -56,7 +57,8 @@ namespace Edu.WebApi.Controllers.User ...@@ -56,7 +57,8 @@ namespace Edu.WebApi.Controllers.User
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"),
}; };
query.Group_Id = base.UserInfo.Group_Id; query.Group_Id = base.UserInfo.Group_Id;
var list = teacherStaticModule.GetTeacherStaticListModule(query); var list = teacherStaticModule.GetTeacherStaticListModule(query);
...@@ -150,6 +152,7 @@ namespace Edu.WebApi.Controllers.User ...@@ -150,6 +152,7 @@ namespace Edu.WebApi.Controllers.User
var query = new RB_Teacher_Static_Extend() var query = new RB_Teacher_Static_Extend()
{ {
YearStr = base.ParmJObj.GetInt("YearStr"), YearStr = base.ParmJObj.GetInt("YearStr"),
TeacherId = base.ParmJObj.GetInt("TeacherId"),
}; };
query.Group_Id = base.UserInfo.Group_Id; query.Group_Id = base.UserInfo.Group_Id;
var list = teacherStaticModule.GetTeacherStaticMonthModule(query); var list = teacherStaticModule.GetTeacherStaticMonthModule(query);
...@@ -167,6 +170,7 @@ namespace Edu.WebApi.Controllers.User ...@@ -167,6 +170,7 @@ namespace Edu.WebApi.Controllers.User
var query = new RB_Teacher_Static_Extend() var query = new RB_Teacher_Static_Extend()
{ {
YearStr = base.ParmJObj.GetInt("YearStr"), YearStr = base.ParmJObj.GetInt("YearStr"),
TeacherId = base.ParmJObj.GetInt("TeacherId"),
}; };
query.Group_Id = base.UserInfo.Group_Id; query.Group_Id = base.UserInfo.Group_Id;
var list = teacherStaticModule.GetTeacherStaticMonthModule(query); var list = teacherStaticModule.GetTeacherStaticMonthModule(query);
...@@ -260,6 +264,7 @@ namespace Edu.WebApi.Controllers.User ...@@ -260,6 +264,7 @@ namespace Edu.WebApi.Controllers.User
var query = new RB_Teacher_Static_Extend() var query = new RB_Teacher_Static_Extend()
{ {
YearStr = base.ParmJObj.GetInt("YearStr"), YearStr = base.ParmJObj.GetInt("YearStr"),
TeacherId = base.ParmJObj.GetInt("TeacherId"),
}; };
query.Group_Id = base.UserInfo.Group_Id; query.Group_Id = base.UserInfo.Group_Id;
var list = teacherStaticModule.GetTeacherStaticMonthRateModule(query); var list = teacherStaticModule.GetTeacherStaticMonthRateModule(query);
...@@ -277,6 +282,7 @@ namespace Edu.WebApi.Controllers.User ...@@ -277,6 +282,7 @@ namespace Edu.WebApi.Controllers.User
var query = new RB_Teacher_Static_Extend() var query = new RB_Teacher_Static_Extend()
{ {
YearStr = base.ParmJObj.GetInt("YearStr"), YearStr = base.ParmJObj.GetInt("YearStr"),
TeacherId = base.ParmJObj.GetInt("TeacherId"),
}; };
query.Group_Id = base.UserInfo.Group_Id; query.Group_Id = base.UserInfo.Group_Id;
var list = teacherStaticModule.GetTeacherStaticMonthRateModule(query); var list = teacherStaticModule.GetTeacherStaticMonthRateModule(query);
...@@ -351,6 +357,7 @@ namespace Edu.WebApi.Controllers.User ...@@ -351,6 +357,7 @@ namespace Edu.WebApi.Controllers.User
var query = new RB_Teacher_Static_Extend() var query = new RB_Teacher_Static_Extend()
{ {
YearStr = base.ParmJObj.GetInt("YearStr"), YearStr = base.ParmJObj.GetInt("YearStr"),
TeacherId = base.ParmJObj.GetInt("TeacherId"),
}; };
query.Group_Id = base.UserInfo.Group_Id; query.Group_Id = base.UserInfo.Group_Id;
var list = teacherStaticModule.GetTeacherStaticListYearModule(query); var list = teacherStaticModule.GetTeacherStaticListYearModule(query);
...@@ -368,6 +375,7 @@ namespace Edu.WebApi.Controllers.User ...@@ -368,6 +375,7 @@ namespace Edu.WebApi.Controllers.User
var query = new RB_Teacher_Static_Extend() var query = new RB_Teacher_Static_Extend()
{ {
YearStr = base.ParmJObj.GetInt("YearStr"), YearStr = base.ParmJObj.GetInt("YearStr"),
TeacherId = base.ParmJObj.GetInt("TeacherId"),
}; };
query.Group_Id = base.UserInfo.Group_Id; query.Group_Id = base.UserInfo.Group_Id;
var list = teacherStaticModule.GetTeacherStaticListYearModule(query); var list = teacherStaticModule.GetTeacherStaticListYearModule(query);
...@@ -422,6 +430,7 @@ namespace Edu.WebApi.Controllers.User ...@@ -422,6 +430,7 @@ namespace Edu.WebApi.Controllers.User
var query = new RB_Teacher_Static_Extend() var query = new RB_Teacher_Static_Extend()
{ {
YearStr = base.ParmJObj.GetInt("YearStr"), YearStr = base.ParmJObj.GetInt("YearStr"),
TeacherId = base.ParmJObj.GetInt("TeacherId"),
}; };
query.Group_Id = base.UserInfo.Group_Id; query.Group_Id = base.UserInfo.Group_Id;
var list = teacherStaticModule.GetTeacherStaticYearRateModule(query); var list = teacherStaticModule.GetTeacherStaticYearRateModule(query);
...@@ -439,6 +448,7 @@ namespace Edu.WebApi.Controllers.User ...@@ -439,6 +448,7 @@ namespace Edu.WebApi.Controllers.User
var query = new RB_Teacher_Static_Extend() var query = new RB_Teacher_Static_Extend()
{ {
YearStr = base.ParmJObj.GetInt("YearStr"), YearStr = base.ParmJObj.GetInt("YearStr"),
TeacherId = base.ParmJObj.GetInt("TeacherId"),
}; };
query.Group_Id = base.UserInfo.Group_Id; query.Group_Id = base.UserInfo.Group_Id;
var list = teacherStaticModule.GetTeacherStaticYearRateModule(query); var list = teacherStaticModule.GetTeacherStaticYearRateModule(query);
......
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