diff --git a/SGGL/BLL/HSSE/SitePerson/PersonInOutService.cs b/SGGL/BLL/HSSE/SitePerson/PersonInOutService.cs index 7c8e0d29..ab60031d 100644 --- a/SGGL/BLL/HSSE/SitePerson/PersonInOutService.cs +++ b/SGGL/BLL/HSSE/SitePerson/PersonInOutService.cs @@ -398,7 +398,7 @@ namespace BLL foreach (var newPersonInOut in newPersonInOutList) { var getPUnit = getPUnitS.FirstOrDefault(x => x.UnitId == newPersonInOut.UnitId); - if (getPUnit.UnitType != Const.ProjectUnitType_3 && getPUnit.UnitType != Const.ProjectUnitType_4 && getPUnit.IsSynchro == true) + if (getPUnit!=null&&getPUnit.UnitType != Const.ProjectUnitType_3 && getPUnit.UnitType != Const.ProjectUnitType_4 && getPUnit.IsSynchro == true) { if (getRealNameP != null && newPersonInOut.ChangeTime.HasValue) {