20220908
This commit is contained in:
parent
f5ab6ad44f
commit
cbf70abf68
|
|
@ -1,3 +1,5 @@
|
|||
--ADD BY YangHongwei 2022-09-07
|
||||
1、特岗人员资质列表页面新增按是否在岗查询。
|
||||
2、人员库单位修改后,所有项目人员单位也跟着修改。
|
||||
3、系统管理员修改人员不需要验证照片。
|
||||
--END
|
||||
|
|
@ -622,14 +622,25 @@ namespace BLL
|
|||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
bool isChange = false;
|
||||
Model.Person_Persons newPerson = db.Person_Persons.FirstOrDefault(e => e.PersonId == person.PersonId);
|
||||
if (newPerson != null)
|
||||
{
|
||||
newPerson.UnitId = person.UnitId;
|
||||
if (newPerson.UnitId != person.UnitId)
|
||||
{
|
||||
newPerson.UnitId = person.UnitId;
|
||||
isChange=true;
|
||||
}
|
||||
|
||||
newPerson.DepartId = person.DepartId;
|
||||
newPerson.WorkPostId = person.WorkPostId;
|
||||
newPerson.JobNum = person.JobNum;
|
||||
newPerson.PersonName = person.PersonName;
|
||||
if (newPerson.PersonName != person.PersonName)
|
||||
{
|
||||
newPerson.PersonName = person.PersonName;
|
||||
isChange = true;
|
||||
}
|
||||
|
||||
newPerson.Account = person.Account;
|
||||
newPerson.IsOffice = person.IsOffice;
|
||||
newPerson.RoleIds = person.RoleIds;
|
||||
|
|
@ -637,6 +648,7 @@ namespace BLL
|
|||
{
|
||||
newPerson.IdentityCard = person.IdentityCard;
|
||||
newPerson.IsCardNoOK = IDCardValid.CheckIDCard(person.IdentityCard);
|
||||
isChange = true;
|
||||
}
|
||||
newPerson.IdcardType = person.IdcardType;
|
||||
newPerson.IdcardStartDate = person.IdcardStartDate;
|
||||
|
|
@ -694,6 +706,35 @@ namespace BLL
|
|||
newPerson.QRCodeAttachUrl = person.QRCodeAttachUrl;
|
||||
}
|
||||
db.SubmitChanges();
|
||||
if (isChange)
|
||||
{
|
||||
SetProjectPersonUnit(person);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新项目人员单位
|
||||
/// </summary>
|
||||
/// <param name="personId"></param>
|
||||
/// <param name="unitId"></param>
|
||||
public static void SetProjectPersonUnit(Model.Person_Persons person)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var getSitepersons = from x in db.SitePerson_Person
|
||||
where x.PersonId == person.PersonId
|
||||
select x;
|
||||
if (getSitepersons.Count() > 0)
|
||||
{
|
||||
foreach (var item in getSitepersons)
|
||||
{
|
||||
item.UnitId = person.UnitId;
|
||||
item.IdentityCard = person.IdentityCard;
|
||||
item.PersonName = person.PersonName;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -620,10 +620,13 @@ namespace FineUIPro.Web.Person
|
|||
string projectPersonInfo = SitePerson_PersonService.ValidPersonInfo(newProjectPerson);
|
||||
if (string.IsNullOrEmpty(personInfo) && string.IsNullOrEmpty(projectPersonInfo))
|
||||
{
|
||||
if (string.IsNullOrEmpty(newPerson.PhotoUrl) || newPerson.PhotoUrl == "~/res/images/blank.png")
|
||||
if (this.CurrUser.PersonId != Const.sysglyId)
|
||||
{
|
||||
Alert.ShowInParent("照片不能为空!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
if (string.IsNullOrEmpty(newPerson.PhotoUrl) || newPerson.PhotoUrl == "~/res/images/blank.png")
|
||||
{
|
||||
Alert.ShowInParent("照片不能为空!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(newPerson.PersonId))
|
||||
|
|
|
|||
Loading…
Reference in New Issue