From 14720f7196b072cf451e20b1ef81446321afccce Mon Sep 17 00:00:00 2001
From: 10191 <506754232@qq.com>
Date: Sat, 18 Apr 2026 18:51:21 +0800
Subject: [PATCH] 1
---
DataBase/版本日志/HJGLDB_DS_2026-04-18_lc.sql | 6 +
HJGL_DS/BLL/HJGL/DataIn/DataInTempService.cs | 56 ++
HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj | 33 +-
.../HJGL/JoinMarking/JoinMarking.aspx.cs | 30 +-
.../HJGL/JoinMarking/JointShow.aspx.cs | 291 +-------
.../HJGL/JoinMarking/PDFMarking.aspx.cs | 633 +++++++++---------
.../HJGL/JoinMarking/PDFShow.aspx.cs | 20 +-
7 files changed, 444 insertions(+), 625 deletions(-)
create mode 100644 DataBase/版本日志/HJGLDB_DS_2026-04-18_lc.sql
diff --git a/DataBase/版本日志/HJGLDB_DS_2026-04-18_lc.sql b/DataBase/版本日志/HJGLDB_DS_2026-04-18_lc.sql
new file mode 100644
index 0000000..795d19b
--- /dev/null
+++ b/DataBase/版本日志/HJGLDB_DS_2026-04-18_lc.sql
@@ -0,0 +1,6 @@
+Alter TABLE [dbo].[HJGL_PW_JointInfo] add
+ [AttachSourceId] [nvarchar](50) NULL,
+ [x] [nvarchar](50) NULL,
+ [y] [nvarchar](50) NULL,
+ [x2] [nvarchar](50) NULL,
+ [y2] [nvarchar]
diff --git a/HJGL_DS/BLL/HJGL/DataIn/DataInTempService.cs b/HJGL_DS/BLL/HJGL/DataIn/DataInTempService.cs
index ae0f20a..3001075 100644
--- a/HJGL_DS/BLL/HJGL/DataIn/DataInTempService.cs
+++ b/HJGL_DS/BLL/HJGL/DataIn/DataInTempService.cs
@@ -10,6 +10,7 @@
using System.Web.UI.WebControls;
using Model;
using BLL;
+ using System.Collections.Generic;
public static class DataInTempService
{
@@ -27,6 +28,60 @@
/// 增加导入临时表记录
///
/// 委托实体
+ public static void AddDataInTemp(ListdataInTemps)
+ {
+ Model.SGGLDB db = Funs.DB;
+ foreach (var dataInTemp in dataInTemps)
+ {
+ Model.HJGL_Sys_DataInTemp newDataInTemp = new Model.HJGL_Sys_DataInTemp();
+ newDataInTemp.TempId = dataInTemp.TempId;
+ newDataInTemp.ProjectId = dataInTemp.ProjectId;
+ newDataInTemp.UserId = dataInTemp.UserId;
+ newDataInTemp.Time = dataInTemp.Time;
+ newDataInTemp.RowNo = dataInTemp.RowNo;
+ newDataInTemp.Type = dataInTemp.Type;
+ newDataInTemp.Value1 = dataInTemp.Value1;
+ newDataInTemp.Value2 = dataInTemp.Value2;
+ newDataInTemp.Value3 = dataInTemp.Value3;
+ newDataInTemp.Value4 = dataInTemp.Value4;
+ newDataInTemp.Value5 = dataInTemp.Value5;
+ newDataInTemp.Value6 = dataInTemp.Value6;
+ newDataInTemp.Value7 = dataInTemp.Value7;
+ newDataInTemp.Value8 = dataInTemp.Value8;
+ newDataInTemp.Value9 = dataInTemp.Value9;
+ newDataInTemp.Value10 = dataInTemp.Value10;
+ newDataInTemp.Value11 = dataInTemp.Value11;
+ newDataInTemp.Value12 = dataInTemp.Value12;
+ newDataInTemp.Value13 = dataInTemp.Value13;
+ newDataInTemp.Value14 = dataInTemp.Value14;
+ newDataInTemp.Value15 = dataInTemp.Value15;
+ newDataInTemp.Value16 = dataInTemp.Value16;
+ newDataInTemp.Value17 = dataInTemp.Value17;
+ newDataInTemp.Value18 = dataInTemp.Value18;
+ newDataInTemp.Value19 = dataInTemp.Value19;
+ newDataInTemp.Value20 = dataInTemp.Value20;
+ newDataInTemp.Value21 = dataInTemp.Value21;
+ newDataInTemp.Value22 = dataInTemp.Value22;
+ newDataInTemp.Value23 = dataInTemp.Value23;
+ newDataInTemp.Value24 = dataInTemp.Value24;
+ newDataInTemp.Value25 = dataInTemp.Value25;
+ newDataInTemp.Value26 = dataInTemp.Value26;
+ newDataInTemp.Value27 = dataInTemp.Value27;
+ newDataInTemp.Value28 = dataInTemp.Value28;
+ newDataInTemp.Value29 = dataInTemp.Value29;
+ newDataInTemp.Value30 = dataInTemp.Value30;
+ newDataInTemp.Value31 = dataInTemp.Value31;
+ newDataInTemp.Value32 = dataInTemp.Value32;
+ newDataInTemp.Value33 = dataInTemp.Value33;
+ newDataInTemp.Value34 = dataInTemp.Value34;
+ newDataInTemp.Value35 = dataInTemp.Value35;
+ newDataInTemp.ToopValue = dataInTemp.ToopValue;
+ db.HJGL_Sys_DataInTemp.InsertOnSubmit(newDataInTemp);
+ }
+
+ db.SubmitChanges();
+ }
+
public static void AddDataInTemp(Model.HJGL_Sys_DataInTemp dataInTemp)
{
Model.SGGLDB db = Funs.DB;
@@ -77,6 +132,7 @@
db.SubmitChanges();
}
+
///
/// 修改导入临时表记录
///
diff --git a/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj b/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj
index c7164e6..dd9fef3 100644
--- a/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj
+++ b/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj
@@ -1156,6 +1156,10 @@
+
+
+
+
@@ -5880,6 +5884,34 @@
RepairHotProessTrustEdit.aspx
+
+ JoinMarking.aspx
+ ASPXCodeBehind
+
+
+ JoinMarking.aspx
+
+
+ JointShow.aspx
+ ASPXCodeBehind
+
+
+ JointShow.aspx
+
+
+ PDFMarking.aspx
+ ASPXCodeBehind
+
+
+ PDFMarking.aspx
+
+
+ PDFShow.aspx
+ ASPXCodeBehind
+
+
+ PDFShow.aspx
+
InStorage.aspx
ASPXCodeBehind
@@ -8270,7 +8302,6 @@
-
diff --git a/HJGL_DS/FineUIPro.Web/HJGL/JoinMarking/JoinMarking.aspx.cs b/HJGL_DS/FineUIPro.Web/HJGL/JoinMarking/JoinMarking.aspx.cs
index 4355408..f2b5491 100644
--- a/HJGL_DS/FineUIPro.Web/HJGL/JoinMarking/JoinMarking.aspx.cs
+++ b/HJGL_DS/FineUIPro.Web/HJGL/JoinMarking/JoinMarking.aspx.cs
@@ -1,6 +1,5 @@
using BLL;
-using FineUIPro.Web.SysManage;
-using Microsoft.Office.Interop.Word;
+
using Model;
using Newtonsoft.Json.Linq;
using System;
@@ -100,21 +99,7 @@ namespace FineUIPro.Web.HJGL.JoinMarking
}
#endregion
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
#region 格式化字符串
///
@@ -126,7 +111,7 @@ namespace FineUIPro.Web.HJGL.JoinMarking
{
if (isoId != null)
{
- var sizeSum = (from x in Funs.DB.PW_JointInfo where x.ISO_ID == isoId.ToString() select x.JOT_Size).Sum();
+ var sizeSum = (from x in Funs.DB.HJGL_PW_JointInfo where x.ISO_ID == isoId.ToString() select x.JOT_Size).Sum();
if (sizeSum != null)
{
return sizeSum.ToString();
@@ -144,11 +129,10 @@ namespace FineUIPro.Web.HJGL.JoinMarking
{
if (isoId != null)
{
- var jotCount = (from x in Funs.DB.PW_JointInfo where x.ISO_ID == isoId.ToString() select x).Count();
- if (jotCount != null)
- {
- return jotCount.ToString();
- }
+ var jotCount = (from x in Funs.DB.HJGL_PW_JointInfo where x.ISO_ID == isoId.ToString() select x).Count();
+
+ return jotCount.ToString();
+
}
return null;
}
diff --git a/HJGL_DS/FineUIPro.Web/HJGL/JoinMarking/JointShow.aspx.cs b/HJGL_DS/FineUIPro.Web/HJGL/JoinMarking/JointShow.aspx.cs
index 748299a..2057bb1 100644
--- a/HJGL_DS/FineUIPro.Web/HJGL/JoinMarking/JointShow.aspx.cs
+++ b/HJGL_DS/FineUIPro.Web/HJGL/JoinMarking/JointShow.aspx.cs
@@ -10,7 +10,6 @@ using System.IO;
using NPOI.XSSF.UserModel;
using NPOI.SS.UserModel;
using System.Runtime.Serialization;
-using FineUIPro.Web.ProjectData;
using System.Configuration;
namespace FineUIPro.Web.HJGL.JoinMarking
@@ -43,6 +42,7 @@ namespace FineUIPro.Web.HJGL.JoinMarking
}
#region 加载树装置-单位-工作区
+
///
/// 加载树
///
@@ -50,170 +50,36 @@ namespace FineUIPro.Web.HJGL.JoinMarking
{
this.tvControlItem.Nodes.Clear();
TreeNode rootNode = new TreeNode();
- rootNode.Text = Resources.Lan.T_REST_ASPXCS_303;
+ rootNode.Text = "管线列表";
rootNode.NodeID = "0";
rootNode.Expanded = true;
this.tvControlItem.Nodes.Add(rootNode);
- ////装置
- var pInstallation = (from x in Funs.DB.Project_Installation where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
- ////区域
- var pWorkArea = (from x in Funs.DB.ProjectData_WorkArea where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
- ////单位
- var pUnits = (from x in Funs.DB.Project_ProjectUnit where x.SysPermissions.Contains(Const.SysHJGL)&& x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
-
- var workAreaIdList = (from x in BLL.Funs.DB.PW_IsoInfo
- where x.ProjectId == this.CurrUser.LoginProjectId && x.ISO_IsoNo.Contains(this.txtIsono.Text.Trim())
- orderby x.ISO_IsoNo
- select x.WorkAreaId).Distinct().ToList();
- pWorkArea = pWorkArea.Where(x => workAreaIdList.Contains(x.WorkAreaId)).OrderBy(x => x.WorkAreaCode).ToList();
- pInstallation = (from x in pInstallation
- join y in pWorkArea on x.InstallationId equals y.InstallationId
- select x).Distinct().ToList();
- pUnits = (from x in pUnits
- join y in pWorkArea on x.UnitId equals y.UnitId
- select x).Distinct().ToList();
- this.BindNodes(rootNode, pInstallation, pWorkArea, pUnits);
+ var iso = from x in Funs.DB.HJGL_PW_IsoInfo where x.ProjectId == this.CurrUser.LoginProjectId select x;
+ if (!string.IsNullOrEmpty(this.txtIsono.Text))
+ {
+ iso = iso.Where(e => e.ISO_IsoNo.Contains(this.txtIsono.Text.Trim()));
+ }
+ iso = iso.OrderBy(x => x.ISO_IsoNo);
+ if (iso.Count() > 0)
+ {
+ foreach (var q in iso)
+ {
+ TreeNode newNode = new TreeNode();
+ newNode.NodeID = q.ISO_ID;
+ newNode.Text = q.ISO_IsoNo;
+ newNode.ToolTip = "管线";
+ newNode.EnableClickEvent = true;
+ rootNode.Nodes.Add(newNode);
+ }
+ }
}
- #endregion
-
- #region 绑定树节点
+ #endregion
+
#region 绑定树节点
///
/// 绑定树节点
///
///
- private void BindNodes(TreeNode node, List pInstallation, List pWorkArea, List pUnits)
- {
- if (string.IsNullOrEmpty(node.ToolTip))
- {
- List installations = pInstallation;
- var pUnit = pUnits.FirstOrDefault(x => x.UnitId == this.CurrUser.UnitId);
- if (pUnit != null && pUnit.UnitType != Const.ProjectUnitType_1 && pUnit.UnitType != Const.ProjectUnitType_5)
- {
- installations = (from x in pInstallation
- join y in pWorkArea on x.InstallationId equals y.InstallationId
- where y.UnitId == this.CurrUser.UnitId
- orderby x.InstallationId
- select x).Distinct().ToList();
- }
-
- foreach (var q in installations)
- {
- TreeNode newNode = new TreeNode();
- newNode.NodeID = q.InstallationId;
- newNode.Text = q.InstallationName;
- newNode.ToolTip = Resources.Lan.TCC_RE_CQMS_642;
- newNode.Expanded = true;
- node.Nodes.Add(newNode);
- this.BindNodes(newNode, pInstallation, pWorkArea, pUnits);
- }
- }
- else if (node.ToolTip == Resources.Lan.TCC_RE_CQMS_642)
- {
- List units = null;
- var pUnitDepth = pUnits.FirstOrDefault(x => x.UnitId == this.CurrUser.UnitId);
- if (pUnitDepth == null || pUnitDepth.UnitType == Const.ProjectUnitType_1 || pUnitDepth.UnitType == Const.ProjectUnitType_5)
- {
- var uids = Funs.DB.Project_ProjectUnit.Where(x => x.ProjectId == CurrUser.LoginProjectId && x.SysPermissions.Contains(Const.SysHJGL)).Select(x => x.UnitId).ToList();
- units = (from x in pUnits
- join y in pWorkArea on x.UnitId equals y.UnitId
- where y.InstallationId == node.NodeID && x.UnitType == Const.ProjectUnitType_2 && uids.Contains(x.UnitId)
- select x).ToList();
- }
- else
- {
- units = (from x in pUnits
- join y in pWorkArea on x.UnitId equals y.UnitId
- where y.InstallationId == node.NodeID && x.UnitType == Const.ProjectUnitType_2 && x.UnitId == this.CurrUser.UnitId
- select x).ToList();
- }
-
- units = units.OrderBy(x => x.InTime).Distinct().ToList();
- foreach (var q in units)
- {
- var unit = BLL.UnitService.GetUnitByUnitId(q.UnitId);
- if (unit != null)
- {
- TreeNode newNode = new TreeNode();
- newNode.Text = unit.UnitName;
- newNode.NodeID = q.UnitId + "|" + node.NodeID;
- newNode.ToolTip = Resources.Lan.TCC_RE_CQMS_304;
- node.Nodes.Add(newNode);
- this.BindNodes(newNode, pInstallation, pWorkArea, pUnits);
- }
- }
- }
- else if (node.ToolTip == Resources.Lan.TCC_RE_CQMS_304)
- {
- var workAreas = (from x in pWorkArea
- where x.InstallationId == node.ParentNode.NodeID && x.UnitId == node.NodeID.Split('|')[0]
- select x);
- workAreas = workAreas.OrderByDescending(x => x.WorkAreaCode);
-
- string strSql = @"select WorkAreaId,Is_Standard,COUNT(*) COUNT from PW_IsoInfo
- where ProjectId ='"+ this.CurrUser.LoginProjectId + @"' AND UnitId='"+ node.NodeID.Split('|')[0] + @"'
- group by WorkAreaId,Is_Standard";
-
- DataTable tb = SQLHelper.GetDataTableRunText(strSql, null);
- Dictionary dic = new Dictionary();
- if (tb != null)
- {
- foreach(DataRow item in tb.Rows)
- {
- dic.Add(item["WorkAreaId"].ToString()+ item["Is_Standard"].ToString(), item["COUNT"].ToString());
- }
- }
- foreach (var q in workAreas)
- {
- //int a = (from x in BLL.Funs.DB.PW_IsoInfo where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitId == node.NodeID.Split('|')[0] && x.WorkAreaId == q.WorkAreaId && x.Is_Standard == true select x).Count();
- TreeNode newNode1 = new TreeNode();
- if (dic.ContainsKey(q.WorkAreaId + "True"))
- {
- newNode1.Text = q.WorkAreaCode + "【" + dic[q.WorkAreaId + "True"] + Resources.Lan.ASPXSC_2431;
- }
- else
- {
- newNode1.Text = q.WorkAreaCode + Resources.Lan.T_REST_ASPXCS_395;
-
- }
- newNode1.NodeID = q.WorkAreaId + "_NoStandard";
- newNode1.EnableExpandEvent = true;
- newNode1.ToolTip = Resources.Lan.ASPXSC_2432;
- node.Nodes.Add(newNode1);
- // int b = (from x in BLL.Funs.DB.PW_IsoInfo where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitId == node.NodeID.Split('|')[0] && x.WorkAreaId == q.WorkAreaId && x.Is_Standard != true select x).Count();
- TreeNode newNode2 = new TreeNode();
- if (dic.ContainsKey(q.WorkAreaId + "False"))
- {
- newNode2.Text = q.WorkAreaCode + "【" + dic[q.WorkAreaId + "False"] + Resources.Lan.ASPXSC_2433;
- }
- else
- {
- newNode2.Text = q.WorkAreaCode + Resources.Lan.T_REST_ASPXCS_396;
-
- }
- newNode2.NodeID = q.WorkAreaId + "_Standard";
- newNode2.EnableExpandEvent = true;
- newNode2.ToolTip = Resources.Lan.ASPXSC_2434;
- node.Nodes.Add(newNode2);
- this.BindNodes(newNode1, pInstallation, pWorkArea, pUnits);
- this.BindNodes(newNode2, pInstallation, pWorkArea, pUnits);
- }
- }
- else if (node.ToolTip == Resources.Lan.ASPXSC_2432)
- {
- TreeNode newNode = new TreeNode();
- newNode.Text = Resources.Lan.ASPXSC_2435;
- newNode.NodeID = Resources.Lan.ASPXSC_2435;
- node.Nodes.Add(newNode);
- }
- else if (node.ToolTip == Resources.Lan.ASPXSC_2434)
- {
- TreeNode newNode = new TreeNode();
- newNode.Text = Resources.Lan.ASPXSC_2436;
- newNode.NodeID = Resources.Lan.ASPXSC_2436;
- node.Nodes.Add(newNode);
- }
- }
#endregion
#region 树展开事件
@@ -224,116 +90,9 @@ namespace FineUIPro.Web.HJGL.JoinMarking
///
protected void tvControlItem_TreeNodeExpanded(object sender, TreeNodeEventArgs e)
{
- if (e.Node.ToolTip == Resources.Lan.ASPXSC_2432)
- {
- e.Node.Nodes.Clear();
- List isoInfo = new List();
- isoInfo = (from x in BLL.Funs.DB.PW_IsoInfo
- where x.ProjectId == this.CurrUser.LoginProjectId && x.WorkAreaId == e.Node.NodeID.Split('_')[0] && x.Is_Standard == true
- && x.ISO_IsoNo.Contains(this.txtIsono.Text.Trim())
- orderby x.ISO_IsoNo
- select x).ToList();
- string strSql = @"select ISO_ID,COUNT(*) COUNT from PW_JointInfo
- where ProjectId ='" + this.CurrUser.LoginProjectId + @"' AND ISO_ID in('" + string.Join("','", isoInfo.Select(x => x.ISO_ID).ToList()) + @"')
- group by ISO_ID";
- DataTable tb = SQLHelper.GetDataTableRunText(strSql, null);
- Dictionary dic = new Dictionary();
- if (tb != null)
- {
- foreach (DataRow item in tb.Rows)
- {
- dic.Add(item["ISO_ID"].ToString(), item["COUNT"].ToString());
- }
- }
- foreach (var item in isoInfo)
- {
- // var jotCount = (from x in Funs.DB.PW_JointInfo where x.ISO_ID == item.ISO_ID select x).Count();
- TreeNode newNode = new TreeNode();
- if (!String.IsNullOrEmpty(item.ISO_Sheet))
- {
- newNode.Text = item.ISO_IsoNo + "(" + item.ISO_Sheet + ")";
- }
- else
- {
- newNode.Text = item.ISO_IsoNo;
- }
- if (dic.ContainsKey(item.ISO_IsoNo))
- {
- newNode.Text += "【" + dic[item.ISO_IsoNo] + Resources.Lan.ASPXSC_2437;
- }
- else
- {
- newNode.Text += Resources.Lan.T_REST_ASPXCS_397;
-
- }
- newNode.ToolTip = Resources.Lan.T_REST_ASPXCS_398;
- newNode.NodeID = item.ISO_ID;
- newNode.EnableExpandEvent = true;
- //newNode.EnableClickEvent = true;
- e.Node.Nodes.Add(newNode);
- TreeNode newNodeTemp = new TreeNode();
- newNodeTemp.NodeID = Guid.NewGuid().ToString();
- newNode.Nodes.Add(newNodeTemp);
- }
- }
- else if (e.Node.ToolTip == Resources.Lan.ASPXSC_2434)
- {
- e.Node.Nodes.Clear();
- List isoInfo = new List();
- isoInfo = (from x in BLL.Funs.DB.PW_IsoInfo
- where x.ProjectId == this.CurrUser.LoginProjectId && x.WorkAreaId == e.Node.NodeID.Split('_')[0] && x.Is_Standard == false
- && x.ISO_IsoNo.Contains(this.txtIsono.Text.Trim())
- orderby x.ISO_IsoNo
- select x).ToList();
- string strSql = @"select ISO_ID,COUNT(*) COUNT from PW_JointInfo
- where ProjectId ='" + this.CurrUser.LoginProjectId + @"' AND ISO_ID in('" + string.Join("','", isoInfo.Select(x => x.ISO_ID).ToList()) + @"')
- group by ISO_ID";
-
- DataTable tb = SQLHelper.GetDataTableRunText(strSql, null);
- Dictionary dic = new Dictionary();
- if (tb != null)
- {
- foreach (DataRow item in tb.Rows)
- {
- dic.Add(item["ISO_ID"].ToString(), item["COUNT"].ToString());
- }
- }
-
- foreach (var item in isoInfo)
- {
- var jotCount = (from x in Funs.DB.PW_JointInfo where x.ISO_ID == item.ISO_ID select x).Count();
- TreeNode newNode = new TreeNode();
- if (!String.IsNullOrEmpty(item.ISO_Sheet))
- {
- newNode.Text = item.ISO_IsoNo + "(" + item.ISO_Sheet + ")";
- }
- else
- {
- newNode.Text = item.ISO_IsoNo;
- }
- if (dic.ContainsKey(item.ISO_ID))
- {
- newNode.Text += "【" + dic[item.ISO_ID] + Resources.Lan.ASPXSC_2437;
- }
- else
- {
- newNode.Text += Resources.Lan.T_REST_ASPXCS_397;
-
- }
-
- newNode.ToolTip = Resources.Lan.T_REST_ASPXCS_398;
- newNode.NodeID = item.ISO_ID;
- newNode.EnableExpandEvent = true;
-
- //newNode.EnableClickEvent = true;
- e.Node.Nodes.Add(newNode);
- TreeNode newNodeTemp = new TreeNode();
- newNodeTemp.NodeID = Guid.NewGuid().ToString();
- newNode.Nodes.Add(newNodeTemp);
- }
- }
- else if (e.Node.ToolTip == Resources.Lan.T_REST_ASPXCS_398 )
+ e.Node.Nodes.Clear();
+ if (e.Node.ToolTip == "管线")
{
e.Node.Nodes.Clear();
var attach = AttachFileService.GetAttachFile(e.Node.NodeID, BLL.Const.HJGL_PipelineManageMenuId);
@@ -358,7 +117,7 @@ namespace FineUIPro.Web.HJGL.JoinMarking
}
}
#endregion
- #endregion
+
#region 点击TreeView
///
diff --git a/HJGL_DS/FineUIPro.Web/HJGL/JoinMarking/PDFMarking.aspx.cs b/HJGL_DS/FineUIPro.Web/HJGL/JoinMarking/PDFMarking.aspx.cs
index 8f5a305..231c30c 100644
--- a/HJGL_DS/FineUIPro.Web/HJGL/JoinMarking/PDFMarking.aspx.cs
+++ b/HJGL_DS/FineUIPro.Web/HJGL/JoinMarking/PDFMarking.aspx.cs
@@ -2,6 +2,7 @@
using BLL.Common;
using Newtonsoft.Json.Linq;
using NPOI.POIFS.Properties;
+using Org.BouncyCastle.Asn1.Tsp;
using System;
using System.Collections.Generic;
using System.Data;
@@ -71,7 +72,7 @@ namespace FineUIPro.Web.HJGL.JoinMarking
ISO_ID = Request.Params["ISO_ID"];
FileId = Request.Params["FileId"];
- URL = Funs. SGGLUrl + Request.Params["pdfurl"];
+ URL = Funs. HJGLUrl + Request.Params["pdfurl"];
this.IsPDMS = "0";
}
@@ -85,7 +86,7 @@ namespace FineUIPro.Web.HJGL.JoinMarking
string strSql = @"SELECT TempId,ProjectId,UserId,Time,RowNo,ToopValue,Value1,Value2,Value3,Value4,Value5,Value6,Value7,Value8,Value9,Value10"
+ @" ,Value11,Value12,Value13,Value14,Value15,Value16,Value17,Value18,Value19,Value20,Value21,Value22,Value23,Value24,Value25,Value26,Value27,Value28,Value29,Value30"
+ @" ,Value31,Value32,Value33,Value34,Value35,Value36,Value37,Value38,Value39,Value40,Value41,Value42,Value43,Value44,Value45,Value46,Value47,Value48,Value49,Value50,ToopValue,Type"
- + @" FROM Sys_DataInTemp "
+ + @" FROM HJGL_Sys_DataInTemp "
+ @" WHERE ProjectId=@ProjectId AND UserId=@UserId AND Type=@Type";
List listStr = new List();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
@@ -99,7 +100,7 @@ namespace FineUIPro.Web.HJGL.JoinMarking
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
- var dataInTempAll = from x in Funs.DB.Sys_DataInTemp
+ var dataInTempAll = from x in Funs.DB.HJGL_Sys_DataInTemp
where x.ProjectId == this.CurrUser.LoginProjectId && x.UserId == this.CurrUser.UserId && x.Type == this.IsPDMS
select x;
for (int i = 0; i < Grid1.Rows.Count; i++)
@@ -117,32 +118,28 @@ namespace FineUIPro.Web.HJGL.JoinMarking
{
if (this.IsPDMS == "1") ///如果是PDMS
{
- this.Grid1.Columns[7].Hidden = true;//材质2
- this.Grid1.Columns[10].Hidden = true;//焊接区域
- this.Grid1.Columns[11].Hidden = true;//焊口属性
- this.Grid1.Columns[12].Hidden = true;//达因数
- this.Grid1.Columns[13].Hidden = true;//规格
- this.Grid1.Columns[15].Hidden = true;//焊接方法代码
- this.Grid1.Columns[17].Hidden = true;//焊条代号
- this.Grid1.Columns[18].Hidden = true;//焊丝代号
- this.Grid1.Columns[19].HeaderText = Resources.Lan.ASPXSC_2080;
- this.Grid1.Columns[23].Hidden = true;//坡口代号
- this.Grid1.Columns[25].HeaderText = Resources.Lan.ASPXSC_2081;
- this.Grid1.Columns[26].Hidden = true;//组件二代号
- this.Grid1.Columns[27].Hidden = true;//炉批号1
- this.Grid1.Columns[28].Hidden = true;//炉批号2
- this.Grid1.Columns[30].Hidden = true;//预热温度
- this.Grid1.Columns[31].Hidden = true;//是否热处理
- this.Grid1.Columns[32].Hidden = true;//热处理编号
- this.Grid1.Columns[33].Hidden = true;//焊接位置
- this.Grid1.Columns[34].Hidden = true;//外径
- this.Grid1.Columns[35].Hidden = true;//硬度检测比例(数值)
- this.Grid1.Columns[36].Hidden = true;//焊接气体保护
+ this.Grid1.Columns[7].Hidden = true;
+ this.Grid1.Columns[10].Hidden = true;
+ this.Grid1.Columns[12].Hidden = true;
+ this.Grid1.Columns[13].Hidden = true;
+ this.Grid1.Columns[15].Hidden = true;
+ this.Grid1.Columns[17].Hidden = true;
+ this.Grid1.Columns[18].Hidden = true;
+ this.Grid1.Columns[23].Hidden = true;
+ this.Grid1.Columns[26].Hidden = true;
+ this.Grid1.Columns[27].Hidden = true;
+ this.Grid1.Columns[28].Hidden = true;
+ this.Grid1.Columns[30].Hidden = true;
+ this.Grid1.Columns[31].Hidden = true;
+ this.Grid1.Columns[32].Hidden = true;
+ this.Grid1.Columns[33].Hidden = true;
+ this.Grid1.Columns[34].Hidden = true;
+ this.Grid1.Columns[25].HeaderText = "组件类型";
}
else
{
- this.Grid1.Columns[37].Hidden = true;//组件数量
- this.Grid1.Columns[38].Hidden = true;//公称直径
+ this.Grid1.Columns[35].Hidden = true;
+ this.Grid1.Columns[36].Hidden = true;
}
}
var errData = from x in dataInTempAll where x.ToopValue != null select x;
@@ -159,7 +156,7 @@ namespace FineUIPro.Web.HJGL.JoinMarking
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
- Alert.ShowInTop(Resources.Lan.T_REST_ASPXCS_370, MessageBoxIcon.Warning);
+ Alert.ShowInTop("请选择一条记录", MessageBoxIcon.Warning);
return;
}
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_DataInMenuId, Const.BtnIn))
@@ -168,7 +165,7 @@ namespace FineUIPro.Web.HJGL.JoinMarking
}
else
{
- ShowNotify(Resources.Lan.T_REST_ASPXCS_365, MessageBoxIcon.Warning);
+ ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
}
}
#endregion
@@ -185,14 +182,14 @@ namespace FineUIPro.Web.HJGL.JoinMarking
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
- Alert.ShowInTop(Resources.Lan.T_REST_ASPXCS_370, MessageBoxIcon.Warning);
+ Alert.ShowInTop("请选择一条记录", MessageBoxIcon.Warning);
return;
}
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DataInEdit.aspx?TempId={0}", Grid1.SelectedRowID, "维护 - ")));
}
else
{
- ShowNotify(Resources.Lan.T_REST_ASPXCS_365, MessageBoxIcon.Warning);
+ ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
}
}
@@ -207,7 +204,7 @@ namespace FineUIPro.Web.HJGL.JoinMarking
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
- Alert.ShowInTop(Resources.Lan.T_REST_ASPXCS_370, MessageBoxIcon.Warning);
+ Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
return;
}
@@ -218,12 +215,12 @@ namespace FineUIPro.Web.HJGL.JoinMarking
//BLL.Sys_LogService.AddLog(Const.System_7, this.CurrUser.LoginProjectId, this.CurrUser.UserId, Resources.Lan.ASPXSC_2047);
}
- ShowNotify(Resources.Lan.T_REST_ASPXCS_373, MessageBoxIcon.Success);
+ ShowNotify("删除成功!", MessageBoxIcon.Success);
this.BindGrid();
}
else
{
- Alert.ShowInTop(Resources.Lan.T_REST_ASPXCS_365, MessageBoxIcon.Warning);
+ Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
return;
}
}
@@ -286,33 +283,32 @@ namespace FineUIPro.Web.HJGL.JoinMarking
{
//beginProgress();
var units = from x in Funs.DB.Base_Unit
- join y in Funs.DB.Project_ProjectUnit on x.UnitId equals y.UnitId
+ join y in Funs.DB.Project_Unit on x.UnitId equals y.UnitId
where y.ProjectId == LoginProjectId
select x;
- var workAreas = from x in Funs.DB.ProjectData_WorkArea where x.ProjectId == LoginProjectId select x;
- var steels = from x in Funs.DB.Base_Material select x;
- var materialTypes = from x in Funs.DB.Base_MaterialType select x;
- var rates = from x in Funs.DB.Base_DetectionRate select x;
- var types = from x in Funs.DB.Base_WeldType select x;
- var methods = from x in Funs.DB.Base_WeldingMethod select x;
- var materials = from x in Funs.DB.Base_Consumables select x;
- var services = from x in Funs.DB.Base_TestMedium select x;
- var slopeTypes = from x in Funs.DB.Base_GrooveType select x;
- var isoClasss = from x in Funs.DB.Base_PipingClass select x;
- var components = from x in Funs.DB.Base_Components select x;
- var dns = from x in Funs.DB.Base_DNCompare select x;
- var dataInTemp = from x in Funs.DB.Sys_DataInTemp
- where x.ProjectId == LoginProjectId && x.UserId == UserId && x.Type == IsPDMS
+ var installs = from x in Funs.DB.Project_Installation where x.ProjectId == this.CurrUser.LoginProjectId select x;
+ var steels = from x in Funs.DB.HJGL_BS_Steel select x;
+ var rates = from x in Funs.DB.HJGL_BS_NDTRate select x;
+ var types = from x in Funs.DB.HJGL_BS_JointType select x;
+ var methods = from x in Funs.DB.HJGL_BS_WeldMethod select x;
+ var materials = from x in Funs.DB.HJGL_BS_WeldMaterial select x;
+ var services = from x in Funs.DB.HJGL_BS_Service select x;
+ var slopeTypes = from x in Funs.DB.HJGL_BS_SlopeType select x;
+ var isoClasss = from x in Funs.DB.HJGL_BS_IsoClass select x;
+ var components = from x in Funs.DB.HJGL_BS_Component select x;
+ var dns = from x in Funs.DB.HJGL_BS_SchTab select x;
+ var dataInTemp = from x in Funs.DB.HJGL_Sys_DataInTemp
+ where x.ProjectId == this.CurrUser.LoginProjectId && x.UserId == this.CurrUser.UserId && x.Type == this.IsPDMS
select x;
- var iosType = from x in Funs.DB.Sys_Const
- where x.GroupId == ConstValue.GroupId_ISOType
- select x;
+
int okCount = 0;
int i = 0;
int ir = dataInTemp.Count();
string erreMessage = "";
+ Model.HJGL_PW_IsoInfo isoInfo = Funs.DB.HJGL_PW_IsoInfo.FirstOrDefault(x=>x.ISO_ID==ISO_ID); ///管线
+
foreach (var tempData in dataInTemp)
{
@@ -320,7 +316,7 @@ namespace FineUIPro.Web.HJGL.JoinMarking
{
string errInfo = string.Empty;
- Model.PW_JointInfo jointInfo = new Model.PW_JointInfo(); ///焊口
+ Model.HJGL_PW_JointInfo jointInfo = new Model.HJGL_PW_JointInfo(); ///焊口
jointInfo.JOT_JointStatus = "100";
jointInfo.ISO_ID = this.ISO_ID;
jointInfo.X = tempData.Value46;
@@ -331,7 +327,7 @@ namespace FineUIPro.Web.HJGL.JoinMarking
if (string.IsNullOrEmpty(tempData.Value4))
{
- errInfo += Resources.Lan.ASPXSC_2056;
+ errInfo += "焊口代号此项为必填项!";
}
else
{
@@ -341,126 +337,147 @@ namespace FineUIPro.Web.HJGL.JoinMarking
if (!string.IsNullOrEmpty(tempData.Value5))
{
- var materialType = materialTypes.FirstOrDefault(x => x.MaterialTypeCode == tempData.Value5);
- if (materialType == null)
+ var steel = steels.FirstOrDefault(x => x.STE_Code == tempData.Value5);
+ if (steel == null)
{
- errInfo += Resources.Lan.ASPXSC_2083 + tempData.Value5 + Resources.Lan.ASPXSC_2016;
+ errInfo += "材质1[" + tempData.Value5 + "]不存在;";
}
else
{
- jointInfo.MaterialType = materialType.MaterialTypeId;
+ isoInfo.STE_ID = steel.STE_ID;
+ jointInfo.STE_ID = steel.STE_ID;
}
}
+ else
+ {
+ errInfo += "材质1为必填项;";
+ }
if (!string.IsNullOrEmpty(tempData.Value8))
{
- jointInfo.Material1 = tempData.Value8;
- }
- if (!string.IsNullOrEmpty(tempData.Value9))
- {
- jointInfo.Material2 = tempData.Value9;
- }
- if (!string.IsNullOrEmpty(tempData.Value6))
- {
- var steel = steels.FirstOrDefault(x => x.MaterialCode == tempData.Value6);
- if (steel == null)
- {
- errInfo += Resources.Lan.TTC_RE_CS_HSSE_121 + tempData.Value6 + Resources.Lan.ASPXSC_2016;
- }
- else
- {
- jointInfo.MaterialId = steel.MaterialId;
- }
- }
- else
- {
- errInfo += Resources.Lan.TTC_RE_CS_HSSE_122;
- }
- if (!string.IsNullOrEmpty(tempData.Value41) && tempData.Value41.Trim() == Resources.Lan.TCC_RE_CQMS_011)
- {
- jointInfo.Extend_Length = tempData.Value43;
- if (!string.IsNullOrEmpty(tempData.Value10))
- {
- var rate = rates.FirstOrDefault(x => x.DetectionRateCode == tempData.Value10);
- if (rate == null)
- {
- errInfo += Resources.Lan.ASPXSC_2084 + tempData.Value10 + Resources.Lan.ASPXSC_2016;
- }
- else
- {
- jointInfo.DetectionRateId = rate.DetectionRateId;
- }
- }
- else
- {
- errInfo += Resources.Lan.ASPXSC_2085;
- }
- }
-
- if (string.IsNullOrEmpty(tempData.Value16))
- {
- errInfo += Resources.Lan.ASPXSC_2091;
- }
- else
- {
- jointInfo.JOT_Sch = tempData.Value16;
- }
-
- if (!string.IsNullOrEmpty(tempData.Value45))
- {
- var type = iosType.FirstOrDefault(x => x.ConstValue == tempData.Value45);
+ var type = types.FirstOrDefault(x => x.JOTY_Code == tempData.Value8);
if (type == null)
{
- errInfo += Resources.Lan.ASPXSC_2093 + tempData.Value45 + Resources.Lan.ASPXSC_2016;
+ errInfo += "焊缝类型代号[" + tempData.Value8 + "]不存在;";
}
else
{
- jointInfo.ISO_Type = type.ConstValue;
+ jointInfo.JOTY_ID = type.JOTY_ID;
}
}
- jointInfo.JOT_BelongPipe = tempData.Value31;
- jointInfo.WallBoard = tempData.Value42;
+ else
+ {
+ errInfo += "焊缝类型代号为必填项;";
+ }
+ if (string.IsNullOrEmpty(tempData.Value13))
+ {
+ errInfo += "壁厚此项为必填项!";
+ }
+ else
+ {
+ jointInfo.JOT_Sch = tempData.Value13;
+ }
+
+ if (!string.IsNullOrEmpty(tempData.Value15))
+ {
+ try
+ {
+ decimal testPress = Convert.ToDecimal(tempData.Value15);
+ isoInfo.ISO_TestPress = testPress;
+ }
+ catch (Exception)
+ {
+ errInfo += "试验压力[" + tempData.Value15 + "]错误;";
+ }
+ }
+
+ if (!string.IsNullOrEmpty(tempData.Value18))
+ {
+ var service = services.FirstOrDefault(x => x.SER_Code == tempData.Value18);
+ if (service == null)
+ {
+ errInfo += "介质代号[" + tempData.Value18 + "]不存在;";
+ }
+ else
+ {
+ isoInfo.SER_ID = service.SER_ID;
+ }
+ }
+ if (!string.IsNullOrEmpty(tempData.Value20))
+ {
+ try
+ {
+ decimal testPress = Convert.ToDecimal(tempData.Value20);
+ isoInfo.ISO_DesignPress = testPress;
+ }
+ catch (Exception)
+ {
+ errInfo += "设计压力[" + tempData.Value20 + "]错误;";
+ }
+ }
+ if (!string.IsNullOrEmpty(tempData.Value21))
+ {
+ try
+ {
+ decimal testPress = Convert.ToDecimal(tempData.Value21);
+ isoInfo.ISO_DesignTemperature = testPress;
+ }
+ catch (Exception)
+ {
+ errInfo += "设计温度[" + tempData.Value21 + "]错误;";
+ }
+ }
+
+ if (!string.IsNullOrEmpty(tempData.Value23))
+ {
+ var isoClass = isoClasss.FirstOrDefault(x => x.ISC_IsoCode == tempData.Value23);
+ if (isoClass == null)
+ {
+ errInfo += "管线等级代号[" + tempData.Value23 + "]不存在;";
+ }
+ else
+ {
+ isoInfo.ISC_ID = isoClass.ISC_ID;
+ }
+ }
+ if (!string.IsNullOrEmpty(tempData.Value24))
+ {
+ var component = components.FirstOrDefault(x => x.COM_Code == tempData.Value24);
+ if (component == null)
+ {
+ errInfo += "组件一代号[" + tempData.Value24 + "]不存在;";
+ }
+ else
+ {
+ jointInfo.JOT_Component1 = component.COM_ID;
+ }
+ }
+
#endregion
if (this.IsPDMS == "0") ////非PDMS 模板
{
#region 非PDMS 模板
- if (!string.IsNullOrEmpty(tempData.Value7))
+ if (!string.IsNullOrEmpty(tempData.Value6))
{
- var steel = steels.FirstOrDefault(x => x.MaterialCode == tempData.Value7);
+ var steel = steels.FirstOrDefault(x => x.STE_Code == tempData.Value6);
if (steel == null)
{
- errInfo += Resources.Lan.TTC_RE_CS_HSSE_123 + tempData.Value7 + Resources.Lan.ASPXSC_2016;
+ errInfo += "材质2[" + tempData.Value6 + "]不存在;";
}
else
{
- jointInfo.MaterialId = steel.MaterialId;
+ jointInfo.STE_ID2 = steel.STE_ID;
}
}
- if (!string.IsNullOrEmpty(tempData.Value11))
+ if (!string.IsNullOrEmpty(tempData.Value9))
{
- var type = types.FirstOrDefault(x => x.WeldTypeCode == tempData.Value11);
- if (type == null)
+ if (tempData.Value9 != "安装" && tempData.Value9 != "预制")
{
- errInfo += Resources.Lan.ASPXSC_2094 + tempData.Value11 + Resources.Lan.ASPXSC_2016;
+ errInfo += "焊接区域[" + tempData.Value9 + "]不存在;";
}
else
{
- jointInfo.JOTY_ID = type.WeldTypeId;
- }
- }
- else
- {
- errInfo += Resources.Lan.ASPXSC_2095;
- }
- if (!string.IsNullOrEmpty(tempData.Value12))
- {
- if (tempData.Value12 != Resources.Lan.mainProject0_Installation && tempData.Value12 != Resources.Lan.RE_Remained_945)
- {
- errInfo += Resources.Lan.ASPXSC_2096 + tempData.Value12 + Resources.Lan.ASPXSC_2016;
- }
- else
- {
- if (tempData.Value12 == Resources.Lan.mainProject0_Installation)
+ if (tempData.Value9 == "安装")
{
jointInfo.WLO_Code = "F";
}
@@ -472,151 +489,137 @@ namespace FineUIPro.Web.HJGL.JoinMarking
}
else
{
- errInfo += Resources.Lan.ASPXSC_2097;
+ errInfo += "焊接区域为必填项;";
}
- if (!string.IsNullOrEmpty(tempData.Value13))
+ if (!string.IsNullOrEmpty(tempData.Value10))
{
- if (tempData.Value13 != Resources.Lan.RE_Remained_947 && tempData.Value13 != Resources.Lan.RE_Remained_946)
+ if (tempData.Value10 != "固定" && tempData.Value10 != "活动")
{
- errInfo += Resources.Lan.ASPXSC_2098 + tempData.Value13 + Resources.Lan.ASPXSC_2016;
+ errInfo += "焊口属性[" + tempData.Value10 + "]不存在;";
}
else
{
- jointInfo.JOT_JointAttribute = tempData.Value13;
+ jointInfo.JOT_JointAttribute = tempData.Value10;
}
}
else
{
- errInfo += Resources.Lan.ASPXSC_2099;
+ errInfo += "焊口属性为必填项;";
}
- if (!string.IsNullOrEmpty(tempData.Value14))
+ if (!string.IsNullOrEmpty(tempData.Value11))
{
try
{
- decimal doneDin = Convert.ToDecimal(tempData.Value14);
+ decimal doneDin = Convert.ToDecimal(tempData.Value11);
jointInfo.JOT_Size = doneDin;
+
}
catch (Exception)
{
- errInfo += Resources.Lan.ASPXSC_2100 + tempData.Value14 + Resources.Lan.ASPXSC_2087;
+ errInfo += "寸径数[" + tempData.Value11 + "]错误;";
}
}
else
{
- errInfo += Resources.Lan.ASPXSC_2101;
+ errInfo += "寸径数为必填项;";
}
- if (string.IsNullOrEmpty(tempData.Value15))
+ if (string.IsNullOrEmpty(tempData.Value12))
{
- errInfo += Resources.Lan.ASPXSC_2102;
+ errInfo += "规格此项为必填项!";
}
else
{
- jointInfo.JOT_JointDesc = tempData.Value15;
+ jointInfo.JOT_JointDesc = tempData.Value12;
}
-
- if (!string.IsNullOrEmpty(tempData.Value17))
+ if (!string.IsNullOrEmpty(tempData.Value14))
{
- var method = methods.FirstOrDefault(x => x.WeldingMethodCode == tempData.Value17);
+ var method = methods.FirstOrDefault(x => x.WME_Code == tempData.Value14);
if (method == null)
{
- errInfo += Resources.Lan.ASPXSC_2103 + tempData.Value17 + Resources.Lan.ASPXSC_2016;
+ errInfo += "焊接方法代号[" + tempData.Value14 + "]不存在;";
}
else
{
- jointInfo.WME_ID = method.WeldingMethodId;
+ jointInfo.WME_ID = method.WME_ID;
}
}
else
{
- errInfo += Resources.Lan.ASPXSC_2104;
+ errInfo += "焊接方法代号为必填项;";
}
- if (!string.IsNullOrEmpty(tempData.Value19))
+ if (!string.IsNullOrEmpty(tempData.Value16))
{
- var material = materials.FirstOrDefault(x => x.ConsumablesCode == tempData.Value19 && x.ConsumablesType == "2");
+ var material = materials.FirstOrDefault(x => x.WMT_MatCode == tempData.Value16 && x.WMT_MatType == "2");
if (material == null)
{
- errInfo += Resources.Lan.ASPXSC_2105 + tempData.Value19 + Resources.Lan.ASPXSC_2016;
+ errInfo += "焊条代号[" + tempData.Value16 + "]不存在;";
}
else
{
- jointInfo.JOT_WeldMat = material.ConsumablesId;
+ jointInfo.JOT_WeldMat = material.WMT_ID;
}
}
- if (!string.IsNullOrEmpty(tempData.Value20))
+ if (!string.IsNullOrEmpty(tempData.Value17))
{
- var material = materials.FirstOrDefault(x => x.ConsumablesCode == tempData.Value20 && x.ConsumablesType == "1");
+ var material = materials.FirstOrDefault(x => x.WMT_MatCode == tempData.Value17 && x.WMT_MatType == "1");
if (material == null)
{
- errInfo += Resources.Lan.ASPXSC_2106 + tempData.Value20 + Resources.Lan.ASPXSC_2016;
+ errInfo += "焊丝代号[" + tempData.Value17 + "]不存在;";
}
else
{
- jointInfo.JOT_WeldSilk = material.ConsumablesId;
+ jointInfo.JOT_WeldSilk = material.WMT_ID;
}
}
+ if (!string.IsNullOrEmpty(tempData.Value22))
+ {
+ var slopeType = slopeTypes.FirstOrDefault(x => x.JST_Code == tempData.Value22);
+ if (slopeType == null)
+ {
+ errInfo += "坡口代号[" + tempData.Value22 + "]不存在;";
+ }
+ else
+ {
+ jointInfo.JST_ID = slopeType.JST_ID;
+ }
+ }
+ else
+ {
+ errInfo += "坡口代号必填项;";
+ }
if (!string.IsNullOrEmpty(tempData.Value25))
{
- var slopeType = slopeTypes.FirstOrDefault(x => x.GrooveTypeCode == tempData.Value25);
- if (slopeType == null)
- {
- errInfo += Resources.Lan.ASPXSC_2107 + tempData.Value25 + Resources.Lan.ASPXSC_2016;
- }
- else
- {
- jointInfo.JST_ID = slopeType.GrooveTypeId;
- }
- }
- else
- {
- errInfo += Resources.Lan.ASPXSC_2108;
- }
- if (!string.IsNullOrEmpty(tempData.Value27))
- {
- var component = components.FirstOrDefault(x => x.ComponentsCode == tempData.Value27);
+ var component = components.FirstOrDefault(x => x.COM_Code == tempData.Value25);
if (component == null)
{
- errInfo += Resources.Lan.ASPXSC_2109 + tempData.Value27 + Resources.Lan.ASPXSC_2016;
+ errInfo += "组件二代号[" + tempData.Value25 + "]不存在;";
}
else
{
- jointInfo.JOT_Component1 = component.ComponentsId;
+ jointInfo.JOT_Component2 = component.COM_ID;
}
}
- if (!string.IsNullOrEmpty(tempData.Value28))
- {
- var component = components.FirstOrDefault(x => x.ComponentsCode == tempData.Value28);
- if (component == null)
- {
- errInfo += Resources.Lan.ASPXSC_2110 + tempData.Value28 + Resources.Lan.ASPXSC_2016;
- }
- else
- {
- jointInfo.JOT_Component2 = component.ComponentsId;
- }
- }
- jointInfo.JOT_HeartNo1 = tempData.Value29;
- jointInfo.JOT_HeartNo2 = tempData.Value30;
- if (!string.IsNullOrEmpty(tempData.Value32))
+ if (!string.IsNullOrEmpty(tempData.Value29))
{
try
{
- decimal testPress = Convert.ToDecimal(tempData.Value32);
+ decimal testPress = Convert.ToDecimal(tempData.Value29);
jointInfo.JOT_PrepareTemp = testPress;
}
catch (Exception)
{
- errInfo += Resources.Lan.ASPXSC_2111 + tempData.Value32 + Resources.Lan.ASPXSC_2087;
+ errInfo += "预热温度[" + tempData.Value29 + "]错误;";
}
}
- if (!string.IsNullOrEmpty(tempData.Value33))
+ if (!string.IsNullOrEmpty(tempData.Value30))
{
- if (tempData.Value33 != Resources.Lan.TCC_RE_CQMS_011 && tempData.Value33 != Resources.Lan.TCC_RE_CQMS_012)
+ if (tempData.Value30 != "是" && tempData.Value30 != "否")
{
- errInfo += Resources.Lan.ASPXSC_2112 + tempData.Value33 + Resources.Lan.ASPXSC_2087;
+ errInfo += "是否热处理[" + tempData.Value30 + "]错误;";
}
else
{
- if (tempData.Value33 == Resources.Lan.TCC_RE_CQMS_011)
+ if (tempData.Value30 == "是")
{
jointInfo.IS_Proess = "1";
}
@@ -626,141 +629,164 @@ namespace FineUIPro.Web.HJGL.JoinMarking
}
}
}
- jointInfo.JOT_HotRpt = tempData.Value34;
- if (!string.IsNullOrEmpty(tempData.Value35))
+ if (!string.IsNullOrEmpty(tempData.Value31))
{
- if (tempData.Value35 != "1G" && tempData.Value35 != "2G" && tempData.Value35 != "3G" && tempData.Value35 != "4G" && tempData.Value35 != "5G" && tempData.Value35 != "6G" && tempData.Value35 != "1F" && tempData.Value35 != "2F" && tempData.Value35 != "2FR"
- && tempData.Value35 != "4F" && tempData.Value35 != "5F" && tempData.Value35 != "5FG" && tempData.Value35 != "6FG" && tempData.Value35 != "2FG" && tempData.Value35 != "4FG")
+ if (tempData.Value31 != "1G" && tempData.Value31 != "2G" && tempData.Value31 != "3G"
+ && tempData.Value31 != "4G" && tempData.Value31 != "5G" && tempData.Value31 != "6G"
+ && tempData.Value31 != "1F" && tempData.Value31 != "2F" && tempData.Value31 != "2FR"
+ && tempData.Value31 != "4F" && tempData.Value31 != "5F")
{
- errInfo += Resources.Lan.ASPXSC_2113 + tempData.Value35 + Resources.Lan.ASPXSC_2016;
+ errInfo += "焊接位置[" + tempData.Value31 + "]不存在;";
}
else
{
- jointInfo.JOT_Location = tempData.Value35;
+ jointInfo.JOT_Location = tempData.Value31;
}
}
else
{
- errInfo += Resources.Lan.ASPXSC_2114;
+ errInfo += "焊接位置必填项;";
}
- if (!string.IsNullOrEmpty(tempData.Value36))
+ if (!string.IsNullOrEmpty(tempData.Value32))
{
try
{
- decimal testPress = Convert.ToDecimal(tempData.Value36);
+ decimal testPress = Convert.ToDecimal(tempData.Value32);
jointInfo.JOT_Dia = testPress;
}
catch (Exception)
{
- errInfo += Resources.Lan.ASPXSC_2115 + tempData.Value36 + Resources.Lan.ASPXSC_2087;
+ errInfo += "外径[" + tempData.Value32 + "]错误;";
}
}
-
#endregion
}
else
{
#region PDMS模板
- if (!string.IsNullOrEmpty(tempData.Value40))
+ // 生成坡口形式
+ if (tempData.Value8 == "BW") // BW的坡口形式为V
{
+ var slopeType = slopeTypes.FirstOrDefault(x => x.JST_Code == "V");
+ if (slopeType != null)
+ {
+ jointInfo.JST_ID = slopeType.JST_ID;
+ }
+ }
+ if (tempData.Value8 == "SW") // SW的坡口形式为I
+ {
+ var slopeType = slopeTypes.FirstOrDefault(x => x.JST_Code == "I");
+ if (slopeType != null)
+ {
+ jointInfo.JST_ID = slopeType.JST_ID;
+ }
+ }
- }
- if (!string.IsNullOrEmpty(tempData.Value27))
- {
- var component = components.FirstOrDefault(x => x.ComponentsCode == tempData.Value27);
- if (component == null)
- {
- errInfo += Resources.Lan.ASPXSC_2119 + tempData.Value27 + Resources.Lan.ASPXSC_2016;
- }
- else
- {
- jointInfo.JOT_Component1 = component.ComponentsId;
- }
- }
- if (string.IsNullOrEmpty(tempData.Value39))
- {
- errInfo += Resources.Lan.TTC_RE_CS_HSSE_124;
- }
- else
- {
- jointInfo.ComponentNum = tempData.Value39;
- }
- if (!string.IsNullOrEmpty(tempData.Value11))
- {
- var type = types.FirstOrDefault(x => x.WeldTypeCode == tempData.Value11);
- if (type == null)
- {
- errInfo += Resources.Lan.ASPXSC_2120 + tempData.Value11 + Resources.Lan.ASPXSC_2016;
- }
- else
- {
- jointInfo.JOTY_ID = type.WeldTypeId;
- }
- }
- else
- {
- errInfo += Resources.Lan.ASPXSC_2121;
- }
jointInfo.WLO_Code = "S";
- jointInfo.JOT_JointAttribute = Resources.Lan.RE_Remained_946;
+ jointInfo.JOT_JointAttribute = "活动";
jointInfo.JOT_Location = "1G";
- jointInfo.JOT_Size = BLL.Base_DNCompareService.GetSizeByDn(tempData.Value40); // 生成尺寸
- if (Funs.GetNewIntOrZero(tempData.Value40) <= 50) // 生成焊接方法
+ jointInfo.JOT_Size = BLL.HJGL_ControlService.GetSizeByDn(tempData.Value35); // 生成尺寸
+ if (Funs.GetNewIntOrZero(tempData.Value35) <= 50) // 生成焊接方法
{
- var m = methods.FirstOrDefault(x => x.WeldingMethodCode.Contains("GTAW"));
+ var m = methods.FirstOrDefault(x => x.WME_Code.Contains("GTAW"));
if (m != null)
{
- jointInfo.WME_ID = m.WeldingMethodId;
+ jointInfo.WME_ID = m.WME_ID;
}
}
else
{
- var m = methods.FirstOrDefault(x => x.WeldingMethodCode.Contains("GTAW") && x.WeldingMethodCode.Contains("SMAW"));
+ var m = methods.FirstOrDefault(x => x.WME_Code.Contains("GTAW") && x.WME_Code.Contains("SMAW"));
if (m != null)
{
- jointInfo.WME_ID = m.WeldingMethodId;
+ jointInfo.WME_ID = m.WME_ID;
}
}
- if (!string.IsNullOrEmpty(tempData.Value40) && !string.IsNullOrEmpty(tempData.Value16))
+
+ if (!string.IsNullOrEmpty(tempData.Value35) && !string.IsNullOrEmpty(tempData.Value13))
{
- jointInfo.JOT_JointDesc = tempData.Value40 + "×" + tempData.Value16;
+ jointInfo.JOT_JointDesc = tempData.Value35 + "×" + tempData.Value13;
}
- if (!string.IsNullOrEmpty(tempData.Value16))
+
+ if (!string.IsNullOrEmpty(tempData.Value13))
{
- jointInfo.JOT_Sch = tempData.Value16;
+ jointInfo.JOT_Sch = tempData.Value13;
}
- if (!string.IsNullOrEmpty(tempData.Value27))
+
+ var mc = BLL.HJGL_MaterialCompareService.GetMaterialCompare(jointInfo.STE_ID, jointInfo.WME_ID);
+ if (mc != null)
{
- var component = components.FirstOrDefault(x => x.ComponentsName.Contains(tempData.Value27));
+ jointInfo.JOT_WeldSilk = mc.WMT_ID1;
+ jointInfo.JOT_WeldMat = mc.WMT_ID2;
+ }
+
+ if (!string.IsNullOrEmpty(tempData.Value24))
+ {
+ var component = components.FirstOrDefault(x => x.COM_Name.Contains(tempData.Value24));
if (component != null)
{
- jointInfo.JOT_Component1 = component.ComponentsId;
+ jointInfo.JOT_Component1 = component.COM_ID;
jointInfo.JOT_Component2 = jointInfo.JOT_Component1;
}
}
+ if (!string.IsNullOrEmpty(tempData.Value35))
+ {
+ var dn = dns.FirstOrDefault(x => x.BST_DN == tempData.Value35);
+ if (dn == null)
+ {
+ errInfo += "公称直径[" + tempData.Value35 + "]基础表中不存在错误;";
+ }
+ else
+ {
+ try
+ {
+ int count = Convert.ToInt32(tempData.Value35);
+ }
+ catch (Exception)
+ {
+ errInfo += "公称直径[" + tempData.Value35 + "]错误;";
+ }
+ }
+ }
#endregion
}
if (string.IsNullOrEmpty(errInfo)) ////所有信息正确的话 这插入管线焊口
{
+ isoInfo.ProjectId = this.CurrUser.LoginProjectId;
jointInfo.ProjectId = this.CurrUser.LoginProjectId;
-
- var isExitJotNoValue = Funs.DB.View_JointInfoAndIsoInfo.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.UnitCode == tempData.Value1
- && x.WorkAreaCode == tempData.Value2 && x.ISO_IsoNo == tempData.Value3 && x.JOT_JointNo == tempData.Value4 && x.JOT_JointStatus != "104");
+ var isExitISOValue = Funs.DB.HJGL_View_JointInfoAndIsoInfo.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.UnitCode == tempData.Value1
+ && x.InstallationCode == tempData.Value2 && x.ISO_IsoNo == tempData.Value3);
+ if (isExitISOValue != null) ///管线已存在
+ {
+ isoInfo.ISO_ID = isExitISOValue.ISO_ID;
+ jointInfo.ISO_ID = isExitISOValue.ISO_ID;
+ BLL.HJGL_PW_IsoInfoService.UpdateIsoInfo(isoInfo);
+ }
+ else
+ {
+ isoInfo.ISO_ID = SQLHelper.GetNewID(typeof(Model.HJGL_PW_IsoInfo));
+ jointInfo.ISO_ID = isoInfo.ISO_ID;
+ BLL.HJGL_PW_IsoInfoService.AddIsoInfo(isoInfo);
+ }
+ var isExitJotNoValue = Funs.DB.HJGL_View_JointInfoAndIsoInfo.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.UnitCode == tempData.Value1
+ && x.InstallationCode == tempData.Value2 && x.ISO_IsoNo == tempData.Value3 && x.JOT_JointNo == tempData.Value4);
if (isExitJotNoValue == null)
{
- BLL.PW_JointInfoService.AddJointInfo(jointInfo);
+ jointInfo.JOT_ID = SQLHelper.GetNewID(typeof(Model.HJGL_PW_JointInfo));
+ BLL.HJGL_PW_JointInfoService.AddJointInfo(jointInfo);
}
else
{
if (string.IsNullOrEmpty(isExitJotNoValue.DReportID))
{
jointInfo.JOT_ID = isExitJotNoValue.JOT_ID;
- BLL.PW_JointInfoService.UpdateJointInfo(jointInfo);
+ BLL.HJGL_PW_JointInfoService.UpdateJointInfo(jointInfo);
}
}
+
BLL.DataInTempService.DeleteDataInTempByDataInTempID(tempData.TempId);
- okCount++;
+ okCount++;
}
@@ -793,73 +819,32 @@ namespace FineUIPro.Web.HJGL.JoinMarking
{
var jsonObc = JObject.Parse(json);
var jsonArray = jsonObc.Value("annotations").Value("1");
- var iso = Funs.DB.PW_IsoInfo.FirstOrDefault(x => x.ISO_ID == ISO_ID);
+ var iso = Funs.DB.HJGL_PW_IsoInfo.FirstOrDefault(x => x.ISO_ID == ISO_ID);
if (iso != null)
{
- var workArea = Funs.DB.ProjectData_WorkArea.FirstOrDefault(x => x.ProjectId == iso.ProjectId && x.WorkAreaId == iso.WorkAreaId);
- var unit = Funs.DB.Base_Unit.FirstOrDefault(x => x.UnitId == iso.UnitId);
- List newDataInTempList = new List();
+ var unit = Funs.DB.Base_Unit.FirstOrDefault(x => x.UnitId == iso.BSU_ID);
+ List newDataInTempList = new List();
for (int i = 0; i < jsonArray.Count; i++)
{
JObject item = jsonArray[i] as JObject;
//if (!string.IsNullOrEmpty(pds.Rows[i][3].ToString()))
{
- Model.Sys_DataInTemp newDataInTemp = new Model.Sys_DataInTemp();
- newDataInTemp.TempId = SQLHelper.GetNewID(typeof(Model.Sys_DataInTemp));
+ Model.HJGL_Sys_DataInTemp newDataInTemp = new Model.HJGL_Sys_DataInTemp();
+ newDataInTemp.TempId = SQLHelper.GetNewID(typeof(Model.HJGL_Sys_DataInTemp));
newDataInTemp.ProjectId = this.CurrUser.LoginProjectId;
newDataInTemp.UserId = this.CurrUser.UserId;
newDataInTemp.Time = System.DateTime.Now;
newDataInTemp.Type = this.IsPDMS;
newDataInTemp.RowNo = i + 2;
newDataInTemp.Value1 = unit.UnitCode;
- newDataInTemp.Value2 = workArea.WorkAreaCode;
newDataInTemp.Value3 = iso.ISO_IsoNo;
newDataInTemp.Value4 = item.Value("label");
newDataInTemp.Value46 = item.Value("x");
newDataInTemp.Value47 = item.Value("y");
newDataInTemp.Value48 = item.Value("x2");
newDataInTemp.Value49 = item.Value("y2");
- //newDataInTemp.Value4 = pds.Rows[i][3].ToString().Trim();//焊口号
- //newDataInTemp.Value5 = pds.Rows[i][4].ToString().Trim();//材质类型代号
- //newDataInTemp.Value6 = pds.Rows[i][5].ToString().Trim();//材质1代号
- //newDataInTemp.Value7 = pds.Rows[i][6].ToString().Trim();//材质2代号
- //newDataInTemp.Value8 = pds.Rows[i][7].ToString().Trim();//材料1
- //newDataInTemp.Value9 = pds.Rows[i][8].ToString().Trim();//材料2
- //newDataInTemp.Value10 = pds.Rows[i][9].ToString().Trim();//探伤比例代号
- //newDataInTemp.Value11 = pds.Rows[i][10].ToString().Trim();//焊缝类型代号
- //newDataInTemp.Value12 = pds.Rows[i][11].ToString().Trim();//焊接区域
- //newDataInTemp.Value13 = pds.Rows[i][12].ToString().Trim();//焊口属性
- //newDataInTemp.Value14 = pds.Rows[i][13].ToString().Trim();//达因数
- //newDataInTemp.Value15 = pds.Rows[i][14].ToString().Trim();//规格
- //newDataInTemp.Value16 = pds.Rows[i][15].ToString().Trim();//壁厚
- //newDataInTemp.Value17 = pds.Rows[i][16].ToString().Trim();//焊接方法代码
- //newDataInTemp.Value18 = pds.Rows[i][17].ToString().Trim();//试验压力
- //newDataInTemp.Value19 = pds.Rows[i][18].ToString().Trim();//焊条代号
- //newDataInTemp.Value20 = pds.Rows[i][19].ToString().Trim();//焊丝代号
- //newDataInTemp.Value21 = pds.Rows[i][20].ToString().Trim();//介质代号
- //newDataInTemp.Value22 = pds.Rows[i][21].ToString().Trim();//单线图号
- //newDataInTemp.Value23 = pds.Rows[i][22].ToString().Trim();//设计压力
- //newDataInTemp.Value24 = pds.Rows[i][23].ToString().Trim();//设计温度
- //newDataInTemp.Value25 = pds.Rows[i][24].ToString().Trim();//坡口代号
- //newDataInTemp.Value26 = pds.Rows[i][25].ToString().Trim();//管线等级代号
- //newDataInTemp.Value27 = pds.Rows[i][26].ToString().Trim(); //组件一代号
- //newDataInTemp.Value28 = pds.Rows[i][27].ToString().Trim();//组件二代号
- //newDataInTemp.Value29 = pds.Rows[i][28].ToString().Trim();//炉批号一
- //newDataInTemp.Value30 = pds.Rows[i][29].ToString().Trim();//炉批号二
- //newDataInTemp.Value31 = pds.Rows[i][30].ToString().Trim();//所属管段
- //newDataInTemp.Value32 = pds.Rows[i][31].ToString().Trim();//预热温度
- //newDataInTemp.Value33 = pds.Rows[i][32].ToString().Trim();//是否需热处理(是,否)
- //newDataInTemp.Value34 = pds.Rows[i][33].ToString().Trim();//热处理编号
- //newDataInTemp.Value35 = pds.Rows[i][34].ToString().Trim();//硬度检测比例(数值)
- //newDataInTemp.Value38 = pds.Rows[i][37].ToString().Trim();//外径
- //newDataInTemp.Value39 = pds.Rows[i][36].ToString().Trim();//焊接位置(1G/2G/3G/4G/5G/6G)
- //newDataInTemp.Value40 = pds.Rows[i][35].ToString().Trim();//焊接气体保护
- //newDataInTemp.Value41 = pds.Rows[i][38].ToString().Trim();//是否非标(是/否)
- //newDataInTemp.Value42 = pds.Rows[i][39].ToString().Trim();//壁板号
- //newDataInTemp.Value43 = pds.Rows[i][40].ToString().Trim();//延长米
- //newDataInTemp.Value44 = pds.Rows[i][41].ToString().Trim();//管道长度
- //newDataInTemp.Value45 = pds.Rows[i][42].ToString().Trim();//管道类别号
+
newDataInTempList.Add(newDataInTemp);
}
}
@@ -880,7 +865,7 @@ namespace FineUIPro.Web.HJGL.JoinMarking
{ ////先删除临时表中 该人员以前导入的数据
BLL.DataInTempService.DeleteDataInTempByProjectIdUserId(this.CurrUser.LoginProjectId, this.CurrUser.UserId, this.IsPDMS);
this.BindGrid();
- ShowNotify(Resources.Lan.T_REST_ASPXCS_373, MessageBoxIcon.Success);
+ ShowNotify("删除成功!", MessageBoxIcon.Success);
}
}
diff --git a/HJGL_DS/FineUIPro.Web/HJGL/JoinMarking/PDFShow.aspx.cs b/HJGL_DS/FineUIPro.Web/HJGL/JoinMarking/PDFShow.aspx.cs
index 3112db1..bdea548 100644
--- a/HJGL_DS/FineUIPro.Web/HJGL/JoinMarking/PDFShow.aspx.cs
+++ b/HJGL_DS/FineUIPro.Web/HJGL/JoinMarking/PDFShow.aspx.cs
@@ -1,10 +1,8 @@
using BLL;
using BLL.Common;
-using FineUIPro.Web.HJGL.HotProcessHard;
+
using Newtonsoft.Json;
-using Newtonsoft.Json.Linq;
-using NPOI.POIFS.Properties;
-using RestSharp.Serialization.Json;
+
using System;
using System.Collections.Generic;
using System.Data;
@@ -80,24 +78,24 @@ namespace FineUIPro.Web.HJGL.JoinMarking
ISO_ID = Request.Params["ISO_ID"];
FileId = Request.Params["FileId"];
- URL = Funs.SGGLUrl + Request.Params["pdfurl"];
+ URL = Funs.HJGLUrl + Request.Params["pdfurl"];
- var iso = Funs.DB.PW_IsoInfo.FirstOrDefault(x => x.ISO_ID == ISO_ID);
+ var iso = Funs.DB.HJGL_PW_IsoInfo.FirstOrDefault(x => x.ISO_ID == ISO_ID);
if (iso != null)
{
- UnitName = Funs.DB.Base_Unit.FirstOrDefault(x => x.UnitId == iso.UnitId)?.UnitName;
+ UnitName = Funs.DB.Base_Unit.FirstOrDefault(x => x.UnitId == iso.BSU_ID)?.UnitName;
}
- var jotids = Funs.DB.PW_JointInfo.Where(x => x.ISO_ID == ISO_ID && x.AttachSourceId == FileId).Select(x => x.JOT_ID).ToList();
+ var jotids = Funs.DB.HJGL_PW_IsoInfo.Where(x => x.ISO_ID == ISO_ID && x.AttachSourceId == FileId).Select(x => x.JOT_ID).ToList();
string sqlData = @"select a.JOT_ID ,a.JOT_JointNo,c.WED_Code,JOT_Location,b.JOT_WeldDate ,'/' DetectionTypeCode ,'/' IsRepair,'/' IsHotProcess,x,y,x2,y2
,(case a.JOT_JointStatus
when '100' then '正常'
when '102' then '扩透'
when '101' then '点口'
- when '104' then '已切除' end) as JOT_JointStatus from PW_JointInfo a
- left join BO_WeldReportMain b on a.DReportID=b.DReportID
- left join bs_welder AS c ON a.JOT_FloorWelder = c.wed_id
+ when '104' then '已切除' end) as JOT_JointStatus from HJGL_PW_JointInfo a
+ left join HJGL_BO_WeldReportMain b on a.DReportID=b.DReportID
+ left join HJGL_bs_welder AS c ON a.JOT_FloorWelder = c.wed_id
WHERE a.ProjectId = @ProjectId and a.JOT_ID in ('" + string.Join("','", jotids) + "') ";
SqlParameter[] parameter1 = new SqlParameter[] { new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId) };
DataTable tb1 = SQLHelper.GetDataTableRunText(sqlData, parameter1);