Commit b5b7a837 authored by 黄奎's avatar 黄奎

新增字段

parent e999bedb
......@@ -209,5 +209,15 @@ namespace Edu.Model.Entity.DataStatistics
/// 所属部门编号
/// </summary>
public int DeptId { get; set; }
/// <summary>
/// 当月完成订单累计金额
/// </summary>
public decimal CurMonthOrderSale { get; set; }
/// <summary>
/// 当月效能目标金额
/// </summary>
public decimal CurMonthOrderGoal { get; set; }
}
}
......@@ -304,6 +304,7 @@ namespace Edu.Module.Customer
});
if (empList != null && empList.Count > 0)
{
var consultantGoal = GetConsultantGoalListModule(new RB_Consultant_Goal_Extend() { Group_Id = 100000, Dept_Id = 13, YearStr = StartTime.Year, MonthStr = StartTime.Month })?.FirstOrDefault();
foreach (var item in empList)
{
RB_Consultant_Data_Extend model = new RB_Consultant_Data_Extend()
......@@ -499,6 +500,11 @@ namespace Edu.Module.Customer
model.LastWeekOrderNum = orderCount;
model.LastWeekOrderSale = Income;
}
if (sItem.Key == "curMonth")
{
model.CurMonthOrderSale = Income;
model.CurMonthOrderGoal = consultantGoal?.GoalMoney ?? 0;
}
}
consultant_DataRepository.InsertConsultantRepository(model);
}
......@@ -673,7 +679,7 @@ namespace Edu.Module.Customer
CurWeekRates = yesDataList?.Sum(qitem => qitem.CurWeekRates) ?? 0,
LastWeekRates = yesDataList?.Sum(qitem => qitem.LastWeekRates) ?? 0,
CurMonthRates = yesDataList?.Sum(qitem => qitem.CurMonthRates) ?? 0,
LastMonthRates= yesDataList?.Sum(qitem => qitem.LastMonthRates) ?? 0,
LastMonthRates = yesDataList?.Sum(qitem => qitem.LastMonthRates) ?? 0,
FollowCount = yesDataList?.Sum(qitem => qitem.FollowCount) ?? 0,
YestodayFollow = yesDataList?.Sum(qitem => qitem.YestodayFollow) ?? 0,
......@@ -693,6 +699,9 @@ namespace Edu.Module.Customer
LastWeekOrderNum = yesDataList?.Sum(qitem => qitem.LastWeekOrderNum) ?? 0,
CurWeekOrderSale = yesDataList?.Sum(qitem => qitem.CurWeekOrderSale) ?? 0,
LastWeekOrderSale = yesDataList?.Sum(qitem => qitem.LastWeekOrderSale) ?? 0,
CurMonthOrderSale = yesDataList?.Sum(qitem => qitem.CurMonthOrderSale) ?? 0,
CurMonthOrderGoal = yesDataList?.FirstOrDefault()?.CurMonthOrderGoal ?? 0,
};
return obj;
}
......
......@@ -105,6 +105,9 @@ WHERE 1=1
CurWeekOrderSale=model.CurWeekOrderSale,
LastWeekOrderSale=model.LastWeekOrderSale,
CurMonthOrderGoal=model.CurMonthOrderGoal,
CurMonthOrderSale=model.CurMonthOrderSale,
CreateBy = model.CreateBy,
CreateTime = DateTime.Now,
DeptId = model.DeptId,
......
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