20230220 003焊接修改
This commit is contained in:
@@ -22,10 +22,21 @@
|
||||
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:TextBox ID="tvPipeCode" runat="server" Label="管线号" LabelAlign="Right"
|
||||
EmptyText="输入查询条件" Width="230px" LabelWidth="70px">
|
||||
EmptyText="输入查询条件" Width="180px" LabelWidth="70px">
|
||||
</f:TextBox>
|
||||
|
||||
<f:HiddenField runat="server" ID="hdUnitWorkId"></f:HiddenField>
|
||||
<f:Button ID="btnTreeFind" ToolTip="查询" Icon="SystemSearch"
|
||||
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:TextBox ID="txtMaterialCode" runat="server" Label="材料编码"
|
||||
EmptyText="输入查询条件" AutoPostBack="true"
|
||||
Width="180px" LabelWidth="80px" LabelAlign="Right">
|
||||
</f:TextBox>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnTreeFind" ToolTip="查询" Icon="SystemSearch"
|
||||
EnablePostBack="true" OnClick="btnTreeFind_Click" runat="server">
|
||||
</f:Button>
|
||||
</Items>
|
||||
@@ -61,10 +72,7 @@
|
||||
EmptyText="输入查询条件" AutoPostBack="true" OnTextChanged="txtWeldJointCode_TextChanged"
|
||||
Width="240px" LabelWidth="80px" LabelAlign="Right">
|
||||
</f:TextBox>--%>
|
||||
<f:TextBox ID="txtMaterialCode" runat="server" Label="材料编码"
|
||||
EmptyText="输入查询条件" AutoPostBack="true"
|
||||
Width="240px" LabelWidth="80px" LabelAlign="Right">
|
||||
</f:TextBox>
|
||||
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<%--<f:Button ID="btnSelectColumn" Text="选择显示列" Icon="ShapesManySelect"
|
||||
@@ -72,7 +80,7 @@
|
||||
</f:Button>--%>
|
||||
<f:Button ID="btnNew" Text="新增" Icon="Add" runat="server" OnClick="btnNew_Click" Hidden="true">
|
||||
</f:Button>
|
||||
<f:Button ID="btnQuery" ToolTip="查询" Icon="SystemSearch"
|
||||
<f:Button ID="btnQuery" ToolTip="查询" Icon="SystemSearch" Hidden="true"
|
||||
EnablePostBack="true" OnClick="btnQuery_Click" runat="server">
|
||||
</f:Button>
|
||||
<f:Button ID="btnPrint" Text="打印" Icon="Printer" runat="server"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using BLL;
|
||||
using FastReport.Design;
|
||||
using FineUIPro.Web.HJGL.WeldingManage;
|
||||
using FineUIPro.Web.ProjectData;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
@@ -86,12 +87,38 @@ namespace FineUIPro.Web.HJGL.DataImport
|
||||
unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList();
|
||||
unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList();
|
||||
}
|
||||
|
||||
//var dbpipeLineMat = from x in Funs.DB.HJGL_PipeLineMat select x;
|
||||
//var DBpipeline = from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId select x;
|
||||
if (unitWork1.Count() > 0)
|
||||
{
|
||||
foreach (var q in unitWork1)
|
||||
{
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId select x).Count();
|
||||
string strSql = " SELECT DISTINCT [t0].[PipelineId] FROM [dbo].[HJGL_Pipeline] AS [t0]\r\nleft JOIN [dbo].[HJGL_PipeLineMat] AS [t1] ON [t0].[PipelineId] = [t1].[PipelineId]";
|
||||
strSql += "where [t0].[UnitWorkId] =@UnitWorkId ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@UnitWorkId", q.UnitWorkId));
|
||||
|
||||
if (!string.IsNullOrEmpty(txtMaterialCode.Text.Trim()))
|
||||
{
|
||||
strSql += " and [t1].[MaterialCode] like @MaterialCode";
|
||||
listStr.Add(new SqlParameter("@MaterialCode", "%" + txtMaterialCode.Text.Trim() + "%"));
|
||||
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tvPipeCode.Text.Trim()))
|
||||
{
|
||||
strSql += " and [t0].[PipelineCode] like @PipelineCode";
|
||||
listStr.Add(new SqlParameter("@PipelineCode", "%" + tvPipeCode.Text.Trim() + "%"));
|
||||
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable dt = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
var a = dt.Rows.Count;
|
||||
|
||||
//int a = (from x in DBpipeline
|
||||
// join y in dbpipeLineMat on x.PipelineId equals y.PipelineId
|
||||
// where x.PipelineCode.Contains(tvPipeCode.Text.Trim()) && x.UnitWorkId == q.UnitWorkId
|
||||
// && y.MaterialCode.Contains(txtMaterialCode.Text.Trim())
|
||||
// select x.PipelineId).Distinct().Count();
|
||||
var u = BLL.UnitService.GetUnitByUnitId(q.UnitId);
|
||||
TreeNode tn1 = new TreeNode();
|
||||
tn1.NodeID = q.UnitWorkId;
|
||||
@@ -112,9 +139,45 @@ namespace FineUIPro.Web.HJGL.DataImport
|
||||
}
|
||||
if (unitWork2.Count() > 0)
|
||||
{
|
||||
|
||||
foreach (var q in unitWork2)
|
||||
{
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId select x).Count();
|
||||
string strSql = " SELECT DISTINCT [t0].[PipelineId] FROM [dbo].[HJGL_Pipeline] AS [t0]\r\nleft JOIN [dbo].[HJGL_PipeLineMat] AS [t1] ON [t0].[PipelineId] = [t1].[PipelineId]";
|
||||
strSql += "where [t0].[UnitWorkId] =@UnitWorkId ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@UnitWorkId", q.UnitWorkId));
|
||||
|
||||
if (!string.IsNullOrEmpty(txtMaterialCode.Text.Trim()))
|
||||
{
|
||||
strSql += " and [t1].[MaterialCode] like @MaterialCode";
|
||||
listStr.Add(new SqlParameter("@MaterialCode", "%" + txtMaterialCode.Text.Trim() + "%"));
|
||||
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tvPipeCode.Text.Trim()))
|
||||
{
|
||||
strSql += " and [t0].[PipelineCode] like @PipelineCode";
|
||||
listStr.Add(new SqlParameter("@PipelineCode", "%" + tvPipeCode.Text.Trim() + "%"));
|
||||
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable dt = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
var a =dt.Rows.Count;
|
||||
|
||||
//var b = (from x in Funs.DB.HJGL_Pipeline
|
||||
// join y in Funs.DB.HJGL_PipeLineMat on x.PipelineId equals y.PipelineId
|
||||
// where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId && y.MaterialCode.Contains(txtMaterialCode.Text.Trim())
|
||||
// select x).Distinct();
|
||||
//var b = (from x in DBpipeline
|
||||
// join y in dbpipeLineMat on x.PipelineId equals y.PipelineId
|
||||
// where x.PipelineCode.Contains(tvPipeCode.Text.Trim()) && x.UnitWorkId == q.UnitWorkId
|
||||
// && y.MaterialCode.Contains(txtMaterialCode.Text.Trim())
|
||||
// select x.PipelineId).Distinct();
|
||||
//int a = (from x in DBpipeline
|
||||
// join y in dbpipeLineMat on x.PipelineId equals y.PipelineId
|
||||
// where x.PipelineCode.Contains(tvPipeCode.Text.Trim()) && x.UnitWorkId == q.UnitWorkId
|
||||
// && y.MaterialCode.Contains(txtMaterialCode.Text.Trim())
|
||||
// select x.PipelineId).Distinct().Count();
|
||||
var u = BLL.UnitService.GetUnitByUnitId(q.UnitId);
|
||||
TreeNode tn2 = new TreeNode();
|
||||
tn2.NodeID = q.UnitWorkId;
|
||||
@@ -145,7 +208,7 @@ namespace FineUIPro.Web.HJGL.DataImport
|
||||
#region 暂不有
|
||||
private void BindNodes(TreeNode node)
|
||||
{
|
||||
BLL.PipelineService.BindTreeNodes(node, this.tvPipeCode.Text.Trim(), this.CurrUser.LoginProjectId, pageSize);
|
||||
BLL.PipelineService.BindTreeNodes(node, this.tvPipeCode.Text.Trim(),txtMaterialCode.Text.Trim(), this.CurrUser.LoginProjectId, pageSize);
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -223,11 +286,11 @@ namespace FineUIPro.Web.HJGL.DataImport
|
||||
LEFT JOIN HJGL_Pipeline line ON pipe.PipelineId=line.PipelineId
|
||||
WHERE line.UnitWorkId=@UnitWorkId and line.PipeArea='1' ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
if (!string.IsNullOrEmpty(txtMaterialCode.Text.Trim()))
|
||||
{
|
||||
strSql += " and lib.MaterialCode like @MaterialCode ";
|
||||
listStr.Add(new SqlParameter("@MaterialCode", "%" + txtMaterialCode.Text.Trim() + "%"));
|
||||
}
|
||||
//if (!string.IsNullOrEmpty(txtMaterialCode.Text.Trim()))
|
||||
//{
|
||||
// strSql += " and lib.MaterialCode like @MaterialCode ";
|
||||
// listStr.Add(new SqlParameter("@MaterialCode", "%" + txtMaterialCode.Text.Trim() + "%"));
|
||||
//}
|
||||
if (!string.IsNullOrEmpty(pipelineId))
|
||||
{
|
||||
strSql += " and pipe.PipelineId=@PipelineId order by PrefabricatedComponents ";
|
||||
@@ -258,11 +321,11 @@ namespace FineUIPro.Web.HJGL.DataImport
|
||||
listStr.Add(new SqlParameter("@PipelineId", pipelineId));
|
||||
|
||||
}
|
||||
if (!string.IsNullOrEmpty(txtMaterialCode.Text.Trim()))
|
||||
{
|
||||
strSql += " and lib.MaterialCode like @MaterialCode ";
|
||||
listStr.Add(new SqlParameter("@MaterialCode", "%"+txtMaterialCode.Text.Trim() + "%"));
|
||||
}
|
||||
//if (!string.IsNullOrEmpty(txtMaterialCode.Text.Trim()))
|
||||
//{
|
||||
// strSql += " and lib.MaterialCode like @MaterialCode ";
|
||||
// listStr.Add(new SqlParameter("@MaterialCode", "%"+txtMaterialCode.Text.Trim() + "%"));
|
||||
//}
|
||||
listStr.Add(new SqlParameter("@UnitWorkId", unitworkid));
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable dt = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
@@ -77,6 +77,24 @@ namespace FineUIPro.Web.HJGL.DataImport
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdUnitWorkId;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// txtMaterialCode 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtMaterialCode;
|
||||
|
||||
/// <summary>
|
||||
/// btnTreeFind 控件。
|
||||
/// </summary>
|
||||
@@ -122,15 +140,6 @@ namespace FineUIPro.Web.HJGL.DataImport
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar3;
|
||||
|
||||
/// <summary>
|
||||
/// txtMaterialCode 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtMaterialCode;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user