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

View File

@ -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();

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

View File

@ -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;
}

View File

@ -388,7 +388,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
select x;
var cns = from x in Funs.DB.Base_CNProfessional select x;
var installations = from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId select x;
var installations = from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId && (x.SuperUnitWork == null || x.SuperUnitWork == "0") select x;
var oldViewInfos = from x in Funs.DB.Comprehensive_DesignChangeOrder
where x.ProjectId == this.CurrUser.LoginProjectId
select x;

View File

@ -2287,7 +2287,7 @@ namespace FineUIPro.Web.CQMS.DataBase
private void WBSDataBind(string cNProfessionalCode)
{
this.tvWBS.Nodes.Clear();
var installations = from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId orderby x.UnitWorkCode select x;
var installations = from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId && (x.SuperUnitWork == null || x.SuperUnitWork == "0") orderby x.UnitWorkCode select x;
foreach (var q in installations)
{
TreeNode newNode = new TreeNode();
@ -2362,7 +2362,7 @@ namespace FineUIPro.Web.CQMS.DataBase
private void WBSDataBind2(string cNProfessionalCode)
{
this.tvWBS2.Nodes.Clear();
var installations = from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId orderby x.UnitWorkCode select x;
var installations = from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId && (x.SuperUnitWork == null || x.SuperUnitWork == "0") orderby x.UnitWorkCode select x;
foreach (var q in installations)
{
TreeNode newNode = new TreeNode();

View File

@ -34,7 +34,7 @@ namespace FineUIPro.Web.CQMS.Foreign
this.tvControlItem.AutoScroll = true;
this.tvControlItem.EnableSingleClickExpand = true;
var unitWorks = from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId orderby x.UnitWorkCode select x;
var unitWorks = from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId && (x.SuperUnitWork == null || x.SuperUnitWork == "0") orderby x.UnitWorkCode select x;
foreach (var item in unitWorks)
{
TreeNode rootNode1 = new TreeNode();

View File

@ -34,7 +34,7 @@ namespace FineUIPro.Web.CQMS.Foreign
this.tvControlItem.AutoScroll = true;
this.tvControlItem.EnableSingleClickExpand = true;
var unitWorks = from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId orderby x.UnitWorkCode select x;
var unitWorks = from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId && (x.SuperUnitWork == null || x.SuperUnitWork == "0") orderby x.UnitWorkCode select x;
foreach (var item in unitWorks)
{
TreeNode rootNode1 = new TreeNode();

View File

@ -71,7 +71,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
this.trWBS.EnableIcons = true;
this.trWBS.AutoScroll = true;
this.trWBS.EnableSingleClickExpand = true;
var unitWorks = from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId orderby x.UnitWorkCode select x;
var unitWorks = from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId && (x.SuperUnitWork == null || x.SuperUnitWork == "0") orderby x.UnitWorkCode select x;
foreach (var q in unitWorks)
{
TreeNode newNode = new TreeNode();

View File

@ -0,0 +1,20 @@
错误信息开始=====>
错误类型:NullReferenceException
错误信息:未将对象引用设置到对象的实例。
错误堆栈:
在 BLL.APIGetHttpService.ControlHttp(String url, String method, String contenttype, Hashtable header, String data) 位置 E:\五环\SGGL_CWCEC\SGGL\BLL\API\APIGetHttpService.cs:行号 202
在 FineUIPro.Web.ProjectData.Installation.btnMenuDown_Click(Object sender, EventArgs e) 位置 E:\五环\SGGL_CWCEC\SGGL\FineUIPro.Web\ProjectData\Installation.aspx.cs:行号 252
在 FineUIPro.MenuButton.OnClick(EventArgs e)
在 (MenuButton , EventArgs )
在 FineUIPro.MenuButton.RaisePostBackEvent(String eventArgument)
在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
出错时间:08/22/2024 10:39:28
出错文件:http://localhost:8579/ProjectData/Installation.aspx
IP地址:::1
操作人员:JT
出错时间:08/22/2024 10:39:28

View File

@ -19232,7 +19232,7 @@
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v16.0\WebApplications\Microsoft.WebApplication.targets" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v15.0\WebApplications\Microsoft.WebApplication.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">

View File

@ -198,7 +198,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
where x.ProjectId == this.ProjectId
select x;
var workAreas = from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.ProjectId
where x.ProjectId == this.ProjectId && (x.SuperUnitWork == null || x.SuperUnitWork == "0")
select x;
var posts = from x in Funs.DB.Base_WorkPost
select x;
@ -727,7 +727,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
where x.ProjectId == this.ProjectId
select x;
var workAreas = from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.ProjectId
where x.ProjectId == this.ProjectId && (x.SuperUnitWork == null || x.SuperUnitWork == "0")
select x;
var posts = from x in Funs.DB.Base_WorkPost
select x;

View File

@ -97,8 +97,8 @@ namespace FineUIPro.Web.ProjectData
if (e.Node.CommandName == "project") //展开项目节点
{
var unitWorks = from x in Funs.DB.WBS_UnitWork
where x.ProjectId == e.Node.NodeID && x.SuperUnitWork == "0"
orderby x.UnitWorkCode
where x.ProjectId == e.Node.NodeID && (x.SuperUnitWork == null || x.SuperUnitWork == "0")
orderby x.UnitWorkCode
select x;
foreach (var unitWork in unitWorks)
{