diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdMaterialReceiptService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdMaterialReceiptService.cs index 4433edc4..7be831b4 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdMaterialReceiptService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdMaterialReceiptService.cs @@ -608,6 +608,7 @@ namespace Tnb.ProductionMgr List insertDList = new List(); List insertFHList = new List(); List insertFDList = new List(); + List clearCarryIds = new List(); string orgId = WmsWareHouseConst.AdministratorOrgId; // string userId = moTask.worker_id; string userId = WmsWareHouseConst.AdministratorUserId; @@ -617,6 +618,7 @@ namespace Tnb.ProductionMgr } foreach(string carryId in input.carryIds) { + clearCarryIds.Add(carryId); WmsCarryH carry = await db.Queryable().SingleAsync(x => x.id == carryId); string code = await _billRullService.GetBillNumber(Tnb.BasicData.CodeTemplateConst.MATERIAL_RECEIPT_CODE); PrdMaterialReceiptH prdMaterialReceiptH = new PrdMaterialReceiptH() @@ -676,7 +678,7 @@ namespace Tnb.ProductionMgr memberCarrys = await db.Queryable().Where(x=>memberCarryIds.Contains(x.id)).ToListAsync(); carryCodes = await db.Queryable().Where(x=>memberCarryIds.Contains(x.carry_id)).ToListAsync(); - + clearCarryIds.AddRange(memberCarrys.Select(x=>x.id).ToList()); } if (carryCodes != null && carryCodes.Count > 0) @@ -768,7 +770,7 @@ namespace Tnb.ProductionMgr } - if (carry.carrystd_id==WmsWareHouseConst.CARRY_LXSTD_ID) + if (carry.carrystd_id==WmsWareHouseConst.CARRY_LXSTD_ID || carry.carrystd_id==WmsWareHouseConst.CARRY_LJSTD_ID) { Tnb.WarehouseMgr.Entities.Dto.Outputs.Result result2 = await _wmsCarryUnbindService.CarryUnbind(new CarryBindInput() { @@ -793,7 +795,7 @@ namespace Tnb.ProductionMgr await db.Updateable() .SetColumns(x => x.carry_status == ((int)EnumCarryStatus.空闲).ToString()) .SetColumns(x => x.is_check == ((int)EnumCheckConclusion.待检).ToString()) - .Where(x => input.carryIds.Contains(x.id)) + .Where(x => clearCarryIds.Contains(x.id)) .ExecuteCommandAsync(); if (insertHList.Count <= 0 || insertDList.Count <= 0)