2022-11-23 焊接wbs树加载优化,管线划分数据加载优化
This commit is contained in:
parent
fe520d1201
commit
0759a36121
Binary file not shown.
|
|
@ -24,7 +24,13 @@ namespace BLL
|
|||
/// 现场安装
|
||||
/// </summary>
|
||||
public const string PipeArea_FIELD = "2";
|
||||
public static List<Model.HJGL_Pipeline> hJGL_Pipelines
|
||||
{
|
||||
|
||||
get;
|
||||
set;
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 实际日期类型
|
||||
/// </summary>
|
||||
|
|
@ -161,17 +167,17 @@ namespace BLL
|
|||
{
|
||||
return Funs.DB.HJGL_Pipeline.FirstOrDefault(e => e.PipelineCode == pipelineCode);
|
||||
}
|
||||
public static List<View_HJGL_Pipeline> GetView_HJGL_Pipelines(View_HJGL_Pipeline model)
|
||||
public static List<HJGL_Pipeline> GetView_HJGL_Pipelines(HJGL_Pipeline model)
|
||||
{
|
||||
var db = Funs.DB;
|
||||
var pipelineList =( from x in db.View_HJGL_Pipeline
|
||||
var pipelineList =( from x in hJGL_Pipelines
|
||||
where
|
||||
(string.IsNullOrEmpty(model.ProjectId) || x.ProjectId.Contains(model.ProjectId))
|
||||
&& (string.IsNullOrEmpty(model.UnitWorkId) || x.UnitWorkId.Contains(model.UnitWorkId))
|
||||
&& (string.IsNullOrEmpty(model.PipelineCode) || x.PipelineCode.Contains(model.PipelineCode))
|
||||
&& (string.IsNullOrEmpty(model.SingleName) || x.SingleName.Contains(model.SingleName))
|
||||
&& (string.IsNullOrEmpty(model.DesignPress) || x.DesignPress.Contains(model.DesignPress))
|
||||
&& (string.IsNullOrEmpty(model.MaterialCode) || x.MaterialCode.Contains(model.MaterialCode))
|
||||
/* && (string.IsNullOrEmpty(model.MaterialCode) || x.MaterialCode.Contains(model.MaterialCode))*/
|
||||
select x).ToList();
|
||||
if (model.IsFinished!=null)
|
||||
{
|
||||
|
|
@ -200,6 +206,17 @@ namespace BLL
|
|||
return q;
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据项目获取所有管线
|
||||
/// </summary>
|
||||
/// <param name="ProjectId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.HJGL_Pipeline> GetPipelinesByProjectId(string ProjectId)
|
||||
{
|
||||
|
||||
var q = Funs.DB.HJGL_Pipeline.Where(e => e.ProjectId == ProjectId).ToList();
|
||||
return q;
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据管线ID获取管线信息
|
||||
/// </summary>
|
||||
/// <param name="pipelineName"></param>
|
||||
|
|
@ -385,10 +402,28 @@ namespace BLL
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加作业管线
|
||||
/// </summary>
|
||||
/// <param name="pipeline"></param>
|
||||
public static bool IsExistPipelineCode(string pipelineCode, string unitWorkId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_Pipeline q = null;
|
||||
q = Funs.DB.HJGL_Pipeline.FirstOrDefault(x => x.PipelineCode == pipelineCode && x.UnitWorkId == unitWorkId);
|
||||
if (q != null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
public static HJGL_Pipeline GetPipelineByCode(string pipelineCode, string unitWorkId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_Pipeline q = null;
|
||||
q = Funs.DB.HJGL_Pipeline.FirstOrDefault(x => x.PipelineCode == pipelineCode && x.UnitWorkId == unitWorkId);
|
||||
return q;
|
||||
}
|
||||
|
||||
public static void AddPipeline(Model.HJGL_Pipeline pipeline)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,21 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public static class WeldJointService
|
||||
{
|
||||
public static List<Model.HJGL_WeldJoint> hJGL_WeldJoints
|
||||
{
|
||||
|
||||
get;
|
||||
set;
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据焊口Id获取焊口信息
|
||||
/// </summary>
|
||||
|
|
@ -59,6 +69,15 @@ namespace BLL
|
|||
var q = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == PipelineId select x).ToList();
|
||||
return q;
|
||||
}
|
||||
|
||||
public static Model.HJGL_WeldJoint GetWeldJointsByWeldJointCode(string PipelineId, string WeldJointCode)
|
||||
{
|
||||
var q=(from x in Funs.DB.HJGL_WeldJoint where x.PipelineId==PipelineId && x.WeldJointCode==WeldJointCode select x ).FirstOrDefault();
|
||||
|
||||
return q;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 添加
|
||||
/// </summary>
|
||||
|
|
@ -312,6 +331,26 @@ namespace BLL
|
|||
Model.SGGLDB db = Funs.DB;
|
||||
return db.View_HJGL_WeldJoint.FirstOrDefault(e => e.WeldJointId == weldJointId);
|
||||
}
|
||||
public static List<Model.HJGL_WeldJoint> GetWeldJointByUnitworkId(string UnitWorkId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var q = (from x in db.HJGL_WeldJoint
|
||||
join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId into tt
|
||||
from g in tt.DefaultIfEmpty()
|
||||
where g.UnitWorkId == UnitWorkId
|
||||
select x).ToList();
|
||||
|
||||
return q;
|
||||
}
|
||||
public static List<Model.HJGL_WeldJoint> GetWeldJointByProjectid(string ProjectId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
|
||||
var q = (from x in db.HJGL_WeldJoint
|
||||
where x.ProjectId == ProjectId
|
||||
select x).ToList();
|
||||
return q;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据焊口Id获取插入焊口数
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
|||
{
|
||||
foreach (var q in unitWork1)
|
||||
{
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId select x).Count();
|
||||
int a = (from x in PipelineService.hJGL_Pipelines where x.UnitWorkId == q.UnitWorkId select x).Count();
|
||||
var u = BLL.UnitService.GetUnitByUnitId(q.UnitId);
|
||||
TreeNode tn1 = new TreeNode();
|
||||
tn1.NodeID = q.UnitWorkId;
|
||||
|
|
@ -168,8 +168,8 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
|||
{
|
||||
foreach (var q in unitWork2)
|
||||
{
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId
|
||||
int a = (from x in PipelineService.hJGL_Pipelines
|
||||
where x.UnitWorkId == q.UnitWorkId
|
||||
&& x.PipelineCode.Contains(this.tvPipeCode.Text.Trim())
|
||||
|
||||
select x).Count();
|
||||
|
|
@ -280,24 +280,15 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
|||
e.Node.Nodes.Clear();
|
||||
if (e.Node.CommandName == "单位工程")
|
||||
{
|
||||
var pipeline = (from x in Funs.DB.HJGL_Pipeline
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == e.Node.NodeID
|
||||
var pipeline = (from x in PipelineService.hJGL_Pipelines
|
||||
where x.UnitWorkId == e.Node.NodeID
|
||||
&& x.PipelineCode.Contains(this.tvPipeCode.Text.Trim())
|
||||
orderby x.PipelineCode
|
||||
select x).ToList();
|
||||
foreach (var item in pipeline)
|
||||
{
|
||||
var jotCount = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == item.PipelineId /*&& x.IsTwoJoint == null*/ select x).Count();
|
||||
//var weldJotCount = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == item.PipelineId && x.IsTwoJoint == null && x.WeldingDailyId != null select x).Count();
|
||||
var jotCount = (from x in WeldJointService.hJGL_WeldJoints where x.PipelineId == item.PipelineId /*&& x.IsTwoJoint == null*/ select x).Count();
|
||||
TreeNode newNode = new TreeNode();
|
||||
//if (jotCount > weldJotCount)
|
||||
//{
|
||||
// newNode.Text = "<font color='#EE0000'>" + item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】" + "</font>";
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// newNode.Text = item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】";
|
||||
//}
|
||||
newNode.Text = item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】";
|
||||
newNode.NodeID = item.PipelineId;
|
||||
newNode.CommandName = "管线";
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
|||
{
|
||||
foreach (var q in unitWork1)
|
||||
{
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId select x).Count();
|
||||
int a = (from x in PipelineService.hJGL_Pipelines where x.UnitWorkId == q.UnitWorkId select x).Count();
|
||||
var u = BLL.UnitService.GetUnitByUnitId(q.UnitId);
|
||||
TreeNode tn1 = new TreeNode();
|
||||
tn1.NodeID = q.UnitWorkId;
|
||||
|
|
@ -112,7 +112,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
|||
{
|
||||
foreach (var q in unitWork2)
|
||||
{
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId select x).Count();
|
||||
int a = (from x in PipelineService.hJGL_Pipelines where x.UnitWorkId == q.UnitWorkId select x).Count();
|
||||
var u = BLL.UnitService.GetUnitByUnitId(q.UnitId);
|
||||
TreeNode tn2 = new TreeNode();
|
||||
tn2.NodeID = q.UnitWorkId;
|
||||
|
|
@ -187,7 +187,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
|||
|
||||
// SqlParameter[] parameter = listStr.ToArray();
|
||||
// DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
Model.View_HJGL_Pipeline view_HJGL_Pipeline = new Model.View_HJGL_Pipeline();
|
||||
Model.HJGL_Pipeline view_HJGL_Pipeline = new Model.HJGL_Pipeline();
|
||||
view_HJGL_Pipeline.ProjectId = this.CurrUser.LoginProjectId;
|
||||
view_HJGL_Pipeline.UnitWorkId = this.tvControlItem.SelectedNodeID;
|
||||
view_HJGL_Pipeline.PipelineCode = this.txtPipelineCode.Text.Trim();
|
||||
|
|
@ -212,7 +212,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
|||
|
||||
}
|
||||
#endregion
|
||||
private void get3DParmeter_pipeline(List<View_HJGL_Pipeline> view_HJGL_Pipelines )
|
||||
private void get3DParmeter_pipeline(List<HJGL_Pipeline> view_HJGL_Pipelines )
|
||||
{
|
||||
if (view_HJGL_Pipelines.Any())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -94,12 +94,13 @@
|
|||
</Toolbars>
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="管线信息" ForceFit="true"
|
||||
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="PipelineId" AllowCellEditing="true"
|
||||
EnableCollapse="false" runat="server" BoxFlex="1" DataKeyNames="PipelineId" AllowCellEditing="true"
|
||||
AllowColumnLocking="true" EnableColumnLines="true" ClicksToEdit="2" DataIDField="PipelineId"
|
||||
AllowSorting="true" SortField="PipelineCode" SortDirection="ASC" OnSort="Grid1_Sort" EnableCheckBoxSelect="true"
|
||||
AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
AllowSorting="true" OnSort="Grid1_Sort" EnableCheckBoxSelect="true" SortDirection="PipelineCode"
|
||||
AllowPaging="true" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
OnRowClick="Grid1_RowClick" EnableRowClickEvent="true"
|
||||
EnableTextSelection="True" EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick">
|
||||
EnableTextSelection="True" EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick"
|
||||
IsDatabasePaging="true" PageSize="200" EnableBigDataRowTip="false" EnableBigData="true" IsFluid="true" >
|
||||
<Columns>
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号"
|
||||
Width="60px" HeaderTextAlign="Center" TextAlign="Center" />
|
||||
|
|
@ -121,7 +122,7 @@
|
|||
</f:TemplateField>
|
||||
</Columns>
|
||||
|
||||
<PageItems>
|
||||
<%--<PageItems>
|
||||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
||||
</f:ToolbarSeparator>
|
||||
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
|
||||
|
|
@ -134,7 +135,7 @@
|
|||
<f:ListItem Text="25" Value="25" />
|
||||
<f:ListItem Text="所有行" Value="10000" />
|
||||
</f:DropDownList>
|
||||
</PageItems>
|
||||
</PageItems>--%>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using BLL;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
|
|
@ -11,6 +12,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||
|
||||
public partial class PipelingDivide : PageBase
|
||||
{
|
||||
public static List<Model.HJGL_Pipeline> view_HJGL_Pipelines =new List<Model.HJGL_Pipeline>();
|
||||
public decimal PipelineComplete
|
||||
{
|
||||
get
|
||||
|
|
@ -50,7 +52,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
|
||||
// this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
|
||||
this.InitTreeMenu();//加载树
|
||||
PipelineComplete = 0;
|
||||
PipelineNOComplete = 0;
|
||||
|
|
@ -116,7 +118,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||
{
|
||||
foreach (var q in unitWork1)
|
||||
{
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId select x).Count();
|
||||
int a = (from x in PipelineService.hJGL_Pipelines where x.UnitWorkId == q.UnitWorkId select x).Count();
|
||||
var u = BLL.UnitService.GetUnitByUnitId(q.UnitId);
|
||||
TreeNode tn1 = new TreeNode();
|
||||
tn1.NodeID = q.UnitWorkId;
|
||||
|
|
@ -130,7 +132,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||
{
|
||||
foreach (var q in unitWork2)
|
||||
{
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId select x).Count();
|
||||
int a = (from x in PipelineService.hJGL_Pipelines where x.UnitWorkId == q.UnitWorkId select x).Count();
|
||||
var u = BLL.UnitService.GetUnitByUnitId(q.UnitId);
|
||||
TreeNode tn2 = new TreeNode();
|
||||
tn2.NodeID = q.UnitWorkId;
|
||||
|
|
@ -152,6 +154,16 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
|
||||
{
|
||||
this.BindGrid();
|
||||
var q = view_HJGL_Pipelines.Where(x => x.PipeArea == PipelineService.PipeArea_SHOP);
|
||||
if (q.Any())
|
||||
{
|
||||
List<string> listpipecode = new List<string>();
|
||||
foreach (var item in q)
|
||||
{
|
||||
listpipecode.Add("/" + item.PipelineCode);
|
||||
}
|
||||
Line_No = string.Join(",", listpipecode);
|
||||
}
|
||||
Model.Parameter3D parameter3D = new Model.Parameter3D();
|
||||
Model.ColorModel colorModel = new Model.ColorModel();
|
||||
colorModel = BLL.Project_SysSetService.GetColorModel(this.CurrUser.LoginProjectId);
|
||||
|
|
@ -174,31 +186,23 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||
private void BindGrid()
|
||||
{
|
||||
|
||||
Model.View_HJGL_Pipeline view_HJGL_Pipeline = new Model.View_HJGL_Pipeline();
|
||||
Model.HJGL_Pipeline view_HJGL_Pipeline = new Model.HJGL_Pipeline();
|
||||
view_HJGL_Pipeline.ProjectId = this.CurrUser.LoginProjectId;
|
||||
view_HJGL_Pipeline.UnitWorkId = this.tvControlItem.SelectedNodeID;
|
||||
view_HJGL_Pipeline.PipelineCode = this.txtPipelineCode.Text.Trim();
|
||||
view_HJGL_Pipeline.SingleName = this.txtSingleName.Text.Trim();
|
||||
view_HJGL_Pipeline.DesignPress=this.txtDesignPress.Text.Trim();
|
||||
view_HJGL_Pipeline.MaterialCode=this.txtMaterialCode.Text.Trim();
|
||||
// view_HJGL_Pipeline.MaterialCode=this.txtMaterialCode.Text.Trim();
|
||||
var list = BLL.PipelineService.GetView_HJGL_Pipelines(view_HJGL_Pipeline);
|
||||
var q = list.Where(x => x.PipeArea == PipelineService.PipeArea_SHOP );
|
||||
var q2 = list.Where(x => x.PipeArea == PipelineService.PipeArea_FIELD );
|
||||
if (q.Any())
|
||||
{
|
||||
List<string> listpipecode = new List<string>();
|
||||
foreach (var item in q)
|
||||
{
|
||||
listpipecode.Add("/" + item.PipelineCode);
|
||||
}
|
||||
Line_No = string.Join(",", listpipecode);
|
||||
}
|
||||
|
||||
PipelineComplete = q.Count();
|
||||
PipelineNOComplete = q2.Count();
|
||||
view_HJGL_Pipelines = list;
|
||||
// 2.获取当前分页数据
|
||||
Grid1.RecordCount = list.Count();
|
||||
//list = GetFilteredTable(Grid1.FilteredData, list);
|
||||
|
||||
// 2.获取当前分页数据
|
||||
|
||||
// 3.绑定到Grid
|
||||
|
||||
|
||||
var table = this.GetPagedDataTable(Grid1, list);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
|
|
@ -241,7 +245,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||
/// <param name="e"></param>
|
||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
|
||||
// Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
|
@ -325,6 +329,10 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||
#region 按钮事件
|
||||
protected void btnGetChart_Click(object sender, EventArgs e)
|
||||
{
|
||||
var q = view_HJGL_Pipelines.Where(x => x.PipeArea == PipelineService.PipeArea_SHOP);
|
||||
var q2 = view_HJGL_Pipelines.Where(x => x.PipeArea == PipelineService.PipeArea_FIELD);
|
||||
PipelineComplete = q.Count();
|
||||
PipelineNOComplete = q2.Count();
|
||||
|
||||
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("PipelingDivideChart.aspx?PipelineComplete={0}&&PipelineNOComplete={1}", PipelineComplete, PipelineNOComplete, "编辑 - ")));
|
||||
|
||||
|
|
|
|||
|
|
@ -239,33 +239,6 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label txt;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarText1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarText ToolbarText1;
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||
{
|
||||
foreach (var q in unitWork1)
|
||||
{
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId && x.PipeArea == "1" select x).Count();
|
||||
int a = (from x in PipelineService.hJGL_Pipelines where x.UnitWorkId == q.UnitWorkId && x.PipeArea == "1" select x).Count();
|
||||
var u = BLL.UnitService.GetUnitByUnitId(q.UnitId);
|
||||
TreeNode tn1 = new TreeNode();
|
||||
tn1.NodeID = q.UnitWorkId;
|
||||
|
|
@ -94,7 +94,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||
{
|
||||
foreach (var q in unitWork2)
|
||||
{
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId && x.PipeArea == "1" select x).Count();
|
||||
int a = (from x in PipelineService.hJGL_Pipelines where x.UnitWorkId == q.UnitWorkId && x.PipeArea == "1" select x).Count();
|
||||
var u = BLL.UnitService.GetUnitByUnitId(q.UnitId);
|
||||
TreeNode tn2 = new TreeNode();
|
||||
tn2.NodeID = q.UnitWorkId;
|
||||
|
|
@ -116,7 +116,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||
private void BindNodes(TreeNode node)
|
||||
{
|
||||
List<Model.HJGL_Pipeline> pipeline = new List<Model.HJGL_Pipeline>();
|
||||
var pipelines = from x in Funs.DB.HJGL_Pipeline where x.PipeArea == "1" select x;
|
||||
var pipelines = from x in PipelineService.hJGL_Pipelines where x.PipeArea == "1" select x;
|
||||
pipeline = (from x in pipelines
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == node.NodeID
|
||||
&& x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim())
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
{
|
||||
foreach (var q in unitWork1)
|
||||
{
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId select x).Count();
|
||||
int a = (from x in PipelineService.hJGL_Pipelines where x.UnitWorkId == q.UnitWorkId select x).Count();
|
||||
var u = BLL.UnitService.GetUnitByUnitId(q.UnitId);
|
||||
TreeNode tn1 = new TreeNode();
|
||||
tn1.NodeID = q.UnitWorkId;
|
||||
|
|
@ -98,7 +98,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
{
|
||||
foreach (var q in unitWork2)
|
||||
{
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId select x).Count();
|
||||
int a = (from x in PipelineService.hJGL_Pipelines where x.UnitWorkId == q.UnitWorkId select x).Count();
|
||||
var u = BLL.UnitService.GetUnitByUnitId(q.UnitId);
|
||||
TreeNode tn2 = new TreeNode();
|
||||
tn2.NodeID = q.UnitWorkId;
|
||||
|
|
@ -120,9 +120,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
private void BindNodes(TreeNode node)
|
||||
{
|
||||
List<Model.HJGL_Pipeline> pipeline = new List<Model.HJGL_Pipeline>();
|
||||
var pipelines = from x in Funs.DB.HJGL_Pipeline select x;
|
||||
pipeline = (from x in pipelines
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == node.NodeID
|
||||
pipeline = (from x in PipelineService.hJGL_Pipelines
|
||||
where x.UnitWorkId == node.NodeID
|
||||
&& x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim())
|
||||
orderby x.PipelineCode
|
||||
select x).ToList();
|
||||
|
|
@ -140,8 +139,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
// newNode.Text = item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】";
|
||||
//}
|
||||
|
||||
var jotCount = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == item.PipelineId && x.IsTwoJoint == true select x).Count();
|
||||
var AuditCount= (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == item.PipelineId && x.IsTwoJoint == true && x.AuditDate !=null select x).Count();
|
||||
var jotCount = (from x in WeldJointService.hJGL_WeldJoints where x.PipelineId == item.PipelineId && x.IsTwoJoint == true select x).Count();
|
||||
var AuditCount= (from x in WeldJointService.hJGL_WeldJoints where x.PipelineId == item.PipelineId && x.IsTwoJoint == true && x.AuditDate !=null select x).Count();
|
||||
TreeNode newNode = new TreeNode();
|
||||
|
||||
if (jotCount== AuditCount) //全部审核
|
||||
|
|
|
|||
|
|
@ -1381,6 +1381,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
}
|
||||
|
||||
ShowNotify("导入成功!", MessageBoxIcon.Success);
|
||||
PipelineService.hJGL_Pipelines = PipelineService.GetPipelinesByProjectId(this.CurrUser.LoginProjectId);
|
||||
WeldJointService.hJGL_WeldJoints = WeldJointService.GetWeldJointByProjectid(this.CurrUser.LoginProjectId);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
else
|
||||
|
|
@ -1485,7 +1487,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
#endregion
|
||||
void addPipelines(List<Model.View_HJGL_WeldJoint> PipelineList, string UnitWorkId)
|
||||
{
|
||||
var getPipeline = from x in Funs.DB.View_HJGL_WeldJoint where x.UnitWorkId == UnitWorkId select x;
|
||||
// var getPipeline = from x in Funs.DB.View_HJGL_WeldJoint where x.UnitWorkId == UnitWorkId select x;
|
||||
var pipelines = (from x in PipelineList
|
||||
select new Model.HJGL_Pipeline
|
||||
{
|
||||
|
|
@ -1565,8 +1567,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
pipeline.MaterialId = pipelines[i].MaterialId;
|
||||
pipeline.Remark = pipelines[i].Remark;
|
||||
|
||||
var isExistPipelineCode = getPipeline.FirstOrDefault(x => x.PipelineCode == pipeline.PipelineCode && x.UnitWorkId == UnitWorkId);
|
||||
if (isExistPipelineCode != null) // 更新管线
|
||||
var isExistPipelineCode = PipelineService.GetPipelineByCode(pipeline.PipelineCode, pipeline.UnitWorkId);
|
||||
if (isExistPipelineCode!=null) // 更新管线
|
||||
{
|
||||
pipeline.PipelineId = isExistPipelineCode.PipelineId;
|
||||
BLL.PipelineService.UpdatePipeline(pipeline);
|
||||
|
|
@ -1582,7 +1584,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
}
|
||||
void addHJGL_WeldJoints(List<Model.View_HJGL_WeldJoint> PipelineList, string UnitWorkId)
|
||||
{
|
||||
var getweldjonts = from x in Funs.DB.View_HJGL_WeldJoint where x.UnitWorkId == UnitWorkId select x;
|
||||
var getpipelines= from y in Funs.DB.HJGL_Pipeline where y.UnitWorkId== UnitWorkId select y;
|
||||
List<Model.HJGL_WeldJoint> weldJoints_add = new List<Model.HJGL_WeldJoint>();
|
||||
|
||||
|
|
@ -1637,7 +1638,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
weldJoint.JointAttribute = weldJoints[i].JointAttribute;
|
||||
weldJoint.ProjectId = weldJoints[i].ProjectId;
|
||||
|
||||
var isExistJot = getweldjonts.FirstOrDefault(x => x.PipelineId == weldJoint.PipelineId && x.WeldJointCode == PipelineList[i].WeldJointCode);
|
||||
var isExistJot = WeldJointService.GetWeldJointsByWeldJointCode(weldJoint.PipelineId, weldJoint.WeldJointCode);
|
||||
if (isExistJot != null) // 更新焊口
|
||||
{
|
||||
weldJoint.WeldJointId = isExistJot.WeldJointId;
|
||||
|
|
|
|||
|
|
@ -1,21 +1,27 @@
|
|||
using BLL;
|
||||
using Apache.NMS.ActiveMQ.Threads;
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
|
||||
namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
public partial class WeldJointList : PageBase
|
||||
{
|
||||
public static List<Model.HJGL_WeldJoint> WeldJointlist = new List<Model.HJGL_WeldJoint>();
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
if (!IsPostBack)
|
||||
{
|
||||
// WeldJointlist = WeldJointService.GetWeldJointByProjectid(this.CurrUser.LoginProjectId);
|
||||
this.InitTreeMenu();//加载树
|
||||
//显示列
|
||||
//Model.Sys_UserShowColumns c = BLL.UserShowColumnsService.GetColumnsByUserId(this.CurrUser.PersonId, "Joint");
|
||||
|
|
@ -176,33 +182,30 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
|
||||
protected void tvControlItem_TreeNodeExpanded(object sender, TreeNodeEventArgs e)
|
||||
{
|
||||
|
||||
e.Node.Nodes.Clear();
|
||||
|
||||
if (e.Node.CommandName == "单位工程")
|
||||
{
|
||||
var pipeline = (from x in Funs.DB.HJGL_Pipeline
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == e.Node.NodeID
|
||||
&& x.PipelineCode.Contains(this.tvPipeCode.Text.Trim())
|
||||
var pipeline = (from x in BLL.PipelineService.hJGL_Pipelines
|
||||
where x.UnitWorkId == e.Node.NodeID && x.PipelineCode.Contains(this.tvPipeCode.Text.Trim())
|
||||
orderby x.PipelineCode
|
||||
select x).ToList();
|
||||
|
||||
// var WeldJointlist = (from x in Funs.DB.View_HJGL_WeldJoint where x.UnitWorkId == e.Node.NodeID && x.IsTwoJoint == null select x).ToList();
|
||||
|
||||
foreach (var item in pipeline)
|
||||
{
|
||||
var jotCount = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == item.PipelineId && x.IsTwoJoint == null select x).Count();
|
||||
//var weldJotCount = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == item.PipelineId && x.IsTwoJoint == null && x.WeldingDailyId != null select x).Count();
|
||||
//var jotCount = WeldJointlist.Where(x => x.PipelineId == item.PipelineId).Count();
|
||||
var jotCount = WeldJointService.hJGL_WeldJoints.Where(x => x.PipelineId == item.PipelineId).Count();
|
||||
TreeNode newNode = new TreeNode();
|
||||
//if (jotCount > weldJotCount)
|
||||
//{
|
||||
// newNode.Text = "<font color='#EE0000'>" + item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】" + "</font>";
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// newNode.Text = item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】";
|
||||
//}
|
||||
newNode.Text = item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】";
|
||||
newNode.NodeID = item.PipelineId;
|
||||
newNode.EnableClickEvent = true;
|
||||
e.Node.Nodes.Add(newNode);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
foreach (var q in unitWork1)
|
||||
{
|
||||
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId && x.PipeArea == PipeArea select x).Count();
|
||||
int a = (from x in PipelineService.hJGL_Pipelines where x.UnitWorkId == q.UnitWorkId && x.PipeArea == PipeArea select x).Count();
|
||||
var u = BLL.UnitService.GetUnitByUnitId(q.UnitId);
|
||||
TreeNode tn1 = new TreeNode();
|
||||
tn1.NodeID = q.UnitWorkId;
|
||||
|
|
@ -119,7 +119,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
{
|
||||
foreach (var q in unitWork2)
|
||||
{
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId && x.PipeArea == PipeArea select x).Count();
|
||||
int a = (from x in PipelineService.hJGL_Pipelines where x.UnitWorkId == q.UnitWorkId && x.PipeArea == PipeArea select x).Count();
|
||||
var u = BLL.UnitService.GetUnitByUnitId(q.UnitId);
|
||||
TreeNode tn2 = new TreeNode();
|
||||
tn2.NodeID = q.UnitWorkId;
|
||||
|
|
@ -151,8 +151,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
if (e.Node.CommandName == "单位工程")
|
||||
{
|
||||
|
||||
var pipeline = (from x in Funs.DB.HJGL_Pipeline
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == e.Node.NodeID && x.PipeArea == PipeArea
|
||||
var pipeline = (from x in PipelineService.hJGL_Pipelines
|
||||
where x.UnitWorkId == e.Node.NodeID && x.PipeArea == PipeArea
|
||||
orderby x.PipelineCode
|
||||
select x).ToList();
|
||||
if (!string .IsNullOrEmpty (txtPipelineCode.Text.Trim()))
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
{
|
||||
foreach (var q in unitWork1)
|
||||
{
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId select x).Count();
|
||||
int a = (from x in PipelineService.hJGL_Pipelines where x.UnitWorkId == q.UnitWorkId select x).Count();
|
||||
var u = BLL.UnitService.GetUnitByUnitId(q.UnitId);
|
||||
TreeNode tn1 = new TreeNode();
|
||||
tn1.NodeID = q.UnitWorkId;
|
||||
|
|
@ -94,7 +94,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
{
|
||||
foreach (var q in unitWork2)
|
||||
{
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId select x).Count();
|
||||
int a = (from x in PipelineService.hJGL_Pipelines where x.UnitWorkId == q.UnitWorkId select x).Count();
|
||||
var u = BLL.UnitService.GetUnitByUnitId(q.UnitId);
|
||||
TreeNode tn2 = new TreeNode();
|
||||
tn2.NodeID = q.UnitWorkId;
|
||||
|
|
@ -124,14 +124,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
e.Node.Nodes.Clear();
|
||||
if (e.Node.CommandName == "单位工程")
|
||||
{
|
||||
var pipeline = (from x in Funs.DB.HJGL_Pipeline
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == e.Node.NodeID
|
||||
var pipeline = (from x in PipelineService.hJGL_Pipelines
|
||||
where x.UnitWorkId == e.Node.NodeID
|
||||
&& x.PipelineCode.Contains(txtPipelineCode.Text.Trim())
|
||||
orderby x.PipelineCode
|
||||
select x).ToList();
|
||||
foreach (var item in pipeline)
|
||||
{
|
||||
var jotCount = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == item.PipelineId && x.IsTwoJoint == null select x).Count();
|
||||
var jotCount = (from x in WeldJointService.hJGL_WeldJoints where x.PipelineId == item.PipelineId && x.IsTwoJoint == null select x).Count();
|
||||
//var weldJotCount = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == item.PipelineId && x.IsTwoJoint == null && x.WeldingDailyId != null select x).Count();
|
||||
|
||||
//if (jotCount > weldJotCount)
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
{
|
||||
foreach (var q in unitWork1)
|
||||
{
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId select x).Count();
|
||||
int a = (from x in PipelineService.hJGL_Pipelines where x.UnitWorkId == q.UnitWorkId select x).Count();
|
||||
var u = BLL.UnitService.GetUnitByUnitId(q.UnitId);
|
||||
TreeNode tn1 = new TreeNode();
|
||||
tn1.NodeID = q.UnitWorkId;
|
||||
|
|
@ -97,7 +97,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
{
|
||||
foreach (var q in unitWork2)
|
||||
{
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId select x).Count();
|
||||
int a = (from x in PipelineService.hJGL_Pipelines where x.UnitWorkId == q.UnitWorkId select x).Count();
|
||||
var u = BLL.UnitService.GetUnitByUnitId(q.UnitId);
|
||||
TreeNode tn2 = new TreeNode();
|
||||
tn2.NodeID = q.UnitWorkId;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
using System;
|
||||
|
||||
using BLL;
|
||||
namespace FineUIPro.Web
|
||||
{
|
||||
public partial class mainMenu_HJGL_AVEVA : PageBase
|
||||
|
|
@ -8,6 +8,8 @@ namespace FineUIPro.Web
|
|||
{
|
||||
ctlAuditFlow.Url = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId);
|
||||
ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId) + "item/IPE%7CVPD%7CArea-15A";
|
||||
PipelineService.hJGL_Pipelines= PipelineService.GetPipelinesByProjectId(this.CurrUser.LoginProjectId);
|
||||
WeldJointService.hJGL_WeldJoints=WeldJointService.GetWeldJointByProjectid(this.CurrUser.LoginProjectId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -665,13 +665,13 @@
|
|||
// updateLocationHash: 切换Tab时,是否更新地址栏Hash值
|
||||
// refreshWhenExist: 添加选项卡时,如果选项卡已经存在,是否刷新内部IFrame
|
||||
// refreshWhenTabChange: 切换选项卡时,是否刷新内部IFrame
|
||||
F.initTreeTabStrip(mainMenu, mainTabStrip, true, false, false);
|
||||
var themeTitle = F.cookie('Theme_Pro_Title');
|
||||
var themeName = F.cookie('Theme_Pro');
|
||||
if (themeTitle) {
|
||||
F.removeCookie('Theme_Pro_Title');
|
||||
//notify('主题更改为:' + themeTitle + '(' + themeName + ')');
|
||||
}
|
||||
//F.initTreeTabStrip(mainMenu, mainTabStrip, true, false, false);
|
||||
//var themeTitle = F.cookie('Theme_Pro_Title');
|
||||
//var themeName = F.cookie('Theme_Pro');
|
||||
//if (themeTitle) {
|
||||
// F.removeCookie('Theme_Pro_Title');
|
||||
// //notify('主题更改为:' + themeTitle + '(' + themeName + ')');
|
||||
//}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
|
|
|||
Loading…
Reference in New Issue