diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsInStockService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsInStockService.cs index 27d2533a..729a1728 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WmsInStockService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsInStockService.cs @@ -253,7 +253,7 @@ namespace Tnb.WarehouseMgr //入库申请条码明细表 List instockcodes = input.instockcodes; //如果数据不全, - if (instock.IsNull() || instock.carry_id.IsNullOrWhiteSpace() || instock.location_id.IsNullOrWhiteSpace() || instockds?.Count < 1 || instockcodes?.Count < 1) + if ((instock?.carry_id.IsNullOrWhiteSpace() ?? true) || (instock?.location_id.IsNullOrWhiteSpace() ?? true) || instockds?.Count < 1 || instockcodes?.Count < 1) { //报错, 提示数据不全。 throw new AppFriendlyException("数据不全!", 500); diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsKittingInStkService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsKittingInStkService.cs index afe444a5..3330140a 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WmsKittingInStkService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsKittingInStkService.cs @@ -199,7 +199,7 @@ namespace Tnb.WarehouseMgr } catch (Exception) { - await _db.Ado.RollbackTranAsync(); + await _db.Ado.RollbackTranAsync(); throw; } return Task.FromResult(true); @@ -216,12 +216,12 @@ namespace Tnb.WarehouseMgr if (kittingOut != null) { var locaion = await _db.Queryable().SingleAsync(it => it.id == kittingOut.location_id); - if (locaion != null && locaion.is_type.ToEnum() != EnumLocationType.存储库位) + if (locaion?.is_type.ToEnum() != EnumLocationType.存储库位) { kittingOut.status = WmsWareHouseConst.BILLSTATUS_TOBESHIPPED_ID; - + } - else + else { kittingOut.status = WmsWareHouseConst.BILLSTATUS_COMPLETE_ID; }