小程序接口修改

This commit is contained in:
2023-07-11 16:32:16 +08:00
parent ca5c3fe9a7
commit 4449a7754f
68 changed files with 4634 additions and 2984 deletions
+60 -10
View File
@@ -259,14 +259,39 @@ namespace BLL
return workPostName;
}
#endregion
#region ID得到岗位名称
/// <summary>
/// 根据岗位ID得到岗位名称
/// </summary>
/// <param name="workPostId"></param>
/// <returns></returns>
public static string getDepartNameById(string workPostId)
public static string getWorkPostNamesWorkPostIdsForApi(object workPostIds)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
string workPostName = string.Empty;
if (workPostIds != null)
{
string[] ids = workPostIds.ToString().Split(',');
foreach (string id in ids)
{
var q = db.Base_WorkPost.FirstOrDefault(e => e.WorkPostId == id);
if (q != null)
{
workPostName += q.WorkPostName + ",";
}
}
if (workPostName != string.Empty)
{
workPostName = workPostName.Substring(0, workPostName.Length - 1); ;
}
}
return workPostName;
}
}
#endregion
#region ID得到岗位名称
/// <summary>
/// 根据岗位ID得到岗位名称
/// </summary>
/// <param name="workPostId"></param>
/// <returns></returns>
public static string getDepartNameById(string workPostId)
{
string workPostName = string.Empty;
if (!string.IsNullOrEmpty(workPostId))
@@ -313,6 +338,31 @@ namespace BLL
return departName;
}
#endregion
}
public static string getDepartNamesByIdsForApi(object departIdsIds)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
string departName = string.Empty;
if (departIdsIds != null)
{
string[] ids = departIdsIds.ToString().Split(',');
foreach (string id in ids)
{
var q = db.Base_Depart.FirstOrDefault(e => e.DepartId == id);
if (q != null)
{
departName += q.DepartName + ",";
}
}
if (departName != string.Empty)
{
departName = departName.Substring(0, departName.Length - 1); ;
}
}
return departName;
}
}
#endregion
}
}