Commit 0bbe3928 authored by 黄奎's avatar 黄奎

页面修改

parent d1a44042
...@@ -304,5 +304,10 @@ namespace Edu.Model.ViewModel.Sell ...@@ -304,5 +304,10 @@ namespace Edu.Model.ViewModel.Sell
/// 同行电话 /// 同行电话
/// </summary> /// </summary>
public string CustomerTel { get; set; } public string CustomerTel { get; set; }
/// <summary>
/// 业务员
/// </summary>
public string QEnterIds { get; set; }
} }
} }
\ No newline at end of file
...@@ -695,14 +695,14 @@ namespace Edu.Module.Customer ...@@ -695,14 +695,14 @@ namespace Edu.Module.Customer
{nameof(RB_Student_Assist_Extend.AssistType),model.AssistType }, {nameof(RB_Student_Assist_Extend.AssistType),model.AssistType },
{nameof(RB_Student_Assist_Extend.AssistId),model.AssistId }, {nameof(RB_Student_Assist_Extend.AssistId),model.AssistId },
}; };
if (oldModel.AssistId != model.AssistId) if (oldModel!=null&&oldModel.AssistId != model.AssistId)
{ {
logContent += string.Format("修改协同人员:【0】=>【{1}】", logContent += string.Format("修改协同人员:【0】=>【{1}】",
empList?.FirstOrDefault(qitem => qitem.Id == (oldModel?.AssistId ?? 0))?.EmployeeName, empList?.FirstOrDefault(qitem => qitem.Id == (oldModel?.AssistId ?? 0))?.EmployeeName,
empList?.FirstOrDefault(qitem => qitem.Id == model.AssistId)?.EmployeeName empList?.FirstOrDefault(qitem => qitem.Id == model.AssistId)?.EmployeeName
); );
} }
if (oldModel.AssistType != model.AssistType) if (oldModel != null && oldModel.AssistType != model.AssistType)
{ {
logContent += string.Format("修改协同类型:【0】=>【{1}】", oldModel.AssistType.ToName(), model.AssistType.ToName()); logContent += string.Format("修改协同类型:【0】=>【{1}】", oldModel.AssistType.ToName(), model.AssistType.ToName());
} }
......
...@@ -7,6 +7,7 @@ using System.Text; ...@@ -7,6 +7,7 @@ using System.Text;
using System.Linq; using System.Linq;
using Edu.Model.ViewModel.Customer; using Edu.Model.ViewModel.Customer;
using Edu.Repository.Sell; using Edu.Repository.Sell;
using Edu.Model.ViewModel.Sell;
namespace Edu.Module.Customer namespace Edu.Module.Customer
{ {
...@@ -70,6 +71,13 @@ namespace Edu.Module.Customer ...@@ -70,6 +71,13 @@ namespace Edu.Module.Customer
EndDate = EndTime EndDate = EndTime
}); });
//订单列表
var orderList = orderRepository.GetOrderListRepository(new RB_Order_ViewModel()
{
QEnterIds=EmpIds,
StartTime=StartTime,
EndTime=EndTime,
});
List<object> dayList = new List<object>(); List<object> dayList = new List<object>();
for (var i = 0; i < days; i++) for (var i = 0; i < days; i++)
{ {
......
...@@ -76,6 +76,10 @@ namespace Edu.Repository.Sell ...@@ -76,6 +76,10 @@ namespace Edu.Repository.Sell
{ {
where += $@" and o.{nameof(RB_Order_ViewModel.EnterID)} ={demodel.EnterID}"; where += $@" and o.{nameof(RB_Order_ViewModel.EnterID)} ={demodel.EnterID}";
} }
if (!string.IsNullOrEmpty(demodel.QEnterIds))
{
where += $@" and o.{nameof(RB_Order_ViewModel.EnterID)} IN({demodel.EnterID}) ";
}
if (demodel.Dept_Id > 0) if (demodel.Dept_Id > 0)
{ {
where += $@" and o.{nameof(RB_Order_ViewModel.Dept_Id)} ={demodel.Dept_Id}"; where += $@" and o.{nameof(RB_Order_ViewModel.Dept_Id)} ={demodel.Dept_Id}";
...@@ -384,9 +388,7 @@ WHERE {where} ORDER BY {orderBy} ...@@ -384,9 +388,7 @@ WHERE {where} ORDER BY {orderBy}
{ {
where += $@" and o.{nameof(RB_Order_ViewModel.PreferPrice)} > (o.{nameof(RB_Order_ViewModel.Income)} - o.{nameof(RB_Order_ViewModel.Refund)} + o.{nameof(RB_Order_ViewModel.PlatformTax)} + o.{nameof(RB_Order_ViewModel.DiscountMoney)}) "; where += $@" and o.{nameof(RB_Order_ViewModel.PreferPrice)} > (o.{nameof(RB_Order_ViewModel.Income)} - o.{nameof(RB_Order_ViewModel.Refund)} + o.{nameof(RB_Order_ViewModel.PlatformTax)} + o.{nameof(RB_Order_ViewModel.DiscountMoney)}) ";
} }
} }
if (demodel.CustomerId > 0) if (demodel.CustomerId > 0)
{ {
where += $@" and o.{nameof(RB_Order_ViewModel.CustomerId)} ={demodel.CustomerId}"; where += $@" and o.{nameof(RB_Order_ViewModel.CustomerId)} ={demodel.CustomerId}";
...@@ -646,6 +648,7 @@ GROUP BY ClassId;"; ...@@ -646,6 +648,7 @@ GROUP BY ClassId;";
} }
#region 销售提成 #region 销售提成
/// <summary> /// <summary>
/// 查询所有款收齐的订单 /// 查询所有款收齐的订单
/// </summary> /// </summary>
...@@ -1121,20 +1124,6 @@ ORDER BY {orderBy} ...@@ -1121,20 +1124,6 @@ ORDER BY {orderBy}
return Get<RB_Order_ViewModel>(sql).ToList(); return Get<RB_Order_ViewModel>(sql).ToList();
} }
/// <summary>
/// 获取教育同业可返佣订单列表
/// </summary>
/// <param name="groupId"></param>
/// <returns></returns>
public List<RB_Order_ViewModel> GetEduB2BOrderCanSendCommissionList(int groupId, string dateStr)
{
string sql = $@"SELECT o.* FROM rb_order o
INNER JOIN rb_customer_balancedetail b on o.OrderId = b.OrderId
WHERE o.Group_Id ={groupId} and o.OrderState =1 and o.OrderSource =9 and o.PayState =1 and b.RebateType =1 and b.BalanceType =1 and b.BalanceState =2 and o.PayDate <='{dateStr} 23:59:59'
GROUP BY o.OrderId";
return Get<RB_Order_ViewModel>(sql).ToList();
}
#endregion #endregion
#region 业绩提成 #region 业绩提成
......
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