20230626 人员经历二次入场时间判断优化

This commit is contained in:
2023-06-26 09:35:56 +08:00
parent 4704c91257
commit 295cd47c8b
@@ -780,6 +780,13 @@ namespace BLL
setPersonItemInOut = true; setPersonItemInOut = true;
} }
else else
{
var getDatePItem = db.SitePerson_PersonItem.FirstOrDefault(x => x.ProjectId == person.ProjectId && x.IdentityCard == person.IdentityCard && x.OutTime .HasValue && x.OutTime < person.InTime);
if (getDatePItem != null)
{
setPersonItemInOut = true;
}
else
{ {
var getPersons = db.Person_Persons.FirstOrDefault(x => x.IdentityCard == newPerson.IdentityCard); var getPersons = db.Person_Persons.FirstOrDefault(x => x.IdentityCard == newPerson.IdentityCard);
if (getPersons != null && (!getPersons.MultiProject.HasValue || getPersons.MultiProject == false)) if (getPersons != null && (!getPersons.MultiProject.HasValue || getPersons.MultiProject == false))
@@ -794,6 +801,7 @@ namespace BLL
} }
} }
} }
}
if (setPersonItemInOut) if (setPersonItemInOut)
{ {
////现场人员项目出入场记录 ////现场人员项目出入场记录