feat(hjgl): 完善图纸识别与材料管段信息管理

扩展图纸识别结果模型和保存流程,按管线及页码替换识别明细,
避免重复导入造成数据累积;同时自动补充材料编码库数据,
新增材料总览、管段长度总览及 PDF 焊口标记功能,提升识别数据
的查询、复核和后续使用效率。
This commit is contained in:
2026-07-17 14:36:32 +08:00
parent 040de31eb1
commit 7fb6b255d2
36 changed files with 2313 additions and 354 deletions
@@ -2,18 +2,11 @@
{
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using BLL;
using Model;
public partial class DrawingRecognitionContentEdit : PageBase
{
#region
/// <summary>
/// 临时表主键
/// </summary>
public static Dictionary<string, DataTable> dicDt = new Dictionary<string, DataTable>();
public int Index
{
get
@@ -25,6 +18,27 @@
ViewState["Index"] = value;
}
}
public string DataKey
{
get
{
return (string)ViewState["DataKey"];
}
set
{
ViewState["DataKey"] = value;
}
}
private List<HJGL_DrawingRecognition_Material> MaterialEntities
{
get
{
return Session[DataKey + DrawingRecognitionContent.MaterialSessionSuffix]
as List<HJGL_DrawingRecognition_Material>;
}
}
#endregion
#region
@@ -38,20 +52,22 @@
if (!IsPostBack)
{
this.Index = int.Parse(Request.Params["Index"]);
DataTable dt = dicDt[CurrUser.PersonId];
var dataInTemp = dt.Rows[this.Index];
if (dataInTemp != null)
this.DataKey = Request.Params["DataKey"];
var materialEntities = MaterialEntities;
if (materialEntities == null || this.Index < 0 || this.Index >= materialEntities.Count)
{
this.txtPipeNo.Text = dataInTemp["pipe_no"].ToString();
this.txtDrawingNumber.Text = dataInTemp["drawing_number"].ToString();
this.txtCategory.Text = dataInTemp["category"].ToString();
this.txtQty.Text = dataInTemp["qty"].ToString();
this.txtSpec.Text = dataInTemp["spec"].ToString();
this.txtPageNo.Text = dataInTemp["page_no"].ToString();
this.txtDescription.Text = dataInTemp["description"].ToString();
Alert.ShowInTop("材料实体数据已失效,请关闭窗口后重新审核!", MessageBoxIcon.Warning);
return;
}
var material = materialEntities[this.Index];
this.txtPipeNo.Text = material.Pipe_no;
this.txtDrawingNumber.Text = material.Drawing_number;
this.txtCategory.Text = material.Category;
this.txtQty.Text = material.Qty;
this.txtSpec.Text = material.Spec;
this.txtPageNo.Text = Convert.ToString(material.Pipe_page_no);
this.txtDescription.Text = material.Description;
}
}
#endregion
@@ -64,15 +80,27 @@
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
DataTable dt = dicDt[CurrUser.PersonId];
var dataInTemp = dt.Rows[this.Index];
dataInTemp["pipe_no"] = this.txtPipeNo.Text;
dataInTemp["drawing_number"] = this.txtDrawingNumber.Text;
dataInTemp["category"] = this.txtCategory.Text;
dataInTemp["qty"] = this.txtQty.Text;
dataInTemp["spec"] = this.txtSpec.Text;
dataInTemp["page_no"] = this.txtPageNo.Text;
dataInTemp["description"] = this.txtDescription;
var materialEntities = MaterialEntities;
if (materialEntities == null || this.Index < 0 || this.Index >= materialEntities.Count)
{
Alert.ShowInTop("材料实体数据已失效,请关闭窗口后重新审核!", MessageBoxIcon.Warning);
return;
}
if (!int.TryParse(this.txtPageNo.Text, out var pipePageNo))
{
Alert.ShowInTop("管线页码必须为整数!", MessageBoxIcon.Warning);
return;
}
var material = materialEntities[this.Index];
material.Pipe_no = this.txtPipeNo.Text;
material.Drawing_number = this.txtDrawingNumber.Text;
material.Category = this.txtCategory.Text;
material.Qty = this.txtQty.Text;
material.Spec = this.txtSpec.Text;
material.Pipe_page_no = pipePageNo;
material.Description = this.txtDescription.Text;
Alert.ShowInTop("信息修改完成!", MessageBoxIcon.Success);
if (ckAll.Checked)
@@ -84,8 +112,7 @@
PageContext.RegisterStartupScript(ActiveWindow.GetWriteBackValueReference("") + ActiveWindow.GetHidePostBackReference());
}
dicDt.Remove(CurrUser.PersonId);
}
#endregion
}
}
}