2023-02-20 001 焊接修改

This commit is contained in:
2023-02-20 10:49:51 +08:00
parent 7e66339f48
commit ef6bbc170e
37 changed files with 1649 additions and 306 deletions
@@ -11,7 +11,7 @@
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region" EnableCollapse="true">
<Items>
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
EnableCollapse="true" Width="300px" Title="WBS目录"
@@ -34,21 +34,21 @@
</f:Tree>
</Items>
</f:Panel>
<f:Panel ID="Panel2" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
ShowHeader="false" Layout="Region" BoxConfigAlign="Stretch">
<f:Panel ID="Panel2" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false" EnableCollapse="true"
ShowHeader="false" Layout="Region" >
<Items>
<f:Panel ID="panelTopRegion" runat="server" RegionPosition="Center" ShowBorder="true" RegionPercent="60%"
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" Title="三维模型"
TitleToolTip="三维模型显示" AutoScroll="true">
ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" Title="三维模型"
TitleToolTip="三维模型显示" >
<Items>
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true"
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false"
BodyPadding="0px">
<uc1:_3DLook ID="ctlAuditFlow" runat="server" Width="1000px" Height="1000px" />
</f:ContentPanel>
</Items>
</f:Panel>
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Bottom" RegionSplit="true" EnableCollapse="true" ShowBorder="true"
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Bottom" RegionSplit="true" ShowBorder="true"
Layout="Fit" ShowHeader="false" RegionSplitWidth="20px" BodyPadding="1px" Height="400px" IconFont="PlusCircle" Title="管线信息"
TitleToolTip="管线信息" AutoScroll="true" RegionPercent="40%">
<Toolbars>
@@ -48,6 +48,10 @@
<f:DropDownList ID="drpState" Label="组件状态" runat="server"
ShowRedStar="true" Required="true" EnableEdit="true" LabelWidth="100px">
</f:DropDownList>
<f:DropDownList ID="drpProductionState" Label="生产状态" runat="server"
ShowRedStar="true" Required="true" EnableEdit="true" LabelWidth="100px">
</f:DropDownList>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:Button ID="btnNew" Text="新增" Icon="Add" runat="server" OnClick="btnNew_Click" Hidden="true">
@@ -108,6 +112,12 @@
<asp:Label ID="lbstate" runat="server" Text='<%# ConvertState(Eval("State")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField ColumnID="tfState" Width="200px" HeaderText="生产状态" HeaderTextAlign="Center"
TextAlign="Left">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# ConvertProductionState(Eval("ProductionState")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="200px" ColumnID="PlanStartDate" DataField="PlanStartDate" SortField="PlanStartDate"
FieldType="String" HeaderText="管线计划安装日期"
HeaderTextAlign="Center"
@@ -22,6 +22,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
this.InitTreeMenu();//加载树
HJGL_PipelineComponentService.InitMainItemDownList(drpState,true);
HJGL_PipelineComponentService.InitMainItemDownProductionStateList(drpProductionState,true);
}
@@ -223,7 +224,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
{
string strSql = @" SELECT com.PipelineComponentId,com.PipelineComponentCode,com.BoxNumber,
com.PipelineId, punit.UnitName AS PreUnit,aunit.UnitName AS AssembleUnit,
com.QRCode,com.State,pipe.PlanStartDate,com.DrawingName,com.ReceiveDate,
com.QRCode,com.State,com.ProductionState,pipe.PlanStartDate,com.DrawingName,com.ReceiveDate,
person.PersonName
FROM HJGL_Pipeline_Component com
LEFT JOIN HJGL_Pipeline pipe ON pipe.PipelineId =com.PipelineId
@@ -248,7 +249,12 @@ namespace FineUIPro.Web.HJGL.PreDesign
listStr.Add(new SqlParameter("@State", drpState.SelectedValue));
}
if (drpProductionState.SelectedValue != Const._Null)
{
strSql += " AND com.ProductionState =@ProductionState";
listStr.Add(new SqlParameter("@ProductionState", drpProductionState.SelectedValue.ToString()));
}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
@@ -518,6 +524,22 @@ namespace FineUIPro.Web.HJGL.PreDesign
}
return StateName;
}
public string ConvertProductionState(object state)
{
string StateName = string.Empty;
if (!string.IsNullOrEmpty(state.ToString()))
{
if (state != null)
{
string txt = HJGL_PipelineComponentService.GetProductionState().FirstOrDefault(x => x.Value == state.ToString()).Text;
return txt;
}
return "";
}
return StateName;
}
protected void btnImportQRCode_Click(object sender, EventArgs e)
{
PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("PrePipelineQRCodeIn.aspx?", "导入 - ")));
@@ -122,6 +122,15 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// </remarks>
protected global::FineUIPro.DropDownList drpState;
/// <summary>
/// drpProductionState 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpProductionState;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
@@ -230,6 +239,15 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// </remarks>
protected global::System.Web.UI.WebControls.Label lbstate;
/// <summary>
/// Label1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label1;
/// <summary>
/// ToolbarSeparator1 控件。
/// </summary>
@@ -1,5 +1,6 @@
using BLL;
using MiniExcelLibs;
using Model;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
@@ -264,7 +265,9 @@ namespace FineUIPro.Web.HJGL.PreDesign
//hJGL_Pipeline_Component.QRCode = JsonConvert.SerializeObject(rootName);
hJGL_Pipeline_Component.QRCode = item.QRCode;
Pipeline_ComponentList.Add(hJGL_Pipeline_Component);
}
}
@@ -335,6 +338,34 @@ namespace FineUIPro.Web.HJGL.PreDesign
foreach (var item in Pipeline_ComponentList)
{
BLL.HJGL_PipelineComponentService.UpdatePipelineComponent(item);
HJGL_PipelineComponentjointService.DeleteHJGL_Pipeline_ComponentJointByPipelineComponentId(item.PipelineComponentId);
var QRCodeList = item.QRCode.Split(';').ToList();
foreach (var QRCodeitem in QRCodeList)
{
var joint = BLL.WeldJointService.GetWeldJointsByWeldJointCode(item.PipelineId, QRCodeitem.Substring(1));
if (joint != null)
{
var ComponetJoint = BLL.HJGL_PipelineComponentjointService.GetHJGL_Pipeline_ComponentJointByWeldJointId(joint.WeldJointId);
if (ComponetJoint!=null)
{
ComponetJoint.PipelineComponentCode= item.PipelineComponentCode;
ComponetJoint.PipelineComponentId = item.PipelineComponentId;
HJGL_PipelineComponentjointService.UpdateHJGL_Pipeline_ComponentJoint(ComponetJoint);
}
else
{
Model.HJGL_Pipeline_ComponentJoint hJGL_Pipeline_ComponentJoint = new Model.HJGL_Pipeline_ComponentJoint();
hJGL_Pipeline_ComponentJoint.Id = SQLHelper.GetNewID();
ComponetJoint.PipelineComponentCode = item.PipelineComponentCode;
ComponetJoint.PipelineComponentId = item.PipelineComponentId;
ComponetJoint.WeldJointCode = joint.WeldJointCode;
ComponetJoint.WeldJointId=joint.WeldJointId;
HJGL_PipelineComponentjointService.AddHJGL_Pipeline_ComponentJoint(ComponetJoint);
}
}
}
}
}
int a = PipelineList.Count();