2022-10-25 焊接修改
This commit is contained in:
@@ -56,6 +56,28 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
ViewState["JointNoPre"] = value;
|
||||
}
|
||||
}
|
||||
public string Completed_weldedjunction
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["Completed_weldedjunction"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["Completed_weldedjunction"] = value;
|
||||
}
|
||||
}
|
||||
public string Incomplete_weldjunction
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["Incomplete_weldjunction"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["Incomplete_weldjunction"] = value;
|
||||
}
|
||||
}
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
ctlAuditFlow.Url = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId);
|
||||
@@ -221,6 +243,9 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
parameter3D.TagNum = "";
|
||||
parameter3D.ButtonType = "0,2";
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
|
||||
parameter3D.Completed_weldedjunction = Completed_weldedjunction;
|
||||
parameter3D.Incomplete_weldjunction = Incomplete_weldjunction;
|
||||
|
||||
if (this.tvControlItem.SelectedNode.CommandName == "单位工程")
|
||||
{
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
|
||||
@@ -278,43 +303,90 @@ 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));
|
||||
//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 == "单位工程")
|
||||
{
|
||||
strSql += " AND UnitWorkId =@UnitWorkId";
|
||||
listStr.Add(new SqlParameter("@UnitWorkId", this.tvControlItem.SelectedNodeID));
|
||||
model.UnitWorkId = this.tvControlItem.SelectedNodeID;
|
||||
|
||||
}
|
||||
else if (this.tvControlItem.SelectedNode.CommandName == "管线")
|
||||
{
|
||||
strSql += " AND PipelineId = @PipelineId";
|
||||
listStr.Add(new SqlParameter("@PipelineId", this.tvControlItem.SelectedNodeID));
|
||||
model.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.WeldJointCode = this.txtWeldJointCode.Text;
|
||||
var list= BLL.WeldJointService.GetViewWeldJointsBymodel(model);
|
||||
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, tb);
|
||||
Grid1.DataSource = table;
|
||||
//var table = this.GetPagedDataTable(Grid1, list);
|
||||
Grid1.DataSource = list;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
|
||||
private void get3DParmeter_weldjoint(List<View_HJGL_WeldJoint> model)
|
||||
{
|
||||
if (model.Any())
|
||||
{
|
||||
var q = model.Where(x => !string.IsNullOrEmpty(x.WeldingDate));//获取已完成焊口
|
||||
if (q.Any())
|
||||
{
|
||||
List<string> Completed_weldedjunctionList = new List<string>();
|
||||
|
||||
foreach (var item in q)
|
||||
{
|
||||
Completed_weldedjunctionList.Add("/" + item.WeldJointCode);
|
||||
}
|
||||
Completed_weldedjunction = string.Join(",", Completed_weldedjunctionList);
|
||||
}
|
||||
|
||||
var q1 = model.Where(x => string.IsNullOrEmpty(x.WeldingDate));//获取未完成管线
|
||||
if (q1.Any())
|
||||
{
|
||||
List<string> Incomplete_weldjunctionList = new List<string>();
|
||||
foreach (var item in q1)
|
||||
{
|
||||
Incomplete_weldjunctionList.Add("/" + item.PipelineCode);
|
||||
}
|
||||
Incomplete_weldjunction = string.Join(",", Incomplete_weldjunctionList);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#region
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
@@ -449,6 +521,8 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
parameter3D.ColorModel = colorModel;
|
||||
parameter3D.TagNum = pipecode;
|
||||
parameter3D.ButtonType = "0,2";
|
||||
parameter3D.Completed_weldedjunction = Completed_weldedjunction;
|
||||
parameter3D.Incomplete_weldjunction=Incomplete_weldjunction;
|
||||
if (this.tvControlItem.SelectedNode.CommandName == "单位工程")
|
||||
{
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
|
||||
|
||||
Reference in New Issue
Block a user