From 3aeb7e47de4946ffaa661cd7fb0d7802a489f9e2 Mon Sep 17 00:00:00 2001
From: gaofei1985 <181547018@qq.com>
Date: Fri, 24 Nov 2023 18:29:30 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
DataBase/版本日志/SGGLDB_V2023-11-24.sql | 60 +++++++++
SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 8 ++
.../HJGL/PointTrust/PointBatch.aspx | 2 +
.../HJGL/PointTrust/PointBatch.aspx.cs | 108 +++++++++++++++++
.../PointTrust/PointBatch.aspx.designer.cs | 9 ++
.../HJGL/PointTrust/PointWeldJointView.aspx | 91 ++++++++++++++
.../PointTrust/PointWeldJointView.aspx.cs | 87 +++++++++++++
.../PointWeldJointView.aspx.designer.cs | 114 ++++++++++++++++++
.../HJGL/WeldingManage/JotTwoDesign.aspx.cs | 11 +-
.../HJGL/WeldingManage/WeldJointEdit.aspx.cs | 38 +++---
.../HJGL/WeldingManage/WeldingConDate.aspx.cs | 22 ++--
SGGL/Model/Model.cs | 18 +++
12 files changed, 541 insertions(+), 27 deletions(-)
create mode 100644 SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx
create mode 100644 SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx.cs
create mode 100644 SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx.designer.cs
diff --git a/DataBase/版本日志/SGGLDB_V2023-11-24.sql b/DataBase/版本日志/SGGLDB_V2023-11-24.sql
index 880c945c..a26c6117 100644
--- a/DataBase/版本日志/SGGLDB_V2023-11-24.sql
+++ b/DataBase/版本日志/SGGLDB_V2023-11-24.sql
@@ -31,3 +31,63 @@ ORDER BY daily.UnitId,detectionType.DetectionTypeCode,jot.WeldJointCode
GO
+
+ALTER VIEW [dbo].[View_HJGL_Batch_PointBatchItem]
+AS
+/*************ϸ*************/
+SELECT PointBatchItem.PointBatchItemId,
+PointBatchItem.PointBatchId,
+PointBatch.ProjectId,
+PointBatch.UnitId,
+PointBatch.DetectionTypeId,
+PointBatch.DetectionRateId,
+PointBatch.PointBatchCode,
+Pipeline.UnitWorkId,
+PointBatchItem.WeldJointId,
+(CASE PointBatchItem.PointState WHEN '1' THEN '' WHEN '2' THEN '' END) AS PointState,
+(CASE PointBatchItem.IsBuildTrust WHEN 1 THEN '' ELSE '' END) AS IsBuildTrust,
+(CASE WHEN PointBatchItem.IsAudit=1 THEN ''
+ WHEN (PointBatchItem.IsAudit IS NULL OR PointBatchItem.IsAudit=0) AND PointBatchItem.PointState IS NOT NULL THEN ''
+ WHEN (PointBatchItem.IsAudit IS NULL OR PointBatchItem.IsAudit=0) AND PointBatchItem.PointState IS NULL THEN '' END) AS PointIsAudit,
+PointBatchItem.PointDate,--
+(CASE PointBatchItem.IsWelderFirst WHEN 1 THEN '' ELSE '' END) AS IsWelderFirst,
+PointBatchItem.RepairDate,--
+PointBatchItem.RepairRecordId,
+PointBatchItem.CutDate,--г
+PointBatchItem.PBackingWelderId,--
+PointBatchItem.PCoverWelderId,--溸
+UnitWork.UnitWorkCode,--
+WeldJoint.WeldJointCode,--ں
+WeldJoint.BackingWelderId AS WelderId, --ID
+BackingWelder.WelderCode AS BackingWelderCode,
+CoverWelder.WelderCode AS CoverWelderCode,
+WeldType.WeldTypeCode,
+WeldJoint.JointAttribute,
+WeldJoint.JointArea,--
+WeldJoint.Size,--ʵʴ羶
+WeldingDaily.WeldingDate,--
+WeldJoint.PipelineId, --ID
+WeldJoint.Material1Id AS Mat, --
+WeldJoint.Specification, --
+Pipeline.PipelineCode, --ߺ
+PipingClass.PipingClassName , --ܵȼ
+WeldJoint.BackingWelderId,
+WeldJoint.CoverWelderId
+FROM dbo.HJGL_Batch_PointBatchItem AS PointBatchItem
+LEFT JOIN dbo.HJGL_Batch_PointBatch AS PointBatch ON PointBatch.PointBatchId=PointBatchItem.PointBatchId
+LEFT JOIN dbo.HJGL_WeldJoint AS WeldJoint ON WeldJoint.WeldJointId=PointBatchItem.WeldJointId
+LEFT JOIN dbo.HJGL_Pipeline AS Pipeline ON Pipeline.PipelineId=WeldJoint.PipelineId
+LEFT JOIN dbo.WBS_UnitWork AS UnitWork ON UnitWork.UnitWorkId=Pipeline.UnitWorkId
+LEFT JOIN dbo.HJGL_WeldingDaily AS WeldingDaily ON WeldingDaily.WeldingDailyId=WeldJoint.WeldingDailyId
+LEFT JOIN dbo.Base_PipingClass AS PipingClass ON PipingClass.PipingClassId=Pipeline.PipingClassId
+LEFT JOIN SitePerson_Person AS BackingWelder ON BackingWelder.PersonId=WeldJoint.BackingWelderId
+LEFT JOIN SitePerson_Person AS CoverWelder ON CoverWelder.PersonId=WeldJoint.CoverWelderId
+LEFT JOIN Base_WeldType AS WeldType ON WeldType.WeldTypeId=WeldJoint.WeldTypeId
+LEFT JOIN HJGL_Hard_TrustItem HardTrustItem ON HardTrustItem.WeldJointId=PointBatchItem.WeldJointId
+where (WeldJoint.IsHotProess!=1 or (WeldJoint.IsHotProess=1 and HardTrustItem.IsPass=1))
+and BackingWelder.ProjectId=Pipeline.ProjectId and CoverWelder.ProjectId=Pipeline.ProjectId
+
+
+GO
+
+
diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
index 52b765e6..8266f0e6 100644
--- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
+++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
@@ -658,6 +658,7 @@
+
@@ -8534,6 +8535,13 @@
PointTrust.aspx
+
+ PointWeldJointView.aspx
+ ASPXCodeBehind
+
+
+ PointWeldJointView.aspx
+
TrustBatch.aspx
ASPXCodeBehind
diff --git a/SGGL/FineUIPro.Web/HJGL/PointTrust/PointBatch.aspx b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointBatch.aspx
index bb60c63b..4920bdb9 100644
--- a/SGGL/FineUIPro.Web/HJGL/PointTrust/PointBatch.aspx
+++ b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointBatch.aspx
@@ -133,6 +133,8 @@
+
+
diff --git a/SGGL/FineUIPro.Web/HJGL/PointTrust/PointBatch.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointBatch.aspx.cs
index e2693c6e..0942ba3a 100644
--- a/SGGL/FineUIPro.Web/HJGL/PointTrust/PointBatch.aspx.cs
+++ b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointBatch.aspx.cs
@@ -647,8 +647,103 @@ namespace FineUIPro.Web.HJGL.PointTrust
{
if (!string.IsNullOrEmpty(Grid1.SelectedRowID))
{
+ Model.SGGLDB db = Funs.DB;
+ var weldJoint = (from x in db.HJGL_WeldJoint
+ join y in db.HJGL_Batch_PointBatchItem on x.WeldJointId equals y.WeldJointId
+ where y.PointBatchItemId == Grid1.SelectedRowID
+ select x).FirstOrDefault();
+ Model.Project_Sys_Set batchSet = BLL.Project_SysSetService.GetSysSetBySetId("5", this.CurrUser.LoginProjectId);
+ if (batchSet != null && weldJoint != null)
+ {
+ int needJointNum = 0;
+ int pointNumG = 0;
+ int pointNumA = 0;
+ if (batchSet.SetValue.Contains("6")) //按管线组批
+ {
+ var pipeline = (from x in db.HJGL_Pipeline
+ join y in db.HJGL_WeldJoint on x.PipelineId equals y.PipelineId
+ join z in db.HJGL_Batch_PointBatchItem on y.WeldJointId equals z.WeldJointId
+ where z.PointBatchId == this.PointBatchId
+ select x).FirstOrDefault();
+ if (pipeline != null)
+ {
+ this.lbPipelineCode.Text = pipeline.PipelineCode;
+ Model.Base_DetectionRate rate = BLL.Base_DetectionRateService.GetDetectionRateByDetectionRateId(pipeline.DetectionRateId);
+ if (rate != null)
+ {
+ int totalJointCount = db.HJGL_WeldJoint.Count(x => x.PipelineId == pipeline.PipelineId);
+ needJointNum = Convert.ToInt32(Math.Ceiling((totalJointCount * rate.DetectionRateValue.Value) * 0.01));
+ // 安装口检测数量
+ pointNumG = Convert.ToInt32(Math.Ceiling(needJointNum * 0.4));
+ // 预制口要检测的数量
+ pointNumA = needJointNum - pointNumG;
+ var pointGNum = (from x in db.HJGL_Batch_PointBatchItem
+ join y in db.HJGL_WeldJoint on x.WeldJointId equals y.WeldJointId
+ where y.PipelineId == pipeline.PipelineId && x.PointState == "1" && y.JointAttribute == "安装口"
+ select x).Count();
+ var pointNotGNum = (from x in db.HJGL_Batch_PointBatchItem
+ join y in db.HJGL_WeldJoint on x.WeldJointId equals y.WeldJointId
+ where y.PipelineId == pipeline.PipelineId && x.PointState == "1" && y.JointAttribute == "预制口"
+ select x).Count();
+ if (weldJoint.JointAttribute == "安装口" && pointGNum >= pointNumG)
+ {
+ Alert.ShowInTop("安装口已达检测标准,无需再点此安装口!", MessageBoxIcon.Warning);
+ return;
+ }
+ if (weldJoint.JointAttribute == "预制口" && pointNotGNum >= pointNumA)
+ {
+ Alert.ShowInTop("预制口已达检测标准,无需再点此预制口!", MessageBoxIcon.Warning);
+ return;
+ }
+ }
+ }
+
+ }
+ else //不按管线组批
+ {
+ string unitWorkId = this.tvControlItem.SelectedNode.ParentNode.ParentNode.ParentNode.NodeID;
+ string rateId = this.tvControlItem.SelectedNode.ParentNode.NodeID.Split('|')[0];
+ string detectionType = this.tvControlItem.SelectedNode.ParentNode.ParentNode.NodeID.Split('|')[0];
+ int totalJointNum = (from x in db.HJGL_WeldJoint
+ join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId
+ where y.DetectionRateId == rateId && y.UnitWorkId == unitWorkId && y.DetectionType == detectionType
+ select x).Count();
+ Model.Base_DetectionRate rate = BLL.Base_DetectionRateService.GetDetectionRateByDetectionRateId(rateId);
+ if (rate != null)
+ {
+ needJointNum = Convert.ToInt32(Math.Ceiling((totalJointNum * rate.DetectionRateValue.Value) * 0.01));
+ // 安装口检测数量
+ pointNumG = Convert.ToInt32(Math.Ceiling(needJointNum * 0.4));
+ // 预制口要检测的数量
+ pointNumA = needJointNum - pointNumG;
+ var pointGNum = (from x in db.HJGL_Batch_PointBatchItem
+ join y in db.HJGL_Batch_PointBatch on x.PointBatchId equals y.PointBatchId
+ join z in db.HJGL_WeldJoint on x.WeldJointId equals z.WeldJointId
+ where y.DetectionRateId == rateId && y.UnitWorkId == unitWorkId && y.DetectionTypeId == detectionType
+ && x.PointState == "1" && z.JointAttribute == "安装口"
+ select x).Count();
+ var pointNotGNum = (from x in db.HJGL_Batch_PointBatchItem
+ join y in db.HJGL_Batch_PointBatch on x.PointBatchId equals y.PointBatchId
+ join z in db.HJGL_WeldJoint on x.WeldJointId equals z.WeldJointId
+ where y.DetectionRateId == rateId && y.UnitWorkId == unitWorkId && y.DetectionTypeId == detectionType
+ && x.PointState == "1" && z.JointAttribute == "预制口"
+ select x).Count();
+ if (weldJoint.JointAttribute == "安装口" && pointGNum >= pointNumG)
+ {
+ Alert.ShowInTop("安装口已达检测标准,无需再点此安装口!", MessageBoxIcon.Warning);
+ return;
+ }
+ if (weldJoint.JointAttribute == "预制口" && pointNotGNum >= pointNumA)
+ {
+ Alert.ShowInTop("预制口已达检测标准,无需再点此预制口!", MessageBoxIcon.Warning);
+ return;
+ }
+ }
+ }
+ }
PointBatchDetailService.UpdatePointBatchDetail(Grid1.SelectedRowID, "1", System.DateTime.Now);
this.BindGrid();
+ tvControlItem_NodeCommand(null, null);
Alert.ShowInTop("已成功点口!", MessageBoxIcon.Success);
}
else
@@ -893,5 +988,18 @@ namespace FineUIPro.Web.HJGL.PointTrust
return newTrustCode;
}
+
+ ///
+ /// 已检测口明细
+ ///
+ ///
+ ///
+ protected void btnShow_Click(object sender, EventArgs e)
+ {
+ string unitWorkId = this.tvControlItem.SelectedNode.ParentNode.ParentNode.ParentNode.NodeID;
+ string rateId = this.tvControlItem.SelectedNode.ParentNode.NodeID.Split('|')[0];
+ string detectionType = this.tvControlItem.SelectedNode.ParentNode.ParentNode.NodeID.Split('|')[0];
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PointWeldJointView.aspx?unitWorkId={0}&rateId={1}&detectionType={2}", unitWorkId, rateId, detectionType, "新增 - ")));
+ }
}
}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/HJGL/PointTrust/PointBatch.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointBatch.aspx.designer.cs
index 00266dd5..e2887ee5 100644
--- a/SGGL/FineUIPro.Web/HJGL/PointTrust/PointBatch.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointBatch.aspx.designer.cs
@@ -318,6 +318,15 @@ namespace FineUIPro.Web.HJGL.PointTrust {
///
protected global::FineUIPro.Label lbPointJointNum2;
+ ///
+ /// btnShow 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnShow;
+
///
/// lbLastJointNum2 控件。
///
diff --git a/SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx
new file mode 100644
index 00000000..1c66d2a0
--- /dev/null
+++ b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx
@@ -0,0 +1,91 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PointWeldJointView.aspx.cs" Inherits="FineUIPro.Web.HJGL.PointTrust.PointWeldJointView" %>
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx.cs
new file mode 100644
index 00000000..cc586d61
--- /dev/null
+++ b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx.cs
@@ -0,0 +1,87 @@
+using BLL;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.SqlClient;
+using System.Linq;
+
+namespace FineUIPro.Web.HJGL.PointTrust
+{
+ public partial class PointWeldJointView : PageBase
+ {
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ string unitWorkId = Request.Params["unitWorkId"];
+ string detectionType = Request.Params["detectionType"];
+ string rateId = Request.Params["rateId"];
+ Model.SGGLDB db = Funs.DB;
+ var pointJoints = (from x in db.HJGL_Batch_PointBatchItem
+ join y in db.HJGL_Batch_PointBatch on x.PointBatchId equals y.PointBatchId
+ join z in db.HJGL_WeldJoint on x.WeldJointId equals z.WeldJointId
+ where y.DetectionRateId == rateId && y.UnitWorkId == unitWorkId && y.DetectionTypeId == detectionType
+ && x.PointState == "1"
+ select new { x.WeldJointId, z.WeldJointCode, z.JointAttribute });
+ this.lbDef.Text = "预制口:" + pointJoints.Count(x => x.JointAttribute == "预制口").ToString() + "个,安装口:" + pointJoints.Count(x => x.JointAttribute == "安装口").ToString()+"个。";
+ BindGrid();
+ }
+ }
+ #region 绑定数据
+ ///
+ /// 绑定数据
+ ///
+ public void BindGrid()
+ {
+ string strSql = @"SELECT PointBatchItemId,PointBatchId,WeldJointId,PointState,PointDate,RepairDate,CutDate,WeldJointCode,IsBuildTrust,WeldTypeCode,
+ JointAttribute ,JointArea,IsWelderFirst,Size,WeldingDate,PipelineCode,PipingClassName,PointIsAudit,BackingWelderCode,CoverWelderCode
+ FROM dbo.View_HJGL_Batch_PointBatchItem
+ WHERE UnitWorkId=@UnitWorkId and DetectionTypeId=@DetectionTypeId and DetectionRateId=@DetectionRateId and PointState='点口'";
+ List listStr = new List();
+ listStr.Add(new SqlParameter("@UnitWorkId", Request.Params["unitWorkId"]));
+ listStr.Add(new SqlParameter("@DetectionTypeId", Request.Params["detectionType"]));
+ listStr.Add(new SqlParameter("@DetectionRateId", Request.Params["rateId"]));
+ if (!string.IsNullOrEmpty(txtpipelinecode.Text.Trim()))
+ {
+ strSql += " and PipelineCode like @PipelineCode ";
+ listStr.Add(new SqlParameter("@PipelineCode", "%" + txtpipelinecode.Text.Trim() + "%"));
+ }
+ SqlParameter[] parameter = listStr.ToArray();
+ DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
+
+ Grid1.RecordCount = tb.Rows.Count;
+ // tb = GetFilteredTable(Grid1.FilteredData, tb);
+ var table = this.GetPagedDataTable(Grid1, tb);
+ Grid1.DataSource = table;
+ Grid1.DataBind();
+ }
+
+ #endregion
+ protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ BindGrid();
+ }
+
+ protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
+ {
+ BindGrid();
+ }
+
+ protected void btnQuery_Click(object sender, EventArgs e)
+ {
+ this.BindGrid();
+ }
+
+ #region 排序
+ ///
+ /// 排序
+ ///
+ ///
+ ///
+ protected void Grid1_Sort(object sender, GridSortEventArgs e)
+ {
+ BindGrid();
+ }
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx.designer.cs
new file mode 100644
index 00000000..537048b0
--- /dev/null
+++ b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx.designer.cs
@@ -0,0 +1,114 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.HJGL.PointTrust {
+
+
+ public partial class PointWeldJointView {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// Panel1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel Panel1;
+
+ ///
+ /// Grid1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid Grid1;
+
+ ///
+ /// Toolbar1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar1;
+
+ ///
+ /// txtpipelinecode 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtpipelinecode;
+
+ ///
+ /// btnQuery 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnQuery;
+
+ ///
+ /// lbDef 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Label lbDef;
+
+ ///
+ /// ToolbarSeparator1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
+
+ ///
+ /// ToolbarText1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarText ToolbarText1;
+
+ ///
+ /// ddlPageSize 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList ddlPageSize;
+ }
+}
diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.cs
index 7317da8d..6bc37c67 100644
--- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.cs
+++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.cs
@@ -484,7 +484,16 @@ namespace FineUIPro.Web.HJGL.WeldingManage
if (wpqList != null)
{
Model.HJGL_WeldJoint newJot = WeldJointService.GetWeldJointByWeldJointId(jot.WeldJointId);
- Model.WPQ_WPQList wps = BLL.WPQListServiceService.GetWPQById(wpqList.First().WPQId);
+ Model.WPQ_WPQList wps = new Model.WPQ_WPQList();
+ var a = wpqList.FirstOrDefault(x => x.WeldingMethodId == "feb1234c-a538-476f-99ac-7b3ab15997c1"); //优先匹配GTAW+SMAW的焊评
+ if (a == null)
+ {
+ wps = BLL.WPQListServiceService.GetWPQById(wpqList.First().WPQId);
+ }
+ else
+ {
+ wps = BLL.WPQListServiceService.GetWPQById(a.WPQId);
+ }
newJot.WPQId = wps.WPQId;
newJot.WeldJointId = jot.WeldJointId;
diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointEdit.aspx.cs
index ec9605fb..a93fde9f 100644
--- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointEdit.aspx.cs
@@ -34,7 +34,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
ViewState["WeldJointId"] = value;
}
}
-
+
protected void Page_Load(object sender, EventArgs e)
{
@@ -235,10 +235,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage
//string perfix = txtPipelineCode.Text + "/Z-";
string perfix = txtPipelineCode.Text + "/";
this.txtWeldJointCode.Text = perfix;
-
- // txtWeldJointCode.Text = BLL.SQLHelper.RunProcNewIdByProjectId("SpGetNewCode4ByProjectId", "dbo.HJGL_WeldJoint", "WeldJointCode", this.CurrUser.LoginProjectId, perfix);
- // txtWeldJointCode.Text = txtWeldJointCode.Text.Replace(perfix, "");
+ // txtWeldJointCode.Text = BLL.SQLHelper.RunProcNewIdByProjectId("SpGetNewCode4ByProjectId", "dbo.HJGL_WeldJoint", "WeldJointCode", this.CurrUser.LoginProjectId, perfix);
+
+ // txtWeldJointCode.Text = txtWeldJointCode.Text.Replace(perfix, "");
}
}
@@ -322,7 +322,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
///
private void SaveData()
{
- // if (string.IsNullOrEmpty(this.txtWeldJointCode.Text.Trim()) || this.drpPipingClass.SelectedValue == BLL.Const._Null || this.drpMaterial1.SelectedValue == BLL.Const._Null || this.drpMaterial2.SelectedValue == BLL.Const._Null || this.drpWeldTypeCode.SelectedValue == BLL.Const._Null || string.IsNullOrEmpty(this.hdWeldingMethodId.Text) || string.IsNullOrEmpty(this.txtWpqId.Text.Trim()))
+ // if (string.IsNullOrEmpty(this.txtWeldJointCode.Text.Trim()) || this.drpPipingClass.SelectedValue == BLL.Const._Null || this.drpMaterial1.SelectedValue == BLL.Const._Null || this.drpMaterial2.SelectedValue == BLL.Const._Null || this.drpWeldTypeCode.SelectedValue == BLL.Const._Null || string.IsNullOrEmpty(this.hdWeldingMethodId.Text) || string.IsNullOrEmpty(this.txtWpqId.Text.Trim()))
if (string.IsNullOrEmpty(this.txtWeldJointCode.Text.Trim()) || this.drpPipingClass.SelectedValue == BLL.Const._Null || this.drpMaterial1.SelectedValue == BLL.Const._Null || this.drpMaterial2.SelectedValue == BLL.Const._Null || this.drpWeldTypeCode.SelectedValue == BLL.Const._Null)
{
Alert.ShowInTop("页面必填项不能为空", MessageBoxIcon.Warning);
@@ -337,22 +337,22 @@ namespace FineUIPro.Web.HJGL.WeldingManage
//if (!this.txtWeldJointCode.Text.Contains("G"))
//{
- int jointCode = Funs.GetNewIntOrZero(this.txtWeldJointCode.Text.Trim());
- if (jointCode != 0)
+ int jointCode = Funs.GetNewIntOrZero(this.txtWeldJointCode.Text.Trim());
+ if (jointCode != 0)
+ {
+ if (jointCode < 10)
{
- if (jointCode < 10)
- {
- joint.WeldJointCode = "0" + Convert.ToString(jointCode);
- }
- else
- {
- joint.WeldJointCode = Convert.ToString(jointCode);
- }
+ joint.WeldJointCode = "0" + Convert.ToString(jointCode);
}
else
{
- joint.WeldJointCode = this.txtWeldJointCode.Text;
+ joint.WeldJointCode = Convert.ToString(jointCode);
}
+ }
+ else
+ {
+ joint.WeldJointCode = this.txtWeldJointCode.Text;
+ }
//}
//else
//{
@@ -370,7 +370,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
}
joint.Size = Funs.GetNewDecimal(this.txtSize.Text.Trim());
joint.Dia = Funs.GetNewDecimal(this.txtDia.Text.Trim());
- joint.DNDia=txtDNDia.Text.Trim();
+ joint.DNDia = txtDNDia.Text.Trim();
joint.Thickness = Funs.GetNewDecimal(this.txtThickness.Text.Trim());
//if (this.drpComponent1.SelectedValue != BLL.Const._Null)
//{
@@ -644,7 +644,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
{
var wpsRod = BLL.Base_ConsumablesService.GetConsumablesByConsumablesId(wps.WeldingRod);
var matRod = BLL.Base_ConsumablesService.GetConsumablesByConsumablesId(drpWeldingRod.SelectedValue);
- if (IsCoverClass(wpsRod.SteelType, matRod.SteelType))
+ if (wpsRod != null && matRod != null && IsCoverClass(wpsRod.SteelType, matRod.SteelType))
{
}
@@ -683,7 +683,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
{
var wpsWire = BLL.Base_ConsumablesService.GetConsumablesByConsumablesId(wps.WeldingWire);
var matWire = BLL.Base_ConsumablesService.GetConsumablesByConsumablesId(drpWeldingWire.SelectedValue);
- if (IsCoverClass(wpsWire.SteelType, matWire.SteelType))
+ if (wpsWire != null && matWire != null && IsCoverClass(wpsWire.SteelType, matWire.SteelType))
{
}
diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingConDate.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingConDate.aspx.cs
index 91bfb84b..2d19afcc 100644
--- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingConDate.aspx.cs
+++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingConDate.aspx.cs
@@ -415,8 +415,16 @@ namespace FineUIPro.Web.HJGL.WeldingManage
Model.HJGL_WeldJoint newJot = new Model.HJGL_WeldJoint();
if (wpqList != null)
{
-
- Model.WPQ_WPQList wps = BLL.WPQListServiceService.GetWPQById(wpqList.First().WPQId);
+ Model.WPQ_WPQList wps = new Model.WPQ_WPQList();
+ var a = wpqList.FirstOrDefault(x => x.WeldingMethodId == "feb1234c-a538-476f-99ac-7b3ab15997c1"); //优先匹配GTAW+SMAW的焊评
+ if (a == null)
+ {
+ wps = BLL.WPQListServiceService.GetWPQById(wpqList.First().WPQId);
+ }
+ else
+ {
+ wps = BLL.WPQListServiceService.GetWPQById(a.WPQId);
+ }
newJot.WPQId = wps.WPQId;
newJot.WeldJointId = jot.WeldJointId;
@@ -483,11 +491,11 @@ namespace FineUIPro.Web.HJGL.WeldingManage
Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning);
return;
}
- if (BLL.WeldTaskService.GetWeldTaskByWeldJointId(Grid1.SelectedRowID) != null) //已下任务单,不可修改数据
- {
- Alert.ShowInTop("该焊口已生成焊接任务单,不能编辑!", MessageBoxIcon.Warning);
- return;
- }
+ //if (BLL.WeldTaskService.GetWeldTaskByWeldJointId(Grid1.SelectedRowID) != null) //已下任务单,不可修改数据
+ //{
+ // Alert.ShowInTop("该焊口已生成焊接任务单,不能编辑!", MessageBoxIcon.Warning);
+ // return;
+ //}
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("WeldJointEdit.aspx?WeldJointId={0}&flag=2", Grid1.SelectedRowID, "维护 - ")));
}
else
diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs
index 348bf7fd..6b2ee015 100644
--- a/SGGL/Model/Model.cs
+++ b/SGGL/Model/Model.cs
@@ -269072,6 +269072,8 @@ namespace Model
private string _DetectionTypeId;
+ private string _DetectionRateId;
+
private string _PointBatchCode;
private string _UnitWorkId;
@@ -269216,6 +269218,22 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DetectionRateId", DbType="NVarChar(50)")]
+ public string DetectionRateId
+ {
+ get
+ {
+ return this._DetectionRateId;
+ }
+ set
+ {
+ if ((this._DetectionRateId != value))
+ {
+ this._DetectionRateId = value;
+ }
+ }
+ }
+
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PointBatchCode", DbType="NVarChar(100)")]
public string PointBatchCode
{