public void GetSOInfoList() { List <int> soSysNoList = new List <int>(); soSysNoList.AddRange(new int[] { 26468272, 34458514, 34363058, 34728751 }); List <SOInfo> infoList = new SOProcessor().GetSOBySOSysNoList(soSysNoList); }
private void OutStock(string ssbMessage) { SOShippedEntity shippedInfo = ECCentral.Service.Utility.SerializationUtility.XmlDeserialize <SOShippedEntity>(ssbMessage); if (shippedInfo == null || shippedInfo.Node == null || shippedInfo.Node.RequestRoot == null || shippedInfo.Node.RequestRoot.Body == null || shippedInfo.Node.RequestRoot.Body.ShipOrderMsg == null || shippedInfo.Node.RequestRoot.Body.ShipOrderMsg.SalesOrder == null) { return; } SOProcessor processor = ObjectFactory <SOProcessor> .Instance; foreach (SalesOrderInfo soMsg in shippedInfo.Node.RequestRoot.Body.ShipOrderMsg.SalesOrder) { SOInfo soInfo = processor.GetSOBySOSysNo(soMsg.SONumber); soMsg.InUser = shippedInfo.Node.RequestRoot.Body.ShipOrderMsg.InUser; soMsg.CompanyCode = shippedInfo.Node.RequestRoot.MessageHead.CompanyCode; processor.ProcessSO(new SOAction.SOCommandInfo { SOInfo = soInfo, Command = SOAction.SOCommand.OutStock, Parameter = new object[] { soMsg } }); } }
public void WriteSOLog() { SOInfo soInfo = new SOProcessor().GetSOBySOSysNo(34363058);//组合销售Mapping测试 new SOLogProcessor().WriteSOLog( ECCentral.BizEntity.Common.BizLogType.Sale_SO_Audit, "订单写日志测试", soInfo); }
public void Test_SO_SendEmail() { SOInfo soInfo = new SOProcessor().GetSOBySOSysNo(10039652); SOSendMessageProcessor SOMailBiz = new SOSendMessageProcessor(); SOMailBiz.SOAuditedSendEmailToCustomer(soInfo); }
public void Test_MKT_CalculateSOPromotion() { int soSysNo = 34728751; // 附件Mapping测试 SOInfo soInfo = new SOProcessor().GetSOBySOSysNo(soSysNo); soInfo.CouponCode = "9VXU2YFXW7"; //PromotionCalculateAppService appservice = new PromotionCalculateAppService(); //appservice.CalculateSOPromotion(soInfo); }
public int NewSOSysNo() { SOProcessor processor = ObjectFactory <SOProcessor> .Instance; return(processor.NewSOSysNo()); }
public int GetShiftSysNoBySOSysNo(int soSysNo) { SOProcessor processor = ObjectFactory <SOProcessor> .Instance; return(processor.GetShiftSysNoBySOSysNo(soSysNo)); }
//public int GetSOCustomerSysNo(int soSysNo) //{ // throw new NotImplementedException(); //} public bool ExistSO(int soSysNo) { SOProcessor processor = ObjectFactory <SOProcessor> .Instance; return(processor.GetSOBaseInfoBySOSysNo(soSysNo) != null); }
public SOInfo GetSOInfo(int soSysNo) { SOProcessor processor = ObjectFactory <SOProcessor> .Instance; return(processor.GetSOBySOSysNo(soSysNo)); }
public List <SOBaseInfo> GetSOBaseInfoList(List <int> soSysNoList) { SOProcessor processor = ObjectFactory <SOProcessor> .Instance; return(processor.GetSOBaseInfoBySOSysNoList(soSysNoList)); }
public List <SOItemInfo> GetSOItemList(int soSysNo) { SOProcessor processor = ObjectFactory <SOProcessor> .Instance; return(processor.GetSOItemsBySOSysNo(soSysNo)); }
/// <summary> /// 根据订单中的商品编号取得此商品的赠品列表 /// </summary> /// <param name="soSysNo">订单编号</param> /// <param name="productSysNo">商品编号</param> /// <returns>赠品列表</returns> public List <SOItemInfo> GetGiftBySOProductSysNo(int soSysNo, int productSysNo) //IPP3:OverseaOrderManagement].[dbo].[UP_OM_GetGiftInfo] { SOProcessor processor = ObjectFactory <SOProcessor> .Instance; SOBaseInfo soBaseInfo = processor.GetSOBaseInfoBySOSysNo(soSysNo); List <SOItemInfo> giftList = new List <SOItemInfo>(); if (soBaseInfo.SOType != SOType.Gift) { List <SOInfo> soList = null; List <int> soSysNoList = new List <int>(); if (soBaseInfo.Status == SOStatus.Split) { soList = processor.GetSubSOByMasterSOSysNo(soSysNo); } else { soSysNoList.Add(soSysNo); } soList = soList ?? new List <SOInfo>(); // 如果订单的赠品(指购买订单,送给客户的商品,但此商品并没有一起同订单发给客户,请与赠品规则的赠品,厂商赠品,附件相区分。),且赠品已经下单,则取得订单的赠品的订单编号 List <SOLogInfo> logList = new List <SOLogInfo>(); if (soList.Count > 0) { soList.ForEach(so => { List <SOLogInfo> t = ObjectFactory <SOLogProcessor> .Instance.GetSOLogBySOSysNoAndLogType(soSysNo, BizEntity.Common.BizLogType.Sale_SO_CreateGiftSO); if (t != null && t.Count > 0) { logList.AddRange(t); } }); } if (logList.Count > 0) { logList.ForEach(l => { int no = int.TryParse(l.Note, out no) ? no : 0; if (no != 0) { soSysNoList.Add(no); } }); } var tso = processor.GetSOBySOSysNoList(soSysNoList); if (tso != null && tso.Count > 0) { soList.AddRange(tso); } soList.ForEach(so => { List <SOItemInfo> tgList = null; if (so.BaseInfo.SOType == SOType.Gift) { tgList = (from item in so.Items where String.Format(",{0},", item.MasterProductSysNo).IndexOf(String.Format(",{0},", productSysNo)) >= 0 select item).ToList(); } else { List <SOPromotionInfo.GiftInfo> gList = (from p in so.SOPromotions from pd in p.SOPromotionDetails from g in p.GiftList where pd.MasterProductSysNo == productSysNo && (p.PromotionType == SOPromotionType.Accessory || p.PromotionType == SOPromotionType.SelfGift || p.PromotionType == SOPromotionType.VendorGift) select g).ToList(); tgList = (from item in so.Items join g in gList on item.ProductSysNo equals g.ProductSysNo select item).ToList(); } if (tgList != null && tgList.Count > 0) { giftList.AddRange(tgList); } }); } return(giftList); }
public SOAppService() { soProcessor = ObjectFactory <SOProcessor> .Instance; }