/** * EC_OrderBLL.cs * * 功 能: 订单业务逻辑 * 类 名: EC_OrderBLL * * Ver 变更日期 负责人 变更内容 * ─────────────────────────────────── * V0.01 2013-4-24 13:19 吴崎均 初版 * V0.02 2013-4-26 9:53 吴崎均 修改NewOrder方法 增加订单收货方式参数 * V0.03 2013-4-27 14:21 吴崎均 增加批量修改订单状态方法 * V0.04 2013-4-28 11:00 吴崎均 修改NewOrder方法增加受理佣金参数使订单在新建时可以直接受理 * V0.05 2013-4-28 11:16 吴崎均 增加orderBasicDal几个方法的转调 * V0.06 2013-4-28 11:41 吴崎均 增加根据编号获取订单基本信息方法 * V0.07 2013-5-2 11:48 吴崎均 修改NewOrder方法增加秒杀订单编号使秒杀下单扣除秒杀数量能与下单同步进行,重载一般新建订单方法 * V0.08 2013-5-6 15:52 吴崎均 修改NewOrder方法增加参数“订单印刷参数对象” * V0.09 2013-5-27 9:52 吴崎均 增加方法:订单退款(OrderRefund) * * * * * */ using System; using System.Collections.Generic; using System.Linq; using System.Text; using AbstractFactory; using CY.IDAL; using CY.Model; using CY.Model.Pay; using System.Data.SqlClient; namespace CY.BLL.EC { /// /// 订单业务逻辑 /// public class EC_OrderBLL { IEC_OrderDAL _iEC_OrderDAL = null; IOA_CorporateClientsDAL _iIOA_CorporateClientsDAL = null; /// /// 初始化 /// public EC_OrderBLL() { _iEC_OrderDAL = Factory.GetDALByInterfaceName(DALInterface.IEC_OrderDAL) as IEC_OrderDAL; _iIOA_CorporateClientsDAL = Factory.GetDALByInterfaceName(DALInterface.IOA_CorporateClientsDAL) as IOA_CorporateClientsDAL; } /// /// 新建订单(全,含秒杀) /// /// 订单基础信息 /// 订单扩展信息 /// 交易单 /// 订单收货方式 /// 支付请求(可空) /// 订单受理佣金(传入值大于0时最后会调用受理订单进行受理) /// 秒杀业务编号(传入值大于0时会减少秒杀数量1) /// 订单印刷参数(选填) /// public bool NewOrder(EC_OrderBasic orderBasic, EC_OrderExtend orderExtend, Pay_TradingSingle tradingSingle, EC_AcceptWayByOrder acceptWayByOrder, Pay_Request payRequest = null, double commission = 0, int seckillId = 0, EC_OrderPrintParameter orderPrintParameter = null) { return _iEC_OrderDAL.NewOrder(orderBasic, orderExtend, tradingSingle, acceptWayByOrder, payRequest, commission, seckillId, orderPrintParameter); } /// /// 新建订单(全,含秒杀)批量 /// /// 订单基础信息 /// 订单扩展信息 /// 交易单 /// 订单收货方式 /// 支付请求(可空) /// 订单受理佣金(传入值大于0时最后会调用受理订单进行受理) /// 秒杀业务编号(传入值大于0时会减少秒杀数量1) /// 订单印刷参数(选填) /// public bool NewOrderpiliang(EC_OrderBasic orderBasic, EC_OrderExtend orderExtend, Pay_TradingSingle tradingSingle, EC_AcceptWayByOrder acceptWayByOrder, Pay_Request payRequest = null, double commission = 0, int seckillId = 0, EC_OrderPrintParameter orderPrintParameter = null) { return _iEC_OrderDAL.NewOrderpiliang(orderBasic, orderExtend, tradingSingle, acceptWayByOrder, payRequest, commission, seckillId, orderPrintParameter); } /// /// 新建订单(一般) /// /// 订单基础信息 /// 订单扩展信息 /// 交易单 /// 订单收货方式 /// 订单印刷参数 /// /// public bool NewOrder(EC_OrderBasic orderBasic, EC_OrderExtend orderExtend, Pay_TradingSingle tradingSingle, EC_AcceptWayByOrder acceptWayByOrder, EC_OrderPrintParameter orderPrintParameter) { return _iEC_OrderDAL.NewOrder(orderBasic, orderExtend, tradingSingle, acceptWayByOrder, orderPrintParameter); } /// /// 修改订单信息 /// /// 订单主信息 /// 订单扩展信息 /// 订单印刷选项 /// public bool UpdateOrderInfo(EC_OrderBasic orderBasic, EC_OrderExtend orderExtend, EC_OrderPrintParameter orderParam = null) { return _iEC_OrderDAL.UpdateOrderInfo(orderBasic, orderExtend, orderParam); } ///// ///// 修改订单状态 ///// ///// 状态编号 ///// 订单编号集合 ///// //public bool UpdataOrderState(int stateId, params int[] orderIds) //{ // return _iEC_OrderDAL.UpdataOrderState(stateId, orderIds); //} /// /// 更新订单支付状态 /// /// 订单编号 /// public bool UpdateOrderPayState(int orderId) { return _iEC_OrderDAL.UpdateOrderPayState(orderId); } /// /// 更新订单支付金额 /// /// 订单编号 /// 支付方式(-1:收款、1:付款) /// 支付请求 /// internal bool UpdateOrderPayedMoney(int orderId, int payWay, Pay_Request payRequest) { return _iEC_OrderDAL.UpdateOrderPayedMoney(orderId, payWay, payRequest); } /// /// 支付订单 /// /// 订单编号 /// 支付请求 /// 受理手续费 /// 外协金额 /// public bool PayOrder(int orderId, Pay_Request payRequest, double commission, decimal OutAllMoney = 0) { return _iEC_OrderDAL.PayOrder(orderId, payRequest, commission, OutAllMoney); } /// /// 受理订单 /// /// 订单编号 /// 受理佣金(受理订单时站方收取的服务费) /// public bool AcceptOrder(int orderId, double commission) { return _iEC_OrderDAL.AcceptOrder(orderId, commission); } /// /// 根据订单编号获取订单 /// /// 订单编号 /// public EC_OrderBasic GetOrderById(int orderId) { return _iEC_OrderDAL.GetOrderById(orderId); } /// /// 根据订单编号获取订单 /// /// 订单编号 /// public IEnumerable GetOrderByIds(string orderIds) { return _iEC_OrderDAL.GetOrderByIds(orderIds); } /// /// 订单退款 /// /// 要更新的订单状态 /// 支付请求 /// public bool OrderRefund(EC_OrderOperate orderOperate, params Pay_Request[] payRequests) { return _iEC_OrderDAL.OrderRefund(orderOperate, payRequests); } /// /// 后道,整单外协 /// /// /// /// /// /// /// public bool OutOrder(EC_OrderBasic orderBasic, EC_AcceptWayByOrder acceptWayByOrder, EC_OrderPrintParameter orderPrintParameter, EC_OrderOperate m_EC_OrderOperate, int? RelationTypeid, string orderIds) { return _iEC_OrderDAL.OutOrder(orderBasic, acceptWayByOrder, orderPrintParameter, m_EC_OrderOperate, RelationTypeid, orderIds); } /// /// 修改外协订单 /// /// /// /// /// public bool UpdateOutOrderInfo(EC_OrderBasic orderBasic, EC_OrderExtend orderExtend, EC_OrderPrintParameter orderParam = null) { return _iEC_OrderDAL.UpdateOutOrderInfo(orderBasic, orderExtend, orderParam); } /// /// 获取已支付订单的明细 /// /// public IEnumerable GetOrderListByFinish(Infrastructure.Query.Pagination pagination, string startDate, string endDate, string province, string city, string county) { return _iEC_OrderDAL.GetOrderListByFinish(pagination,startDate,endDate,province,city,county); } /// /// /// /// /// public OA_OrderWorkListRelation GetModelById(int orderid) { return _iEC_OrderDAL.GetModelById(orderid); } /// /// 修改 /// /// /// public bool OldUpdate(EC_OrderExtend model) { return _iEC_OrderDAL.OldUpdate(model); } /// /// 修改 /// /// /// public bool OldUpdateDelayTime(EC_OrderExtend model) { return _iEC_OrderDAL.OldUpdateDelayTime(model); } /// /// 修改 /// /// /// public bool OldUpdateProductionprogress(EC_OrderExtend model) { return _iEC_OrderDAL.OldUpdateProductionprogress(model); } /// /// 修改 /// /// /// public bool OldUpdateQuchudingdan(EC_OrderExtend model) { return _iEC_OrderDAL.OldUpdateQuchudingdan(model); } /// /// 修改 /// /// /// public bool OldUpdateKaipiaoshenqing(EC_OrderExtend model) { return _iEC_OrderDAL.OldUpdateKaipiaoshenqing(model); } /// /// 修改 /// /// /// /// public bool OldUpdateKaipiaoshenqings(EC_OrderExtend model,string ids) { return _iEC_OrderDAL.OldUpdateKaipiaoshenqings(model, ids); } /// /// 修改 /// /// /// /// public bool NewUpdateKaipiaoshenqings(EC_OrderExtend model) { return _iEC_OrderDAL.NewUpdateKaipiaoshenqings(model ); } /// /// 修改 /// /// /// /// public bool JujueKaipiaoshenqings(EC_OrderExtend model) { return _iEC_OrderDAL.JujueKaipiaoshenqings(model); } /// /// 修改 /// /// /// public bool OldUpdateKaipiaoqueren(EC_OrderExtend model) { return _iEC_OrderDAL.OldUpdateKaipiaoqueren(model); } /// /// 修改 /// /// /// public bool OldUpdateKehuqianshou(EC_OrderExtend model) { return _iEC_OrderDAL.OldUpdateKehuqianshou(model); } /// /// 获取收款提醒 /// /// public IEnumerable GetshoukuantixingList(Infrastructure.Query.Pagination pagination, Guid FirmId, string province, string city, string county, string CustomerTypeId, string CompanyName, string BusinessManagerId, string AccountManagerId) { return _iEC_OrderDAL.GetshoukuantixingList(pagination, FirmId, province, city, county, CustomerTypeId, CompanyName, BusinessManagerId, AccountManagerId); } /// /// 获取收款订单号集合 /// /// public IEnumerable GetshoukuantixingorderidList(Guid FirmId, string shoukuanshijian, string Paytime, string BuyerId) { return _iEC_OrderDAL.GetshoukuantixingorderidList( FirmId, shoukuanshijian, Paytime, BuyerId); } /// /// 获取绩效查询 /// /// public IEnumerable GetxiaoshouchaxunList(Infrastructure.Query.Pagination pagination, Guid FirmId, string province, string city, string county, string DegreeImportanId, string CompanyName, string BusinessManagerId, string CreditId, string Shifouwanjie , string selLastOrderTime, string selOrderCount, string selOrderMoney, string OrderCount, string OrderMoney, string LastOrderTime) { return _iEC_OrderDAL.GetxiaoshouchaxunList(pagination, FirmId, province, city, county, DegreeImportanId, CompanyName, BusinessManagerId, CreditId, Shifouwanjie , selLastOrderTime, selOrderCount, selOrderMoney, OrderCount, OrderMoney, LastOrderTime); } /// /// 获取业绩查询 /// /// public IEnumerable GetxiaoshouyejiList(Infrastructure.Query.Pagination pagination, Guid FirmId, string BusinessManagerId, string chaxuntime) { return _iEC_OrderDAL.GetxiaoshouyejiList(pagination, FirmId, BusinessManagerId, chaxuntime); } /// /// 获取业绩查询 /// /// public IEnumerable GetyewurenportList(Infrastructure.Query.Pagination pagination, Guid FirmId, string BusinessManagerId, string chaxuntimestart, string chaxuntimeend) { return _iEC_OrderDAL.GetyewurenportList(pagination, FirmId, BusinessManagerId, chaxuntimestart, chaxuntimeend); } } }