Commit 76556294 authored by 黄奎's avatar 黄奎

页面修改

parent accf11dc
......@@ -448,13 +448,13 @@ namespace Edu.Module.User
/// <summary>
/// 学员转交
/// </summary>
/// <param name="StuId">学员编号</param>
/// <param name="StuIds">学员编号</param>
/// <param name="CreateBy">负责人</param>
/// <param name="OperateId">操作人</param>
/// <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>
......
......@@ -1203,7 +1203,8 @@ FROM rb_order o
WHERE 1=1
");
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.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
/// <summary>
/// 学员转交
/// </summary>
/// <param name="StuId">学员编号</param>
/// <param name="StuIds">学员编号</param>
/// <param name="CreateBy">负责人</param>
/// <param name="OperateId">操作人</param>
/// <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 logContent = "";
var oldModel = base.GetEntity(StuId);
var stuList = GetStudentListRepository(new RB_Student_ViewModel() { StuIds = StuIds });
if (stuList != null && stuList.Count > 0)
{
string createByIds = string.Join(",", stuList.Select(qitem => qitem.CreateBy)) + "," + CreateBy;
var empList = accountRepository.GetEmployeeListRepository(new Employee_ViewModel()
{
QIds = createByIds.TrimStart(',').TrimEnd(',')
});
foreach (var oldModel in stuList)
{
Dictionary<string, object> fileds = new Dictionary<string, object>()
{
{nameof(RB_Student_ViewModel.CreateBy),CreateBy },
};
if (oldModel.CreateBy != CreateBy)
{
var empList = accountRepository.GetEmployeeListRepository(new Employee_ViewModel()
{
QIds = oldModel.CreateBy + "," + CreateBy
});
logContent = string.Format("负责人:由【{0}】=>【{1}】",
empList?.FirstOrDefault(qitem => qitem.CreateBy == oldModel.CreateBy)?.EmployeeName,
empList?.FirstOrDefault(qitem => qitem.CreateBy == CreateBy)?.EmployeeName
empList?.FirstOrDefault(qitem => qitem.Id == oldModel.CreateBy)?.EmployeeName,
empList?.FirstOrDefault(qitem => qitem.Id == CreateBy)?.EmployeeName
);
}
var flag = base.Update(fileds, new WhereHelper(nameof(RB_Student_ViewModel.StuId), StuId));
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);
}
}
return flag;
}
......
......@@ -410,12 +410,17 @@ namespace Edu.WebApi.Controllers.Course
[HttpPost]
public ApiResult RunQuestion()
{
Task.Run(() => {
var list = questionModule.GetQuestionListModule(new RB_Question_ViewModel() { Q_QuestionTypeIds = "14,16", });
// Task.Run(() => {
var list = questionModule.GetQuestionListModule(new RB_Question_ViewModel() { Q_QuestionTypeIds = "16", });
if (list != null && list.Count > 0)
{
foreach (var item in list)
{
if (item.QuestionId == 5333)
{
string str = "";
}
try
{
var listenList = JsonHelper.DeserializeObject<List<SubAnswerItem>>(item.Answer);
......@@ -431,7 +436,7 @@ namespace Edu.WebApi.Controllers.Course
}
}
}
});
//});
return ApiResult.Success();
}
......
......@@ -1354,7 +1354,20 @@ namespace Edu.WebApi.Controllers.User
{
var StuId = base.ParmJObj.GetInt("StuId");
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();
}
......
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