Commit 76556294 authored by 黄奎's avatar 黄奎

页面修改

parent accf11dc
...@@ -448,13 +448,13 @@ namespace Edu.Module.User ...@@ -448,13 +448,13 @@ namespace Edu.Module.User
/// <summary> /// <summary>
/// 学员转交 /// 学员转交
/// </summary> /// </summary>
/// <param name="StuId">学员编号</param> /// <param name="StuIds">学员编号</param>
/// <param name="CreateBy">负责人</param> /// <param name="CreateBy">负责人</param>
/// <param name="OperateId">操作人</param> /// <param name="OperateId">操作人</param>
/// <returns></returns> /// <returns></returns>
public bool ForwardStudentModule(int StuId, int CreateBy, int OperateId) public bool ForwardStudentModule(string StuIds, int CreateBy, int OperateId)
{ {
return studentRepository.ForwardStudentRepository(StuId, CreateBy, OperateId); return studentRepository.ForwardStudentRepository(StuIds, CreateBy, OperateId);
} }
/// <summary> /// <summary>
......
...@@ -1203,7 +1203,8 @@ FROM rb_order o ...@@ -1203,7 +1203,8 @@ FROM rb_order o
WHERE 1=1 WHERE 1=1
"); ");
builder.AppendFormat(" AND o.OrderState IN({0}) ", (int)OrderStateEnum.Normal); builder.AppendFormat(" AND o.OrderState IN({0}) ", (int)OrderStateEnum.Normal);
builder.AppendFormat(" AND o.{0}={1} ", nameof(RB_Order_ViewModel.OrderType), (int)OrderTypeEnum.CourseOrder);
//builder.AppendFormat(" AND o.{0}={1} ", nameof(RB_Order_ViewModel.OrderType), (int)OrderTypeEnum.CourseOrder);
builder.AppendFormat(" AND o.CreateTime >= '2021-12-01' "); builder.AppendFormat(" AND o.CreateTime >= '2021-12-01' ");
builder.AppendFormat(" AND o.OrderId NOT IN(SELECT B.OrderId FROM rb_personnel_bonus AS A INNER JOIN rb_personnel_bonusdetail AS B ON A.Id=B.BonusId WHERE A.PlanType={0} AND A.EmployeeId ={1}) ", PlanType, SaleId); builder.AppendFormat(" AND o.OrderId NOT IN(SELECT B.OrderId FROM rb_personnel_bonus AS A INNER JOIN rb_personnel_bonusdetail AS B ON A.Id=B.BonusId WHERE A.PlanType={0} AND A.EmployeeId ={1}) ", PlanType, SaleId);
//帐平 //帐平
......
...@@ -806,32 +806,40 @@ WHERE o.OrderState=1 and og.`Status`=0 and sog.`Status`=0 and og.GuestState <>2 ...@@ -806,32 +806,40 @@ WHERE o.OrderState=1 and og.`Status`=0 and sog.`Status`=0 and og.GuestState <>2
/// <summary> /// <summary>
/// 学员转交 /// 学员转交
/// </summary> /// </summary>
/// <param name="StuId">学员编号</param> /// <param name="StuIds">学员编号</param>
/// <param name="CreateBy">负责人</param> /// <param name="CreateBy">负责人</param>
/// <param name="OperateId">操作人</param> /// <param name="OperateId">操作人</param>
/// <returns></returns> /// <returns></returns>
public bool ForwardStudentRepository(int StuId, int CreateBy, int OperateId) public bool ForwardStudentRepository(string StuIds, int CreateBy, int OperateId)
{ {
bool flag = false;
string logTitle = "客户转交"; string logTitle = "客户转交";
string logContent = ""; string logContent = "";
var oldModel = base.GetEntity(StuId); var stuList = GetStudentListRepository(new RB_Student_ViewModel() { StuIds = StuIds });
Dictionary<string, object> fileds = new Dictionary<string, object>() if (stuList != null && stuList.Count > 0)
{
{nameof(RB_Student_ViewModel.CreateBy),CreateBy },
};
if (oldModel.CreateBy != CreateBy)
{ {
string createByIds = string.Join(",", stuList.Select(qitem => qitem.CreateBy)) + "," + CreateBy;
var empList = accountRepository.GetEmployeeListRepository(new Employee_ViewModel() var empList = accountRepository.GetEmployeeListRepository(new Employee_ViewModel()
{ {
QIds = oldModel.CreateBy + "," + CreateBy QIds = createByIds.TrimStart(',').TrimEnd(',')
}); });
logContent = string.Format("负责人:由【{0}】=>【{1}】", foreach (var oldModel in stuList)
empList?.FirstOrDefault(qitem => qitem.CreateBy == oldModel.CreateBy)?.EmployeeName, {
empList?.FirstOrDefault(qitem => qitem.CreateBy == CreateBy)?.EmployeeName Dictionary<string, object> fileds = new Dictionary<string, object>()
); {
{nameof(RB_Student_ViewModel.CreateBy),CreateBy },
};
if (oldModel.CreateBy != CreateBy)
{
logContent = string.Format("负责人:由【{0}】=>【{1}】",
empList?.FirstOrDefault(qitem => qitem.Id == oldModel.CreateBy)?.EmployeeName,
empList?.FirstOrDefault(qitem => qitem.Id == CreateBy)?.EmployeeName
);
}
flag = base.Update(fileds, new WhereHelper(nameof(RB_Student_ViewModel.StuId), oldModel.StuId));
student_LogRepository.AddStuLogRepository(oldModel.StuId, Common.Enum.Log.StudentLogTypeEnum.BasicInfo, logTitle, logContent, OperateId);
}
} }
var flag = base.Update(fileds, new WhereHelper(nameof(RB_Student_ViewModel.StuId), StuId));
student_LogRepository.AddStuLogRepository(oldModel.StuId, Common.Enum.Log.StudentLogTypeEnum.BasicInfo, logTitle, logContent, OperateId);
return flag; return flag;
} }
......
...@@ -410,12 +410,17 @@ namespace Edu.WebApi.Controllers.Course ...@@ -410,12 +410,17 @@ namespace Edu.WebApi.Controllers.Course
[HttpPost] [HttpPost]
public ApiResult RunQuestion() public ApiResult RunQuestion()
{ {
Task.Run(() => { // Task.Run(() => {
var list = questionModule.GetQuestionListModule(new RB_Question_ViewModel() { Q_QuestionTypeIds = "14,16", }); var list = questionModule.GetQuestionListModule(new RB_Question_ViewModel() { Q_QuestionTypeIds = "16", });
if (list != null && list.Count > 0) if (list != null && list.Count > 0)
{ {
foreach (var item in list) foreach (var item in list)
{ {
if (item.QuestionId == 5333)
{
string str = "";
}
try try
{ {
var listenList = JsonHelper.DeserializeObject<List<SubAnswerItem>>(item.Answer); var listenList = JsonHelper.DeserializeObject<List<SubAnswerItem>>(item.Answer);
...@@ -431,7 +436,7 @@ namespace Edu.WebApi.Controllers.Course ...@@ -431,7 +436,7 @@ namespace Edu.WebApi.Controllers.Course
} }
} }
} }
}); //});
return ApiResult.Success(); return ApiResult.Success();
} }
......
...@@ -1354,7 +1354,20 @@ namespace Edu.WebApi.Controllers.User ...@@ -1354,7 +1354,20 @@ namespace Edu.WebApi.Controllers.User
{ {
var StuId = base.ParmJObj.GetInt("StuId"); var StuId = base.ParmJObj.GetInt("StuId");
var CreateBy = base.ParmJObj.GetInt("CreateBy"); var CreateBy = base.ParmJObj.GetInt("CreateBy");
bool flag = studentModule.ForwardStudentModule(StuId, CreateBy, base.UserInfo.Id); bool flag = studentModule.ForwardStudentModule(StuId.ToString(), CreateBy, base.UserInfo.Id);
return flag ? ApiResult.Success() : ApiResult.Failed();
}
/// <summary>
/// 批量学员转交
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult BatchForwardStudent()
{
var StuIds = base.ParmJObj.GetStringValue("StuIds");
var CreateBy = base.ParmJObj.GetInt("CreateBy");
bool flag = studentModule.ForwardStudentModule(StuIds, CreateBy, base.UserInfo.Id);
return flag ? ApiResult.Success() : ApiResult.Failed(); 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