2023-02-16 焊接修改
This commit is contained in:
parent
c19e51a290
commit
75431705fb
Binary file not shown.
|
|
@ -57,13 +57,33 @@ namespace BLL
|
|||
person.Message += item.UserCode + "--工号信息不能为空|";
|
||||
continue;
|
||||
}
|
||||
if (item.IdentityCard == null || item.IdentityCard == "")
|
||||
{
|
||||
|
||||
var getPerson = Person_PersonsService.GetPerson_PersonsByJobNum(item.UserCode);
|
||||
PersonDataItem personDataItem = new PersonDataItem
|
||||
{
|
||||
UserCode = item.UserCode,
|
||||
UserName = item.UserName,
|
||||
IdentityCard = item.IdentityCard,
|
||||
Image = item.Image
|
||||
};
|
||||
person.data.Add(personDataItem);
|
||||
person.Message += item.UserCode + "--身份信息不能为空|";
|
||||
continue;
|
||||
}
|
||||
Person_Persons getPerson = new Person_Persons();
|
||||
getPerson = Person_PersonsService.GetPerson_PersonsByIdCard(item.IdentityCard);
|
||||
if (getPerson==null)
|
||||
{
|
||||
getPerson = Person_PersonsService.GetPerson_PersonsByJobNum(item.UserCode);
|
||||
|
||||
}
|
||||
if (getPerson != null)
|
||||
{
|
||||
getPerson.JobNum = item.UserCode;
|
||||
getPerson.PersonName = item.UserName;
|
||||
getPerson.DataFrom = "API";
|
||||
getPerson.IdentityCard = item.IdentityCard;
|
||||
if (item.Image != "")
|
||||
{
|
||||
// Image bb = Image.FromFile("C:\\Users\\1420031550\\Desktop\\签名.jpg");
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@ namespace BLL
|
|||
/// 现场安装
|
||||
/// </summary>
|
||||
public const string PipeArea_FIELD = "2";
|
||||
|
||||
public const int pageSize = 20;
|
||||
public static List<Model.HJGL_Pipeline> hJGL_Pipelines
|
||||
{
|
||||
|
||||
|
|
@ -615,5 +617,42 @@ namespace BLL
|
|||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
|
||||
public static void BindTreeNodes(FineUIPro.TreeNode node,string pipecode,string ProjectId,int pageSize)
|
||||
{
|
||||
var pipeline = (from x in Funs.DB.HJGL_Pipeline
|
||||
where x.ProjectId == ProjectId && x.UnitWorkId == node.NodeID
|
||||
&& x.PipelineCode.Contains(pipecode)
|
||||
orderby x.PipelineCode
|
||||
select x).ToList();
|
||||
var hJGL_WeldJoints = (from x in Funs.DB.HJGL_WeldJoint where x.ProjectId == ProjectId select x).ToList();
|
||||
int pageindex = int.Parse(node.CommandName.Split('|')[0]);
|
||||
int pageCount = int.Parse(node.CommandName.Split('|')[1]);
|
||||
if (pageindex <= pageCount)
|
||||
{
|
||||
pipeline = pipeline.Skip(pageSize * (pageindex - 1)).Take(pageSize).ToList();
|
||||
foreach (var item in pipeline)
|
||||
{
|
||||
var jotCount = (from x in hJGL_WeldJoints where x.PipelineId == item.PipelineId /*&& x.IsTwoJoint == null*/ select x).Count();
|
||||
FineUIPro.TreeNode newNode = new FineUIPro.TreeNode();
|
||||
newNode.Text = item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】";
|
||||
newNode.NodeID = item.PipelineId;
|
||||
newNode.CommandName = "管线";
|
||||
newNode.EnableClickEvent = true;
|
||||
node.Nodes.Add(newNode);
|
||||
}
|
||||
if (pageindex < pageCount)
|
||||
{
|
||||
FineUIPro.TreeNode newNode = new FineUIPro.TreeNode();
|
||||
newNode.Text = "加载";
|
||||
newNode.NodeID = SQLHelper.GetNewID();
|
||||
newNode.CommandName = "加载";
|
||||
newNode.Icon = FineUIPro.Icon.ArrowDown;
|
||||
newNode.EnableClickEvent = true;
|
||||
node.Nodes.Add(newNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -433,7 +433,7 @@ namespace BLL
|
|||
&& (string.IsNullOrEmpty(model.PipelineId) || x.PipelineId.Contains(model.PipelineId))
|
||||
&& (string.IsNullOrEmpty(model.PipelineCode) || x.PipelineCode.Contains(model.PipelineCode))
|
||||
&& (string.IsNullOrEmpty(model.WeldJointCode) || x.WeldJointCode.Contains(model.WeldJointCode))
|
||||
orderby x.WeldJointCode select x).ToList();
|
||||
orderby x.WeldJointCode select x).AsParallel().ToList();
|
||||
return q;
|
||||
}
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -268,7 +268,17 @@ namespace BLL
|
|||
return q;
|
||||
}
|
||||
}
|
||||
|
||||
public static List<Model.Base_Unit> GetAllUnit()
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var q = (from x in db.Base_Unit
|
||||
|
||||
orderby x.UnitCode
|
||||
select x).Distinct().ToList();
|
||||
return q;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据项目Id获取单位名称下拉选择项
|
||||
/// </summary>
|
||||
|
|
@ -558,7 +568,17 @@ namespace BLL
|
|||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
|
||||
public static void GetALLUnit(FineUIPro.DropDownList dropName, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "UnitId";
|
||||
dropName.DataTextField = "UnitName";
|
||||
dropName.DataSource = GetAllUnit();
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 单位表下拉框
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -117,11 +117,11 @@ namespace FineUIPro.Web.CQMS.PersonManage
|
|||
tn.NodeID = sitem.PersonId;
|
||||
if (sitem.States != Const.State_1)
|
||||
{
|
||||
tn.Text = "<font color='#EE0000'>" + sitem.PersonName + "</font>";
|
||||
tn.Text = "<font color='#EE0000'>" + sitem.PersonName + "【" + sitem.WelderCode + "】" + "</font>";
|
||||
}
|
||||
else
|
||||
{
|
||||
tn.Text = sitem.PersonName;
|
||||
tn.Text = sitem.PersonName + "【" + sitem.WelderCode + "】";
|
||||
}
|
||||
tn.EnableClickEvent = true;
|
||||
rootNode.Nodes.Add(tn);
|
||||
|
|
|
|||
|
|
@ -29,7 +29,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="单位名称"
|
||||
EnableCollapse="true" Width="250px" Title="单位名称"
|
||||
ShowBorder="true" Layout="VBox" ShowHeader="true" AutoScroll="true" BodyPadding="5px"
|
||||
IconFont="ArrowCircleLeft">
|
||||
<Items>
|
||||
|
|
|
|||
|
|
@ -198,11 +198,11 @@ namespace FineUIPro.Web.CQMS.PersonManage
|
|||
tn.NodeID = sitem.PersonId;
|
||||
if (sitem.States != Const.State_1)
|
||||
{
|
||||
tn.Text = "<font color='#EE0000'>" + sitem.PersonName + "</font>";
|
||||
tn.Text = "<font color='#EE0000'>" + sitem.PersonName + "【" + sitem.WelderCode + "】" + "</font>";
|
||||
}
|
||||
else
|
||||
{
|
||||
tn.Text = sitem.PersonName;
|
||||
tn.Text = sitem.PersonName+"【" + sitem.WelderCode + "】";
|
||||
}
|
||||
tn.EnableClickEvent = true;
|
||||
rootNode.Nodes.Add(tn);
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -56,15 +56,13 @@
|
|||
EmptyText="输入查询条件"
|
||||
Width="240px" LabelWidth="100px" LabelAlign="Right">
|
||||
</f:TextBox>
|
||||
<f:Button ID="btnQuery" ToolTip="查询" Icon="SystemSearch"
|
||||
EnablePostBack="true" OnClick="btnQuery_Click" runat="server">
|
||||
</f:Button>--%>
|
||||
--%>
|
||||
<%--<f:TextBox ID="txtWeldJointCode" runat="server" Label="焊口号"
|
||||
EmptyText="输入查询条件" AutoPostBack="true" OnTextChanged="txtWeldJointCode_TextChanged"
|
||||
Width="240px" LabelWidth="80px" LabelAlign="Right">
|
||||
</f:TextBox>--%>
|
||||
<f:TextBox ID="txtMaterialCode" runat="server" Label="材料编码"
|
||||
EmptyText="输入查询条件" AutoPostBack="true" OnTextChanged="txtMaterialCode_TextChanged"
|
||||
EmptyText="输入查询条件" AutoPostBack="true"
|
||||
Width="240px" LabelWidth="80px" LabelAlign="Right">
|
||||
</f:TextBox>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
|
|
@ -73,6 +71,9 @@
|
|||
runat="server" OnClick="btnSelectColumn_Click" Hidden="true">
|
||||
</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"
|
||||
EnablePostBack="true" OnClick="btnQuery_Click" runat="server">
|
||||
</f:Button>
|
||||
<f:Button ID="btnPrint" Text="打印" Icon="Printer" runat="server"
|
||||
OnClick="btnPrint_Click">
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@ namespace FineUIPro.Web.HJGL.DataImport
|
|||
{
|
||||
public partial class MaterialInformation : PageBase
|
||||
{
|
||||
public int pageSize = PipelineService.pageSize;
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
|
|
@ -95,7 +97,7 @@ namespace FineUIPro.Web.HJGL.DataImport
|
|||
tn1.NodeID = q.UnitWorkId;
|
||||
tn1.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线";
|
||||
tn1.ToolTip = "施工单位:" + u.UnitName;
|
||||
tn1.CommandName = "单位工程";
|
||||
tn1.CommandName = 1 + "|" + Funs.GetEndPageNumber(a, pageSize);
|
||||
tn1.EnableExpandEvent = true;
|
||||
rootNode1.Nodes.Add(tn1);
|
||||
if (a > 0)
|
||||
|
|
@ -117,12 +119,12 @@ namespace FineUIPro.Web.HJGL.DataImport
|
|||
TreeNode tn2 = new TreeNode();
|
||||
tn2.NodeID = q.UnitWorkId;
|
||||
tn2.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线";
|
||||
if (q.UnitWorkId == this.hdUnitWorkId.Text)
|
||||
{
|
||||
tn2.Expanded = true;
|
||||
}
|
||||
//if (q.UnitWorkId == this.hdUnitWorkId.Text)
|
||||
//{
|
||||
// tn2.Expanded = true;
|
||||
//}
|
||||
tn2.ToolTip = "施工单位:" + u.UnitName;
|
||||
tn2.CommandName = "单位工程";
|
||||
tn2.CommandName = 1 + "|" + Funs.GetEndPageNumber(a, pageSize);
|
||||
tn2.EnableExpandEvent = true;
|
||||
tn2.EnableClickEvent = true;
|
||||
|
||||
|
|
@ -143,31 +145,7 @@ namespace FineUIPro.Web.HJGL.DataImport
|
|||
#region 暂不有
|
||||
private void BindNodes(TreeNode node)
|
||||
{
|
||||
//List<Model.HJGL_Pipeline> pipeline = new List<Model.HJGL_Pipeline>();
|
||||
//var pipelines = from x in Funs.DB.HJGL_Pipeline select x;
|
||||
//pipeline = (from x in pipelines
|
||||
// where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == node.NodeID
|
||||
// && x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim())
|
||||
// orderby x.PipelineCode
|
||||
// select x).ToList();
|
||||
//foreach (var item in pipeline)
|
||||
//{
|
||||
// var jotCount = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == item.PipelineId && x.IsTwoJoint == null select x).Count();
|
||||
// var weldJotCount = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == item.PipelineId && x.IsTwoJoint == null && x.WeldingDailyId != null select x).Count();
|
||||
// TreeNode newNode = new TreeNode();
|
||||
// if (jotCount > weldJotCount)
|
||||
// {
|
||||
// newNode.Text = "<font color='#EE0000'>" + item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】" + "</font>";
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// newNode.Text = item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】";
|
||||
// }
|
||||
// newNode.ToolTip = "管线号【焊口数】";
|
||||
// newNode.NodeID = item.PipelineId;
|
||||
// newNode.EnableClickEvent = true;
|
||||
// node.Nodes.Add(newNode);
|
||||
//}
|
||||
BLL.PipelineService.BindTreeNodes(node, this.tvPipeCode.Text.Trim(), this.CurrUser.LoginProjectId, pageSize);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
|
@ -176,35 +154,9 @@ namespace FineUIPro.Web.HJGL.DataImport
|
|||
if (e.Node.Nodes[0].NodeID == "加载管线...")
|
||||
{
|
||||
e.Node.Nodes.Clear();
|
||||
if (e.Node.CommandName == "单位工程")
|
||||
{
|
||||
var pipeline = (from x in Funs.DB.HJGL_Pipeline
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == e.Node.NodeID
|
||||
&& x.PipelineCode.Contains(this.tvPipeCode.Text.Trim())
|
||||
orderby x.PipelineCode
|
||||
select x).ToList();
|
||||
var hJGL_WeldJoints = (from x in Funs.DB.HJGL_WeldJoint where x.ProjectId == this.CurrUser.LoginProjectId select x ).ToList();
|
||||
foreach (var item in pipeline)
|
||||
{
|
||||
var jotCount = (from x in hJGL_WeldJoints where x.PipelineId == item.PipelineId && x.IsTwoJoint == null select x).Count();
|
||||
//var weldJotCount = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == item.PipelineId && x.IsTwoJoint == null && x.WeldingDailyId != null select x).Count();
|
||||
TreeNode newNode = new TreeNode();
|
||||
//if (jotCount > weldJotCount)
|
||||
//{
|
||||
// newNode.Text = "<font color='#EE0000'>" + item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】" + "</font>";
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// newNode.Text = item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】";
|
||||
//}
|
||||
newNode.Text = item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】";
|
||||
newNode.NodeID = item.PipelineId;
|
||||
newNode.EnableClickEvent = true;
|
||||
e.Node.Nodes.Add(newNode);
|
||||
}
|
||||
}
|
||||
|
||||
BindNodes(e.Node);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -217,23 +169,25 @@ namespace FineUIPro.Web.HJGL.DataImport
|
|||
/// <param name="e"></param>
|
||||
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
||||
if (e.CommandName == "加载")
|
||||
{
|
||||
if (tvControlItem.SelectedNode.CommandName== "单位工程")
|
||||
{
|
||||
this.hdUnitWorkId.Text=tvControlItem.SelectedNode.NodeID.ToString();
|
||||
//this.BindGrid1("", this.hdUnitWorkId.Text);
|
||||
//this.BindGrid2("", this.hdUnitWorkId.Text);
|
||||
|
||||
}
|
||||
else
|
||||
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);
|
||||
BindNodes(e.Node.ParentNode);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
||||
{
|
||||
|
||||
Model.HJGL_Pipeline pipeline = BLL.PipelineService.GetPipelineByPipelineId(this.tvControlItem.SelectedNodeID);
|
||||
this.hdUnitWorkId.Text = string.Empty;
|
||||
if (pipeline != null)
|
||||
{
|
||||
this.hdUnitWorkId.Text = this.tvControlItem.SelectedNode.ParentNode.NodeID;
|
||||
|
||||
|
||||
this.BindGrid1(this.tvControlItem.SelectedNodeID, this.hdUnitWorkId.Text);
|
||||
this.BindGrid2(this.tvControlItem.SelectedNodeID, this.hdUnitWorkId.Text);
|
||||
if (pipeline.PipeArea == PipelineService.PipeArea_SHOP)
|
||||
|
|
@ -241,14 +195,16 @@ namespace FineUIPro.Web.HJGL.DataImport
|
|||
TabStrip1.ActiveTabIndex = 0;
|
||||
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
TabStrip1.ActiveTabIndex = 1;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -267,12 +223,18 @@ 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(pipelineId))
|
||||
{
|
||||
strSql += " and pipe.PipelineId=@PipelineId order by PrefabricatedComponents";
|
||||
strSql += " and pipe.PipelineId=@PipelineId order by PrefabricatedComponents ";
|
||||
listStr.Add(new SqlParameter("@PipelineId", pipelineId));
|
||||
|
||||
}
|
||||
|
||||
listStr.Add(new SqlParameter("@UnitWorkId", unitworkid));
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable dt = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
|
@ -296,6 +258,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() + "%"));
|
||||
}
|
||||
listStr.Add(new SqlParameter("@UnitWorkId", unitworkid));
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable dt = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
|
@ -574,13 +541,6 @@ namespace FineUIPro.Web.HJGL.DataImport
|
|||
//this.BindGrid3(this.tvControlItem.SelectedNodeID);
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected void txtMaterialCode_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.BindGrid2(this.tvControlItem.SelectedNodeID, this.hdUnitWorkId.Text);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 选项卡改变事件
|
||||
|
|
@ -769,6 +729,17 @@ namespace FineUIPro.Web.HJGL.DataImport
|
|||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 查询
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnQuery_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.BindGrid1(this.tvControlItem.SelectedNodeID, this.hdUnitWorkId.Text);
|
||||
this.BindGrid2(this.tvControlItem.SelectedNodeID, this.hdUnitWorkId.Text);
|
||||
}
|
||||
|
||||
#region 导入
|
||||
/// <summary>
|
||||
/// 导入按钮
|
||||
|
|
|
|||
|
|
@ -149,6 +149,15 @@ namespace FineUIPro.Web.HJGL.DataImport
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnNew;
|
||||
|
||||
/// <summary>
|
||||
/// btnQuery 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnQuery;
|
||||
|
||||
/// <summary>
|
||||
/// btnPrint 控件。
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
|
||||
<Items>
|
||||
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
|
||||
|
|
@ -27,7 +27,9 @@
|
|||
<f:Button ID="btnTreeFind" ToolTip="查询" Icon="SystemSearch"
|
||||
EnablePostBack="true" OnClick="btnTreeFind_Click" runat="server">
|
||||
</f:Button>
|
||||
|
||||
<f:Button ID="btnrefresh" ToolTip="同步NET" Icon="ArrowRefresh"
|
||||
EnablePostBack="true" OnClick="btnrefresh_Click" runat="server">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
|
|
@ -64,11 +66,10 @@
|
|||
EnableCollapse="true" runat="server" BoxFlex="1" EnableColumnLines="true" DataKeyNames="WeldJointId"
|
||||
ClicksToEdit="2" DataIDField="WeldJointId" AllowSorting="true" EnableCheckBoxSelect="true"
|
||||
SortField="WeldJointCode" OnSort="Grid1_Sort" OnRowClick="Grid1_RowClick" EnableRowClickEvent="true"
|
||||
AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
EnableTextSelection="True">
|
||||
OnPageIndexChange="Grid1_PageIndexChange" EnableTextSelection="True" AllowPaging="true" IsDatabasePaging="true" PageSize="15" >
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<Items>
|
||||
|
||||
<f:TextBox ID="txtWeldJointCode" runat="server" Label="焊口号"
|
||||
LabelAlign="Right" Width="280px">
|
||||
|
|
@ -79,7 +80,11 @@
|
|||
runat="server" OnClick="BtnAnalyse_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出"
|
||||
Icon="TableGo" EnableAjax="false" DisableControlBeforePostBack="false">
|
||||
Icon="TableGo" EnableAjax="false" DisableControlBeforePostBack="true" EnablePostBack="true">
|
||||
</f:Button>
|
||||
<f:Button ID="btnOutNoComPipeline" OnClick="btnOutNOComPipeline_Click" runat="server" Text="导出未完成管线"
|
||||
Icon="TableGo" EnableAjax="false" DisableControlBeforePostBack="true" EnablePostBack="true">
|
||||
|
||||
</f:Button>
|
||||
<f:Button ID="btnGetChart" ToolTip="图表" Icon="ChartPie" Text="统计图表"
|
||||
EnablePostBack="true" OnClick="btnGetChart_Click" runat="server">
|
||||
|
|
@ -231,5 +236,29 @@
|
|||
Width="800px" Height="600px">
|
||||
</f:Window>
|
||||
</form>
|
||||
<script>
|
||||
var Form1ClientID = '<%= form1.ClientID %>';
|
||||
|
||||
function onSubmitClick(event) {
|
||||
var form1 = F(Form1ClientID);
|
||||
|
||||
// AJAX回发之前,先对表单进行验证
|
||||
|
||||
|
||||
// AJAX回发之前显示面板加载动画
|
||||
form1.showLoading();
|
||||
|
||||
// 自定义回发,设置完成时回调complete
|
||||
__doPostBack('', 'SubmitForm1', {
|
||||
// 不显示页面加载动画
|
||||
enableAjaxLoading: false,
|
||||
complete: function (data) {
|
||||
// AJAX回发结束时隐藏面板加载动画
|
||||
form1.hideLoading();
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,14 @@
|
|||
using BLL;
|
||||
using FineUIPro.Web.HJGL.WeldingManage;
|
||||
using MiniExcelLibs;
|
||||
using Model;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using AspNet = System.Web.UI.WebControls;
|
||||
|
|
@ -225,41 +229,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
|||
else
|
||||
{
|
||||
this.BindGrid();
|
||||
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 = "2.1";
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
|
||||
|
||||
if (this.tvControlItem.SelectedNode.CommandName.Split('|').Count() == 2)
|
||||
{
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
|
||||
parameter3D.Crater_data = "0";
|
||||
parameter3D.Completed_weldedjunction = Completed_weldedjunction;
|
||||
parameter3D.Incomplete_weldjunction = Incomplete_weldjunction;
|
||||
|
||||
}
|
||||
else if (this.tvControlItem.SelectedNode.CommandName == "管线")
|
||||
{
|
||||
var model = PipelineService.GetPipelineByPipelineId(tvControlItem.SelectedNodeID);
|
||||
if (model != null && !string.IsNullOrEmpty(model.UnitWorkId))
|
||||
{
|
||||
parameter3D.Crater_data = "1";
|
||||
parameter3D.TagNum = "/" + model.PipelineCode;
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(model.UnitWorkId);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
parameter3D.Transparency = colorModel.PipelineComplete;
|
||||
parameter3D.Finished_color = colorModel.JointCompleteColor;
|
||||
parameter3D.Incomplete_color = colorModel.JointNOCompleteColor;
|
||||
|
||||
ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl_Item(this.CurrUser.LoginProjectId) + parameter3D.ModelName;
|
||||
ctlAuditFlow.data = parameter3D;
|
||||
ctlAuditFlow.BindData();
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -313,32 +283,6 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
|||
|
||||
private void BindGrid()
|
||||
{
|
||||
//string strSql = @"SELECT * FROM dbo.View_HJGL_JointInfoQuery
|
||||
// WHERE ProjectId= @ProjectId";
|
||||
//List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
//listStr.Add(new SqlParameter("@projectId", this.CurrUser.LoginProjectId));
|
||||
//if (this.tvControlItem.SelectedNode.CommandName == "单位工程")
|
||||
//{
|
||||
// strSql += " AND UnitWorkId =@UnitWorkId";
|
||||
// listStr.Add(new SqlParameter("@UnitWorkId", this.tvControlItem.SelectedNodeID));
|
||||
|
||||
//}
|
||||
//else if (this.tvControlItem.SelectedNode.CommandName == "管线")
|
||||
//{
|
||||
// strSql += " AND PipelineId = @PipelineId";
|
||||
// listStr.Add(new SqlParameter("@PipelineId", this.tvControlItem.SelectedNodeID));
|
||||
//}
|
||||
//if (!string.IsNullOrEmpty(this.txtWeldJointCode.Text.Trim()))
|
||||
//{
|
||||
// strSql += " AND WeldJointCode LIKE @WeldJointCode";
|
||||
// listStr.Add(new SqlParameter("@WeldJointCode", this.txtWeldJointCode.Text.Trim()));
|
||||
//}
|
||||
//SqlParameter[] parameter = listStr.ToArray();
|
||||
//DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
//var q = tb.AsEnumerable().Where(x => x["WeldingDate"].ToString() != "");
|
||||
//var q2 = tb.AsEnumerable().Where(x => x["JointAttribute"].ToString() == "预制口");
|
||||
//var sumcount = tb.Rows.Count;
|
||||
//this.Grid1.RecordCount = tb.Rows.Count;
|
||||
Model.View_HJGL_WeldJoint model =new Model.View_HJGL_WeldJoint();
|
||||
model.ProjectId = this.CurrUser.LoginProjectId;
|
||||
if (this.tvControlItem.SelectedNode.CommandName.Split('|').Count() == 2 )
|
||||
|
|
@ -352,24 +296,12 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
|||
}
|
||||
model.WeldJointCode = this.txtWeldJointCode.Text;
|
||||
var list= BLL.WeldJointService.GetViewWeldJointsBymodel(model);
|
||||
if (!string.IsNullOrEmpty(ctlAuditFlow.Url))
|
||||
{
|
||||
get3DParmeter_weldjoint(list);//获取三维所需焊口参数
|
||||
var q = list.Where(x => !string.IsNullOrEmpty(x.WeldingDate));
|
||||
var q2 = list.Where(x => x.JointAttribute == "预制口");
|
||||
var sumcount = list.Count;
|
||||
this.Grid1.RecordCount = list.Count;
|
||||
|
||||
this.JointComplete = q.Count();
|
||||
this.JointNoComplete = sumcount - JointComplete;
|
||||
this.JointPre = q2.Count();
|
||||
this.JointNoPre = sumcount - JointPre;
|
||||
}
|
||||
|
||||
var table = this.GetPagedDataTable(Grid1, list);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.RecordCount = list.Count;
|
||||
// var table = this.GetPagedDataTable(Grid1, list);
|
||||
var table = list.Skip(Grid1.PageSize * (Grid1.PageIndex - 1)).Take(Grid1.PageSize).ToList();
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
|
||||
}
|
||||
|
||||
private void get3DParmeter_weldjoint(List<View_HJGL_WeldJoint> model)
|
||||
|
|
@ -451,6 +383,71 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
|||
this.InitTreeMenu();
|
||||
//this.BindGrid3(this.tvControlItem.SelectedNodeID);
|
||||
}
|
||||
protected void btnrefresh_Click(object sender, EventArgs e)
|
||||
{
|
||||
Model.View_HJGL_WeldJoint model = new Model.View_HJGL_WeldJoint();
|
||||
model.ProjectId = this.CurrUser.LoginProjectId;
|
||||
if (this.tvControlItem.SelectedNode.CommandName.Split('|').Count() == 2)
|
||||
{
|
||||
model.UnitWorkId = this.tvControlItem.SelectedNodeID;
|
||||
|
||||
}
|
||||
else if (this.tvControlItem.SelectedNode.CommandName == "管线")
|
||||
{
|
||||
model.PipelineId = this.tvControlItem.SelectedNodeID;
|
||||
}
|
||||
model.WeldJointCode = this.txtWeldJointCode.Text;
|
||||
var list = BLL.WeldJointService.GetViewWeldJointsBymodel(model);
|
||||
if (!string.IsNullOrEmpty(ctlAuditFlow.Url))
|
||||
{
|
||||
get3DParmeter_weldjoint(list);//获取三维所需焊口参数
|
||||
var q = list.Where(x => !string.IsNullOrEmpty(x.WeldingDate));
|
||||
var q2 = list.Where(x => x.JointAttribute == "预制口");
|
||||
var sumcount = list.Count;
|
||||
this.Grid1.RecordCount = list.Count;
|
||||
|
||||
this.JointComplete = q.Count();
|
||||
this.JointNoComplete = sumcount - JointComplete;
|
||||
this.JointPre = q2.Count();
|
||||
this.JointNoPre = sumcount - JointPre;
|
||||
}
|
||||
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 = "2.1";
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
|
||||
|
||||
if (this.tvControlItem.SelectedNode.CommandName.Split('|').Count() == 2)
|
||||
{
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
|
||||
parameter3D.Crater_data = "0";
|
||||
parameter3D.Completed_weldedjunction = Completed_weldedjunction;
|
||||
parameter3D.Incomplete_weldjunction = Incomplete_weldjunction;
|
||||
|
||||
}
|
||||
else if (this.tvControlItem.SelectedNode.CommandName == "管线")
|
||||
{
|
||||
var modelpipeline = PipelineService.GetPipelineByPipelineId(tvControlItem.SelectedNodeID);
|
||||
if (modelpipeline != null && !string.IsNullOrEmpty(modelpipeline.UnitWorkId))
|
||||
{
|
||||
parameter3D.Crater_data = "1";
|
||||
parameter3D.TagNum = "/" + modelpipeline.PipelineCode;
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(modelpipeline.UnitWorkId);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
parameter3D.Transparency = colorModel.PipelineComplete;
|
||||
parameter3D.Finished_color = colorModel.JointCompleteColor;
|
||||
parameter3D.Incomplete_color = colorModel.JointNOCompleteColor;
|
||||
|
||||
ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl_Item(this.CurrUser.LoginProjectId) + parameter3D.ModelName;
|
||||
ctlAuditFlow.data = parameter3D;
|
||||
ctlAuditFlow.BindData();
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 查询
|
||||
/// </summary>
|
||||
|
|
@ -476,19 +473,19 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
|||
/// <param name="e"></param>
|
||||
protected void btnOut_Click(object sender, EventArgs e)
|
||||
{
|
||||
Model.View_HJGL_WeldJoint model = new Model.View_HJGL_WeldJoint();
|
||||
model.ProjectId = this.CurrUser.LoginProjectId;
|
||||
if (this.tvControlItem.SelectedNode.CommandName.Split('|').Count() == 2)
|
||||
{
|
||||
model.UnitWorkId = this.tvControlItem.SelectedNodeID;
|
||||
//Model.View_HJGL_WeldJoint model = new Model.View_HJGL_WeldJoint();
|
||||
//model.ProjectId = this.CurrUser.LoginProjectId;
|
||||
//if (this.tvControlItem.SelectedNode.CommandName.Split('|').Count() == 2)
|
||||
//{
|
||||
// model.UnitWorkId = this.tvControlItem.SelectedNodeID;
|
||||
|
||||
}
|
||||
else if (this.tvControlItem.SelectedNode.CommandName == "管线")
|
||||
{
|
||||
model.PipelineId = this.tvControlItem.SelectedNodeID;
|
||||
}
|
||||
model.WeldJointCode = this.txtWeldJointCode.Text;
|
||||
var list = BLL.WeldJointService.GetViewWeldJointsBymodel(model);
|
||||
//}
|
||||
//else if (this.tvControlItem.SelectedNode.CommandName == "管线")
|
||||
//{
|
||||
// model.PipelineId = this.tvControlItem.SelectedNodeID;
|
||||
//}
|
||||
//model.WeldJointCode = this.txtWeldJointCode.Text;
|
||||
//var list = BLL.WeldJointService.GetViewWeldJointsBymodel(model);
|
||||
|
||||
|
||||
Response.ClearContent();
|
||||
|
|
@ -499,7 +496,55 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
|||
Response.Write(GetGridTableHtml(Grid1));
|
||||
Response.End();
|
||||
}
|
||||
protected void btnOutNOComPipeline_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.tvControlItem.SelectedNode.CommandName.Split('|').Count() == 2)
|
||||
{
|
||||
var q = (from x in Funs.DB.View_HJGL_WeldJoint where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == this.tvControlItem.SelectedNodeID
|
||||
select new {
|
||||
PipelineId=x.PipelineId,
|
||||
WeldingDate=x.WeldingDate,
|
||||
WeldJointCode=x.WeldJointCode,
|
||||
PipelineCode=x.PipelineCode,
|
||||
Size=x.Size,
|
||||
});
|
||||
var noCompipeline = from x in q
|
||||
group x by x.PipelineId into g
|
||||
select new
|
||||
{
|
||||
PipelineId = g.Key,
|
||||
Count = (from x2 in g where x2.WeldingDate!=null && x2.WeldingDate!="" select x2).Count(),
|
||||
};
|
||||
var Noweldjoint =( from x in q
|
||||
join y in noCompipeline on x.PipelineId equals y.PipelineId
|
||||
where y.Count == 0
|
||||
select new { 焊口号=x.WeldJointCode ,
|
||||
管线号=x.PipelineCode,
|
||||
达因=x.Size}).ToList();
|
||||
|
||||
string path = Funs.RootPath + @"File\Excel\Temp\NoCompleteWeldjoint.xlsx";
|
||||
path = path.Replace(".xlsx", string.Format("{0:yyyy-MM-dd-HH-mm}", DateTime.Now) + ".xlsx");
|
||||
|
||||
MiniExcel.SaveAs(path, Noweldjoint);
|
||||
|
||||
string fileName = "未完成管线焊口.xlsx";
|
||||
FileInfo info = new FileInfo(path);
|
||||
long fileSize = info.Length;
|
||||
System.Web.HttpContext.Current.Response.Clear();
|
||||
System.Web.HttpContext.Current.Response.ContentType = "application/x-zip-compressed";
|
||||
System.Web.HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
|
||||
System.Web.HttpContext.Current.Response.AddHeader("Content-Length", fileSize.ToString());
|
||||
System.Web.HttpContext.Current.Response.TransmitFile(path, 0, fileSize);
|
||||
System.Web.HttpContext.Current.Response.Flush();
|
||||
System.Web.HttpContext.Current.Response.Close();
|
||||
File.Delete(path);
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.Show("请选择主项");
|
||||
}
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 导出方法
|
||||
/// </summary>
|
||||
|
|
@ -508,7 +553,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
|||
private string GetGridTableHtml(Grid grid)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
grid.PageSize = 10000;
|
||||
grid.PageSize = 100000;
|
||||
BindGrid();
|
||||
sb.Append("<meta http-equiv=\"content-type\" content=\"application/excel; charset=UTF-8\"/>");
|
||||
sb.Append("<table cellspacing=\"0\" rules=\"all\" border=\"1\" style=\"border-collapse:collapse;\">");
|
||||
|
|
@ -583,5 +628,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
|||
ctlAuditFlow.data = parameter3D;
|
||||
ctlAuditFlow.BindData();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -86,6 +86,15 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnTreeFind;
|
||||
|
||||
/// <summary>
|
||||
/// btnrefresh 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnrefresh;
|
||||
|
||||
/// <summary>
|
||||
/// tvControlItem 控件。
|
||||
/// </summary>
|
||||
|
|
@ -194,6 +203,15 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnOut;
|
||||
|
||||
/// <summary>
|
||||
/// btnOutNoComPipeline 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnOutNoComPipeline;
|
||||
|
||||
/// <summary>
|
||||
/// btnGetChart 控件。
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -117,11 +117,11 @@ namespace FineUIPro.Web.HJGL.PersonManage
|
|||
tn.NodeID = sitem.PersonId;
|
||||
if (sitem.States != Const.State_1)
|
||||
{
|
||||
tn.Text = "<font color='#EE0000'>" + sitem.PersonName + "</font>";
|
||||
tn.Text = "<font color='#EE0000'>" + sitem.PersonName + "【" + sitem.WelderCode + "】" + "</font>";
|
||||
}
|
||||
else
|
||||
{
|
||||
tn.Text = sitem.PersonName;
|
||||
tn.Text = sitem.PersonName + "【" + sitem.WelderCode + "】";
|
||||
}
|
||||
tn.EnableClickEvent = true;
|
||||
rootNode.Nodes.Add(tn);
|
||||
|
|
|
|||
|
|
@ -29,7 +29,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="单位名称"
|
||||
EnableCollapse="true" Width="250px" Title="单位名称"
|
||||
ShowBorder="true" Layout="VBox" ShowHeader="true" AutoScroll="true" BodyPadding="5px"
|
||||
IconFont="ArrowCircleLeft">
|
||||
<Items>
|
||||
|
|
|
|||
|
|
@ -198,11 +198,11 @@ namespace FineUIPro.Web.HJGL.PersonManage
|
|||
tn.NodeID = sitem.PersonId;
|
||||
if (sitem.States != Const.State_1)
|
||||
{
|
||||
tn.Text = "<font color='#EE0000'>" + sitem.PersonName + "</font>";
|
||||
tn.Text = "<font color='#EE0000'>" + sitem.PersonName + "【" + sitem.WelderCode + "】" + "</font>";
|
||||
}
|
||||
else
|
||||
{
|
||||
tn.Text = sitem.PersonName;
|
||||
tn.Text = sitem.PersonName+"【"+ sitem.WelderCode + "】";
|
||||
}
|
||||
tn.EnableClickEvent = true;
|
||||
rootNode.Nodes.Add(tn);
|
||||
|
|
|
|||
|
|
@ -29,8 +29,8 @@
|
|||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:DropDownList ID="drpUnit" runat="server" Label="供货单位" LabelAlign="Right" LabelWidth="80px" EnableEdit="true">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpUnit" runat="server" Label="供货单位" LabelAlign="Right" LabelWidth="80px" EnableEdit="true" >
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpMainItem" runat="server" Label="主项" LabelAlign="Right" EnableEdit="true" LabelWidth="60px">
|
||||
</f:DropDownList>
|
||||
<f:TextBox ID="txtMaterialCode" runat="server" Label="材料编码" LabelWidth="80px"
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||
if (!IsPostBack)
|
||||
{
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
BLL.UnitService.GetUnit(this.drpUnit, this.ProjectId, true);
|
||||
BLL.UnitService.GetALLUnit(this.drpUnit, true);
|
||||
BLL.MainItemService.InitMainItemDownList(drpMainItem, this.ProjectId, true);
|
||||
btnNew.OnClientClick = Window1.GetShowReference("MaterialManageEdit.aspx") + "return false;";
|
||||
GetButtonPower();
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@
|
|||
Width="180px" LabelWidth="80px" LabelAlign="Right">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtSingleName" runat="server" Label="外径"
|
||||
EmptyText="输入查询条件"
|
||||
EmptyText="输入查询条件" Hidden="true"
|
||||
Width="180px" LabelWidth="80px" LabelAlign="Right">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtDesignPress" runat="server" Label="压力"
|
||||
|
|
|
|||
|
|
@ -6,6 +6,12 @@
|
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>焊口信息</title>
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
<style>
|
||||
.customlabel span {
|
||||
color: red;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
|
|
@ -67,7 +73,9 @@
|
|||
EmptyText="输入查询条件" AutoPostBack="true" OnTextChanged="txtMaterialCode_TextChanged"
|
||||
Width="240px" LabelWidth="80px" LabelAlign="Right">
|
||||
</f:TextBox>
|
||||
<f:Label ID="lbSinglePreRate" runat="server" Text="图纸预制率" Hidden="true"></f:Label>
|
||||
<f:Label ID="lbSinglePreRate" CssClass="customlabel" runat="server" Label="图纸预制率"></f:Label>
|
||||
<f:Label ID="lbShopSize" CssClass="customlabel" runat="server" Label="预制口达因"></f:Label>
|
||||
<f:Label ID="lbFiledSize" CssClass="customlabel" runat="server" Label="安装口达因"></f:Label>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<%--<f:Button ID="btnSelectColumn" Text="选择显示列" Icon="ShapesManySelect"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using Apache.NMS.ActiveMQ.Threads;
|
||||
using BLL;
|
||||
using FineUIPro.Web.ProjectData;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
|
|
@ -15,8 +16,16 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
{
|
||||
public partial class WeldJointList : PageBase
|
||||
{
|
||||
public int pageSize = PipelineService.pageSize;
|
||||
public static List<Model.HJGL_WeldJoint> WeldJointlist = new List<Model.HJGL_WeldJoint>();
|
||||
|
||||
/// <summary>
|
||||
/// 预制口总达因
|
||||
/// </summary>
|
||||
public static string ShopSumSize = "0";
|
||||
/// <summary>
|
||||
/// 安装口总达因
|
||||
/// </summary>
|
||||
public static string FieldSumSize = "0";
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
|
|
@ -107,8 +116,9 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
tn1.NodeID = q.UnitWorkId;
|
||||
tn1.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线";
|
||||
tn1.ToolTip = "施工单位:" + u.UnitName;
|
||||
tn1.CommandName = "单位工程";
|
||||
tn1.CommandName = 1 + "|" + Funs.GetEndPageNumber(a, pageSize);
|
||||
tn1.EnableExpandEvent = true;
|
||||
tn1.EnableClickEvent = true;
|
||||
rootNode1.Nodes.Add(tn1);
|
||||
if (a > 0)
|
||||
{
|
||||
|
|
@ -124,18 +134,21 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
{
|
||||
foreach (var q in unitWork2)
|
||||
{
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId select x).Count();
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId
|
||||
&& x.PipelineCode.Contains(this.tvPipeCode.Text.Trim())
|
||||
select x).Count();
|
||||
var u = BLL.UnitService.GetUnitByUnitId(q.UnitId);
|
||||
TreeNode tn2 = new TreeNode();
|
||||
tn2.NodeID = q.UnitWorkId;
|
||||
tn2.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线";
|
||||
if (q.UnitWorkId == this.hdUnitWorkId.Text)
|
||||
{
|
||||
tn2.Expanded = true;
|
||||
}
|
||||
//if (q.UnitWorkId == this.hdUnitWorkId.Text)
|
||||
//{
|
||||
// tn2.Expanded = true;
|
||||
//}
|
||||
tn2.ToolTip = "施工单位:" + u.UnitName;
|
||||
tn2.CommandName = "单位工程";
|
||||
tn2.CommandName = 1 + "|" + Funs.GetEndPageNumber(a, pageSize);
|
||||
tn2.EnableExpandEvent = true;
|
||||
tn2.EnableClickEvent= true;
|
||||
rootNode2.Nodes.Add(tn2);
|
||||
if (a > 0)
|
||||
{
|
||||
|
|
@ -150,65 +163,46 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
}
|
||||
#endregion
|
||||
|
||||
#region 暂不有
|
||||
#region
|
||||
private void BindNodes(TreeNode node)
|
||||
{
|
||||
//List<Model.HJGL_Pipeline> pipeline = new List<Model.HJGL_Pipeline>();
|
||||
//var pipelines = from x in Funs.DB.HJGL_Pipeline select x;
|
||||
//pipeline = (from x in pipelines
|
||||
// where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == node.NodeID
|
||||
// && x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim())
|
||||
// orderby x.PipelineCode
|
||||
// select x).ToList();
|
||||
//foreach (var item in pipeline)
|
||||
//{
|
||||
// var jotCount = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == item.PipelineId && x.IsTwoJoint == null select x).Count();
|
||||
// var weldJotCount = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == item.PipelineId && x.IsTwoJoint == null && x.WeldingDailyId != null select x).Count();
|
||||
// TreeNode newNode = new TreeNode();
|
||||
// if (jotCount > weldJotCount)
|
||||
// {
|
||||
// newNode.Text = "<font color='#EE0000'>" + item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】" + "</font>";
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// newNode.Text = item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】";
|
||||
// }
|
||||
// newNode.ToolTip = "管线号【焊口数】";
|
||||
// newNode.NodeID = item.PipelineId;
|
||||
// newNode.EnableClickEvent = true;
|
||||
// node.Nodes.Add(newNode);
|
||||
//}
|
||||
BLL.PipelineService.BindTreeNodes(node, this.tvPipeCode.Text.Trim(), this.CurrUser.LoginProjectId,pageSize);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
protected void tvControlItem_TreeNodeExpanded(object sender, TreeNodeEventArgs e)
|
||||
{
|
||||
|
||||
e.Node.Nodes.Clear();
|
||||
|
||||
if (e.Node.CommandName == "单位工程")
|
||||
if (e.Node.Nodes[0].NodeID == "加载管线...")
|
||||
{
|
||||
var pipeline = (from x in Funs.DB.HJGL_Pipeline
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == e.Node.NodeID && x.PipelineCode.Contains(this.tvPipeCode.Text.Trim())
|
||||
orderby x.PipelineCode
|
||||
select x).ToList();
|
||||
var hJGL_WeldJoints = (from x in Funs.DB.HJGL_WeldJoint where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
|
||||
|
||||
// var WeldJointlist = (from x in Funs.DB.View_HJGL_WeldJoint where x.UnitWorkId == e.Node.NodeID && x.IsTwoJoint == null select x).ToList();
|
||||
|
||||
foreach (var item in pipeline)
|
||||
{
|
||||
//var jotCount = WeldJointlist.Where(x => x.PipelineId == item.PipelineId).Count();
|
||||
var jotCount = hJGL_WeldJoints.Where(x => x.PipelineId == item.PipelineId).Count();
|
||||
TreeNode newNode = new TreeNode();
|
||||
newNode.Text = item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】";
|
||||
newNode.NodeID = item.PipelineId;
|
||||
newNode.EnableClickEvent = true;
|
||||
e.Node.Nodes.Add(newNode);
|
||||
|
||||
}
|
||||
|
||||
e.Node.Nodes.Clear();
|
||||
BindNodes(e.Node);
|
||||
}
|
||||
|
||||
//e.Node.Nodes.Clear();
|
||||
|
||||
//if (e.Node.CommandName == "单位工程")
|
||||
//{
|
||||
// var pipeline = (from x in Funs.DB.HJGL_Pipeline
|
||||
// where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == e.Node.NodeID && x.PipelineCode.Contains(this.tvPipeCode.Text.Trim())
|
||||
// orderby x.PipelineCode
|
||||
// select x).ToList();
|
||||
// var hJGL_WeldJoints = (from x in Funs.DB.HJGL_WeldJoint where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
|
||||
|
||||
// // var WeldJointlist = (from x in Funs.DB.View_HJGL_WeldJoint where x.UnitWorkId == e.Node.NodeID && x.IsTwoJoint == null select x).ToList();
|
||||
|
||||
// foreach (var item in pipeline)
|
||||
// {
|
||||
// //var jotCount = WeldJointlist.Where(x => x.PipelineId == item.PipelineId).Count();
|
||||
// var jotCount = hJGL_WeldJoints.Where(x => x.PipelineId == item.PipelineId).Count();
|
||||
// TreeNode newNode = new TreeNode();
|
||||
// newNode.Text = item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】";
|
||||
// newNode.NodeID = item.PipelineId;
|
||||
// newNode.EnableClickEvent = true;
|
||||
// e.Node.Nodes.Add(newNode);
|
||||
|
||||
// }
|
||||
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -220,23 +214,40 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
/// <param name="e"></param>
|
||||
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
||||
if (e.CommandName == "加载")
|
||||
{
|
||||
Model.HJGL_Pipeline pipeline = BLL.PipelineService.GetPipelineByPipelineId(this.tvControlItem.SelectedNodeID);
|
||||
this.hdUnitWorkId.Text = string.Empty;
|
||||
if (pipeline != null)
|
||||
{
|
||||
this.hdUnitWorkId.Text = this.tvControlItem.SelectedNode.ParentNode.NodeID;
|
||||
this.BindGrid1(this.tvControlItem.SelectedNodeID);
|
||||
this.BindGrid2(this.tvControlItem.SelectedNodeID);
|
||||
this.BindGrid3(this.tvControlItem.SelectedNodeID);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.hdUnitWorkId.Text = this.tvControlItem.SelectedNodeID;
|
||||
}
|
||||
|
||||
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);
|
||||
BindNodes(e.Node.ParentNode);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
||||
{
|
||||
Model.HJGL_Pipeline pipeline = BLL.PipelineService.GetPipelineByPipelineId(this.tvControlItem.SelectedNodeID);
|
||||
this.hdUnitWorkId.Text = string.Empty;
|
||||
if (pipeline != null)
|
||||
{
|
||||
this.hdUnitWorkId.Text = this.tvControlItem.SelectedNode.ParentNode.NodeID;
|
||||
this.BindGrid1(this.tvControlItem.SelectedNodeID);
|
||||
this.BindGrid2(this.tvControlItem.SelectedNodeID);
|
||||
this.BindGrid3(this.tvControlItem.SelectedNodeID);
|
||||
this.lbSinglePreRate.Text = GetRateByPipelineid(this.tvControlItem.SelectedNodeID);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
this.hdUnitWorkId.Text = this.tvControlItem.SelectedNodeID;
|
||||
this.lbSinglePreRate.Text = GetRateByUnitWork(this.tvControlItem.SelectedNodeID);
|
||||
|
||||
}
|
||||
this.lbShopSize.Text = ShopSumSize;
|
||||
this.lbFiledSize.Text = FieldSumSize;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
|
@ -379,11 +390,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
//}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region 预制率计算
|
||||
private string GetRateByUnitWork(string unitworkid)
|
||||
{
|
||||
var db = Funs.DB;
|
||||
var q=from x in db.View_HJGL_WeldJoint where x.UnitWorkId == unitworkid select x ;
|
||||
string rate = "";
|
||||
ShopSumSize = "0";
|
||||
FieldSumSize = "0";
|
||||
if (q!=null&&q.Count()>0)
|
||||
{
|
||||
var proSum = (from x in q
|
||||
|
|
@ -393,32 +408,78 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
{
|
||||
SizeSum = g.Sum(x => x.Size)
|
||||
}).FirstOrDefault().SizeSum;
|
||||
|
||||
var FieldSum = (from x in q
|
||||
where x.JointAttribute == "安装口"
|
||||
group x by x.UnitWorkId into g
|
||||
select new
|
||||
{
|
||||
SizeSum = g.Sum(x => x.Size)
|
||||
}).FirstOrDefault().SizeSum;
|
||||
var AllSum = (from x in q
|
||||
group x by x.UnitWorkId into g
|
||||
select new
|
||||
{
|
||||
SizeSum = g.Sum(x => x.Size)
|
||||
}).FirstOrDefault().SizeSum;
|
||||
var a = (decimal)100 * proSum / AllSum;
|
||||
var rate = Math.Round((decimal)a, 1);
|
||||
return rate.ToString()+"%";
|
||||
proSum = (proSum != null) ? proSum : 0;
|
||||
FieldSum = (FieldSum != null) ? FieldSum : 0;
|
||||
ShopSumSize = proSum.ToString() ;
|
||||
FieldSumSize = FieldSum.ToString() ;
|
||||
if (AllSum>0)
|
||||
{
|
||||
var a = (decimal)100 * proSum / AllSum;
|
||||
rate = Math.Round((decimal)a, 1).ToString()+"%";
|
||||
}
|
||||
|
||||
return rate;
|
||||
}
|
||||
return "";
|
||||
return "0%";
|
||||
}
|
||||
void GetRateByPipelineid(string pipelineid)
|
||||
private string GetRateByPipelineid(string pipelineid)
|
||||
{
|
||||
string rate = "";
|
||||
ShopSumSize = "0";
|
||||
FieldSumSize = "0";
|
||||
var db = Funs.DB;
|
||||
var q = (from x in db.View_HJGL_WeldJoint
|
||||
group x by x.PipelineId into g
|
||||
where g.Key == pipelineid
|
||||
select new
|
||||
{
|
||||
SizeSum = g.Sum(x => x.Size)
|
||||
}).FirstOrDefault().SizeSum;
|
||||
|
||||
var q = from x in db.View_HJGL_WeldJoint where x.PipelineId == pipelineid select x;
|
||||
if (q != null && q.Count() > 0)
|
||||
{
|
||||
var proSum = (from x in q
|
||||
where x.JointAttribute == "预制口"
|
||||
group x by x.PipelineId into g
|
||||
select new
|
||||
{
|
||||
SizeSum = g.Sum(x => x.Size)
|
||||
}).FirstOrDefault().SizeSum;
|
||||
var FieldSum = (from x in q
|
||||
where x.JointAttribute == "安装口"
|
||||
group x by x.PipelineId into g
|
||||
select new
|
||||
{
|
||||
SizeSum = g.Sum(x => x.Size)
|
||||
}).FirstOrDefault().SizeSum;
|
||||
var AllSum = (from x in q
|
||||
group x by x.PipelineId into g
|
||||
select new
|
||||
{
|
||||
SizeSum = g.Sum(x => x.Size)
|
||||
}).FirstOrDefault().SizeSum;
|
||||
proSum = (proSum != null) ? proSum : 0;
|
||||
FieldSum = (FieldSum != null) ? FieldSum : 0;
|
||||
ShopSumSize = proSum.ToString();
|
||||
FieldSumSize = FieldSum.ToString();
|
||||
if (AllSum > 0)
|
||||
{
|
||||
var a = (decimal)100 * proSum / AllSum;
|
||||
rate = Math.Round((decimal)a, 1).ToString() + "%";
|
||||
}
|
||||
|
||||
return rate;
|
||||
}
|
||||
return "0%";
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 焊口信息 维护事件
|
||||
/// <summary>
|
||||
/// Grid双击事件
|
||||
|
|
|
|||
|
|
@ -149,6 +149,24 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbSinglePreRate;
|
||||
|
||||
/// <summary>
|
||||
/// lbShopSize 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbShopSize;
|
||||
|
||||
/// <summary>
|
||||
/// lbFiledSize 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbFiledSize;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -105,6 +105,10 @@
|
|||
DataField="Dia" SortField="Dia" FieldType="Double" HeaderTextAlign="Center" TextAlign="Left"
|
||||
Width="90px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="公称直径" ColumnID="DNDia"
|
||||
DataField="DNDia" SortField="DNDia" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
|
||||
Width="90px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="壁厚" ColumnID="Thickness"
|
||||
DataField="Thickness" SortField="Thickness" FieldType="Double" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="90px">
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
{
|
||||
public partial class WeldingConDate : PageBase
|
||||
{
|
||||
public int pageSize = PipelineService.pageSize;
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
|
|
@ -77,8 +79,9 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
tn1.NodeID = q.UnitWorkId;
|
||||
tn1.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线";
|
||||
tn1.ToolTip = "施工单位:" + u.UnitName;
|
||||
tn1.CommandName = "单位工程";
|
||||
tn1.CommandName = 1 + "|" + Funs.GetEndPageNumber(a, pageSize);
|
||||
tn1.EnableExpandEvent = true;
|
||||
tn1.EnableClickEvent = true;
|
||||
rootNode1.Nodes.Add(tn1);
|
||||
if (a > 0)
|
||||
{
|
||||
|
|
@ -94,18 +97,20 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
{
|
||||
foreach (var q in unitWork2)
|
||||
{
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId select x).Count();
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId
|
||||
&& x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim()) select x).Count();
|
||||
var u = BLL.UnitService.GetUnitByUnitId(q.UnitId);
|
||||
TreeNode tn2 = new TreeNode();
|
||||
tn2.NodeID = q.UnitWorkId;
|
||||
tn2.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线";
|
||||
if (q.UnitWorkId == this.hdUnitWorkId.Text)
|
||||
{
|
||||
tn2.Expanded = true;
|
||||
}
|
||||
//if (q.UnitWorkId == this.hdUnitWorkId.Text)
|
||||
//{
|
||||
// tn2.Expanded = true;
|
||||
//}
|
||||
tn2.ToolTip = "施工单位:" + u.UnitName;
|
||||
tn2.CommandName = "单位工程";
|
||||
tn2.CommandName = 1 + "|" + Funs.GetEndPageNumber(a, pageSize);
|
||||
tn2.EnableExpandEvent = true;
|
||||
tn2.EnableClickEvent = true;
|
||||
rootNode2.Nodes.Add(tn2);
|
||||
if (a > 0)
|
||||
{
|
||||
|
|
@ -121,40 +126,17 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
|
||||
protected void tvControlItem_TreeNodeExpanded(object sender, TreeNodeEventArgs e)
|
||||
{
|
||||
e.Node.Nodes.Clear();
|
||||
if (e.Node.CommandName == "单位工程")
|
||||
if (e.Node.Nodes[0].NodeID == "加载管线...")
|
||||
{
|
||||
var pipeline = (from x in Funs.DB.HJGL_Pipeline
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == e.Node.NodeID
|
||||
&& x.PipelineCode.Contains(txtPipelineCode.Text.Trim())
|
||||
orderby x.PipelineCode
|
||||
select x).ToList();
|
||||
var hJGL_WeldJoints = (from x in Funs.DB.HJGL_WeldJoint where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
|
||||
|
||||
foreach (var item in pipeline)
|
||||
{
|
||||
var jotCount = (from x in hJGL_WeldJoints where x.PipelineId == item.PipelineId && x.IsTwoJoint == null select x).Count();
|
||||
//var weldJotCount = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == item.PipelineId && x.IsTwoJoint == null && x.WeldingDailyId != null select x).Count();
|
||||
|
||||
//if (jotCount > weldJotCount)
|
||||
//{
|
||||
// newNode.Text = "<font color='#EE0000'>" + item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】" + "</font>";
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// newNode.Text = item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】";
|
||||
//}
|
||||
|
||||
TreeNode newNode = new TreeNode();
|
||||
newNode.Text = item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】";
|
||||
|
||||
newNode.NodeID = item.PipelineId;
|
||||
newNode.EnableClickEvent = true;
|
||||
e.Node.Nodes.Add(newNode);
|
||||
}
|
||||
e.Node.Nodes.Clear();
|
||||
BindNodes(e.Node);
|
||||
}
|
||||
|
||||
}
|
||||
private void BindNodes(TreeNode node)
|
||||
{
|
||||
BLL.PipelineService.BindTreeNodes(node, this.txtPipelineCode.Text.Trim(), this.CurrUser.LoginProjectId, pageSize);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
protected void btnTreeFind_Click(object sender, EventArgs e)
|
||||
|
|
@ -170,16 +152,28 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
/// <param name="e"></param>
|
||||
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
||||
if (e.CommandName == "加载")
|
||||
{
|
||||
Model.HJGL_Pipeline pipeline = BLL.PipelineService.GetPipelineByPipelineId(this.tvControlItem.SelectedNodeID);
|
||||
this.hdUnitWorkId.Text = string.Empty;
|
||||
if (pipeline != null)
|
||||
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);
|
||||
BindNodes(e.Node.ParentNode);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
||||
{
|
||||
this.hdUnitWorkId.Text = this.tvControlItem.SelectedNode.ParentNode.NodeID;
|
||||
this.BindGrid();
|
||||
Model.HJGL_Pipeline pipeline = BLL.PipelineService.GetPipelineByPipelineId(this.tvControlItem.SelectedNodeID);
|
||||
this.hdUnitWorkId.Text = string.Empty;
|
||||
if (pipeline != null)
|
||||
{
|
||||
this.hdUnitWorkId.Text = this.tvControlItem.SelectedNode.ParentNode.NodeID;
|
||||
this.BindGrid();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
|
@ -188,7 +182,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
{
|
||||
string strSql = @"SELECT WeldJointId,WeldJointCode,PipelineId,PipelineCode,JointAttribute,
|
||||
IsWelding,IsHotProessStr,Material1Code,Material2Code,WeldTypeCode,
|
||||
Specification,HeartNo1,HeartNo2,Size,Dia,Thickness,GrooveTypeCode,
|
||||
Specification,HeartNo1,HeartNo2,Size,Dia,DNDia,Thickness,GrooveTypeCode,
|
||||
WeldingMethodCode,WeldingWireCode,WeldingRodCode,WeldingDate,WeldingDailyCode,
|
||||
BackingWelderCode,CoverWelderCode,MediumCode ,PreTemperature,JointArea,WPQCode,Remark
|
||||
FROM View_HJGL_WeldJoint WHERE IsTwoJoint IS NULL ";
|
||||
|
|
|
|||
|
|
@ -57,14 +57,14 @@ namespace WebAPI.Controllers
|
|||
|
||||
try
|
||||
{
|
||||
var Data = APIHTGLPersonService.SavePro_Person(PersonjsonData);
|
||||
responeData.data = Data.data;
|
||||
if (Data.Message != "" && Data.Message != null)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = Data.Message;
|
||||
ErrLogInfo.WriteLog(Newtonsoft.Json.JsonConvert.SerializeObject(responeData));
|
||||
}
|
||||
//var Data = APIHTGLPersonService.SavePro_Person(PersonjsonData);
|
||||
//responeData.data = Data.data;
|
||||
//if (Data.Message != "" && Data.Message != null)
|
||||
//{
|
||||
// responeData.code = 0;
|
||||
// responeData.message = Data.Message;
|
||||
// ErrLogInfo.WriteLog(Newtonsoft.Json.JsonConvert.SerializeObject(responeData));
|
||||
//}
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<DeleteExistingFiles>true</DeleteExistingFiles>
|
||||
<ExcludeApp_Data>false</ExcludeApp_Data>
|
||||
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
|
||||
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
|
||||
<LastUsedPlatform>Any CPU</LastUsedPlatform>
|
||||
<PublishProvider>FileSystem</PublishProvider>
|
||||
<PublishUrl>bin\app.publish\</PublishUrl>
|
||||
<WebPublishMethod>FileSystem</WebPublishMethod>
|
||||
<_TargetId>Folder</_TargetId>
|
||||
<SiteUrlToLaunchAfterPublish />
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
Loading…
Reference in New Issue