/// <summary> /// 根据订单系统编号取得订单信息 /// </summary> /// <param name="soSysNo">订单系统编号</param> /// <returns>订单信息</returns> public virtual SOInfo GetSOBySOSysNo(int soSysNo) { SOInfo soInfo = SODA.GetSOBySOSysNo(soSysNo); if (soInfo != null) { List <SOInfo> soList = new List <SOInfo>(); soList.Add(soInfo); FillSOInfo(soList); SetInventoryQuantity(soInfo); SetItemsStockName(soInfo.Items); //SetItemsSHDSysNo(soInfo.Items); SetItemOutStockInfo(soInfo); soInfo.BaseInfo.CustomerPoint = ExternalDomainBroker.GetCustomerValidPoint(soInfo.BaseInfo.CustomerSysNo.Value); List <string> numberList = SODA.TrackingNumberBySoSysno(soSysNo); if (numberList != null && numberList.Count > 0) { soInfo.ShippingInfo.TrackingNumberStr = numberList.Join(","); } } return(soInfo); }
private void SuccessfulGroupBuyProcess(GroupBuyingInfo gbInfo) { List <SOItemInfo> GroupBuyItemList = SODA.GetGroupBuySOItemByGroupBuySysNo(gbInfo.SysNo.Value); SOProcessor soProcessor = ObjectFactory <SOProcessor> .Instance; foreach (SOItemInfo groupBuyItem in GroupBuyItemList) { //更新订单 try { //修改团购商品价格 SOInfo soInfo = SODA.GetSOBySOSysNo(groupBuyItem.SOSysNo.Value); soProcessor.ProcessSO(new SOAction.SOCommandInfo { Command = SOAction.SOCommand.Job, SOInfo = soInfo, Parameter = new object[] { groupBuyItem.ProductSysNo } }); } catch (Exception ex) { SODA.UpdateGroupBuySOAndItemSettlementStatus(groupBuyItem.SOSysNo.Value, groupBuyItem.ProductSysNo.Value, SettlementStatus.Fail); ExceptionHelper.HandleException(ex); continue; } } ExternalDomainBroker.UpdateGroupBuySettlementStatus(gbInfo.SysNo.Value, GroupBuyingSettlementStatus.Yes); }