This commit is contained in:
2021-07-20 16:02:27 +08:00
parent b3d23a52d9
commit 7700a66999
16 changed files with 178 additions and 90 deletions
@@ -44,6 +44,12 @@ namespace BLL
db.SitePerson_Checking.InsertOnSubmit(newPersonInfo);
db.SubmitChanges();
if (!string.IsNullOrEmpty(personInfo.ProjectId) && !string.IsNullOrEmpty(personInfo.IdentityCard) && personInfo.IntoOutTime.HasValue)
{
int inOut = personInfo.IntoOut == "1" ? 1 : 0;
APIDoorServerService.SaveDoorInOutRecord(personInfo.ProjectId, personInfo.IdentityCard, inOut, personInfo.IntoOutTime.Value, "手动");
}
}
/// <summary>
@@ -53,18 +59,21 @@ namespace BLL
public static void UpdatePersonInfo(Model.SitePerson_Checking personInfo)
{
Model.SGGLDB db = Funs.DB;
Model.SitePerson_Checking newPersonInfo = db.SitePerson_Checking.First(e => e.CheckingId == personInfo.CheckingId);
newPersonInfo.CardNo = personInfo.CardNo;
newPersonInfo.PersonId = personInfo.PersonId;
newPersonInfo.ProjectId = personInfo.ProjectId;
newPersonInfo.WorkAreaId = personInfo.WorkAreaId;
newPersonInfo.WorkAreaName = personInfo.WorkAreaName;
newPersonInfo.IdentityCard = personInfo.IdentityCard;
newPersonInfo.IntoOutTime = personInfo.IntoOutTime;
newPersonInfo.IntoOut = personInfo.IntoOut;
newPersonInfo.Address = personInfo.Address;
Model.SitePerson_Checking newPersonInfo = db.SitePerson_Checking.FirstOrDefault(e => e.CheckingId == personInfo.CheckingId);
if (newPersonInfo != null)
{
newPersonInfo.CardNo = personInfo.CardNo;
newPersonInfo.PersonId = personInfo.PersonId;
newPersonInfo.ProjectId = personInfo.ProjectId;
newPersonInfo.WorkAreaId = personInfo.WorkAreaId;
newPersonInfo.WorkAreaName = personInfo.WorkAreaName;
newPersonInfo.IdentityCard = personInfo.IdentityCard;
newPersonInfo.IntoOutTime = personInfo.IntoOutTime;
newPersonInfo.IntoOut = personInfo.IntoOut;
newPersonInfo.Address = personInfo.Address;
db.SubmitChanges();
db.SubmitChanges();
}
}
/// <summary>