代码无效引用清理,试压包资料界面看板修改
This commit is contained in:
@@ -1,17 +1,12 @@
|
||||
using BLL;
|
||||
using FineUIPro.Web.HJGL.WeldingManage;
|
||||
using MiniExcelLibs;
|
||||
using Model;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using AspNet = System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
@@ -295,7 +290,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
model.UnitWorkId = this.tvControlItem.SelectedNodeID;
|
||||
model.WeldJointCode = this.txtWeldJointCode.Text;
|
||||
var list = BLL.WeldJointService.GetDataBymodel(model, Grid1.PageIndex, Grid1.PageSize);
|
||||
Grid1.RecordCount = list.Total;
|
||||
Grid1.RecordCount = list.Total;
|
||||
Grid1.DataSource = list.Data;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
@@ -308,7 +303,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
var table = list.Skip(Grid1.PageSize * (Grid1.PageIndex)).Take(Grid1.PageSize).ToList();
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void get3DParmeter_weldjoint(List<View_HJGL_WeldJoint> model)
|
||||
@@ -492,7 +487,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
else if (this.tvControlItem.SelectedNode.CommandName == "管线")
|
||||
{
|
||||
fileName = PipelineService.GetPipelineByPipelineId(this.tvControlItem.SelectedNodeID)?.PipelineCode;
|
||||
}
|
||||
}
|
||||
|
||||
string path = Funs.RootPath + @"File\Excel\Temp\JointQuery.xlsx";
|
||||
path = path.Replace(".xlsx", string.Format("{0:yyyy-MM-dd-HH-mm}", DateTime.Now) + ".xlsx");
|
||||
@@ -519,7 +514,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
焊口属性 = x.JointAttribute,
|
||||
焊接日期 = x.WeldingDate,
|
||||
打底焊工号 = x.BackingWelderCode,
|
||||
打底焊工班组=x.BackingWelderTeamGroupName,
|
||||
打底焊工班组 = x.BackingWelderTeamGroupName,
|
||||
盖面焊工号 = x.CoverWelderCode,
|
||||
盖面焊工班组 = x.CoverWelderTeamGroupName,
|
||||
热处理报告编号 = x.HotProessReportNo,
|
||||
@@ -528,13 +523,13 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
硬度检测结果 = x.HardResult,
|
||||
委托单编号 = x.TrustBatchCode,
|
||||
检测单编号 = x.NDECode,
|
||||
探伤类型=x.DetectionTypeCode,
|
||||
探伤比例=x.DetectionRateCode
|
||||
探伤类型 = x.DetectionTypeCode,
|
||||
探伤比例 = x.DetectionRateCode
|
||||
|
||||
}).ToList();
|
||||
MiniExcel.SaveAs(path, q);
|
||||
|
||||
fileName = fileName+ "-焊口信息总览.xlsx";
|
||||
fileName = fileName + "-焊口信息总览.xlsx";
|
||||
FileInfo info = new FileInfo(path);
|
||||
long fileSize = info.Length;
|
||||
System.Web.HttpContext.Current.Response.Clear();
|
||||
@@ -564,7 +559,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
ProjectId = this.CurrUser.LoginProjectId,
|
||||
UnitWorkId = unitWorkId
|
||||
};
|
||||
|
||||
|
||||
// 生成唯一文件路径(带GUID哈希值)
|
||||
string path = $@"{Funs.RootPath}File\Excel\Temp\JointQuery_{Guid.NewGuid().GetHashCode():x}.xlsx";
|
||||
var AllData = new List<object>();
|
||||
@@ -613,15 +608,15 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
探伤比例 = x.DetectionRateCode
|
||||
|
||||
}).ToList();
|
||||
|
||||
|
||||
AllData.AddRange(currentChunk);
|
||||
// 内存清理 & 翻页操作
|
||||
currentChunk = null;
|
||||
pageIndex++;
|
||||
pageIndex++;
|
||||
GC.Collect(GC.MaxGeneration, GCCollectionMode.Optimized, blocking: true);
|
||||
}
|
||||
|
||||
MiniExcel.SaveAs(path, AllData );
|
||||
MiniExcel.SaveAs(path, AllData);
|
||||
|
||||
}
|
||||
string fileName = "焊口信息总览.xlsx";
|
||||
@@ -633,7 +628,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
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();
|
||||
System.Web.HttpContext.Current.Response.Close();
|
||||
File.Delete(path); // 多保险清理机制
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user