Commit a27c1b6f authored by 黄奎's avatar 黄奎

页面修改

parent 55becc4e
......@@ -22,69 +22,34 @@ namespace Edu.Model.Entity.Customer
/// </summary>
public int StuId { get; set; }
/// <summary>
/// 期望达成日期
/// </summary>
public string ExpectDate { get; set; }
/// <summary>
/// 胜率
/// </summary>
public decimal? WinRate { get; set; }
/// <summary>
/// 跟进状态
/// </summary>
public int? AdvisorStatus { get; set; }
/// <summary>
/// 疑似日期
/// </summary>
public string SuspectedDate { get; set; }
/// <summary>
/// 疑似备注
/// </summary>
public string SuspectedRemark { get; set; }
/// <summary>
/// 潜在日期
/// </summary>
public string PotentialDate { get; set; }
/// <summary>
/// 潜在备注
/// </summary>
public string PotentialRemark { get; set; }
/// <summary>
/// 接近日期
/// </summary>
public string NearDate { get; set; }
public int AdvisorStatus { get; set; }
/// <summary>
/// 接近备注
/// 跟进日期
/// </summary>
public string NearRemark { get; set; }
public string AdvisorDate { get; set; }
/// <summary>
/// 谈判时间
/// 跟进备注
/// </summary>
public string NegotiationDate { get; set; }
public string AdvisorRemark { get; set; }
/// <summary>
/// 谈判备注
/// 创建人
/// </summary>
public string NegotiationRemark { get; set; }
public int CreateBy { get; set; }
/// <summary>
/// 达成协议时间
/// 创建时间
/// </summary>
public string ReachDate { get; set; }
public DateTime CreateTime { get; set; }
/// <summary>
/// 达成协议备注
/// 集团编号
/// </summary>
public string ReachRemark { get; set; }
public int Group_Id { get; set; }
}
}
......@@ -251,5 +251,20 @@ namespace Edu.Model.Entity.User
/// 首次报名时间
/// </summary>
public DateTime? FirstEnrollDate { get; set; }
/// <summary>
/// 课程顾问跟进状态
/// </summary>
public int AdvisorStatus { get; set; }
/// <summary>
/// 课程顾问胜率
/// </summary>
public decimal AdvisorWinRate { get; set; }
/// <summary>
/// 课程顾问期望达成协议日期
/// </summary>
public string AdvisorExpectDate { get; set; }
}
}
......@@ -14,5 +14,20 @@ namespace Edu.Model.ViewModel.Customer
/// 学员编号
/// </summary>
public string QStuIds { get; set; }
/// <summary>
/// 跟进状态名称
/// </summary>
public string AdvisorStatusName { get; set; }
/// <summary>
/// 跟进状态完成百分比
/// </summary>
public decimal AdvisorRate { get; set; }
/// <summary>
/// 课程顾问期望达成协议日期
/// </summary>
public string AdvisorExpectDate { get; set; }
}
}
......@@ -169,6 +169,7 @@ namespace Edu.Module.Customer
var assistModel = assistList.Where(x => x.AssistId == model.CreateBy).FirstOrDefault();
var AssistType = assistModel?.AssistType ?? 0;
#endregion
student_FollowRepository.Insert(new Model.Entity.Customer.RB_Student_Follow()
{
StuId = model.StuId,
......@@ -177,7 +178,7 @@ namespace Edu.Module.Customer
CreateTime = model.CreateTime,
Group_Id = model.Group_Id,
Id = 0,
Remark = $"客人约访:约访时间【{model.AppointmentTime.ToString("yyyy-MM-dd HH:mm")}】,约访地点【{model.AppointmentPoint}】,备注【{model.Remark}】",
Remark = $"客人约访:约访时间【{ Common.ConvertHelper.FormatTimeStr2(model.AppointmentTime)}】,约访地点【{model.AppointmentPoint}】,备注【{model.Remark}】",
Status = DateStateEnum.Normal,
UpdateBy = model.UpdateBy,
UpdateTime = model.UpdateTime
......
This diff is collapsed.
......@@ -34,6 +34,10 @@ WHERE 1=1
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Student_AdvisorConfig_Extend.Status), (int)DateStateEnum.Normal);
if (query != null)
{
if (query.Group_Id > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Student_AdvisorConfig_Extend.Group_Id), query.Group_Id);
}
if (!string.IsNullOrEmpty(query.Name))
{
builder.AppendFormat(" AND A.{0} LIKE @Name ", nameof(RB_Student_AdvisorConfig_Extend.Name));
......@@ -61,6 +65,10 @@ WHERE 1=1
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Student_AdvisorConfig_Extend.Status), (int)DateStateEnum.Normal);
if (query != null)
{
if (query.Group_Id > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Student_AdvisorConfig_Extend.Group_Id), query.Group_Id);
}
if (!string.IsNullOrEmpty(query.Name))
{
builder.AppendFormat(" AND A.{0} LIKE @Name ", nameof(RB_Student_AdvisorConfig_Extend.Name));
......
......@@ -24,8 +24,8 @@ namespace Edu.Repository.Customer
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT A.*
FROM RB_Student_Advisor AS A
SELECT A.*,B.Name AS AdvisorStatusName,B.Rate AS AdvisorRate
FROM RB_Student_Advisor AS A LEFT JOIN rb_student_advisorconfig AS B ON A.AdvisorStatus=B.Id
WHERE 1=1
");
if (query != null)
......@@ -52,8 +52,8 @@ WHERE 1=1
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT A.*
FROM RB_Student_Advisor AS A
SELECT A.*,B.Name AS AdvisorStatusName,B.Rate AS AdvisorRate
FROM RB_Student_Advisor AS A LEFT JOIN rb_student_advisorconfig AS B ON A.AdvisorStatus=B.Id
WHERE 1=1
");
if (query != null)
......
......@@ -1493,19 +1493,21 @@ namespace Edu.WebApi.Controllers.User
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult SetStudentConsultResults() {
public ApiResult SetStudentConsultResults()
{
var userInfo = base.UserInfo;
RB_Student_ViewModel demodel = JsonHelper.DeserializeObject<RB_Student_ViewModel>(base.RequestParm.Msg.ToString());
if (demodel.StuId <= 0) {
if (demodel.StuId <= 0)
{
return ApiResult.ParamIsNull("请传递学员ID");
}
string msg = studentModule.SetStudentConsultResults(demodel, userInfo);
if (msg == "")
{
return ApiResult.Success();
}
else {
else
{
return ApiResult.Failed(msg);
}
}
......@@ -2277,10 +2279,6 @@ namespace Edu.WebApi.Controllers.User
var flag = departmentModule.RemoveDepartmentModule(DeptId, Status, token);
return flag ? ApiResult.Success() : ApiResult.Failed();
}
#endregion
#region 岗位管理
......@@ -2552,6 +2550,195 @@ namespace Edu.WebApi.Controllers.User
var flag = managerModule.SetEmployeeTypeModule(targetAccountType, AccountId, AccountType, Remark, base.UserInfo);
return flag ? ApiResult.Success() : ApiResult.Failed();
}
#endregion
#region 课程顾问跟进学员信息
/// <summary>
/// 获取课程顾问跟进配置分页列表
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult GetStudentAdvisorConfigPage()
{
var pageModel = JsonHelper.DeserializeObject<ResultPageModel>(RequestParm.Msg.ToString());
var query = new RB_Student_AdvisorConfig_Extend()
{
Group_Id = base.UserInfo.Group_Id,
Name = base.ParmJObj.GetStringValue("Name")
};
var list=studentModule.GetStudentAdvisorConfigPageModule(pageModel.PageIndex, pageModel.PageSize, out long rowsCount, query);
List<object> result = new List<object>();
foreach (var item in list)
{
string Name = UserReidsCache.GetUserLoginInfo(item.CreateBy)?.AccountName ?? "";
result.Add(new
{
item.Id,
item.Name,
item.Num,
item.Rate,
CreateTimeStr = Common.ConvertHelper.FormatTime(item.CreateTime),
CreateByName = Name
});
}
pageModel.Count = rowsCount;
pageModel.PageData = result;
return ApiResult.Success(data: pageModel);
}
/// <summary>
/// 获取课程顾问跟进配置列表
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult GetStudentAdvisorConfigList()
{
var query = new RB_Student_AdvisorConfig_Extend()
{
Group_Id = base.UserInfo.Group_Id,
Name = base.ParmJObj.GetStringValue("Name")
};
var list = studentModule.GetStudentAdvisorConfigListModule(query);
return ApiResult.Success(data: list);
}
/// <summary>
/// 新增修改课程顾问配置
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult SetStudentAdvisorConfig()
{
var model = new RB_Student_AdvisorConfig_Extend()
{
Id = base.ParmJObj.GetInt("Id"),
Name = base.ParmJObj.GetStringValue("Name"),
Num = base.ParmJObj.GetInt("Num"),
Rate = base.ParmJObj.GetDecimal("Rate"),
};
model.CreateBy = base.UserInfo.Id;
model.UpdateBy = base.UserInfo.Id;
model.CreateTime = DateTime.Now;
model.UpdateTime = DateTime.Now;
model.Group_Id = base.UserInfo.Group_Id;
model.Status = DateStateEnum.Normal;
bool flag = studentModule.SetStudentAdvisorConfigModule(model);
return flag ? ApiResult.Success() : ApiResult.Failed();
}
/// <summary>
/// 根据编号获取课程顾问配置信息
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult GetStudentAdvisorConfig()
{
var Id = base.ParmJObj.GetInt("Id");
var extModel = studentModule.GetStudentAdvisorConfigModule(Id);
return ApiResult.Success(data: extModel);
}
/// <summary>
/// 根据编号删除课程顾问配置信息
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult RemoveStudentAdvisorConfig()
{
var Id = base.ParmJObj.GetInt("Id");
bool flag = studentModule.RemoveStudentAdvisorConfigModule(Id);
return flag ? ApiResult.Success() : ApiResult.Failed();
}
/// <summary>
/// 获取课程顾问跟进分页列表
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult GetStudentAdvisorPage()
{
var pageModel = JsonHelper.DeserializeObject<ResultPageModel>(RequestParm.Msg.ToString());
var query = new RB_Student_Advisor_Extend()
{
StuId = base.ParmJObj.GetInt("StuId"),
};
List<object> result = new List<object>();
var list = studentModule.GetStudentAdvisorPageModule(pageModel.PageIndex, pageModel.PageSize, out long rowsCount, query);
foreach (var item in list)
{
string Name = UserReidsCache.GetUserLoginInfo(item.CreateBy)?.AccountName ?? "";
result.Add(new
{
item.Id,
item.StuId,
item.AdvisorStatusName,
item.AdvisorDate,
item.AdvisorRemark,
item.AdvisorStatus,
item.AdvisorRate,
CreateTimeStr = Common.ConvertHelper.FormatTime(item.CreateTime),
CreateByName = Name
});
}
pageModel.Count = rowsCount;
pageModel.PageData = result;
return ApiResult.Success(data: pageModel);
}
/// <summary>
/// 获取课程顾问跟进列表
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult GetStudentAdvisorList()
{
var query = new RB_Student_Advisor_Extend()
{
StuId = base.ParmJObj.GetInt("StuId"),
};
var list = studentModule.GetStudentAdvisorListModule(query);
return ApiResult.Success(data: list);
}
/// <summary>
/// 新增修改课程顾问跟进记录
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult SetStudentAdvisor()
{
var model = new RB_Student_Advisor_Extend()
{
Id = base.ParmJObj.GetInt("Id"),
StuId = base.ParmJObj.GetInt("StuId"),
AdvisorStatus = base.ParmJObj.GetInt("AdvisorStatus"),
AdvisorDate = base.ParmJObj.GetStringValue("AdvisorDate"),
AdvisorRemark = base.ParmJObj.GetStringValue("AdvisorRemark"),
AdvisorExpectDate=base.ParmJObj.GetStringValue("AdvisorExpectDate"),
AdvisorRate=base.ParmJObj.GetDecimal("AdvisorRate"),
};
model.CreateBy = base.UserInfo.Id;
model.CreateTime = DateTime.Now;
model.Group_Id = base.UserInfo.Group_Id;
bool flag = studentModule.SetStudentAdvisorModule(model);
return flag ? ApiResult.Success() : ApiResult.Failed();
}
/// <summary>
/// 根据编号获取课程顾问跟进记录
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult GetStudentAdvisor()
{
var Id = base.ParmJObj.GetInt("Id");
var extModel = studentModule.GetStudentAdvisorModule(Id);
return ApiResult.Success(data: extModel);
}
#endregion
}
}
\ No newline at end of file
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