代码无效引用清理,试压包资料界面看板修改
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); // 多保险清理机制
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user