diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PurchasePrices/PurchasePriceSheetAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PurchasePrices/PurchasePriceSheetAppService.cs index 2321d2a0c..faf9e93ba 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PurchasePrices/PurchasePriceSheetAppService.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PurchasePrices/PurchasePriceSheetAppService.cs @@ -49,8 +49,8 @@ public class PurchasePriceSheetAppService : SfsBaseDataAppServiceBase CheckPurPriceAsync( string supplierCode, string itemCode) { bool result = false; - var entitys = await _repository.GetListAsync(p => p.SupplierCode == supplierCode && p.ItemCode == itemCode && p.SupplierCode == supplierCode, true).ConfigureAwait(false); - if (entitys.Count != 0) result = true; + var entitys = await _repository.GetListAsync(p => p.SupplierCode == supplierCode && p.ItemCode == itemCode).ConfigureAwait(false); + if (entitys.Count == 0) result = true; return result; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/PutawayNotes/PutawayNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/PutawayNotes/PutawayNoteAppService.cs index ff411e10a..951f8ef85 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/PutawayNotes/PutawayNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/PutawayNotes/PutawayNoteAppService.cs @@ -66,7 +66,7 @@ public class PutawayNoteAppService : throw new UserFriendlyException($"零件名称【{detail.ItemCode}】的订单明细行以关闭无法执行采购上架!"); } var isprice = await _purchasePriceSheetAppService.CheckPurPriceAsync(input.SupplierCode, detail.ItemCode).ConfigureAwait(false); - if (isClosed) + if (isprice) { throw new UserFriendlyException($"供应商【{input.SupplierCode}】零件名称【{detail.ItemCode}】无采购价格无法执行采购上架!"); }