代码无效引用清理,试压包资料界面看板修改

This commit is contained in:
2025-10-10 14:33:21 +08:00
parent 87fb529521
commit 55b798135c
933 changed files with 5897 additions and 7541 deletions
@@ -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); // 多保险清理机制
}
@@ -4,7 +4,6 @@ using Model;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
@@ -23,7 +22,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 static List<Model.View_HJGL_Pipeline> View_HJGL_Pipeline = new List<Model.View_HJGL_Pipeline>();
//public string Incomplete_pipeline
//{
// get
@@ -93,8 +92,8 @@ namespace FineUIPro.Web.HJGL.InfoQuery
//}
//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();
//}
if (unitWork1.Count() > 0)
@@ -137,7 +136,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
{
this.BindGrid();
}
#endregion
@@ -148,34 +147,34 @@ namespace FineUIPro.Web.HJGL.InfoQuery
/// </summary>
private void BindGrid()
{
// string strSql = @"SELECT ProjectId,UnitWorkId,PipelineId,PipelineCode,UnitName,MediumCode,MediumName,PipingClassCode,UnitWorkCode,SingleName,
// TestPressure,SingleNumber,DetectionRateCode,DetectionType,Remark,TestMediumCode,TotalDin,FinishSize,
// JointCount,PressurePipingClassCode,PipeLenth,DesignPress,DesignTemperature,LeakPressure,VacuumPressure,
// LeakMediumName,PCMediumName,MaterialCode,FinishedDate,
//(CASE WHEN IsFinished=1 THEN '已完成' ELSE '未完成' END) AS IsFinished
// FROM dbo.View_HJGL_Pipeline
// WHERE ProjectId= @ProjectId";
// List<SqlParameter> listStr = new List<SqlParameter>();
// listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
// string strSql = @"SELECT ProjectId,UnitWorkId,PipelineId,PipelineCode,UnitName,MediumCode,MediumName,PipingClassCode,UnitWorkCode,SingleName,
// TestPressure,SingleNumber,DetectionRateCode,DetectionType,Remark,TestMediumCode,TotalDin,FinishSize,
// JointCount,PressurePipingClassCode,PipeLenth,DesignPress,DesignTemperature,LeakPressure,VacuumPressure,
// LeakMediumName,PCMediumName,MaterialCode,FinishedDate,
//(CASE WHEN IsFinished=1 THEN '已完成' ELSE '未完成' END) AS IsFinished
// 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()))
// {
// strSql += " AND PipelineCode LIKE @PipelineCode";
// listStr.Add(new SqlParameter("@PipelineCode", "%" + this.txtPipelineCode.Text.Trim() + "%"));
// }
// if (drpIsFinish.SelectedValue == "1")
// {
// strSql += " AND pipe.IsFinished = 1";
// }
// if (drpIsFinish.SelectedValue == "0")
// {
// strSql += " AND (pipe.IsFinished IS NULL OR pipe.IsFinished = 0)";
// }
// strSql += " AND UnitWorkId =@UnitWorkId";
// listStr.Add(new SqlParameter("@UnitWorkId", this.tvControlItem.SelectedNodeID));
// if (!string.IsNullOrEmpty(this.txtPipelineCode.Text.Trim()))
// {
// strSql += " AND PipelineCode LIKE @PipelineCode";
// listStr.Add(new SqlParameter("@PipelineCode", "%" + this.txtPipelineCode.Text.Trim() + "%"));
// }
// if (drpIsFinish.SelectedValue == "1")
// {
// strSql += " AND pipe.IsFinished = 1";
// }
// if (drpIsFinish.SelectedValue == "0")
// {
// strSql += " AND (pipe.IsFinished IS NULL OR pipe.IsFinished = 0)";
// }
// SqlParameter[] parameter = listStr.ToArray();
// DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
// SqlParameter[] parameter = listStr.ToArray();
// DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
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;
@@ -184,7 +183,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
if (drpIsFinish.SelectedValue == "1")
{
view_HJGL_Pipeline.IsFinished = true;
}
}
if (drpIsFinish.SelectedValue == "0")
{
view_HJGL_Pipeline.IsFinished = false;
@@ -202,7 +201,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
}
#endregion
private void get3DParmeter_pipeline(List<View_HJGL_Pipeline> view_HJGL_Pipelines )
private void get3DParmeter_pipeline(List<View_HJGL_Pipeline> view_HJGL_Pipelines)
{
if (view_HJGL_Pipelines.Any())
{
@@ -228,7 +227,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
// }
// Incomplete_pipeline = string.Join(",", Incomplete_pipelineList);
//}
}
}
@@ -311,32 +310,32 @@ namespace FineUIPro.Web.HJGL.InfoQuery
select new
{
线 = x.PipelineCode,
= x.IsFinished,
=x.FinishedDate,
=x.FinishSize,
=x.FinishJointCount,
=x.TotalDin,
=x.JointCount,
=x.ShopJointCount,
= x.IsFinished,
= x.FinishedDate,
= x.FinishSize,
= x.FinishJointCount,
= x.TotalDin,
= x.JointCount,
= x.ShopJointCount,
线 = x.PipeAreaStr,
=x.DetectionTypeCode,
=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
= x.DetectionTypeCode,
= 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);
@@ -438,18 +437,18 @@ namespace FineUIPro.Web.HJGL.InfoQuery
string IsFinishedValue = "未完成";
if (IsFinished != null)
{
if (IsFinished.ToString()=="True")
if (IsFinished.ToString() == "True")
{
IsFinishedValue = "已完成";
}
}
return IsFinishedValue;
return IsFinishedValue;
}
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();
@@ -473,8 +472,8 @@ namespace FineUIPro.Web.HJGL.InfoQuery
return;
}
var SingleName = (from x in Funs.DB.View_HJGL_Pipeline where x.PipelineId == id select (x.SingleName)).FirstOrDefault();
var filemodel= BLL.HJGL_DataImportService.GetLatestFileByFileName(SingleName,"0", this.CurrUser.LoginProjectId);
if (filemodel!=null)
var filemodel = BLL.HJGL_DataImportService.GetLatestFileByFileName(SingleName, "0", this.CurrUser.LoginProjectId);
if (filemodel != null)
{
string httpUrl = filemodel.FilePath;
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("~/AttachFile/Look.aspx?fileUrl={0}", httpUrl, "查看 -")));
@@ -485,14 +484,14 @@ namespace FineUIPro.Web.HJGL.InfoQuery
ShowNotify("请上传相关ISO轴测图", MessageBoxIcon.Warning);
return;
}
}
protected void Grid1_RowClick(object sender, GridRowClickEventArgs e)
{
var q = PipelineService.GetPipelineByPipelineId(Grid1.SelectedRowID);
var pipecode ="/"+ q.PipelineCode;
var pipecode = "/" + q.PipelineCode;
Model.Parameter3D parameter3D = new Model.Parameter3D();
Model.ColorModel colorModel = new Model.ColorModel();
colorModel = BLL.Project_SysSetService.GetColorModel(this.CurrUser.LoginProjectId);