2023-02-16 焊接修改
This commit is contained in:
@@ -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 ";
|
||||
|
||||
Reference in New Issue
Block a user