小程序接口修改
This commit is contained in:
@@ -4,6 +4,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using FineUIPro;
|
||||
using Model;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
@@ -125,14 +126,27 @@ namespace BLL
|
||||
name = getp.PersonName;
|
||||
}
|
||||
return name;
|
||||
}
|
||||
}
|
||||
public static string GetPersonNameByIdForApi(string personId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
string name = string.Empty;
|
||||
var getp = db.SitePerson_Person.FirstOrDefault(e => e.PersonId == personId);
|
||||
if (getp != null)
|
||||
{
|
||||
name = getp.PersonName;
|
||||
}
|
||||
return name;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据UserId主键获取人员信息
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetPersonIdByUserId(string userId)
|
||||
/// <summary>
|
||||
/// 根据UserId主键获取人员信息
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetPersonIdByUserId(string userId)
|
||||
{
|
||||
string personId = userId;
|
||||
var getPerson = GetPersonById(userId);
|
||||
@@ -151,13 +165,35 @@ namespace BLL
|
||||
|
||||
return personId;
|
||||
}
|
||||
public static string GetPersonIdByUserIdForApi(string userId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
string personId = userId;
|
||||
var getPerson = db.SitePerson_Person.FirstOrDefault(e => e.PersonId == userId);
|
||||
if (getPerson == null)
|
||||
{
|
||||
var getUser = db.Sys_User.FirstOrDefault(e => e.UserId == userId);
|
||||
if (getUser != null)
|
||||
{
|
||||
getPerson = db.SitePerson_Person.FirstOrDefault(e => e.IdentityCard == getUser.IdentityCard);
|
||||
if (getPerson != null)
|
||||
{
|
||||
personId = getPerson.PersonId;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据UserId主键获取人员信息
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.SitePerson_Person GetPersonByUserId(string userId, string projectId)
|
||||
return personId;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据UserId主键获取人员信息
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.SitePerson_Person GetPersonByUserId(string userId, string projectId)
|
||||
{
|
||||
var getPerson = GetPersonById(userId);
|
||||
if (getPerson == null)
|
||||
|
||||
Reference in New Issue
Block a user