提交代码

This commit is contained in:
2023-11-22 17:10:54 +08:00
parent a4006d57d9
commit aedd071d96
6 changed files with 358 additions and 120 deletions
@@ -22,6 +22,12 @@ namespace FineUIPro.Web.HJGL.WeldingManage
this.drpJointAttribute.DataValueField = "Value";
this.drpJointAttribute.DataSource = BLL.DropListService.HJGL_JointAttribute();
this.drpJointAttribute.DataBind();
///管线划分
this.drpPipeArea.DataTextField = "Text";
this.drpPipeArea.DataValueField = "Value";
this.drpPipeArea.DataSource = BLL.PipelineService.GetPipeArea();
this.drpPipeArea.DataBind();
Funs.FineUIPleaseSelect(this.drpPipeArea);
this.InitTreeMenu();
}
}
@@ -72,10 +78,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage
//}
//else
//{
unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList();
unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList();
unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList();
unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList();
//}
string pipeAreasql = string.Empty;
if (this.drpPipeArea.SelectedValue != BLL.Const._Null)
{
pipeAreasql += " AND PipeArea='" + this.drpPipeArea.SelectedValue + "'";
}
if (unitWork1.Count() > 0)
{
foreach (var q in unitWork1)
@@ -83,7 +93,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
int a = 0;
if (ckNOEdit.Checked)
{
string strSql = "SELECT distinct PipelineCode FROM View_HJGL_WeldJoint WHERE IsTwoJoint IS NULL AND UnitWorkId =@UnitWorkId AND WPQId IS NULL";
string strSql = "SELECT distinct PipelineCode FROM View_HJGL_WeldJoint WHERE IsTwoJoint IS NULL AND UnitWorkId =@UnitWorkId AND WPQId IS NULL" + pipeAreasql;
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@UnitWorkId", q.UnitWorkId));
SqlParameter[] parameter = listStr.ToArray();
@@ -93,7 +103,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage
}
else
{
a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId select x).Count();
if (this.drpPipeArea.SelectedValue == BLL.Const._Null)
{
a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId select x).Count();
}
else
{
a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId && x.PipeArea == this.drpPipeArea.SelectedValue select x).Count();
}
}
var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId);
@@ -122,7 +139,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
int a = 0;
if (ckNOEdit.Checked)
{
string strSql = "SELECT distinct PipelineCode FROM View_HJGL_WeldJoint WHERE IsTwoJoint IS NULL AND UnitWorkId =@UnitWorkId AND WPQId IS NULL";
string strSql = "SELECT distinct PipelineCode FROM View_HJGL_WeldJoint WHERE IsTwoJoint IS NULL AND UnitWorkId =@UnitWorkId AND WPQId IS NULL" + pipeAreasql;
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@UnitWorkId", q.UnitWorkId));
SqlParameter[] parameter = listStr.ToArray();
@@ -132,11 +149,20 @@ namespace FineUIPro.Web.HJGL.WeldingManage
}
else
{
a = (from x in Funs.DB.HJGL_Pipeline
if (this.drpPipeArea.SelectedValue == BLL.Const._Null)
{
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();
}
else
{
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()) && x.PipeArea == this.drpPipeArea.SelectedValue
select x).Count();
}
}
var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId);
TreeNode tn2 = new TreeNode();
@@ -170,11 +196,11 @@ namespace FineUIPro.Web.HJGL.WeldingManage
e.Node.Nodes.Clear();
BindNodes(e.Node);
}
}
private void BindNodes(TreeNode node)
{
BLL.PipelineService.BindTreeNodes(node, ckNOEdit.Checked, this.txtPipelineCode.Text.Trim(), this.CurrUser.LoginProjectId, pageSize);
BLL.PipelineService.BindTreeNodes(node, ckNOEdit.Checked, this.txtPipelineCode.Text.Trim(), this.CurrUser.LoginProjectId, pageSize, this.drpPipeArea.SelectedValue);
}
#endregion
@@ -203,7 +229,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
{
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
{
if (tvControlItem.SelectedNode.CommandName == "管线")
{
Model.HJGL_Pipeline pipeline = BLL.PipelineService.GetPipelineByPipelineId(this.tvControlItem.SelectedNodeID);
@@ -221,7 +247,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
}
}
}
}
#endregion
@@ -375,16 +401,16 @@ namespace FineUIPro.Web.HJGL.WeldingManage
{
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID))
{
var jotList = from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == tvControlItem.SelectedNodeID &&x.JointAttribute==drpJointAttribute.SelectedValue select x;
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);
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 = BLL.WPQListServiceService.GetWPQById(wpqList.First().WPQId);
newJot.WPQId = wps.WPQId;
@@ -397,7 +423,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
newJot.IsHotProess = wps.IsHotProess;
newJot.MatchableWPQ = string.Join(",", wpqList.Select(x => x.WPQCode));
}
else
{