20240822 获取单位工程

This commit is contained in:
2024-08-22 11:00:20 +08:00
parent 2c7ad19fb1
commit 73c2c67939
12 changed files with 37 additions and 17 deletions
@@ -276,7 +276,7 @@ namespace BLL
}
else
{
List<Model.WBS_UnitWork> InstallationList = (from x in Funs.DB.WBS_UnitWork where x.ProjectId == projectId select x).ToList();//装置条件为空时获取对应操作表中所有的装置
List<Model.WBS_UnitWork> InstallationList = (from x in Funs.DB.WBS_UnitWork where x.ProjectId == projectId && (x.SuperUnitWork == null || x.SuperUnitWork == "0") select x).ToList();//装置条件为空时获取对应操作表中所有的装置
foreach (Model.WBS_UnitWork item in InstallationList)
{
Model.View_WBSReport InstallationInit = (from x in WBSReportList where x.Id == item.UnitWorkId select x).FirstOrDefault();
@@ -289,7 +289,7 @@ namespace BLL
}
else
{
List<Model.WBS_UnitWork> InstallationList = (from x in Funs.DB.WBS_UnitWork where x.ProjectId==projectId select x).ToList();
List<Model.WBS_UnitWork> InstallationList = (from x in Funs.DB.WBS_UnitWork where x.ProjectId==projectId && (x.SuperUnitWork == null || x.SuperUnitWork == "0") select x).ToList();
foreach (Model.WBS_UnitWork item in InstallationList)
{
Model.View_WBSReport InstallationInit = (from x in WBSReportList where x.Id == item.UnitWorkId select x).FirstOrDefault();
+3 -3
View File
@@ -402,7 +402,7 @@ namespace BLL
string[] type = null;
if (!string.IsNullOrEmpty(projectType))
type = projectType.Split(',');
var unitWorks = from x in Funs.DB.WBS_UnitWork where x.ProjectId == projectId && (type == null || type.Contains(x.ProjectType)) orderby x.UnitWorkCode select x;
var unitWorks = from x in Funs.DB.WBS_UnitWork where x.ProjectId == projectId && (x.SuperUnitWork == null || x.SuperUnitWork == "0") && (type == null || type.Contains(x.ProjectType)) orderby x.UnitWorkCode select x;
return unitWorks.ToList();
}
/// <summary>
@@ -454,12 +454,12 @@ namespace BLL
{
if (ProjectType == "1")
{
List<Model.WBS_UnitWork> lis = (from x in Funs.DB.WBS_UnitWork where x.ProjectType == "1" && x.ProjectId == ProjectId orderby x.UnitWorkCode select x).ToList();
List<Model.WBS_UnitWork> lis = (from x in Funs.DB.WBS_UnitWork where x.ProjectType == "1" && x.ProjectId == ProjectId && (x.SuperUnitWork == null || x.SuperUnitWork == "0") orderby x.UnitWorkCode select x).ToList();
return lis;
}
else if (ProjectType == "2")
{
List<Model.WBS_UnitWork> lis = (from x in Funs.DB.WBS_UnitWork where x.ProjectType == "2" && x.ProjectId == ProjectId orderby x.UnitWorkCode select x).ToList();
List<Model.WBS_UnitWork> lis = (from x in Funs.DB.WBS_UnitWork where x.ProjectType == "2" && x.ProjectId == ProjectId && (x.SuperUnitWork == null || x.SuperUnitWork == "0") orderby x.UnitWorkCode select x).ToList();
return lis;
}
else
@@ -702,7 +702,7 @@ namespace BLL
public static int GetUnitProjectNum(string projectid)
{
int result = (from x in Funs.DB.WBS_UnitWork
where x.ProjectId == projectid
where x.ProjectId == projectid && (x.SuperUnitWork == null || x.SuperUnitWork == "0")
select x).Count();
return result;
}