This commit is contained in:
2023-09-07 21:54:58 +08:00
parent b79459a50f
commit f7c72e318c
23 changed files with 920 additions and 104 deletions
+24 -2
View File
@@ -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)
{