feat(hjgl): 完善图纸识别与材料管段信息管理
扩展图纸识别结果模型和保存流程,按管线及页码替换识别明细, 避免重复导入造成数据累积;同时自动补充材料编码库数据, 新增材料总览、管段长度总览及 PDF 焊口标记功能,提升识别数据 的查询、复核和后续使用效率。
This commit is contained in:
@@ -147,6 +147,60 @@
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
public static void AddListByDraw(List<Tw_InputDataIn> list)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
// 图纸材料编码同时作为材料库主键和业务编码,不能为空且同批次只允许新增一次。
|
||||
var existingMaterials = db.HJGL_MaterialCodeLib
|
||||
.Select(x => new { x.MaterialCode, x.Code })
|
||||
.ToList();
|
||||
var materialCodes = new HashSet<string>(System.StringComparer.OrdinalIgnoreCase);
|
||||
foreach (var existingMaterial in existingMaterials)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(existingMaterial.MaterialCode))
|
||||
{
|
||||
materialCodes.Add(existingMaterial.MaterialCode);
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(existingMaterial.Code))
|
||||
{
|
||||
materialCodes.Add(existingMaterial.Code);
|
||||
}
|
||||
}
|
||||
List<Model.HJGL_MaterialCodeLib> details = new List<Model.HJGL_MaterialCodeLib>();
|
||||
foreach (var item in list)
|
||||
{
|
||||
if (item == null || string.IsNullOrWhiteSpace(item.MaterialCode))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
string materialCode = item.MaterialCode.Trim();
|
||||
if (!materialCodes.Add(materialCode))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
Model.HJGL_MaterialCodeLib table = new Model.HJGL_MaterialCodeLib
|
||||
{
|
||||
MaterialCode = materialCode,
|
||||
MaterialName = item.MaterialName,
|
||||
MaterialSpec = item.MaterialSpec,
|
||||
MaterialUnit = item.MaterialUnit,
|
||||
MaterialDef = item.MaterialDef,
|
||||
Code = materialCode
|
||||
};
|
||||
details.Add(table);
|
||||
}
|
||||
|
||||
if (details.Count > 0)
|
||||
{
|
||||
db.HJGL_MaterialCodeLib.InsertAllOnSubmit(details);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class MaterialCodeLibDtoIn
|
||||
|
||||
@@ -170,12 +170,7 @@ namespace FineUIPro.Web.CLGL
|
||||
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
||||
{
|
||||
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
||||
var model = BLL.TwInOutplanmasterService.GetById(rowID);
|
||||
if (!string.IsNullOrEmpty(model.TransferBatchId))
|
||||
{
|
||||
Alert.ShowInTop("已提交的调拨申请不允许单独删除!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
var model = BLL.TwInOutplanmasterService.GetById(rowID);
|
||||
if (model.State == (int)TwConst.State.已审核 || model.State == (int)TwConst.State.已完成)
|
||||
{
|
||||
Alert.ShowInTop("请选择有效的计划!", MessageBoxIcon.Warning);
|
||||
|
||||
@@ -443,12 +443,7 @@ namespace FineUIPro.Web.CLGL
|
||||
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
||||
{
|
||||
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
||||
var model = BLL.TwInOutplanmasterService.GetById(rowID);
|
||||
if (!string.IsNullOrEmpty(model.TransferBatchId) && model.State != (int)TwConst.State.待提交)
|
||||
{
|
||||
Alert.ShowInTop("已提交的调拨申请不允许单独删除!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
var model = BLL.TwInOutplanmasterService.GetById(rowID);
|
||||
if (model.State == (int)TwConst.State.已审核 || model.State == (int)TwConst.State.已完成)
|
||||
{
|
||||
Alert.ShowInTop("请选择有效的计划!", MessageBoxIcon.Warning);
|
||||
|
||||
@@ -1572,12 +1572,25 @@
|
||||
<Content Include="HJGL\BaseInfo\WeldingMethodEdit.aspx" />
|
||||
<Content Include="HJGL\BaseInfo\WeldingMethodView.aspx" />
|
||||
<Content Include="HJGL\BaseInfo\WeldView.aspx" />
|
||||
<Content Include="HJGL\DataImport\assets\index-Cxkwk4nJ.css" />
|
||||
<Content Include="HJGL\DataImport\assets\index-lcdZf-3q.js" />
|
||||
<Content Include="HJGL\DataImport\assets\main-DE8eQLmE.js" />
|
||||
<Content Include="HJGL\DataImport\assets\main-DSskaVYi.css" />
|
||||
<Content Include="HJGL\DataImport\assets\pdf-lib-D5zKcp81.js" />
|
||||
<Content Include="HJGL\DataImport\assets\pdf.worker.min-yatZIOMy.mjs" />
|
||||
<Content Include="HJGL\DataImport\assets\pdfjs-HfNT2Y4W.js" />
|
||||
<Content Include="HJGL\DataImport\assets\styles-Bno-H3Kc.js" />
|
||||
<Content Include="HJGL\DataImport\assets\styles-CDHjsf7D.css" />
|
||||
<Content Include="HJGL\DataImport\assets\viewer-BilNgxa5.css" />
|
||||
<Content Include="HJGL\DataImport\assets\viewer-Dla4Cfl-.js" />
|
||||
<Content Include="HJGL\DataImport\DrawingRecognition.aspx" />
|
||||
<Content Include="HJGL\DataImport\DrawingRecognitionContent.aspx" />
|
||||
<Content Include="HJGL\DataImport\DrawingRecognitionContentEdit.aspx" />
|
||||
<Content Include="HJGL\DataImport\MaterialInformation.aspx" />
|
||||
<Content Include="HJGL\DataImport\MaterialInformationEdit.aspx" />
|
||||
<Content Include="HJGL\DataImport\MaterialStock.aspx" />
|
||||
<Content Include="HJGL\DataImport\ocrz-app.css" />
|
||||
<Content Include="HJGL\DataImport\ocrz-app.js" />
|
||||
<Content Include="HJGL\DataImport\PipelineGrid.aspx" />
|
||||
<Content Include="HJGL\DataImport\PipeLineInAuto.aspx" />
|
||||
<Content Include="HJGL\DataImport\PipelineInEdit.aspx" />
|
||||
@@ -1601,6 +1614,8 @@
|
||||
<Content Include="HJGL\HotProcessHard\HotProessTrustItemEdit.aspx" />
|
||||
<Content Include="HJGL\InfoQuery\JointQuery.aspx" />
|
||||
<Content Include="HJGL\InfoQuery\JointQueryChart.aspx" />
|
||||
<Content Include="HJGL\InfoQuery\MaterialOverview.aspx" />
|
||||
<Content Include="HJGL\InfoQuery\PipeLengthOverview.aspx" />
|
||||
<Content Include="HJGL\InfoQuery\PipelineQuery.aspx" />
|
||||
<Content Include="HJGL\InfoQuery\PipelineQueryChart.aspx" />
|
||||
<Content Include="HJGL\JoinMarking\DataInEdit.aspx" />
|
||||
@@ -3689,6 +3704,175 @@
|
||||
<Content Include="File\Excel\DataIn\专项检查明细导入模板.xls" />
|
||||
<Content Include="File\Excel\DataIn\企业大检查明细导入模板.xls" />
|
||||
<Content Include="File\Excel\DataIn\现场车辆管理导入模板.xls" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\78-EUC-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\78-EUC-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\78-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\78-RKSJ-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\78-RKSJ-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\78-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\78ms-RKSJ-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\78ms-RKSJ-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\83pv-RKSJ-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\90ms-RKSJ-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\90ms-RKSJ-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\90msp-RKSJ-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\90msp-RKSJ-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\90pv-RKSJ-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\90pv-RKSJ-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\Add-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\Add-RKSJ-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\Add-RKSJ-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\Add-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\Adobe-CNS1-0.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\Adobe-CNS1-1.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\Adobe-CNS1-2.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\Adobe-CNS1-3.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\Adobe-CNS1-4.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\Adobe-CNS1-5.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\Adobe-CNS1-6.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\Adobe-CNS1-UCS2.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\Adobe-GB1-0.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\Adobe-GB1-1.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\Adobe-GB1-2.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\Adobe-GB1-3.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\Adobe-GB1-4.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\Adobe-GB1-5.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\Adobe-GB1-UCS2.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\Adobe-Japan1-0.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\Adobe-Japan1-1.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\Adobe-Japan1-2.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\Adobe-Japan1-3.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\Adobe-Japan1-4.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\Adobe-Japan1-5.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\Adobe-Japan1-6.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\Adobe-Japan1-UCS2.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\Adobe-Korea1-0.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\Adobe-Korea1-1.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\Adobe-Korea1-2.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\Adobe-Korea1-UCS2.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\B5-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\B5-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\B5pc-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\B5pc-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\CNS-EUC-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\CNS-EUC-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\CNS1-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\CNS1-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\CNS2-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\CNS2-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\ETen-B5-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\ETen-B5-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\ETenms-B5-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\ETenms-B5-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\ETHK-B5-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\ETHK-B5-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\EUC-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\EUC-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\Ext-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\Ext-RKSJ-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\Ext-RKSJ-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\Ext-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\GB-EUC-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\GB-EUC-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\GB-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\GB-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\GBK-EUC-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\GBK-EUC-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\GBK2K-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\GBK2K-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\GBKp-EUC-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\GBKp-EUC-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\GBpc-EUC-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\GBpc-EUC-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\GBT-EUC-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\GBT-EUC-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\GBT-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\GBT-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\GBTpc-EUC-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\GBTpc-EUC-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\Hankaku.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\Hiragana.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\HKdla-B5-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\HKdla-B5-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\HKdlb-B5-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\HKdlb-B5-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\HKgccs-B5-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\HKgccs-B5-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\HKm314-B5-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\HKm314-B5-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\HKm471-B5-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\HKm471-B5-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\HKscs-B5-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\HKscs-B5-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\Katakana.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\KSC-EUC-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\KSC-EUC-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\KSC-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\KSC-Johab-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\KSC-Johab-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\KSC-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\KSCms-UHC-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\KSCms-UHC-HW-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\KSCms-UHC-HW-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\KSCms-UHC-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\KSCpc-EUC-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\KSCpc-EUC-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\LICENSE" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\NWP-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\NWP-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\RKSJ-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\RKSJ-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\Roman.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\UniCNS-UCS2-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\UniCNS-UCS2-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\UniCNS-UTF16-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\UniCNS-UTF16-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\UniCNS-UTF32-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\UniCNS-UTF32-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\UniCNS-UTF8-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\UniCNS-UTF8-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\UniGB-UCS2-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\UniGB-UCS2-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\UniGB-UTF16-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\UniGB-UTF16-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\UniGB-UTF32-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\UniGB-UTF32-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\UniGB-UTF8-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\UniGB-UTF8-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\UniJIS-UCS2-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\UniJIS-UCS2-HW-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\UniJIS-UCS2-HW-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\UniJIS-UCS2-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\UniJIS-UTF16-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\UniJIS-UTF16-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\UniJIS-UTF32-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\UniJIS-UTF32-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\UniJIS-UTF8-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\UniJIS-UTF8-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\UniJIS2004-UTF16-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\UniJIS2004-UTF16-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\UniJIS2004-UTF32-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\UniJIS2004-UTF32-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\UniJIS2004-UTF8-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\UniJIS2004-UTF8-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\UniJISPro-UCS2-HW-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\UniJISPro-UCS2-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\UniJISPro-UTF8-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\UniJISX0213-UTF32-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\UniJISX0213-UTF32-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\UniJISX02132004-UTF32-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\UniJISX02132004-UTF32-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\UniKS-UCS2-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\UniKS-UCS2-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\UniKS-UTF16-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\UniKS-UTF16-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\UniKS-UTF32-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\UniKS-UTF32-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\UniKS-UTF8-H.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\UniKS-UTF8-V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\V.bcmap" />
|
||||
<Content Include="HJGL\DataImport\pdfjs-cmaps\WP-Symbol.bcmap" />
|
||||
<None Include="packages.config" />
|
||||
<Content Include="ReportPrint\ReportTabFile\分包商上传周报.tab" />
|
||||
<Content Include="ReportPrint\ReportTabFile\HSSE日志暨管理数据收集.tab" />
|
||||
@@ -10744,6 +10928,20 @@
|
||||
<Compile Include="HJGL\InfoQuery\JointQuery.aspx.designer.cs">
|
||||
<DependentUpon>JointQuery.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HJGL\InfoQuery\MaterialOverview.aspx.cs">
|
||||
<DependentUpon>MaterialOverview.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="HJGL\InfoQuery\MaterialOverview.aspx.designer.cs">
|
||||
<DependentUpon>MaterialOverview.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HJGL\InfoQuery\PipeLengthOverview.aspx.cs">
|
||||
<DependentUpon>PipeLengthOverview.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="HJGL\InfoQuery\PipeLengthOverview.aspx.designer.cs">
|
||||
<DependentUpon>PipeLengthOverview.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HJGL\InfoQuery\JointQueryChart.aspx.cs">
|
||||
<DependentUpon>JointQueryChart.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
||||
@@ -4,85 +4,115 @@
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title></title>
|
||||
|
||||
</title>
|
||||
|
||||
<script type="module" src="./ocrz-app.js"></script>
|
||||
<link rel="stylesheet" href="./ocrz-app.css">
|
||||
<script type="module" src="./ocrz-app.js"></script>
|
||||
<link rel="stylesheet" href="./ocrz-app.css">
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:HiddenField ID="hdIds" runat="server"></f:HiddenField>
|
||||
<input id="hdpdfurl2" type="hidden" value="<%=URL %>" />
|
||||
<input id="resultdata" type="hidden" runat="server" />
|
||||
<input id="hdpdfurl2" type="hidden" value="<%=URL %>" />
|
||||
<input id="resultdata" type="hidden" runat="server" />
|
||||
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region" >
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="VBox">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server"> </f:ToolbarFill>
|
||||
<f:Button ID="btnAudit" runat="server" Text="审核材料表"
|
||||
OnClick="btnAudit_Click" >
|
||||
</f:Button>
|
||||
<f:Button ID="btnSave" runat="server" Text="保存材料表" Hidden="true"
|
||||
OnClick="btnSave_Click" >
|
||||
<Items>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>
|
||||
<f:DropDownList ID="drpUnitWork" runat="server" Label="单位工程" LabelAlign="Right" EnableEdit="true">
|
||||
</f:DropDownList>
|
||||
<f:Button ID="btnAudit" runat="server" Text="审核识别结果"
|
||||
OnClick="btnAudit_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnSave" runat="server" Text="保存识别结果" Hidden="true"
|
||||
OnClick="btnSave_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Items>
|
||||
<f:ContentPanel ID="contentPanel1" runat="server" ShowHeader="false" >
|
||||
<div id="app"></div>
|
||||
</f:ContentPanel>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="" EnableCollapse="true" Hidden="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="id" EnableColumnLines="true" DataIDField="id" OnRowDoubleClick="Grid1_RowDoubleClick"
|
||||
EnableTextSelection="True" EnableRowDoubleClickEvent="true" AllowColumnLocking="true">
|
||||
<Items>
|
||||
<f:ContentPanel ID="contentPanel1" runat="server" ShowHeader="false" BoxFlex="1">
|
||||
<div id="app"></div>
|
||||
</f:ContentPanel>
|
||||
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="管道材料表" EnableCollapse="true" Hidden="true"
|
||||
runat="server" BoxFlex="65" DataKeyNames="Id" EnableColumnLines="true" DataIDField="Id" OnRowDoubleClick="Grid1_RowDoubleClick"
|
||||
EnableTextSelection="True" EnableRowDoubleClickEvent="true" AllowColumnLocking="true">
|
||||
<Columns>
|
||||
<%--<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="60px" HeaderTextAlign="Center" TextAlign="Center"/>--%>
|
||||
<f:RenderField Width="70px" HeaderText="序号" ColumnID="seq_no" DataField="seq_no"
|
||||
<f:RenderField Width="70px" HeaderText="序号" ColumnID="Seq_no" DataField="Seq_no"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="70px" HeaderText="页码" ColumnID="page_no" DataField="page_no"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" >
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="70px" HeaderText="管线号" ColumnID="pipe_no" DataField="pipe_no"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" >
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="70px" HeaderText="材料编码" ColumnID="code" DataField="code"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" >
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="70px" HeaderText="图号" ColumnID="drawing_number" DataField="drawing_number"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" >
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="70px" HeaderText="类型" ColumnID="category" DataField="category"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" >
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="70px" HeaderText="规格" ColumnID="spec" DataField="spec"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" >
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="70px" HeaderText="数量" ColumnID="qty" DataField="qty"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" >
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="70px" HeaderText="描述" ColumnID="description" DataField="description" ExpandUnusedSpace="true"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" >
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
<f:RenderField Width="90px" HeaderText="管线页码" ColumnID="Pipe_page_no" DataField="Pipe_page_no"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="300px" HeaderText="管线号" ColumnID="Pipe_no" DataField="Pipe_no"
|
||||
FieldType="String" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" HeaderText="材料编码" ColumnID="Code" DataField="Code"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="160px" HeaderText="图号" ColumnID="Drawing_number" DataField="Drawing_number"
|
||||
FieldType="String" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" HeaderText="类型" ColumnID="Category" DataField="Category"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" HeaderText="规格" ColumnID="Spec" DataField="Spec"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="80px" HeaderText="数量" ColumnID="Qty" DataField="Qty"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="80px" HeaderText="单位" ColumnID="Unit" DataField="Unit"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" HeaderText="材质" ColumnID="Material" DataField="Material"
|
||||
FieldType="String" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="300px" HeaderText="描述" ColumnID="Description" DataField="Description" ExpandUnusedSpace="true"
|
||||
FieldType="String" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="160px" HeaderText="备注" ColumnID="Remark" DataField="Remark"
|
||||
FieldType="String" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
</f:Grid>
|
||||
|
||||
|
||||
</Items>
|
||||
|
||||
<f:Grid ID="Grid2" ShowBorder="true" ShowHeader="true" Title="管道长度表" EnableCollapse="true" Hidden="true"
|
||||
runat="server" BoxFlex="35" DataKeyNames="Id" EnableColumnLines="true" DataIDField="Id"
|
||||
EnableTextSelection="true" AllowColumnLocking="true">
|
||||
<Columns>
|
||||
<f:RenderField Width="90px" HeaderText="管线页码" ColumnID="Pipe_page_no" DataField="Pipe_page_no"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="300px" HeaderText="管线号" ColumnID="Pipe_no" DataField="Pipe_no"
|
||||
FieldType="String" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="90px" HeaderText="分组序号" ColumnID="Group_index" DataField="Group_index"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" HeaderText="位置编号" ColumnID="Pos_no" DataField="Pos_no"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="140px" HeaderText="长度(mm)" ColumnID="Length_mm" DataField="Length_mm"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" HeaderText="公称直径(DN)" ColumnID="Dn" DataField="Dn" ExpandUnusedSpace="true"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
|
||||
|
||||
|
||||
<f:Window ID="Window1" Title="数据信息" Hidden="true" EnableIFrame="true"
|
||||
EnableMaximize="true" Target="Top" EnableResize="true" runat="server" OnClose="Window1_Close"
|
||||
IsModal="true" Width="1200px" Height="500px">
|
||||
</f:Window>
|
||||
|
||||
<f:Window ID="Window1" Title="数据信息" Hidden="true" EnableIFrame="true"
|
||||
EnableMaximize="true" Target="Top" EnableResize="true" runat="server" OnClose="Window1_Close"
|
||||
IsModal="true" Width="1200px" Height="500px">
|
||||
</f:Window>
|
||||
|
||||
|
||||
</form>
|
||||
</body>
|
||||
|
||||
@@ -2,16 +2,14 @@
|
||||
using BLL;
|
||||
using BLL.Common;
|
||||
using Model;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Transactions;
|
||||
using UglyToad.PdfPig;
|
||||
using UglyToad.PdfPig.Content;
|
||||
using UglyToad.PdfPig.Writer;
|
||||
@@ -20,6 +18,9 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
{
|
||||
public partial class DrawingRecognitionContent : PageBase
|
||||
{
|
||||
internal const string MaterialSessionSuffix = ":DrawingRecognitionMaterials";
|
||||
internal const string PipeLengthSessionSuffix = ":DrawingRecognitionPipeLengths";
|
||||
|
||||
public string URL
|
||||
{
|
||||
get
|
||||
@@ -42,44 +43,64 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
ViewState["fileUrl"] = value;
|
||||
}
|
||||
}
|
||||
public DataTable dt
|
||||
private string RecognitionDataKey
|
||||
{
|
||||
get
|
||||
{
|
||||
return (DataTable)ViewState["DataTable"];
|
||||
return (string)ViewState["RecognitionDataKey"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["DataTable"] = value;
|
||||
ViewState["RecognitionDataKey"] = value;
|
||||
}
|
||||
}
|
||||
public DataTable dtOther
|
||||
|
||||
private string MaterialSessionKey
|
||||
{
|
||||
get
|
||||
{
|
||||
return (DataTable)ViewState["dtOther"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["dtOther"] = value;
|
||||
return RecognitionDataKey + MaterialSessionSuffix;
|
||||
}
|
||||
}
|
||||
public DataTable dtIsoInfo
|
||||
|
||||
private string PipeLengthSessionKey
|
||||
{
|
||||
get
|
||||
{
|
||||
return (DataTable)ViewState["dtIsoInfo"];
|
||||
return RecognitionDataKey + PipeLengthSessionSuffix;
|
||||
}
|
||||
}
|
||||
|
||||
private List<HJGL_DrawingRecognition_Material> MaterialEntities
|
||||
{
|
||||
get
|
||||
{
|
||||
return Session[MaterialSessionKey] as List<HJGL_DrawingRecognition_Material>;
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["dtIsoInfo"] = value;
|
||||
Session[MaterialSessionKey] = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private List<HJGL_DrawingRecognition_PipeLengths> PipeLengthEntities
|
||||
{
|
||||
get
|
||||
{
|
||||
return Session[PipeLengthSessionKey] as List<HJGL_DrawingRecognition_PipeLengths>;
|
||||
}
|
||||
set
|
||||
{
|
||||
Session[PipeLengthSessionKey] = value;
|
||||
}
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
UnitWorkService.InitUnitWorkDownList(drpUnitWork, this.CurrUser.LoginProjectId, true);
|
||||
RecognitionDataKey = Guid.NewGuid().ToString("N");
|
||||
if (!string.IsNullOrEmpty(Request.Params["fileUrl"]))
|
||||
{
|
||||
URL = Funs.SGGLUrl + Request.Params["fileUrl"].Replace("\\", "/");
|
||||
@@ -99,18 +120,49 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
Grid1.Hidden = true;
|
||||
contentPanel1.Hidden =false ;
|
||||
string rootPath = Server.MapPath("~/");
|
||||
Dictionary<string,List<int>> dic= new Dictionary<string, List<int>>();
|
||||
foreach (DataRow row in dt.Rows)
|
||||
DrawingRecognitionResult recognitionResult;
|
||||
List<HJGL_DrawingRecognition_Material> materialEntities;
|
||||
List<HJGL_DrawingRecognition_PipeLengths> pipeLengthEntities;
|
||||
Dictionary<string, HJGL_Pipeline> pipelinesByCode;
|
||||
if(drpUnitWork.SelectedValue == null|| drpUnitWork.SelectedValue==Const._Null)
|
||||
{
|
||||
if (!dic.ContainsKey(row["pipe_no"].ToString()))
|
||||
{
|
||||
dic.Add(row["pipe_no"].ToString().Trim(),new List<int>());
|
||||
}
|
||||
dic[row["pipe_no"].ToString().Trim()].Add(int.Parse(row["page_no"].ToString()));
|
||||
Alert.ShowInTop("请选择单位工程", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
recognitionResult = DeserializeRecognitionResult();
|
||||
materialEntities = MaterialEntities;
|
||||
pipeLengthEntities = PipeLengthEntities;
|
||||
if (materialEntities == null || pipeLengthEntities == null)
|
||||
{
|
||||
throw new InvalidOperationException("实体数据已失效,请重新审核识别结果");
|
||||
}
|
||||
|
||||
// DrawingInfo 以原始页码关联 C3 管线号,并同步当前项目的管线基础信息。
|
||||
pipelinesByCode = UpsertPipelinesFromDrawingInfo(recognitionResult);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Alert.ShowInTop("识别数据校验或管线保存失败:" + ex.Message, MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
Grid1.Hidden = true;
|
||||
Grid2.Hidden = true;
|
||||
contentPanel1.Hidden = false;
|
||||
string rootPath = Server.MapPath("~/");
|
||||
// PDF 原始页与管线号的关系来自 C3,实体中的 pipe_page_no 保存的是 C1,不能替代原始页码。
|
||||
Dictionary<string, List<int>> dic = recognitionResult.OtherRegions
|
||||
.Where(x => x.Page.HasValue && string.Equals(x.RegionCode, "C3", StringComparison.OrdinalIgnoreCase)
|
||||
&& !string.IsNullOrWhiteSpace(x.Text))
|
||||
.GroupBy(x => x.Text.Trim(), StringComparer.OrdinalIgnoreCase)
|
||||
.ToDictionary(
|
||||
group => group.Key,
|
||||
group => group.Select(x => x.Page.Value).Distinct().ToList(),
|
||||
StringComparer.OrdinalIgnoreCase);
|
||||
using (var pdf = PdfDocument.Open(fileUrl))
|
||||
{
|
||||
|
||||
@@ -133,17 +185,23 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
}
|
||||
string fileName = key;
|
||||
|
||||
var row = dtOther.Select(" page='" + (i + 1) + "' and region_type='C' ").FirstOrDefault();
|
||||
if (row != null)
|
||||
var pipePageRegion = recognitionResult.OtherRegions.FirstOrDefault(x =>
|
||||
x.Page == i + 1 && string.Equals(x.RegionCode, "C1", StringComparison.OrdinalIgnoreCase));
|
||||
if (pipePageRegion != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(row["text"].ToString()))
|
||||
if (!string.IsNullOrWhiteSpace(pipePageRegion.Text))
|
||||
{
|
||||
fileName = row["text"].ToString();
|
||||
fileName = pipePageRegion.Text.Trim();
|
||||
}
|
||||
}
|
||||
outputPath = $"{outputPath}/" + fileName + DateTime.Now.ToString("yyyyMMddHHmm")+(i + 1) + ".pdf";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(outputPath))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
using (var writer = new PdfDocumentBuilder())
|
||||
{
|
||||
@@ -164,82 +222,8 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
var newPdf = writer.Build();
|
||||
File.WriteAllBytes(outputPath, newPdf);
|
||||
|
||||
var isoInfo = Funs.DB.HJGL_Pipeline.FirstOrDefault(x => x.PipelineCode == isono && x.ProjectId==CurrUser.LoginProjectId);
|
||||
if (isoInfo != null)
|
||||
if (pipelinesByCode.TryGetValue(isono, out var isoInfo))
|
||||
{
|
||||
Regex NumberRegex = new Regex(@"\d+\.?\d*");
|
||||
DataRow[] rows = dt.Select(" pipe_no='" + isono + "' and category='PIPE'");
|
||||
if (rows != null && rows.Length > 0)
|
||||
{
|
||||
//string description = rows[0]["description"].ToString();
|
||||
|
||||
//if (!isoInfo.ISO_Dia.HasValue || !isoInfo.ISO_Sch.HasValue || string.IsNullOrEmpty(isoInfo.MaterialStandardId))
|
||||
//{
|
||||
// string res = OpenAIhelper.ChatCompletion("请根据 " + description + ",识别外径,壁厚,材质标准(请严格按照国家标准返回),结果仅以JSON格式返回,不要解释,不要多余文字,不要markdown,例如 {\r\n \"外径\": \"33.4 mm\",\r\n \"壁厚\": \"6.35 mm\",\r\n \"材质标准\": \"GB/T 9948\"\r\n}");
|
||||
// ErrLogInfo.WriteLog(res);
|
||||
// JObject jobject = JObject.Parse(res);
|
||||
// string dia = jobject.Value<string>("外径");
|
||||
// string sch = jobject.Value<string>("壁厚");
|
||||
// string materialStandard = jobject.Value<string>("材质标准");
|
||||
// MatchCollection matchCollection1 = NumberRegex.Matches(dia);
|
||||
// foreach (var match in matchCollection1)
|
||||
// {
|
||||
// // 使用 TryParse 确保转换安全,避免异常
|
||||
// if (decimal.TryParse(match.ToString(), out decimal number))
|
||||
// {
|
||||
// isoInfo.ISO_Dia = number;
|
||||
// }
|
||||
// }
|
||||
|
||||
// MatchCollection matchCollection2 = NumberRegex.Matches(sch);
|
||||
// foreach (var match in matchCollection2)
|
||||
// {
|
||||
// // 使用 TryParse 确保转换安全,避免异常
|
||||
// if (decimal.TryParse(match.ToString(), out decimal number))
|
||||
// {
|
||||
// isoInfo.ISO_Sch = number;
|
||||
// }
|
||||
// }
|
||||
|
||||
// isoInfo.MaterialStandardId = Funs.DB.HJGL_BS_MaterialStandard.Where(x => x.MaterialStandardCode == materialStandard).Select(x => x.MaterialStandardId).FirstOrDefault();
|
||||
//}
|
||||
|
||||
|
||||
//decimal length = 0;
|
||||
//foreach (DataRow row in rows)
|
||||
//{
|
||||
|
||||
// MatchCollection matches = NumberRegex.Matches(row["qty"].ToString());
|
||||
// foreach (var match in matches)
|
||||
// {
|
||||
// // 使用 TryParse 确保转换安全,避免异常
|
||||
// if (decimal.TryParse(match.ToString(), out decimal number))
|
||||
// {
|
||||
// length += number;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
//isoInfo.PipeLineLength = length;
|
||||
|
||||
}
|
||||
//DataRow[] rowsPipe = dtIsoInfo.Select(" pipeline_id='" + isono + "' ");
|
||||
//if (rowsPipe != null && rowsPipe.Length > 0)
|
||||
//{
|
||||
// string isNeedHead = rowsPipe[0]["post_weld_heat_treatment"].ToString();
|
||||
// if (isNeedHead == "N")
|
||||
// {
|
||||
// isoInfo.IsHot = "0";
|
||||
// isoInfo.IsHotType = null;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// isoInfo.IsHot = "1";
|
||||
// }
|
||||
|
||||
|
||||
//}
|
||||
Funs.DB.SubmitChanges();
|
||||
//保存文件到附件
|
||||
var attatch = AttachFileService.GetAttachFileByToKeyId(isoInfo.PipelineId);
|
||||
if (attatch != null)
|
||||
@@ -257,7 +241,91 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ReplaceRecognitionDetails(materialEntities, pipeLengthEntities);
|
||||
|
||||
List<Tw_InputDataIn> tw_InputDataIns = new List<Tw_InputDataIn>();
|
||||
|
||||
foreach (var item in materialEntities)
|
||||
{
|
||||
var model = new Tw_InputDataIn()
|
||||
{
|
||||
MaterialCode = item.Code,
|
||||
MaterialUnit = item.Unit!=null? item.Unit.Contains("M") ? "米" : "个":null,
|
||||
MaterialDef = item.Description,
|
||||
MaterialSpec = item.Spec,
|
||||
};
|
||||
if(!tw_InputDataIns.Contains(model)) tw_InputDataIns.Add(model);
|
||||
|
||||
}
|
||||
MaterialCodeLibService.AddListByDraw(tw_InputDataIns);
|
||||
Session.Remove(MaterialSessionKey);
|
||||
Session.Remove(PipeLengthSessionKey);
|
||||
btnSave.Hidden = true;
|
||||
ShowNotify("管线、材料表和管段长度表保存成功!", MessageBoxIcon.Success);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 按管线号和管线页码替换本次识别范围内的材料及管长数据。
|
||||
/// </summary>
|
||||
private static void ReplaceRecognitionDetails(
|
||||
List<HJGL_DrawingRecognition_Material> materialEntities,
|
||||
List<HJGL_DrawingRecognition_PipeLengths> pipeLengthEntities)
|
||||
{
|
||||
var recognitionPages = materialEntities
|
||||
.Select(x => new { PipeNo = x.Pipe_no, PipePageNo = x.Pipe_page_no })
|
||||
.Concat(pipeLengthEntities.Select(x => new { PipeNo = x.Pipe_no, PipePageNo = x.Pipe_page_no }))
|
||||
.ToList();
|
||||
if (recognitionPages.Any(x => string.IsNullOrWhiteSpace(x.PipeNo) || !x.PipePageNo.HasValue))
|
||||
{
|
||||
throw new InvalidOperationException("材料或管长数据存在缺少管线号、管线页码的记录");
|
||||
}
|
||||
if (recognitionPages.Count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// 两类识别结果共用替换范围,确保某页本次未识别到其中一类数据时也能清理旧记录。
|
||||
var pageNumbersByPipeNo = recognitionPages
|
||||
.GroupBy(x => x.PipeNo.Trim(), StringComparer.OrdinalIgnoreCase)
|
||||
.ToDictionary(
|
||||
group => group.Key,
|
||||
group => new HashSet<int>(group.Select(x => x.PipePageNo.Value)),
|
||||
StringComparer.OrdinalIgnoreCase);
|
||||
var pipeNumbers = pageNumbersByPipeNo.Keys.ToList();
|
||||
|
||||
var oldMaterials = Funs.DB.HJGL_DrawingRecognition_Material
|
||||
.Where(x => pipeNumbers.Contains(x.Pipe_no))
|
||||
.ToList()
|
||||
.Where(x => IsRecognitionPage(pageNumbersByPipeNo, x.Pipe_no, x.Pipe_page_no))
|
||||
.ToList();
|
||||
var oldPipeLengths = Funs.DB.HJGL_DrawingRecognition_PipeLengths
|
||||
.Where(x => pipeNumbers.Contains(x.Pipe_no))
|
||||
.ToList()
|
||||
.Where(x => IsRecognitionPage(pageNumbersByPipeNo, x.Pipe_no, x.Pipe_page_no))
|
||||
.ToList();
|
||||
|
||||
using (var scope = new TransactionScope())
|
||||
{
|
||||
Funs.DB.HJGL_DrawingRecognition_Material.DeleteAllOnSubmit(oldMaterials);
|
||||
Funs.DB.HJGL_DrawingRecognition_PipeLengths.DeleteAllOnSubmit(oldPipeLengths);
|
||||
Funs.DB.SubmitChanges();
|
||||
|
||||
Funs.DB.HJGL_DrawingRecognition_Material.InsertAllOnSubmit(materialEntities);
|
||||
Funs.DB.HJGL_DrawingRecognition_PipeLengths.InsertAllOnSubmit(pipeLengthEntities);
|
||||
Funs.DB.SubmitChanges();
|
||||
scope.Complete();
|
||||
}
|
||||
}
|
||||
|
||||
private static bool IsRecognitionPage(
|
||||
Dictionary<string, HashSet<int>> pageNumbersByPipeNo,
|
||||
string pipeNo,
|
||||
int? pipePageNo)
|
||||
{
|
||||
return !string.IsNullOrWhiteSpace(pipeNo) &&
|
||||
pipePageNo.HasValue &&
|
||||
pageNumbersByPipeNo.TryGetValue(pipeNo.Trim(), out var pageNumbers) &&
|
||||
pageNumbers.Contains(pipePageNo.Value);
|
||||
}
|
||||
public static string HeaderCorrespondence(string uploadUrl, string data, string method, string contenttype)
|
||||
{
|
||||
@@ -320,129 +388,394 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
|
||||
protected void btnAudit_Click(object sender, EventArgs e)
|
||||
{
|
||||
Grid1.Hidden = false;
|
||||
contentPanel1.Hidden = true;
|
||||
btnAudit.Hidden = true;
|
||||
btnSave.Hidden = false;
|
||||
if (!string.IsNullOrEmpty(resultdata.Value))
|
||||
{
|
||||
JObject jobject = JObject.Parse(resultdata.Value);
|
||||
JArray jArray = jobject.Value<JArray>("material_rows");
|
||||
JArray jArrayOther = jobject.Value<JArray>("other_regions");
|
||||
JArray jArrayIsoInfo = jobject.Value<JArray>("drawing_info");
|
||||
dt = new DataTable();
|
||||
dt.Columns.Add("id");
|
||||
dt.Columns.Add("pipe_no");
|
||||
dt.Columns.Add("drawing_number");
|
||||
dt.Columns.Add("seq_no");
|
||||
dt.Columns.Add("category");
|
||||
dt.Columns.Add("description");
|
||||
dt.Columns.Add("spec");
|
||||
dt.Columns.Add("qty");
|
||||
dt.Columns.Add("code");
|
||||
dt.Columns.Add("page_no");
|
||||
dt.Columns.Add("remark");
|
||||
|
||||
dtOther = new DataTable();
|
||||
dtOther.Columns.Add("id");
|
||||
dtOther.Columns.Add("region_type");
|
||||
dtOther.Columns.Add("region_label");
|
||||
dtOther.Columns.Add("page");
|
||||
dtOther.Columns.Add("text");
|
||||
|
||||
|
||||
dtIsoInfo = new DataTable();
|
||||
dtIsoInfo.Columns.Add("id");
|
||||
dtIsoInfo.Columns.Add("page_no");
|
||||
dtIsoInfo.Columns.Add("drawing_number");
|
||||
dtIsoInfo.Columns.Add("pipeline_id");
|
||||
dtIsoInfo.Columns.Add("operation_pressure_mpa");
|
||||
dtIsoInfo.Columns.Add("operation_temp_c");
|
||||
dtIsoInfo.Columns.Add("design_pressure_mpa");
|
||||
dtIsoInfo.Columns.Add("design_temp_c");
|
||||
dtIsoInfo.Columns.Add("test_pressure_mpa");
|
||||
dtIsoInfo.Columns.Add("hydraulic_test_pressure");
|
||||
dtIsoInfo.Columns.Add("pipe_diameter_dn");
|
||||
dtIsoInfo.Columns.Add("pipe_spec_grade");
|
||||
dtIsoInfo.Columns.Add("heat_insulation");
|
||||
dtIsoInfo.Columns.Add("insulation_thickness_mm");
|
||||
dtIsoInfo.Columns.Add("post_weld_heat_treatment");
|
||||
dtIsoInfo.Columns.Add("radiographic_examination");
|
||||
foreach (JObject item in jArrayOther)
|
||||
try
|
||||
{
|
||||
var row = dtOther.NewRow();
|
||||
row["id"] = item.Value<string>("id");
|
||||
row["region_type"] = item.Value<string>("region_type");
|
||||
row["region_label"] = item.Value<string>("region_label");
|
||||
row["page"] = item.Value<string>("page");
|
||||
row["text"] = item.Value<string>("text");
|
||||
dtOther.Rows.Add(row);
|
||||
var recognitionResult = DeserializeRecognitionResult();
|
||||
var pageRegions = BuildPageRegionMap(recognitionResult.OtherRegions);
|
||||
MaterialEntities = MapMaterialEntities(recognitionResult.MaterialRows, pageRegions);
|
||||
PipeLengthEntities = MapPipeLengthEntities(recognitionResult.PipeLengthRows, pageRegions);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Alert.ShowInTop("识别结果解析失败:" + ex.Message, MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
foreach (JObject item in jArrayIsoInfo)
|
||||
{
|
||||
|
||||
|
||||
var row = dtIsoInfo.NewRow();
|
||||
row["id"] = item.Value<string>("id");
|
||||
row["page_no"] = item.Value<string>("page_no");
|
||||
row["drawing_number"] = item.Value<string>("drawing_number");
|
||||
row["pipeline_id"] = item.Value<string>("pipeline_id");
|
||||
row["operation_temp_c"] = item.Value<string>("operation_temp_c");
|
||||
row["design_pressure_mpa"] = item.Value<string>("design_pressure_mpa");
|
||||
row["design_temp_c"] = item.Value<string>("design_temp_c");
|
||||
row["test_pressure_mpa"] = item.Value<string>("test_pressure_mpa");
|
||||
row["hydraulic_test_pressure"] = item.Value<string>("hydraulic_test_pressure");
|
||||
row["pipe_diameter_dn"] = item.Value<string>("pipe_diameter_dn");
|
||||
row["pipe_spec_grade"] = item.Value<string>("pipe_spec_grade");
|
||||
row["heat_insulation"] = item.Value<string>("heat_insulation");
|
||||
row["insulation_thickness_mm"] = item.Value<string>("insulation_thickness_mm");
|
||||
row["post_weld_heat_treatment"] = item.Value<string>("post_weld_heat_treatment");
|
||||
row["radiographic_examination"] = item.Value<string>("radiographic_examination");
|
||||
dtIsoInfo.Rows.Add(row);
|
||||
}
|
||||
|
||||
// 遍历并提取数据
|
||||
foreach (JObject item in jArray)
|
||||
{
|
||||
var row = dt.NewRow();
|
||||
row["id"] = item.Value<string>("id");
|
||||
row["pipe_no"] = item.Value<string>("pipe_no");
|
||||
row["drawing_number"] = item.Value<string>("drawing_number");
|
||||
|
||||
row["code"] = item.Value<string>("code");
|
||||
row["seq_no"] = item.Value<string>("seq_no");
|
||||
row["category"] = item.Value<string>("category");
|
||||
row["description"] = item.Value<string>("description");
|
||||
row["spec"] = item.Value<string>("spec");
|
||||
row["qty"] = item.Value<string>("qty");
|
||||
row["page_no"] = item.Value<string>("page_no");
|
||||
row["remark"] = item.Value<string>("remark");
|
||||
if (string.IsNullOrEmpty(row["pipe_no"].ToString()))
|
||||
{
|
||||
var rowOther = dtOther.Select("page= " + row["page_no"].ToString()).FirstOrDefault();
|
||||
row["pipe_no"] = rowOther["text"];
|
||||
}
|
||||
dt.Rows.Add(row);
|
||||
}
|
||||
|
||||
BindGrid();
|
||||
Grid1.Hidden = false;
|
||||
Grid2.Hidden = false;
|
||||
contentPanel1.Hidden = true;
|
||||
btnAudit.Hidden = true;
|
||||
btnSave.Hidden = false;
|
||||
BindGrids();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void BindGrid()
|
||||
private DrawingRecognitionResult DeserializeRecognitionResult()
|
||||
{
|
||||
|
||||
if (string.IsNullOrWhiteSpace(resultdata.Value))
|
||||
{
|
||||
throw new InvalidOperationException("识别结果为空");
|
||||
}
|
||||
|
||||
Grid1.DataSource = dt;
|
||||
var recognitionResult = JsonConvert.DeserializeObject<DrawingRecognitionResult>(resultdata.Value);
|
||||
if (recognitionResult == null)
|
||||
{
|
||||
throw new InvalidOperationException("识别结果格式不正确");
|
||||
}
|
||||
|
||||
recognitionResult.MaterialRows = recognitionResult.MaterialRows ?? new List<DrawingRecognitionMaterialRow>();
|
||||
recognitionResult.PipeLengthRows = recognitionResult.PipeLengthRows ?? new List<DrawingRecognitionPipeLengthRow>();
|
||||
recognitionResult.OtherRegions = recognitionResult.OtherRegions ?? new List<DrawingRecognitionOtherRegion>();
|
||||
recognitionResult.DrawingInfo = recognitionResult.DrawingInfo ?? new List<DrawingRecognitionInfoRow>();
|
||||
return recognitionResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 构建原始页码与识别区域的映射,供 C1、C3 等区域统一取值。
|
||||
/// </summary>
|
||||
private static Dictionary<int, Dictionary<string, string>> BuildPageRegionMap(
|
||||
IEnumerable<DrawingRecognitionOtherRegion> otherRegions)
|
||||
{
|
||||
// 同一页以 region_code 区分 C1 管线页码和 C3 管线号,避免依赖区域返回顺序。
|
||||
return otherRegions
|
||||
.Where(x => x != null && x.Page.HasValue && !string.IsNullOrWhiteSpace(x.RegionCode))
|
||||
.GroupBy(x => x.Page.Value)
|
||||
.ToDictionary(
|
||||
pageGroup => pageGroup.Key,
|
||||
pageGroup => pageGroup
|
||||
.GroupBy(x => x.RegionCode.Trim(), StringComparer.OrdinalIgnoreCase)
|
||||
.ToDictionary(
|
||||
regionGroup => regionGroup.Key,
|
||||
regionGroup => regionGroup.Select(x => x.Text).FirstOrDefault(),
|
||||
StringComparer.OrdinalIgnoreCase));
|
||||
}
|
||||
|
||||
private static string GetPageRegionValueOrDefault(
|
||||
Dictionary<int, Dictionary<string, string>> pageRegions,
|
||||
int? pageNo,
|
||||
string regionCode)
|
||||
{
|
||||
if (!pageNo.HasValue || !pageRegions.TryGetValue(pageNo.Value, out var regions) ||
|
||||
!regions.TryGetValue(regionCode, out var value) || string.IsNullOrWhiteSpace(value))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return value.Trim();
|
||||
}
|
||||
|
||||
private static string GetRequiredPageRegionValue(
|
||||
Dictionary<int, Dictionary<string, string>> pageRegions,
|
||||
int? pageNo,
|
||||
string regionCode)
|
||||
{
|
||||
if (!pageNo.HasValue)
|
||||
{
|
||||
throw new InvalidOperationException("存在缺少 page_no 的识别数据");
|
||||
}
|
||||
|
||||
string value = GetPageRegionValueOrDefault(pageRegions, pageNo, regionCode);
|
||||
if (string.IsNullOrEmpty(value))
|
||||
{
|
||||
throw new InvalidOperationException(string.Format("第 {0} 页未识别到区域 {1}", pageNo.Value, regionCode));
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取 C1 中的管线页码,并校验其必须为整数。
|
||||
/// </summary>
|
||||
private static int GetRequiredPipePageNo(
|
||||
Dictionary<int, Dictionary<string, string>> pageRegions,
|
||||
int? sourcePageNo)
|
||||
{
|
||||
string pipePageNoText = GetRequiredPageRegionValue(pageRegions, sourcePageNo, "C1");
|
||||
if (!int.TryParse(pipePageNoText, out var pipePageNo))
|
||||
{
|
||||
throw new InvalidOperationException(string.Format("第 {0} 页区域 C1 的值“{1}”不是有效整数", sourcePageNo, pipePageNoText));
|
||||
}
|
||||
|
||||
return pipePageNo;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据识别数据的原始页码获取 C3 管线号。
|
||||
/// </summary>
|
||||
private static string GetPipelineCodeByPageNo(
|
||||
Dictionary<int, Dictionary<string, string>> pageRegions,
|
||||
int? pageNo)
|
||||
{
|
||||
// 管线号统一通过原始页码匹配 C3,避免各类识别数据重复实现映射逻辑。
|
||||
return GetRequiredPageRegionValue(pageRegions, pageNo, "C3");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 将材料识别结果映射为待保存的材料实体。
|
||||
/// </summary>
|
||||
private static List<HJGL_DrawingRecognition_Material> MapMaterialEntities(
|
||||
IEnumerable<DrawingRecognitionMaterialRow> materialRows,
|
||||
Dictionary<int, Dictionary<string, string>> pageRegions)
|
||||
{
|
||||
return materialRows.Select(row => new HJGL_DrawingRecognition_Material
|
||||
{
|
||||
Id = SQLHelper.GetNewID(),
|
||||
Pipe_no = GetPipelineCodeByPageNo(pageRegions, row.PageNo),
|
||||
Pipe_page_no = GetRequiredPipePageNo(pageRegions, row.PageNo),
|
||||
Seq_no = GetNullableInt(row.SeqNo),
|
||||
Category = row.Category,
|
||||
Description = row.Description,
|
||||
Spec = row.Spec,
|
||||
Code = row.Code,
|
||||
Qty = row.Qty,
|
||||
Unit = row.Unit,
|
||||
Material = row.Material,
|
||||
Drawing_number = row.DrawingNumber,
|
||||
Remark = row.Remark
|
||||
}).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 将管段长度识别结果映射为待保存的管段长度实体。
|
||||
/// </summary>
|
||||
private static List<HJGL_DrawingRecognition_PipeLengths> MapPipeLengthEntities(
|
||||
IEnumerable<DrawingRecognitionPipeLengthRow> pipeLengthRows,
|
||||
Dictionary<int, Dictionary<string, string>> pageRegions)
|
||||
{
|
||||
return pipeLengthRows.Select(row => new HJGL_DrawingRecognition_PipeLengths
|
||||
{
|
||||
Id = SQLHelper.GetNewID(),
|
||||
Pipe_no = GetPipelineCodeByPageNo(pageRegions, row.PageNo),
|
||||
Pipe_page_no = GetRequiredPipePageNo(pageRegions, row.PageNo),
|
||||
Group_index = row.GroupIndex,
|
||||
Pos_no = row.PosNo,
|
||||
Length_mm = row.LengthMm,
|
||||
Dn = row.Dn
|
||||
}).ToList();
|
||||
}
|
||||
|
||||
private static int? GetNullableInt(object value)
|
||||
{
|
||||
return int.TryParse(Convert.ToString(value), out var number) ? number : (int?)null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 按当前项目和管线号新增或更新管线,仅同步 DrawingInfo 中识别到的字段。
|
||||
/// </summary>
|
||||
private Dictionary<string, HJGL_Pipeline> UpsertPipelinesFromDrawingInfo(
|
||||
DrawingRecognitionResult recognitionResult)
|
||||
{
|
||||
var pageRegions = BuildPageRegionMap(recognitionResult.OtherRegions);
|
||||
var pipelineDrawingData = BuildPipelineDrawingData(recognitionResult.DrawingInfo, pageRegions);
|
||||
if (pipelineDrawingData.Count == 0)
|
||||
{
|
||||
throw new InvalidOperationException("未从区域 C3 识别到管线号");
|
||||
}
|
||||
|
||||
var pipelineCodes = pipelineDrawingData.Keys.ToList();
|
||||
var existingPipelines = Funs.DB.HJGL_Pipeline
|
||||
.Where(x => x.ProjectId == CurrUser.LoginProjectId && pipelineCodes.Contains(x.PipelineCode))
|
||||
.ToList();
|
||||
|
||||
var duplicatePipeline = existingPipelines
|
||||
.GroupBy(x => x.PipelineCode, StringComparer.OrdinalIgnoreCase)
|
||||
.FirstOrDefault(group => group.Count() > 1);
|
||||
if (duplicatePipeline != null)
|
||||
{
|
||||
throw new InvalidOperationException("当前项目存在重复管线号:" + duplicatePipeline.Key);
|
||||
}
|
||||
|
||||
var pipelinesByCode = existingPipelines.ToDictionary(
|
||||
x => x.PipelineCode,
|
||||
StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
// HJGL_Pipeline 保存 PipingClassId,识别到的等级编码必须先按当前项目批量转换。
|
||||
var pipingClassCodes = pipelineDrawingData.Values
|
||||
.Select(x => x.PipingClassCode)
|
||||
.Where(x => !string.IsNullOrWhiteSpace(x))
|
||||
.Distinct(StringComparer.OrdinalIgnoreCase)
|
||||
.ToList();
|
||||
var pipingClasses = Funs.DB.Base_PipingClass
|
||||
.Where(x => x.ProjectId == CurrUser.LoginProjectId && pipingClassCodes.Contains(x.PipingClassCode))
|
||||
.ToList()
|
||||
.GroupBy(x => x.PipingClassCode, StringComparer.OrdinalIgnoreCase)
|
||||
.ToDictionary(group => group.Key, group => group.First(), StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
var missingPipingClassCodes = pipingClassCodes
|
||||
.Where(code => !pipingClasses.ContainsKey(code))
|
||||
.ToList();
|
||||
if (missingPipingClassCodes.Count > 0)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"当前项目不存在以下管道等级:" + string.Join("、", missingPipingClassCodes));
|
||||
}
|
||||
|
||||
foreach (var item in pipelineDrawingData)
|
||||
{
|
||||
if (!pipelinesByCode.TryGetValue(item.Key, out var pipeline))
|
||||
{
|
||||
pipeline = new HJGL_Pipeline
|
||||
{
|
||||
PipelineId = SQLHelper.GetNewID(),
|
||||
ProjectId = CurrUser.LoginProjectId,
|
||||
PipelineCode = item.Key,
|
||||
UnitWorkId= drpUnitWork.SelectedValue
|
||||
};
|
||||
Funs.DB.HJGL_Pipeline.InsertOnSubmit(pipeline);
|
||||
pipelinesByCode.Add(item.Key, pipeline);
|
||||
}
|
||||
|
||||
// 识别结果为空时保留已有值,避免不完整识别覆盖管线原数据。
|
||||
if (!string.IsNullOrWhiteSpace(item.Value.PipingClassCode))
|
||||
{
|
||||
pipeline.PipingClassId = pipingClasses[item.Value.PipingClassCode].PipingClassId;
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(item.Value.DesignPress))
|
||||
{
|
||||
pipeline.DesignPress = item.Value.DesignPress;
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(item.Value.DesignTemperature))
|
||||
{
|
||||
pipeline.DesignTemperature = item.Value.DesignTemperature;
|
||||
}
|
||||
if (item.Value.DesignIsHotProess.HasValue)
|
||||
{
|
||||
pipeline.DesignIsHotProess = item.Value.DesignIsHotProess;
|
||||
}
|
||||
}
|
||||
|
||||
return pipelinesByCode;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 按页码取得管线号后聚合 DrawingInfo,同一管线跨页数据合并处理。
|
||||
/// </summary>
|
||||
private static Dictionary<string, PipelineDrawingData> BuildPipelineDrawingData(
|
||||
IEnumerable<DrawingRecognitionInfoRow> drawingInfo,
|
||||
Dictionary<int, Dictionary<string, string>> pageRegions)
|
||||
{
|
||||
// 同一管线可能对应多个 PDF 页,按 C3 管线号分组后统一校验和取值。
|
||||
var pipelineGroups = drawingInfo
|
||||
.Where(x => x != null)
|
||||
.GroupBy(
|
||||
x => GetPipelineCodeByPageNo(pageRegions, x.PageNo),
|
||||
StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
var result = new Dictionary<string, PipelineDrawingData>(StringComparer.OrdinalIgnoreCase);
|
||||
foreach (var pipelineGroup in pipelineGroups)
|
||||
{
|
||||
string pwht = GetUniqueDrawingFieldValue(
|
||||
pipelineGroup,
|
||||
pipelineGroup.Key,
|
||||
"PWHT");
|
||||
result.Add(pipelineGroup.Key, new PipelineDrawingData
|
||||
{
|
||||
PipingClassCode = GetUniqueDrawingFieldValue(
|
||||
pipelineGroup,
|
||||
pipelineGroup.Key,
|
||||
"Piping class"),
|
||||
DesignPress = GetUniqueDrawingFieldValue(
|
||||
pipelineGroup,
|
||||
pipelineGroup.Key,
|
||||
"Design pressure, MPag"),
|
||||
DesignTemperature = GetUniqueDrawingFieldValue(
|
||||
pipelineGroup,
|
||||
pipelineGroup.Key,
|
||||
"Design temperature",
|
||||
true),
|
||||
DesignIsHotProess = string.IsNullOrWhiteSpace(pwht)
|
||||
? (bool?)null
|
||||
: ParsePwht(pwht, pipelineGroup.Key)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取管线字段的唯一非空值;跨页识别值不一致时阻止保存。
|
||||
/// </summary>
|
||||
private static string GetUniqueDrawingFieldValue(
|
||||
IEnumerable<DrawingRecognitionInfoRow> rows,
|
||||
string pipelineCode,
|
||||
string fieldName,
|
||||
bool startsWith = false)
|
||||
{
|
||||
var values = rows
|
||||
.Where(x => !string.IsNullOrWhiteSpace(x.FieldName) &&
|
||||
(startsWith
|
||||
? x.FieldName.Trim().StartsWith(fieldName, StringComparison.OrdinalIgnoreCase)
|
||||
: string.Equals(x.FieldName.Trim(), fieldName, StringComparison.OrdinalIgnoreCase)))
|
||||
.Select(x => x.FieldValue == null ? null : x.FieldValue.Trim())
|
||||
.Where(x => !string.IsNullOrWhiteSpace(x))
|
||||
.Distinct(StringComparer.OrdinalIgnoreCase)
|
||||
.ToList();
|
||||
if (values.Count > 1)
|
||||
{
|
||||
throw new InvalidOperationException(string.Format(
|
||||
"管线“{0}”的字段“{1}”识别值不一致:{2}",
|
||||
pipelineCode,
|
||||
fieldName,
|
||||
string.Join("、", values)));
|
||||
}
|
||||
|
||||
return values.FirstOrDefault();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 将识别结果中的 PWHT Yes/No 标记转换为是否需要焊后热处理。
|
||||
/// </summary>
|
||||
private static bool ParsePwht(string value, string pipelineCode)
|
||||
{
|
||||
string normalizedValue = value.Trim();
|
||||
if (normalizedValue.IndexOf("(Yes)", StringComparison.OrdinalIgnoreCase) >= 0 ||
|
||||
string.Equals(normalizedValue, "Yes", StringComparison.OrdinalIgnoreCase) ||
|
||||
string.Equals(normalizedValue, "Y", StringComparison.OrdinalIgnoreCase) ||
|
||||
string.Equals(normalizedValue, "1", StringComparison.OrdinalIgnoreCase) ||
|
||||
string.Equals(normalizedValue, "是", StringComparison.OrdinalIgnoreCase) ||
|
||||
string.Equals(normalizedValue, "True", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (normalizedValue.IndexOf("(No)", StringComparison.OrdinalIgnoreCase) >= 0 ||
|
||||
string.Equals(normalizedValue, "No", StringComparison.OrdinalIgnoreCase) ||
|
||||
string.Equals(normalizedValue, "N", StringComparison.OrdinalIgnoreCase) ||
|
||||
string.Equals(normalizedValue, "0", StringComparison.OrdinalIgnoreCase) ||
|
||||
string.Equals(normalizedValue, "否", StringComparison.OrdinalIgnoreCase) ||
|
||||
string.Equals(normalizedValue, "False", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
throw new InvalidOperationException(string.Format(
|
||||
"管线“{0}”的 PWHT 值“{1}”无法识别为是或否",
|
||||
pipelineCode,
|
||||
value));
|
||||
}
|
||||
|
||||
private sealed class PipelineDrawingData
|
||||
{
|
||||
public string PipingClassCode { get; set; }
|
||||
|
||||
public string DesignPress { get; set; }
|
||||
|
||||
public string DesignTemperature { get; set; }
|
||||
|
||||
public bool? DesignIsHotProess { get; set; }
|
||||
}
|
||||
|
||||
|
||||
private void BindGrids()
|
||||
{
|
||||
Grid1.DataSource = MaterialEntities ?? new List<HJGL_DrawingRecognition_Material>();
|
||||
Grid1.DataBind();
|
||||
|
||||
|
||||
}
|
||||
Grid2.DataSource = PipeLengthEntities ?? new List<HJGL_DrawingRecognition_PipeLengths>();
|
||||
Grid2.DataBind();
|
||||
}
|
||||
#region 双击事件
|
||||
/// <summary>
|
||||
/// Grid行双击事件
|
||||
@@ -458,18 +791,18 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
}
|
||||
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.HJGL_DataInMenuId, Const.BtnAdd))
|
||||
{
|
||||
if (DrawingRecognitionContentEdit.dicDt.ContainsKey(CurrUser.PersonId))
|
||||
if (MaterialEntities == null)
|
||||
{
|
||||
DrawingRecognitionContentEdit.dicDt[CurrUser.PersonId] = dt;
|
||||
Alert.ShowInTop("实体数据已失效,请重新审核识别结果!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
DrawingRecognitionContentEdit.dicDt.Add(CurrUser.PersonId, dt);
|
||||
|
||||
}
|
||||
PageContext.RegisterStartupScript(Window1.GetSaveStateReference(hdIds.ClientID) + Window1.GetShowReference(String.Format("DrawingRecognitionContentEdit.aspx?Index={0}", Grid1.SelectedRowIndex, "编辑 - ")));
|
||||
|
||||
//PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DrawingRecognitionContentEdit.aspx?Index={0}", Grid1.SelectedRowIndex, "维护 - ")));
|
||||
string editUrl = string.Format(
|
||||
"DrawingRecognitionContentEdit.aspx?Index={0}&DataKey={1}",
|
||||
Grid1.SelectedRowIndex,
|
||||
RecognitionDataKey);
|
||||
PageContext.RegisterStartupScript(
|
||||
Window1.GetSaveStateReference(hdIds.ClientID) + Window1.GetShowReference(editUrl));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -480,8 +813,7 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
|
||||
protected void Window1_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
Grid1.DataSource = dt;
|
||||
Grid1.DataBind();
|
||||
BindGrids();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+18
@@ -77,6 +77,15 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
/// <summary>
|
||||
/// drpUnitWork 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpUnitWork;
|
||||
|
||||
/// <summary>
|
||||
/// btnAudit 控件。
|
||||
/// </summary>
|
||||
@@ -113,6 +122,15 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// Grid2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid2;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtPipeNo" Label="管线号" ShowRedStar="true" Required="true" runat="server" FocusOnPageLoad="true" MaxLength="100" LabelWidth="120px">
|
||||
<f:TextBox ID="txtPipeNo" Label="管线号" ShowRedStar="true" Required="true" runat="server" FocusOnPageLoad="true" MaxLength="200" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtDrawingNumber" Label="图号" ShowRedStar="true" Required="true" runat="server" MaxLength="20" LabelWidth="120px">
|
||||
<f:TextBox ID="txtDrawingNumber" Label="图号" ShowRedStar="true" Required="true" runat="server" MaxLength="200" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtCategory" Label="类型" ShowRedStar="true" Required="true" runat="server" MaxLength="50" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
@@ -40,7 +40,7 @@
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtSpec" Label="规格" ShowRedStar="true" Required="true" runat="server" MaxLength="50" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtPageNo" Label="图号" ShowRedStar="true" Required="true" runat="server" MaxLength="50" LabelWidth="120px">
|
||||
<f:TextBox ID="txtPageNo" Label="管线页码" ShowRedStar="true" Required="true" runat="server" MaxLength="10" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -202,6 +202,9 @@
|
||||
DataField="CoverWelderTeamGroupName" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Center" Width="90px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="是否热处理" ColumnID="IsHotProessStr" DataField="IsHotProessStr"
|
||||
FieldType="String" HeaderTextAlign="Center" Width="120px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="热处理报告编号" ColumnID="HotProessReportNo" DataField="HotProessReportNo"
|
||||
FieldType="String" HeaderTextAlign="Center" Width="120px">
|
||||
</f:RenderField>
|
||||
|
||||
@@ -623,6 +623,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
var q = (from x in View_HJGL_WeldJoint
|
||||
select new
|
||||
{
|
||||
管线号 = x.PipelineCode,
|
||||
焊口号 = x.WeldJointCode,
|
||||
完成状态 = x.IsWeldOK,
|
||||
单位名称 = x.UnitName,
|
||||
@@ -647,6 +648,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
打底焊工班组 = x.BackingWelderTeamGroupName,
|
||||
盖面焊工号 = x.CoverWelderCode,
|
||||
盖面焊工班组 = x.CoverWelderTeamGroupName,
|
||||
是否热处理 = x.IsHotProessStr,
|
||||
热处理报告编号 = x.HotProessReportNo,
|
||||
热处理检测结果 = x.HotProessResult,
|
||||
硬度报告编号 = x.HardReportNo,
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MaterialOverview.aspx.cs" Inherits="FineUIPro.Web.HJGL.InfoQuery.MaterialOverview" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title>管道材信息总览</title>
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
|
||||
<Items>
|
||||
<f:Panel ID="panelLeftRegion" runat="server" RegionPosition="Left" RegionSplit="true" EnableCollapse="true"
|
||||
Width="270px" Title="WBS目录" ShowBorder="true" Layout="Fit" ShowHeader="true" AutoScroll="true" BodyPadding="5px"
|
||||
IconFont="ArrowCircleLeft">
|
||||
<Items>
|
||||
<f:Tree ID="tvControlItem" runat="server" ShowHeader="false" Title="装置区域" ShowBorder="false"
|
||||
EnableCollapse="true" EnableSingleClickExpand="true" AutoLeafIdentification="true"
|
||||
EnableSingleExpand="true" EnableTextSelection="true" OnNodeCommand="tvControlItem_NodeCommand">
|
||||
</f:Tree>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Panel ID="panelCenterRegion" runat="server" RegionPosition="Center" Margin="5px" BodyPadding="5px"
|
||||
ShowBorder="true" ShowHeader="false" Layout="Fit">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Top" runat="server">
|
||||
<Items>
|
||||
<f:TextBox ID="txtPipeNo" runat="server" Label="管线号" LabelWidth="70px" Width="260px" EmptyText="输入管线号" />
|
||||
<f:TextBox ID="txtMaterialCode" runat="server" Label="材料编码" LabelWidth="70px" Width="260px" EmptyText="输入材料编码" />
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server" />
|
||||
<f:Button ID="btnQuery" runat="server" Text="查询" ToolTip="查询" Icon="SystemSearch" OnClick="btnQuery_Click" />
|
||||
<f:Button ID="btnOut" runat="server" Text="导出" ToolTip="导出" Icon="FolderUp"
|
||||
OnClick="btnOut_Click" EnableAjax="false" DisableControlBeforePostBack="false" />
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" runat="server" ShowBorder="false" ShowHeader="false" DataKeyNames="Id" DataIDField="Id"
|
||||
EnableColumnLines="true" EnableTextSelection="true" AllowColumnLocking="true" AllowSorting="true"
|
||||
AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange" OnSort="Grid1_Sort">
|
||||
<Columns>
|
||||
<f:RowNumberField HeaderText="序号" Width="60px" EnablePagingNumber="true" HeaderTextAlign="Center" TextAlign="Center" />
|
||||
<f:RenderField HeaderText="管线号" ColumnID="Pipe_no" DataField="Pipe_no" SortField="Pipe_no" FieldType="String" Width="220px" Locked="true" HeaderTextAlign="Center" />
|
||||
<f:RenderField HeaderText="管线页码" ColumnID="Pipe_page_no" DataField="Pipe_page_no" SortField="Pipe_page_no" FieldType="Int" Width="90px" HeaderTextAlign="Center" TextAlign="Center" />
|
||||
<f:RenderField HeaderText="序号" ColumnID="Seq_no" DataField="Seq_no" SortField="Seq_no" FieldType="Int" Width="70px" HeaderTextAlign="Center" TextAlign="Center" />
|
||||
<f:RenderField HeaderText="材料编码" ColumnID="Code" DataField="Code" SortField="Code" FieldType="String" Width="120px" HeaderTextAlign="Center" />
|
||||
<f:RenderField HeaderText="图号" ColumnID="Drawing_number" DataField="Drawing_number" SortField="Drawing_number" FieldType="String" Width="160px" HeaderTextAlign="Center" />
|
||||
<f:RenderField HeaderText="类型" ColumnID="Category" DataField="Category" SortField="Category" FieldType="String" Width="100px" HeaderTextAlign="Center" />
|
||||
<f:RenderField HeaderText="规格" ColumnID="Spec" DataField="Spec" SortField="Spec" FieldType="String" Width="120px" HeaderTextAlign="Center" />
|
||||
<f:RenderField HeaderText="数量" ColumnID="Qty" DataField="Qty" SortField="Qty" FieldType="String" Width="80px" HeaderTextAlign="Center" TextAlign="Center" />
|
||||
<f:RenderField HeaderText="单位" ColumnID="Unit" DataField="Unit" SortField="Unit" FieldType="String" Width="80px" HeaderTextAlign="Center" TextAlign="Center" />
|
||||
<f:RenderField HeaderText="材质" ColumnID="Material" DataField="Material" SortField="Material" FieldType="String" Width="150px" HeaderTextAlign="Center" />
|
||||
<f:RenderField HeaderText="描述" ColumnID="Description" DataField="Description" SortField="Description" FieldType="String" Width="300px" HeaderTextAlign="Center" />
|
||||
<f:RenderField HeaderText="备注" ColumnID="Remark" DataField="Remark" SortField="Remark" FieldType="String" Width="160px" HeaderTextAlign="Center" ExpandUnusedSpace="true" />
|
||||
</Columns>
|
||||
<PageItems>
|
||||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
||||
</f:ToolbarSeparator>
|
||||
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
|
||||
</f:ToolbarText>
|
||||
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
|
||||
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
|
||||
<f:ListItem Text="10" Value="10" />
|
||||
<f:ListItem Text="15" Value="15" />
|
||||
<f:ListItem Text="20" Value="20" />
|
||||
<f:ListItem Text="25" Value="25" />
|
||||
<f:ListItem Text="所有行" Value="10000" />
|
||||
</f:DropDownList>
|
||||
</PageItems>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,163 @@
|
||||
using BLL;
|
||||
using MiniExcelLibs;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
{
|
||||
public partial class MaterialOverview : PageBase
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
InitTreeMenu();
|
||||
}
|
||||
}
|
||||
|
||||
private void InitTreeMenu()
|
||||
{
|
||||
tvControlItem.Nodes.Clear();
|
||||
TreeNode civilNode = new TreeNode { NodeID = "1", Text = "建筑工程", Selectable = false };
|
||||
TreeNode installNode = new TreeNode { NodeID = "2", Text = "安装工程", Selectable = false, Expanded = true };
|
||||
tvControlItem.Nodes.Add(civilNode);
|
||||
tvControlItem.Nodes.Add(installNode);
|
||||
|
||||
string projectId = CurrUser.LoginProjectId;
|
||||
// 识别结果未保存项目和WBS字段,按管线号关联项目管线后才能实现项目隔离和WBS筛选。
|
||||
var recordCounts = (from material in Funs.DB.HJGL_DrawingRecognition_Material
|
||||
join pipeline in Funs.DB.HJGL_Pipeline on material.Pipe_no equals pipeline.PipelineCode
|
||||
where pipeline.ProjectId == projectId && pipeline.UnitWorkId != null
|
||||
group material by pipeline.UnitWorkId into groupItem
|
||||
select new { UnitWorkId = groupItem.Key, Count = groupItem.Count() }).ToDictionary(x => x.UnitWorkId, x => x.Count);
|
||||
var unitWorks = (from unitWork in Funs.DB.WBS_UnitWork
|
||||
where unitWork.ProjectId == projectId && unitWork.SuperUnitWork == null && unitWork.UnitId != null && unitWork.ProjectType != null
|
||||
orderby unitWork.UnitWorkCode
|
||||
select unitWork).ToList();
|
||||
var unitIds = unitWorks.Where(x => x.UnitId != null).Select(x => x.UnitId).Distinct().ToList();
|
||||
var unitNames = (from unit in Funs.DB.Base_Unit where unitIds.Contains(unit.UnitId) select unit).ToDictionary(x => x.UnitId, x => x.UnitName);
|
||||
|
||||
foreach (var unitWork in unitWorks)
|
||||
{
|
||||
int count = recordCounts.ContainsKey(unitWork.UnitWorkId) ? recordCounts[unitWork.UnitWorkId] : 0;
|
||||
TreeNode node = new TreeNode();
|
||||
node.NodeID = unitWork.UnitWorkId;
|
||||
node.Text = unitWork.UnitWorkName + "【" + count + "】材料";
|
||||
node.ToolTip = "施工单位:" + (unitNames.ContainsKey(unitWork.UnitId) ? unitNames[unitWork.UnitId] : "");
|
||||
node.EnableClickEvent = true;
|
||||
(unitWork.ProjectType == "1" ? civilNode : installNode).Nodes.Add(node);
|
||||
}
|
||||
}
|
||||
|
||||
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
|
||||
{
|
||||
Grid1.PageIndex = 0;
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
private void BindGrid()
|
||||
{
|
||||
string unitWorkId = tvControlItem.SelectedNodeID;
|
||||
if (string.IsNullOrEmpty(unitWorkId))
|
||||
{
|
||||
Grid1.RecordCount = 0;
|
||||
Grid1.DataSource = new List<HJGL_DrawingRecognition_Material>();
|
||||
Grid1.DataBind();
|
||||
return;
|
||||
}
|
||||
|
||||
var query = ApplySort(GetCurrentQuery(unitWorkId));
|
||||
Grid1.RecordCount = query.Count();
|
||||
Grid1.DataSource = query.Skip(Grid1.PageIndex * Grid1.PageSize).Take(Grid1.PageSize).ToList();
|
||||
Grid1.DataBind();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 汇总当前WBS节点和页面筛选条件,保证列表与导出数据完全一致。
|
||||
/// </summary>
|
||||
private IQueryable<HJGL_DrawingRecognition_Material> GetCurrentQuery(string unitWorkId)
|
||||
{
|
||||
string pipeNo = txtPipeNo.Text.Trim();
|
||||
string materialCode = txtMaterialCode.Text.Trim();
|
||||
var query = from material in Funs.DB.HJGL_DrawingRecognition_Material
|
||||
join pipeline in Funs.DB.HJGL_Pipeline on material.Pipe_no equals pipeline.PipelineCode
|
||||
where pipeline.ProjectId == CurrUser.LoginProjectId && pipeline.UnitWorkId == unitWorkId
|
||||
select material;
|
||||
if (!string.IsNullOrEmpty(pipeNo)) query = query.Where(x => x.Pipe_no.Contains(pipeNo));
|
||||
if (!string.IsNullOrEmpty(materialCode)) query = query.Where(x => x.Code.Contains(materialCode));
|
||||
return query;
|
||||
}
|
||||
|
||||
private IQueryable<HJGL_DrawingRecognition_Material> ApplySort(IQueryable<HJGL_DrawingRecognition_Material> query)
|
||||
{
|
||||
bool descending = Grid1.SortDirection == "DESC";
|
||||
switch (Grid1.SortField)
|
||||
{
|
||||
case "Pipe_page_no": return descending ? query.OrderByDescending(x => x.Pipe_page_no) : query.OrderBy(x => x.Pipe_page_no);
|
||||
case "Seq_no": return descending ? query.OrderByDescending(x => x.Seq_no) : query.OrderBy(x => x.Seq_no);
|
||||
case "Code": return descending ? query.OrderByDescending(x => x.Code) : query.OrderBy(x => x.Code);
|
||||
case "Drawing_number": return descending ? query.OrderByDescending(x => x.Drawing_number) : query.OrderBy(x => x.Drawing_number);
|
||||
case "Category": return descending ? query.OrderByDescending(x => x.Category) : query.OrderBy(x => x.Category);
|
||||
case "Spec": return descending ? query.OrderByDescending(x => x.Spec) : query.OrderBy(x => x.Spec);
|
||||
case "Qty": return descending ? query.OrderByDescending(x => x.Qty) : query.OrderBy(x => x.Qty);
|
||||
case "Unit": return descending ? query.OrderByDescending(x => x.Unit) : query.OrderBy(x => x.Unit);
|
||||
case "Material": return descending ? query.OrderByDescending(x => x.Material) : query.OrderBy(x => x.Material);
|
||||
case "Description": return descending ? query.OrderByDescending(x => x.Description) : query.OrderBy(x => x.Description);
|
||||
case "Remark": return descending ? query.OrderByDescending(x => x.Remark) : query.OrderBy(x => x.Remark);
|
||||
default: return descending ? query.OrderByDescending(x => x.Pipe_no) : query.OrderBy(x => x.Pipe_no);
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnQuery_Click(object sender, EventArgs e) { Grid1.PageIndex = 0; BindGrid(); }
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) { Grid1.PageIndex = e.NewPageIndex; BindGrid(); }
|
||||
protected void Grid1_Sort(object sender, GridSortEventArgs e) { Grid1.SortField = e.SortField; Grid1.SortDirection = e.SortDirection; BindGrid(); }
|
||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) { Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); Grid1.PageIndex = 0; BindGrid(); }
|
||||
|
||||
protected void btnOut_Click(object sender, EventArgs e)
|
||||
{
|
||||
string unitWorkId = tvControlItem.SelectedNodeID;
|
||||
if (string.IsNullOrEmpty(unitWorkId))
|
||||
{
|
||||
ShowNotify("请先选择WBS目录", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
// 导出所有满足当前筛选条件的记录,不受列表分页大小限制。
|
||||
var data = ApplySort(GetCurrentQuery(unitWorkId)).Select(x => new
|
||||
{
|
||||
管线号 = x.Pipe_no,
|
||||
管线页码 = x.Pipe_page_no,
|
||||
序号 = x.Seq_no,
|
||||
材料编码 = x.Code,
|
||||
图号 = x.Drawing_number,
|
||||
类型 = x.Category,
|
||||
规格 = x.Spec,
|
||||
数量 = x.Qty,
|
||||
单位 = x.Unit,
|
||||
材质 = x.Material,
|
||||
描述 = x.Description,
|
||||
备注 = x.Remark
|
||||
}).ToList();
|
||||
string path = Path.Combine(Funs.RootPath, "File", "Excel", "Temp", "MaterialOverview" + DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss") + ".xlsx");
|
||||
MiniExcel.SaveAs(path, data);
|
||||
DownloadExcel(path, "管道材料信息总览.xlsx");
|
||||
}
|
||||
|
||||
private void DownloadExcel(string path, string fileName)
|
||||
{
|
||||
FileInfo info = new FileInfo(path);
|
||||
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", info.Length.ToString());
|
||||
System.Web.HttpContext.Current.Response.TransmitFile(path, 0, info.Length);
|
||||
System.Web.HttpContext.Current.Response.Flush();
|
||||
System.Web.HttpContext.Current.Response.Close();
|
||||
File.Delete(path);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,161 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
{
|
||||
|
||||
|
||||
public partial class MaterialOverview
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// panelLeftRegion 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelLeftRegion;
|
||||
|
||||
/// <summary>
|
||||
/// tvControlItem 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Tree tvControlItem;
|
||||
|
||||
/// <summary>
|
||||
/// panelCenterRegion 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelCenterRegion;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// txtPipeNo 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtPipeNo;
|
||||
|
||||
/// <summary>
|
||||
/// txtMaterialCode 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtMaterialCode;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
/// <summary>
|
||||
/// btnQuery 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnQuery;
|
||||
|
||||
/// <summary>
|
||||
/// btnOut 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnOut;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarText1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarText ToolbarText1;
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PipeLengthOverview.aspx.cs" Inherits="FineUIPro.Web.HJGL.InfoQuery.PipeLengthOverview" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title>管长信息总览</title>
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
|
||||
<Items>
|
||||
<f:Panel ID="panelLeftRegion" runat="server" RegionPosition="Left" RegionSplit="true" EnableCollapse="true"
|
||||
Width="270px" Title="WBS目录" ShowBorder="true" Layout="Fit" ShowHeader="true" AutoScroll="true" BodyPadding="5px"
|
||||
IconFont="ArrowCircleLeft">
|
||||
<Items>
|
||||
<f:Tree ID="tvControlItem" runat="server" ShowHeader="false" Title="装置区域" ShowBorder="false"
|
||||
EnableCollapse="true" EnableSingleClickExpand="true" AutoLeafIdentification="true"
|
||||
EnableSingleExpand="true" EnableTextSelection="true" OnNodeCommand="tvControlItem_NodeCommand">
|
||||
</f:Tree>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Panel ID="panelCenterRegion" runat="server" RegionPosition="Center" Margin="5px" BodyPadding="5px"
|
||||
ShowBorder="true" ShowHeader="false" Layout="Fit">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Top" runat="server">
|
||||
<Items>
|
||||
<f:TextBox ID="txtPipeNo" runat="server" Label="管线号" LabelWidth="70px" Width="260px" EmptyText="输入管线号" />
|
||||
<f:TextBox ID="txtDn" runat="server" Label="公称直径" LabelWidth="70px" Width="220px" EmptyText="输入DN" />
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server" />
|
||||
<f:Button ID="btnQuery" runat="server" Text="查询" ToolTip="查询" Icon="SystemSearch" OnClick="btnQuery_Click" />
|
||||
<f:Button ID="btnOut" runat="server" Text="导出" ToolTip="导出" Icon="FolderUp"
|
||||
OnClick="btnOut_Click" EnableAjax="false" DisableControlBeforePostBack="false" />
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" runat="server" ShowBorder="false" ShowHeader="false" DataKeyNames="Id" DataIDField="Id"
|
||||
EnableColumnLines="true" EnableTextSelection="true" AllowColumnLocking="true" AllowSorting="true"
|
||||
AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange" OnSort="Grid1_Sort">
|
||||
<Columns>
|
||||
<f:RowNumberField HeaderText="序号" Width="60px" EnablePagingNumber="true" HeaderTextAlign="Center" TextAlign="Center" />
|
||||
<f:RenderField HeaderText="管线号" ColumnID="Pipe_no" DataField="Pipe_no" SortField="Pipe_no" FieldType="String" Width="260px" Locked="true" HeaderTextAlign="Center" />
|
||||
<f:RenderField HeaderText="管线页码" ColumnID="Pipe_page_no" DataField="Pipe_page_no" SortField="Pipe_page_no" FieldType="Int" Width="90px" HeaderTextAlign="Center" TextAlign="Center" />
|
||||
<f:RenderField HeaderText="分组序号" ColumnID="Group_index" DataField="Group_index" SortField="Group_index" FieldType="Int" Width="90px" HeaderTextAlign="Center" TextAlign="Center" />
|
||||
<f:RenderField HeaderText="位置编号" ColumnID="Pos_no" DataField="Pos_no" SortField="Pos_no" FieldType="String" Width="150px" HeaderTextAlign="Center" />
|
||||
<f:RenderField HeaderText="长度(mm)" ColumnID="Length_mm" DataField="Length_mm" SortField="Length_mm" FieldType="String" Width="140px" HeaderTextAlign="Center" TextAlign="Center" />
|
||||
<f:RenderField HeaderText="公称直径(DN)" ColumnID="Dn" DataField="Dn" SortField="Dn" FieldType="String" Width="140px" HeaderTextAlign="Center" TextAlign="Center" ExpandUnusedSpace="true" />
|
||||
</Columns>
|
||||
<PageItems>
|
||||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
||||
</f:ToolbarSeparator>
|
||||
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
|
||||
</f:ToolbarText>
|
||||
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
|
||||
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
|
||||
<f:ListItem Text="10" Value="10" />
|
||||
<f:ListItem Text="15" Value="15" />
|
||||
<f:ListItem Text="20" Value="20" />
|
||||
<f:ListItem Text="25" Value="25" />
|
||||
<f:ListItem Text="所有行" Value="10000" />
|
||||
</f:DropDownList>
|
||||
</PageItems>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,151 @@
|
||||
using BLL;
|
||||
using MiniExcelLibs;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
{
|
||||
public partial class PipeLengthOverview : PageBase
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
InitTreeMenu();
|
||||
}
|
||||
}
|
||||
|
||||
private void InitTreeMenu()
|
||||
{
|
||||
tvControlItem.Nodes.Clear();
|
||||
TreeNode civilNode = new TreeNode { NodeID = "1", Text = "建筑工程", Selectable = false };
|
||||
TreeNode installNode = new TreeNode { NodeID = "2", Text = "安装工程", Selectable = false, Expanded = true };
|
||||
tvControlItem.Nodes.Add(civilNode);
|
||||
tvControlItem.Nodes.Add(installNode);
|
||||
|
||||
string projectId = CurrUser.LoginProjectId;
|
||||
// 管长识别表无项目归属,必须通过管线号关联项目管线,防止跨项目展示同名管线的识别结果。
|
||||
var recordCounts = (from pipeLength in Funs.DB.HJGL_DrawingRecognition_PipeLengths
|
||||
join pipeline in Funs.DB.HJGL_Pipeline on pipeLength.Pipe_no equals pipeline.PipelineCode
|
||||
where pipeline.ProjectId == projectId && pipeline.UnitWorkId != null
|
||||
group pipeLength by pipeline.UnitWorkId into groupItem
|
||||
select new { UnitWorkId = groupItem.Key, Count = groupItem.Count() }).ToDictionary(x => x.UnitWorkId, x => x.Count);
|
||||
var unitWorks = (from unitWork in Funs.DB.WBS_UnitWork
|
||||
where unitWork.ProjectId == projectId && unitWork.SuperUnitWork == null && unitWork.UnitId != null && unitWork.ProjectType != null
|
||||
orderby unitWork.UnitWorkCode
|
||||
select unitWork).ToList();
|
||||
var unitIds = unitWorks.Where(x => x.UnitId != null).Select(x => x.UnitId).Distinct().ToList();
|
||||
var unitNames = (from unit in Funs.DB.Base_Unit where unitIds.Contains(unit.UnitId) select unit).ToDictionary(x => x.UnitId, x => x.UnitName);
|
||||
|
||||
foreach (var unitWork in unitWorks)
|
||||
{
|
||||
int count = recordCounts.ContainsKey(unitWork.UnitWorkId) ? recordCounts[unitWork.UnitWorkId] : 0;
|
||||
TreeNode node = new TreeNode();
|
||||
node.NodeID = unitWork.UnitWorkId;
|
||||
node.Text = unitWork.UnitWorkName + "【" + count + "】管段";
|
||||
node.ToolTip = "施工单位:" + (unitNames.ContainsKey(unitWork.UnitId) ? unitNames[unitWork.UnitId] : "");
|
||||
node.EnableClickEvent = true;
|
||||
(unitWork.ProjectType == "1" ? civilNode : installNode).Nodes.Add(node);
|
||||
}
|
||||
}
|
||||
|
||||
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
|
||||
{
|
||||
Grid1.PageIndex = 0;
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
private void BindGrid()
|
||||
{
|
||||
string unitWorkId = tvControlItem.SelectedNodeID;
|
||||
if (string.IsNullOrEmpty(unitWorkId))
|
||||
{
|
||||
Grid1.RecordCount = 0;
|
||||
Grid1.DataSource = new List<HJGL_DrawingRecognition_PipeLengths>();
|
||||
Grid1.DataBind();
|
||||
return;
|
||||
}
|
||||
|
||||
var query = ApplySort(GetCurrentQuery(unitWorkId));
|
||||
Grid1.RecordCount = query.Count();
|
||||
Grid1.DataSource = query.Skip(Grid1.PageIndex * Grid1.PageSize).Take(Grid1.PageSize).ToList();
|
||||
Grid1.DataBind();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 汇总当前WBS节点和页面筛选条件,保证列表与导出数据完全一致。
|
||||
/// </summary>
|
||||
private IQueryable<HJGL_DrawingRecognition_PipeLengths> GetCurrentQuery(string unitWorkId)
|
||||
{
|
||||
string pipeNo = txtPipeNo.Text.Trim();
|
||||
string dn = txtDn.Text.Trim();
|
||||
var query = from pipeLength in Funs.DB.HJGL_DrawingRecognition_PipeLengths
|
||||
join pipeline in Funs.DB.HJGL_Pipeline on pipeLength.Pipe_no equals pipeline.PipelineCode
|
||||
where pipeline.ProjectId == CurrUser.LoginProjectId && pipeline.UnitWorkId == unitWorkId
|
||||
select pipeLength;
|
||||
if (!string.IsNullOrEmpty(pipeNo)) query = query.Where(x => x.Pipe_no.Contains(pipeNo));
|
||||
if (!string.IsNullOrEmpty(dn)) query = query.Where(x => x.Dn.Contains(dn));
|
||||
return query;
|
||||
}
|
||||
|
||||
private IQueryable<HJGL_DrawingRecognition_PipeLengths> ApplySort(IQueryable<HJGL_DrawingRecognition_PipeLengths> query)
|
||||
{
|
||||
bool descending = Grid1.SortDirection == "DESC";
|
||||
switch (Grid1.SortField)
|
||||
{
|
||||
case "Pipe_page_no": return descending ? query.OrderByDescending(x => x.Pipe_page_no) : query.OrderBy(x => x.Pipe_page_no);
|
||||
case "Group_index": return descending ? query.OrderByDescending(x => x.Group_index) : query.OrderBy(x => x.Group_index);
|
||||
case "Pos_no": return descending ? query.OrderByDescending(x => x.Pos_no) : query.OrderBy(x => x.Pos_no);
|
||||
case "Length_mm": return descending ? query.OrderByDescending(x => x.Length_mm) : query.OrderBy(x => x.Length_mm);
|
||||
case "Dn": return descending ? query.OrderByDescending(x => x.Dn) : query.OrderBy(x => x.Dn);
|
||||
default: return descending ? query.OrderByDescending(x => x.Pipe_no) : query.OrderBy(x => x.Pipe_no);
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnQuery_Click(object sender, EventArgs e) { Grid1.PageIndex = 0; BindGrid(); }
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) { Grid1.PageIndex = e.NewPageIndex; BindGrid(); }
|
||||
protected void Grid1_Sort(object sender, GridSortEventArgs e) { Grid1.SortField = e.SortField; Grid1.SortDirection = e.SortDirection; BindGrid(); }
|
||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) { Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); Grid1.PageIndex = 0; BindGrid(); }
|
||||
|
||||
protected void btnOut_Click(object sender, EventArgs e)
|
||||
{
|
||||
string unitWorkId = tvControlItem.SelectedNodeID;
|
||||
if (string.IsNullOrEmpty(unitWorkId))
|
||||
{
|
||||
ShowNotify("请先选择WBS目录", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
// 导出所有满足当前筛选条件的记录,不受列表分页大小限制。
|
||||
var data = ApplySort(GetCurrentQuery(unitWorkId)).Select(x => new
|
||||
{
|
||||
管线号 = x.Pipe_no,
|
||||
管线页码 = x.Pipe_page_no,
|
||||
分组序号 = x.Group_index,
|
||||
位置编号 = x.Pos_no,
|
||||
长度毫米 = x.Length_mm,
|
||||
公称直径DN = x.Dn
|
||||
}).ToList();
|
||||
string path = Path.Combine(Funs.RootPath, "File", "Excel", "Temp", "PipeLengthOverview" + DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss") + ".xlsx");
|
||||
MiniExcel.SaveAs(path, data);
|
||||
DownloadExcel(path, "管长信息总览.xlsx");
|
||||
}
|
||||
|
||||
private void DownloadExcel(string path, string fileName)
|
||||
{
|
||||
FileInfo info = new FileInfo(path);
|
||||
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", info.Length.ToString());
|
||||
System.Web.HttpContext.Current.Response.TransmitFile(path, 0, info.Length);
|
||||
System.Web.HttpContext.Current.Response.Flush();
|
||||
System.Web.HttpContext.Current.Response.Close();
|
||||
File.Delete(path);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,161 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
{
|
||||
|
||||
|
||||
public partial class PipeLengthOverview
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// panelLeftRegion 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelLeftRegion;
|
||||
|
||||
/// <summary>
|
||||
/// tvControlItem 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Tree tvControlItem;
|
||||
|
||||
/// <summary>
|
||||
/// panelCenterRegion 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelCenterRegion;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// txtPipeNo 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtPipeNo;
|
||||
|
||||
/// <summary>
|
||||
/// txtDn 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtDn;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
/// <summary>
|
||||
/// btnQuery 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnQuery;
|
||||
|
||||
/// <summary>
|
||||
/// btnOut 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnOut;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarText1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarText ToolbarText1;
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||
}
|
||||
}
|
||||
@@ -15,12 +15,14 @@
|
||||
<link rel="stylesheet" crossorigin="" href="./assets/main-DSskaVYi.css">--%>
|
||||
|
||||
|
||||
<script type="module" crossorigin src="./assets/main-BUyRx63y.js"></script>
|
||||
<script type="module" crossorigin src="./assets/main-mwM84Mwh.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="./assets/pdf-lib-AfLQbX6n.js">
|
||||
<link rel="modulepreload" crossorigin href="./assets/pdfjs-DXqArq6h.js">
|
||||
<link rel="modulepreload" crossorigin href="./assets/styles-BZJ2tAi6.js">
|
||||
<link rel="stylesheet" crossorigin href="./assets/styles-DNToM_5G.css">
|
||||
<link rel="stylesheet" crossorigin href="./assets/main-C8AfvBIm.css">
|
||||
<link rel="modulepreload" crossorigin href="./assets/styles-YQqUhjjA.js">
|
||||
<link rel="stylesheet" crossorigin href="./assets/styles-DYHYQLTQ.css">
|
||||
<link rel="stylesheet" crossorigin href="./assets/main-xlut82Hd.css">
|
||||
|
||||
|
||||
|
||||
<style type="text/css">
|
||||
.f-grid-row.red {
|
||||
@@ -36,8 +38,9 @@
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<input id="hdpdfurl" type="hidden" value="<%=URL %>"/>
|
||||
<input id="hdjoinInfo" type="hidden" runat="server"/>
|
||||
<input id="hdjoinInfo" type="hidden" runat="server"/>
|
||||
<input id="hdworkRecord" type="hidden" runat="server"/>
|
||||
<input id="annotionData" type="hidden" runat="server"/>
|
||||
<input id="imgurl1" type="hidden" value="">
|
||||
<input id="imgurl2"type="hidden" value="">
|
||||
|
||||
|
||||
@@ -77,7 +77,10 @@ namespace FineUIPro.Web.HJGL.JoinMarking
|
||||
ISO_ID = Request.Params["ISO_ID"];
|
||||
FileId = Request.Params["FileId"];
|
||||
URL = Funs.SGGLUrl + Request.Params["pdfurl"];
|
||||
this.IsPDMS = "0";
|
||||
//hdjoinInfo.Value = "{\r\n \"version\": \"1.0\",\r\n \"exportDate\": \"2026-07-14T08:14:00.657Z\",\r\n \"sourceFile\": \"12026071310111.pdf\",\r\n \"globalSettings\": {\r\n \"startNumber\": 1,\r\n \"increment\": 1,\r\n \"prefix\": \"\",\r\n \"suffix\": \"\",\r\n \"fontSize\": 10,\r\n \"borderStyle\": \"none\",\r\n \"annotationStyle\": \"circle-outline\"\r\n },\r\n \"annotations\": {\r\n \"1\": [\r\n {\r\n \"x\": 383.8159484863281,\r\n \"y\": 306.50694274902344,\r\n \"x2\": 333.8159484863281,\r\n \"y2\": 356.50694274902344,\r\n \"displayValue\": 1,\r\n \"label\": \"1\",\r\n \"style\": \"none\",\r\n \"annotationStyle\": \"circle-outline\"\r\n },\r\n {\r\n \"x\": 424.8159484863281,\r\n \"y\": 324.50694274902344,\r\n \"x2\": 374.8159484863281,\r\n \"y2\": 374.50694274902344,\r\n \"displayValue\": 2,\r\n \"label\": \"2\",\r\n \"style\": \"none\",\r\n \"annotationStyle\": \"circle-outline\"\r\n },\r\n {\r\n \"x\": 483.8159484863281,\r\n \"y\": 358.50694274902344,\r\n \"x2\": 433.8159484863281,\r\n \"y2\": 408.50694274902344,\r\n \"displayValue\": 3,\r\n \"label\": \"3\",\r\n \"style\": \"none\",\r\n \"annotationStyle\": \"circle-outline\"\r\n }\r\n ]\r\n }\r\n}";
|
||||
//hdworkRecord.Value = "{\r\n \"version\": \"1.0\",\r\n \"exportDate\": \"2026-07-14T08:14:00.657Z\",\r\n \"sourceFile\": \"12026071310111.pdf\",\r\n \"globalSettings\": {\r\n \"startNumber\": 1,\r\n \"increment\": 1,\r\n \"prefix\": \"\",\r\n \"suffix\": \"\",\r\n \"fontSize\": 10,\r\n \"borderStyle\": \"none\",\r\n \"annotationStyle\": \"circle-outline\"\r\n },\r\n \"annotations\": {\r\n \"1\": [\r\n {\r\n \"x\": 383.8159484863281,\r\n \"y\": 306.50694274902344,\r\n \"x2\": 333.8159484863281,\r\n \"y2\": 356.50694274902344,\r\n \"displayValue\": 1,\r\n \"label\": \"1\",\r\n \"style\": \"none\",\r\n \"annotationStyle\": \"circle-outline\"\r\n },\r\n {\r\n \"x\": 424.8159484863281,\r\n \"y\": 324.50694274902344,\r\n \"x2\": 374.8159484863281,\r\n \"y2\": 374.50694274902344,\r\n \"displayValue\": 2,\r\n \"label\": \"2\",\r\n \"style\": \"none\",\r\n \"annotationStyle\": \"circle-outline\"\r\n },\r\n {\r\n \"x\": 483.8159484863281,\r\n \"y\": 358.50694274902344,\r\n \"x2\": 433.8159484863281,\r\n \"y2\": 408.50694274902344,\r\n \"displayValue\": 3,\r\n \"label\": \"3\",\r\n \"style\": \"none\",\r\n \"annotationStyle\": \"circle-outline\"\r\n }\r\n ]\r\n }\r\n}";
|
||||
//annotionData.Value = "{\r\n \"version\": \"1.0\",\r\n \"exportDate\": \"2026-07-14T08:14:00.657Z\",\r\n \"sourceFile\": \"12026071310111.pdf\",\r\n \"globalSettings\": {\r\n \"startNumber\": 1,\r\n \"increment\": 1,\r\n \"prefix\": \"\",\r\n \"suffix\": \"\",\r\n \"fontSize\": 10,\r\n \"borderStyle\": \"none\",\r\n \"annotationStyle\": \"circle-outline\"\r\n },\r\n \"annotations\": {\r\n \"1\": [\r\n {\r\n \"x\": 383.8159484863281,\r\n \"y\": 306.50694274902344,\r\n \"x2\": 333.8159484863281,\r\n \"y2\": 356.50694274902344,\r\n \"displayValue\": 1,\r\n \"label\": \"1\",\r\n \"style\": \"none\",\r\n \"annotationStyle\": \"circle-outline\"\r\n },\r\n {\r\n \"x\": 424.8159484863281,\r\n \"y\": 324.50694274902344,\r\n \"x2\": 374.8159484863281,\r\n \"y2\": 374.50694274902344,\r\n \"displayValue\": 2,\r\n \"label\": \"2\",\r\n \"style\": \"none\",\r\n \"annotationStyle\": \"circle-outline\"\r\n },\r\n {\r\n \"x\": 483.8159484863281,\r\n \"y\": 358.50694274902344,\r\n \"x2\": 433.8159484863281,\r\n \"y2\": 408.50694274902344,\r\n \"displayValue\": 3,\r\n \"label\": \"3\",\r\n \"style\": \"none\",\r\n \"annotationStyle\": \"circle-outline\"\r\n }\r\n ]\r\n }\r\n}";
|
||||
this.IsPDMS = "0";
|
||||
if (!WeldJointlist.ContainsKey(CurrUser.PersonId))
|
||||
{
|
||||
WeldJointlist.Add(CurrUser.PersonId, new List<Model.HJGL_WeldJoint>());
|
||||
|
||||
@@ -41,6 +41,15 @@ namespace FineUIPro.Web.HJGL.JoinMarking
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlInputHidden hdworkRecord;
|
||||
|
||||
/// <summary>
|
||||
/// annotionData 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlInputHidden annotionData;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
.menu-item[data-v-af288edf]:hover{background-color:#f3f4f6!important}.annotation-detail-panel[data-v-af288edf]{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;margin-bottom:16px;overflow:hidden}.panel-header[data-v-af288edf]{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;background:#334155;color:#fff}.close-btn[data-v-af288edf]{background:transparent;border:none;color:#fff;font-size:18px;cursor:pointer;padding:0 4px;line-height:1}.close-btn[data-v-af288edf]:hover{color:#fca5a5}.detail-content[data-v-af288edf]{padding:12px}.detail-row[data-v-af288edf]{display:flex;align-items:center;gap:8px;margin-bottom:10px}.detail-row label[data-v-af288edf]{min-width:70px;font-size:12px;color:#64748b}.detail-row.readonly[data-v-af288edf]{color:#94a3b8;font-size:12px}.detail-row.readonly span[data-v-af288edf]{color:#475569}.label-preview[data-v-af288edf]{flex:1;padding:6px 10px;background:#1e293b;color:#f1f5f9;border-radius:4px;font-family:monospace;font-size:13px;text-align:center}.detail-input[data-v-af288edf]{flex:1;padding:6px 8px;border:1px solid #d1d5db;border-radius:4px;font-size:12px}.detail-input[data-v-af288edf]:focus{outline:none;border-color:#3b82f6;box-shadow:0 0 0 2px #3b82f633}.detail-textarea[data-v-af288edf]{flex:1;padding:6px 8px;border:1px solid #d1d5db;border-radius:4px;font-size:12px;min-height:60px;resize:vertical;font-family:inherit}.detail-textarea[data-v-af288edf]:focus{outline:none;border-color:#3b82f6;box-shadow:0 0 0 2px #3b82f633}.detail-divider[data-v-af288edf]{height:1px;background:#e2e8f0;margin:12px 0}.detail-actions[data-v-af288edf]{display:flex;gap:8px;margin-top:12px}.detail-actions .btn-primary[data-v-af288edf]{flex:1;padding:8px;background:#3b82f6;color:#fff;border:none;border-radius:4px;cursor:pointer;font-size:12px}.detail-actions .btn-primary[data-v-af288edf]:hover{background:#2563eb}.detail-actions .btn-danger[data-v-af288edf]{padding:8px 12px;background:#fee2e2;color:#dc2626;border:1px solid #fecaca;border-radius:4px;cursor:pointer;font-size:12px}.detail-actions .btn-danger[data-v-af288edf]:hover{background:#fecaca}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,229 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Vue PDF Viewer</title>
|
||||
<script type="module" crossorigin src="/assets/main-mwM84Mwh.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="/assets/pdf-lib-AfLQbX6n.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/pdfjs-DXqArq6h.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/styles-YQqUhjjA.js">
|
||||
<link rel="stylesheet" crossorigin href="/assets/styles-DYHYQLTQ.css">
|
||||
<link rel="stylesheet" crossorigin href="/assets/main-xlut82Hd.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<!-- <input id="hdpdfurl" value="https://equipmentcheck.oss-cn-beijing.aliyuncs.com/03DR-003A-12-C1R_Sht_1.PDF">
|
||||
<input id="imgurl1" value="https://equipmentcheck.oss-cn-beijing.aliyuncs.com/Screenshots/%E5%B1%8F%E5%B9%95%E6%88%AA%E5%9B%BE%202026-01-12%20110935.png">
|
||||
<input id="imgurl2" value="https://equipmentcheck.oss-cn-beijing.aliyuncs.com/Screenshots/%E5%B1%8F%E5%B9%95%E6%88%AA%E5%9B%BE%202026-02-08%20132814.png"> -->
|
||||
<!--
|
||||
<input id="annotionData" value='{
|
||||
"version": "1.0",
|
||||
"exportDate": "2026-07-14T09:15:11.489Z",
|
||||
"sourceFile": "03DR-003A-12-C1R_Sht_1.pdf",
|
||||
"globalSettings": {
|
||||
"startNumber": 1,
|
||||
"increment": 1,
|
||||
"prefix": "",
|
||||
"suffix": "",
|
||||
"fontSize": 10,
|
||||
"borderStyle": "none",
|
||||
"annotationStyle": "circle-outline"
|
||||
},
|
||||
"annotations": {
|
||||
"1": [
|
||||
{
|
||||
"x": 202,
|
||||
"y": 115,
|
||||
"x2": 152,
|
||||
"y2": 165,
|
||||
"displayValue": 1,
|
||||
"label": "1",
|
||||
"style": "none",
|
||||
"annotationStyle": "circle-outline"
|
||||
},
|
||||
{
|
||||
"x": 215,
|
||||
"y": 339,
|
||||
"x2": 165,
|
||||
"y2": 389,
|
||||
"displayValue": 2,
|
||||
"label": "2",
|
||||
"style": "none",
|
||||
"annotationStyle": "circle-outline"
|
||||
},
|
||||
{
|
||||
"x": 361,
|
||||
"y": 231,
|
||||
"x2": 311,
|
||||
"y2": 281,
|
||||
"displayValue": 3,
|
||||
"label": "3",
|
||||
"style": "none",
|
||||
"annotationStyle": "circle-outline"
|
||||
},
|
||||
{
|
||||
"x": 190,
|
||||
"y": 254,
|
||||
"x2": 140,
|
||||
"y2": 304,
|
||||
"displayValue": 4,
|
||||
"label": "4",
|
||||
"style": "none",
|
||||
"annotationStyle": "circle-outline"
|
||||
},
|
||||
{
|
||||
"x": 327,
|
||||
"y": 357,
|
||||
"x2": 277,
|
||||
"y2": 407,
|
||||
"displayValue": 5,
|
||||
"label": "5",
|
||||
"style": "none",
|
||||
"annotationStyle": "circle-outline"
|
||||
},
|
||||
{
|
||||
"x": 451,
|
||||
"y": 291,
|
||||
"x2": 401,
|
||||
"y2": 341,
|
||||
"displayValue": 6,
|
||||
"label": "6",
|
||||
"style": "none",
|
||||
"annotationStyle": "circle-outline"
|
||||
},
|
||||
{
|
||||
"x": 370,
|
||||
"y": 176,
|
||||
"x2": 320,
|
||||
"y2": 226,
|
||||
"displayValue": 7,
|
||||
"label": "7",
|
||||
"style": "none",
|
||||
"annotationStyle": "circle-outline"
|
||||
},
|
||||
{
|
||||
"x": 380,
|
||||
"y": 119,
|
||||
"x2": 330,
|
||||
"y2": 169,
|
||||
"displayValue": 8,
|
||||
"label": "8",
|
||||
"style": "none",
|
||||
"annotationStyle": "circle-outline"
|
||||
},
|
||||
{
|
||||
"x": 307,
|
||||
"y": 237,
|
||||
"x2": 257,
|
||||
"y2": 287,
|
||||
"displayValue": 9,
|
||||
"label": "9",
|
||||
"style": "none",
|
||||
"annotationStyle": "circle-outline"
|
||||
},
|
||||
{
|
||||
"x": 327,
|
||||
"y": 298,
|
||||
"x2": 277,
|
||||
"y2": 348,
|
||||
"displayValue": 10,
|
||||
"label": "10",
|
||||
"style": "none",
|
||||
"annotationStyle": "circle-outline"
|
||||
},
|
||||
{
|
||||
"x": 323,
|
||||
"y": 167,
|
||||
"x2": 273,
|
||||
"y2": 217,
|
||||
"displayValue": 11,
|
||||
"label": "11",
|
||||
"style": "none",
|
||||
"annotationStyle": "circle-outline"
|
||||
},
|
||||
{
|
||||
"x": 358,
|
||||
"y": 55,
|
||||
"x2": 308,
|
||||
"y2": 105,
|
||||
"displayValue": 12,
|
||||
"label": "12",
|
||||
"style": "none",
|
||||
"annotationStyle": "circle-outline"
|
||||
},
|
||||
{
|
||||
"x": 299,
|
||||
"y": 111,
|
||||
"x2": 249,
|
||||
"y2": 161,
|
||||
"displayValue": 13,
|
||||
"label": "13",
|
||||
"style": "none",
|
||||
"annotationStyle": "circle-outline"
|
||||
},
|
||||
{
|
||||
"x": 293,
|
||||
"y": 71,
|
||||
"x2": 243,
|
||||
"y2": 121,
|
||||
"displayValue": 14,
|
||||
"label": "14",
|
||||
"style": "none",
|
||||
"annotationStyle": "circle-outline"
|
||||
},
|
||||
{
|
||||
"x": 275,
|
||||
"y": 180,
|
||||
"x2": 225,
|
||||
"y2": 230,
|
||||
"displayValue": 15,
|
||||
"label": "15",
|
||||
"style": "none",
|
||||
"annotationStyle": "circle-outline"
|
||||
},
|
||||
{
|
||||
"x": 179,
|
||||
"y": 157,
|
||||
"x2": 129,
|
||||
"y2": 207,
|
||||
"displayValue": 16,
|
||||
"label": "16",
|
||||
"style": "none",
|
||||
"annotationStyle": "circle-outline"
|
||||
},
|
||||
{
|
||||
"x": 189,
|
||||
"y": 59,
|
||||
"x2": 139,
|
||||
"y2": 109,
|
||||
"displayValue": 17,
|
||||
"label": "17",
|
||||
"style": "none",
|
||||
"annotationStyle": "circle-outline"
|
||||
},
|
||||
{
|
||||
"x": 293,
|
||||
"y": 39,
|
||||
"x2": 243,
|
||||
"y2": 89,
|
||||
"displayValue": 18,
|
||||
"label": "18",
|
||||
"style": "none",
|
||||
"annotationStyle": "circle-outline"
|
||||
},
|
||||
{
|
||||
"x": 209,
|
||||
"y": 72,
|
||||
"x2": 159,
|
||||
"y2": 122,
|
||||
"displayValue": 19,
|
||||
"label": "19",
|
||||
"style": "none",
|
||||
"annotationStyle": "circle-outline"
|
||||
}
|
||||
]
|
||||
}
|
||||
}'> -->
|
||||
|
||||
</body>
|
||||
@@ -0,0 +1,23 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>PDF 预览</title>
|
||||
<script type="module" crossorigin src="/assets/viewer-DS99NKTs.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="/assets/pdf-lib-AfLQbX6n.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/pdfjs-DXqArq6h.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/styles-YQqUhjjA.js">
|
||||
<link rel="stylesheet" crossorigin href="/assets/styles-DYHYQLTQ.css">
|
||||
<link rel="stylesheet" crossorigin href="/assets/viewer-BilNgxa5.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<input id="hdpdfurl" value="https://equipmentcheck.oss-cn-beijing.aliyuncs.com/03DR-003A-12-C1R_Sht_1.PDF">
|
||||
<input id="imgurl1" value="https://equipmentcheck.oss-cn-beijing.aliyuncs.com/Screenshots/%E5%B1%8F%E5%B9%95%E6%88%AA%E5%9B%BE%202026-01-12%20110935.png">
|
||||
<input id="imgurl2" value="https://equipmentcheck.oss-cn-beijing.aliyuncs.com/Screenshots/%E5%B1%8F%E5%B9%95%E6%88%AA%E5%9B%BE%202026-02-08%20132814.png">
|
||||
<input id="orgname" value="中石化十六有限公司">
|
||||
|
||||
<input id="annotionData" value='[{"JOT_ID":"a1b2c3d4-1111-4000-a000-000000000001","JOT_JointNo":"GB1XX","WED_Code":"W001","JOT_Location":"1G","JOT_WeldDate":"2026-02-01","DetectionTypeCode":"RT","IsRepair":"否","IsHotProcess":"否","x":"50","y":"159.67","x2":"235","y2":"134.67","JOT_JointStatus":"正常"},{"JOT_ID":"a1b2c3d4-2222-4000-a000-000000000002","JOT_JointNo":"GB2XX","WED_Code":"W001","JOT_Location":"2G","JOT_WeldDate":"2026-02-02","DetectionTypeCode":"UT","IsRepair":"否","IsHotProcess":"是","x":"78","y":"203.67","x2":"248","y2":"159.67","JOT_JointStatus":"正常"},{"JOT_ID":"a1b2c3d4-3333-4000-a000-000000000003","JOT_JointNo":"GB3XX","WED_Code":"W002","JOT_Location":"5G","JOT_WeldDate":"2026-02-03","DetectionTypeCode":"RT","IsRepair":"是","IsHotProcess":"否","x":"67","y":"273.67","x2":"290","y2":"203.67","JOT_JointStatus":"返修"},{"JOT_ID":"a1b2c3d4-4444-4000-a000-000000000004","JOT_JointNo":"GB4XX","WED_Code":"W002","JOT_Location":"6G","JOT_WeldDate":"2026-02-03","DetectionTypeCode":"MT","IsRepair":"否","IsHotProcess":"是","x":"91","y":"346.67","x2":"302","y2":"246.67","JOT_JointStatus":"正常"},{"JOT_ID":"a1b2c3d4-5555-4000-a000-000000000005","JOT_JointNo":"GB5XX","WED_Code":"W003","JOT_Location":"1G","JOT_WeldDate":"2026-02-04","DetectionTypeCode":"RT","IsRepair":"是","IsHotProcess":"否","x":"86","y":"411.67","x2":"303","y2":"321.67","JOT_JointStatus":"返修"},{"JOT_ID":"a1b2c3d4-6666-4000-a000-000000000006","JOT_JointNo":"GB6XX","WED_Code":"W003","JOT_Location":"2G","JOT_WeldDate":"2026-02-05","DetectionTypeCode":"UT","IsRepair":"否","IsHotProcess":"否","x":"98","y":"492.67","x2":"302","y2":"405.67","JOT_JointStatus":"正常"},{"JOT_ID":"a1b2c3d4-7777-4000-a000-000000000007","JOT_JointNo":"GB7XX","WED_Code":"W004","JOT_Location":"5G","JOT_WeldDate":"2026-02-06","DetectionTypeCode":"PT","IsRepair":"是","IsHotProcess":"是","x":"139","y":"563.67","x2":"399","y2":"415.67","JOT_JointStatus":"返修"},{"JOT_ID":"a1b2c3d4-8888-4000-a000-000000000008","JOT_JointNo":"GB8XX","WED_Code":"W004","JOT_Location":"6G","JOT_WeldDate":"2026-02-07","DetectionTypeCode":"RT","IsRepair":"否","IsHotProcess":"否","x":"195","y":"599.67","x2":"439","y2":"459.67","JOT_JointStatus":"正常"}]' >
|
||||
|
||||
</body>
|
||||
@@ -530,8 +530,11 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
.Select(x => x.WeldJointId)
|
||||
.Distinct()
|
||||
.ToList();
|
||||
var reportWeldJointIds = Funs.DB.HJGL_WeldJoint
|
||||
.Where(x => weldJointIds.Contains(x.WeldJointId)&& x.WeldingDailyId !=null)
|
||||
.Select(x => x.WeldJointId).Distinct().ToList();
|
||||
return matchOutputs
|
||||
.Where(x => string.IsNullOrEmpty(x.WeldJointId) || !taskWeldJointIds.Contains(x.WeldJointId))
|
||||
.Where(x => string.IsNullOrEmpty(x.WeldJointId) || !taskWeldJointIds.Contains(x.WeldJointId) || reportWeldJointIds.Contains(x.WeldJointId))
|
||||
.ToList();
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<!-- https://go.microsoft.com/fwlink/?LinkID=208121. -->
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<DeleteExistingFiles>false</DeleteExistingFiles>
|
||||
<DeleteExistingFiles>true</DeleteExistingFiles>
|
||||
<ExcludeApp_Data>false</ExcludeApp_Data>
|
||||
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
|
||||
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
|
||||
@@ -11,5 +11,6 @@
|
||||
<PublishUrl>E:\Package\陕化建</PublishUrl>
|
||||
<WebPublishMethod>FileSystem</WebPublishMethod>
|
||||
<_TargetId>Folder</_TargetId>
|
||||
<SiteUrlToLaunchAfterPublish />
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -62,6 +62,8 @@
|
||||
<TreeNode id="43F92EA7-462F-41E6-8D8A-243C03A5317E" Text="信息查询" NavigateUrl=""><TreeNode id="A98C7295-5735-4C8A-9565-7635A9C5D258" Text="管线信息总览" NavigateUrl="HJGL/InfoQuery/PipelineQuery.aspx"></TreeNode>
|
||||
<TreeNode id="6B16D1D4-FBDA-4B2B-AE0A-B465C686C27D" Text="轴测图" NavigateUrl="HJGL/JoinMarking/JointShow.aspx"></TreeNode>
|
||||
<TreeNode id="F4275A19-A72E-448E-B0C1-07DB2FCEE224" Text="焊口台账总览" NavigateUrl="HJGL/InfoQuery/JointQuery.aspx"></TreeNode>
|
||||
<TreeNode id="E642C8A1-5D56-4A0C-89E2-304E0421D281" Text="管道材料信息总览" NavigateUrl="HJGL/InfoQuery/MaterialOverview.aspx"></TreeNode>
|
||||
<TreeNode id="B5DD3FA8-28F9-49F4-AF3E-9916A65A1C7F" Text="管长信息总览" NavigateUrl="HJGL/InfoQuery/PipeLengthOverview.aspx"></TreeNode>
|
||||
</TreeNode>
|
||||
<TreeNode id="D1B5A8B7-5D2A-4C51-9B7E-6A2F15B7F001" Text="焊前管理" NavigateUrl=""><TreeNode id="D1B5A8B7-5D2A-4C51-9B7E-6A2F15B7F002" Text="下料抽检记录台账" NavigateUrl="HJGL/PreWeld/CuttingCheck.aspx"></TreeNode>
|
||||
<TreeNode id="D1B5A8B7-5D2A-4C51-9B7E-6A2F15B7F003" Text="组对抽检列表台账" NavigateUrl="HJGL/PreWeld/FitupCheck.aspx"></TreeNode>
|
||||
@@ -103,4 +105,4 @@
|
||||
<TreeNode id="2C66A01D-B53F-46A1-89F0-30ED137C7498" Text="检测结果汇总" NavigateUrl="HJGL/WeldingReport/CheckResult.aspx"></TreeNode>
|
||||
<TreeNode id="6035E549-66FF-4B6D-989B-BE99C9EF5EB7" Text="焊接数据" NavigateUrl="ZHGL/DataSync/ProjectDataSync/Project_HJGLData_HJGL.aspx"></TreeNode>
|
||||
</TreeNode>
|
||||
</Tree>
|
||||
</Tree>
|
||||
|
||||
@@ -0,0 +1,175 @@
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Model
|
||||
{
|
||||
public class DrawingRecognitionResult
|
||||
{
|
||||
public DrawingRecognitionResult()
|
||||
{
|
||||
MaterialRows = new List<DrawingRecognitionMaterialRow>();
|
||||
PipeLengthRows = new List<DrawingRecognitionPipeLengthRow>();
|
||||
OtherRegions = new List<DrawingRecognitionOtherRegion>();
|
||||
DrawingInfo = new List<DrawingRecognitionInfoRow>();
|
||||
}
|
||||
|
||||
[JsonProperty("isSHJ")]
|
||||
public bool IsSHJ { get; set; }
|
||||
|
||||
[JsonProperty("material_rows")]
|
||||
public List<DrawingRecognitionMaterialRow> MaterialRows { get; set; }
|
||||
|
||||
[JsonProperty("table_rows_d")]
|
||||
public List<DrawingRecognitionPipeLengthRow> PipeLengthRows { get; set; }
|
||||
|
||||
[JsonProperty("other_regions")]
|
||||
public List<DrawingRecognitionOtherRegion> OtherRegions { get; set; }
|
||||
|
||||
[JsonProperty("drawing_info")]
|
||||
public List<DrawingRecognitionInfoRow> DrawingInfo { get; set; }
|
||||
}
|
||||
|
||||
public class DrawingRecognitionMaterialRow
|
||||
{
|
||||
[JsonProperty("id")]
|
||||
public string Id { get; set; }
|
||||
|
||||
[JsonProperty("page_no")]
|
||||
public int? PageNo { get; set; }
|
||||
|
||||
[JsonProperty("pipe_no")]
|
||||
public string PipeNo { get; set; }
|
||||
|
||||
[JsonProperty("drawing_number")]
|
||||
public string DrawingNumber { get; set; }
|
||||
|
||||
[JsonProperty("seq_no")]
|
||||
public string SeqNo { get; set; }
|
||||
|
||||
[JsonProperty("category")]
|
||||
public string Category { get; set; }
|
||||
|
||||
[JsonProperty("description")]
|
||||
public string Description { get; set; }
|
||||
|
||||
[JsonProperty("spec")]
|
||||
public string Spec { get; set; }
|
||||
|
||||
[JsonProperty("code")]
|
||||
public string Code { get; set; }
|
||||
|
||||
[JsonProperty("qty")]
|
||||
public string Qty { get; set; }
|
||||
|
||||
[JsonProperty("unit")]
|
||||
public string Unit { get; set; }
|
||||
|
||||
[JsonProperty("material")]
|
||||
public string Material { get; set; }
|
||||
|
||||
[JsonProperty("remark")]
|
||||
public string Remark { get; set; }
|
||||
}
|
||||
|
||||
public class DrawingRecognitionPipeLengthRow
|
||||
{
|
||||
[JsonProperty("id")]
|
||||
public string Id { get; set; }
|
||||
|
||||
[JsonProperty("page_no")]
|
||||
public int? PageNo { get; set; }
|
||||
|
||||
[JsonProperty("group_index")]
|
||||
public int? GroupIndex { get; set; }
|
||||
|
||||
[JsonProperty("pos_no")]
|
||||
public string PosNo { get; set; }
|
||||
|
||||
[JsonProperty("length_mm")]
|
||||
public string LengthMm { get; set; }
|
||||
|
||||
[JsonProperty("dn")]
|
||||
public string Dn { get; set; }
|
||||
}
|
||||
|
||||
public class DrawingRecognitionOtherRegion
|
||||
{
|
||||
[JsonProperty("id")]
|
||||
public string Id { get; set; }
|
||||
|
||||
[JsonProperty("region_type")]
|
||||
public string RegionType { get; set; }
|
||||
|
||||
[JsonProperty("region_code")]
|
||||
public string RegionCode { get; set; }
|
||||
|
||||
[JsonProperty("region_label")]
|
||||
public string RegionLabel { get; set; }
|
||||
|
||||
[JsonProperty("page")]
|
||||
public int? Page { get; set; }
|
||||
|
||||
[JsonProperty("text")]
|
||||
public string Text { get; set; }
|
||||
}
|
||||
|
||||
public class DrawingRecognitionInfoRow
|
||||
{
|
||||
[JsonProperty("id")]
|
||||
public string Id { get; set; }
|
||||
|
||||
[JsonProperty("page_no")]
|
||||
public int? PageNo { get; set; }
|
||||
|
||||
[JsonProperty("row_no")]
|
||||
public int? RowNo { get; set; }
|
||||
|
||||
[JsonProperty("field_name")]
|
||||
public string FieldName { get; set; }
|
||||
|
||||
[JsonProperty("field_value")]
|
||||
public string FieldValue { get; set; }
|
||||
|
||||
[JsonProperty("drawing_number")]
|
||||
public string DrawingNumber { get; set; }
|
||||
|
||||
[JsonProperty("pipeline_id")]
|
||||
public string PipelineId { get; set; }
|
||||
|
||||
[JsonProperty("operation_pressure_mpa")]
|
||||
public string OperationPressureMpa { get; set; }
|
||||
|
||||
[JsonProperty("operation_temp_c")]
|
||||
public string OperationTempC { get; set; }
|
||||
|
||||
[JsonProperty("design_pressure_mpa")]
|
||||
public string DesignPressureMpa { get; set; }
|
||||
|
||||
[JsonProperty("design_temp_c")]
|
||||
public string DesignTempC { get; set; }
|
||||
|
||||
[JsonProperty("test_pressure_mpa")]
|
||||
public string TestPressureMpa { get; set; }
|
||||
|
||||
[JsonProperty("hydraulic_test_pressure")]
|
||||
public string HydraulicTestPressure { get; set; }
|
||||
|
||||
[JsonProperty("pipe_diameter_dn")]
|
||||
public string PipeDiameterDn { get; set; }
|
||||
|
||||
[JsonProperty("pipe_spec_grade")]
|
||||
public string PipeSpecGrade { get; set; }
|
||||
|
||||
[JsonProperty("heat_insulation")]
|
||||
public string HeatInsulation { get; set; }
|
||||
|
||||
[JsonProperty("insulation_thickness_mm")]
|
||||
public string InsulationThicknessMm { get; set; }
|
||||
|
||||
[JsonProperty("post_weld_heat_treatment")]
|
||||
public string PostWeldHeatTreatment { get; set; }
|
||||
|
||||
[JsonProperty("radiographic_examination")]
|
||||
public string RadiographicExamination { get; set; }
|
||||
}
|
||||
}
|
||||
+28
-4
@@ -97345,7 +97345,7 @@ namespace Model
|
||||
|
||||
private string _Id;
|
||||
|
||||
private System.Nullable<int> _Pipe_no;
|
||||
private string _Pipe_no;
|
||||
|
||||
private System.Nullable<int> _Pipe_page_no;
|
||||
|
||||
@@ -97363,7 +97363,7 @@ namespace Model
|
||||
partial void OnCreated();
|
||||
partial void OnIdChanging(string value);
|
||||
partial void OnIdChanged();
|
||||
partial void OnPipe_noChanging(System.Nullable<int> value);
|
||||
partial void OnPipe_noChanging(string value);
|
||||
partial void OnPipe_noChanged();
|
||||
partial void OnPipe_page_noChanging(System.Nullable<int> value);
|
||||
partial void OnPipe_page_noChanged();
|
||||
@@ -97402,8 +97402,8 @@ namespace Model
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Name="pipe_no", Storage="_Pipe_no", DbType="Int")]
|
||||
public System.Nullable<int> Pipe_no
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Name="pipe_no", Storage="_Pipe_no", DbType="NVarChar(200)")]
|
||||
public string Pipe_no
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -104728,6 +104728,8 @@ namespace Model
|
||||
|
||||
private string _PaintId;
|
||||
|
||||
private System.Nullable<bool> _DesignIsHotProess;
|
||||
|
||||
private EntityRef<Base_TestMedium> _Base_TestMedium;
|
||||
|
||||
private EntitySet<HJGL_Batch_PointBatch> _HJGL_Batch_PointBatch;
|
||||
@@ -104834,6 +104836,8 @@ namespace Model
|
||||
partial void OnWarehouseIdChanged();
|
||||
partial void OnPaintIdChanging(string value);
|
||||
partial void OnPaintIdChanged();
|
||||
partial void OnDesignIsHotProessChanging(System.Nullable<bool> value);
|
||||
partial void OnDesignIsHotProessChanged();
|
||||
#endregion
|
||||
|
||||
public HJGL_Pipeline()
|
||||
@@ -105589,6 +105593,26 @@ namespace Model
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DesignIsHotProess", DbType="Bit")]
|
||||
public System.Nullable<bool> DesignIsHotProess
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._DesignIsHotProess;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._DesignIsHotProess != value))
|
||||
{
|
||||
this.OnDesignIsHotProessChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._DesignIsHotProess = value;
|
||||
this.SendPropertyChanged("DesignIsHotProess");
|
||||
this.OnDesignIsHotProessChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_[HJGL_Pipeline_Base_TestMedium1", Storage="_Base_TestMedium", ThisKey="LeakMedium", OtherKey="TestMediumId", IsForeignKey=true)]
|
||||
public Base_TestMedium Base_TestMedium
|
||||
{
|
||||
|
||||
@@ -253,6 +253,7 @@
|
||||
<Compile Include="HJGL\3DParameter.cs" />
|
||||
<Compile Include="HJGL\BaseInfo\BaseMaterialcolorDataIn.cs" />
|
||||
<Compile Include="HJGL\BaseInfo\BaseMaterialcolorOutput.cs" />
|
||||
<Compile Include="HJGL\DataImport\DrawingRecognitionResult.cs" />
|
||||
<Compile Include="HJGL\MaterialCodeLibBarCodeOutput.cs" />
|
||||
<Compile Include="HJGL\PreDesign\Material\MaterialStockItem.cs" />
|
||||
<Compile Include="APIItem\HJGL\PackagingManageItem.cs" />
|
||||
@@ -337,4 +338,4 @@
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user