Commit 62cd468e authored by 黄奎's avatar 黄奎

页面修改

parent 94f78049
......@@ -1059,20 +1059,16 @@ namespace Edu.WebApi.Controllers.Customer
CategoryName = base.ParmJObj.GetStringValue("CategoryName"),
CatetoryType = (CatetoryTypeEnum)base.ParmJObj.GetInt("CatetoryType"),
};
query.CreateBy = userInfo.Id;
var list = customerModule.GetCustomerCategoryListModule(query);
List<object> result = new List<object>();
foreach (var item in list)
{
string CreateByName = UserReidsCache.GetUserLoginInfo(item.CreateBy)?.AccountName ?? "";
result.Add(new
{
item.CategoryId,
item.CategoryName,
CreateByName,
item.CatetoryType,
CatetoryTypeName = item.CatetoryType.ToName(),
CreateTime = Common.ConvertHelper.FormatTime(item.CreateTime),
});
}
return ApiResult.Success(data: result);
......
......@@ -552,7 +552,27 @@ namespace Edu.WebApi.Controllers.User
new ExcelColumn("法语语培"){ CellWidth=15},
new ExcelColumn("日本留学"){ CellWidth=15},
new ExcelColumn("韩国留学"){ CellWidth=15},
new ExcelColumn("英港澳留学"){ CellWidth=15},
new ExcelColumn("美国留学"){ CellWidth=15},
new ExcelColumn("新加坡留学"){ CellWidth=15},
new ExcelColumn("澳新留学"){ CellWidth=15},
new ExcelColumn("其他"){ CellWidth=15},
new ExcelColumn("A类客户"){ CellWidth=15},
new ExcelColumn("B类客户"){ CellWidth=15},
new ExcelColumn("C类客户"){ CellWidth=15},
new ExcelColumn("D类客户"){ CellWidth=15},
new ExcelColumn("同行介绍"){ CellWidth=15},
new ExcelColumn("直客"){ CellWidth=15},
new ExcelColumn("学员转介绍"){ CellWidth=15},
new ExcelColumn("内部介绍"){ CellWidth=15},
new ExcelColumn("无效"){ CellWidth=15},
new ExcelColumn("疑似"){ CellWidth=15},
new ExcelColumn("意向"){ CellWidth=15},
new ExcelColumn("近期可邀约"){ CellWidth=15},
new ExcelColumn("谈判"){ CellWidth=15},
new ExcelColumn("签约.成交.续费"){ CellWidth=15},
new ExcelColumn("语培签约金额"){ CellWidth=15},
new ExcelColumn("留学签约金额"){ CellWidth=15},
}
};
slist.Add(header);
......@@ -561,45 +581,167 @@ namespace Edu.WebApi.Controllers.User
JObject dObj = JObject.Parse(JsonHelper.Serialize(item));
var columns = new List<ExcelColumn>
{
new ExcelColumn(dObj.GetStringValue("StuName"))
new ExcelColumn(dObj.GetStringValue("DateStr"))
};
string EnrollState = dObj.GetInt("EnrollState") == 1 ? "已报名" : "未成交";
columns.Add(new ExcelColumn(EnrollState));
columns.Add(new ExcelColumn(dObj.GetStringValue("AssistName")));
columns.Add(new ExcelColumn(dObj.GetStringValue("StuBirthStr")));
columns.Add(new ExcelColumn(dObj.GetStringValue("StuTel")));
columns.Add(new ExcelColumn(dObj.GetStringValue("StuAddress")));
columns.Add(new ExcelColumn(dObj.GetStringValue("StuChannelName")));
columns.Add(new ExcelColumn(dObj.GetStringValue("JapanBaseInfo")));
columns.Add(new ExcelColumn(dObj.GetStringValue("PlanPrice")));
string baseCondition = dObj.GetStringValue("BaseCondition");
string demandPoint = dObj.GetStringValue("DemandPoint");
string resistPoint = dObj.GetStringValue("ResistPoint");
string consultingResults = dObj.GetStringValue("ConsultingResults");
baseCondition = !string.IsNullOrEmpty(baseCondition) ? baseCondition : "暂无";
demandPoint = !string.IsNullOrEmpty(demandPoint) ? demandPoint : "暂无";
resistPoint = !string.IsNullOrEmpty(resistPoint) ? resistPoint : "暂无";
consultingResults = !string.IsNullOrEmpty(consultingResults) ? consultingResults : "暂无";
string baseInfo = "基本情况:" + baseCondition + "\r\n" + "需求点:" + consultingResults + "\r\n" + "抗拒点:" + resistPoint + "\r\n" + "咨询结果:" + consultingResults;
columns.Add(new ExcelColumn(baseInfo));
string remark = "";
string FUTime = dObj.GetStringValue("FUTime");
if (!string.IsNullOrEmpty(FUTime))
columns.Add(new ExcelColumn(dObj.GetStringValue("PushCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("NewCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("CommunicationCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("TrialLessonCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("NotContacted")));
columns.Add(new ExcelColumn(dObj.GetStringValue("JPCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("KRCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("FRCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("JPStudyCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("KRStudyCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("YGAStudyCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("USStudyCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("SGStudyCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("AXStudyCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("OtherCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("ClassACount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("ClassBCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("ClassCCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("ClassDCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("CustomerCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("B2CCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("TransCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("InnerCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("InvalidCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("SuspectedCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("IntentionCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("InvitationCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("NegotiationCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("ContractCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("OrderMoney")));
columns.Add(new ExcelColumn(dObj.GetStringValue("StudyOrderMoney")));
var dataRow = new ExcelDataSource()
{
remark += FUTime;
ExcelRows = columns
};
slist.Add(dataRow);
}
string FURemark = dObj.GetStringValue("FURemark");
if (!string.IsNullOrEmpty(FURemark))
var byteData = ExcelTempLateHelper.ToExcelExtend(slist);
return File(byteData, "application/octet-stream", excelName);
}
catch (Exception ex)
{
remark += "\r\n" + StringHelper.FilterHtml(FURemark);
LogHelper.Write(ex, "OutToExcelOrderStudentClassHoursList");
var byteData1 = ExcelTempLateHelper.ToExcelExtend(slist);
return File(byteData1, "application/octet-stream", excelName);
}
columns.Add(new ExcelColumn()
}
/// <summary>
/// 客户数据月份统计
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult GetStudentStaticMonth()
{
Value = remark
});
var query = new RB_Student_Static_Extend()
{
YearStr = base.ParmJObj.GetInt("YearStr"),
};
query.Group_Id = base.UserInfo.Group_Id;
var list = studentStatModule.GetStudentStaticListMonthModule(query);
return ApiResult.Success(data: list);
}
/// <summary>
/// 下载客户数据月份统计
/// </summary>
/// <returns></returns>
[HttpPost]
[Obsolete]
public FileContentResult DownLoadStudentStaticMonth()
{
var query = new RB_Student_Static_Extend()
{
YearStr = base.ParmJObj.GetInt("YearStr"),
};
query.Group_Id = base.UserInfo.Group_Id;
var list = studentStatModule.GetStudentStaticListMonthModule(query);
string excelName = "课程顾问部每月统计.xls";
List<ExcelDataSource> slist = new List<ExcelDataSource>();
try
{
ExcelDataSource header = new ExcelDataSource
{
ExcelRows = new List<ExcelColumn>()
{
new ExcelColumn("日期"){ CellWidth=15},
new ExcelColumn("推送人数"){ CellWidth=15},
new ExcelColumn("新客户"){ CellWidth=15},
new ExcelColumn("初步沟通(二次沟通)"){ CellWidth=10},
new ExcelColumn("预约试听(已到店,已试听)"){ CellWidth=15},
new ExcelColumn("待联系"){ CellWidth=15},
new ExcelColumn("日语语培"){ CellWidth=15},
new ExcelColumn("韩国语培"){ CellWidth=15},
new ExcelColumn("法语语培"){ CellWidth=15},
new ExcelColumn("日本留学"){ CellWidth=15},
new ExcelColumn("韩国留学"){ CellWidth=15},
new ExcelColumn("英港澳留学"){ CellWidth=15},
new ExcelColumn("美国留学"){ CellWidth=15},
new ExcelColumn("新加坡留学"){ CellWidth=15},
new ExcelColumn("澳新留学"){ CellWidth=15},
new ExcelColumn("其他"){ CellWidth=15},
new ExcelColumn("A类客户"){ CellWidth=15},
new ExcelColumn("B类客户"){ CellWidth=15},
new ExcelColumn("C类客户"){ CellWidth=15},
new ExcelColumn("D类客户"){ CellWidth=15},
new ExcelColumn("同行介绍"){ CellWidth=15},
new ExcelColumn("直客"){ CellWidth=15},
new ExcelColumn("学员转介绍"){ CellWidth=15},
new ExcelColumn("内部介绍"){ CellWidth=15},
new ExcelColumn("无效"){ CellWidth=15},
new ExcelColumn("疑似"){ CellWidth=15},
new ExcelColumn("意向"){ CellWidth=15},
new ExcelColumn("近期可邀约"){ CellWidth=15},
new ExcelColumn("谈判"){ CellWidth=15},
new ExcelColumn("签约.成交.续费"){ CellWidth=15},
new ExcelColumn("语培签约金额"){ CellWidth=15},
new ExcelColumn("留学签约金额"){ CellWidth=15},
}
};
slist.Add(header);
foreach (var item in list)
{
JObject dObj = JObject.Parse(JsonHelper.Serialize(item));
var columns = new List<ExcelColumn>
{
new ExcelColumn(dObj.GetStringValue("DateStr"))
};
columns.Add(new ExcelColumn(dObj.GetStringValue("PushCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("NewCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("CommunicationCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("TrialLessonCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("NotContacted")));
columns.Add(new ExcelColumn(dObj.GetStringValue("JPCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("KRCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("FRCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("JPStudyCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("KRStudyCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("YGAStudyCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("USStudyCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("SGStudyCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("AXStudyCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("OtherCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("ClassACount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("ClassBCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("ClassCCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("ClassDCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("CustomerCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("B2CCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("TransCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("InnerCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("InvalidCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("SuspectedCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("IntentionCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("InvitationCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("NegotiationCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("ContractCount")));
columns.Add(new ExcelColumn(dObj.GetStringValue("OrderMoney")));
columns.Add(new ExcelColumn(dObj.GetStringValue("StudyOrderMoney")));
var dataRow = new ExcelDataSource()
{
ExcelRows = columns
......@@ -617,31 +759,30 @@ namespace Edu.WebApi.Controllers.User
}
}
/// <summary>
/// 客户数据月份统计
/// 客户数据月份成长率统计
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult GetStudentStaticMonth()
public ApiResult GetStudentStaticRateMonth()
{
var query = new RB_Student_Static_Extend()
{
YearStr = base.ParmJObj.GetInt("YearStr"),
};
query.Group_Id = base.UserInfo.Group_Id;
var list = studentStatModule.GetStudentStaticListMonthModule(query);
var list = studentStatModule.GetStudentStaticRateListMonthModule(query);
return ApiResult.Success(data: list);
}
/// <summary>
/// 客户数据月份统计
/// 下载客户数据月份统计
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult GetStudentStaticRateMonth()
[Obsolete]
public FileContentResult DownLoadStudentStaticMonthRate()
{
var query = new RB_Student_Static_Extend()
{
......@@ -649,8 +790,68 @@ namespace Edu.WebApi.Controllers.User
};
query.Group_Id = base.UserInfo.Group_Id;
var list = studentStatModule.GetStudentStaticRateListMonthModule(query);
return ApiResult.Success(data: list);
string excelName = "课程顾问部月成长率统计.xls";
List<ExcelDataSource> slist = new List<ExcelDataSource>();
try
{
ExcelDataSource header = new ExcelDataSource
{
ExcelRows = new List<ExcelColumn>()
{
new ExcelColumn("名称"){ CellWidth=25},
new ExcelColumn("1月"){ CellWidth=15},
new ExcelColumn("2月"){ CellWidth=15},
new ExcelColumn("3月"){ CellWidth=10},
new ExcelColumn("4月"){ CellWidth=15},
new ExcelColumn("5月"){ CellWidth=15},
new ExcelColumn("6月"){ CellWidth=15},
new ExcelColumn("7月"){ CellWidth=15},
new ExcelColumn("8月"){ CellWidth=15},
new ExcelColumn("9月"){ CellWidth=15},
new ExcelColumn("10月"){ CellWidth=15},
new ExcelColumn("11月"){ CellWidth=15},
new ExcelColumn("12月"){ CellWidth=15},
new ExcelColumn("平均"){ CellWidth=15},
}
};
slist.Add(header);
foreach (var item in list)
{
var columns = new List<ExcelColumn>
{
new ExcelColumn(item.ItemName)
};
columns.Add(new ExcelColumn(item.JanuaryRate+"%"));
columns.Add(new ExcelColumn(item.FebruaryRate+"%"));
columns.Add(new ExcelColumn(item.MarchRate+"%"));
columns.Add(new ExcelColumn(item.AprilRate+"%"));
columns.Add(new ExcelColumn(item.MayRate+"%"));
columns.Add(new ExcelColumn(item.JuneRate+"%"));
columns.Add(new ExcelColumn(item.JulyRate+"%"));
columns.Add(new ExcelColumn(item.AugustRate+"%"));
columns.Add(new ExcelColumn(item.SeptemberRate+"%"));
columns.Add(new ExcelColumn(item.OctoberRate+"%"));
columns.Add(new ExcelColumn(item.NovemberRate+"%"));
columns.Add(new ExcelColumn(item.DecemberRate+"%"));
columns.Add(new ExcelColumn(item.AvgRate+"%"));
var dataRow = new ExcelDataSource()
{
ExcelRows = columns
};
slist.Add(dataRow);
}
var byteData = ExcelTempLateHelper.ToExcelExtend(slist);
return File(byteData, "application/octet-stream", excelName);
}
catch (Exception ex)
{
LogHelper.Write(ex, "OutToExcelOrderStudentClassHoursList");
var byteData1 = ExcelTempLateHelper.ToExcelExtend(slist);
return File(byteData1, "application/octet-stream", excelName);
}
}
/// <summary>
......
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