From cf241dcd562fc458cb7ebcd641aed5583bb4ef9d Mon Sep 17 00:00:00 2001 From: zhou keda <1315948824@qq.com> Date: Fri, 28 Jun 2024 16:27:30 +0800 Subject: [PATCH] bug --- ProductionMgr/Tnb.ProductionMgr/PrdFeedingService.cs | 10 +++++----- .../Tnb.ProductionMgr/PrdMaterialReceiptService.cs | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdFeedingService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdFeedingService.cs index 2e75fa17..9b35dae7 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdFeedingService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdFeedingService.cs @@ -501,8 +501,8 @@ namespace Tnb.ProductionMgr List dList = await db.Queryable() .Where(x => x.material_receipt_id == prdMaterialReceiptH.id).ToListAsync(); - foreach (var item in dList) - { + // foreach (var item in dList) + // { Tnb.WarehouseMgr.Entities.Dto.Outputs.Result result2 = await _wmsCarryUnbindService.CarryUnbind(new CarryBindInput() { org = prdFeedingH.org_id, @@ -510,15 +510,15 @@ namespace Tnb.ProductionMgr carry_id = prdMaterialReceiptH.carry_id, carry_code = prdMaterialReceiptH.carry_code, carrystd_id = carry.carrystd_id, - membercarry_code = item.member_carry_code, - membercarry_id = item.member_carry_id, + membercarry_code = "", + membercarry_id = "", }); if (result2.code != JNPF.Common.Enums.HttpStatusCode.OK) { throw Oops.Bah(result2.msg); } - } + // } await db.Updateable() .SetColumns(x => x.first_feed == true) diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdMaterialReceiptService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdMaterialReceiptService.cs index d63ddb33..2269b635 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdMaterialReceiptService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdMaterialReceiptService.cs @@ -104,7 +104,7 @@ namespace Tnb.ProductionMgr if (await db.Queryable() - .AnyAsync(x => x.member_carry_code == qrCode && x.is_all_feeding == 0)) + .AnyAsync(x => x.member_carry_code == qrCode && x.is_all_feeding == 0 && ids.Contains(x.material_receipt_id))) { FeedingDetailOutput result = await db.Queryable() .LeftJoin((a, b) => b.carry_code==qrCode) @@ -134,7 +134,7 @@ namespace Tnb.ProductionMgr { FeedingDetailOutput result = await db.Queryable() .LeftJoin((a, b) => b.carry_code==qrCode) - .Where((a) => a.carry_code == qrCode) + .Where((a) => a.carry_code == qrCode && ids.Contains(a.id)) .Select((a, b) => new FeedingDetailOutput { carry_id = a.carry_id,