Commit 92156301 authored by 吴春's avatar 吴春

解决冲突

parents ecda180b c9140752
......@@ -344,5 +344,41 @@ namespace Edu.Common
builder.AppendFormat(@"<span style='text-decoration: underline;'>{1}{0}{1}</span>", value, (isAddNbsp ? "&nbsp;&nbsp;" : ""));
return builder.ToString();
}
/// <summary>
/// 根据出生日期计算年龄
/// </summary>
/// <param name="birthdate"></param>
/// <returns></returns>
public static int GetAgeByBirthdate(object birthdate)
{
int age = 0;
DateTime now = DateTime.Now;
if (birthdate != null)
{
try
{
var timeStr = Convert.ToDateTime(birthdate.ToString()).ToString("yyyy-MM-dd");
if (timeStr == "0001-01-01")
{
timeStr = "";
}
if (!string.IsNullOrEmpty(timeStr))
{
var newBirth = Convert.ToDateTime(timeStr);
age = now.Year - newBirth.Year;
if (now.Month < newBirth.Month || (now.Month == newBirth.Month && now.Day < newBirth.Day))
{
age--;
}
}
}
catch
{
}
}
return age < 0 ? 0 : age;
}
}
}
\ No newline at end of file
......@@ -67,6 +67,7 @@ namespace Edu.Model.Entity.Course
/// 学习分钟数(单位:分钟)
/// </summary>
public int StudyNum { get; set; }
/// <summary>
/// 创建人
/// </summary>
......@@ -77,6 +78,9 @@ namespace Edu.Model.Entity.Course
/// </summary>
public DateTime CreateTime { get; set; }
/// <summary>
/// 补课状态(1-正常,2-已处理,3-未处理)
/// </summary>
public int MakeUpStatus { get; set; }
}
}
......@@ -170,5 +170,25 @@ namespace Edu.Model.Entity.Course
/// 留学就业备注
/// </summary>
public string StudyRemark { get; set; }
/// <summary>
/// 出生日期
/// </summary>
public DateTime BirthDate { get; set; }
/// <summary>
/// 总课时
/// </summary>
public int TotalHours { get; set; }
/// <summary>
/// 完成课时
/// </summary>
public int CompleteHours { get; set; }
/// <summary>
/// 补课课时
/// </summary>
public int MakeUpHours { get; set; }
}
}
......@@ -89,6 +89,7 @@ namespace Edu.Model.ViewModel.Course
/// 合同列表
/// </summary>
public List<RB_Education_Contract_ViewModel> ContractList { get; set; }
/// <summary>
/// 报名开始时间
/// </summary>
......
......@@ -107,25 +107,25 @@ namespace Edu.Module.Course
string dxMoney = StringHelper.MoneyToUpper(Money.ToString());
obj = new
{
StudentName = guestModel?.GuestName ?? "",
StuBirth = "",
StuSex = (guestModel?.Sex ?? 0) == 1 ? 0 : 1,
StuAddress = guestModel?.ContactAddress ?? "",
StuTel = guestModel?.Mobile ?? "",
StuEmail = "",
CourseName = classModel?.CourseName ?? "",
SchoolName = classModel?.SchoolName ?? "",
SchoolPrincipal = empList?.Where(qitem => qitem.Id == (classModel?.ManagerId ?? 0))?.FirstOrDefault()?.EmployeeName ?? "",
StartLevel = guestModel?.Basics ?? "",
CourseConsultant = empList?.Where(qitem => qitem.Id == (orderModel?.EnterID ?? 0))?.FirstOrDefault()?.EmployeeName ?? "",
Payee = empList?.Where(qitem => qitem.Id == (orderModel?.EnterID ?? 0))?.FirstOrDefault()?.EmployeeName ?? "",
FirstClassHours = classModel?.ClassHours ?? 0,
FirstCourseFee = PreferPrice,
FirstBookFee = 0,
FirstClassFee = 0,
FirstDiscountMoney = DiscountMoney,
FirstMoney = Money,
CNYCaps = dxMoney,
StudentName=guestModel?.GuestName??"",
StuBirth=Common.ConvertHelper.FormatDate(guestModel?.BirthDate),
StuSex=(guestModel?.Sex??0)==1?0:1,
StuAddress=guestModel?.ContactAddress??"",
StuTel= guestModel?.Mobile??"",
StuEmail="",
CourseName=classModel?.CourseName??"",
SchoolName=classModel?.SchoolName??"",
SchoolPrincipal= empList?.Where(qitem=>qitem.Id==(classModel?.ManagerId??0))?.FirstOrDefault()?.EmployeeName??"",
StartLevel=guestModel?.Basics??"",
CourseConsultant= empList?.Where(qitem => qitem.Id == (orderModel?.EnterID ?? 0))?.FirstOrDefault()?.EmployeeName ?? "",
Payee= empList?.Where(qitem => qitem.Id == (orderModel?.EnterID ?? 0))?.FirstOrDefault()?.EmployeeName ?? "",
FirstClassHours=classModel?.ClassHours??0,
FirstCourseFee= PreferPrice,
FirstBookFee =0,
FirstClassFee=0,
FirstDiscountMoney= DiscountMoney,
FirstMoney= Money,
CNYCaps= dxMoney,
Money,
};
return obj;
......
......@@ -9,6 +9,7 @@ using Edu.Common.Plugin;
using Edu.Model.CacheModel;
using Edu.Model.ViewModel.Course;
using Edu.Model.ViewModel.Log;
using Edu.Model.ViewModel.StudyAbroad;
using Edu.Model.ViewModel.User;
using Edu.Repository.Course;
using Edu.Repository.Finance;
......@@ -221,6 +222,19 @@ namespace Edu.Module.Course
return classRepository.GetClassListRepository(new RB_Class_ViewModel() { Q_ClassIds = classIds });
}
/// <summary>
/// 获取留学就业产品名称
/// </summary>
/// <param name="ids"></param>
/// <returns></returns>
public List<RB_StudyAbroad_ViewModel> GetStudyAbroadListModule(string ids)
{
return studyAbroadRepository.GetStudyAbroadListRepository(new RB_StudyAbroad_ViewModel()
{
QIds = ids
});
}
/// <summary>
/// 日语培训下单
/// </summary>
......@@ -1379,6 +1393,10 @@ namespace Edu.Module.Course
public virtual bool SetOrderGuestInfo(RB_Order_Guest_ViewModel dmodel, out string message)
{
bool flag = false;
if (dmodel.BirthDate != null)
{
dmodel.Age = Common.ConvertHelper.GetAgeByBirthdate(dmodel.BirthDate);
}
message = "";
if (dmodel.Id > 0)
{
......@@ -1498,6 +1516,17 @@ namespace Edu.Module.Course
}
gModel.StudyRemark = dmodel.StudyRemark;
if (gModel.BirthDate != dmodel.BirthDate)
{
LogContent += ",出身日期由【" + gModel.BirthDate + "】修改为【" + dmodel.BirthDate + "】";
}
gModel.BirthDate = dmodel.BirthDate;
if (gModel.TotalHours != dmodel.TotalHours)
{
LogContent += ",总课时由【" + gModel.TotalHours + "】修改为【" + dmodel.TotalHours + "】";
}
gModel.TotalHours = dmodel.TotalHours;
gModel.UpdateTime = dmodel.UpdateTime;
flag = order_GuestRepository.Update(gModel);
if (flag)
......@@ -1573,7 +1602,7 @@ namespace Edu.Module.Course
ProviceId = 0,
School_Id = classmodel.School_Id,
Status = DateStateEnum.Normal,
StuBirth = null,
StuBirth = dmodel.BirthDate,
StuIcon = "",
StuName = dmodel.GuestName,
StuSex = dmodel.Sex - 1,
......
......@@ -75,7 +75,7 @@ namespace Edu.Module.User
/// <returns></returns>
public List<RB_Assist_ViewModel> GetAssistPageListModule(int pageIndex, int pageSize, out long rowsCount, RB_Assist_ViewModel query)
{
var list= assistRepository.GetAssistPageListRepository(pageIndex, pageSize, out rowsCount, query);
var list = assistRepository.GetAssistPageListRepository(pageIndex, pageSize, out rowsCount, query);
if (list != null && list.Count > 0)
{
string postIds = string.Join(",", list.Where(qitem => qitem.Post_Id > 0).Select(qitem => qitem.Post_Id));
......@@ -100,7 +100,7 @@ namespace Edu.Module.User
}
/// <summary>
/// 添加修改助教
///【员工管理端】添加修改助教
/// </summary>
/// <param name="model"></param>
/// <param name="isUpdateBasic">是否更新基础资料</param>
......@@ -134,13 +134,13 @@ namespace Edu.Module.User
model.LeaveTime = null;
}
fileds.Add(nameof(RB_Assist_ViewModel.IDCard), model.IDCard);
fileds.Add(nameof(RB_Assist_ViewModel.Sex),model.Sex);
fileds.Add(nameof(RB_Assist_ViewModel.EntryTime),model.EntryTime);
fileds.Add(nameof(RB_Assist_ViewModel.Address),model.Address);
fileds.Add(nameof(RB_Assist_ViewModel.BirthDate),model.BirthDate);
fileds.Add(nameof(RB_Assist_ViewModel.LeaveStatus),model.LeaveStatus);
fileds.Add(nameof(RB_Assist_ViewModel.LeaveTime),model.LeaveTime);
fileds.Add(nameof(RB_Assist_ViewModel.Education),model.Education);
fileds.Add(nameof(RB_Assist_ViewModel.Sex), model.Sex);
fileds.Add(nameof(RB_Assist_ViewModel.EntryTime), model.EntryTime);
fileds.Add(nameof(RB_Assist_ViewModel.Address), model.Address);
fileds.Add(nameof(RB_Assist_ViewModel.BirthDate), model.BirthDate);
fileds.Add(nameof(RB_Assist_ViewModel.LeaveStatus), model.LeaveStatus);
fileds.Add(nameof(RB_Assist_ViewModel.LeaveTime), model.LeaveTime);
fileds.Add(nameof(RB_Assist_ViewModel.Education), model.Education);
fileds.Add(nameof(RB_Assist_ViewModel.Email), model.Email);
}
string logContent = "";
......@@ -212,8 +212,8 @@ namespace Edu.Module.User
}
if (flag)
{
var account= accountModule.GetAccountListModule(new RB_Account_ViewModel() { AccountType = AccountTypeEnum.Assist, AccountId = model.AId })?.FirstOrDefault();
int Id = account?.Id??0;
var account = accountModule.GetAccountListModule(new RB_Account_ViewModel() { AccountType = AccountTypeEnum.Assist, AccountId = model.AId })?.FirstOrDefault();
int Id = account?.Id ?? 0;
flag = accountModule.SetAccountModule(new RB_Account_ViewModel()
{
Id = Id,
......@@ -233,6 +233,89 @@ namespace Edu.Module.User
return flag;
}
/// <summary>
/// 【助教端】添加修改助教
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public bool SetAssistModule_V2(RB_Assist_ViewModel model)
{
bool flag;
if (model.AId > 0)
{
var oldModel = GetAssistModule(model.AId);
Dictionary<string, object> fileds = new Dictionary<string, object>()
{
{nameof(RB_Assist_ViewModel.AssistName),model.AssistName.Trim() },
{nameof(RB_Assist_ViewModel.AssistTel),model.AssistTel },
{nameof(RB_Assist_ViewModel.AssistIcon),model.AssistIcon },
{nameof(RB_Assist_ViewModel.UpdateBy),model.UpdateBy },
{nameof(RB_Assist_ViewModel.UpdateTime),model.UpdateTime },
};
fileds.Add(nameof(RB_Assist_ViewModel.Dept_Id), model.Dept_Id);
fileds.Add(nameof(RB_Assist_ViewModel.Post_Id), model.Post_Id);
fileds.Add(nameof(RB_Assist_ViewModel.AssistIntro), model.AssistIntro);
fileds.Add(nameof(RB_Assist_ViewModel.Teacher_Id), model.Teacher_Id);
fileds.Add(nameof(RB_Assist_ViewModel.School_Id), model.School_Id);
string logContent = "";
if (model.AssistName != oldModel.AssistName)
{
logContent += string.Format(",将姓名由【{0}】修改为【{1}】。", oldModel.AssistName, model.AssistName);
}
if (model.AssistTel != oldModel.AssistTel)
{
logContent += string.Format(",将电话由【{0}】修改为【{1}】。", oldModel.AssistTel, model.AssistTel);
}
if (model.AssistIntro != oldModel.AssistIntro)
{
logContent += string.Format(",将简介由【{0}】修改为【{1}】。", oldModel.AssistIntro, model.AssistIntro);
}
if (model.AssistIcon != oldModel.AssistIcon)
{
logContent += string.Format(",将头像由【{0}】修改为【{1}】。", oldModel.AssistIcon, model.AssistIcon);
}
if (!string.IsNullOrEmpty(logContent))
{
//新增日志
userChangeLogModule.SetUserChangeLogModule(model.CreateBy, model.Group_Id, model.School_Id, logContent, model.AId, AccountTypeEnum.Assist);
}
flag = assistRepository.Update(fileds, new WhereHelper(nameof(RB_Assist.AId), model.AId));
}
else
{
var newId = assistRepository.Insert(model);
model.AId = newId;
userChangeLogModule.SetUserChangeLogModule(model.CreateBy, model.Group_Id, model.School_Id, "新建助教用户", newId, AccountTypeEnum.Assist);
flag = newId > 0;
}
if (flag)
{
var account = accountModule.GetAccountListModule(new RB_Account_ViewModel() { AccountType = AccountTypeEnum.Assist, AccountId = model.AId })?.FirstOrDefault();
int Id = account?.Id ?? 0;
if (Id == 0)
{
flag = accountModule.SetAccountModule(new RB_Account_ViewModel()
{
Id = Id,
Account = model.AssistTel,
Password = Common.DES.Encrypt(Common.Config.DefaultPwd),
AccountType = AccountTypeEnum.Assist,
AccountId = model.AId,
CreateBy = model.CreateBy,
UpdateBy = model.CreateBy,
CreateTime = DateTime.Now,
UpdateTime = DateTime.Now,
Group_Id = model.Group_Id,
School_Id = model.School_Id,
DirectSupervisor = model.DirectSupervisor
});
}
}
return flag;
}
/// <summary>
/// 添加修改助教部门
/// </summary>
......@@ -352,7 +435,7 @@ namespace Edu.Module.User
{nameof(RB_Assist.LeaveTime),model.LeaveTime },
{nameof(RB_Assist.UpdateBy),model.UpdateBy },
{nameof(RB_Assist.UpdateTime),model.UpdateTime },
};
string logContent = "";
if (model.LeaveStatus != oldModel.LeaveStatus)
......@@ -409,7 +492,7 @@ namespace Edu.Module.User
flag = assistRepository.Update(fileds, new WhereHelper(nameof(RB_Assist.AId), AId));
var accountList = accountModule.GetAccountListExtModule(new RB_Account_ViewModel()
{
AccountId=model.AId,
AccountId = model.AId,
Account = model.AssistTel,
AccountType = AccountTypeEnum.Assist
});
......
......@@ -114,7 +114,7 @@ namespace Edu.Module.User
}
/// <summary>
/// 新增修改讲师
/// 员工管理端(新增修改讲师)
/// </summary>
/// <param name="model"></param>
/// <param name="isUpdateBasic">是否更新基础资料</param>
......@@ -238,13 +238,129 @@ namespace Edu.Module.User
flag = newId > 0;
}
if (flag)
{
var account = accountModule.GetAccountListModule(new RB_Account_ViewModel() { AccountType = AccountTypeEnum.Teacher, AccountId = model.TId })?.FirstOrDefault();
int Id = account?.Id ?? 0;
if (Id == 0)
{
flag = accountModule.SetAccountModule(new RB_Account_ViewModel()
{
Id = Id,
Account = model.TeacherAccount,
Password = Common.DES.Encrypt(Common.Config.DefaultPwd),
AccountType = AccountTypeEnum.Teacher,
AccountId = model.TId,
CreateBy = model.CreateBy,
UpdateBy = model.CreateBy,
CreateTime = DateTime.Now,
UpdateTime = DateTime.Now,
Group_Id = model.Group_Id,
School_Id = model.School_Id,
DirectSupervisor = model.DirectSupervisor
});
}
}
return flag;
}
/// <summary>
/// 教师端(新增修改讲师)
/// </summary>
/// <param name="model"></param>
/// <param name="isUpdateBasic">是否更新基础资料</param>
/// <returns></returns>
public bool SetTeacherModule_V2(RB_Teacher_ViewModel model, bool isUpdateBasic = false)
{
bool flag;
if (model.TId > 0)
{
var oldModel = GetTeacherModule(model.TId);
Dictionary<string, object> fileds = new Dictionary<string, object>()
{
{nameof(RB_Teacher_ViewModel.TeacherName),model.TeacherName },
{nameof(RB_Teacher_ViewModel.TeacherTel),model.TeacherTel },
{nameof(RB_Teacher_ViewModel.TeacherHead),model.TeacherHead },
{nameof(RB_Teacher_ViewModel.TeacherIcon),model.TeacherIcon },
{nameof(RB_Teacher_ViewModel.UpdateBy),model.UpdateBy },
{nameof(RB_Teacher_ViewModel.UpdateTime),model.UpdateTime },
{nameof(RB_Teacher_ViewModel.School_Id),model.School_Id },
};
fileds.Add(nameof(RB_Teacher_ViewModel.TeachTag), model.TeachTag);
fileds.Add(nameof(RB_Teacher_ViewModel.SortNum), model.SortNum);
fileds.Add(nameof(RB_Teacher_ViewModel.IsRecommend), model.IsRecommend);
fileds.Add(nameof(RB_Teacher_ViewModel.IsShow), model.IsShow);
fileds.Add(nameof(RB_Teacher_ViewModel.TeacherIntro), model.TeacherIntro);
fileds.Add(nameof(RB_Teacher_ViewModel.TeacherSay), model.TeacherSay);
fileds.Add(nameof(RB_Teacher_ViewModel.Dept_Id), model.Dept_Id);
fileds.Add(nameof(RB_Teacher_ViewModel.Post_Id), model.Post_Id);
fileds.Add(nameof(RB_Teacher_ViewModel.BaseStuNum), model.BaseStuNum);
fileds.Add(nameof(RB_Teacher_ViewModel.BaseHourFee), model.BaseHourFee);
#region 修改日志
string logContent = "";
if (model.TeacherName != oldModel.TeacherName)
{
logContent += string.Format(",将姓名由【{0}】修改为【{1}】。", oldModel.TeacherName, model.TeacherName);
}
if (model.TeacherTel != oldModel.TeacherTel)
{
logContent += string.Format(",将电话由【{0}】修改为【{1}】。", oldModel.TeacherTel, model.TeacherTel);
}
if (model.BaseStuNum != oldModel.BaseStuNum)
{
logContent += string.Format(",将带班基础人数由【{0}】修改为【{1}】。", oldModel.BaseStuNum, model.BaseStuNum);
}
if (Common.ConvertHelper.FormatDate(model.EntryTime) != Common.ConvertHelper.FormatDate(oldModel.EntryTime))
{
logContent += string.Format(",将入职时间由【{0}】修改为【{1}】。", oldModel.EntryTime, model.EntryTime);
}
if (model.Address != oldModel.Address)
{
logContent += string.Format(",将地址由【{0}】修改为【{1}】。", oldModel.Address, model.Address);
}
if (Common.ConvertHelper.FormatDate(model.BirthDate) != Common.ConvertHelper.FormatDate(oldModel.BirthDate))
{
logContent += string.Format(",将生日由【{0}】修改为【{1}】。", Common.ConvertHelper.FormatDate(oldModel.BirthDate), Common.ConvertHelper.FormatDate(model.BirthDate));
}
if (model.Education != oldModel.Education)
{
logContent += string.Format(",将学历由【{0}】修改为【{1}】。", oldModel.Education.ToName(), model.Education.ToName());
}
if (model.Email != oldModel.Email)
{
logContent += string.Format(",将邮箱由【{0}】修改为【{1}】。", oldModel.Email, model.Email);
}
if (model.BaseHourFee != oldModel.BaseHourFee)
{
logContent += string.Format(",将基础课时费由【{0}】修改为【{1}】。", oldModel.BaseHourFee, model.BaseHourFee);
}
if (model.BaseStuNum != oldModel.BaseStuNum)
{
logContent += string.Format(",将基础带班人数由【{0}】修改为【{1}】。", oldModel.BaseStuNum, model.BaseStuNum);
}
if (!string.IsNullOrEmpty(logContent))
{
//新增日志
userChangeLogModule.SetUserChangeLogModule(model.CreateBy, model.Group_Id, model.School_Id, logContent, model.TId, AccountTypeEnum.Teacher);
}
#endregion
flag = teacherRepository.Update(fileds, new WhereHelper(nameof(RB_Teacher_ViewModel.TId), model.TId));
}
else
{
var newId = teacherRepository.Insert(model);
model.TId = newId;
userChangeLogModule.SetUserChangeLogModule(model.CreateBy, model.Group_Id, model.School_Id, "新建教师用户", newId, AccountTypeEnum.Teacher);
flag = newId > 0;
}
if (flag)
{
var account = accountModule.GetAccountListModule(new RB_Account_ViewModel() { AccountType = AccountTypeEnum.Teacher, AccountId = model.TId })?.FirstOrDefault();
int Id = account?.Id ?? 0;
flag = accountModule.SetAccountModule(new RB_Account_ViewModel()
{
Id = Id,
Account = model.TeacherAccount,
Account = model.TeacherTel,
Password = Common.DES.Encrypt(Common.Config.DefaultPwd),
AccountType = AccountTypeEnum.Teacher,
AccountId = model.TId,
......
......@@ -171,7 +171,7 @@ namespace Edu.Repository.Course
{
DynamicParameters parameters = new DynamicParameters();
string where = $@" 1=1";
where += $@" AND c.{nameof(RB_Education_Contract_ViewModel.Status)} =2 ";//只查询已审核通过的
where += $@" AND c.{nameof(RB_Education_Contract_ViewModel.Status)} <>4 ";//只查询已审核通过的
if (demodel.Group_Id > 0)
{
where += $@" AND c.{nameof(RB_Education_Contract_ViewModel.Group_Id)} ={demodel.Group_Id}";
......
......@@ -195,6 +195,31 @@ namespace Edu.WebApi.Controllers.Course
return flag ? ApiResult.Success() : ApiResult.Failed();
}
/// <summary>
/// 复制合同
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult SetEducationContractCopy()
{
var userInfo = base.UserInfo;
int ContractId = base.ParmJObj.GetInt("ContractId", 0);//合同id
if (ContractId <= 0)
{
return ApiResult.ParamIsNull("请传递合同id");
}
var model= educationContractModule.GetEducationContractModule(ContractId);
model.Id = 0;
model.Group_Id = userInfo.Group_Id;
model.CreateBy = userInfo.Id;
model.CreateTime = DateTime.Now;
model.UpdateBy = userInfo.Id;
model.UpdateTime = DateTime.Now;
model.Status = 0;
bool flag = educationContractModule.SetEducationContractModule(model);
return flag ? ApiResult.Success() : ApiResult.Failed();
}
/// <summary>
/// 合同签字
/// </summary>
......
......@@ -38,9 +38,19 @@ namespace Edu.WebApi.Controllers.Course
{
var userInfo = base.UserInfo;
var pageModel = JsonHelper.DeserializeObject<ResultPageModel>(RequestParm.Msg.ToString());
var dmodel = JsonHelper.DeserializeObject<RB_Class_ViewModel>(RequestParm.Msg.ToString());
var dmodel = new RB_Class_ViewModel()
{
School_Id = base.ParmJObj.GetInt("School_Id"),
ClassName = base.ParmJObj.GetStringValue("ClassName"),
StartTime = base.ParmJObj.GetStringValue("StartTime"),
EndTime = base.ParmJObj.GetStringValue("EndTime"),
Teacher_Id = base.ParmJObj.GetInt("Teacher_Id"),
CouseId = base.ParmJObj.GetInt("CouseId"),
Q_CanApply = base.ParmJObj.GetInt("Q_CanApply"),
JoinStartTime = base.ParmJObj.GetStringValue("JoinStartTime"),
JoinEndTime = base.ParmJObj.GetStringValue("JoinEndTime")
};
dmodel.Group_Id = userInfo.Group_Id;
var list = orderModule.GetClassPruductList(pageModel.PageIndex, pageModel.PageSize, out long count, dmodel);
pageModel.Count = Convert.ToInt32(count);
pageModel.PageData = list.Select(x => new
......@@ -109,6 +119,27 @@ namespace Edu.WebApi.Controllers.Course
}));
}
/// <summary>
/// 获取留学就业产品名称
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult GetStudyNameList()
{
string Ids = base.ParmJObj.GetStringValue("Ids");
if (string.IsNullOrEmpty(Ids))
{
return ApiResult.ParamIsNull("请传留学就业产品编号");
}
var list = orderModule.GetStudyAbroadListModule(Ids);
return ApiResult.Success("", list.Select(x => new
{
ClassId = x.Id,
ClassName = x.Name,
x.School_Id
}));
}
#endregion
#region 订单管理
......@@ -148,6 +179,7 @@ namespace Edu.WebApi.Controllers.Course
x.Refund,
x.DiscountMoney,
x.PlatformTax,
x.OrderType,
DueInMoney = x.PreferPrice - (x.Income - x.Refund + x.PlatformTax + x.DiscountMoney),
x.OrderState,
OrderStateName = x.OrderState.ToName(),
......@@ -225,6 +257,8 @@ namespace Edu.WebApi.Controllers.Course
x.Income,
x.Refund,
x.DiscountMoney,
x.OrderType,
x.PlatformTax,
DueInMoney = x.PreferPrice - (x.Income - x.Refund + x.DiscountMoney),
x.OrderState,
OrderStateName = x.OrderState.ToName(),
......@@ -827,6 +861,8 @@ namespace Edu.WebApi.Controllers.Course
x.Sex,
SexStr= x.Sex==1?"男":"女",
x.Age,
BirthDate= Common.ConvertHelper.FormatDate(x.BirthDate),
x.TotalHours,
x.Mobile,
x.Basics,
x.Education,
......@@ -883,6 +919,8 @@ namespace Edu.WebApi.Controllers.Course
VolunteerMajor=base.ParmJObj.GetStringValue("VolunteerMajor"),
Price=base.ParmJObj.GetDecimal("Price"),
StudyRemark=base.ParmJObj.GetStringValue("StudyRemark"),
BirthDate=base.ParmJObj.GetDateTime("BirthDate"),
TotalHours=base.ParmJObj.GetInt("TotalHours")
};
if (dmodel.OrderId <= 0)
{
......@@ -1325,7 +1363,7 @@ namespace Edu.WebApi.Controllers.Course
z.Id,
z.GuestName,
z.GuestState
})
}),
})
};
return ApiResult.Success("", pageModel);
......
......@@ -1029,6 +1029,7 @@ namespace Edu.WebApi.Controllers.Finance
x.TotalSub,
x.TotalDiscountMoney,
x.TotalMoney,
x.Status,
IncomeList = x.FinanceList.Where(x => x.Type == WFTempLateClassEnum.IN).Select(z => new
{
z.FrID,
......@@ -1107,7 +1108,7 @@ namespace Edu.WebApi.Controllers.Finance
ExcelDataSource headerTop = new ExcelDataSource()
{
ExcelRows = new List<ExcelColumn>(30) {
new ExcelColumn(value:"合同信息"){CellWidth=20,HAlignmentEnum= HAlignmentEnum.CENTER,VAlignmentEnum= VAlignmentEnum.CENTER,Colspan=14 },
new ExcelColumn(value:"合同信息"){CellWidth=20,HAlignmentEnum= HAlignmentEnum.CENTER,VAlignmentEnum= VAlignmentEnum.CENTER,Colspan=15 },
new ExcelColumn(value:"收款信息"){CellWidth=15,HAlignmentEnum= HAlignmentEnum.CENTER,VAlignmentEnum= VAlignmentEnum.CENTER,Colspan = 6 },
new ExcelColumn(value:"合同有效金额"){CellWidth=20,HAlignmentEnum= HAlignmentEnum.CENTER,VAlignmentEnum= VAlignmentEnum.CENTER, Colspan = 2 },
new ExcelColumn(value:"消费情况"){CellWidth=15,HAlignmentEnum= HAlignmentEnum.CENTER,VAlignmentEnum= VAlignmentEnum.CENTER , Colspan = 7},
......@@ -1121,6 +1122,7 @@ namespace Edu.WebApi.Controllers.Finance
new ExcelColumn(value:"订单号"){CellWidth=20,HAlignmentEnum= HAlignmentEnum.CENTER,VAlignmentEnum= VAlignmentEnum.CENTER },
new ExcelColumn(value:"签订时间"){CellWidth=15,HAlignmentEnum= HAlignmentEnum.CENTER,VAlignmentEnum= VAlignmentEnum.CENTER },
new ExcelColumn(value:"合同号"){CellWidth=20,HAlignmentEnum= HAlignmentEnum.CENTER,VAlignmentEnum= VAlignmentEnum.CENTER },
new ExcelColumn(value:"合同状态"){CellWidth=15,HAlignmentEnum= HAlignmentEnum.CENTER,VAlignmentEnum= VAlignmentEnum.CENTER },
new ExcelColumn(value:"产品名称"){CellWidth=15,HAlignmentEnum= HAlignmentEnum.CENTER,VAlignmentEnum= VAlignmentEnum.CENTER },
new ExcelColumn(value:"班级"){CellWidth=15,HAlignmentEnum= HAlignmentEnum.CENTER,VAlignmentEnum= VAlignmentEnum.CENTER },
new ExcelColumn(value:"学员名字"){CellWidth=15,HAlignmentEnum= HAlignmentEnum.CENTER,VAlignmentEnum= VAlignmentEnum.CENTER },
......@@ -1165,6 +1167,23 @@ namespace Edu.WebApi.Controllers.Finance
{
foreach (var item in list)
{
string StatusName = "";//0-草稿,1-提交审核,2-审核通过,3-驳回,4-取消
if (item.Status == 0)
{
StatusName = "草稿";
}
else if (item.Status == 1)
{
StatusName = "审核中";
}
else if (item.Status == 2)
{
StatusName = "审核通过";
}
else if (item.Status == 3)
{
StatusName = "驳回";
}
var FinanceList = item.FinanceList.Where(x => x.Type == WFTempLateClassEnum.IN).ToList();
if (FinanceList.Any())
{
......@@ -1183,6 +1202,7 @@ namespace Edu.WebApi.Controllers.Finance
new ExcelColumn(value: item.OrderId.ToString()){ Rowspan = Count },
new ExcelColumn(value: item.CreateTime.ToString("yyyy-MM-dd")){ Rowspan = Count },
new ExcelColumn(value: item.ContractNo){ Rowspan = Count },
new ExcelColumn(value: StatusName){ Rowspan = Count },
new ExcelColumn(value: item.CourseName){ Rowspan = Count },
new ExcelColumn(value: item.ClassName){ Rowspan = Count },
new ExcelColumn(value: item.StudentName){ Rowspan = Count },
......@@ -1221,6 +1241,7 @@ namespace Edu.WebApi.Controllers.Finance
{
ExcelRows = new List<ExcelColumn>()
{
new ExcelColumn(value: ""){ },
new ExcelColumn(value: ""){ },
new ExcelColumn(value: ""){ },
new ExcelColumn(value: ""){ },
......@@ -1268,6 +1289,7 @@ namespace Edu.WebApi.Controllers.Finance
new ExcelColumn(value: item.OrderId.ToString()){ },
new ExcelColumn(value: item.CreateTime.ToString("yyyy-MM-dd")){ },
new ExcelColumn(value: item.ContractNo){ },
new ExcelColumn(value: StatusName){ },
new ExcelColumn(value: item.CourseName){ },
new ExcelColumn(value: item.ClassName){ },
new ExcelColumn(value: item.StudentName){ },
......
......@@ -400,7 +400,7 @@ namespace Edu.WebApi.Controllers.User
extModel.UpdateBy = base.UserInfo.Id;
extModel.UpdateTime = DateTime.Now;
extModel.Group_Id = base.UserInfo.Group_Id;
bool flag = teacherModule.SetTeacherModule(extModel, isUpdateBasic: true);
bool flag = teacherModule.SetTeacherModule_V2(extModel, isUpdateBasic: true);
return flag ? ApiResult.Success() : ApiResult.Failed();
}
......@@ -548,7 +548,7 @@ namespace Edu.WebApi.Controllers.User
extModel.UpdateTime = DateTime.Now;
extModel.Group_Id = base.UserInfo.Group_Id;
bool flag = assistModule.SetAssistModule(extModel, isUpdateBasic: true);
bool flag = assistModule.SetAssistModule_V2(extModel);
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