Commit 1fce6a38 authored by liudong1993's avatar liudong1993

Merge branch 'master' of http://gitlab.oytour.com/Kui2/education

parents 7bae9f30 62d718da
...@@ -101,7 +101,6 @@ namespace Edu.Module.Customer ...@@ -101,7 +101,6 @@ namespace Edu.Module.Customer
{nameof(RB_Student_Appointment_Extend.AppointmentPoint),model.AppointmentPoint }, {nameof(RB_Student_Appointment_Extend.AppointmentPoint),model.AppointmentPoint },
{nameof(RB_Student_Appointment_Extend.AppointmentTime),model.AppointmentTime }, {nameof(RB_Student_Appointment_Extend.AppointmentTime),model.AppointmentTime },
{nameof(RB_Student_Appointment_Extend.Remark),model.Remark }, {nameof(RB_Student_Appointment_Extend.Remark),model.Remark },
{nameof(RB_Student_Appointment_Extend.Feedback),model.Feedback },
}; };
flag = student_AppointmentRepository.Update(fileds, new WhereHelper(nameof(RB_Student_Appointment_Extend.Id), model.Id)); flag = student_AppointmentRepository.Update(fileds, new WhereHelper(nameof(RB_Student_Appointment_Extend.Id), model.Id));
logTitle = "修改学员约访"; logTitle = "修改学员约访";
...@@ -114,11 +113,35 @@ namespace Edu.Module.Customer ...@@ -114,11 +113,35 @@ namespace Edu.Module.Customer
logTitle = "新增学员约访"; logTitle = "新增学员约访";
logContent = model.Remark; logContent = model.Remark;
} }
student_LogRepository.AddStuLogRepository(model.StuId, Common.Enum.Log.StudentLogTypeEnum.Appointment, logTitle, logContent, model.CreateBy); student_LogRepository.AddStuLogRepository(model.StuId, Common.Enum.Log.StudentLogTypeEnum.Appointment, logTitle, logContent, model.CreateBy);
return flag; return flag;
} }
/// <summary>
/// 新增修改约访反馈
/// </summary>
/// <param name="Feedback"></param>
/// <param name="Id"></param>
/// <param name="OperateId"></param>
/// <returns></returns>
public bool SetStudentAppointmentFeedBackModule(string Feedback, int Id, int OperateId)
{
Dictionary<string, object> fileds = new Dictionary<string, object>()
{
{nameof(RB_Student_Appointment_Extend.Feedback),Feedback },
};
var oldModel = GetStudentAppointmentModule(Id);
string logTitle = "修改约访";
string logContent = "";
if (oldModel.Feedback != Feedback)
{
logContent += string.Format("反馈信息:由【{0}】=>【{1}】", oldModel.Feedback, Feedback);
}
bool flag = student_VisitRepository.Update(fileds, new WhereHelper(nameof(RB_Student_Appointment_Extend.Id), Id));
student_LogRepository.AddStuLogRepository(oldModel.StuId, Common.Enum.Log.StudentLogTypeEnum.Appointment, logTitle, logContent, OperateId);
return flag;
}
/// <summary> /// <summary>
/// 根据编号获取学员约访信息 /// 根据编号获取学员约访信息
/// </summary> /// </summary>
...@@ -317,7 +340,6 @@ namespace Edu.Module.Customer ...@@ -317,7 +340,6 @@ namespace Edu.Module.Customer
{nameof(RB_Student_Visit_Extend.VisitTime),model.VisitTime }, {nameof(RB_Student_Visit_Extend.VisitTime),model.VisitTime },
{nameof(RB_Student_Visit_Extend.ReceptionPersion),model.ReceptionPersion }, {nameof(RB_Student_Visit_Extend.ReceptionPersion),model.ReceptionPersion },
{nameof(RB_Student_Visit_Extend.Remark),model.Remark }, {nameof(RB_Student_Visit_Extend.Remark),model.Remark },
{nameof(RB_Student_Visit_Extend.Feedback),model.Feedback },
}; };
flag = student_VisitRepository.Update(fileds, new WhereHelper(nameof(RB_Student_Visit_Extend.Id), model.Id)); flag = student_VisitRepository.Update(fileds, new WhereHelper(nameof(RB_Student_Visit_Extend.Id), model.Id));
} }
...@@ -333,6 +355,31 @@ namespace Edu.Module.Customer ...@@ -333,6 +355,31 @@ namespace Edu.Module.Customer
return flag; return flag;
} }
/// <summary>
/// 新增修改反馈
/// </summary>
/// <param name="Feedback"></param>
/// <param name="Id"></param>
/// <param name="OperateId"></param>
/// <returns></returns>
public bool SetStudentVisitFeedbackModule(string Feedback, int Id, int OperateId)
{
Dictionary<string, object> fileds = new Dictionary<string, object>()
{
{nameof(RB_Student_Visit_Extend.Feedback),Feedback },
};
var oldModel = GetStudentVisitModule(Id);
string logTitle = "修改到访";
string logContent = "";
if (oldModel.Feedback != Feedback)
{
logContent += string.Format("反馈信息:由【{0}】=>【{1}】", oldModel.Feedback, Feedback);
}
bool flag = student_VisitRepository.Update(fileds, new WhereHelper(nameof(RB_Student_Visit_Extend.Id), Id));
student_LogRepository.AddStuLogRepository(oldModel.StuId, Common.Enum.Log.StudentLogTypeEnum.Visit, logTitle, logContent, OperateId);
return flag;
}
/// <summary> /// <summary>
/// 根据编号获取学员到访信息 /// 根据编号获取学员到访信息
/// </summary> /// </summary>
......
...@@ -34,7 +34,7 @@ WHERE 1=1 ...@@ -34,7 +34,7 @@ WHERE 1=1
{ {
if (query.StuId > 0) if (query.StuId > 0)
{ {
//builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Student_Log_Extend.StuId), query.StuId); builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Student_Log_Extend.StuId), query.StuId);
} }
} }
builder.AppendFormat(" ORDER BY A.{0} DESC ", nameof(RB_Student_Log_Extend.LogId)); builder.AppendFormat(" ORDER BY A.{0} DESC ", nameof(RB_Student_Log_Extend.LogId));
......
...@@ -47,7 +47,10 @@ namespace Edu.WebApi.Controllers.Customer ...@@ -47,7 +47,10 @@ namespace Edu.WebApi.Controllers.Customer
{ {
item.Id, item.Id,
item.StuId, item.StuId,
item.AppointmentPoint,
AppointmentTime=Common.ConvertHelper.FormatTime(item.AppointmentTime),
item.Remark, item.Remark,
item.Feedback,
CreateTime = Common.ConvertHelper.FormatTimeStr2(item.CreateTime), CreateTime = Common.ConvertHelper.FormatTimeStr2(item.CreateTime),
CreateByName, CreateByName,
}); });
...@@ -72,7 +75,6 @@ namespace Edu.WebApi.Controllers.Customer ...@@ -72,7 +75,6 @@ namespace Edu.WebApi.Controllers.Customer
AppointmentPoint = base.ParmJObj.GetStringValue("AppointmentPoint"), AppointmentPoint = base.ParmJObj.GetStringValue("AppointmentPoint"),
AppointmentTime = base.ParmJObj.GetDateTime("AppointmentTime"), AppointmentTime = base.ParmJObj.GetDateTime("AppointmentTime"),
Remark = base.ParmJObj.GetStringValue("Remark"), Remark = base.ParmJObj.GetStringValue("Remark"),
Feedback = base.ParmJObj.GetStringValue("Feedback")
}; };
extModel.CreateBy = base.UserInfo.Id; extModel.CreateBy = base.UserInfo.Id;
extModel.CreateTime = DateTime.Now; extModel.CreateTime = DateTime.Now;
...@@ -83,6 +85,19 @@ namespace Edu.WebApi.Controllers.Customer ...@@ -83,6 +85,19 @@ namespace Edu.WebApi.Controllers.Customer
return flag ? ApiResult.Success() : ApiResult.Failed(); return flag ? ApiResult.Success() : ApiResult.Failed();
} }
/// <summary>
/// 新增修改约访反馈
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult SetStudentAppointmentFeedBack()
{
var Id = base.ParmJObj.GetInt("Id");
string Feedback = base.ParmJObj.GetStringValue("Feedback");
bool flag = customerStudentModule.SetStudentAppointmentFeedBackModule(Feedback, Id, base.UserInfo.Id);
return flag ? ApiResult.Success() : ApiResult.Failed();
}
/// <summary> /// <summary>
/// 根据编号获取约访 /// 根据编号获取约访
/// </summary> /// </summary>
...@@ -234,7 +249,6 @@ namespace Edu.WebApi.Controllers.Customer ...@@ -234,7 +249,6 @@ namespace Edu.WebApi.Controllers.Customer
VisitTime=base.ParmJObj.GetStringValue("VisitTime"), VisitTime=base.ParmJObj.GetStringValue("VisitTime"),
ReceptionPersion=base.ParmJObj.GetInt("ReceptionPersion"), ReceptionPersion=base.ParmJObj.GetInt("ReceptionPersion"),
Remark = base.ParmJObj.GetStringValue("Remark"), Remark = base.ParmJObj.GetStringValue("Remark"),
Feedback=base.ParmJObj.GetStringValue("Feedback"),
}; };
extModel.Status = Common.Enum.DateStateEnum.Normal; extModel.Status = Common.Enum.DateStateEnum.Normal;
extModel.CreateBy = base.UserInfo.Id; extModel.CreateBy = base.UserInfo.Id;
...@@ -246,6 +260,19 @@ namespace Edu.WebApi.Controllers.Customer ...@@ -246,6 +260,19 @@ namespace Edu.WebApi.Controllers.Customer
return flag ? ApiResult.Success() : ApiResult.Failed(); return flag ? ApiResult.Success() : ApiResult.Failed();
} }
/// <summary>
/// 新增修改到访反馈
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult SetStudentVisitFeedback()
{
var Id = base.ParmJObj.GetInt("Id");
string Feedback = base.ParmJObj.GetStringValue("Feedback");
bool flag = customerStudentModule.SetStudentVisitFeedbackModule(Feedback, Id, base.UserInfo.Id);
return flag ? ApiResult.Success() : ApiResult.Failed();
}
/// <summary> /// <summary>
/// 根据编号获取到访信息 /// 根据编号获取到访信息
/// </summary> /// </summary>
...@@ -322,7 +349,6 @@ namespace Edu.WebApi.Controllers.Customer ...@@ -322,7 +349,6 @@ namespace Edu.WebApi.Controllers.Customer
{ {
Student_Id = base.ParmJObj.GetInt("StuId"), Student_Id = base.ParmJObj.GetInt("StuId"),
}; };
//query.Group_Id = base.UserInfo.Group_Id;
var data = customerStudentModule.GetStuOrderGuestPageModule(pageModel.PageIndex, pageModel.PageSize, out long rowsCount, query); var data = customerStudentModule.GetStuOrderGuestPageModule(pageModel.PageIndex, pageModel.PageSize, out long rowsCount, query);
List<object> list = new List<object>(); List<object> list = new List<object>();
foreach (var item in data) foreach (var item in data)
...@@ -354,9 +380,8 @@ namespace Edu.WebApi.Controllers.Customer ...@@ -354,9 +380,8 @@ namespace Edu.WebApi.Controllers.Customer
var pageModel = Common.Plugin.JsonHelper.DeserializeObject<ResultPageModel>(RequestParm.Msg.ToString()); var pageModel = Common.Plugin.JsonHelper.DeserializeObject<ResultPageModel>(RequestParm.Msg.ToString());
var query = new RB_Student_OrderGuest_ViewModel() var query = new RB_Student_OrderGuest_ViewModel()
{ {
// Student_Id = base.ParmJObj.GetInt("StuId"), Student_Id = base.ParmJObj.GetInt("StuId"),
}; };
//query.Group_Id = base.UserInfo.Group_Id;
var data = customerStudentModule.GetStuOrderGuestContractPageModule(pageModel.PageIndex, pageModel.PageSize, out long rowsCount, query); var data = customerStudentModule.GetStuOrderGuestContractPageModule(pageModel.PageIndex, pageModel.PageSize, out long rowsCount, query);
List<object> list = new List<object>(); List<object> list = new List<object>();
foreach (var item in data) foreach (var item in data)
......
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