Commit e3f204b9 authored by 黄奎's avatar 黄奎

新增实体类

parent ed357cd2
using System;
using VT.FW.DB;
namespace Edu.Model.Entity.DataStatistics
{
/// <summary>
/// 课程顾问部数据统计实体类
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_Consultant_Data
{
/// <summary>
/// 主键编号
/// </summary>
public int Id { get; set; }
/// <summary>
/// 日期
/// </summary>
public DateTime Date { get; set; }
/// <summary>
/// 试听人数
/// </summary>
public int TrialLessonCount { get; set; }
/// <summary>
/// 昨日试听人数
/// </summary>
public int YestodayTrialLesson { get; set; }
/// <summary>
/// 本周试听人数
/// </summary>
public int CurWeekTrialLesson { get; set; }
/// <summary>
/// 上周试听人数
/// </summary>
public int LastWeekTrialLesson { get; set; }
/// <summary>
/// 本月试听人数
/// </summary>
public int CurMonthTrialLesson { get; set; }
/// <summary>
/// 上月试听人数
/// </summary>
public int LastMonthTrialLesson { get; set; }
/// <summary>
/// 到访人数
/// </summary>
public int VisitCount { get; set; }
/// <summary>
/// 昨日到访人数
/// </summary>
public int YestodayVisit { get; set; }
/// <summary>
/// 本周到访人数
/// </summary>
public int CurWeekVisit { get; set; }
/// <summary>
/// 上周到访人数
/// </summary>
public int LastWeekVisit { get; set; }
/// <summary>
/// 本月到访人数
/// </summary>
public int CurMonthVisit { get; set; }
/// <summary>
/// 上月到访人数
/// </summary>
public int LastMonthVisit { get; set; }
/// <summary>
/// 转化率
/// </summary>
public decimal Rates { get; set; }
/// <summary>
/// 昨日转化率
/// </summary>
public decimal YestodayRates { get; set; }
/// <summary>
/// 本周转化率
/// </summary>
public decimal CurWeekRates { get; set; }
/// <summary>
/// 上周转化率
/// </summary>
public decimal LastWeekRates { get; set; }
/// <summary>
/// 本月转化率
/// </summary>
public decimal CurMonthRates { get; set; }
/// <summary>
/// 上月转化率
/// </summary>
public decimal LastMonthRates { get; set; }
/// <summary>
/// 有效回访总量(有跟进记录)
/// </summary>
public int FollowCount { get; set; }
/// <summary>
/// 昨日有效回访总量(有跟进记录)
/// </summary>
public int YestodayFollow { get; set; }
/// <summary>
/// 本周有效回访总量(有跟进记录)
/// </summary>
public int CurWeekFollow { get; set; }
/// <summary>
/// 上周有效回访总量(有跟进记录)
/// </summary>
public int LastWeekFollow { get; set; }
/// <summary>
/// 本月有效回访总量(有跟进记录)
/// </summary>
public int CurMonthFollow { get; set; }
/// <summary>
/// 上月有效回访总量(有跟进记录)
/// </summary>
public int LastMonthFollow { get; set; }
/// <summary>
/// 单资源回访平均数
/// </summary>
public decimal AgFollow { get; set; }
/// <summary>
/// 昨日单资源回访平均数
/// </summary>
public decimal YestodayAgFollow { get; set; }
/// <summary>
/// 本周单资源回访平均数
/// </summary>
public decimal CurWeekAgFollow { get; set; }
/// <summary>
/// 上周单资源回访平均数
/// </summary>
public decimal LastWeekAgFollow { get; set; }
/// <summary>
/// 本月单资源回访平均数
/// </summary>
public decimal CurMonthAgFollow { get; set; }
/// <summary>
/// 上月单资源回访平均数
/// </summary>
public decimal LastMonthAgFollow { get; set; }
/// <summary>
/// 当周新签数(以周为单位) [订单数量]
/// </summary>
public int CurWeekOrderNum { get; set; }
/// <summary>
/// 新签数累计 [订单数量累计】
/// </summary>
public int LastWeekOrderNum { get; set; }
/// <summary>
/// 当周签约金额(以周为单位) [订单金额]
/// </summary>
public decimal CurWeekOrderSale { get; set; }
/// <summary>
/// 签约金额累计 [订单数量金额]
/// </summary>
public decimal LastWeekOrderSale { get; set; }
/// <summary>
/// 创建人
/// </summary>
public int CreateBy { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime CreateTime { get; set; }
/// <summary>
/// 集团编号
/// </summary>
public int Group_Id { get; set; }
/// <summary>
/// 所属部门编号
/// </summary>
public int DeptId { get; set; }
}
}
......@@ -10,7 +10,7 @@ namespace Edu.Model.Entity.DataStatistics
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_MarketConsultant
public class RB_Market_Data
{
/// <summary>
/// 主键编号
......
using Edu.Model.Entity.DataStatistics;
using System;
using System.Collections.Generic;
using System.Text;
namespace Edu.Model.ViewModel.DataStatistics
{
/// <summary>
/// 课程顾问部数据统计扩展实体类
/// </summary>
public class RB_Consultant_Data_Extend: RB_Consultant_Data
{
}
}
......@@ -8,7 +8,7 @@ namespace Edu.Model.ViewModel.DataStatistics
/// <summary>
/// 市场部数据统计统计实体类
/// </summary>
public class RB_MarketConsultant_Extend : RB_MarketConsultant
public class RB_Market_Data_Extend : RB_Market_Data
{
/// <summary>
/// 开始时间
......
......@@ -49,7 +49,7 @@ namespace Edu.Module.Customer
/// <summary>
/// 市场部,课程顾问部数据统计仓储层对象
/// </summary>
private readonly RB_MarketConsultantRepository marketConsultantRepository = new RB_MarketConsultantRepository();
private readonly RB_Market_DataRepository marketConsultantRepository = new RB_Market_DataRepository();
/// <summary>
/// 员工资料管理仓储层对象
......@@ -61,7 +61,7 @@ namespace Edu.Module.Customer
/// </summary>
public void ClearData()
{
marketConsultantRepository.ClearMarketConsultantRepository();
marketConsultantRepository.ClearMarketRepository();
}
/// <summary>
......@@ -83,7 +83,7 @@ namespace Edu.Module.Customer
{
foreach (var item in empList)
{
RB_MarketConsultant_Extend model = new RB_MarketConsultant_Extend()
RB_Market_Data_Extend model = new RB_Market_Data_Extend()
{
CreateBy = item.Id,
Group_Id = item.Group_Id,
......@@ -266,7 +266,7 @@ namespace Edu.Module.Customer
}
}
}
marketConsultantRepository.InsertMarketConsultantRepository(model);
marketConsultantRepository.InsertMarketRepository(model);
}
}
}
......@@ -291,7 +291,7 @@ namespace Edu.Module.Customer
{
foreach (var item in empList)
{
RB_MarketConsultant_Extend model = new RB_MarketConsultant_Extend()
RB_Market_Data_Extend model = new RB_Market_Data_Extend()
{
CreateBy = item.Id,
Group_Id = item.Group_Id,
......@@ -474,7 +474,7 @@ namespace Edu.Module.Customer
}
}
}
marketConsultantRepository.InsertMarketConsultantRepository(model);
marketConsultantRepository.InsertMarketRepository(model);
}
}
}
......@@ -489,7 +489,7 @@ namespace Edu.Module.Customer
DateTime start = Convert.ToDateTime(StartTime);
DateTime end = Convert.ToDateTime(EndTime);
var days = (end - start).Days;
var lastList= marketConsultantRepository.GetMarketConsultantListRepository(new RB_MarketConsultant_Extend()
var lastList= marketConsultantRepository.GetMarketListRepository(new RB_Market_Data_Extend()
{
StartTime=StartTime,
EndTime=EndTime,
......@@ -615,7 +615,7 @@ namespace Edu.Module.Customer
DateTime start = Convert.ToDateTime(StartTime);
DateTime end = Convert.ToDateTime(EndTime);
var days = (end - start).Days;
var lastList = marketConsultantRepository.GetMarketConsultantListRepository(new RB_MarketConsultant_Extend()
var lastList = marketConsultantRepository.GetMarketListRepository(new RB_Market_Data_Extend()
{
StartTime = StartTime,
EndTime = EndTime,
......
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Edu.Module.User")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("Edu.Module.User")]
[assembly: System.Reflection.AssemblyTitleAttribute("Edu.Module.User")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// 由 MSBuild WriteCodeFragment 类生成。
using Edu.Model.Entity.DataStatistics;
using Edu.Model.ViewModel.DataStatistics;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Edu.Repository.DataStatistics
{
/// <summary>
/// 课程顾问部数据统计仓储层
/// </summary>
public class RB_Consultant_DataRepository:BaseRepository<RB_Consultant_Data>
{
/// <summary>
/// 获取课程顾问部数据统计列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Consultant_Data_Extend> GetConsultantListRepository(RB_Consultant_Data_Extend query)
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT A.*
FROM RB_Consultant_Data AS A
WHERE 1=1
");
if (query != null)
{
if (query.Group_Id > 0)
{
builder.AppendFormat(@" AND A.{0}={1} ", nameof(RB_Consultant_Data_Extend.Group_Id), query.Group_Id);
}
if (query.CreateBy > 0)
{
builder.AppendFormat(@" AND A.{0}={1} ", nameof(RB_Consultant_Data_Extend.CreateBy), query.CreateBy);
}
//if (!string.IsNullOrEmpty(query.QCreateByIds))
//{
// builder.AppendFormat(@" AND A.{0} IN({1}) ", nameof(RB_Market_Data_Extend.CreateBy), query.QCreateByIds);
//}
if (query.DeptId > 0)
{
builder.AppendFormat(@" AND A.{0}={1} ", nameof(RB_Consultant_Data_Extend.DeptId), query.DeptId);
}
//if (!string.IsNullOrEmpty(query.StartTime))
//{
// builder.AppendFormat(" AND A.{0}>='{1}' ", nameof(RB_Consultant_Data_Extend.Date), query.StartTime);
//}
//if (!string.IsNullOrEmpty(query.EndTime))
//{
// builder.AppendFormat(" AND A.{0}<='{1} 23:59:59' ", nameof(RB_Market_Data_Extend.Date), query.EndTime);
//}
}
return Get<RB_Consultant_Data_Extend>(builder.ToString()).ToList();
}
/// <summary>
/// 新增课程顾问部数据
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public bool InsertConsultantRepository(RB_Consultant_Data_Extend model)
{
var newModel = new RB_Consultant_Data_Extend()
{
Date = model.Date,
//ClueCount = model.ClueCount,
//YestodayClue = model.YestodayClue,
//LastWeekClue = model.LastWeekClue,
//LastMonthClue = model.LastMonthClue,
VisitCount = model.VisitCount,
YestodayVisit = model.YestodayVisit,
LastWeekVisit = model.LastWeekVisit,
LastMonthVisit = model.LastMonthVisit,
TrialLessonCount = model.TrialLessonCount,
YestodayTrialLesson = model.YestodayTrialLesson,
LastWeekTrialLesson = model.LastWeekTrialLesson,
LastMonthTrialLesson = model.LastMonthTrialLesson,
FollowCount = model.FollowCount,
YestodayFollow = model.YestodayFollow,
LastWeekFollow = model.LastWeekFollow,
LastMonthFollow = model.LastMonthFollow,
//SaleMoney = model.SaleMoney,
//YestodaySale = model.YestodaySale,
//LastWeekSale = model.LastWeekSale,
//LastMonthSale = model.LastMonthSale,
CreateBy = model.CreateBy,
CreateTime = DateTime.Now,
DeptId = model.DeptId,
Group_Id = model.Group_Id
};
var newId = base.Insert(newModel);
newModel.Id = newId;
return newId > 0;
}
/// <summary>
/// 清除课程顾问部历史数据
/// </summary>
/// <returns></returns>
public void ClearConsultantRepository()
{
string sql = "TRUNCATE TABLE RB_Consultant_Data ";
base.Execute(sql);
}
}
}
......@@ -10,49 +10,49 @@ namespace Edu.Repository.DataStatistics
/// <summary>
/// 市场部数据统计仓储层
/// </summary>
public class RB_MarketConsultantRepository : BaseRepository<RB_MarketConsultant>
public class RB_Market_DataRepository : BaseRepository<RB_Market_Data>
{
/// <summary>
/// 获取市场部数据统计列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_MarketConsultant_Extend> GetMarketConsultantListRepository(RB_MarketConsultant_Extend query)
public List<RB_Market_Data_Extend> GetMarketListRepository(RB_Market_Data_Extend query)
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT A.*
FROM RB_MarketConsultant AS A
FROM RB_Market_Data AS A
WHERE 1=1
");
if (query != null)
{
if (query.Group_Id > 0)
{
builder.AppendFormat(@" AND A.{0}={1} ", nameof(RB_MarketConsultant_Extend.Group_Id), query.Group_Id);
builder.AppendFormat(@" AND A.{0}={1} ", nameof(RB_Market_Data_Extend.Group_Id), query.Group_Id);
}
if (query.CreateBy > 0)
{
builder.AppendFormat(@" AND A.{0}={1} ", nameof(RB_MarketConsultant_Extend.CreateBy), query.CreateBy);
builder.AppendFormat(@" AND A.{0}={1} ", nameof(RB_Market_Data_Extend.CreateBy), query.CreateBy);
}
if (!string.IsNullOrEmpty(query.QCreateByIds))
{
builder.AppendFormat(@" AND A.{0} IN({1}) ", nameof(RB_MarketConsultant_Extend.CreateBy), query.QCreateByIds);
builder.AppendFormat(@" AND A.{0} IN({1}) ", nameof(RB_Market_Data_Extend.CreateBy), query.QCreateByIds);
}
if (query.DeptId > 0)
{
builder.AppendFormat(@" AND A.{0}={1} ", nameof(RB_MarketConsultant_Extend.DeptId), query.DeptId);
builder.AppendFormat(@" AND A.{0}={1} ", nameof(RB_Market_Data_Extend.DeptId), query.DeptId);
}
if (!string.IsNullOrEmpty(query.StartTime))
{
builder.AppendFormat(" AND A.{0}>='{1}' ", nameof(RB_MarketConsultant_Extend.Date), query.StartTime);
builder.AppendFormat(" AND A.{0}>='{1}' ", nameof(RB_Market_Data_Extend.Date), query.StartTime);
}
if (!string.IsNullOrEmpty(query.EndTime))
{
builder.AppendFormat(" AND A.{0}<='{1} 23:59:59' ", nameof(RB_MarketConsultant_Extend.Date), query.EndTime);
builder.AppendFormat(" AND A.{0}<='{1} 23:59:59' ", nameof(RB_Market_Data_Extend.Date), query.EndTime);
}
}
return Get<RB_MarketConsultant_Extend>(builder.ToString()).ToList();
return Get<RB_Market_Data_Extend>(builder.ToString()).ToList();
}
/// <summary>
......@@ -60,9 +60,9 @@ WHERE 1=1
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public bool InsertMarketConsultantRepository(RB_MarketConsultant_Extend model)
public bool InsertMarketRepository(RB_Market_Data_Extend model)
{
var newModel = new RB_MarketConsultant_Extend()
var newModel = new RB_Market_Data_Extend()
{
Date = model.Date,
ClueCount = model.ClueCount,
......@@ -99,9 +99,9 @@ WHERE 1=1
/// 清楚历史数据
/// </summary>
/// <returns></returns>
public void ClearMarketConsultantRepository()
public void ClearMarketRepository()
{
string sql = "TRUNCATE TABLE RB_MarketConsultant ";
string sql = "TRUNCATE TABLE RB_Market_Data ";
base.Execute(sql);
}
}
......
......@@ -544,7 +544,7 @@ namespace Edu.WebApi.Controllers.Applet
var MaxChapterNo = planList.Max(x => x.LessonPlanNum);
//查询所有的章节
var chapterTreeList = courseModule.GetChapterTreeListModule_V2(new Model.ViewModel.Course.RB_Course_Chapter_ViewModel() { Group_Id = appletUserInfo.Group_Id, CourseId = CourseId });
var ctList = chapterTreeList.Where(x => Convert.ToInt32(x.ChapterNo) <= MaxChapterNo).ToList();
var ctList = chapterTreeList.Where(x => Convert.ToInt32(x.ChapterNo) <= MaxChapterNo).OrderByDescending(qitem=> Convert.ToInt32(qitem.ChapterNo)).ToList();
//章节单词得分
var prepWordsList = courseExamModule.GetStuWordsPrepListModule(new RB_StuWords_Prep_Extend()
{
......
......@@ -543,7 +543,7 @@ namespace Edu.WebApi.Controllers.Customer
Group_Id = base.UserInfo.Group_Id
};
var list = customerStudentModule.GetStageListModule(query);
return ApiResult.Success(data: list.Select(qitem => new { Id = qitem.Id, Name = qitem.StageName }));
return ApiResult.Success(data: list.Select(qitem => new { qitem.Id, Name = qitem.StageName }));
}
/// <summary>
......@@ -617,7 +617,7 @@ namespace Edu.WebApi.Controllers.Customer
Group_Id = base.UserInfo.Group_Id
};
var list = customerStudentModule.GetStudentTypeListModule(query);
return ApiResult.Success(data: list.Select(qitem => new { Id = qitem.Id, Name = qitem.Name }));
return ApiResult.Success(data: list.Select(qitem => new { qitem.Id, qitem.Name }));
}
/// <summary>
......
{
"ConnectionStrings": {
"DefaultConnection": "server=192.168.10.214;user id=reborn;password=Reborn@2018;database=reborn_edu;CharSet=utf8mb4; Convert Zero Datetime=true; ",
"DefaultConnection": "server=192.168.10.214;user id=reborn;password=Reborn@2018;database=test_edu;CharSet=utf8mb4; Convert Zero Datetime=true; ",
"DefaultConnectionPName": "MySql.Data.MySqlClient",
"FinanceConnection": "server=192.168.10.214;user id=reborn;password=Reborn@2018;database=reborn_finance;CharSet=utf8mb4; Convert Zero Datetime=true; ",
"FinanceConnectionPName": "MySql.Data.MySqlClient",
......@@ -105,7 +105,7 @@
//是否是本地服务
"IsLocal": "1",
//临时Token
"TempToken": "52_qHSqAI2gO0U9vrM7VAHkZ9dK-sR3RlQDGYJsvxypmPut16Hs7CvtoUGp2I3vYfQyehH1nrn1CDscWbBf4gN9-n9g45PAbqau4OTsj19pATUEYIOyAPl4xU_tHX7H2LsErkGYOV9dY7cwOHB-HRRfAAABLL",
"TempToken": "53_OVLlSPNJ0hmSrsEUfnJ6kTxFRGxfkcuJJjpBjsDuaSGmtYu95vZNNyh-wIXbFSZ9DtxzFJ1eN0At2QmJ_aWLPFjz4yrz2VrWvmR3KrEQKqfwvxesG82V2WpAgDnxW_tvvWYXRRRX1oguxCtHXSShADAKFF",
//学生请假流程编号
"StudentLeaveFlowId": 7,
//组卷审批流程编号
......
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