20221119优化出入经历
This commit is contained in:
@@ -273,37 +273,37 @@ namespace FineUIPro.Web.Person
|
||||
}
|
||||
info = "操作完成,共处理人员按身份证设置年龄" + countRecod.ToString() + "条。";
|
||||
|
||||
var getPPersons = (from x in Funs.DB.SitePerson_Person
|
||||
join y in Funs.DB.Person_Persons on x.PersonId equals y.PersonId
|
||||
where x.States == Const.ProjectPersonStates_1 && y.CurrentProjectId == null
|
||||
select x).Take(1000);
|
||||
foreach (var pitem in getPPersons)
|
||||
{
|
||||
SitePerson_PersonItemService.SetPersonItemInOut(pitem);
|
||||
pCountRecod++;
|
||||
}
|
||||
//var getPPersons = (from x in Funs.DB.SitePerson_Person
|
||||
// join y in Funs.DB.Person_Persons on x.PersonId equals y.PersonId
|
||||
// where x.States == Const.ProjectPersonStates_1 && y.CurrentProjectId == null
|
||||
// select x).Take(1000);
|
||||
//foreach (var pitem in getPPersons)
|
||||
//{
|
||||
// SitePerson_PersonItemService.SetPersonItemInOut(pitem);
|
||||
// pCountRecod++;
|
||||
//}
|
||||
|
||||
if (pCountRecod == 0)
|
||||
{
|
||||
var getPPersons2 = (from x in Funs.DB.SitePerson_Person
|
||||
join y in Funs.DB.Person_Persons on x.PersonId equals y.PersonId
|
||||
where x.States == Const.ProjectPersonStates_0 && y.CurrentProjectId == null
|
||||
select x).Take(1000);
|
||||
foreach (var pitem2 in getPPersons2)
|
||||
{
|
||||
var getPersons = Funs.DB.Person_Persons.FirstOrDefault(x => x.PersonId == pitem2.PersonId);
|
||||
if (getPersons != null)
|
||||
{
|
||||
getPersons.CurrentProjectId = pitem2.ProjectId;
|
||||
getPersons.CurrentProjectRoleId = pitem2.RoleIds;
|
||||
getPersons.CurrentProjectWorkPostId = pitem2.WorkPostId;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
pCountRecod++;
|
||||
}
|
||||
}
|
||||
//if (pCountRecod == 0)
|
||||
//{
|
||||
// var getPPersons2 = (from x in Funs.DB.SitePerson_Person
|
||||
// join y in Funs.DB.Person_Persons on x.PersonId equals y.PersonId
|
||||
// where x.States == Const.ProjectPersonStates_0 && y.CurrentProjectId == null
|
||||
// select x).Take(1000);
|
||||
// foreach (var pitem2 in getPPersons2)
|
||||
// {
|
||||
// var getPersons = Funs.DB.Person_Persons.FirstOrDefault(x => x.PersonId == pitem2.PersonId);
|
||||
// if (getPersons != null)
|
||||
// {
|
||||
// getPersons.CurrentProjectId = pitem2.ProjectId;
|
||||
// getPersons.CurrentProjectRoleId = pitem2.RoleIds;
|
||||
// getPersons.CurrentProjectWorkPostId = pitem2.WorkPostId;
|
||||
// Funs.DB.SubmitChanges();
|
||||
// }
|
||||
// pCountRecod++;
|
||||
// }
|
||||
//}
|
||||
|
||||
info += "共处理人员所在当前项目取值" + pCountRecod.ToString() + "条。";
|
||||
//info += "共处理人员所在当前项目取值" + pCountRecod.ToString() + "条。";
|
||||
Alert.ShowInParent(info, MessageBoxIcon.Information);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user