diff --git a/.vs/SGGL_SeDin/v17/.wsuo b/.vs/SGGL_SeDin/v17/.wsuo index 7dcba977..ec072382 100644 Binary files a/.vs/SGGL_SeDin/v17/.wsuo and b/.vs/SGGL_SeDin/v17/.wsuo differ diff --git a/SGGL/BLL/HJGL/WeldingManage/PipelineService.cs b/SGGL/BLL/HJGL/WeldingManage/PipelineService.cs index 338ddfbd..1ec71b3c 100644 --- a/SGGL/BLL/HJGL/WeldingManage/PipelineService.cs +++ b/SGGL/BLL/HJGL/WeldingManage/PipelineService.cs @@ -24,7 +24,13 @@ namespace BLL /// 现场安装 /// public const string PipeArea_FIELD = "2"; - + public static List hJGL_Pipelines + { + + get; + set; + + } /// /// 实际日期类型 /// @@ -161,18 +167,18 @@ namespace BLL { return Funs.DB.HJGL_Pipeline.FirstOrDefault(e => e.PipelineCode == pipelineCode); } - public static List GetView_HJGL_Pipelines(View_HJGL_Pipeline model) + public static List GetView_HJGL_Pipelines(HJGL_Pipeline model) { var db = Funs.DB; - var pipelineList =( from x in db.View_HJGL_Pipeline - where + 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)) - select x).ToList(); + /* && (string.IsNullOrEmpty(model.MaterialCode) || x.MaterialCode.Contains(model.MaterialCode))*/ + select x).ToList(); if (model.IsFinished!=null) { if (model.IsFinished==true) @@ -200,6 +206,17 @@ namespace BLL return q; } /// + /// 根据项目获取所有管线 + /// + /// + /// + public static List GetPipelinesByProjectId(string ProjectId) + { + + var q = Funs.DB.HJGL_Pipeline.Where(e => e.ProjectId == ProjectId).ToList(); + return q; + } + /// /// 根据管线ID获取管线信息 /// /// @@ -385,10 +402,28 @@ namespace BLL } } - /// - /// 添加作业管线 - /// - /// + 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; diff --git a/SGGL/BLL/HJGL/WeldingManage/WeldJointService.cs b/SGGL/BLL/HJGL/WeldingManage/WeldJointService.cs index ef34565d..62805c45 100644 --- a/SGGL/BLL/HJGL/WeldingManage/WeldJointService.cs +++ b/SGGL/BLL/HJGL/WeldingManage/WeldJointService.cs @@ -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 hJGL_WeldJoints + { + + get; + set; + + } /// /// 根据焊口Id获取焊口信息 /// @@ -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; + } + + /// /// 添加 /// @@ -312,6 +331,26 @@ namespace BLL Model.SGGLDB db = Funs.DB; return db.View_HJGL_WeldJoint.FirstOrDefault(e => e.WeldJointId == weldJointId); } + public static List 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 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; + } /// /// 根据焊口Id获取插入焊口数 diff --git a/SGGL/FineUIPro.Web/HJGL/InfoQuery/JointQuery.aspx.cs b/SGGL/FineUIPro.Web/HJGL/InfoQuery/JointQuery.aspx.cs index 7ca28e91..e6b16899 100644 --- a/SGGL/FineUIPro.Web/HJGL/InfoQuery/JointQuery.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/InfoQuery/JointQuery.aspx.cs @@ -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 = "" + item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】" + ""; - //} - //else - //{ - // newNode.Text = item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】"; - //} newNode.Text = item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】"; newNode.NodeID = item.PipelineId; newNode.CommandName = "管线"; diff --git a/SGGL/FineUIPro.Web/HJGL/InfoQuery/PipelineQuery.aspx.cs b/SGGL/FineUIPro.Web/HJGL/InfoQuery/PipelineQuery.aspx.cs index 7585a079..65c84030 100644 --- a/SGGL/FineUIPro.Web/HJGL/InfoQuery/PipelineQuery.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/InfoQuery/PipelineQuery.aspx.cs @@ -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_Pipelines ) + private void get3DParmeter_pipeline(List view_HJGL_Pipelines ) { if (view_HJGL_Pipelines.Any()) { diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PipelingDivide.aspx b/SGGL/FineUIPro.Web/HJGL/PreDesign/PipelingDivide.aspx index c34657d8..9f5a09f1 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/PipelingDivide.aspx +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PipelingDivide.aspx @@ -94,12 +94,13 @@ + EnableTextSelection="True" EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" + IsDatabasePaging="true" PageSize="200" EnableBigDataRowTip="false" EnableBigData="true" IsFluid="true" > @@ -121,7 +122,7 @@ - + <%-- @@ -134,7 +135,7 @@ - + --%> diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PipelingDivide.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/PipelingDivide.aspx.cs index 795dcd82..600e016a 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/PipelingDivide.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PipelingDivide.aspx.cs @@ -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 view_HJGL_Pipelines =new List(); 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 listpipecode = new List(); + 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,32 +186,24 @@ 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 listpipecode = new List(); - 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); - var table = this.GetPagedDataTable(Grid1, list); + + // 2.获取当前分页数据 + + // 3.绑定到Grid + + + var table = this.GetPagedDataTable(Grid1, list); Grid1.DataSource = table; Grid1.DataBind(); } @@ -241,7 +245,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) { - Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + // Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); BindGrid(); } #endregion @@ -325,7 +329,11 @@ 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, "编辑 - "))); } diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PipelingDivide.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/PipelingDivide.aspx.designer.cs index 0a835b60..a0c9d2bc 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/PipelingDivide.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PipelingDivide.aspx.designer.cs @@ -239,33 +239,6 @@ namespace FineUIPro.Web.HJGL.PreDesign /// protected global::System.Web.UI.WebControls.Label txt; - /// - /// ToolbarSeparator1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; - - /// - /// ToolbarText1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.ToolbarText ToolbarText1; - - /// - /// ddlPageSize 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DropDownList ddlPageSize; - /// /// Window1 控件。 /// diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PrePipeline.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/PrePipeline.aspx.cs index 6d77ee72..4110d8ca 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/PrePipeline.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PrePipeline.aspx.cs @@ -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 pipeline = new List(); - 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()) diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.cs index c9852440..8e48b7fe 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.cs @@ -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 pipeline = new List(); - 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) //全部审核 diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineListPDMSIn.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineListPDMSIn.aspx.cs index 6706249e..79a71ef4 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineListPDMSIn.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineListPDMSIn.aspx.cs @@ -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 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 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 weldJoints_add = new List(); @@ -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; diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointList.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointList.aspx.cs index e1375e29..2d9662f4 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointList.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointList.aspx.cs @@ -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 WeldJointlist = new List(); + 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"); @@ -173,36 +179,33 @@ namespace FineUIPro.Web.HJGL.WeldingManage //} } #endregion - + 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 = "" + item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】" + ""; - //} - //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); + } + } } diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldMatMatch.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldMatMatch.aspx.cs index c31a7c71..8e666f44 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldMatMatch.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldMatMatch.aspx.cs @@ -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())) diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingConDate.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingConDate.aspx.cs index ef9cfce5..9890cd19 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingConDate.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingConDate.aspx.cs @@ -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) diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingPlan.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingPlan.aspx.cs index b71c1534..46960c8f 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingPlan.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingPlan.aspx.cs @@ -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; diff --git a/SGGL/FineUIPro.Web/common/mainMenu_HJGL_AVEVA.aspx.cs b/SGGL/FineUIPro.Web/common/mainMenu_HJGL_AVEVA.aspx.cs index c4590247..d07f5746 100644 --- a/SGGL/FineUIPro.Web/common/mainMenu_HJGL_AVEVA.aspx.cs +++ b/SGGL/FineUIPro.Web/common/mainMenu_HJGL_AVEVA.aspx.cs @@ -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); } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/index.aspx b/SGGL/FineUIPro.Web/index.aspx index 0b6f5406..fe888059 100644 --- a/SGGL/FineUIPro.Web/index.aspx +++ b/SGGL/FineUIPro.Web/index.aspx @@ -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 + ')'); + //} });