1代码合并

This commit is contained in:
2025-02-05 17:57:14 +08:00
parent 4bbce72980
commit 5712066e0a
57 changed files with 334 additions and 3709 deletions
-79
View File
@@ -260,84 +260,5 @@ namespace BLL
return workPostName;
}
#endregion
public static string getDepartNamesByIds(object departIdsIds)
{
string departName = string.Empty;
if (departIdsIds != null)
{
string[] ids = departIdsIds.ToString().Split(',');
foreach (string id in ids)
{
var q = GetDepartById(id);
if (q != null)
{
departName += q.DepartName + ",";
}
}
if (departName != string.Empty)
{
departName = departName.Substring(0, departName.Length - 1); ;
}
}
return departName;
}
public static Model.Base_Depart GetDepartById(string departId)
{
return Funs.DB.Base_Depart.FirstOrDefault(e => e.DepartId == departId);
}
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;
}
}
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;
}
}
}
}