This commit is contained in:
杨红卫 2021-09-28 16:14:21 +08:00
parent 82af498870
commit eb31f58346
1 changed files with 3 additions and 3 deletions

View File

@ -779,7 +779,7 @@ namespace WebAPI.Controllers
var responeData = new Model.ResponeData(); var responeData = new Model.ResponeData();
try try
{ {
responeData.data = (from x in Funs.DB.SitePerson_Person_Bak responeData.data = (from x in Funs.DB.SitePerson_Person
join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
where x.ProjectId == projectId where x.ProjectId == projectId
&& !x.ExchangeTime.HasValue && !x.ExchangeTime.HasValue
@ -831,7 +831,7 @@ namespace WebAPI.Controllers
{ {
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{ {
responeData.data = (from x in db.SitePerson_Person_Bak responeData.data = (from x in db.SitePerson_Person
where x.ProjectId == projectId && x.InTime.HasValue && x.InTime < DateTime.Now where x.ProjectId == projectId && x.InTime.HasValue && x.InTime < DateTime.Now
&& ((x.IsUsed == true && !x.OutTime.HasValue) || x.OutTime.HasValue) && ((x.IsUsed == true && !x.OutTime.HasValue) || x.OutTime.HasValue)
&& !x.ExchangeTime2.HasValue && x.ExchangeTime.HasValue && !x.ExchangeTime2.HasValue && x.ExchangeTime.HasValue
@ -886,7 +886,7 @@ namespace WebAPI.Controllers
db.SubmitChanges(); db.SubmitChanges();
} }
var getPersonb = db.SitePerson_Person_Bak.FirstOrDefault(e => e.PersonId == personId); var getPersonb = db.SitePerson_Person.FirstOrDefault(e => e.PersonId == personId);
if (getPersonb != null && !string.IsNullOrEmpty(type)) if (getPersonb != null && !string.IsNullOrEmpty(type))
{ {
if (type == "1") if (type == "1")