2023-02-17 焊接任务单修改
This commit is contained in:
parent
5f6569d82e
commit
86b9931597
|
|
@ -0,0 +1,76 @@
|
|||
|
||||
/****** Object: View [dbo].[View_HJGL_WeldingTask] Script Date: 2023/2/17 9:50:51 ******/
|
||||
SET ANSI_NULLS ON
|
||||
GO
|
||||
|
||||
SET QUOTED_IDENTIFIER ON
|
||||
GO
|
||||
|
||||
|
||||
|
||||
ALTER VIEW [dbo].[View_HJGL_WeldingTask]
|
||||
AS
|
||||
SELECT T.WeldTaskId,T.WeldJointId,T.CoverWelderId,T.BackingWelderId,
|
||||
cov.WelderCode AS CoverWelderCode,back.WelderCode AS BackingWelderCode,
|
||||
case when jot.JointAttribute is not null then jot.JointAttribute else T.JointAttribute end as JointAttribute,
|
||||
T.WeldingMode,T.ProjectId,T.UnitWorkId,T.UnitId,T.TaskDate,T.Tabler,T.TableDate,
|
||||
jot.WeldJointCode,jot.Dia,jot.DNDia, jot.Thickness,jot.Size,jot.WeldingLocationId,
|
||||
CASE WHEN jot.WeldingDailyId IS NULL THEN '·ñ' ELSE 'ÊÇ' END AS IsWelding,
|
||||
P.PipelineCode,B.WeldTypeCode,M.WeldingMethodCode,L.WeldingLocationCode,
|
||||
t.CanWelderCode,t.CanWelderId ,rod.ConsumablesName AS WeldingRodCode,T.CanWeldingRodName,T.CanWeldingWireName,
|
||||
wire.ConsumablesName AS WeldingWireCode,jot.WeldingDailyId,p.PipeArea,
|
||||
(case when charindex('/',jot.WeldJointCode)>0
|
||||
then RIGHT(jot.WeldJointCode,CHARINDEX('/',REVERSE(jot.WeldJointCode))-1)
|
||||
else jot.WeldJointCode end) as WeldJointNum
|
||||
from HJGL_WeldTask T
|
||||
left join HJGL_WeldJoint jot on T.WeldJointId=jot.WeldJointId
|
||||
LEFT JOIN dbo.SitePerson_Person cov ON cov.PersonId=t.CoverWelderId and cov.ProjectId=t.ProjectId
|
||||
LEFT JOIN dbo.SitePerson_Person back ON back.PersonId=t.BackingWelderId and back.ProjectId=t.ProjectId
|
||||
LEFT join HJGL_Pipeline P on jot.PipelineId=P.PipelineId
|
||||
left join Base_WeldType B on jot.WeldTypeId=B.WeldTypeId
|
||||
LEFT join Base_WeldingMethod M on jot.WeldingMethodId=M.WeldingMethodId
|
||||
left join Base_WeldingLocation L on jot.WeldingLocationId=L.WeldingLocationId
|
||||
LEFT JOIN Base_Consumables AS wire ON wire.ConsumablesId=jot.WeldingWire
|
||||
LEFT JOIN Base_Consumables AS rod ON rod.ConsumablesId=jot.WeldingRod
|
||||
|
||||
|
||||
|
||||
GO
|
||||
|
||||
|
||||
ALTER VIEW [dbo].[View_HJGL_NoWeldJointFind]
|
||||
AS
|
||||
--δº¸º¸¿Ú²éÕÒ
|
||||
SELECT jot.WeldJointId,
|
||||
jot.WeldJointCode,
|
||||
(case when charindex('/',jot.WeldJointCode)>0
|
||||
then RIGHT(jot.WeldJointCode,CHARINDEX('/',REVERSE(jot.WeldJointCode))-1)
|
||||
else jot.WeldJointCode end) as WeldJointNum,
|
||||
jot.PipelineId,
|
||||
jot.WeldingDailyId,
|
||||
jot.JointAttribute,
|
||||
jot.Dia,
|
||||
jot.DNDia,
|
||||
jot.Thickness,
|
||||
jot.Remark,
|
||||
WeldType.WeldTypeCode,
|
||||
method.WeldingMethodCode,
|
||||
rod.ConsumablesCode AS WeldingRodCode,
|
||||
wire.ConsumablesCode AS WeldingWireCode,
|
||||
mat1.MaterialCode AS Material1Code ,
|
||||
mat2.MaterialCode AS Material2Code
|
||||
FROM dbo.HJGL_WeldJoint jot
|
||||
LEFT JOIN dbo.HJGL_PreWeldingDaily pre ON pre.WeldJointId = jot.WeldJointId
|
||||
LEFT JOIN Base_WeldType AS WeldType ON WeldType.WeldTypeId=jot.WeldTypeId
|
||||
LEFT JOIN Base_WeldingMethod AS method ON method.WeldingMethodId=jot.WeldingMethodId
|
||||
LEFT JOIN Base_Material AS mat1 ON mat1.MaterialId = jot.Material1Id
|
||||
LEFT JOIN Base_Material AS mat2 ON mat2.MaterialId = jot.Material2Id
|
||||
LEFT JOIN Base_Consumables AS wire ON wire.ConsumablesId=jot.WeldingWire
|
||||
LEFT JOIN Base_Consumables AS rod ON rod.ConsumablesId=jot.WeldingRod
|
||||
WHERE pre.PreWeldingDailyId IS NULL
|
||||
|
||||
GO
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
System.InvalidOperationException: 可为空的对象必须具有一个值。
|
||||
在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
|
||||
在 System.Nullable`1.get_Value()
|
||||
在 BLL.HJGL_MaterialService.isInStockByPipeline(String pipelineid, String projectid) 位置 D:\诺必达\赛鼎\SGGL_SeDin\SGGL\BLL\HJGL\PreDesign\HJGL_MaterialService.cs:行号 284
|
||||
System.InvalidOperationException: 可为空的对象必须具有一个值。
|
||||
在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
|
||||
在 System.Nullable`1.get_Value()
|
||||
在 BLL.HJGL_MaterialService.isInStockByPipeline(String pipelineid, String projectid) 位置 D:\诺必达\赛鼎\SGGL_SeDin\SGGL\BLL\HJGL\PreDesign\HJGL_MaterialService.cs:行号 284
|
||||
System.InvalidOperationException: 可为空的对象必须具有一个值。
|
||||
在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
|
||||
在 System.Nullable`1.get_Value()
|
||||
在 BLL.HJGL_MaterialService.isInStockByPipeline(String pipelineid, String projectid) 位置 D:\诺必达\赛鼎\SGGL_SeDin\SGGL\BLL\HJGL\PreDesign\HJGL_MaterialService.cs:行号 284
|
||||
System.InvalidOperationException: 可为空的对象必须具有一个值。
|
||||
在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
|
||||
在 System.Nullable`1.get_Value()
|
||||
在 BLL.HJGL_MaterialService.isInStockByPipeline(String pipelineid, String projectid) 位置 D:\诺必达\赛鼎\SGGL_SeDin\SGGL\BLL\HJGL\PreDesign\HJGL_MaterialService.cs:行号 284
|
||||
System.InvalidOperationException: 可为空的对象必须具有一个值。
|
||||
在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
|
||||
在 System.Nullable`1.get_Value()
|
||||
在 BLL.HJGL_MaterialService.isInStockByPipeline(String pipelineid, String projectid) 位置 D:\诺必达\赛鼎\SGGL_SeDin\SGGL\BLL\HJGL\PreDesign\HJGL_MaterialService.cs:行号 284
|
||||
System.InvalidOperationException: 可为空的对象必须具有一个值。
|
||||
在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
|
||||
在 System.Nullable`1.get_Value()
|
||||
在 BLL.HJGL_MaterialService.isInStockByPipeline(String pipelineid, String projectid) 位置 D:\诺必达\赛鼎\SGGL_SeDin\SGGL\BLL\HJGL\PreDesign\HJGL_MaterialService.cs:行号 284
|
||||
System.InvalidOperationException: 可为空的对象必须具有一个值。
|
||||
在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
|
||||
在 System.Nullable`1.get_Value()
|
||||
在 BLL.HJGL_MaterialService.isInStockByPipeline(String pipelineid, String projectid) 位置 D:\诺必达\赛鼎\SGGL_SeDin\SGGL\BLL\HJGL\PreDesign\HJGL_MaterialService.cs:行号 284
|
||||
System.InvalidOperationException: 可为空的对象必须具有一个值。
|
||||
在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
|
||||
在 System.Nullable`1.get_Value()
|
||||
在 BLL.HJGL_MaterialService.isInStockByPipeline(String pipelineid, String projectid) 位置 D:\诺必达\赛鼎\SGGL_SeDin\SGGL\BLL\HJGL\PreDesign\HJGL_MaterialService.cs:行号 284
|
||||
System.InvalidOperationException: 可为空的对象必须具有一个值。
|
||||
在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
|
||||
在 System.Nullable`1.get_Value()
|
||||
在 BLL.HJGL_MaterialService.isInStockByPipeline(String pipelineid, String projectid) 位置 D:\诺必达\赛鼎\SGGL_SeDin\SGGL\BLL\HJGL\PreDesign\HJGL_MaterialService.cs:行号 284
|
||||
System.InvalidOperationException: 可为空的对象必须具有一个值。
|
||||
在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
|
||||
在 System.Nullable`1.get_Value()
|
||||
在 BLL.HJGL_MaterialService.isInStockByPipeline(String pipelineid, String projectid) 位置 D:\诺必达\赛鼎\SGGL_SeDin\SGGL\BLL\HJGL\PreDesign\HJGL_MaterialService.cs:行号 284
|
||||
System.InvalidOperationException: 可为空的对象必须具有一个值。
|
||||
在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
|
||||
在 System.Nullable`1.get_Value()
|
||||
在 BLL.HJGL_MaterialService.isInStockByPipeline(String pipelineid, String projectid) 位置 D:\诺必达\赛鼎\SGGL_SeDin\SGGL\BLL\HJGL\PreDesign\HJGL_MaterialService.cs:行号 284
|
||||
System.InvalidOperationException: 可为空的对象必须具有一个值。
|
||||
在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
|
||||
在 System.Nullable`1.get_Value()
|
||||
在 BLL.HJGL_MaterialService.isInStockByPipeline(String pipelineid, String projectid) 位置 D:\诺必达\赛鼎\SGGL_SeDin\SGGL\BLL\HJGL\PreDesign\HJGL_MaterialService.cs:行号 284
|
||||
|
||||
错误信息开始=====>
|
||||
错误类型:FormatException
|
||||
错误信息:输入字符串的格式不正确。
|
||||
错误堆栈:
|
||||
在 System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
|
||||
在 System.String.System.IConvertible.ToDouble(IFormatProvider provider)
|
||||
在 System.Convert.ToDouble(Object value)
|
||||
在 FineUIPro.RenderField.VQscVYXUOqxsrrrlgEYaXHIhTAZB(GridRow )
|
||||
在 (GridColumn , GridRow )
|
||||
在 FineUIPro.GridRow.BkpgFeAELTFlAvoTrOBrConfcLJbA()
|
||||
在 (GridRow )
|
||||
在 FineUIPro.Grid.BkpgFeAELTFlAvoTrOBrConfcLJbA(Int32 , Object )
|
||||
在 (Grid , Int32 , Object )
|
||||
在 FineUIPro.Grid.LDChsdiaqdhUTcxBcQPMKyQFfjEDB(DataTable , Boolean )
|
||||
在 (Grid , DataTable , Boolean )
|
||||
在 FineUIPro.Grid.DataBind(Boolean keepCurrentData)
|
||||
在 (Grid , Boolean )
|
||||
在 FineUIPro.Grid.DataBind()
|
||||
在 FineUIPro.Web.HJGL.WeldingManage.SelectTaskWeldJoint.BindGrid() 位置 D:\诺必达\赛鼎\SGGL_SeDin\SGGL\FineUIPro.Web\HJGL\WeldingManage\SelectTaskWeldJoint.aspx.cs:行号 339
|
||||
在 FineUIPro.Web.HJGL.WeldingManage.SelectTaskWeldJoint.tvControlItem_NodeCommand(Object sender, TreeCommandEventArgs e) 位置 D:\诺必达\赛鼎\SGGL_SeDin\SGGL\FineUIPro.Web\HJGL\WeldingManage\SelectTaskWeldJoint.aspx.cs:行号 296
|
||||
在 FineUIPro.Tree.OnNodeCommand(TreeCommandEventArgs e)
|
||||
在 (Tree , TreeCommandEventArgs )
|
||||
在 FineUIPro.Tree.RaisePostBackEvent(String eventArgument)
|
||||
在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
|
||||
在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
|
||||
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
|
||||
出错时间:02/17/2023 15:15:39
|
||||
出错文件:http://localhost:4909/HJGL/WeldingManage/SelectTaskWeldJoint.aspx?strList=51f17d4a-92b5-4bbc-8935-fa0fced13bcb%7C1af885ff-b778-46c6-a13d-a21b304ac835%7C2022-12-01
|
||||
IP地址:::1
|
||||
操作人员:JT
|
||||
|
||||
出错时间:02/17/2023 15:15:39
|
||||
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
|
||||
<Items>
|
||||
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
|
||||
EnableCollapse="true" Width="200px" Title="点口管理" ShowBorder="true" Layout="VBox"
|
||||
EnableCollapse="true" Width="300px" Title="点口管理" ShowBorder="true" Layout="VBox"
|
||||
ShowHeader="false" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar4" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
|
|
@ -74,9 +74,14 @@
|
|||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar3" Position="Top" runat="server" ToolbarAlign="Right">
|
||||
<Items>
|
||||
<f:Label ID="txtPointBatchCode" Label="批次编号" runat="server" LabelAlign="Right" LabelWidth="110px">
|
||||
</f:Label>
|
||||
<f:TextBox runat="server" ID="txtpipelinecode" Label ="管线号" LabelWidth="100px" LabelAlign="Right"> </f:TextBox>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnQuery" Text="查询" ToolTip="查询" Icon="SystemSearch" runat="server"
|
||||
OnClick="btnQuery_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnManual" Text="手动点口" ToolTip="生成" Icon="cmy" runat="server"
|
||||
OnClick="btnManual_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnAutoPoint" Text="自动点口" ToolTip="生成" Icon="cmy" runat="server"
|
||||
OnClick="btnAutoPoint_Click">
|
||||
</f:Button>
|
||||
|
|
@ -101,7 +106,7 @@
|
|||
</f:Toolbar>
|
||||
<f:Toolbar ID="TbPipeline" Position="Top" runat="server" ToolbarAlign="Left" Hidden="true">
|
||||
<Items>
|
||||
<f:Label ID="lbPipelineCode" Label="管线号" runat="server" LabelAlign="Right" LabelWidth="100px">
|
||||
<f:Label ID="lbPipelineCode" Label="管线号" runat="server" LabelAlign="Right" LabelWidth="100px" >
|
||||
</f:Label>
|
||||
<f:Label ID="lbRate" Label="检测比例" runat="server" LabelAlign="Right" LabelWidth="100px">
|
||||
</f:Label>
|
||||
|
|
@ -127,6 +132,8 @@
|
|||
</f:Toolbar>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:Label ID="txtPointBatchCode" Label="批次编号" runat="server" LabelAlign="Right" LabelWidth="110px">
|
||||
</f:Label>
|
||||
<f:Label ID="txtStartDate" Label="批次开始时间" runat="server" LabelAlign="Right" LabelWidth="110px">
|
||||
</f:Label>
|
||||
<f:Label ID="txtEndDate" Label="批次关闭日期" runat="server" LabelAlign="Right" LabelWidth="110px">
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using BLL;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
|
|
@ -257,6 +258,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
|||
EnableClickEvent = true,
|
||||
};
|
||||
var pipeline= PointBatchService.GetPointBatchById(item.PointBatchId);
|
||||
string startdate = string.Format("{0:yyyy-MM-dd}", pipeline.StartDate);
|
||||
string PipeArea = "";
|
||||
if (!string.IsNullOrEmpty(pipeline.PipelineId))
|
||||
{
|
||||
|
|
@ -273,19 +275,19 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
|||
string code = "DK-" + item.PointBatchCode.Substring(item.PointBatchCode.Length - 4)+ PipeArea;
|
||||
if (!item.EndDate.HasValue) ////批 没有关闭 粉色
|
||||
{
|
||||
newNode.Text = "<font color='#FA58D0'>" + code + "</font>";
|
||||
newNode.Text = "<font color='#FA58D0'>" + code +"【"+startdate + "】"+"</font>";
|
||||
newNode.ToolTip = "批尚未关闭";
|
||||
}
|
||||
// 当天批
|
||||
else if (string.Format("{0:yyyy-MM-dd}", item.StartDate) == string.Format("{0:yyyy-MM-dd}", System.DateTime.Now)
|
||||
|| string.Format("{0:yyyy-MM-dd}", item.EndDate) == string.Format("{0:yyyy-MM-dd}", System.DateTime.Now))
|
||||
{
|
||||
newNode.Text = "<font color='#EE0000'>" + code + "</font>";
|
||||
newNode.Text = "<font color='#EE0000'>" + code + "【" + startdate + "】" + "</font>";
|
||||
newNode.ToolTip = "当天批";
|
||||
}
|
||||
else
|
||||
{
|
||||
newNode.Text = code;
|
||||
newNode.Text = code+ "【" + startdate + "】";
|
||||
}
|
||||
e.Node.Nodes.Add(newNode);
|
||||
|
||||
|
|
@ -449,6 +451,11 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
|||
{
|
||||
listStr.Add(new SqlParameter("@PointBatchId", this.PointBatchId));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(txtpipelinecode.Text.Trim()))
|
||||
{
|
||||
strSql += " and PipelineCode like @PipelineCode ";
|
||||
listStr.Add(new SqlParameter("@PipelineCode", "%"+ txtpipelinecode.Text.Trim() + "%"));
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
|
|
@ -483,6 +490,10 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
|||
{
|
||||
this.BindGrid();
|
||||
}
|
||||
protected void btnQuery_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 分页排序
|
||||
|
|
@ -624,7 +635,31 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
|||
|
||||
|
||||
}
|
||||
protected void btnManual_Click(object sender, EventArgs e)
|
||||
{
|
||||
var batch = BLL.PointBatchService.GetPointBatchById(this.PointBatchId);
|
||||
if (!batch.EndDate.HasValue)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Grid1.SelectedRowID) )
|
||||
{
|
||||
PointBatchDetailService.UpdatePointBatchDetail(Grid1.SelectedRowID, "1", System.DateTime.Now);
|
||||
this.BindGrid();
|
||||
Alert.ShowInTop("已成功点口!", MessageBoxIcon.Success);
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("请选择点口!", MessageBoxIcon.Warning);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("批已关闭,不能点口!", MessageBoxIcon.Success);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 手动点口关闭
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -123,13 +123,31 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
|||
protected global::FineUIPro.Toolbar Toolbar3;
|
||||
|
||||
/// <summary>
|
||||
/// txtPointBatchCode 控件。
|
||||
/// txtpipelinecode 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label txtPointBatchCode;
|
||||
protected global::FineUIPro.TextBox txtpipelinecode;
|
||||
|
||||
/// <summary>
|
||||
/// btnQuery 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnQuery;
|
||||
|
||||
/// <summary>
|
||||
/// btnManual 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnManual;
|
||||
|
||||
/// <summary>
|
||||
/// btnAutoPoint 控件。
|
||||
|
|
@ -302,6 +320,15 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// txtPointBatchCode 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label txtPointBatchCode;
|
||||
|
||||
/// <summary>
|
||||
/// txtStartDate 控件。
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
EnablePostBack="true" OnClick="btnQuery_Click" runat="server">
|
||||
</f:Button>
|
||||
</Items>
|
||||
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Items>
|
||||
|
|
@ -110,6 +111,10 @@
|
|||
<f:RenderField HeaderText="焊口号" ColumnID="WeldJointCode"
|
||||
DataField="WeldJointCode" SortField="WeldJointCode" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="140px" Locked="true">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="备注" ColumnID="Remark"
|
||||
DataField="Remark" SortField="Remark" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="140px" Locked="true">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="材质1" ColumnID="Material1Code"
|
||||
DataField="Material1Code" FieldType="String"
|
||||
|
|
@ -119,13 +124,15 @@
|
|||
DataField="Material2Code" FieldType="String"
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="140px" ExpandUnusedSpace="true">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="外径" ColumnID="Dia"
|
||||
DataField="Dia" SortField="Dia" FieldType="Double" HeaderTextAlign="Center" TextAlign="Left"
|
||||
Width="120px">
|
||||
<f:RenderField HeaderText="外径" ColumnID="Dia" DataField="Dia" SortField="Dia"
|
||||
FieldType="Double" HeaderTextAlign="Center" TextAlign="Left" Width="120px" >
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="公称直径" ColumnID="DNDia" DataField="DNDia" SortField="DNDia"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="120px" >
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="壁厚" ColumnID="Thickness"
|
||||
DataField="Thickness" SortField="Thickness" FieldType="Double" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="120px">
|
||||
TextAlign="Left" Width="120px" Hidden="true">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="焊缝类型" ColumnID="WeldTypeCode"
|
||||
DataField="WeldTypeCode" SortField="WeldTypeCode" FieldType="String"
|
||||
|
|
@ -133,15 +140,15 @@
|
|||
</f:RenderField>
|
||||
<f:RenderField HeaderText="焊接方法" ColumnID="WeldingMethodCode"
|
||||
DataField="WeldingMethodCode" SortField="WeldingMethodCode" FieldType="String"
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="140px" ExpandUnusedSpace="true">
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="140px" ExpandUnusedSpace="true" Hidden="true">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="焊丝" ColumnID="WeldingWireCode"
|
||||
DataField="WeldingWireCode" FieldType="String"
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="120px" ExpandUnusedSpace="true">
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="120px" ExpandUnusedSpace="true" Hidden="true">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="焊条" ColumnID="WeldingRodCode"
|
||||
DataField="WeldingRodCode" FieldType="String"
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="120px" ExpandUnusedSpace="true">
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="120px" ExpandUnusedSpace="true" Hidden="true">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
</f:Grid>
|
||||
|
|
|
|||
|
|
@ -85,9 +85,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
}
|
||||
}
|
||||
public List<HJGL_Pipeline> Tree_hJGL_Pipelines;
|
||||
public int pageindex=1;
|
||||
public int pageindex_2=1;
|
||||
public int pageSize=20;
|
||||
public int pageSize = PipelineService.pageSize;
|
||||
|
||||
#endregion
|
||||
|
||||
#region 加载页面
|
||||
|
|
@ -102,8 +101,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
{
|
||||
HJGL_MaterialService.materialStockItems_FIELD = new List<Model.MaterialStockItem>();
|
||||
HJGL_MaterialService.materialStockItems_SHOP = new List<Model.MaterialStockItem>();
|
||||
pageindex = 1;
|
||||
pageindex_2 = 1;
|
||||
|
||||
Tree_hJGL_Pipelines =new List<HJGL_Pipeline> ();
|
||||
this.txtTaskDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now.AddDays(1));
|
||||
this.txtTaskCode.Text = BLL.WeldTaskService.GetTaskCodeByDate(this.CurrUser.LoginProjectId, this.txtTaskDate.Text);
|
||||
|
|
@ -166,77 +164,57 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
/// </summary>
|
||||
private void InitTreeMenu()
|
||||
{
|
||||
pageindex = 1;
|
||||
pageindex_2 = 1;
|
||||
this.tvControlItem.Nodes.Clear();
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == this.UnitWorkId && x.UnitId == this.UnitId && x.PipeArea == PipelineService.PipeArea_SHOP && x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim()) select x).Count();
|
||||
int b = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == this.UnitWorkId && x.UnitId == this.UnitId && x.PipeArea == PipelineService.PipeArea_FIELD && x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim()) select x).Count();
|
||||
|
||||
TreeNode rootNode1 = new TreeNode();
|
||||
rootNode1.NodeID = BLL.PipelineService.PipeArea_SHOP;
|
||||
rootNode1.Text = "工厂预制";
|
||||
rootNode1.CommandName = "工厂预制";
|
||||
rootNode1.CommandName = 1 + "|" + Funs.GetEndPageNumber(a, pageSize); //页码|总页
|
||||
rootNode1.EnableClickEvent = true;
|
||||
rootNode1.EnableExpandEvent = true;
|
||||
this.tvControlItem.Nodes.Add(rootNode1);
|
||||
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == this.UnitWorkId && x.UnitId == this.UnitId && x.PipeArea == PipelineService.PipeArea_SHOP select x).Count();
|
||||
if (a > 0)
|
||||
{
|
||||
// BindNodes(tn1);
|
||||
TreeNode newNode = new TreeNode();
|
||||
newNode.Text = "加载管线...";
|
||||
newNode.NodeID = "加载管线...";
|
||||
rootNode1.Nodes.Add(newNode);
|
||||
}
|
||||
|
||||
TreeNode rootNode2 = new TreeNode();
|
||||
rootNode2.NodeID = BLL.PipelineService.PipeArea_FIELD;
|
||||
rootNode2.Text = "现场安装";
|
||||
rootNode2.CommandName = "现场安装";
|
||||
rootNode2.CommandName = 1 + "|" + Funs.GetEndPageNumber(a, pageSize);
|
||||
rootNode2.EnableClickEvent = true;
|
||||
rootNode2.EnableExpandEvent = true;
|
||||
this.tvControlItem.Nodes.Add(rootNode2);
|
||||
int b = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == this.UnitWorkId && x.UnitId == this.UnitId && x.PipeArea == PipelineService.PipeArea_FIELD select x).Count();
|
||||
if (b > 0)
|
||||
{
|
||||
// BindNodes(tn1);
|
||||
TreeNode newNode = new TreeNode();
|
||||
TreeNode newNode = new TreeNode();
|
||||
newNode.Text = "加载管线...";
|
||||
newNode.NodeID = "加载管线...";
|
||||
rootNode2.Nodes.Add(newNode);
|
||||
}
|
||||
//TreeNode rootNode = new TreeNode();
|
||||
//rootNode.Text = "管线号";
|
||||
//rootNode.NodeID = "0";
|
||||
//rootNode.Expanded = true;
|
||||
//this.tvControlItem.Nodes.Add(rootNode);
|
||||
|
||||
|
||||
|
||||
}
|
||||
void AddTreeNode(string PipeArea , TreeNode node )
|
||||
{
|
||||
var pipeline = (from x in Funs.DB.HJGL_Pipeline
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& x.UnitWorkId == this.UnitWorkId
|
||||
&& x.UnitId == this.UnitId
|
||||
&& x.PipeArea == PipeArea
|
||||
&& x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim())
|
||||
orderby x.PipelineCode select x).ToList();
|
||||
var joints = (from x in Funs.DB.HJGL_WeldJoint where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
|
||||
int pageindex = int.Parse(node.CommandName.Split('|')[0]);
|
||||
int pageCount = int.Parse(node.CommandName.Split('|')[1]);
|
||||
|
||||
var iso = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == this.UnitWorkId && x.UnitId == this.UnitId && x.PipeArea == PipeArea orderby x.PipelineCode select x).ToList();
|
||||
if (!string.IsNullOrEmpty(this.txtPipelineCode.Text))
|
||||
if (pageindex <= pageCount)
|
||||
{
|
||||
iso = (from x in iso where x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim()) orderby x.PipelineCode select x).ToList();
|
||||
}
|
||||
int pagenum = 1 ;
|
||||
switch (PipeArea)
|
||||
{
|
||||
case "1":
|
||||
pagenum = pageindex;
|
||||
break;
|
||||
case "2":
|
||||
pagenum = pageindex_2;
|
||||
break;
|
||||
}
|
||||
|
||||
var Count = iso.Count();
|
||||
if (pagenum <= Funs.GetEndPageNumber(Count,pageSize))
|
||||
{
|
||||
iso = iso.Skip(pageSize * (pagenum - 1)).Take(pageSize).ToList(); ;
|
||||
var joints = (from x in Funs.DB.HJGL_WeldJoint where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
|
||||
foreach (var item in iso)
|
||||
pipeline = pipeline.Skip(pageSize * (pageindex - 1)).Take(pageSize).ToList(); ;
|
||||
foreach (var item in pipeline)
|
||||
{
|
||||
TreeNode newNode = new TreeNode();
|
||||
int totalJointNum = joints.Count(x => x.PipelineId == item.PipelineId);
|
||||
|
|
@ -253,7 +231,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
node.Nodes.Add(newNode);
|
||||
|
||||
}
|
||||
if (pagenum < Count)
|
||||
if (pageindex < pageCount)
|
||||
{
|
||||
TreeNode newNode = new TreeNode();
|
||||
newNode.Text = "加载";
|
||||
|
|
@ -272,12 +250,12 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
if (e.Node.Nodes[0].NodeID == "加载管线...")
|
||||
{
|
||||
e.Node.Nodes.Clear();
|
||||
if (e.Node.CommandName == "工厂预制")
|
||||
if (e.Node.Text == "工厂预制")
|
||||
{
|
||||
AddTreeNode(BLL.PipelineService.PipeArea_SHOP, e.Node);
|
||||
|
||||
}
|
||||
else if (e.Node.CommandName == "现场安装")
|
||||
else if (e.Node.Text == "现场安装")
|
||||
{
|
||||
AddTreeNode(BLL.PipelineService.PipeArea_FIELD, e.Node);
|
||||
|
||||
|
|
@ -285,12 +263,46 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region 数据绑定
|
||||
/// <summary>
|
||||
/// 数据绑定
|
||||
/// </summary>
|
||||
#region 点击TreeView
|
||||
/// <summary>
|
||||
/// 点击TreeView
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
|
||||
{
|
||||
if (e.Node.Text == "加载")
|
||||
{
|
||||
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);
|
||||
|
||||
if (e.Node.CommandName == "1")
|
||||
{
|
||||
AddTreeNode(BLL.PipelineService.PipeArea_SHOP, e.Node.ParentNode);
|
||||
|
||||
}
|
||||
else if (e.Node.CommandName == "2")
|
||||
{
|
||||
AddTreeNode(BLL.PipelineService.PipeArea_FIELD, e.Node.ParentNode);
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.BindGrid();
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 数据绑定
|
||||
/// <summary>
|
||||
/// 数据绑定
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string pipelineId = this.tvControlItem.SelectedNodeID;
|
||||
|
|
@ -354,42 +366,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
}
|
||||
#endregion
|
||||
|
||||
#region 点击TreeView
|
||||
/// <summary>
|
||||
/// 点击TreeView
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
|
||||
{
|
||||
if (e.Node.Text == "加载")
|
||||
{
|
||||
|
||||
if (e.Node.CommandName == "1")
|
||||
{
|
||||
pageindex = pageindex + 1;
|
||||
TreeNode treeNode = e.Node.ParentNode;
|
||||
treeNode.Nodes.Remove(e.Node);
|
||||
AddTreeNode(BLL.PipelineService.PipeArea_SHOP, e.Node.ParentNode);
|
||||
|
||||
}
|
||||
else if (e.Node.CommandName == "2")
|
||||
{
|
||||
pageindex_2 = pageindex_2 + 1;
|
||||
TreeNode treeNode = e.Node.ParentNode;
|
||||
treeNode.Nodes.Remove(e.Node);
|
||||
|
||||
AddTreeNode(BLL.PipelineService.PipeArea_FIELD, e.Node.ParentNode);
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.BindGrid();
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region 排序
|
||||
/// <summary>
|
||||
/// 排序
|
||||
|
|
|
|||
|
|
@ -73392,7 +73392,7 @@ namespace Model
|
|||
OnCreated();
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialCode", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialCode", DbType="NVarChar(15) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
|
||||
public string MaterialCode
|
||||
{
|
||||
get
|
||||
|
|
@ -73496,7 +73496,7 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialDef", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)]
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialDef", DbType="NVarChar(3000)")]
|
||||
public string MaterialDef
|
||||
{
|
||||
get
|
||||
|
|
@ -77880,7 +77880,7 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialCode", DbType="NVarChar(50)")]
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialCode", DbType="NVarChar(15)")]
|
||||
public string MaterialCode
|
||||
{
|
||||
get
|
||||
|
|
@ -82228,7 +82228,7 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CanWelderCode", DbType="NVarChar(1000)")]
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CanWelderCode", DbType="NVarChar(200)")]
|
||||
public string CanWelderCode
|
||||
{
|
||||
get
|
||||
|
|
@ -232722,14 +232722,18 @@ namespace Model
|
|||
|
||||
private string _JointAttribute;
|
||||
|
||||
private System.Nullable<decimal> _Dia;
|
||||
|
||||
private string _DNDia;
|
||||
|
||||
private System.Nullable<decimal> _Thickness;
|
||||
|
||||
private string _Remark;
|
||||
|
||||
private string _WeldTypeCode;
|
||||
|
||||
private string _WeldingMethodCode;
|
||||
|
||||
private System.Nullable<decimal> _Dia;
|
||||
|
||||
private System.Nullable<decimal> _Thickness;
|
||||
|
||||
private string _WeldingRodCode;
|
||||
|
||||
private string _WeldingWireCode;
|
||||
|
|
@ -232838,6 +232842,70 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Dia", DbType="Decimal(8,3)")]
|
||||
public System.Nullable<decimal> Dia
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._Dia;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._Dia != value))
|
||||
{
|
||||
this._Dia = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DNDia", DbType="VarChar(50)")]
|
||||
public string DNDia
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._DNDia;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._DNDia != value))
|
||||
{
|
||||
this._DNDia = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Thickness", DbType="Decimal(8,3)")]
|
||||
public System.Nullable<decimal> Thickness
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._Thickness;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._Thickness != value))
|
||||
{
|
||||
this._Thickness = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="NVarChar(200)")]
|
||||
public string Remark
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._Remark;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._Remark != value))
|
||||
{
|
||||
this._Remark = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WeldTypeCode", DbType="NVarChar(50)")]
|
||||
public string WeldTypeCode
|
||||
{
|
||||
|
|
@ -232870,38 +232938,6 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Dia", DbType="Decimal(8,3)")]
|
||||
public System.Nullable<decimal> Dia
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._Dia;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._Dia != value))
|
||||
{
|
||||
this._Dia = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Thickness", DbType="Decimal(8,3)")]
|
||||
public System.Nullable<decimal> Thickness
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._Thickness;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._Thickness != value))
|
||||
{
|
||||
this._Thickness = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WeldingRodCode", DbType="NVarChar(50)")]
|
||||
public string WeldingRodCode
|
||||
{
|
||||
|
|
@ -234190,7 +234226,7 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CanWelderCode", DbType="NVarChar(1000)")]
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CanWelderCode", DbType="NVarChar(200)")]
|
||||
public string CanWelderCode
|
||||
{
|
||||
get
|
||||
|
|
|
|||
Loading…
Reference in New Issue