Commit c5c1d9ef authored by 黄奎's avatar 黄奎

新增实体类

parent cc1cede1
using System;
using System.Collections.Generic;
using System.Text;
using VT.FW.DB;
namespace Edu.Model.Entity.User
{
/// <summary>
/// 客户数据统计实体类
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_Student_Static
{
/// <summary>
/// 主键
/// </summary>
public int Id { get; set; }
/// <summary>
/// 日期
/// </summary>
public DateTime Date { get; set; }
/// <summary>
/// 推送人数
/// </summary>
public decimal PushCount { get; set; }
/// <summary>
/// 新客户
/// </summary>
public decimal NewCount { get; set; }
/// <summary>
/// 初步沟通/二次沟通
/// </summary>
public decimal CommunicationCount { get; set; }
/// <summary>
/// 预约试听(已到店,已试听)
/// </summary>
public decimal TrialLessonCount { get; set; }
/// <summary>
/// 待联系
/// </summary>
public decimal NotContacted { get; set; }
/// <summary>
/// 日本语培订单
/// </summary>
public decimal JPOrder { get; set; }
/// <summary>
/// 韩国语培订单
/// </summary>
public decimal KROrder { get; set; }
/// <summary>
/// 法国语培订单
/// </summary>
public decimal FROrder { get; set; }
/// <summary>
/// 日本留学
/// </summary>
public decimal JPStudyOrder { get; set; }
/// <summary>
/// 韩国留学
/// </summary>
public decimal KRStudyOrder { get; set; }
/// <summary>
/// 英港澳留学
/// </summary>
public decimal YGAStudyOrder { get; set; }
/// <summary>
/// 美国留学
/// </summary>
public decimal USStudyOrder { get; set; }
/// <summary>
/// 新加坡留学
/// </summary>
public decimal SGStudyOrder { get; set; }
/// <summary>
/// 澳新留学
/// </summary>
public decimal AXStudyOrder { get; set; }
/// <summary>
/// 其他留学
/// </summary>
public decimal OtherStudyOrder { get; set; }
/// <summary>
/// A类客户
/// </summary>
public decimal ClassACount { get; set; }
/// <summary>
/// B类客户
/// </summary>
public decimal ClassBCount { get; set; }
/// <summary>
/// C类客户
/// </summary>
public decimal ClassCCount { get; set; }
/// <summary>
/// D类客户
/// </summary>
public decimal ClassDCount { get; set; }
/// <summary>
/// 同行介绍
/// </summary>
public decimal CustomerCount { get; set; }
/// <summary>
/// 直客
/// </summary>
public decimal B2CCount { get; set; }
/// <summary>
/// 学员转介绍
/// </summary>
public decimal TransCount { get; set; }
/// <summary>
/// 内部介绍
/// </summary>
public decimal InnerCount { get; set; }
/// <summary>
/// 无效
/// </summary>
public decimal InvalidCount { get; set; }
/// <summary>
/// 疑似
/// </summary>
public decimal SuspectedCount { get; set; }
/// <summary>
/// 意向
/// </summary>
public decimal IntentionCount { get; set; }
/// <summary>
/// 近期课邀约
/// </summary>
public decimal InvitationCount { get; set; }
/// <summary>
/// 谈判
/// </summary>
public decimal NegotiationCount { get; set; }
/// <summary>
/// 签约(成交、续费)
/// </summary>
public decimal ContractCount { get; set; }
/// <summary>
/// 语培签约金额
/// </summary>
public decimal OrderMoney { get; set; }
/// <summary>
/// 留学签约金额
/// </summary>
public decimal StudyOrderMoney { get; set; }
/// <summary>
/// 年
/// </summary>
public int YearStr { get; set; }
/// <summary>
/// 月
/// </summary>
public int MonthStr { get; set; }
/// <summary>
/// 次
/// </summary>
public int Times { get; set; }
/// <summary>
/// 集团编号
/// </summary>
public int Group_Id { get; set; }
/// <summary>
/// 学校编号
/// </summary>
public int School_Id { get; set; }
/// <summary>
/// 创建人
/// </summary>
public int CreateBy { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime CreateTime { get; set; }
}
}
using Edu.Model.Entity.User;
using System;
using System.Collections.Generic;
using System.Text;
namespace Edu.Model.ViewModel.User
{
/// <summary>
/// 客户数据统计扩展实体类
/// </summary>
public class RB_Student_Static_Extend : RB_Student_Static
{
}
}
......@@ -67,6 +67,11 @@ namespace Edu.Module.User
/// </summary>
private readonly RB_Student_AdvisorRepository student_AdvisorRepository = new RB_Student_AdvisorRepository();
/// <summary>
/// 客户信息统计仓储层对象
/// </summary>
private readonly RB_Student_StaticRepository student_StaticRepository = new RB_Student_StaticRepository();
#region 学员跟进
......@@ -372,5 +377,20 @@ namespace Edu.Module.User
}
#endregion
#region 客户信息统计
/// <summary>
/// 客户数据统计
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Student_Static_Extend> GetStudentStaticListModule(RB_Student_Static_Extend query)
{
var list = student_StaticRepository.GetStudentStaticListRepository(query);
return list;
}
#endregion
}
}
using Edu.Model.Entity.User;
using Edu.Model.ViewModel.User;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Edu.Repository.User
{
/// <summary>
/// 客户数据统计仓储层
///
/// </summary>
public class RB_Student_StaticRepository : BaseRepository<RB_Student_Static>
{
/// <summary>
/// 客户数据统计
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Student_Static_Extend> GetStudentStaticListRepository(RB_Student_Static_Extend query)
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT A.*
FROM RB_Student_Static AS A
WHERE 1=1
");
if (query != null)
{
if (query.Group_Id > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Student_Static_Extend.Group_Id), query.Group_Id);
}
if (query.YearStr > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Student_Static_Extend.YearStr), query.YearStr);
}
if (query.MonthStr > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Student_Static_Extend.MonthStr), query.MonthStr);
}
}
return Get<RB_Student_Static_Extend>(builder.ToString()).ToList();
}
}
}
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