using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace UFIDA.U9.Cust.Kusi.CJJ.Plugin.BPSV.ShipPickBarCodeSV { public class CheckStock : UFSoft.UBF.Service.BPSVExtendBase { public override void AfterDo(object bp, ref object result) { if (result is UFIDA.U9.ISV.Mobile.SM.ShipPickBarCodeResultDTOData dto && dto.DocBCInfo != null) { UFIDA.U9.SM.Ship.Ship doc = UFIDA.U9.SM.Ship.Ship.Finder.FindByID(dto.DocBCInfo.EntityKey); if (doc != null && doc.DescFlexField != null) { if (bool.TryParse(doc.DescFlexField.PrivateDescSeg5, out bool isCancel) && isCancel) { throw new Exception(String.Format("订单{0}已取消备货,不能进行出货操作", doc.DocNo)); } } } } public override void BeforeDo(object bp) { } } }