Commit fb2cd7d8 authored by liudong1993's avatar liudong1993

1

parent ceb95cdb
...@@ -19,5 +19,10 @@ namespace Edu.Model.ViewModel.Course ...@@ -19,5 +19,10 @@ namespace Edu.Model.ViewModel.Course
/// 报价单编号【查询使用】 /// 报价单编号【查询使用】
/// </summary> /// </summary>
public string QOfferIds { get; set; } public string QOfferIds { get; set; }
/// <summary>
/// 班级id
/// </summary>
public int ClassId { get; set; }
} }
} }
using Edu.AOP.CustomerAttribute; using Edu.AOP.CustomerAttribute;
using Edu.Model.ViewModel.Course; using Edu.Model.ViewModel.Course;
using Edu.Repository.Course; using Edu.Repository.Course;
using Edu.Repository.Log;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using VT.FW.DB; using VT.FW.DB;
...@@ -22,6 +23,22 @@ namespace Edu.Module.Course ...@@ -22,6 +23,22 @@ namespace Edu.Module.Course
/// </summary> /// </summary>
private readonly RB_Course_OfferDetailsRepository course_OfferDetailsRepository = new RB_Course_OfferDetailsRepository(); private readonly RB_Course_OfferDetailsRepository course_OfferDetailsRepository = new RB_Course_OfferDetailsRepository();
/// <summary>
/// 订单
/// </summary>
private readonly RB_OrderRepository orderRepository = new RB_OrderRepository();
/// <summary>
/// 订单备注
/// </summary>
private readonly RB_Order_RemarkRepository order_RemarkRepository = new RB_Order_RemarkRepository();
/// <summary>
/// 用户日志
/// </summary>
private readonly RB_User_ChangeLogRepository changeLogRepository = new RB_User_ChangeLogRepository();
/// <summary> /// <summary>
/// 获取报价单分页列表 /// 获取报价单分页列表
/// </summary> /// </summary>
...@@ -185,5 +202,27 @@ namespace Edu.Module.Course ...@@ -185,5 +202,27 @@ namespace Edu.Module.Course
var flag = course_OfferRepository.Update(fileds, new WhereHelper(nameof(RB_Course_Offer_ViewModel.Id), Id)); var flag = course_OfferRepository.Update(fileds, new WhereHelper(nameof(RB_Course_Offer_ViewModel.Id), Id));
return flag; return flag;
} }
#region 报价单创建订单
/// <summary>
/// 创建订单
/// </summary>
/// <param name="offerId"></param>
/// <param name="detailList"></param>
/// <returns></returns>
public bool SetOfferCreateOrder(int offerId, List<RB_Course_OfferDetails_ViewModel> detailList) {
foreach (var item in detailList) {
//decimal uPrice = item.OriginalPrice/item
int OrderId = orderRepository.Insert(new Model.Entity.Course.RB_Order()
{
ClassId=item.ClassId,
Class_Price=1
});
}
return true;
}
#endregion
} }
} }
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