20230907
This commit is contained in:
@@ -464,6 +464,28 @@
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 获取项目各单位类型单位名称
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="unitType"></param>
|
||||
/// <returns></returns>
|
||||
public static string getProjectUnitIdByUnitType(string projectId, string unitType)
|
||||
{
|
||||
string unitId = string.Empty;
|
||||
if (!string.IsNullOrEmpty(projectId))
|
||||
{
|
||||
var getUnit = from x in Funs.DB.Project_ProjectUnit
|
||||
where x.ProjectId == projectId && x.UnitType == unitType
|
||||
select x.UnitId;
|
||||
if (getUnit.Count() > 0)
|
||||
{
|
||||
unitId = Funs.GetStringByArray(getUnit.ToArray());
|
||||
}
|
||||
}
|
||||
return unitId;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取项目各单位类型单位名称
|
||||
/// </summary>
|
||||
@@ -477,7 +499,7 @@
|
||||
{
|
||||
var getUnitName = from x in Funs.DB.Project_ProjectUnit
|
||||
join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
|
||||
where x.ProjectId == projectId.ToString() && x.UnitType == unitType
|
||||
where x.ProjectId == projectId && x.UnitType == unitType
|
||||
select y.UnitName;
|
||||
if (getUnitName.Count() > 0)
|
||||
{
|
||||
@@ -500,7 +522,7 @@
|
||||
{
|
||||
var getShortUnitName = from x in Funs.DB.Project_ProjectUnit
|
||||
join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
|
||||
where x.ProjectId == projectId.ToString() && x.UnitType == unitType
|
||||
where x.ProjectId == projectId && x.UnitType == unitType
|
||||
select y.ShortUnitName;
|
||||
if (getShortUnitName.Count() > 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user