using MailKit; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using WIDESEA_Core; using WIDESEA_Core.Enums; using WIDESEA_StorageBasicRepository; namespace WIDESEA_StoragIntegrationServices { public partial class WCSService { public WebResponseContent ManualOutboundTask(string barcode, string targetAddress) { WebResponseContent content = new WebResponseContent(); try { var wheelsInfo = _wheelsStockRepository.QueryFirst(x => x.Wheels_code == barcode); if (wheelsInfo == null) throw new Exception("未找到库存信息"); var locationInfo = _locationRepository.QueryFirst(x => x.LocationCode == wheelsInfo.Wheels_Location); if (locationInfo.LocationStatus == (int)LocationEnum.Lock) throw new Exception("库位锁定,禁止出库"); return content.OK(); } catch (Exception ex) { return content.Error($"指定出库异常{ex.Message}"); } } } }