| | |
| | | using Model.ModelVm.SysVm; |
| | | using System.Threading.Tasks; |
| | | using Utility; |
| | | using WMS.Entity.Context; |
| | | |
| | | namespace WMS.BLL.SysServer |
| | | { |
| | | public class PackagServer : IPackagServer |
| | | { |
| | | public IPackagRepository PackagRst { get; set; } |
| | | public IMaterialsServer materials { get; set; } |
| | | private static readonly SqlSugarScope Db = DataContext.Db; |
| | | |
| | | public PackagServer(IPackagRepository packagRst) |
| | | { |
| | |
| | | { |
| | | throw Oops.Bah("包装信息不存在!"); |
| | | } |
| | | var modMaterial = await Db.Queryable<SysMaterials>().FirstAsync(a => a.IsDel == "0" && a.PackagNo == packagItems.PackagNo); |
| | | if (modMaterial != null) |
| | | { |
| | | throw Oops.Bah("存在正在使用此包装的物料!"); |
| | | } |
| | | |
| | | packagItems.IsDel = "1"; |
| | | packagItems.UpdateTime = DateTime.Now; |