/// <summary> /// 订单锁定前的检查 /// </summary> /// <param name="soInfo">订单信息</param> /// <param name="reason">订单锁定原因</param> private void HoldPreCheck(SOHoldReason reason) { switch (CurrentSO.BaseInfo.Status) { case SOStatus.Origin: CheckSOIsWebHold(); break; case SOStatus.Split: BizExceptionHelper.Throw("SO_Hold_SplitComplete"); break; case SOStatus.Abandon: BizExceptionHelper.Throw("SO_Hold_Abandoned"); break; case SOStatus.OutStock: BizExceptionHelper.Throw("SO_Hold_OutStock"); break; } if (reason != SOHoldReason.CancelAuditOrder && CurrentSO.BaseInfo.HoldStatus.Value == SOHoldStatus.BackHold) { BizExceptionHelper.Throw("SO_Hold_BackHold"); } // 检查是否出库 if (SODA.IsNeweggOutStock(SOSysNo)) { BizExceptionHelper.Throw("SO_Hold_OutStock"); } // 检查订单是否正在处理 if (ObjectFactory <IOPCDA> .Instance.SOIsProcess(SOSysNo)) { BizExceptionHelper.Throw("SO_Hold_IsAsyncHold"); } }