feat(hjgl): 完善焊前检查和防腐检查流程
焊前检查需要同时覆盖下料、组对和防腐检查,并支持移动端查询与保存。 扩展焊前检查模型、服务和页面字段,补充检查结果、不合格原因、整改要求、 附件和防腐检查记录,便于按焊口和材料追溯检查过程。
This commit is contained in:
@@ -324,18 +324,27 @@
|
||||
IsModal="true" Width="800px" Height="560px">
|
||||
</f:Window>
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<f:MenuButton ID="btnEditMatGrid1" OnClick="btnEditMatGrid1_Click" EnablePostBack="true"
|
||||
runat="server" Text="编辑" Icon="Pencil">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnDelMatGrid1" OnClick="btnDelMatGrid1_Click" EnablePostBack="true"
|
||||
ConfirmText="删除选中行?" ConfirmTarget="Top" runat="server"
|
||||
Text="删除" Icon="Delete">
|
||||
</f:MenuButton>
|
||||
</f:Menu>
|
||||
<f:Menu ID="Menu2" runat="server">
|
||||
<f:MenuButton ID="btnEditMatGrid2" OnClick="btnEditMatGrid2_Click" EnablePostBack="true"
|
||||
runat="server" Text="编辑" Icon="Pencil">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnDelMat" OnClick="btnDelMatGrid2_Click" EnablePostBack="true"
|
||||
ConfirmText="删除选中行?" ConfirmTarget="Top" runat="server"
|
||||
Text="删除" Icon="Delete">
|
||||
</f:MenuButton>
|
||||
</f:Menu>
|
||||
<f:Menu ID="Menu3" runat="server">
|
||||
<f:MenuButton ID="btnEditMatGrid3" OnClick="btnEditMatGrid3_Click" EnablePostBack="true"
|
||||
runat="server" Text="编辑" Icon="Pencil">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnDelMat2" OnClick="btnDelMatGrid3_Click" EnablePostBack="true"
|
||||
ConfirmText="删除选中行?" ConfirmTarget="Top" runat="server"
|
||||
Text="删除" Icon="Delete">
|
||||
@@ -346,18 +355,25 @@
|
||||
var menuID1 = '<%= Menu1.ClientID %>';
|
||||
var menuID2 = '<%= Menu2.ClientID %>';
|
||||
var menuID3 = '<%= Menu3.ClientID %>';
|
||||
var gridID1 = '<%= Grid1.ClientID %>';
|
||||
var gridID2 = '<%= Grid2.ClientID %>';
|
||||
var gridID3 = '<%= Grid3.ClientID %>';
|
||||
function selectRowAndShowMenu(gridID, menuID, rowId) {
|
||||
if (rowId) {
|
||||
F(gridID).selectRow(rowId);
|
||||
}
|
||||
F(menuID).show();
|
||||
return false;
|
||||
}
|
||||
// 返回false,来阻止浏览器右键菜单
|
||||
function onRowContextMenu3(event, rowId) {
|
||||
F(menuID3).show(); //showAt(event.pageX, event.pageY);
|
||||
return false;
|
||||
return selectRowAndShowMenu(gridID3, menuID3, rowId);
|
||||
}
|
||||
function onRowContextMenu2(event, rowId) {
|
||||
F(menuID2).show(); //showAt(event.pageX, event.pageY);
|
||||
return false;
|
||||
return selectRowAndShowMenu(gridID2, menuID2, rowId);
|
||||
}
|
||||
function onRowContextMenu1(event, rowId) {
|
||||
F(menuID1).show(); //showAt(event.pageX, event.pageY);
|
||||
return false;
|
||||
return selectRowAndShowMenu(gridID1, menuID1, rowId);
|
||||
}
|
||||
function onGridDataLoad(event) {
|
||||
this.mergeColumns(['PrefabricatedComponents']);
|
||||
|
||||
@@ -545,7 +545,57 @@ namespace FineUIPro.Web.HJGL.DataImport
|
||||
}
|
||||
}
|
||||
|
||||
#region 右键菜单删除
|
||||
#region 右键菜单维护
|
||||
|
||||
/// <summary>
|
||||
/// 维护工厂预制材料编码。
|
||||
/// </summary>
|
||||
protected void btnEditMatGrid1_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenMaterialCodeEdit(Grid1);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 维护现场施工材料编码。
|
||||
/// </summary>
|
||||
protected void btnEditMatGrid2_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenMaterialCodeEdit(Grid2);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 维护预制散件材料编码。
|
||||
/// </summary>
|
||||
protected void btnEditMatGrid3_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenMaterialCodeEdit(Grid3);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 打开材料编码维护窗口,按管线材料ID只维护 HJGL_PipeLineMat.MaterialCode2。
|
||||
/// </summary>
|
||||
private void OpenMaterialCodeEdit(Grid grid)
|
||||
{
|
||||
if (!CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.HJGL_WeldJointMenuId, Const.BtnModify))
|
||||
{
|
||||
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
if (grid.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
if (grid.SelectedRowIndexArray.Length > 1)
|
||||
{
|
||||
Alert.ShowInTop("一次只能编辑一条记录", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
PageContext.RegisterStartupScript(Window5.GetShowReference(String.Format("MaterialInformationEdit.aspx?PipeLineMatId={0}", grid.SelectedRowID), "维护材料编码", 500, 180));
|
||||
}
|
||||
|
||||
|
||||
protected void btnDelMatGrid2_Click(object sender, EventArgs e)
|
||||
@@ -735,7 +785,9 @@ namespace FineUIPro.Web.HJGL.DataImport
|
||||
|
||||
protected void Window5_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
// this.BindGrid1(this.tvControlItem.SelectedNodeID);
|
||||
this.BindGrid1(this.tvControlItem.SelectedNodeID, this.hdUnitWorkId.Text);
|
||||
this.BindGrid2(this.tvControlItem.SelectedNodeID, this.hdUnitWorkId.Text);
|
||||
this.BindGrid3(this.tvControlItem.SelectedNodeID, this.hdUnitWorkId.Text);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -338,6 +338,15 @@ namespace FineUIPro.Web.HJGL.DataImport
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu1;
|
||||
|
||||
/// <summary>
|
||||
/// btnEditMatGrid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnEditMatGrid1;
|
||||
|
||||
/// <summary>
|
||||
/// btnDelMatGrid1 控件。
|
||||
/// </summary>
|
||||
@@ -356,6 +365,15 @@ namespace FineUIPro.Web.HJGL.DataImport
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu2;
|
||||
|
||||
/// <summary>
|
||||
/// btnEditMatGrid2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnEditMatGrid2;
|
||||
|
||||
/// <summary>
|
||||
/// btnDelMat 控件。
|
||||
/// </summary>
|
||||
@@ -374,6 +392,15 @@ namespace FineUIPro.Web.HJGL.DataImport
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu3;
|
||||
|
||||
/// <summary>
|
||||
/// btnEditMatGrid3 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnEditMatGrid3;
|
||||
|
||||
/// <summary>
|
||||
/// btnDelMat2 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MaterialInformationEdit.aspx.cs" Inherits="FineUIPro.Web.HJGL.DataImport.MaterialInformationEdit" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>维护材料编码</title>
|
||||
<base target="_self" />
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" />
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtMaterialCode" runat="server" Label="材料编码"
|
||||
MaxLength="50" FocusOnPageLoad="true" LabelWidth="100px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" Text="保存" runat="server"
|
||||
ValidateForms="SimpleForm1" OnClick="btnSave_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnClose" EnablePostBack="false" Text="关闭"
|
||||
runat="server" Icon="SystemClose">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Form>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,57 @@
|
||||
using BLL;
|
||||
using System;
|
||||
|
||||
namespace FineUIPro.Web.HJGL.DataImport
|
||||
{
|
||||
public partial class MaterialInformationEdit : PageBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 管线材料ID。
|
||||
/// </summary>
|
||||
public string PipeLineMatId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["PipeLineMatId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["PipeLineMatId"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
this.PipeLineMatId = Request.Params["PipeLineMatId"];
|
||||
|
||||
Model.HJGL_PipeLineMat pipeLineMat = PipelineMatService.GetPipeLineMat(this.PipeLineMatId);
|
||||
if (pipeLineMat == null)
|
||||
{
|
||||
Alert.ShowInTop("未找到材料记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
this.txtMaterialCode.Text = pipeLineMat.MaterialCode2;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存材料编码。
|
||||
/// </summary>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.PipeLineMatId))
|
||||
{
|
||||
Alert.ShowInTop("未找到材料记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
PipelineMatService.UpdateMaterialCode2(this.PipeLineMatId, this.txtMaterialCode.Text.Trim());
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HJGL.DataImport
|
||||
{
|
||||
|
||||
|
||||
public partial class MaterialInformationEdit
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// SimpleForm1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
|
||||
/// <summary>
|
||||
/// txtMaterialCode 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtMaterialCode;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// btnClose 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnClose;
|
||||
}
|
||||
}
|
||||
@@ -947,8 +947,8 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
HJGL_MaterialCodeLib lib2 = GetMaterialLib(row2, libsByMaterialCode, libsByCode);
|
||||
|
||||
DataRow dr = tb.NewRow();
|
||||
dr["PipelineCode"] = joint.PipelineCode;
|
||||
dr["SegmentCode"] = preCode;
|
||||
dr["PipelineCode"] = joint.SingleNumber;
|
||||
dr["SegmentCode"] = joint.FlowingSection;
|
||||
dr["WeldJointNo"] = weldJointNo;
|
||||
dr["MaterialText"] = string.IsNullOrEmpty(joint.Material1Code) ? joint.Material2Code : joint.Material1Code;
|
||||
dr["Spec"] = joint.Specification;
|
||||
@@ -962,9 +962,9 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
dr["WelderCode"] = string.IsNullOrEmpty(joint.WelderCode) ? (string.IsNullOrEmpty(joint.BackingWelderCode) ? joint.CoverWelderCode : joint.BackingWelderCode) : joint.WelderCode;
|
||||
dr["WeldingDate"] = joint.WeldingDate;
|
||||
dr["WeldCheck"] = joint.CheckResult;
|
||||
dr["CheckDate"] = joint.AuditDate == null ? string.Empty : joint.AuditDate.Value.ToString("yyyy-MM-dd");
|
||||
dr["CheckDate"] = DateTime.Parse(joint.WeldingDate).AddDays(1).ToString("yyyy-MM-dd");
|
||||
dr["CleanCheck"] = joint.IsHotProessStr;
|
||||
dr["CleanCheckDate"] = joint.AuditDate2 == null ? string.Empty : joint.AuditDate2.Value.ToString("yyyy-MM-dd");
|
||||
dr["CleanCheckDate"] = DateTime.Parse(joint.WeldingDate).AddDays(1).ToString("yyyy-MM-dd");
|
||||
dr["WeldJointId"] = joint.WeldJointId;
|
||||
dr["Material1Code"] = joint.Material1Code;
|
||||
dr["Material2Code"] = joint.Material2Code;
|
||||
|
||||
@@ -44,6 +44,15 @@
|
||||
<f:RenderField Width="140px" ColumnID="WeldJointCode" DataField="WeldJointCode" FieldType="String"
|
||||
HeaderText="焊口号" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="CuttingLength" DataField="CuttingLength" FieldType="Double"
|
||||
HeaderText="下料长度" HeaderTextAlign="Center" TextAlign="Right">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="GrooveForm" DataField="GrooveForm" FieldType="String"
|
||||
HeaderText="坡口形式" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="GrooveAngle" DataField="GrooveAngle" FieldType="Double"
|
||||
HeaderText="坡口角度" HeaderTextAlign="Center" TextAlign="Right">
|
||||
</f:RenderField>
|
||||
<f:CheckBoxField Width="150px" ColumnID="IsMaterialCodeBatchNoAccurate" DataField="IsMaterialCodeBatchNoAccurate"
|
||||
HeaderText="材料准确" HeaderTextAlign="Center" TextAlign="Center" RenderAsStaticField="true">
|
||||
</f:CheckBoxField>
|
||||
@@ -56,9 +65,21 @@
|
||||
<f:RenderField Width="170px" ColumnID="CheckTime" DataField="CheckTime" FieldType="Date"
|
||||
RendererArgument="yyyy-MM-dd HH:mm" HeaderText="检查时间" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:CheckBoxField Width="120px" ColumnID="IsQualified" DataField="IsQualified"
|
||||
HeaderText="是否合格" HeaderTextAlign="Center" TextAlign="Center" RenderAsStaticField="true">
|
||||
</f:CheckBoxField>
|
||||
<f:RenderField Width="120px" ColumnID="CheckResult" DataField="CheckResult" FieldType="String"
|
||||
HeaderText="检查结果" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="180px" ColumnID="CreateTime" DataField="CreateTime" FieldType="Date"
|
||||
RendererArgument="yyyy-MM-dd HH:mm" HeaderText="创建时间" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="220px" ColumnID="UnqualifiedReason" DataField="UnqualifiedReason" FieldType="String"
|
||||
HeaderText="不合格原因" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="220px" ColumnID="RectifyRequirement" DataField="RectifyRequirement" FieldType="String"
|
||||
HeaderText="整改要求" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="220px" ColumnID="Remark" DataField="Remark" FieldType="String"
|
||||
HeaderText="备注" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
<PageItems>
|
||||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
||||
|
||||
@@ -20,6 +20,24 @@
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:NumberBox ID="numCuttingLength" runat="server" Label="下料长度" LabelWidth="170px" DecimalPrecision="2">
|
||||
</f:NumberBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtGrooveForm" runat="server" Label="坡口形式" LabelWidth="170px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:NumberBox ID="numGrooveAngle" runat="server" Label="坡口角度" LabelWidth="170px" DecimalPrecision="2">
|
||||
</f:NumberBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:CheckBox ID="chkMaterialCodeBatchNo" runat="server" Label="材料编码及炉批号校验"
|
||||
@@ -34,6 +52,22 @@
|
||||
</f:CheckBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="ddlCheckResult" runat="server" Label="检查结果" LabelWidth="170px" Required="true"
|
||||
ShowRedStar="true">
|
||||
<f:ListItem Text="合格" Value="合格" />
|
||||
<f:ListItem Text="不合格" Value="不合格" />
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpCheckPerson" runat="server" Label="检查人" LabelWidth="170px" Required="true"
|
||||
ShowRedStar="true" EnableEdit="true">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DatePicker ID="dpCheckTime" runat="server" Label="检查时间" LabelWidth="170px"
|
||||
@@ -41,6 +75,18 @@
|
||||
</f:DatePicker>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea ID="txtUnqualifiedReason" runat="server" Label="不合格原因" LabelWidth="170px">
|
||||
</f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea ID="txtRectifyRequirement" runat="server" Label="整改要求" LabelWidth="170px">
|
||||
</f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea ID="txtRemark" runat="server" Label="备注" MaxLength="500" LabelWidth="170px">
|
||||
|
||||
@@ -19,12 +19,15 @@ namespace FineUIPro.Web.HJGL.PreWeld
|
||||
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
CuttingCheckId = Request.Params["CuttingCheckId"];
|
||||
BindWeldJoint();
|
||||
BindCheckPerson();
|
||||
ddlCheckResult.SelectedValue = "合格";
|
||||
if (!string.IsNullOrEmpty(CuttingCheckId))
|
||||
{
|
||||
BindData();
|
||||
}
|
||||
else
|
||||
{
|
||||
drpCheckPerson.SelectedValue = CurrUser.PersonId;
|
||||
dpCheckTime.SelectedDate = DateTime.Now;
|
||||
}
|
||||
}
|
||||
@@ -49,6 +52,11 @@ namespace FineUIPro.Web.HJGL.PreWeld
|
||||
}
|
||||
}
|
||||
|
||||
private void BindCheckPerson()
|
||||
{
|
||||
Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(drpCheckPerson, CurrUser.LoginProjectId, null, null, true);
|
||||
}
|
||||
|
||||
private void BindData()
|
||||
{
|
||||
var model = PreWeldInspectionService.GetCuttingCheckById(CuttingCheckId);
|
||||
@@ -58,9 +66,22 @@ namespace FineUIPro.Web.HJGL.PreWeld
|
||||
}
|
||||
|
||||
drpWeldJoint.SelectedValue = model.WeldJointId;
|
||||
numCuttingLength.Text = model.CuttingLength.HasValue ? model.CuttingLength.Value.ToString() : string.Empty;
|
||||
txtGrooveForm.Text = model.GrooveForm;
|
||||
numGrooveAngle.Text = model.GrooveAngle.HasValue ? model.GrooveAngle.Value.ToString() : string.Empty;
|
||||
chkMaterialCodeBatchNo.Checked = model.IsMaterialCodeBatchNoAccurate;
|
||||
chkMaterialQuantity.Checked = model.IsMaterialQuantityAccurate;
|
||||
if (!string.IsNullOrEmpty(model.CheckResult))
|
||||
{
|
||||
ddlCheckResult.SelectedValue = model.CheckResult;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(model.CheckPerson))
|
||||
{
|
||||
drpCheckPerson.SelectedValue = model.CheckPerson;
|
||||
}
|
||||
dpCheckTime.SelectedDate = model.CheckTime;
|
||||
txtUnqualifiedReason.Text = model.UnqualifiedReason;
|
||||
txtRectifyRequirement.Text = model.RectifyRequirement;
|
||||
txtRemark.Text = model.Remark;
|
||||
}
|
||||
|
||||
@@ -72,32 +93,33 @@ namespace FineUIPro.Web.HJGL.PreWeld
|
||||
return;
|
||||
}
|
||||
|
||||
var item = new Model.PreWeldCuttingCheckItem
|
||||
var item = new Model.PreWeldCuttingCheckInput
|
||||
{
|
||||
CuttingCheckId = CuttingCheckId,
|
||||
ProjectId = CurrUser.LoginProjectId,
|
||||
WeldJointId = drpWeldJoint.SelectedValue,
|
||||
CuttingLength = string.IsNullOrWhiteSpace(numCuttingLength.Text) ? (decimal?)null : Convert.ToDecimal(numCuttingLength.Text),
|
||||
GrooveForm = txtGrooveForm.Text.Trim(),
|
||||
GrooveAngle = string.IsNullOrWhiteSpace(numGrooveAngle.Text) ? (decimal?)null : Convert.ToDecimal(numGrooveAngle.Text),
|
||||
IsMaterialCodeBatchNoAccurate = chkMaterialCodeBatchNo.Checked,
|
||||
IsMaterialQuantityAccurate = chkMaterialQuantity.Checked,
|
||||
CheckPerson = CurrUser.PersonId,
|
||||
CheckResult = ddlCheckResult.SelectedValue,
|
||||
CheckPerson = drpCheckPerson.SelectedValue,
|
||||
CheckTime = dpCheckTime.SelectedDate ?? DateTime.Now,
|
||||
CreateUser = CurrUser.PersonId,
|
||||
UnqualifiedReason = txtUnqualifiedReason.Text.Trim(),
|
||||
RectifyRequirement = txtRectifyRequirement.Text.Trim(),
|
||||
Remark = txtRemark.Text.Trim()
|
||||
};
|
||||
|
||||
APIPreWeldInspectionService.SaveCuttingCheck(item);
|
||||
CuttingCheckId = APIPreWeldInspectionService.SaveCuttingCheck(item);
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
}
|
||||
|
||||
protected void btnAttachUrl_Click(object sender, EventArgs e)
|
||||
{
|
||||
string cuttingCheckId = CuttingCheckId;
|
||||
if (string.IsNullOrEmpty(cuttingCheckId) && !string.IsNullOrEmpty(drpWeldJoint.SelectedValue))
|
||||
{
|
||||
var check = Funs.DB.HJGL_PreWeldCuttingCheck.FirstOrDefault(x => x.WeldJointId == drpWeldJoint.SelectedValue);
|
||||
cuttingCheckId = check == null ? string.Empty : check.CuttingCheckId;
|
||||
}
|
||||
if (string.IsNullOrEmpty(cuttingCheckId))
|
||||
if (string.IsNullOrEmpty(CuttingCheckId))
|
||||
{
|
||||
Alert.ShowInTop("请先保存下料抽检记录后再上传附件!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
@@ -105,7 +127,7 @@ namespace FineUIPro.Web.HJGL.PreWeld
|
||||
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(
|
||||
string.Format("../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/HJGL/PreWeld/CuttingCheck&menuId={1}&edit=1&type=-1",
|
||||
cuttingCheckId, Const.HJGL_PreWeldCuttingCheckMenuId)));
|
||||
CuttingCheckId, Const.HJGL_PreWeldCuttingCheckMenuId)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,6 +50,33 @@ namespace FineUIPro.Web.HJGL.PreWeld
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpWeldJoint;
|
||||
|
||||
/// <summary>
|
||||
/// numCuttingLength 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox numCuttingLength;
|
||||
|
||||
/// <summary>
|
||||
/// txtGrooveForm 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtGrooveForm;
|
||||
|
||||
/// <summary>
|
||||
/// numGrooveAngle 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox numGrooveAngle;
|
||||
|
||||
/// <summary>
|
||||
/// chkMaterialCodeBatchNo 控件。
|
||||
/// </summary>
|
||||
@@ -68,6 +95,24 @@ namespace FineUIPro.Web.HJGL.PreWeld
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.CheckBox chkMaterialQuantity;
|
||||
|
||||
/// <summary>
|
||||
/// ddlCheckResult 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlCheckResult;
|
||||
|
||||
/// <summary>
|
||||
/// drpCheckPerson 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpCheckPerson;
|
||||
|
||||
/// <summary>
|
||||
/// dpCheckTime 控件。
|
||||
/// </summary>
|
||||
@@ -77,6 +122,24 @@ namespace FineUIPro.Web.HJGL.PreWeld
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker dpCheckTime;
|
||||
|
||||
/// <summary>
|
||||
/// txtUnqualifiedReason 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtUnqualifiedReason;
|
||||
|
||||
/// <summary>
|
||||
/// txtRectifyRequirement 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtRectifyRequirement;
|
||||
|
||||
/// <summary>
|
||||
/// txtRemark 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="组对抽检列表台账"
|
||||
runat="server" BoxFlex="1" EnableColumnLines="true" DataKeyNames="WeldJointId"
|
||||
DataIDField="WeldJointId" AllowPaging="true" IsDatabasePaging="true" PageSize="15"
|
||||
runat="server" BoxFlex="1" EnableColumnLines="true" DataKeyNames="FitupCheckId"
|
||||
DataIDField="FitupCheckId" AllowPaging="true" IsDatabasePaging="true" PageSize="15"
|
||||
OnPageIndexChange="Grid1_PageIndexChange" EnableRowDoubleClickEvent="true"
|
||||
OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
|
||||
<Toolbars>
|
||||
@@ -59,6 +59,36 @@
|
||||
<f:RenderField Width="120px" ColumnID="Misalignment" DataField="Misalignment" FieldType="Double"
|
||||
HeaderText="错边量" HeaderTextAlign="Center" TextAlign="Right">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="WeldReinforcement" DataField="WeldReinforcement" FieldType="Double"
|
||||
HeaderText="焊缝余高" HeaderTextAlign="Center" TextAlign="Right">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="WeldHeight" DataField="WeldHeight" FieldType="Double"
|
||||
HeaderText="焊缝高度" HeaderTextAlign="Center" TextAlign="Right">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="WeldWidth" DataField="WeldWidth" FieldType="Double"
|
||||
HeaderText="焊缝宽度" HeaderTextAlign="Center" TextAlign="Right">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="180px" ColumnID="SurfaceDefect" DataField="SurfaceDefect" FieldType="String"
|
||||
HeaderText="表面缺陷" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="CheckResult" DataField="CheckResult" FieldType="String"
|
||||
HeaderText="检查结果" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="CheckPersonName" DataField="CheckPersonName" FieldType="String"
|
||||
HeaderText="检查人" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="170px" ColumnID="CheckTime" DataField="CheckTime" FieldType="Date"
|
||||
RendererArgument="yyyy-MM-dd HH:mm" HeaderText="检查时间" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="220px" ColumnID="UnqualifiedReason" DataField="UnqualifiedReason" FieldType="String"
|
||||
HeaderText="不合格原因" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="220px" ColumnID="RectifyRequirement" DataField="RectifyRequirement" FieldType="String"
|
||||
HeaderText="整改要求" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="220px" ColumnID="Remark" DataField="Remark" FieldType="String"
|
||||
HeaderText="备注" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
<PageItems>
|
||||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
||||
|
||||
@@ -67,7 +67,7 @@ namespace FineUIPro.Web.HJGL.PreWeld
|
||||
}
|
||||
if (CommonService.GetAllButtonPowerList(CurrUser.LoginProjectId, CurrUser.PersonId, Const.HJGL_PreWeldFitupCheckMenuId, Const.BtnModify))
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(string.Format("FitupCheckEdit.aspx?WeldJointId={0}", Grid1.SelectedRowID)));
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(string.Format("FitupCheckEdit.aspx?FitupCheckId={0}", Grid1.SelectedRowID)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,6 +51,46 @@
|
||||
</f:NumberBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:NumberBox ID="numWeldReinforcement" runat="server" Label="焊缝余高" LabelWidth="170px" DecimalPrecision="2">
|
||||
</f:NumberBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:NumberBox ID="numWeldHeight" runat="server" Label="焊缝高度" LabelWidth="170px" DecimalPrecision="2">
|
||||
</f:NumberBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:NumberBox ID="numWeldWidth" runat="server" Label="焊缝宽度" LabelWidth="170px" DecimalPrecision="2">
|
||||
</f:NumberBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea ID="txtSurfaceDefect" runat="server" Label="表面缺陷" LabelWidth="170px">
|
||||
</f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="ddlCheckResult" runat="server" Label="检查结果" LabelWidth="170px" Required="true"
|
||||
ShowRedStar="true">
|
||||
<f:ListItem Text="合格" Value="合格" />
|
||||
<f:ListItem Text="不合格" Value="不合格" />
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpCheckPerson" runat="server" Label="检查人" LabelWidth="170px" Required="true"
|
||||
ShowRedStar="true" EnableEdit="true">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DatePicker ID="dpCheckTime" runat="server" Label="检查时间" LabelWidth="170px"
|
||||
@@ -58,6 +98,18 @@
|
||||
</f:DatePicker>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea ID="txtUnqualifiedReason" runat="server" Label="不合格原因" LabelWidth="170px">
|
||||
</f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea ID="txtRectifyRequirement" runat="server" Label="整改要求" LabelWidth="170px">
|
||||
</f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea ID="txtRemark" runat="server" Label="备注" MaxLength="500" LabelWidth="170px">
|
||||
|
||||
@@ -6,10 +6,10 @@ namespace FineUIPro.Web.HJGL.PreWeld
|
||||
{
|
||||
public partial class FitupCheckEdit : PageBase
|
||||
{
|
||||
public string WeldJointId
|
||||
public string FitupCheckId
|
||||
{
|
||||
get { return (string)ViewState["WeldJointId"]; }
|
||||
set { ViewState["WeldJointId"] = value; }
|
||||
get { return (string)ViewState["FitupCheckId"]; }
|
||||
set { ViewState["FitupCheckId"] = value; }
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
@@ -17,15 +17,26 @@ namespace FineUIPro.Web.HJGL.PreWeld
|
||||
if (!IsPostBack)
|
||||
{
|
||||
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
WeldJointId = Request.Params["WeldJointId"];
|
||||
FitupCheckId = Request.Params["FitupCheckId"];
|
||||
var weldJointId = Request.Params["WeldJointId"];
|
||||
BindWeldJoint();
|
||||
BindGrooveType();
|
||||
if (!string.IsNullOrEmpty(WeldJointId))
|
||||
BindCheckPerson();
|
||||
ddlCheckResult.SelectedValue = "合格";
|
||||
if (!string.IsNullOrEmpty(FitupCheckId))
|
||||
{
|
||||
BindData();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(weldJointId))
|
||||
{
|
||||
drpWeldJoint.SelectedValue = weldJointId;
|
||||
drpWeldJoint.Enabled = false;
|
||||
drpCheckPerson.SelectedValue = CurrUser.PersonId;
|
||||
dpCheckTime.SelectedDate = DateTime.Now;
|
||||
}
|
||||
else
|
||||
{
|
||||
drpCheckPerson.SelectedValue = CurrUser.PersonId;
|
||||
dpCheckTime.SelectedDate = DateTime.Now;
|
||||
}
|
||||
}
|
||||
@@ -50,6 +61,11 @@ namespace FineUIPro.Web.HJGL.PreWeld
|
||||
}
|
||||
}
|
||||
|
||||
private void BindCheckPerson()
|
||||
{
|
||||
Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(drpCheckPerson, CurrUser.LoginProjectId, null, null, true);
|
||||
}
|
||||
|
||||
private void BindGrooveType()
|
||||
{
|
||||
drpGrooveType.DataTextField = "BaseInfoName";
|
||||
@@ -60,8 +76,12 @@ namespace FineUIPro.Web.HJGL.PreWeld
|
||||
|
||||
private void BindData()
|
||||
{
|
||||
var model = PreWeldInspectionService.GetFitupCheckByWeldJointId(WeldJointId);
|
||||
var weldJoint = APIPreWeldInspectionService.GetPreWeldJointByWeldJointId(WeldJointId);
|
||||
var model = PreWeldInspectionService.GetFitupCheckById(FitupCheckId);
|
||||
if (model == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
var weldJoint = APIPreWeldInspectionService.GetPreWeldJointByWeldJointId(model.WeldJointId);
|
||||
if (weldJoint != null)
|
||||
{
|
||||
drpWeldJoint.SelectedValue = weldJoint.WeldJointId;
|
||||
@@ -97,7 +117,30 @@ namespace FineUIPro.Web.HJGL.PreWeld
|
||||
{
|
||||
numMisalignment.Text = model.Misalignment.Value.ToString();
|
||||
}
|
||||
if (model.WeldReinforcement.HasValue)
|
||||
{
|
||||
numWeldReinforcement.Text = model.WeldReinforcement.Value.ToString();
|
||||
}
|
||||
if (model.WeldHeight.HasValue)
|
||||
{
|
||||
numWeldHeight.Text = model.WeldHeight.Value.ToString();
|
||||
}
|
||||
if (model.WeldWidth.HasValue)
|
||||
{
|
||||
numWeldWidth.Text = model.WeldWidth.Value.ToString();
|
||||
}
|
||||
txtSurfaceDefect.Text = model.SurfaceDefect;
|
||||
if (!string.IsNullOrEmpty(model.CheckResult))
|
||||
{
|
||||
ddlCheckResult.SelectedValue = model.CheckResult;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(model.CheckPerson))
|
||||
{
|
||||
drpCheckPerson.SelectedValue = model.CheckPerson;
|
||||
}
|
||||
dpCheckTime.SelectedDate = model.CheckTime;
|
||||
txtUnqualifiedReason.Text = model.UnqualifiedReason;
|
||||
txtRectifyRequirement.Text = model.RectifyRequirement;
|
||||
txtRemark.Text = model.Remark;
|
||||
}
|
||||
}
|
||||
@@ -110,8 +153,9 @@ namespace FineUIPro.Web.HJGL.PreWeld
|
||||
return;
|
||||
}
|
||||
|
||||
var item = new Model.PreWeldFitupCheckItem
|
||||
var item = new Model.PreWeldFitupCheckInput
|
||||
{
|
||||
FitupCheckId = FitupCheckId,
|
||||
ProjectId = CurrUser.LoginProjectId,
|
||||
WeldJointId = drpWeldJoint.SelectedValue,
|
||||
GrooveTypeId = drpGrooveType.SelectedValue,
|
||||
@@ -119,24 +163,27 @@ namespace FineUIPro.Web.HJGL.PreWeld
|
||||
GrooveAngle = string.IsNullOrWhiteSpace(numGrooveAngle.Text) ? (decimal?)null : Convert.ToDecimal(numGrooveAngle.Text),
|
||||
FitupGap = string.IsNullOrWhiteSpace(numFitupGap.Text) ? (decimal?)null : Convert.ToDecimal(numFitupGap.Text),
|
||||
Misalignment = string.IsNullOrWhiteSpace(numMisalignment.Text) ? (decimal?)null : Convert.ToDecimal(numMisalignment.Text),
|
||||
CheckPerson = CurrUser.PersonId,
|
||||
WeldReinforcement = string.IsNullOrWhiteSpace(numWeldReinforcement.Text) ? (decimal?)null : Convert.ToDecimal(numWeldReinforcement.Text),
|
||||
WeldHeight = string.IsNullOrWhiteSpace(numWeldHeight.Text) ? (decimal?)null : Convert.ToDecimal(numWeldHeight.Text),
|
||||
WeldWidth = string.IsNullOrWhiteSpace(numWeldWidth.Text) ? (decimal?)null : Convert.ToDecimal(numWeldWidth.Text),
|
||||
SurfaceDefect = txtSurfaceDefect.Text.Trim(),
|
||||
CheckResult = ddlCheckResult.SelectedValue,
|
||||
CheckPerson = drpCheckPerson.SelectedValue,
|
||||
CheckTime = dpCheckTime.SelectedDate ?? DateTime.Now,
|
||||
CreateUser = CurrUser.PersonId,
|
||||
UnqualifiedReason = txtUnqualifiedReason.Text.Trim(),
|
||||
RectifyRequirement = txtRectifyRequirement.Text.Trim(),
|
||||
Remark = txtRemark.Text.Trim()
|
||||
};
|
||||
|
||||
APIPreWeldInspectionService.SaveFitupCheck(item);
|
||||
FitupCheckId = APIPreWeldInspectionService.SaveFitupCheck(item);
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
}
|
||||
|
||||
protected void btnAttachUrl_Click(object sender, EventArgs e)
|
||||
{
|
||||
string weldJointId = drpWeldJoint.SelectedValue;
|
||||
var check = string.IsNullOrEmpty(weldJointId)
|
||||
? null
|
||||
: Funs.DB.HJGL_PreWeldFitupCheck.FirstOrDefault(x => x.WeldJointId == weldJointId);
|
||||
if (check == null)
|
||||
if (string.IsNullOrEmpty(FitupCheckId))
|
||||
{
|
||||
Alert.ShowInTop("请先保存组对抽检记录后再上传附件!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
@@ -144,7 +191,7 @@ namespace FineUIPro.Web.HJGL.PreWeld
|
||||
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(
|
||||
string.Format("../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/HJGL/PreWeld/FitupCheck&menuId={1}&edit=1&type=-1",
|
||||
check.FitupCheckId, Const.HJGL_PreWeldFitupCheckMenuId)));
|
||||
FitupCheckId, Const.HJGL_PreWeldFitupCheckMenuId)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,6 +95,60 @@ namespace FineUIPro.Web.HJGL.PreWeld
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox numMisalignment;
|
||||
|
||||
/// <summary>
|
||||
/// numWeldReinforcement 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox numWeldReinforcement;
|
||||
|
||||
/// <summary>
|
||||
/// numWeldHeight 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox numWeldHeight;
|
||||
|
||||
/// <summary>
|
||||
/// numWeldWidth 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox numWeldWidth;
|
||||
|
||||
/// <summary>
|
||||
/// txtSurfaceDefect 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtSurfaceDefect;
|
||||
|
||||
/// <summary>
|
||||
/// ddlCheckResult 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlCheckResult;
|
||||
|
||||
/// <summary>
|
||||
/// drpCheckPerson 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpCheckPerson;
|
||||
|
||||
/// <summary>
|
||||
/// dpCheckTime 控件。
|
||||
/// </summary>
|
||||
@@ -104,6 +158,24 @@ namespace FineUIPro.Web.HJGL.PreWeld
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker dpCheckTime;
|
||||
|
||||
/// <summary>
|
||||
/// txtUnqualifiedReason 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtUnqualifiedReason;
|
||||
|
||||
/// <summary>
|
||||
/// txtRectifyRequirement 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtRectifyRequirement;
|
||||
|
||||
/// <summary>
|
||||
/// txtRemark 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -140,6 +140,10 @@
|
||||
FieldType="String" HeaderText="材质" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="PaintCode" DataField="PaintCode" SortField="PaintCode"
|
||||
FieldType="String" HeaderText="防腐等级" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="FlowingSection" DataField="FlowingSection" SortField="FlowingSection"
|
||||
FieldType="String" HeaderText="流水段" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
|
||||
@@ -204,7 +204,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
// string result = string.Empty;
|
||||
List<string> result = new List<string>();
|
||||
//pds = BLL.Funs.FilterBlankLines(pds);
|
||||
if (count < 28)
|
||||
if (count < 32)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = "导入Excel格式错误!Excel只有" + count.ToString().Trim() + "列";
|
||||
@@ -224,6 +224,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
var getPurgeMethod = from x in db.Base_PurgeMethod select x;
|
||||
var getMaterial = from x in db.Base_Material select x;
|
||||
var getWeldType = from x in db.Base_WeldType select x;
|
||||
var getPaintCodeDict = from x in db.Tw_PaintCodeDict where x.IsUsed select x;
|
||||
//var getComponents = from x in Funs.DB.Base_Components where x.ProjeceId == this.CurrUser.LoginProjectId select x;
|
||||
|
||||
Model.WBS_UnitWork unitWork = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(Request.Params["UnitWorkId"]);
|
||||
@@ -254,6 +255,9 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
string col25 = Convert.ToString(pds[i].AA);
|
||||
string col26 = Convert.ToString(pds[i].AB);
|
||||
string col27 = Convert.ToString(pds[i].AC);
|
||||
string col28 = Convert.ToString(pds[i].AD);
|
||||
string col29 = Convert.ToString(pds[i].AE);
|
||||
string col30 = Convert.ToString(pds[i].AF);
|
||||
bool hasRequiredError = false;
|
||||
Action<string> addRequiredError = colName =>
|
||||
{
|
||||
@@ -780,7 +784,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
result.Add("第" + (i + 1).ToString() + "行," + "焊口属性" + "," + "此项为必填项!" + "|");
|
||||
|
||||
}
|
||||
string col28 = Convert.ToString(pds[i].AD);
|
||||
if (!string.IsNullOrEmpty(col28))
|
||||
{
|
||||
if (col28.Trim() == "是")
|
||||
@@ -790,12 +793,27 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
|
||||
// 读取焊点坐标(AE列)
|
||||
string col29 = Convert.ToString(pds[i].AE);
|
||||
if (!string.IsNullOrEmpty(col29))
|
||||
{
|
||||
pipeline.WeldJointPoint = col29;
|
||||
}
|
||||
|
||||
// 读取防腐等级(AF列),按字典精确匹配后保存字典ID
|
||||
if (!string.IsNullOrEmpty(col30))
|
||||
{
|
||||
// AF列为非必填项,只有填写时才按防腐字典校验并回填字典ID
|
||||
var paint = getPaintCodeDict.FirstOrDefault(x => !string.IsNullOrEmpty(x.PaintCode) && x.PaintCode.Contains(col30));
|
||||
if (paint == null)
|
||||
{
|
||||
result.Add("第" + (i + 1).ToString() + "行," + "防腐等级" + "【" + col30 + "】不存在!" + "|");
|
||||
}
|
||||
else
|
||||
{
|
||||
pipeline.PaintCode = col30;
|
||||
pipeline.PaintId = paint.Id;
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(pipeline.PipelineCode) && !string.IsNullOrEmpty(pipeline.WeldJointCode))
|
||||
{
|
||||
pipeline.ProjectId = this.CurrUser.LoginProjectId;
|
||||
@@ -1006,6 +1024,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
VacuumPressure = x.VacuumPressure,
|
||||
PCMedium = x.PCMedium,
|
||||
MaterialId = x.MaterialId,
|
||||
PaintId = x.PaintId,
|
||||
Remark = x.Remark,
|
||||
FlowingSection = x.FlowingSection
|
||||
}).DistinctBy(temp => new
|
||||
@@ -1032,6 +1051,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
temp.VacuumPressure,
|
||||
temp.PCMedium,
|
||||
temp.MaterialId,
|
||||
temp.PaintId,
|
||||
temp.Remark,
|
||||
temp.FlowingSection
|
||||
}).ToList();
|
||||
@@ -1060,6 +1080,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
pipeline.VacuumPressure = pipelines[i].VacuumPressure;
|
||||
pipeline.PCMedium = pipelines[i].PCMedium;
|
||||
pipeline.MaterialId = pipelines[i].MaterialId;
|
||||
pipeline.PaintId = pipelines[i].PaintId;
|
||||
pipeline.Remark = pipelines[i].Remark;
|
||||
pipeline.FlowingSection = pipelines[i].FlowingSection;
|
||||
|
||||
|
||||
@@ -221,6 +221,10 @@
|
||||
FieldType="String" HeaderText="材质" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="PaintCode" DataField="PaintCode" SortField="PaintCode"
|
||||
FieldType="String" HeaderText="防腐等级" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="FlowingSection" DataField="FlowingSection" SortField="FlowingSection"
|
||||
FieldType="String" HeaderText="流水段" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
|
||||
@@ -266,12 +266,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// </summary>
|
||||
private void BindGrid1(string pipelineId)
|
||||
{
|
||||
string strSql = @"SELECT ProjectId,UnitWorkId,PipelineId,PipelineCode,UnitName,MediumCode,MediumName,PipingClassCode,UnitWorkCode,SingleName,
|
||||
TestPressure,SingleNumber,DetectionRateCode,DetectionType,Remark,FlowingSection,TestMediumCode,TotalDin,
|
||||
JointCount,PressurePipingClassCode,PipeLenth,DesignPress,DesignTemperature,LeakPressure,VacuumPressure,
|
||||
LeakMediumName,PCMediumName,MaterialCode
|
||||
FROM dbo.View_HJGL_Pipeline
|
||||
WHERE ProjectId= @ProjectId";
|
||||
string strSql = @"SELECT v.ProjectId,v.UnitWorkId,v.PipelineId,v.PipelineCode,v.UnitName,v.MediumCode,v.MediumName,v.PipingClassCode,v.UnitWorkCode,v.SingleName,
|
||||
v.TestPressure,v.SingleNumber,v.DetectionRateCode,v.DetectionType,v.Remark,v.FlowingSection,v.TestMediumCode,v.TotalDin,
|
||||
v.JointCount,v.PressurePipingClassCode,v.PipeLenth,v.DesignPress,v.DesignTemperature,v.LeakPressure,v.VacuumPressure,
|
||||
v.LeakMediumName,v.PCMediumName,v.MaterialCode,paint.PaintCode
|
||||
FROM dbo.View_HJGL_Pipeline v
|
||||
LEFT JOIN dbo.HJGL_Pipeline p ON p.PipelineId = v.PipelineId
|
||||
LEFT JOIN dbo.Tw_PaintCodeDict paint ON paint.Id = p.PaintId
|
||||
WHERE v.ProjectId= @ProjectId";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
strSql += " AND PipelineId = @PipelineId";
|
||||
@@ -1622,4 +1624,4 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,10 +90,7 @@
|
||||
EnablePostBack="true" OnClick="btnTreeFind_Click" runat="server">
|
||||
</f:Button>
|
||||
<f:Button ID="btnStatisticsMat" ToolTip="匹配材料" Icon="TabGo" runat="server" OnClick="btnStatisticsMat_Click" Hidden="true">
|
||||
</f:Button>
|
||||
<f:Button ID="btnrefresh" ToolTip="同步NET" Icon="ArrowRefresh"
|
||||
EnablePostBack="true" OnClick="btnrefresh_Click" runat="server" Hidden="true">
|
||||
</f:Button>
|
||||
</f:Button>
|
||||
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
@@ -121,8 +118,8 @@
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Items>
|
||||
<f:Grid ID="Grid3" ShowBorder="false" ShowHeader="false" runat="server" EnableCollapse="false"
|
||||
DataKeyNames="Key" DataIDField="Key" ShowGridHeader="false" EnableRowLines="false" EnableAlternateRowColor="false">
|
||||
<f:Grid ID="Grid3" ShowBorder="false" ShowHeader="false" runat="server" EnableCollapse="false" EnableCheckBoxSelect="true"
|
||||
DataKeyNames="Key" DataIDField="Key" ShowGridHeader="true" EnableRowLines="false" EnableAlternateRowColor="false">
|
||||
<Columns>
|
||||
<f:RenderField Width="200px" ColumnID="Value" DataField="Value" SortField="Value"
|
||||
FieldType="String" HeaderText="管线" HeaderTextAlign="Center"
|
||||
@@ -145,11 +142,13 @@
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar3" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:Label ID="lbRate" runat="server" LabelWidth="100px" Hidden="true"></f:Label>
|
||||
<f:Button ID="btnPriorityComponents" Text="优先匹配选中焊口" Icon="TabGo" runat="server" OnClick="btnPriorityComponents_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnMatchMat" Text="匹配" Icon="ArrowRefresh" runat="server" OnClick="btnMatchMat_Click"> </f:Button>
|
||||
<f:Button ID="btnConfirmMaterialCode" Text="保存匹配结果" Icon="SystemSave" runat="server" OnClick="btnConfirmMaterialCode_Click" ConfirmText="确定根据当前匹配结果反写材料主编码吗?">
|
||||
</f:Button>
|
||||
<f:Button ID="btnClearMaterialCode" Text="清除匹配结果" Icon="Delete" runat="server" OnClick="btnClearMaterialCode_Click" ConfirmText="确定清除当前选中管线已反写的材料主编码吗?">
|
||||
</f:Button>
|
||||
<f:Button ID="btnGenTask" ToolTip="生成任务单" Text="生成任务单" Icon="ApplicationViewIcons" runat="server" OnClick="btnGenTask_Click" ConfirmText="确定生成任务单吗?">
|
||||
</f:Button>
|
||||
<f:CheckBox ID="cbSelectCom" ShowLabel="false" runat="server" Text="默认勾选匹配100%" Checked="true">
|
||||
@@ -162,10 +161,10 @@
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Items>
|
||||
<f:Grid ID="Grid2" ShowBorder="true" ShowHeader="false" Title="材料匹配" EnableRowClickEvent="true"
|
||||
<f:Grid ID="Grid2" ShowBorder="true" ShowHeader="false" Title="材料匹配"
|
||||
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="PipelineId" ForceFit="true"
|
||||
EnableColumnLines="true" DataIDField="PipelineId" AllowSorting="true" OnRowClick="Grid2_RowClick"
|
||||
SortField="PipelineId" SortDirection="ASC" EnableCheckBoxSelect="true">
|
||||
EnableColumnLines="true" DataIDField="PipelineId" AllowSorting="true"
|
||||
SortField="MatchRate" SortDirection="DESC" EnableCheckBoxSelect="true">
|
||||
<Columns>
|
||||
<f:RenderField Width="150px" ColumnID="UnitWorkName" DataField="UnitWorkName" SortField="UnitWorkName"
|
||||
FieldType="String" HeaderText="主项" HeaderTextAlign="Center"
|
||||
@@ -175,7 +174,7 @@
|
||||
FieldType="String" HeaderText="管线号" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="MatchRateString" DataField="MatchRateString" SortField="MatchRateString"
|
||||
<f:RenderField Width="150px" ColumnID="MatchRateString" DataField="MatchRateString" SortField="MatchRate"
|
||||
FieldType="String" HeaderText="匹配率" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
@@ -190,7 +189,7 @@
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="材料匹配明细" EnableRowClickEvent="true"
|
||||
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="Id,PipelineId,PrefabricatedComponents,WeldJointId" ForceFit="true"
|
||||
EnableColumnLines="true" DataIDField="Id" AllowSorting="true" OnRowDataBound="Grid1_RowDataBound" FixedRowHeight="true" RowHeight="46"
|
||||
EnableColumnLines="true" DataIDField="Id" AllowSorting="true" FixedRowHeight="true" RowHeight="46"
|
||||
SortField="PipelineCode" SortDirection="ASC" OnSort="Grid1_Sort" EnableCheckBoxSelect="true" EnableSummary="true" SummaryPosition="Bottom" >
|
||||
<Columns>
|
||||
<f:RenderField Width="200px" ColumnID="PipelineCode" DataField="PipelineCode" SortField="PipelineCode"
|
||||
|
||||
@@ -5,8 +5,6 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
@@ -14,7 +12,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
public partial class WeldMatMatch : PageBase
|
||||
{
|
||||
public int pageSize = PipelineService.pageSize;
|
||||
public static decimal Rate = 0;
|
||||
|
||||
public string WarehouseId
|
||||
{
|
||||
get
|
||||
@@ -26,6 +24,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
ViewState["WarehouseId"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string PipeArea
|
||||
{
|
||||
get
|
||||
@@ -37,17 +36,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
ViewState["PipeArea"] = value;
|
||||
}
|
||||
}
|
||||
public string Line_No
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["Line_No"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["Line_No"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
public Dictionary<string, string> dicSeclectPipeLine
|
||||
{
|
||||
get
|
||||
@@ -59,6 +48,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
ViewState["dicSeclectPipeLine"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
public List<Model.Tw_PipeMatMatchOutput> tw_PipeMatMatchOutputs
|
||||
{
|
||||
get
|
||||
@@ -106,7 +96,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
drpWarehouse.DataSource = BLL.TwInOutplanmasterService.GetWarehouseCode(this.CurrUser.LoginProjectId);
|
||||
drpWarehouse.DataBind();
|
||||
drpWarehouse_SelectedIndexChanged(null, null);
|
||||
; HJGL_MaterialService.materialStockItems_FIELD = new List<Model.MaterialStockItem>();
|
||||
HJGL_MaterialService.materialStockItems_FIELD = new List<Model.MaterialStockItem>();
|
||||
HJGL_MaterialService.materialStockItems_SHOP = new List<Model.MaterialStockItem>();
|
||||
dicSeclectPipeLine = new Dictionary<string, string>();
|
||||
priorityWeldJoints = new Dictionary<string, HashSet<string>>();
|
||||
@@ -123,6 +113,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
|
||||
#region 加载树装置-单位-工作区
|
||||
|
||||
/// <summary>
|
||||
/// 加载树
|
||||
/// </summary>
|
||||
@@ -146,10 +137,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
rootNode2.EnableCheckBox = false;
|
||||
this.tvControlItem.Nodes.Add(rootNode2);
|
||||
|
||||
var pUnits = (from x in Funs.DB.Project_ProjectUnit where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
|
||||
// 获取当前用户所在单位
|
||||
var currUnit = pUnits.FirstOrDefault(x => x.UnitId == this.CurrUser.UnitId);
|
||||
|
||||
var unitWorkList = (from x in Funs.DB.WBS_UnitWork
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& x.SuperUnitWork == null && x.UnitId != null && x.ProjectType != null
|
||||
@@ -158,27 +145,13 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
List<Model.WBS_UnitWork> unitWork1 = null;
|
||||
List<Model.WBS_UnitWork> unitWork2 = null;
|
||||
|
||||
//// 当前为施工单位,只能操作本单位的数据
|
||||
//if (currUnit != null && currUnit.UnitType == Const.ProjectUnitType_2)
|
||||
//{
|
||||
// unitWork1 = (from x in unitWorkList
|
||||
// where x.UnitId == this.CurrUser.UnitId && x.ProjectType == "1"
|
||||
// select x).ToList();
|
||||
// unitWork2 = (from x in unitWorkList
|
||||
// where x.UnitId == this.CurrUser.UnitId && x.ProjectType == "2"
|
||||
// select x).ToList();
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList();
|
||||
unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList();
|
||||
//}
|
||||
|
||||
if (unitWork1.Count() > 0)
|
||||
{
|
||||
foreach (var q in unitWork1)
|
||||
{
|
||||
|
||||
int a = GetUnitWorkTestPackagePipelineCount(q.UnitWorkId);
|
||||
var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId);
|
||||
TreeNode tn1 = new TreeNode();
|
||||
@@ -201,8 +174,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
foreach (var q in unitWork2)
|
||||
{
|
||||
int a = GetUnitWorkTestPackagePipelineCount(q.UnitWorkId);
|
||||
// var NowComPipelineCode = PipelineService.GetNoComPipelinesByUnitWordId(q.UnitWorkId);
|
||||
//int a = NowComPipelineCode.Count();
|
||||
var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId);
|
||||
TreeNode tn2 = new TreeNode();
|
||||
tn2.NodeID = q.UnitWorkId;
|
||||
@@ -225,24 +196,17 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 按分页方式向试压包节点追加管线子节点。
|
||||
/// </summary>
|
||||
/// <param name="node">需要加载管线的试压包树节点。</param>
|
||||
private void BindNodes(TreeNode node)
|
||||
{
|
||||
//var NowComPipelineCode = PipelineService.GetNoComPipelinesByUnitWordId(node.NodeID);
|
||||
//if (!node.Text.Contains("|"))
|
||||
//{
|
||||
// node.Text += "|" + NowComPipelineCode.Count();
|
||||
|
||||
//}
|
||||
var pipeline = GetTestPackagePipelineList(node.NodeID);
|
||||
//pipeline= pipeline.Where(x => NowComPipelineCode.Contains(x.PipelineCode)).ToList();
|
||||
if (!node.Text.Contains("|"))
|
||||
{
|
||||
node.Text += "|" + pipeline.Count();
|
||||
|
||||
}
|
||||
int pageindex = int.Parse(node.CommandName.Split('|')[0]);
|
||||
int pageCount = int.Parse(node.CommandName.Split('|')[1]);
|
||||
@@ -251,10 +215,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
pipeline = pipeline.Skip(pageSize * (pageindex - 1)).Take(pageSize).ToList();
|
||||
foreach (var item in pipeline)
|
||||
{
|
||||
/*if (!NowComPipelineCode.Contains(item.PipelineCode))
|
||||
{
|
||||
continue;
|
||||
}*/
|
||||
TreeNode newNode = new TreeNode();
|
||||
newNode.Text = item.PipelineCode;
|
||||
newNode.NodeID = item.PipelineId;
|
||||
@@ -371,8 +331,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 按当前筛选条件重新加载左侧WBS管线树。
|
||||
/// </summary>
|
||||
@@ -383,7 +341,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
this.InitTreeMenu();
|
||||
}
|
||||
|
||||
#endregion 加载树装置-单位-工作区
|
||||
|
||||
#region 点击TreeView
|
||||
|
||||
/// <summary>
|
||||
/// 点击TreeView
|
||||
/// </summary>
|
||||
@@ -395,86 +356,29 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
string CommandName = e.Node.ParentNode.CommandName;
|
||||
e.Node.ParentNode.CommandName = (int.Parse(CommandName.Split('|')[0]) + 1) + "|" + int.Parse(CommandName.Split('|')[1]);
|
||||
TreeNode treeNode = e.Node.ParentNode;
|
||||
treeNode.Nodes.Remove(e.Node);
|
||||
e.Node.ParentNode.Nodes.Remove(e.Node);
|
||||
BindNodes(e.Node.ParentNode);
|
||||
}
|
||||
else
|
||||
{
|
||||
// this.BindGrid();
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#endregion 点击TreeView
|
||||
|
||||
#region 数据绑定
|
||||
/// <summary>
|
||||
/// 绑定当前选中管线的材料汇总信息。
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = @"SELECT ISNULL(pipe.MaterialCode2, lib.Code) AS MaterialCode,
|
||||
ISNULL(lib.MaterialName, libCode.MaterialName) AS MaterialName,
|
||||
ISNULL(lib.MaterialUnit, libCode.MaterialUnit) AS MaterialUnit,
|
||||
ISNULL(lib.MaterialSpec, libCode.MaterialSpec) AS MaterialSpec,
|
||||
ISNULL(lib.MaterialMade, libCode.MaterialMade) AS MaterialMade,
|
||||
ISNULL(lib.MaterialDef, libCode.MaterialDef) AS MaterialDef,
|
||||
sum(pipe.Number)as Number ,
|
||||
'0' as MatchNum,'否' AS CheckState
|
||||
FROM dbo.HJGL_PipeLineMat pipe
|
||||
LEFT JOIN dbo.HJGL_MaterialCodeLib lib ON lib.MaterialCode = pipe.MaterialCode
|
||||
LEFT JOIN dbo.HJGL_Pipeline line ON line.PipelineId = pipe.PipelineId
|
||||
OUTER APPLY (SELECT TOP 1 * FROM dbo.HJGL_MaterialCodeLib codeLib WHERE codeLib.ProjectId=line.ProjectId AND codeLib.Code=pipe.MaterialCode2 ORDER BY codeLib.MaterialCode) libCode
|
||||
WHERE PipelineId=@PipelineId
|
||||
group by ISNULL(pipe.MaterialCode2, lib.Code),
|
||||
ISNULL(lib.MaterialName, libCode.MaterialName),
|
||||
ISNULL(lib.MaterialUnit, libCode.MaterialUnit),
|
||||
ISNULL(lib.MaterialSpec, libCode.MaterialSpec),
|
||||
ISNULL(lib.MaterialMade, libCode.MaterialMade),
|
||||
ISNULL(lib.MaterialDef, libCode.MaterialDef) ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@PipelineId", this.tvControlItem.SelectedNodeID));
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable dt = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
// 2.获取当前分页数据
|
||||
Grid1.DataSource = dt;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
/// <summary>
|
||||
/// 绑定管线匹配汇总。重新匹配会刷新 Grid2,需要把用户原来勾选的管线恢复回来。
|
||||
/// </summary>
|
||||
/// <param name="keepSelectedPipelineIds">需要保留选中状态的管线ID</param>
|
||||
void BindGrid2(IEnumerable<string> keepSelectedPipelineIds = null)
|
||||
{
|
||||
//var result = tw_PipeMatMatchOutputs
|
||||
// .GroupBy(item => new { item.PipelineId, item.PipelineCode,item.UnitWorkName }) // 按 PipelineId 和 PipelineCode 分组
|
||||
// .Select(group => new
|
||||
// {
|
||||
// PipelineId = group.Key.PipelineId, // 当前组的 PipelineId
|
||||
// PipelineCode = group.Key.PipelineCode, // 当前组的 PipelineCode
|
||||
// UnitWorkName = group.Key.UnitWorkName, // 当前组的 UnitWorkName
|
||||
// AverageMatchRate = group.Average(item => item.MatchRate) // 计算平均 MatchRate
|
||||
// })
|
||||
// .ToList(); // 转换为 List
|
||||
|
||||
//// 如果需要将结果转换为自定义类型,可以这样做
|
||||
//List<Tw_PipeMatMatchOutput> output = result.Select(r => new Tw_PipeMatMatchOutput
|
||||
//{
|
||||
// PipelineId = r.PipelineId,
|
||||
// PipelineCode = r.PipelineCode,
|
||||
// UnitWorkName = r.UnitWorkName,
|
||||
// MatchRate = r.AverageMatchRate,
|
||||
// MatchRateString = Math.Round((decimal)r.AverageMatchRate * 100, 2).ToString() + "%"
|
||||
//}).ToList();
|
||||
var output = TwArrivalStatisticsService.GetPipeMatch(tw_PipeMatMatchOutputs);
|
||||
private void BindGrid2(IEnumerable<string> keepSelectedPipelineIds = null)
|
||||
{
|
||||
var output = TwArrivalStatisticsService.GetPipeMatch(tw_PipeMatMatchOutputs)
|
||||
// Grid2 默认展示按管线整体匹配率倒序,便于优先处理齐套率高的管线。
|
||||
.OrderByDescending(x => x.MatchRate ?? 0)
|
||||
.ThenBy(x => x.UnitWorkName)
|
||||
.ThenBy(x => x.PipelineCode)
|
||||
.ToList();
|
||||
Grid2.DataSource = output;
|
||||
Grid2.DataBind();
|
||||
/*if (output.Any())
|
||||
{
|
||||
Rate = Math.Round((decimal)output.Average(item => item.MatchRate) * 100, 2);
|
||||
lbRate.Text = "匹配率:" + Rate.ToString() + "%";
|
||||
}*/
|
||||
// “优先匹配选中焊口”会重新计算匹配结果,重新绑定后要继续保留原管线选中状态。
|
||||
var keepSelectedList = keepSelectedPipelineIds == null ? new List<string>() : keepSelectedPipelineIds.Where(x => !string.IsNullOrEmpty(x)).Distinct().ToList();
|
||||
var selectList = new List<string>();
|
||||
@@ -486,13 +390,11 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
Grid2.Rows[i].RowCssClass = "green";
|
||||
selectList.Add(model.PipelineId);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
Grid2.Rows[i].RowCssClass = "red";
|
||||
}
|
||||
|
||||
}
|
||||
if (cbSelectCom.Checked)
|
||||
{
|
||||
@@ -508,9 +410,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// <summary>
|
||||
/// 绑定已加入匹配的管线列表,并标识正在出库中的管线。
|
||||
/// </summary>
|
||||
void BindGrid3()
|
||||
private void BindGrid3()
|
||||
{
|
||||
|
||||
Grid3.DataSource = dicSeclectPipeLine;
|
||||
Grid3.DataBind();
|
||||
for (int i = 0; i < Grid3.Rows.Count; i++)
|
||||
@@ -524,41 +425,29 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
Grid3.Rows[i].RowCssClass = "yellow";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion 数据绑定
|
||||
|
||||
#region 表格事件
|
||||
/// <summary>
|
||||
/// 材料匹配明细行绑定事件,保留历史行样式扩展入口。
|
||||
/// </summary>
|
||||
/// <param name="sender">事件源。</param>
|
||||
/// <param name="e">Grid行绑定事件参数。</param>
|
||||
protected void Grid1_RowDataBound(object sender, GridRowEventArgs e)
|
||||
{
|
||||
// DataRowView row = e.DataItem as DataRowView;
|
||||
/* string code = Grid1.DataKeys[e.RowIndex][0].ToString();
|
||||
var num= decimal.Parse(Grid1.DataKeys[e.RowIndex][1].ToString()) ;
|
||||
bool istrue = HJGL_MaterialService.isInStockByMaterialCode(code,num,PipeArea, this.CurrUser.LoginProjectId);
|
||||
|
||||
if (istrue)
|
||||
{
|
||||
e.RowCssClass = "color1";
|
||||
}*/
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 绑定指定管线的材料匹配明细,设置行颜色、优先焊口选中状态和可生成任务单合计。
|
||||
/// 绑定 Grid2 当前选中管线的材料匹配明细,设置行颜色、优先焊口选中状态和可生成任务单合计。
|
||||
/// </summary>
|
||||
/// <param name="pipelineId">管线ID。</param>
|
||||
private void BindMaterialDetail(string pipelineId)
|
||||
private void BindMaterialDetail()
|
||||
{
|
||||
var selectedPipelineIds = Grid2.SelectedRowIDArray == null
|
||||
? new List<string>()
|
||||
: Grid2.SelectedRowIDArray.Where(x => !string.IsNullOrEmpty(x)).Distinct().ToList();
|
||||
if (!selectedPipelineIds.Any() && !string.IsNullOrEmpty(Grid2.SelectedRowID))
|
||||
{
|
||||
selectedPipelineIds.Add(Grid2.SelectedRowID);
|
||||
}
|
||||
|
||||
// 任务单只允许从未生成任务单的焊口材料中选择,避免重复生成焊接任务。
|
||||
var tb = GetNoTaskMaterialDetails()
|
||||
.Where(x => x.PipelineId == pipelineId)
|
||||
.Where(x => selectedPipelineIds.Contains(x.PipelineId))
|
||||
// 明细固定按管线号、预制组件号、焊口号、材料编码排序,便于同一焊口材料连续展示。
|
||||
.OrderBy(x => x.PipelineCode)
|
||||
.ThenBy(x => x.PrefabricatedComponents)
|
||||
@@ -614,7 +503,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
JObject summary = new JObject();
|
||||
summary.Add("PipelineCode", "合计");
|
||||
summary.Add("PrefabricatedComponents", "可生成任务单焊口数:");
|
||||
summary.Add("WeldJointCode", taskWeldJointCount.ToString());
|
||||
summary.Add("WeldJointCode", taskWeldJointCount.ToString());
|
||||
Grid1.SummaryData = summary;
|
||||
}
|
||||
|
||||
@@ -744,48 +633,9 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// <param name="e">Grid行点击事件参数。</param>
|
||||
protected void Grid2_RowClick(object sender, GridRowClickEventArgs e)
|
||||
{
|
||||
BindMaterialDetail(Grid2.SelectedRowID);
|
||||
|
||||
BindMaterialDetail();
|
||||
}
|
||||
/// <summary>
|
||||
/// 点击材料明细行时联动三维模型定位当前管线或单位工程。
|
||||
/// </summary>
|
||||
/// <param name="sender">事件源。</param>
|
||||
/// <param name="e">Grid行点击事件参数。</param>
|
||||
protected void Grid1_RowClick(object sender, GridRowClickEventArgs e)
|
||||
{
|
||||
Model.Parameter3D parameter3D = new Model.Parameter3D();
|
||||
Model.ColorModel colorModel = new Model.ColorModel();
|
||||
colorModel = BLL.Project_SysSetService.GetColorModel(this.CurrUser.LoginProjectId);
|
||||
parameter3D.ColorModel = colorModel;
|
||||
parameter3D.ButtonType = "3";
|
||||
if (this.tvControlItem.SelectedNode.CommandName == "单位工程")
|
||||
{
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
|
||||
|
||||
|
||||
}
|
||||
else if (this.tvControlItem.SelectedNode.CommandName == "管线")
|
||||
{
|
||||
var modelpipe = PipelineService.GetPipelineByPipelineId(tvControlItem.SelectedNodeID);
|
||||
if (modelpipe != null && !string.IsNullOrEmpty(modelpipe.UnitWorkId))
|
||||
{
|
||||
bool istrue = BLL.HJGL_MaterialService.isInStockByPipeline(tvControlItem.SelectedNodeID, this.CurrUser.LoginProjectId);
|
||||
if (istrue)
|
||||
{
|
||||
Line_No = "/" + modelpipe.PipelineCode;
|
||||
}
|
||||
// parameter3D.Line_No = Line_No;
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(modelpipe.UnitWorkId);
|
||||
var pipecode = "/" + modelpipe.PipelineCode;
|
||||
parameter3D.TagNum = pipecode;
|
||||
}
|
||||
|
||||
}
|
||||
//ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl_Item(this.CurrUser.LoginProjectId) + parameter3D.ModelName;
|
||||
//ctlAuditFlow.data = parameter3D;
|
||||
//ctlAuditFlow.BindData();
|
||||
}
|
||||
/// <summary>
|
||||
/// 记录材料明细排序字段,并按当前选中管线重新绑定明细。
|
||||
/// </summary>
|
||||
@@ -795,86 +645,28 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
Grid1.SortDirection = e.SortDirection;
|
||||
Grid1.SortField = e.SortField;
|
||||
if (!string.IsNullOrEmpty(Grid2.SelectedRowID) && tw_PipeMatMatchOutputs != null && tw_PipeMatMatchOutputs.Any())
|
||||
if (tw_PipeMatMatchOutputs != null && tw_PipeMatMatchOutputs.Any())
|
||||
{
|
||||
BindMaterialDetail(Grid2.SelectedRowID);
|
||||
}
|
||||
else
|
||||
{
|
||||
BindGrid();
|
||||
BindMaterialDetail();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion 表格事件
|
||||
|
||||
#region 按钮事件
|
||||
|
||||
/// <summary>
|
||||
/// 刷新三维模型参数,按当前树节点定位单位工程或管线。
|
||||
/// 仓库切换后刷新当前仓库ID并重新加载左侧管线树。
|
||||
/// </summary>
|
||||
/// <param name="sender">事件源。</param>
|
||||
/// <param name="e">事件参数。</param>
|
||||
protected void btnrefresh_Click(object sender, EventArgs e)
|
||||
protected void drpWarehouse_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
||||
{
|
||||
Model.Parameter3D parameter3D = new Model.Parameter3D();
|
||||
Model.ColorModel colorModel = new Model.ColorModel();
|
||||
colorModel = BLL.Project_SysSetService.GetColorModel(this.CurrUser.LoginProjectId);
|
||||
parameter3D.ColorModel = colorModel;
|
||||
parameter3D.TagNum = "";
|
||||
parameter3D.ButtonType = "3";
|
||||
|
||||
if (this.tvControlItem.SelectedNode.CommandName == "单位工程")
|
||||
{
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
|
||||
var pipeline = (from x in Funs.DB.HJGL_Pipeline
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == tvControlItem.SelectedNodeID && x.PipeArea == PipeArea && x.WarehouseId == WarehouseId
|
||||
orderby x.PipelineCode
|
||||
select x).ToList();
|
||||
List<string> pipelineList = new List<string>();
|
||||
foreach (var item in pipeline)
|
||||
{
|
||||
bool istrue = BLL.HJGL_MaterialService.isInStockByPipeline(item.PipelineId, this.CurrUser.LoginProjectId);
|
||||
if (istrue)
|
||||
{
|
||||
pipelineList.Add("/" + item.PipelineCode);
|
||||
}
|
||||
|
||||
}
|
||||
parameter3D.TagNum = string.Join(",", pipelineList);
|
||||
parameter3D.Line_No = string.Join(",", pipelineList);
|
||||
}
|
||||
else if (this.tvControlItem.SelectedNode.CommandName == "管线")
|
||||
{
|
||||
Model.HJGL_Pipeline pipeline = BLL.PipelineService.GetPipelineByPipelineId(this.tvControlItem.SelectedNodeID);
|
||||
this.hdUnitWorkId.Text = string.Empty;
|
||||
if (pipeline != null)
|
||||
{
|
||||
this.hdUnitWorkId.Text = pipeline.UnitWorkId;
|
||||
this.BindGrid();
|
||||
}
|
||||
|
||||
if (pipeline != null && !string.IsNullOrEmpty(pipeline.UnitWorkId))
|
||||
{
|
||||
bool istrue = BLL.HJGL_MaterialService.isInStockByPipeline(tvControlItem.SelectedNodeID, this.CurrUser.LoginProjectId);
|
||||
if (istrue)
|
||||
{
|
||||
Line_No = "/" + pipeline.PipelineCode;
|
||||
}
|
||||
//parameter3D.Line_No = Line_No;
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(pipeline.UnitWorkId);
|
||||
var pipecode = "/" + pipeline.PipelineCode;
|
||||
parameter3D.TagNum = pipecode;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl_Item(this.CurrUser.LoginProjectId) + parameter3D.ModelName;
|
||||
//ctlAuditFlow.data = parameter3D;
|
||||
//ctlAuditFlow.BindData();
|
||||
}
|
||||
|
||||
WarehouseId = Base_WarehouseService.GetWarehouseList(this.CurrUser.LoginProjectId)
|
||||
.Where(x => x.WarehouseId == drpWarehouse.SelectedValue || x.WarehouseName == drpWarehouse.SelectedValue)
|
||||
.Select(x => x.WarehouseId)
|
||||
.FirstOrDefault();
|
||||
this.InitTreeMenu();//加载树
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -896,20 +688,80 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 将左侧勾选的管线加入本次材料匹配范围并刷新匹配结果。
|
||||
/// 按树节点获取可加入本次匹配的管线。单位工程节点会展开到其下所有试压包,再套用当前仓库、区域和页面筛选条件。
|
||||
/// </summary>
|
||||
/// <param name="node">左侧树节点。</param>
|
||||
/// <returns>符合材料匹配入口条件的管线列表。</returns>
|
||||
private List<Model.HJGL_Pipeline> GetMatchPipelinesByTreeNode(TreeNode node)
|
||||
{
|
||||
if (node == null)
|
||||
{
|
||||
return new List<Model.HJGL_Pipeline>();
|
||||
}
|
||||
|
||||
if (node.CommandName == "管线")
|
||||
{
|
||||
var pipeline = PipelineService.GetPipelineByPipelineId(node.NodeID);
|
||||
return pipeline == null ? new List<Model.HJGL_Pipeline>() : new List<Model.HJGL_Pipeline> { pipeline };
|
||||
}
|
||||
|
||||
if (node.CommandName == "单位工程")
|
||||
{
|
||||
var testPackageIds = (from x in Funs.DB.PTP_TestPackage
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& x.UnitWorkId == node.NodeID
|
||||
select x.PTP_ID).ToList();
|
||||
|
||||
return testPackageIds
|
||||
.SelectMany(x => GetTestPackagePipelineList(x))
|
||||
.GroupBy(x => x.PipelineId)
|
||||
.Select(x => x.First())
|
||||
.OrderBy(x => x.PipelineCode)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(node.CommandName) && node.CommandName.Contains("|"))
|
||||
{
|
||||
return GetTestPackagePipelineList(node.NodeID);
|
||||
}
|
||||
|
||||
return new List<Model.HJGL_Pipeline>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 将左侧勾选管线或当前选中主项/试压包下的管线加入本次材料匹配范围并刷新匹配结果。
|
||||
/// </summary>
|
||||
/// <param name="sender">事件源。</param>
|
||||
/// <param name="e">事件参数。</param>
|
||||
protected void btnAddPipelineMatchMat_Click(object sender, EventArgs e)
|
||||
{
|
||||
int addCount = 0;
|
||||
var selectNodes = tvControlItem.GetCheckedNodes();
|
||||
foreach (var node in selectNodes)
|
||||
{
|
||||
if (dicSeclectPipeLine.Where(x => x.Key == node.NodeID).Count() == 0 && node.CommandName == "管线")
|
||||
{
|
||||
dicSeclectPipeLine.Add(node.NodeID, node.Text);
|
||||
addCount++;
|
||||
}
|
||||
}
|
||||
|
||||
var selectedNodePipelines = GetMatchPipelinesByTreeNode(tvControlItem.SelectedNode);
|
||||
foreach (var pipeline in selectedNodePipelines)
|
||||
{
|
||||
if (pipeline != null && !dicSeclectPipeLine.ContainsKey(pipeline.PipelineId))
|
||||
{
|
||||
dicSeclectPipeLine.Add(pipeline.PipelineId, pipeline.PipelineCode);
|
||||
addCount++;
|
||||
}
|
||||
}
|
||||
|
||||
if (addCount == 0)
|
||||
{
|
||||
ShowNotify("未找到可新增的匹配管线!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
RefreshMatchResult();
|
||||
}
|
||||
|
||||
@@ -936,6 +788,18 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
RefreshMatchResult();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 匹配
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMatchMat_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
BindMaterialDetail();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 优先匹配选中焊口
|
||||
/// </summary>
|
||||
@@ -984,7 +848,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
RefreshMatchResult();
|
||||
Grid2.SelectedRowIDArray = keepSelectedPipelineIds.Distinct().ToArray();
|
||||
BindMaterialDetail(selectedPipelineId);
|
||||
BindMaterialDetail();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1015,21 +879,51 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
return;
|
||||
}
|
||||
|
||||
var invalidMaterials = matchedMaterials
|
||||
.Where(x => string.IsNullOrEmpty(x.MatchMaterialCode) || (x.MatchRate ?? 0) < 1)
|
||||
.ToList();
|
||||
/* if (invalidMaterials.Any())
|
||||
{
|
||||
ShowNotify("存在未100%匹配的材料,不能反写材料主编码!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}*/
|
||||
|
||||
int count = BLL.PipelineMatService.UpdateMaterialCodeByMatchOutputs(matchedMaterials);
|
||||
ShowNotify("已保存材料主编码" + count.ToString() + "条!", MessageBoxIcon.Success);
|
||||
RefreshMatchResult();
|
||||
if (Grid2.SelectedRowIDArray.Any())
|
||||
{
|
||||
BindMaterialDetail(Grid2.SelectedRowIDArray.First());
|
||||
BindMaterialDetail();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 清除 Grid2 当前选中管线中已反写到管线材料表的材料主编码。
|
||||
/// </summary>
|
||||
/// <param name="sender">事件源。</param>
|
||||
/// <param name="e">事件参数。</param>
|
||||
protected void btnClearMaterialCode_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid2.SelectedRowIDArray == null || !Grid2.SelectedRowIDArray.Any())
|
||||
{
|
||||
ShowNotify("请先选择需要清除匹配结果的管线!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
if (tw_PipeMatMatchOutputs == null || !tw_PipeMatMatchOutputs.Any())
|
||||
{
|
||||
RefreshMatchResult();
|
||||
}
|
||||
|
||||
var selectedPipelineIds = Grid2.SelectedRowIDArray.ToList();
|
||||
var pipeLineMatIds = tw_PipeMatMatchOutputs
|
||||
.Where(x => selectedPipelineIds.Contains(x.PipelineId))
|
||||
.Select(x => x.PipeLineMatId)
|
||||
.Distinct()
|
||||
.ToList();
|
||||
if (!pipeLineMatIds.Any())
|
||||
{
|
||||
ShowNotify("未找到需要清除的材料匹配明细!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
int count = BLL.PipelineMatService.ClearMaterialCodeByPipeLineMatIds(pipeLineMatIds);
|
||||
ShowNotify("已清除材料主编码" + count.ToString() + "条!", MessageBoxIcon.Success);
|
||||
RefreshMatchResult();
|
||||
if (Grid2.SelectedRowIDArray.Any())
|
||||
{
|
||||
BindMaterialDetail();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1066,7 +960,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
Grid3.DataSource = null;
|
||||
Grid3.DataBind();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1288,26 +1181,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
return new HashSet<string>(GetTaskableWeldJointRows(weldJointIds).Select(x => x.WeldJointId));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取指定管线范围内的优先匹配焊口集合。
|
||||
/// </summary>
|
||||
/// <param name="selectedPipelineIds">管线ID列表。</param>
|
||||
/// <returns>管线ID到优先焊口ID集合的映射。</returns>
|
||||
private Dictionary<string, HashSet<string>> GetPriorityWeldJointIds(List<string> selectedPipelineIds)
|
||||
{
|
||||
var result = new Dictionary<string, HashSet<string>>();
|
||||
var selectedPriority = priorityWeldJoints
|
||||
.Where(x => selectedPipelineIds.Contains(x.Key) && x.Value != null && x.Value.Any())
|
||||
.ToList();
|
||||
|
||||
foreach (var item in selectedPriority)
|
||||
{
|
||||
result[item.Key] = new HashSet<string>(item.Value);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 判断焊材钢号类别是否能覆盖母材类别。
|
||||
/// </summary>
|
||||
@@ -1338,21 +1211,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
return isCover;
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 仓库切换后刷新当前仓库ID并重新加载左侧管线树。
|
||||
/// </summary>
|
||||
/// <param name="sender">事件源。</param>
|
||||
/// <param name="e">事件参数。</param>
|
||||
protected void drpWarehouse_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
WarehouseId = Base_WarehouseService.GetWarehouseList(this.CurrUser.LoginProjectId)
|
||||
.Where(x => x.WarehouseId == drpWarehouse.SelectedValue || x.WarehouseName == drpWarehouse.SelectedValue)
|
||||
.Select(x => x.WarehouseId)
|
||||
.FirstOrDefault();
|
||||
this.InitTreeMenu();//加载树
|
||||
}
|
||||
#endregion 按钮事件
|
||||
}
|
||||
}
|
||||
|
||||
+18
-18
@@ -140,15 +140,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnStatisticsMat;
|
||||
|
||||
/// <summary>
|
||||
/// btnrefresh 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnrefresh;
|
||||
|
||||
/// <summary>
|
||||
/// tvControlItem 控件。
|
||||
/// </summary>
|
||||
@@ -239,15 +230,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar3;
|
||||
|
||||
/// <summary>
|
||||
/// lbRate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbRate;
|
||||
|
||||
/// <summary>
|
||||
/// btnPriorityComponents 控件。
|
||||
/// </summary>
|
||||
@@ -257,6 +239,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnPriorityComponents;
|
||||
|
||||
/// <summary>
|
||||
/// btnMatchMat 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnMatchMat;
|
||||
|
||||
/// <summary>
|
||||
/// btnConfirmMaterialCode 控件。
|
||||
/// </summary>
|
||||
@@ -266,6 +257,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnConfirmMaterialCode;
|
||||
|
||||
/// <summary>
|
||||
/// btnClearMaterialCode 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnClearMaterialCode;
|
||||
|
||||
/// <summary>
|
||||
/// btnGenTask 控件。
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user