2022-10-25 焊接修改
This commit is contained in:
@@ -33,6 +33,17 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
ViewState["PipelineNOComplete"] = value;
|
||||
}
|
||||
}
|
||||
public string Line_No
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["Line_No"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["Line_No"] = value;
|
||||
}
|
||||
}
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
ctlAuditFlow.Url = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId);
|
||||
@@ -148,7 +159,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
parameter3D.TagNum = "";
|
||||
parameter3D.ButtonType = "0,1";
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
|
||||
|
||||
parameter3D.Line_No = Line_No;
|
||||
ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId) + "item/IPE%7CVPD%7C" + parameter3D.ModelName;
|
||||
ctlAuditFlow.data = parameter3D;
|
||||
ctlAuditFlow.BindData();
|
||||
@@ -162,47 +173,33 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = @"SELECT ProjectId,UnitWorkId,PipelineId,PipelineCode,
|
||||
(CASE WHEN PipeArea='1' THEN '工厂预制' WHEN PipeArea='2' THEN '现场施工'
|
||||
ELSE '' END) AS PipeArea
|
||||
FROM dbo.View_HJGL_Pipeline
|
||||
WHERE ProjectId= @ProjectId";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
|
||||
strSql += " AND UnitWorkId =@UnitWorkId";
|
||||
listStr.Add(new SqlParameter("@UnitWorkId", this.tvControlItem.SelectedNodeID));
|
||||
if (!string.IsNullOrEmpty(this.txtPipelineCode.Text.Trim()))
|
||||
|
||||
Model.View_HJGL_Pipeline view_HJGL_Pipeline = new Model.View_HJGL_Pipeline();
|
||||
view_HJGL_Pipeline.ProjectId = this.CurrUser.LoginProjectId;
|
||||
view_HJGL_Pipeline.UnitWorkId = this.tvControlItem.SelectedNodeID;
|
||||
view_HJGL_Pipeline.PipelineCode = this.txtPipelineCode.Text.Trim();
|
||||
view_HJGL_Pipeline.SingleName = this.txtSingleName.Text.Trim();
|
||||
view_HJGL_Pipeline.DesignPress=this.txtDesignPress.Text.Trim();
|
||||
view_HJGL_Pipeline.MaterialCode=this.txtMaterialCode.Text.Trim();
|
||||
var list = BLL.PipelineService.GetView_HJGL_Pipelines(view_HJGL_Pipeline);
|
||||
var q = list.Where(x => x.PipeArea == PipelineService.PipeArea_SHOP );
|
||||
var q2 = list.Where(x => x.PipeArea == PipelineService.PipeArea_FIELD );
|
||||
if (q.Any())
|
||||
{
|
||||
strSql += " AND PipelineCode LIKE @PipelineCode";
|
||||
listStr.Add(new SqlParameter("@PipelineCode", "%" + this.txtPipelineCode.Text.Trim() + "%"));
|
||||
List<string> listpipecode = new List<string>();
|
||||
foreach (var item in q)
|
||||
{
|
||||
listpipecode.Add("/" + item.PipelineCode);
|
||||
}
|
||||
Line_No = string.Join(",", listpipecode);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtSingleName.Text.Trim()))
|
||||
{
|
||||
strSql += " AND SingleName LIKE @SingleName";
|
||||
listStr.Add(new SqlParameter("@SingleName", "%" + this.txtSingleName.Text.Trim() + "%"));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtDesignPress.Text.Trim()))
|
||||
{
|
||||
strSql += " AND DesignPress LIKE @DesignPress";
|
||||
listStr.Add(new SqlParameter("@DesignPress", "%" + this.txtDesignPress.Text.Trim() + "%"));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtMaterialCode.Text.Trim()))
|
||||
{
|
||||
strSql += " AND MaterialCode LIKE @MaterialCode";
|
||||
listStr.Add(new SqlParameter("@MaterialCode", "%" + this.txtMaterialCode.Text.Trim() + "%"));
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
var q = tb.AsEnumerable().Where(x => x["PipeArea"].ToString() == "工厂预制");
|
||||
var q2 = tb.AsEnumerable().Where(x => x["PipeArea"].ToString() == "现场施工");
|
||||
|
||||
PipelineComplete = q.Count();
|
||||
PipelineNOComplete = q2.Count();
|
||||
// 2.获取当前分页数据
|
||||
//var table = this.GetPagedDataTable(Grid1, tb1);
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.RecordCount = list.Count();
|
||||
//list = GetFilteredTable(Grid1.FilteredData, list);
|
||||
var table = this.GetPagedDataTable(Grid1, list);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
@@ -284,6 +281,8 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
parameter3D.TagNum = pipecode;
|
||||
parameter3D.ButtonType = "0,1";
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
|
||||
parameter3D.Line_No = Line_No;
|
||||
|
||||
ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId) + "item/IPE%7CVPD%7C" + parameter3D.ModelName;
|
||||
ctlAuditFlow.data = parameter3D;
|
||||
ctlAuditFlow.BindData();
|
||||
@@ -363,29 +362,24 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
}
|
||||
|
||||
#endregion
|
||||
protected string ConvertDetectionType(object detectionType)
|
||||
protected string ConvertPipeArea(object PipeArea)
|
||||
{
|
||||
string detectionName = string.Empty;
|
||||
if (detectionType != null)
|
||||
string PipeAreaValue = string.Empty;
|
||||
if (PipeArea != null)
|
||||
{
|
||||
string[] types = detectionType.ToString().Split('|');
|
||||
foreach (string t in types)
|
||||
var q = PipelineService.GetPipeArea().Where(x => x.Value == PipeArea.ToString());
|
||||
if (q!=null&&q.Count()>0)
|
||||
{
|
||||
var type = BLL.Base_DetectionTypeService.GetDetectionTypeByDetectionTypeId(t);
|
||||
if (type != null)
|
||||
{
|
||||
detectionName += type.DetectionTypeCode + ",";
|
||||
}
|
||||
PipeAreaValue = q.First().Text;
|
||||
|
||||
}
|
||||
}
|
||||
if (detectionName != string.Empty)
|
||||
{
|
||||
return detectionName.Substring(0, detectionName.Length - 1);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
return "";
|
||||
}
|
||||
return PipeAreaValue;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user