Commit f87dc0bb authored by 黄奎's avatar 黄奎

页面修改

parent d5af5773
......@@ -429,7 +429,7 @@ namespace Edu.Module.Course
Profession = item?.StuProfession ?? "",
Sex = (item?.StuSex ?? 1) + 1,
Age = item.StuBirth.HasValue ? DateTime.Now.Year - item.StuBirth.Value.Year : 18,
Mobile = item?.StuTel ?? "",
Mobile = item?.StuRealMobile ?? "",
Basics = "",
Education = item?.StuEducation ?? GuestEducationEnum.N2,
GuestSource = orderModel.OrderSource,
......
......@@ -363,7 +363,7 @@ WHERE o.OrderState=1 and og.`Status`=0 and sog.`Status`=0 and og.GuestState=1 an
{
model.StuSourceId = 0;
}
//model.StuTel = Common.Plugin.StringHelper.ReplaceMobile(model.StuRealMobile);
model.StuTel = Common.Plugin.StringHelper.ReplaceMobile(model.StuRealMobile);
if (model.StuId > 0)
{
logTitle = "修改客户";
......@@ -498,6 +498,7 @@ WHERE o.OrderState=1 and og.`Status`=0 and sog.`Status`=0 and og.GuestState=1 an
{nameof(RB_Student_ViewModel.QQ),model.QQ},
{nameof(RB_Student_ViewModel.WeChatNo),model.WeChatNo},
{nameof(RB_Student_ViewModel.StuType),model.StuType},
{nameof(RB_Student_ViewModel.StuRealMobile),model.StuRealMobile},
};
//教育后台操作
if (model.OperateType == 1)
......@@ -546,21 +547,21 @@ WHERE o.OrderState=1 and og.`Status`=0 and sog.`Status`=0 and og.GuestState=1 an
#region 处理学员账号信息
var accountModel= accountRepository.GetAccountListRepository(new RB_Account_ViewModel() { Group_Id = model.Group_Id, AccountType = Common.Enum.User.AccountTypeEnum.Student, AccountId = model.StuId }).FirstOrDefault();
string account = "";
if (!string.IsNullOrEmpty(model.WeChatNo))
{
account = model.WeChatNo;
}
if (!string.IsNullOrEmpty(model.QQ))
{
account = model.QQ;
}
if (!string.IsNullOrEmpty(model.StuRealMobile))
{
account = model.StuRealMobile;
}
if (accountModel == null)
{
string account = "";
if (!string.IsNullOrEmpty(model.WeChatNo))
{
account = model.WeChatNo;
}
if (!string.IsNullOrEmpty(model.QQ))
{
account = model.QQ;
}
if (!string.IsNullOrEmpty(model.StuTel))
{
account = model.StuTel;
}
//创建学生账号
model.Account_Id = accountRepository.Insert(new RB_Account()
{
......@@ -581,11 +582,11 @@ WHERE o.OrderState=1 and og.`Status`=0 and sog.`Status`=0 and og.GuestState=1 an
}
else
{
if (model.StuTel != accountModel.Account)
if (account != accountModel.Account)
{
Dictionary<string, object> accountFileds = new Dictionary<string, object>()
{
{nameof(RB_Account.Account),model.StuTel}
{nameof(RB_Account.Account),account}
};
accountRepository.Update(accountFileds, new WhereHelper(nameof(RB_Account.Id), accountModel.Id));
}
......@@ -754,6 +755,11 @@ WHERE 1=1
builder.AppendFormat(" AND t.{0}=@StuTel ", nameof(RB_Student_ViewModel.StuTel));
parameters.Add("StuTel", query.StuTel.Trim());
}
if (!string.IsNullOrWhiteSpace(query.StuRealMobile))
{
builder.AppendFormat(" AND t.{0}=@StuRealMobile ", nameof(RB_Student_ViewModel.StuRealMobile));
parameters.Add("StuRealMobile", query.StuRealMobile.Trim());
}
if (!string.IsNullOrWhiteSpace(query.QQ))
{
builder.AppendFormat(" AND t.{0}=@QQ ", nameof(RB_Student_ViewModel.QQ));
......
......@@ -40,6 +40,7 @@ namespace Edu.WebApi.Controllers.Customer
var query = new RB_Student_Appointment_Extend()
{
StuId = base.ParmJObj.GetInt("StuId"),
Id=base.ParmJObj.GetInt("Id"),
};
query.Group_Id = base.UserInfo.Group_Id;
var data = customerStudentModule.GetStudentAppointmentPageModule(pageModel.PageIndex, pageModel.PageSize, out long rowsCount, query);
......@@ -216,6 +217,7 @@ namespace Edu.WebApi.Controllers.Customer
var query = new RB_Student_Visit_Extend()
{
StuId = base.ParmJObj.GetInt("StuId"),
Id=base.ParmJObj.GetInt("Id"),
};
query.Group_Id = base.UserInfo.Group_Id;
var data = customerStudentModule.GetStudentVisitPageModule(pageModel.PageIndex, pageModel.PageSize, out long rowsCount, query);
......
......@@ -839,7 +839,7 @@ namespace Edu.WebApi.Controllers.User
{
return ApiResult.Failed("手机号码、QQ号码、微信号码至少填写一项!");
}
if (!string.IsNullOrEmpty(extModel.StuTel) && !Common.Plugin.StringHelper.IsMobilePhone(extModel.StuTel))
if (!string.IsNullOrEmpty(extModel.StuRealMobile) && !Common.Plugin.StringHelper.IsMobilePhone(extModel.StuRealMobile))
{
return ApiResult.Failed("手机号码不正确,请重新填写!");
}
......@@ -898,7 +898,7 @@ namespace Edu.WebApi.Controllers.User
var query = new RB_Student_ViewModel()
{
StuId = base.ParmJObj.GetInt("StuId"),
StuTel = base.ParmJObj.GetStringValue("StuTel"),
StuRealMobile = base.ParmJObj.GetStringValue("StuRealMobile"),
QQ = base.ParmJObj.GetStringValue("QQ"),
WeChatNo = base.ParmJObj.GetStringValue("WeChatNo")
};
......@@ -916,9 +916,9 @@ namespace Edu.WebApi.Controllers.User
query.Group_Id = base.UserInfo.Group_Id;
}
if (!string.IsNullOrEmpty(query.StuTel))
if (!string.IsNullOrEmpty(query.StuRealMobile))
{
var model = studentModule.CheckExistsStuModule(new RB_Student_ViewModel() { Group_Id = query.Group_Id, StuTel = query.StuTel });
var model = studentModule.CheckExistsStuModule(new RB_Student_ViewModel() { Group_Id = query.Group_Id, StuRealMobile = query.StuRealMobile });
string name = UserReidsCache.GetUserLoginInfo((model?.CreateBy ?? 0))?.AccountName ?? "";
if (model != null && model.StuId > 0)
{
......@@ -1245,16 +1245,18 @@ namespace Edu.WebApi.Controllers.User
var customer = base.AppletCustomerInfo;
var query = new RB_Student_ViewModel()
{
StuTel = base.ParmJObj.GetStringValue("StuTel"),
QQ = base.ParmJObj.GetStringValue("QQ"),
WeChatNo = base.ParmJObj.GetStringValue("WeChatNo")
};
if (customer != null && customer.GroupId > 0)
{
query.StuRealMobile = base.ParmJObj.GetStringValue("StuTel");
query.Group_Id = customer.GroupId;
}
if (query.Group_Id <= 0)
{
query.StuRealMobile = base.ParmJObj.GetStringValue("StuRealMobile");
query.Group_Id = base.UserInfo.Group_Id;
}
var extModel = studentModule.CheckExistsStuModule(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