20230220 003焊接修改
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
using BLL;
|
||||
using MiniExcelLibs;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
@@ -21,6 +23,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
ViewState["Completed_pipeline"] = value;
|
||||
}
|
||||
}
|
||||
public static List<Model.View_HJGL_Pipeline> View_HJGL_Pipeline=new List<Model.View_HJGL_Pipeline>();
|
||||
//public string Incomplete_pipeline
|
||||
//{
|
||||
// get
|
||||
@@ -134,21 +137,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
|
||||
{
|
||||
this.BindGrid();
|
||||
Model.Parameter3D parameter3D = new Model.Parameter3D();
|
||||
Model.ColorModel colorModel = new Model.ColorModel();
|
||||
colorModel = BLL.Project_SysSetService.GetColorModel(this.CurrUser.LoginProjectId);
|
||||
parameter3D.ColorModel = colorModel;
|
||||
parameter3D.TagNum = Line_No;
|
||||
parameter3D.ButtonType = "2";
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
|
||||
// parameter3D.Line_No = Line_No;
|
||||
parameter3D.Transparency = colorModel.PipelineComplete;
|
||||
parameter3D.Finished_color = colorModel.JointCompleteColor;
|
||||
parameter3D.Incomplete_color = colorModel.JointNOCompleteColor;
|
||||
|
||||
ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl_Item(this.CurrUser.LoginProjectId) + parameter3D.ModelName;
|
||||
ctlAuditFlow.data = parameter3D;
|
||||
ctlAuditFlow.BindData();
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
@@ -187,7 +176,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
|
||||
// SqlParameter[] parameter = listStr.ToArray();
|
||||
// DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
Model.HJGL_Pipeline view_HJGL_Pipeline = new Model.HJGL_Pipeline();
|
||||
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();
|
||||
@@ -201,6 +190,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
view_HJGL_Pipeline.IsFinished = false;
|
||||
}
|
||||
var list = BLL.PipelineService.GetView_HJGL_Pipelines(view_HJGL_Pipeline);
|
||||
View_HJGL_Pipeline = list;
|
||||
get3DParmeter_pipeline(list);
|
||||
// 2.获取当前分页数据
|
||||
//var table = this.GetPagedDataTable(Grid1, tb1);
|
||||
@@ -212,7 +202,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
|
||||
}
|
||||
#endregion
|
||||
private void get3DParmeter_pipeline(List<HJGL_Pipeline> view_HJGL_Pipelines )
|
||||
private void get3DParmeter_pipeline(List<View_HJGL_Pipeline> view_HJGL_Pipelines )
|
||||
{
|
||||
if (view_HJGL_Pipelines.Any())
|
||||
{
|
||||
@@ -284,7 +274,6 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
|
||||
#region 查询页面
|
||||
|
||||
/// <summary>
|
||||
@@ -308,6 +297,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
this.BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 导出按钮
|
||||
/// 导出按钮
|
||||
/// </summary>
|
||||
@@ -315,15 +305,60 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
/// <param name="e"></param>
|
||||
protected void btnOut_Click(object sender, EventArgs e)
|
||||
{
|
||||
Response.ClearContent();
|
||||
string filename = Funs.GetNewFileName();
|
||||
Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("管线信息总览" + filename, System.Text.Encoding.UTF8) + ".xls");
|
||||
Response.ContentType = "application/excel";
|
||||
Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
//this.Grid1.PageSize = this.;
|
||||
BindGrid();
|
||||
Response.Write(GetGridTableHtml(Grid1));
|
||||
Response.End();
|
||||
string path = Funs.RootPath + @"File\Excel\Temp\pipelineQuery.xlsx";
|
||||
path = path.Replace(".xlsx", string.Format("{0:yyyy-MM-dd-HH-mm}", DateTime.Now) + ".xlsx");
|
||||
var q = (from x in View_HJGL_Pipeline
|
||||
select new
|
||||
{
|
||||
管线号 = x.PipelineCode,
|
||||
是否完成=x. IsFinished,
|
||||
完成日期=x.FinishedDate,
|
||||
完成达因=x.FinishSize,
|
||||
总达因数=x.TotalDin,
|
||||
总焊口量=x.JointCount,
|
||||
单位名称=x.UnitName,
|
||||
探伤比例=x.DetectionRateCode,
|
||||
介质名称=x.MediumName,
|
||||
管道等级=x.PipingClassCode,
|
||||
图纸名称=x.SingleName,
|
||||
单线图号=x.SingleNumber,
|
||||
设计压力=x.DesignPress,
|
||||
设计温度=x.DesignTemperature,
|
||||
压力试验介质=x.TestMediumCode,
|
||||
压力试验压力=x.TestPressure,
|
||||
压力管道级别=x.PressurePipingClassCode,
|
||||
管线长度= x.PipeLenth,
|
||||
泄露试验介质= x.LeakMediumName,
|
||||
泄露试验压力=x.LeakPressure,
|
||||
吹洗要求=x.PCMediumName,
|
||||
真空试验压力=x.VacuumPressure,
|
||||
材质=x.MaterialCode,
|
||||
备注=x.Remark
|
||||
}).ToList();
|
||||
MiniExcel.SaveAs(path, q);
|
||||
|
||||
string fileName = "管线信息总览.xlsx";
|
||||
FileInfo info = new FileInfo(path);
|
||||
long fileSize = info.Length;
|
||||
System.Web.HttpContext.Current.Response.Clear();
|
||||
System.Web.HttpContext.Current.Response.ContentType = "application/x-zip-compressed";
|
||||
System.Web.HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
|
||||
System.Web.HttpContext.Current.Response.AddHeader("Content-Length", fileSize.ToString());
|
||||
System.Web.HttpContext.Current.Response.TransmitFile(path, 0, fileSize);
|
||||
System.Web.HttpContext.Current.Response.Flush();
|
||||
System.Web.HttpContext.Current.Response.Close();
|
||||
File.Delete(path);
|
||||
|
||||
|
||||
//Response.ClearContent();
|
||||
//string filename = Funs.GetNewFileName();
|
||||
//Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("管线信息总览" + filename, System.Text.Encoding.UTF8) + ".xls");
|
||||
//Response.ContentType = "application/excel";
|
||||
//Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
////this.Grid1.PageSize = this.;
|
||||
//BindGrid();
|
||||
//Response.Write(GetGridTableHtml(Grid1));
|
||||
//Response.End();
|
||||
}
|
||||
|
||||
//#pragma warning disable CS0108 // “PersonList.GetGridTableHtml(Grid)”隐藏继承的成员“PageBase.GetGridTableHtml(Grid)”。如果是有意隐藏,请使用关键字 new。
|
||||
@@ -411,7 +446,15 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
protected void btnGetChart_Click(object sender, EventArgs e)
|
||||
{
|
||||
decimal PipelineComplete = 0;
|
||||
decimal PipelineNoComplete = 0;
|
||||
decimal PipelineNoComplete=0;
|
||||
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID))
|
||||
{
|
||||
var allline = (from x in Funs.DB.HJGL_Pipeline where x.UnitWorkId == tvControlItem.SelectedNodeID select x).ToList().Count();
|
||||
var Completeline = (from x in Funs.DB.HJGL_Pipeline where x.UnitWorkId == tvControlItem.SelectedNodeID && x.IsFinished == true select x).ToList().Count();
|
||||
int NoCompleteline = allline - Completeline;
|
||||
PipelineComplete = Completeline;
|
||||
PipelineNoComplete = NoCompleteline;
|
||||
}
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PipelineQueryChart.aspx?PipelineComplete={0}&&PipelineNOComplete={1}", PipelineComplete, PipelineNoComplete, "编辑 - ")));
|
||||
|
||||
}
|
||||
@@ -487,5 +530,24 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected void btnrefresh_Click(object sender, EventArgs e)
|
||||
{
|
||||
Model.Parameter3D parameter3D = new Model.Parameter3D();
|
||||
Model.ColorModel colorModel = new Model.ColorModel();
|
||||
colorModel = BLL.Project_SysSetService.GetColorModel(this.CurrUser.LoginProjectId);
|
||||
parameter3D.ColorModel = colorModel;
|
||||
parameter3D.TagNum = Line_No;
|
||||
parameter3D.ButtonType = "2";
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
|
||||
// parameter3D.Line_No = Line_No;
|
||||
parameter3D.Transparency = colorModel.PipelineComplete;
|
||||
parameter3D.Finished_color = colorModel.JointCompleteColor;
|
||||
parameter3D.Incomplete_color = colorModel.JointNOCompleteColor;
|
||||
|
||||
ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl_Item(this.CurrUser.LoginProjectId) + parameter3D.ModelName;
|
||||
ctlAuditFlow.data = parameter3D;
|
||||
ctlAuditFlow.BindData();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user