diff --git a/SGGL/BLL/API/APIPersonService.cs b/SGGL/BLL/API/APIPersonService.cs index 261b7c40..74b2c0b9 100644 --- a/SGGL/BLL/API/APIPersonService.cs +++ b/SGGL/BLL/API/APIPersonService.cs @@ -800,7 +800,7 @@ namespace BLL { using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { - var getPerson = db.SitePerson_Person.FirstOrDefault(e => e.SitePersonId == sitePersonId); + var getPerson = db.SitePerson_Person.FirstOrDefault(e => e.SitePersonId == sitePersonId || e.PersonId == sitePersonId); if (getPerson != null && !string.IsNullOrEmpty(type)) { if (type == "1") @@ -813,6 +813,19 @@ namespace BLL } db.SubmitChanges(); } + else + { + if (type == "1") + { + getPerson.ExchangeTime2 = DateTime.Now; + } + else + { + getPerson.ExchangeTime = DateTime.Now; + } + db.SubmitChanges(); + + } } } #endregion