CheckStock.cs 1.0 KB

123456789101112131415161718192021222324252627282930
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace UFIDA.U9.Cust.Kusi.CJJ.Plugin.BPSV.ShipPickBarCodeSV
  7. {
  8. public class CheckStock : UFSoft.UBF.Service.BPSVExtendBase
  9. {
  10. public override void AfterDo(object bp, ref object result)
  11. {
  12. if (result is UFIDA.U9.ISV.Mobile.SM.ShipPickBarCodeResultDTOData dto && dto.DocBCInfo != null)
  13. {
  14. UFIDA.U9.SM.Ship.Ship doc = UFIDA.U9.SM.Ship.Ship.Finder.FindByID(dto.DocBCInfo.EntityKey);
  15. if (doc != null && doc.DescFlexField != null)
  16. {
  17. if (bool.TryParse(doc.DescFlexField.PrivateDescSeg5, out bool isCancel) && isCancel)
  18. {
  19. throw new Exception(String.Format("订单{0}已取消备货,不能进行出货操作", doc.DocNo));
  20. }
  21. }
  22. }
  23. }
  24. public override void BeforeDo(object bp)
  25. {
  26. }
  27. }
  28. }