2024-06-19
This commit is contained in:
@@ -5,6 +5,7 @@ using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
@@ -121,6 +122,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
tn1.CommandName = 1 + "|" + Funs.GetEndPageNumber(a, pageSize);
|
||||
tn1.EnableExpandEvent = true;
|
||||
tn1.EnableClickEvent = true;
|
||||
tn1.EnableCheckBox = false;
|
||||
rootNode1.Nodes.Add(tn1);
|
||||
if (a > 0)
|
||||
{
|
||||
@@ -182,6 +184,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
tn2.CommandName = 1 + "|" + Funs.GetEndPageNumber(a, pageSize);
|
||||
tn2.EnableExpandEvent = true;
|
||||
tn2.EnableClickEvent = true;
|
||||
tn2.EnableCheckBox = false;
|
||||
rootNode2.Nodes.Add(tn2);
|
||||
if (a > 0)
|
||||
{
|
||||
@@ -463,6 +466,79 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
ShowNotify("该管线焊口已完成自动录入!", MessageBoxIcon.Success);
|
||||
}
|
||||
}
|
||||
protected void btnAutoInput2_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.drpUnit.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
ShowNotify("请选择工艺规程编制单位!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
TreeNode[] nodes = tvControlItem.GetCheckedNodes();
|
||||
if (nodes.Length > 0)
|
||||
{
|
||||
foreach (TreeNode node in nodes)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(node.NodeID))
|
||||
{
|
||||
var jotList = from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == tvControlItem.SelectedNodeID && x.JointAttribute == drpJointAttribute.SelectedValue select x;
|
||||
if (jotList.Count() > 0)
|
||||
{
|
||||
foreach (var jot in jotList)
|
||||
{
|
||||
List<Model.View_HJGL_WPQ> wpqList = BLL.WPQListServiceService.GetMatchWPQ(jot, this.CurrUser.LoginProjectId, drpUnit.SelectedValue);
|
||||
Model.HJGL_WeldJoint newJot = new Model.HJGL_WeldJoint();
|
||||
if (wpqList != null)
|
||||
{
|
||||
Model.WPQ_WPQList wps = new Model.WPQ_WPQList();
|
||||
var a = wpqList.FirstOrDefault(x => x.WeldingMethodId == "feb1234c-a538-476f-99ac-7b3ab15997c1"); //优先匹配GTAW+SMAW的焊评
|
||||
if (a == null)
|
||||
{
|
||||
wps = BLL.WPQListServiceService.GetWPQById(wpqList.First().WPQId);
|
||||
}
|
||||
else
|
||||
{
|
||||
wps = BLL.WPQListServiceService.GetWPQById(a.WPQId);
|
||||
}
|
||||
|
||||
newJot.WPQId = wps.WPQId;
|
||||
newJot.WeldJointId = jot.WeldJointId;
|
||||
newJot.WeldingRod = wps.WeldingRod;
|
||||
newJot.WeldingWire = wps.WeldingWire;
|
||||
newJot.WeldingMethodId = wps.WeldingMethodId;
|
||||
newJot.GrooveTypeId = wps.GrooveType;
|
||||
newJot.PreTemperature = wps.PreTemperature;
|
||||
newJot.IsHotProess = wps.IsHotProess;
|
||||
newJot.MatchableWPQ = string.Join(",", wpqList.Select(x => x.WPQCode));
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
newJot.WPQId = null;
|
||||
newJot.WeldJointId = jot.WeldJointId;
|
||||
newJot.WeldingRod = null;
|
||||
newJot.WeldingWire = null;
|
||||
newJot.WeldingMethodId = null;
|
||||
newJot.GrooveTypeId = null;
|
||||
newJot.PreTemperature = null;
|
||||
newJot.IsHotProess = null;
|
||||
newJot.MatchableWPQ = null;
|
||||
}
|
||||
BLL.WeldJointService.UpdateConWeldJoint(newJot);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
// BindGrid();
|
||||
ShowNotify("该管线焊口已完成自动录入!", MessageBoxIcon.Success);
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("请勾选需要自动录入的管线!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user