Ejemplo n.º 1
0
        /// <summary>
        /// 直接锁住订单
        /// </summary>
        /// <param name="soBaseInfo"></param>
        /// <returns></returns>
        public virtual void DirectHoldSO()
        {
            CurrentSO.BaseInfo.HoldStatus = SOHoldStatus.BackHold;
            CurrentSO.BaseInfo.HoldTime   = DateTime.Now;
            CurrentSO.BaseInfo.HoldUser   = ServiceContext.Current.UserSysNo;

            //  1.  锁定订单操作
            SODA.UpdateSOHoldInfo(CurrentSO.BaseInfo);

            //  2.  添加订单操作日志
            WriteLog(ECCentral.BizEntity.Common.BizLogType.Sale_SO_HoldSO, "订单锁定");
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 订单解锁
        /// </summary>
        /// <param name="soBaseInfo">订单基本信息</param>
        /// <param name="reason">解锁原因</param>
        internal virtual void Unhold(SOUnholdReason reason)
        {
            //  1.  解锁前的业务检查
            UnholdPreCheck(reason);

            CurrentSO.BaseInfo.HoldTime   = DateTime.Now;
            CurrentSO.BaseInfo.HoldStatus = SOHoldStatus.Unhold;
            CurrentSO.BaseInfo.HoldUser   = ServiceContext.Current.UserSysNo;
            //  2.  保存订单解锁
            SODA.UpdateSOHoldInfo(CurrentSO.BaseInfo);
            //  3.  添加订单更改日志,通知WMS重新Download订单
            ObjectFactory <SOLogProcessor> .Instance.WriteSOChangeLog(new SOChangeLog
            {
                ChangeTime    = DateTime.Now,
                ChangeType    = 3,
                CompanyCode   = CurrentSO.CompanyCode,
                CustomerSysNo = CurrentSO.BaseInfo.CustomerSysNo.Value,
                Guid          = Guid.NewGuid(),
                SOSysNo       = SOSysNo,
            });

            //  4.  订单操作日志
            WriteLog(BizEntity.Common.BizLogType.Sale_SO_UnHoldSO, "取消锁定");
        }