提交代码
This commit is contained in:
@@ -58,7 +58,7 @@ namespace BLL
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var getPerson = from x in db.View_SitePerson_Person
|
||||
where x.PersonId == personId || x.IdentityCard == personId
|
||||
where (x.PersonId == personId || x.IdentityCard == personId)
|
||||
select new Model.PersonItem
|
||||
{
|
||||
PersonId = x.PersonId,
|
||||
@@ -1752,5 +1752,83 @@ namespace BLL
|
||||
|
||||
return message;
|
||||
}
|
||||
|
||||
#region 二维码扫码获取人员
|
||||
/// <summary>
|
||||
/// 二维码扫码获取人员
|
||||
/// </summary>
|
||||
/// <param name="personId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.PersonItem getPersonByPersonIdQrcode(string personId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var getPerson = from x in db.View_SitePerson_Person
|
||||
where (x.PersonId == personId || x.IdentityCard == personId) && x.IsUsed == true
|
||||
select new Model.PersonItem
|
||||
{
|
||||
PersonId = x.PersonId,
|
||||
CardNo = x.CardNo,
|
||||
PersonName = x.PersonName,
|
||||
Sex = x.Sex,
|
||||
SexName = x.SexName,
|
||||
IdentityCard = x.IdentityCard,
|
||||
Address = x.Address,
|
||||
ProjectId = x.ProjectId,
|
||||
ProjectCode = x.ProjectCode,
|
||||
ProjectName = x.ProjectName,
|
||||
UnitId = x.UnitId,
|
||||
UnitCode = x.UnitCode,
|
||||
UnitName = x.UnitName,
|
||||
TeamGroupId = x.TeamGroupId,
|
||||
TeamGroupName = x.TeamGroupName,
|
||||
WorkPostId = x.WorkPostId,
|
||||
WorkPostName = x.WorkPostName,
|
||||
InTime = string.Format("{0:yyyy-MM-dd}", x.InTime),
|
||||
OutTime = string.Format("{0:yyyy-MM-dd}", x.OutTime),
|
||||
OutResult = x.OutResult,
|
||||
Telephone = x.Telephone,
|
||||
PhotoUrl = x.PhotoUrl,
|
||||
DepartName = x.DepartName,
|
||||
IsUsed = x.IsUsed,
|
||||
IsUsedName = x.IsUsed == false ? "不启用" : "启用",
|
||||
AuditorId = x.AuditorId,
|
||||
AuditorName = db.Sys_User.First(z => z.UserId == x.AuditorId).UserName,
|
||||
IsForeign = x.IsForeign.HasValue ? x.IsForeign : false,
|
||||
IsOutside = x.IsOutside.HasValue ? x.IsOutside : false,
|
||||
AuditorDate = string.Format("{0:yyyy-MM-dd}", x.AuditorDate),
|
||||
AttachUrl1 = x.IDCardUrl == null ? APIUpLoadFileService.getFileUrl(personId + "#1", null) : x.IDCardUrl.Replace('\\', '/'),
|
||||
AttachUrl2 = APIUpLoadFileService.getFileUrl(personId + "#2", null),
|
||||
AttachUrl3 = APIUpLoadFileService.getFileUrl(personId + "#3", null),
|
||||
AttachUrl4 = getAttachUrl4(x.PersonId),
|
||||
AttachUrl5 = APIUpLoadFileService.getFileUrl(personId + "#5", null),
|
||||
IdcardType = x.IdcardType,
|
||||
IdcardTypeName = x.IdcardTypeName,
|
||||
IdcardStartDate = string.Format("{0:yyyy-MM-dd}", x.IdcardStartDate),
|
||||
IdcardEndDate = string.Format("{0:yyyy-MM-dd}", x.IdcardEndDate),
|
||||
IdcardForever = x.IdcardForever,
|
||||
IdcardForeverStr = x.IdcardForeverStr,
|
||||
PoliticsStatus = x.PoliticsStatus,
|
||||
PoliticsStatusName = x.PoliticsStatusName,
|
||||
IdcardAddress = x.IdcardAddress,
|
||||
Nation = x.Nation,
|
||||
NationName = x.NationName,
|
||||
EduLevel = x.EduLevel,
|
||||
EduLevelName = x.EduLevelName,
|
||||
MaritalStatus = x.MaritalStatus,
|
||||
MaritalStatusName = x.MaritalStatusName,
|
||||
CountryCode = x.CountryCode,
|
||||
CountryName = x.CountryName,
|
||||
ProvinceCode = x.ProvinceCode,
|
||||
ProvinceName = x.ProvinceName,
|
||||
MainCNProfessionalId = x.MainCNProfessionalId,
|
||||
MainCNProfessionalName = x.MainCNProfessionalName,
|
||||
ViceCNProfessionalId = x.ViceCNProfessionalId,
|
||||
ViceCNProfessionalName = x.ViceCNProfessionalName
|
||||
};
|
||||
return getPerson.FirstOrDefault();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user