Commit 604fd8f8 authored by liudong1993's avatar liudong1993

Merge branch 'master' of http://gitlab.oytour.com/Kui2/education

parents e0d8dbee 0cd41e26
......@@ -148,6 +148,8 @@ namespace Edu.Cache.User
Group_Id = model.Group_Id,
ManagerIds = model.Id.ToString()
});
string JHTenantId = Config.JHTenantId;
string JHMallBaseId = Config.JHMallBaseId;
userInfo = new UserInfo
{
Id = model.Id,
......@@ -165,8 +167,8 @@ namespace Edu.Cache.User
UserMobile = model.Account,
ErpToken = "",
MallToken = "",
JHMallBaseId = "",
JHTenantId = "",
JHMallBaseId = JHMallBaseId,
JHTenantId = JHTenantId,
GroupLogo = model.GroupLogo,
UserIcon = model.UserIcon,
DeptName = model.DeptName,
......
......@@ -92,5 +92,10 @@ namespace Edu.Model.Entity.Mall
get;
set;
}
/// <summary>
/// 选择参与人员编号
/// </summary>
public int ActivitySurveyGuestId { get; set; }
}
}
......@@ -21,7 +21,7 @@ namespace Edu.Model.Entity.User
public DateTime Date { get; set; }
/// <summary>
/// 学生人
/// 学生人
/// </summary>
public decimal StudentCount { get; set; }
......@@ -254,5 +254,26 @@ namespace Edu.Model.Entity.User
/// 教师编号
/// </summary>
public int TeacherId { get; set; }
/// <summary>
/// 试讲成功得分(班课)1分
/// </summary>
public decimal SpeakClassScore { get; set; }
/// <summary>
/// 试讲成功得分(Vip课程)2分
/// </summary>
public decimal SpeakVipScore { get; set; }
/// <summary>
/// 试讲失败
/// </summary>
public decimal SpeakFailScore { get; set; }
/// <summary>
/// 考级升级得分
/// </summary>
public decimal GradeTestScore { get; set; }
}
}
\ No newline at end of file
......@@ -368,7 +368,7 @@ namespace Edu.Module.User
Id = extModel?.Id ?? 0,
YearStr = extModel?.YearStr ?? 0,
MonthStr = extModel?.MonthStr ?? 0,
TeacherAccountId = TeacherAccountId,
TeacherAccountId,
TeacherScore = extModel?.TeacherScore ?? 0,
JiaoWuScore = extModel?.JiaoWuScore ?? 0,
TotalScore = extModel?.TotalScore ?? 0,
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -24,12 +24,13 @@ namespace Edu.Repository.Mall
/// <returns></returns>
public List<RB_ActivitySurvey> GetActivitySurveyListRepository(RB_ActivitySurvey where,string StuAccountId)
{
string dateStr = Common.ConvertHelper.FormatDate(DateTime.Now);
StringBuilder sb = new StringBuilder();
sb.AppendFormat($@"
SELECT A.*
sb.AppendFormat(@"
SELECT A.*,(SELECT Id FROM RB_ActivitySurvey_Guest WHERE GuestType=2 AND IsFinish=0 AND SurveyId=A.ID AND StartTime<'{0}' AND EndTime>'{0}' AND GuestId={1} LIMIT 1) AS ActivitySurveyGuestId
FROM RB_ActivitySurvey AS A
WHERE A.State=0 ");
string dateStr = Common.ConvertHelper.FormatDate(DateTime.Now);
WHERE A.State=0 ",dateStr, StuAccountId);
sb.AppendFormat(" AND A.StartDate<'{0}' AND A.EndDate>'{0}' ", dateStr);
if (!string.IsNullOrEmpty(StuAccountId))
{
......
......@@ -448,10 +448,10 @@ where sog.Status =0 and o.Group_Id ={group_Id} and o.OrderState <>3 and IFNULL(o
{
where += $" and s.{nameof(RB_Student_ViewModel.StuPurpose)} ={demodel.StuPurpose}";
}
if (demodel.School_Id > -1)
{
where += $" and cl.School_Id ={demodel.School_Id}";
}
//if (demodel.School_Id > -1)
//{
// where += $" and cl.School_Id ={demodel.School_Id}";
//}
if (demodel.ConsultantId > 0)
{
where += $@" AND s.StuId IN (SELECT StuId FROM rb_student_assist WHERE AssistId ={demodel.ConsultantId} AND `Status`=0)";
......@@ -539,7 +539,11 @@ FROM rb_student s
INNER JOIN rb_course c on o.CourseId = c.CourseId
LEFT JOIN rb_education_contract ec on ec.GuestId = og.GuestId
LEFT JOIN rb_student_advisorconfig AS b ON s.AdvisorStatus=B.Id
LEFT JOIN (SELECT OrderGuestId,MIN(ClassDate) AS ClassDate FROM rb_class_check WHERE Status=0 AND CheckStatus=0 GROUP BY OrderGuestId) AS clcheck ON org.Id=clcheck.OrderGuestId
LEFT JOIN (
SELECT B.Student_Id,MIN(A.ClassDate) AS ClassDate
FROM rb_class_check AS A INNER JOIN rb_student_orderguest AS B ON A.OrderGuestId=B.GuestId
WHERE A.Status=0 AND A.CheckStatus=0 GROUP BY B.Student_Id
) AS clcheck ON s.StuId=clcheck.Student_Id
";
if (!string.IsNullOrEmpty(demodel.SFTime) && !string.IsNullOrEmpty(demodel.EFTime)) {
//增加跟进链表
......
......@@ -29,6 +29,7 @@ SELECT DATE_FORMAT(A.Date, '%Y-%m-%d') AS Date,A.YearStr,SUM(StudentCount) AS St
,SUM(N4ClassHoursScore) AS N4ClassHoursScore,SUM(N3ClassHours) AS N3ClassHours,SUM(N3ClassHoursScore) AS N3ClassHoursScore,SUM(N2ClassHours) AS N2ClassHours,SUM(N2ClassHoursScore) AS N2ClassHoursScore
,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(SpeakClassScore) AS SpeakClassScore,SUM(SpeakVipScore) AS SpeakVipScore,SUM(GradeTestScore) AS GradeTestScore,SUM(SpeakFailScore) AS SpeakFailScore
FROM RB_Teacher_Static AS A
WHERE 1=1
");
......@@ -87,6 +88,7 @@ SELECT A.TeacherId,CONCAT(DATE_FORMAT(A.Date, '%Y-%m'),'-01') AS Date,A.YearStr,
,SUM(N4ClassHoursScore) AS N4ClassHoursScore,SUM(N3ClassHours) AS N3ClassHours,SUM(N3ClassHoursScore) AS N3ClassHoursScore,SUM(N2ClassHours) AS N2ClassHours,SUM(N2ClassHoursScore) AS N2ClassHoursScore
,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(SpeakClassScore) AS SpeakClassScore,SUM(SpeakVipScore) AS SpeakVipScore,SUM(GradeTestScore) AS GradeTestScore,SUM(SpeakFailScore) AS SpeakFailScore
FROM RB_Teacher_Static AS A
WHERE 1=1 AND A.Date<>'0001-01-01 00:00:00' AND A.TeacherId>0
");
......@@ -131,6 +133,7 @@ SELECT CONCAT(DATE_FORMAT(A.Date, '%Y-%m'),'-01') AS Date,A.YearStr,SUM(StudentC
,SUM(N4ClassHoursScore) AS N4ClassHoursScore,SUM(N3ClassHours) AS N3ClassHours,SUM(N3ClassHoursScore) AS N3ClassHoursScore,SUM(N2ClassHours) AS N2ClassHours,SUM(N2ClassHoursScore) AS N2ClassHoursScore
,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(SpeakClassScore) AS SpeakClassScore,SUM(SpeakVipScore) AS SpeakVipScore,SUM(GradeTestScore) AS GradeTestScore,SUM(SpeakFailScore) AS SpeakFailScore
FROM RB_Teacher_Static AS A
WHERE 1=1 AND A.Date<>'0001-01-01 00:00:00'
");
......@@ -182,6 +185,7 @@ SELECT CONCAT(A.YearStr,'-01','-01') AS Date,A.YearStr,SUM(StudentCount) AS Stud
,SUM(N4ClassHoursScore) AS N4ClassHoursScore,SUM(N3ClassHours) AS N3ClassHours,SUM(N3ClassHoursScore) AS N3ClassHoursScore,SUM(N2ClassHours) AS N2ClassHours,SUM(N2ClassHoursScore) AS N2ClassHoursScore
,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(SpeakClassScore) AS SpeakClassScore,SUM(SpeakVipScore) AS SpeakVipScore,SUM(GradeTestScore) AS GradeTestScore,SUM(SpeakFailScore) AS SpeakFailScore
FROM RB_Teacher_Static AS A
WHERE 1=1 AND A.Date<>'0001-01-01 00:00:00'
");
......
......@@ -378,9 +378,11 @@ namespace Edu.WebApi.Controllers.Applet
MallBaseId = JHMallBaseId,
}, appletUserInfo.Id.ToString());
var ActivitySurveyId = 0;
var ActivitySurveyGuestId = 0;
if (surveyList != null && surveyList.Count > 0)
{
ActivitySurveyId = surveyList.FirstOrDefault().ID;
ActivitySurveyGuestId= surveyList.FirstOrDefault().ActivitySurveyGuestId;
}
return ApiResult.Success("", new
{
......@@ -397,7 +399,8 @@ namespace Edu.WebApi.Controllers.Applet
LearningGardenList,
Words,
BankTypeList,
ActivitySurveyId
ActivitySurveyId,
ActivitySurveyGuestId,
});
}
......
......@@ -36,13 +36,14 @@ namespace Edu.WebApi.Controllers.Goods
{
SurveyId=base.ParmJObj.GetInt("SurveyId")
};
query.TenantId = Convert.ToInt32(base.UserInfo.JHTenantId);
query.MallBaseId = Convert.ToInt32(base.UserInfo.JHMallBaseId);
Int32.TryParse(base.UserInfo.JHTenantId, out int JHTenantId);
query.TenantId = JHTenantId;
Int32.TryParse(base.UserInfo.JHMallBaseId, out int JHMallBaseId);
query.MallBaseId = JHMallBaseId;
var list = activitySurveyModule.GetActivitySurveyGuestPageModule(pageModel.PageIndex, pageModel.PageSize, out long rowsCount, query);
List<object> result = new List<object>();
foreach (var item in list)
{
result.Add(new
{
item.Id,
......@@ -79,8 +80,8 @@ namespace Edu.WebApi.Controllers.Goods
extModel.Status = 0;
extModel.CreateBy = base.UserInfo.Id;
extModel.CreateDate = DateTime.Now;
extModel.TenantId = Convert.ToInt32(base.UserInfo.JHTenantId);
extModel.MallBaseId = Convert.ToInt32(base.UserInfo.JHMallBaseId);
extModel.TenantId = Convert.ToInt32(Common.Config.JHTenantId);
extModel.MallBaseId = Convert.ToInt32(Common.Config.JHMallBaseId);
bool flag = activitySurveyModule.SetActivitySurveyGuestModule(extModel);
return flag ? ApiResult.Success() : ApiResult.Failed();
}
......
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