Commit bee881e4 authored by 黄奎's avatar 黄奎

页面修改

parent 0c583460
using Edu.Common.Enum;
using Edu.Common.Plugin;
using Edu.Model.Entity.User;
using Edu.Model.ViewModel.User;
using Edu.Repository.Customer;
using Edu.Repository.System;
......@@ -423,7 +424,6 @@ WHERE o.OrderState=1 and og.`Status`=0 and sog.`Status`=0 and og.GuestState=1 an
{
{nameof(RB_Student_ViewModel.StuName),model.StuName.Trim() },
{nameof(RB_Student_ViewModel.StuTel),model.StuTel.Trim() },
{nameof(RB_Student_ViewModel.StuSex),model.StuSex },
{nameof(RB_Student_ViewModel.StuBirth),model.StuBirth },
{nameof(RB_Student_ViewModel.ProviceId),model.ProviceId },
......@@ -470,9 +470,25 @@ WHERE o.OrderState=1 and og.`Status`=0 and sog.`Status`=0 and og.GuestState=1 an
var newId = base.Insert(model);
model.StuId = newId;
flag = newId > 0;
if (model.CreateType == Common.Enum.User.StuCreateTypeEnum.EmployeeInput)
{
createBy = model.CreateBy;
}
else
{
createBy = model.CustomerId;
}
logContent = "创建了该客户";
logTitle = "创建客户";
}
#region 处理学员账号信息
var accountModel= accountRepository.GetAccountListRepository(new RB_Account_ViewModel() { Group_Id = model.Group_Id, AccountType = Common.Enum.User.AccountTypeEnum.Student, AccountId = model.StuId }).FirstOrDefault();
if (accountModel == null)
{
//创建学生账号
model.Account_Id = accountRepository.Insert(new Model.Entity.User.RB_Account()
model.Account_Id = accountRepository.Insert(new RB_Account()
{
Id = 0,
Account = model.StuTel,
......@@ -488,17 +504,21 @@ WHERE o.OrderState=1 and og.`Status`=0 and sog.`Status`=0 and og.GuestState=1 an
UpdateTime = DateTime.Now,
Password = Common.DES.Encrypt(Common.Config.DefaultPwd)
});
if (model.CreateType == Common.Enum.User.StuCreateTypeEnum.EmployeeInput)
{
createBy = model.CreateBy;
}
else
}
else
{
if (model.StuTel != accountModel.Account)
{
createBy = model.CustomerId;
Dictionary<string, object> accountFileds = new Dictionary<string, object>()
{
{nameof(RB_Account.Account),model.StuTel}
};
accountRepository.Update(accountFileds, new WhereHelper(nameof(RB_Account.Id), accountModel.Id));
}
logContent = "创建了该客户";
logTitle = "创建客户";
}
#endregion
student_LogRepository.AddStuLogRepository(model.StuId, Common.Enum.Log.StudentLogTypeEnum.BasicInfo, logTitle, logContent, createBy, CreateType: model.OperateType);
return flag;
}
......
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