20220216 人员照片保存时加判断

This commit is contained in:
杨红卫 2022-02-16 10:18:27 +08:00
parent 74f7cd5c17
commit e2e11493d9
3 changed files with 6 additions and 3 deletions

View File

@ -1037,7 +1037,7 @@ namespace BLL
}
#endregion
#region
#region
/// <summary>
/// 人员出入场
/// </summary>

View File

@ -69,7 +69,10 @@ namespace BLL
newWelder.IsUsed = welder.IsUsed;
newWelder.QualificationCertificateUrl = welder.QualificationCertificateUrl;
newWelder.Remark = welder.Remark;
newWelder.PhotoUrl = welder.PhotoUrl;
if (!string.IsNullOrEmpty(welder.PhotoUrl))
{
newWelder.PhotoUrl = welder.PhotoUrl;
}
newWelder.WorkPostId = welder.WorkPostId;
newWelder.Isprint = welder.Isprint;
Funs.DB.SubmitChanges();

View File

@ -462,7 +462,7 @@ namespace BLL
newPerson.Telephone = person.Telephone;
newPerson.PositionId = person.PositionId;
newPerson.PostTitleId = person.PostTitleId;
if (newPerson.PhotoUrl != person.PhotoUrl)
if (newPerson.PhotoUrl != person.PhotoUrl && !string.IsNullOrEmpty(person.PhotoUrl))
{
newPerson.PhotoUrl = person.PhotoUrl;
newPerson.ExchangeTime = null;