Commit 96dfa796 authored by 黄奎's avatar 黄奎

页面修改

parent 331f9b00
......@@ -357,7 +357,7 @@ namespace Edu.Module.Course
/// <param name="saleId"></param>
private void CalcPersionBonusModule(RB_Personnel_Period period, RB_Bonus_PlanExtend item, int GroupId, string startDate, string endDate, int saleId)
{
var orderList = GetSaleOrderList(item, GroupId, endDate, saleId, out List<RB_Order_ViewModel> allOrderList);
var orderList = GetSaleOrderList(item, GroupId,startDate,endDate, saleId, out List<RB_Order_ViewModel> allOrderList);
var curNum = orderList?.Sum(qitem => qitem.GuestNum) ?? 0;
var curOrderMoney = orderList?.Sum(qitem => qitem.OrderMoney) ?? 0;
......@@ -539,11 +539,11 @@ namespace Edu.Module.Course
/// <param name="endDate"></param>
/// <param name="SaleId"></param>
/// <returns></returns>
private List<PersionOrderItem> GetSaleOrderList(RB_Bonus_PlanExtend item, int GroupId, string endDate, int SaleId, out List<RB_Order_ViewModel> orderList)
private List<PersionOrderItem> GetSaleOrderList(RB_Bonus_PlanExtend item, int GroupId,string startDate,string endDate, int SaleId, out List<RB_Order_ViewModel> orderList)
{
List<PersionOrderItem> list = new List<PersionOrderItem>();
//所有当前人员订单列表
orderList = orderRepository.GetAllBonusOrderListRepository(GroupId, endDate, item.PlanType, SaleId);
orderList = orderRepository.GetAllBonusOrderListRepository(GroupId, startDate, endDate, item.PlanType, SaleId);
//适用课程
if (!string.IsNullOrEmpty(item.UseCourseIds))
{
......@@ -684,7 +684,7 @@ namespace Edu.Module.Course
if (saleId == user.Id)
{
string endDate = Common.ConvertHelper.FormatDate(endTime);
var orderList = GetSaleOrderList(item, user.Group_Id, endDate, saleId, out List<RB_Order_ViewModel> allOrderList);
var orderList = GetSaleOrderList(item, user.Group_Id,startDate,endDate, saleId, out List<RB_Order_ViewModel> allOrderList);
monthData.GuestNum = orderList?.Sum(qitem => qitem.GuestNum) ?? 0;
monthData.OrderCount = allOrderList?.Count() ?? 0;
monthData.ReachCount = item.MonthGoalMoney > (orderList?.Sum(qitem => qitem.OrderMoney) ?? 0) ? 1 : 0;
......
......@@ -512,8 +512,24 @@ namespace Edu.Module.Course
}
else if (item.CreateType == StuCreateTypeEnum.CustomerInput)
{
item.StuSourceIdName = customerList?.FirstOrDefault(qitem => qitem.CustomerId == item.StuSourceId)?.CustomerName ?? "";
item.EnterpriseName = customerList?.FirstOrDefault(qitem => qitem.CustomerId == item.StuSourceId)?.EnterpriseName ?? "";
var tempCustomer = customerList?.FirstOrDefault(qitem => qitem.CustomerId == item.StuSourceId);
item.StuSourceIdName = tempCustomer?.CustomerName ?? "";
if (tempCustomer != null)
{
if (tempCustomer.CustomerType == Common.Enum.Customer.CatetoryTypeEnum.Other)
{
item.EnterpriseName = tempCustomer?.CategoryName ?? "";
}
else
{
item.EnterpriseName = tempCustomer?.EnterpriseName ?? "";
}
}
else
{
item.EnterpriseName = "";
}
}
else if (item.CreateType == StuCreateTypeEnum.TransIntroduction)
{
......
......@@ -288,7 +288,8 @@ namespace Edu.Module.User
item.EnterpriseName = tempCustomer?.EnterpriseName ?? "";
}
}
else {
else
{
item.EnterpriseName = "";
}
}
......
......@@ -1179,7 +1179,7 @@ group by o.OrderId
/// <param name="PlanType">1-市场人员,2-课程顾问</param>
/// <param name="SaleId">员工编号</param>
/// <returns></returns>
public List<RB_Order_ViewModel> GetAllBonusOrderListRepository(int group_Id, string eDate, int PlanType, int SaleId)
public List<RB_Order_ViewModel> GetAllBonusOrderListRepository(int group_Id,string startDate, string eDate, int PlanType, int SaleId)
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
......@@ -1197,6 +1197,10 @@ WHERE 1=1
{
builder.AppendFormat(" AND o.Group_Id ={0} ", group_Id);
}
if (!string.IsNullOrEmpty(startDate))
{
builder.AppendFormat(" AND o.CreateTime >= '{0}' ", startDate);
}
if (!string.IsNullOrEmpty(eDate))
{
builder.AppendFormat(" AND o.CreateTime <= '{0} 23:59:59' ", eDate);
......
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