Commit 2487d61f authored by 黄奎's avatar 黄奎

页面修改

parent eafab7a6
...@@ -226,6 +226,7 @@ namespace Edu.Module.User ...@@ -226,6 +226,7 @@ namespace Edu.Module.User
public RB_Student_ViewModel GetStuByTelModule(string Tel) public RB_Student_ViewModel GetStuByTelModule(string Tel)
{ {
var model = studentRepository.GetStuByTelRepository(new RB_Student_ViewModel() { StuTel = Tel }); var model = studentRepository.GetStuByTelRepository(new RB_Student_ViewModel() { StuTel = Tel });
return model; return model;
} }
......
...@@ -338,6 +338,10 @@ WHERE o.OrderState=1 and og.`Status`=0 and sog.`Status`=0 and og.GuestState=1 an ...@@ -338,6 +338,10 @@ WHERE o.OrderState=1 and og.`Status`=0 and sog.`Status`=0 and og.GuestState=1 an
} }
else else
{ {
if (model.StuStage <= 0)
{
model.StuStage = Common.Enum.User.StuStageEnum.NewStu;
}
var newId = base.Insert(model); var newId = base.Insert(model);
model.StuId = newId; model.StuId = newId;
flag = newId > 0; flag = newId > 0;
...@@ -486,7 +490,6 @@ WHERE 1=1 AND YEARWEEK(date_format(t.CreateTime, '%Y-%m-%d')) = YEARWEEK(now()) ...@@ -486,7 +490,6 @@ WHERE 1=1 AND YEARWEEK(date_format(t.CreateTime, '%Y-%m-%d')) = YEARWEEK(now())
builder.AppendFormat(@" builder.AppendFormat(@"
SELECT t.* SELECT t.*
FROM rb_student AS t FROM rb_student AS t
WHERE 1=1 WHERE 1=1
"); ");
builder.AppendFormat(" AND t.{0}={1} ", nameof(RB_Student_ViewModel.Status), (int)DateStateEnum.Normal); builder.AppendFormat(" AND t.{0}={1} ", nameof(RB_Student_ViewModel.Status), (int)DateStateEnum.Normal);
...@@ -502,7 +505,7 @@ WHERE 1=1 ...@@ -502,7 +505,7 @@ WHERE 1=1
} }
if (!string.IsNullOrWhiteSpace(query.StuTel)) if (!string.IsNullOrWhiteSpace(query.StuTel))
{ {
builder.AppendFormat(" AND t.{0}='{1}' ", nameof(RB_Student_ViewModel.StuTel)); builder.AppendFormat(" AND t.{0}='{1}' ", nameof(RB_Student_ViewModel.StuTel), query.StuTel);
} }
} }
return Get<RB_Student_ViewModel>(builder.ToString(), parameters)?.FirstOrDefault(); return Get<RB_Student_ViewModel>(builder.ToString(), parameters)?.FirstOrDefault();
......
...@@ -818,7 +818,7 @@ namespace Edu.WebApi.Controllers.User ...@@ -818,7 +818,7 @@ namespace Edu.WebApi.Controllers.User
} }
bool flag = studentModule.SetStudentModule(extModel); bool flag = studentModule.SetStudentModule(extModel);
return flag ? ApiResult.Success() : ApiResult.Failed(); return flag ? ApiResult.Success(data:extModel) : ApiResult.Failed();
} }
/// <summary> /// <summary>
...@@ -1045,9 +1045,26 @@ namespace Edu.WebApi.Controllers.User ...@@ -1045,9 +1045,26 @@ namespace Edu.WebApi.Controllers.User
{ {
var StuTel = base.ParmJObj.GetStringValue("StuTel"); var StuTel = base.ParmJObj.GetStringValue("StuTel");
var extModel = studentModule.GetStuByTelModule(StuTel); var extModel = studentModule.GetStuByTelModule(StuTel);
if (extModel != null && extModel.CreateBy > 0)
{
extModel.CreateByName = UserReidsCache.GetUserLoginInfo(extModel.CreateBy)?.AccountName ?? "";
}
return ApiResult.Success(data: extModel); return ApiResult.Success(data: extModel);
} }
/// <summary>
/// 获取客户来源枚举列表
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult CreateTypeList()
{
var list = Common.Plugin.EnumHelper.EnumToList(typeof(StuCreateTypeEnum));
return ApiResult.Success(data: list);
}
/// <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