Commit 776bbbed authored by 黄奎's avatar 黄奎

页面修改

parent 05403aa7
...@@ -588,34 +588,36 @@ namespace Edu.Module.Course ...@@ -588,34 +588,36 @@ namespace Edu.Module.Course
//默认上课时间 //默认上课时间
var defaultPlanTimeList = new List<ClassTimeItem>(); var defaultPlanTimeList = new List<ClassTimeItem>();
var BasicMinutes = class_ConfigRepository.GetBasicMinutesRepository(model.Group_Id); var BasicMinutes = class_ConfigRepository.GetBasicMinutesRepository(model.Group_Id);
foreach (var tItem in model.DefaultTimeList) if (model.DefaultTimeList != null && model.DefaultTimeList.Count > 0)
{ {
ClassTimeItem tModel = new ClassTimeItem() foreach (var tItem in model.DefaultTimeList)
{ {
DateList = new List<string>(), ClassTimeItem tModel = new ClassTimeItem()
TimeList = new List<TimeItem>()
};
tModel.DateList = tItem.DateList;
foreach (var subItem in tItem.TimeList)
{
var startDate = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd") + " " + subItem.StartTime + ":00");
var endDate = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd") + " " + subItem.EndTime + ":00");
TimeSpan span = endDate.Subtract(startDate);
var timeModel = new TimeItem()
{ {
StartTime = subItem.StartTime, DateList = new List<string>(),
EndTime = subItem.EndTime, TimeList = new List<TimeItem>()
TimeHour = subItem.TimeHour,
}; };
if (timeModel.TimeHour <= 0) tModel.DateList = tItem.DateList;
foreach (var subItem in tItem.TimeList)
{ {
timeModel.TimeHour = Convert.ToDecimal(span.TotalMinutes / BasicMinutes); var startDate = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd") + " " + subItem.StartTime + ":00");
var endDate = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd") + " " + subItem.EndTime + ":00");
TimeSpan span = endDate.Subtract(startDate);
var timeModel = new TimeItem()
{
StartTime = subItem.StartTime,
EndTime = subItem.EndTime,
TimeHour = subItem.TimeHour,
};
if (timeModel.TimeHour <= 0)
{
timeModel.TimeHour = Convert.ToDecimal(span.TotalMinutes / BasicMinutes);
}
tModel.TimeList.Add(timeModel);
defaultPlanTimeList.Add(tModel);
} }
tModel.TimeList.Add(timeModel);
defaultPlanTimeList.Add(tModel);
} }
} }
#endregion #endregion
if (model.Teacher_Id > 0 && model.ClassRoomId > 0) if (model.Teacher_Id > 0 && model.ClassRoomId > 0)
{ {
......
This diff is collapsed.
...@@ -401,7 +401,8 @@ namespace Edu.Module.Course ...@@ -401,7 +401,8 @@ namespace Edu.Module.Course
DeductionMoney = DeductionMoney, DeductionMoney = DeductionMoney,
OpenBonus = IsOpenOrder > 0 ? item.OpenBonus : 0, OpenBonus = IsOpenOrder > 0 ? item.OpenBonus : 0,
ClueNum = ClueCount, ClueNum = ClueCount,
ClueNumSalary = ClueCount > 5 ? item.ClueNumSalary : 0, //HK 03-21注释掉线索奖金
//ClueNumSalary = ClueCount > 5 ? item.ClueNumSalary : 0,
IsIssue = 0 IsIssue = 0
}; };
pModel.IsReach = pModel.CurOrderMoney > item.MonthGoalMoney ? 1 : 0; pModel.IsReach = pModel.CurOrderMoney > item.MonthGoalMoney ? 1 : 0;
......
...@@ -1615,81 +1615,6 @@ namespace Edu.Module.Course ...@@ -1615,81 +1615,6 @@ namespace Edu.Module.Course
return flag; return flag;
} }
/// <summary>
/// 更新订单提成比例
/// </summary>
/// <returns></returns>
public bool UpdateClassOrderCommissionRate()
{
var orderList = orderRepository.GetOrderListRepository(new RB_Order_ViewModel() { Group_Id = 100000, OrderType = OrderTypeEnum.CourseOrder, Q_OrderState = 1 });
foreach (var item in orderList)
{
//根据班级查询课程
var classModel = classRepository.GetEntity(item.ClassId);
#region 计算订单优惠信息
//获取课程优惠
var coursePreferentialList = course_PreferentialRepository.GetCoursePreferentialListRepostory(new RB_Course_Preferential_Extend()
{
CourseId = classModel.CouseId
});
//课程优惠信息
RB_Course_Preferential_Extend coursePreferentialModel = null;
if (coursePreferentialList != null && coursePreferentialList.Count > 0)
{
if (item.RenewOrderId > 0 && coursePreferentialList.Where(x => x.PriceDiscountType == CoursePriceDiscountEnum.Renewal).Any())
{
coursePreferentialModel = coursePreferentialList?.Where(qitem => qitem.PriceDiscountType == CoursePriceDiscountEnum.Renewal)?.FirstOrDefault();
}
if (coursePreferentialModel == null)
{
if (item.GuestNum == 1)
{
coursePreferentialModel = coursePreferentialList?.Where(qitem => qitem.PriceDiscountType == CoursePriceDiscountEnum.SingleJoin)?.FirstOrDefault();
}
if (item.GuestNum >= 2)
{
coursePreferentialModel = coursePreferentialList?.Where(qitem => qitem.PriceDiscountType == CoursePriceDiscountEnum.DoubleJoin)?.FirstOrDefault();
}
}
if (coursePreferentialModel == null)
{
//随便取一个了
coursePreferentialModel = coursePreferentialList.FirstOrDefault();
}
#region 记录提成信息
item.CommissionType = coursePreferentialModel?.SaleCommissionType ?? 0;
item.CommissionRate = coursePreferentialModel?.SaleCommissionMoney ?? 0;
item.CommissionTypeTH = coursePreferentialModel?.B2BCommissionType ?? 0;
item.CommissionRateTH = coursePreferentialModel?.B2BCommissionMoney ?? 0;
if (coursePreferentialModel != null)
{
item.CommissionRemark = "初始化使用优惠Id:" + coursePreferentialModel.Id + " 返佣类型:" + item.CommissionType + " 返佣比例/金额:" + item.CommissionRate + " 同行返佣类型:" + item.CommissionTypeTH + " 同行返佣比例/金额:" + item.CommissionRateTH;
}
Dictionary<string, object> keyValues = new Dictionary<string, object>() {
{ nameof(RB_Order_ViewModel.CommissionType),item.CommissionType},
{ nameof(RB_Order_ViewModel.CommissionRate),item.CommissionRate},
{ nameof(RB_Order_ViewModel.CommissionTypeTH),item.CommissionTypeTH},
{ nameof(RB_Order_ViewModel.CommissionRateTH),item.CommissionRateTH},
{ nameof(RB_Order_ViewModel.CommissionRemark),item.CommissionRemark},
};
List<WhereHelper> wheres = new List<WhereHelper>() {
new WhereHelper(){
FiledName=nameof(RB_Order_ViewModel.OrderId),
FiledValue=item.OrderId,
OperatorEnum=OperatorEnum.Equal
}
};
orderRepository.Update(keyValues, wheres);
#endregion
}
#endregion
}
return true;
}
/// <summary> /// <summary>
/// 留学就业下单 /// 留学就业下单
/// </summary> /// </summary>
...@@ -1883,8 +1808,6 @@ namespace Edu.Module.Course ...@@ -1883,8 +1808,6 @@ namespace Edu.Module.Course
}); });
} }
#endregion #endregion
//flag = false;
return flag; return flag;
} }
......
This diff is collapsed.
...@@ -822,6 +822,14 @@ namespace Edu.Module.EduTask ...@@ -822,6 +822,14 @@ namespace Edu.Module.EduTask
}; };
flag = contribute_InfoRepository.Update(fileds1, new WhereHelper(nameof(RB_Contribute_Info_ViewModel.Id), model.RelationId)); flag = contribute_InfoRepository.Update(fileds1, new WhereHelper(nameof(RB_Contribute_Info_ViewModel.Id), model.RelationId));
} }
if (model != null && model.ReceiptType == Common.Enum.Finance.ReceiptTypeEnum.VipCourse)
{
Dictionary<string, object> fileds1 = new Dictionary<string, object>()
{
{nameof(RB_Course_Vip_Extend.AuditStatus),(int)Common.Enum.WeChat.ContributeInfoStateEnum.Reject}
};
flag = course_VipRepository.Update(fileds1, new WhereHelper(nameof(RB_Course_Vip_Extend.Id), model.RelationId));
}
} }
return flag; return flag;
} }
...@@ -1084,8 +1092,6 @@ namespace Edu.Module.EduTask ...@@ -1084,8 +1092,6 @@ namespace Edu.Module.EduTask
}; };
flag = education_ReceiptRepository.Update(fileds, new WhereHelper(nameof(RB_Education_Receipt_ViewModel.Id), receipt.Id)); flag = education_ReceiptRepository.Update(fileds, new WhereHelper(nameof(RB_Education_Receipt_ViewModel.Id), receipt.Id));
flag = UpdateOtherModule(receipt, auditModel, user); flag = UpdateOtherModule(receipt, auditModel, user);
} }
//审核通过 //审核通过
else else
...@@ -1512,6 +1518,7 @@ namespace Edu.Module.EduTask ...@@ -1512,6 +1518,7 @@ namespace Edu.Module.EduTask
} }
} }
//订单转班
if (receiptModel.ReceiptType == Common.Enum.Finance.ReceiptTypeEnum.OrderTransClass) if (receiptModel.ReceiptType == Common.Enum.Finance.ReceiptTypeEnum.OrderTransClass)
{ {
if (auditModel.AuditStatus == 2) if (auditModel.AuditStatus == 2)
...@@ -1523,6 +1530,7 @@ namespace Edu.Module.EduTask ...@@ -1523,6 +1530,7 @@ namespace Edu.Module.EduTask
student_BackClassRepository.UpdateGuestStateRepository(receiptModel, auditModel); student_BackClassRepository.UpdateGuestStateRepository(receiptModel, auditModel);
} }
} }
//订单分拆
if (receiptModel.ReceiptType == Common.Enum.Finance.ReceiptTypeEnum.OrderSplitClass) if (receiptModel.ReceiptType == Common.Enum.Finance.ReceiptTypeEnum.OrderSplitClass)
{ {
if (auditModel.AuditStatus == 2) if (auditModel.AuditStatus == 2)
...@@ -1534,6 +1542,7 @@ namespace Edu.Module.EduTask ...@@ -1534,6 +1542,7 @@ namespace Edu.Module.EduTask
//student_BackClassRepository.UpdateGuestStateRepository(receiptModel, auditModel); //student_BackClassRepository.UpdateGuestStateRepository(receiptModel, auditModel);
} }
} }
//学生请假
if (receiptModel.ReceiptType == Common.Enum.Finance.ReceiptTypeEnum.LeaveClass) if (receiptModel.ReceiptType == Common.Enum.Finance.ReceiptTypeEnum.LeaveClass)
{ {
if (auditModel.AuditStatus == 2) if (auditModel.AuditStatus == 2)
...@@ -1541,6 +1550,7 @@ namespace Edu.Module.EduTask ...@@ -1541,6 +1550,7 @@ namespace Edu.Module.EduTask
studentLeaveRepository.UpdateStundetLeave(receiptModel.Id, user.Id); studentLeaveRepository.UpdateStundetLeave(receiptModel.Id, user.Id);
} }
} }
//组卷
if (receiptModel.ReceiptType == Common.Enum.Finance.ReceiptTypeEnum.ZuJuan) if (receiptModel.ReceiptType == Common.Enum.Finance.ReceiptTypeEnum.ZuJuan)
{ {
if (auditModel.AuditStatus == 2) if (auditModel.AuditStatus == 2)
...@@ -1562,6 +1572,7 @@ namespace Edu.Module.EduTask ...@@ -1562,6 +1572,7 @@ namespace Edu.Module.EduTask
flag = examination_PaperRepository.Update(fileds, new WhereHelper(nameof(RB_Examination_Paper_ViewModel.PaperId), receiptModel.RelationId)); flag = examination_PaperRepository.Update(fileds, new WhereHelper(nameof(RB_Examination_Paper_ViewModel.PaperId), receiptModel.RelationId));
} }
} }
//考试申请
if (receiptModel.ReceiptType == Common.Enum.Finance.ReceiptTypeEnum.ExamApply) if (receiptModel.ReceiptType == Common.Enum.Finance.ReceiptTypeEnum.ExamApply)
{ {
if (auditModel.AuditStatus == 2) if (auditModel.AuditStatus == 2)
...@@ -1583,6 +1594,7 @@ namespace Edu.Module.EduTask ...@@ -1583,6 +1594,7 @@ namespace Edu.Module.EduTask
} }
} }
//投稿
if (receiptModel.ReceiptType == Common.Enum.Finance.ReceiptTypeEnum.Contribute) if (receiptModel.ReceiptType == Common.Enum.Finance.ReceiptTypeEnum.Contribute)
{ {
if (auditModel.AuditStatus == 2) if (auditModel.AuditStatus == 2)
...@@ -1608,6 +1620,30 @@ namespace Edu.Module.EduTask ...@@ -1608,6 +1620,30 @@ namespace Edu.Module.EduTask
} }
} }
//vip课程申请
if (receiptModel.ReceiptType == Common.Enum.Finance.ReceiptTypeEnum.VipCourse)
{
if (auditModel.AuditStatus == 2)
{
Dictionary<string, object> fileds = new Dictionary<string, object>()
{
{nameof(RB_Course_Vip_Extend.AuditStatus),(int)EduTaskRrocessStatus.AuditThrough},
};
flag = course_VipRepository.Update(fileds, new WhereHelper(nameof(RB_Course_Vip_Extend.Id), receiptModel.RelationId));
var model = course_VipRepository.GetEntity(receiptModel.RelationId);
UserInfo userInfo = UserReidsCache.GetUserLoginInfo(model.CreateBy);
//申请转订单
new CourseVipModule().SetCourseVipToOrderModule(model, userInfo);
}
if (auditModel.AuditStatus == 3)
{
Dictionary<string, object> fileds = new Dictionary<string, object>()
{
{nameof(RB_Course_Vip_Extend.AuditStatus),(int)EduTaskRrocessStatus.Rejected}
};
flag = course_VipRepository.Update(fileds, new WhereHelper(nameof(RB_Course_Vip_Extend.Id), receiptModel.RelationId));
}
}
return flag; return flag;
} }
......
using Edu.Model.Entity.Course; using Edu.Common.Enum.Course;
using Edu.Common.Enum.Sale;
using Edu.Common.Plugin;
using Edu.Model.CacheModel;
using Edu.Model.Entity.Course;
using Edu.Model.ViewModel.Course; using Edu.Model.ViewModel.Course;
using Edu.Model.ViewModel.Scroll;
using Edu.Model.ViewModel.Sell;
using Edu.Repository.Scroll;
using Edu.Repository.Sell;
using Edu.Repository.User;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
......
...@@ -13,6 +13,9 @@ using VT.FW.DB.Dapper; ...@@ -13,6 +13,9 @@ using VT.FW.DB.Dapper;
namespace Edu.Repository.Sell namespace Edu.Repository.Sell
{ {
/// <summary>
/// 订单返佣记录仓储层
/// </summary>
public class RB_Order_ReturnComissionRepository : BaseRepository<RB_Order_ReturnComission> public class RB_Order_ReturnComissionRepository : BaseRepository<RB_Order_ReturnComission>
{ {
/// <summary> /// <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