升级
This commit is contained in:
@@ -592,6 +592,8 @@ namespace BLL
|
||||
Languages = person.Languages,
|
||||
PersonStates = person.PersonStates,
|
||||
IsUsedType = person.IsUsedType,
|
||||
IsTrain = person.IsTrain,
|
||||
|
||||
};
|
||||
|
||||
if (person.InTime.HasValue)
|
||||
@@ -694,6 +696,8 @@ namespace BLL
|
||||
newPerson.Major = person.Major;
|
||||
newPerson.Languages = person.Languages;
|
||||
newPerson.PersonStates = person.PersonStates;
|
||||
newPerson.IsTrain = person.IsTrain;
|
||||
|
||||
db.SubmitChanges();
|
||||
|
||||
//Project_HSSEData_HSSEService.StatisticalData(newPerson.ProjectId, Project_HSSEData_HSSEService.HSSEDateType.ProjectInformation);
|
||||
@@ -1330,5 +1334,25 @@ namespace BLL
|
||||
return personId;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据UserId主键获取人员信息
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
public static void UpdatePersonTypeByProjectIdAndIdentityCard(string projectId,string identityCard)
|
||||
{
|
||||
|
||||
var persons = Funs.DB.SitePerson_Person.Where(x => x.IdentityCard == identityCard).ToList();
|
||||
|
||||
foreach (var item in persons)
|
||||
{
|
||||
if (item.ProjectId != projectId && item.IsUsed == true)
|
||||
{
|
||||
item.IsUsed = false;
|
||||
item.OutTime = DateTime.Now;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user