Esempio n. 1
0
 /// <summary> 设置订单支付状态
 /// </summary>
 /// <param name="saleFilialeId"></param>
 /// <param name="orderId"></param>
 /// <param name="payState"></param>
 public static void SetOrderPayState(Guid saleFilialeId, Guid orderId, PayState payState)
 {
     using (var client = ClientProxy.CreateB2CWcfClient(saleFilialeId))
     {
         client.Instance.SetOrderPayState(Guid.NewGuid(), orderId, (Int32)payState);
     }
 }
Esempio n. 2
0
 public static void GoodsOrderUpdateAffirm(Guid saleFilialeId, GoodsOrderInfo goodsOrderInfo)
 {
     using (var client = ClientProxy.CreateB2CWcfClient(saleFilialeId))
     {
         client.Instance.GoodsOrderUpdateAffirm(Guid.NewGuid(), ConvertToB2CModel(goodsOrderInfo));
     }
 }
Esempio n. 3
0
        public static List <DemandOrderInfo> GetGoodsOrdersByRealGoodsId(Guid saleFilialeId, Guid realGoodsId, Guid warehouseId)
        {
            using (var client = ClientProxy.CreateB2CWcfClient(saleFilialeId))
            {
                var result = client.Instance.GetGoodsOrdersByRealGoodsId(realGoodsId);

                return(result != null && result.IsSuccess && result.Data != null
                    ? result.Data.Where(act => act.DeliverWarehouseId == warehouseId).Select(act => new DemandOrderInfo
                {
                    OrderId = act.OrderId,
                    Phone = act.Phone,
                    RealTotalPrice = act.RealTotalPrice,
                    Mobile = act.Mobile,
                    OrderNo = act.OrderNo,
                    Consignee = act.Consignee,
                    Direction = act.Direction,
                    ExpressNo = act.ExpressNo,
                    PayMode = act.PayMode,
                    TotalPrice = act.TotalPrice,
                    Carriage = act.Carriage,
                    OrderState = act.OrderState,
                    Memo = act.Memo,
                    SaleFilialeId = act.SaleFilialeId,
                    DeliverWarehouseId = act.DeliverWarehouseId
                }).ToList()
                    : new List <DemandOrderInfo>());
            }
        }
Esempio n. 4
0
 /// <summary>更新B2C银行帐号为主账号
 /// </summary>
 /// <param name="saleFilialeId">销售公司ID</param>
 /// <param name="bankAccountsId">银行ID</param>
 /// <param name="IsMain">是否主账号</param>
 /// <returns></returns>
 public static Boolean SetBankAccountsIsMain(Guid saleFilialeId, Guid bankAccountsId, Boolean IsMain)
 {
     using (var client = ClientProxy.CreateB2CWcfClient(saleFilialeId))
     {
         return(client.Instance.UpdateIsMain(bankAccountsId, IsMain));
     }
 }
Esempio n. 5
0
 public static Dictionary <Guid, int> GetAllRequireQuantity(Guid saleFilialeId, List <Guid> realGoodsIds, Guid warehouseId)
 {
     using (var client = ClientProxy.CreateB2CWcfClient(saleFilialeId))
     {
         return(client.Instance.GetRequireAllQuantity(realGoodsIds, warehouseId));
     }
 }
Esempio n. 6
0
 /// <summary>改变发票状态
 /// </summary>
 /// <param name="saleFilialeId"></param>
 /// <param name="invoiceId"></param>
 /// <param name="invoiceState"></param>
 /// <param name="flag">true 更新订单表的发票状态和发票表的发票状态,false 只更新发票表的发票状态</param>
 /// <param name="clew"></param>
 public static void SetInvoiceState(Guid saleFilialeId, Guid invoiceId, InvoiceState invoiceState, Boolean flag, String clew)
 {
     using (var client = ClientProxy.CreateB2CWcfClient(saleFilialeId))
     {
         client.Instance.SetInvoiceState(Guid.NewGuid(), invoiceId, (Int32)invoiceState, flag, clew);
     }
 }
Esempio n. 7
0
 /// <summary>获取发票信息
 /// </summary>
 /// <param name="saleFilialeId"></param>
 /// <param name="orderId">订单ID</param>
 /// <returns></returns>
 public static B2C.Model.ERPExtensionModel.InvoiceInfo GetInvoiceInfo(Guid saleFilialeId, Guid orderId)
 {
     using (var client = ClientProxy.CreateB2CWcfClient(saleFilialeId))
     {
         return(client.Instance.GetInvoiceInfo(orderId));
     }
 }
Esempio n. 8
0
 /// <summary>是不是换货订单(完成订单时不插入销量)
 /// </summary>
 /// <param name="saleFilialeId"></param>
 /// <param name="orderId"></param>
 /// <returns></returns>
 public static bool IsRefundOrder(Guid saleFilialeId, Guid orderId)
 {
     //TODO:换货单不插入销量
     using (var client = ClientProxy.CreateB2CWcfClient(saleFilialeId))
     {
         return(client.Instance.IsRefundOrder(orderId));
     }
 }
Esempio n. 9
0
 /// <summary>可以从数据库中取出订单
 /// </summary>
 /// <param name="saleFilialeId"></param>
 /// <param name="orderId"></param>
 /// <returns></returns>
 public static GoodsOrderInfo GetGoodsOrderInfo(Guid saleFilialeId, Guid orderId)
 {
     using (var client = ClientProxy.CreateB2CWcfClient(saleFilialeId))
     {
         var goodsOrderInfoB2C = client.Instance.GetGoodsOrderInfo(orderId);
         goodsOrderInfoB2C = goodsOrderInfoB2C ?? new B2C.Model.ERPExtensionModel.GoodsOrderInfo();
         return(ConvertToERPModel(goodsOrderInfoB2C));
     }
 }
Esempio n. 10
0
        /// <summary>删除银行账户信息
        /// </summary>
        public static void BankAccountsDelete(Guid targetId, Guid bankAccountId)
        {
            var filialeId = GetFilialeIdBySalePlatform(targetId);

            using (var client = ClientProxy.CreateB2CWcfClient(filialeId))
            {
                client.Instance.BankAccountsDelete(Guid.NewGuid(), bankAccountId);
            }
        }
Esempio n. 11
0
 /// <summary>根据订单号获取B2C订单信息(会员余额管理确认用)
 /// </summary>
 /// <param name="saleFilialeId"></param>
 /// <param name="orderNo"></param>
 /// <returns></returns>
 public static B2C.Model.ERPExtensionModel.GoodsOrderInfo GetGoodsOrderInfoByOrderNo(Guid saleFilialeId, string orderNo)
 {
     using (var client = ClientProxy.CreateB2CWcfClient(saleFilialeId))
     {
         var result = client.Instance.GetGoodsOrderList(new List <string> {
             orderNo
         });
         return(result.IsSuccess ? result.Data.First() : null);
     }
 }
Esempio n. 12
0
        /// <summary> 删除绑定银行资金帐号
        /// </summary>
        /// <param name="targetId"></param>
        /// <param name="bankAccountId"></param>
        public static void RemoveBankAccountBinding(Guid targetId, Guid bankAccountId)
        {
            Guid filialeId  = GetFilialeIdBySalePlatform(targetId);
            var  pushDataId = Guid.NewGuid();

            using (var client = ClientProxy.CreateB2CWcfClient(filialeId))
            {
                client.Instance.RemoveBankAccountBinding(pushDataId, targetId, bankAccountId);
            }
        }
Esempio n. 13
0
        /// <summary>更新银行账户信息
        /// </summary>
        /// <param name="info"></param>
        public static void UpdateBankAccount(BankAccountInfo info)
        {
            var pushDataId = Guid.NewGuid();

            //var filialeId = GetFilialeIdBySalePlatform(info.TargetId);
            using (var client = ClientProxy.CreateB2CWcfClient(info.TargetId))
            {
                client.Instance.BankAccountsUpdate(pushDataId, ConvertToB2CModel(info));
            }
        }
Esempio n. 14
0
        /// <summary>修改订单支付状态(不插入异常数据)
        /// </summary>
        /// <param name="saleFilialeId"></param>
        /// <param name="orderId">订单id</param>
        /// <param name="payState">支付状态</param>
        /// <param name="state">GoodsOrderPayState订单状态</param>
        public static bool UpdatePayStateByOrderIdAndStateBool(Guid saleFilialeId, Guid orderId, PayState payState, GoodsOrderPayState state)
        {
            var pushDataId = Guid.NewGuid();

            using (var client = ClientProxy.CreateB2CWcfClient(saleFilialeId))
            {
                var result = client.Instance.UpdatePayStateByOrderIdAndState(pushDataId, orderId, (Int32)payState, (Int32)state);
                if (result == null || result.IsAccomplishExecuted == false)
                {
                    return(false);
                }
                return(true);
            }
        }
Esempio n. 15
0
 /// <summary>根据订单ID获取支付流水列表
 /// </summary>
 /// <param name="saleFilialeId"></param>
 /// <param name="orderid">订单ID</param>
 /// <returns></returns>
 public static IList <GoodsOrderPayInfo> GetGoodsOrderPayListByOrderId(Guid saleFilialeId, Guid orderid)
 {
     using (var client = ClientProxy.CreateB2CWcfClient(saleFilialeId))
     {
         var items = new List <GoodsOrderPayInfo>();
         var list  = client.Instance.GetGoodsOrderPayListByOrderId(orderid);
         if (list != null && list.Count > 0)
         {
             foreach (var info in list)
             {
                 items.Add(ConvertTo(info));
             }
         }
         return(items);
     }
 }
Esempio n. 16
0
 /// <summary>
 /// 根据第三方订单号获取订单信息
 /// </summary>
 /// <param name="saleFilialeId">销售公司</param>
 /// <param name="thirdOrderNo">第三方订单号</param>
 /// <returns></returns>
 /// zal 2017-11-06
 public static List <GoodsOrderInfo> GetGoodsOrderInfoByThirdOrderNo(Guid saleFilialeId, string thirdOrderNo)
 {
     using (var client = ClientProxy.CreateB2CWcfClient(saleFilialeId))
     {
         var goodsOrderInfoList = new List <GoodsOrderInfo>();
         var result             = client.Instance.GetGoodsOrderInfoByTid(thirdOrderNo);
         if (result != null && result.Count > 0)
         {
             foreach (var item in result)
             {
                 goodsOrderInfoList.Add(ConvertToERPModel(item));
             }
         }
         return(goodsOrderInfoList);
     }
 }