Commit 9838e96d authored by 黄奎's avatar 黄奎

页面修改

parent c0833b6f
......@@ -10,6 +10,11 @@ namespace Edu.Model.ViewModel.DataStatistics
/// </summary>
public class RB_Assessment_Subtype_Extend : RB_Assessment_Subtype
{
/// <summary>
/// 教师考评类型编号【查询使用】
/// </summary>
public string QAssessmentTypeIds { get; set; }
/// <summary>
/// 考评项目列表
/// </summary>
......
......@@ -2,6 +2,7 @@
using Edu.Model.ViewModel.DataStatistics;
using Edu.Repository.DataStatistics;
using System.Collections.Generic;
using System.Linq;
using VT.FW.DB;
namespace Edu.Module.User
......@@ -14,12 +15,12 @@ namespace Edu.Module.User
/// <summary>
/// 老师考评类型配置表仓储层对象
/// </summary>
private RB_Assessment_TypeRepository assessment_TypeRepository = new RB_Assessment_TypeRepository();
private readonly RB_Assessment_TypeRepository assessment_TypeRepository = new RB_Assessment_TypeRepository();
/// <summary>
/// 老师考评子类型配置表仓储层对象
/// </summary>
private RB_Assessment_SubtypeRepository assessment_SubtypeRepository = new RB_Assessment_SubtypeRepository();
private readonly RB_Assessment_SubtypeRepository assessment_SubtypeRepository = new RB_Assessment_SubtypeRepository();
/// <summary>
/// 获取老师考评配置列表
......@@ -29,6 +30,18 @@ namespace Edu.Module.User
public List<RB_Assessment_Type_Extend> GetAssessmentTypeListModule(RB_Assessment_Type_Extend query)
{
var list = assessment_TypeRepository.GetAssessmentTypeListRepository(query);
if (list != null && list.Count > 0)
{
string ids = string.Join(",", list.Select(qitem => qitem.Id));
var subList = GetAssessmentSubtypeListModule(new RB_Assessment_Subtype_Extend()
{
QAssessmentTypeIds = ids
});
foreach (var item in list)
{
item.SubtypeList = subList?.Where(qitem => qitem.AssessmentTypeId == item.Id)?.ToList() ?? new List<RB_Assessment_Subtype_Extend>();
}
}
return list;
}
......@@ -68,6 +81,10 @@ namespace Edu.Module.User
public RB_Assessment_Type_Extend GetAssessmentTypeModule(object Id)
{
var extModel = assessment_TypeRepository.GetEntity<RB_Assessment_Type_Extend>(Id);
if (extModel != null)
{
extModel.SubtypeList = GetAssessmentSubtypeListModule(new RB_Assessment_Subtype_Extend() { AssessmentTypeId = extModel.Id });
}
return extModel;
}
......
......@@ -39,6 +39,10 @@ WHERE 1=1
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Assessment_Subtype_Extend.AssessmentTypeId), query.AssessmentTypeId);
}
if (!string.IsNullOrEmpty(query.QAssessmentTypeIds))
{
builder.AppendFormat(" AND A.{0} IN({1}) ", nameof(RB_Assessment_Subtype_Extend.AssessmentTypeId), query.QAssessmentTypeIds);
}
if (!string.IsNullOrEmpty(query.SubTypeName))
{
builder.AppendFormat(" AND A.{0} LIKE @SubTypeName ", nameof(RB_Assessment_Subtype_Extend.SubTypeName));
......
......@@ -11,7 +11,6 @@ using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Edu.WebApi.Controllers.Customer
{
......@@ -647,21 +646,23 @@ namespace Edu.WebApi.Controllers.Customer
List<ExcelDataSource> slist = new List<ExcelDataSource>();
try
{
ExcelDataSource header = new ExcelDataSource();
header.ExcelRows = new List<ExcelColumn>()
ExcelDataSource header = new ExcelDataSource
{
new ExcelColumn("联系人名称"){ CellWidth=20},
new ExcelColumn("类型"){ CellWidth=20},
new ExcelColumn("同行名称"){ CellWidth=20},
new ExcelColumn("电话"){ CellWidth=20},
new ExcelColumn("QQ号"){ CellWidth=20},
new ExcelColumn("微信号"){ CellWidth=20},
new ExcelColumn("客户数量"){ CellWidth=20},
new ExcelColumn("订单数量"){ CellWidth=20},
new ExcelColumn("交易额"){ CellWidth=20},
new ExcelColumn("审核状态"){ CellWidth=20},
new ExcelColumn("加入时间"){ CellWidth=20},
new ExcelColumn("负责人"){ CellWidth=20},
ExcelRows = new List<ExcelColumn>()
{
new ExcelColumn("联系人名称"){ CellWidth=20},
new ExcelColumn("类型"){ CellWidth=20},
new ExcelColumn("同行名称"){ CellWidth=20},
new ExcelColumn("电话"){ CellWidth=20},
new ExcelColumn("QQ号"){ CellWidth=20},
new ExcelColumn("微信号"){ CellWidth=20},
new ExcelColumn("客户数量"){ CellWidth=20},
new ExcelColumn("订单数量"){ CellWidth=20},
new ExcelColumn("交易额"){ CellWidth=20},
new ExcelColumn("审核状态"){ CellWidth=20},
new ExcelColumn("加入时间"){ CellWidth=20},
new ExcelColumn("负责人"){ CellWidth=20},
}
};
slist.Add(header);
foreach (var item in list)
......@@ -960,13 +961,12 @@ namespace Edu.WebApi.Controllers.Customer
List<object> result = new List<object>();
foreach (var item in list)
{
result.Add(new
{
item.CategoryId,
item.CategoryName,
item.CreateBy,
CreateByName=item.CreateByName,
item.CreateByName,
item.CatetoryType,
item.LinkManCount,
item.StudentCount,
......@@ -1010,16 +1010,18 @@ namespace Edu.WebApi.Controllers.Customer
List<ExcelDataSource> slist = new List<ExcelDataSource>();
try
{
ExcelDataSource header = new ExcelDataSource();
header.ExcelRows = new List<ExcelColumn>()
ExcelDataSource header = new ExcelDataSource
{
new ExcelColumn("同业名称"){ CellWidth=40},
new ExcelColumn("类型"){ CellWidth=20},
new ExcelColumn("联系人数量"){ CellWidth=20},
new ExcelColumn("客户数量"){ CellWidth=20},
new ExcelColumn("订单数量"){ CellWidth=20},
new ExcelColumn("加入时间"){ CellWidth=30},
new ExcelColumn("负责人"){ CellWidth=20},
ExcelRows = new List<ExcelColumn>()
{
new ExcelColumn("同业名称"){ CellWidth=40},
new ExcelColumn("类型"){ CellWidth=20},
new ExcelColumn("联系人数量"){ CellWidth=20},
new ExcelColumn("客户数量"){ CellWidth=20},
new ExcelColumn("订单数量"){ CellWidth=20},
new ExcelColumn("加入时间"){ CellWidth=30},
new ExcelColumn("负责人"){ CellWidth=20},
}
};
slist.Add(header);
foreach (var item in list)
......
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