From 0fb67e20069f3ea9aa4f0240fdc915cb300dc2d8 Mon Sep 17 00:00:00 2001
From: fei550 <1420031550@qq.com>
Date: Thu, 13 Aug 2026 16:58:22 +0800
Subject: [PATCH] =?UTF-8?q?fix(hjgl):=20=E4=BF=AE=E5=A4=8D=E7=84=8A?=
=?UTF-8?q?=E5=8F=A3=E6=89=93=E5=8D=B0=E4=B8=8E=E9=98=B2=E8=85=90=E6=95=B0?=
=?UTF-8?q?=E6=8D=AE=E5=A4=84=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
DataBase/版本日志/SGGLDB_V2026-08-13-lpf.sql | 2 +
.../API/HJGL/APIPreWeldInspectionService.cs | 4 +-
.../WeldingManage/PreWeldInspectionService.cs | 6 ++-
.../File/Fastreport/焊口打印_80x42.frx | 42 ++++++++++---------
.../WeldingManage/PipelineListPDMSIn.aspx.cs | 3 +-
.../HJGL/WeldingManage/WeldTask.aspx.cs | 26 ++++++++----
6 files changed, 50 insertions(+), 33 deletions(-)
create mode 100644 DataBase/版本日志/SGGLDB_V2026-08-13-lpf.sql
diff --git a/DataBase/版本日志/SGGLDB_V2026-08-13-lpf.sql b/DataBase/版本日志/SGGLDB_V2026-08-13-lpf.sql
new file mode 100644
index 00000000..c0ec178f
--- /dev/null
+++ b/DataBase/版本日志/SGGLDB_V2026-08-13-lpf.sql
@@ -0,0 +1,2 @@
+ ALTER TABLE HJGL_WeldAppearanceCheck DROP CONSTRAINT FK_HJGL_WeldAppearanceCheck_WeldJoint;
+ ALTER TABLE HJGL_Pipeline ALTER COLUMN PaintId nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL;
diff --git a/SGGL/BLL/API/HJGL/APIPreWeldInspectionService.cs b/SGGL/BLL/API/HJGL/APIPreWeldInspectionService.cs
index d390bfd5..93b8d734 100644
--- a/SGGL/BLL/API/HJGL/APIPreWeldInspectionService.cs
+++ b/SGGL/BLL/API/HJGL/APIPreWeldInspectionService.cs
@@ -137,9 +137,9 @@ namespace BLL
///
/// 按材料编码获取防腐检查记录
///
- public static List GetAntiCorrosionChecksByMaterialCode(string materialCode, string projectId)
+ public static List GetAntiCorrosionChecksByMaterialCode(string barCode, string projectId)
{
- return PreWeldInspectionService.GetAntiCorrosionChecksByMaterialCode(materialCode, projectId);
+ return PreWeldInspectionService.GetAntiCorrosionChecksByMaterialCode(barCode, projectId);
}
///
/// 按焊口获取防腐检查记录列表
diff --git a/SGGL/BLL/HJGL/WeldingManage/PreWeldInspectionService.cs b/SGGL/BLL/HJGL/WeldingManage/PreWeldInspectionService.cs
index b26fef3b..8e8c110a 100644
--- a/SGGL/BLL/HJGL/WeldingManage/PreWeldInspectionService.cs
+++ b/SGGL/BLL/HJGL/WeldingManage/PreWeldInspectionService.cs
@@ -604,18 +604,20 @@ namespace BLL
///
/// 按材料编码获取防腐记录列表
///
- public static List GetAntiCorrosionChecksByMaterialCode(string materialCode, string projectId)
+ public static List GetAntiCorrosionChecksByMaterialCode(string barCode, string projectId)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
var query = from r in db.HJGL_AntiCorrosionCheckRecord
join m in db.HJGL_MaterialCodeLib on r.MaterialCode equals m.MaterialCode into materialJoin
from m in materialJoin.DefaultIfEmpty()
+ join code in db.Tw_InputDetailBarCode on m.MaterialCode equals code.MaterialCode into barCodeJoin
+ from code in barCodeJoin.DefaultIfEmpty()
join paint in db.Tw_PaintCodeDict on r.PaintId equals paint.Id into paintJoin
from paint in paintJoin.DefaultIfEmpty()
join person in db.Person_Persons on r.CheckPerson equals person.PersonId into personJoin
from person in personJoin.DefaultIfEmpty()
- where r.MaterialCode == materialCode && (string.IsNullOrEmpty(projectId) || r.ProjectId == projectId)
+ where code.BarCode == barCode && (string.IsNullOrEmpty(projectId) || r.ProjectId == projectId)
orderby r.CheckTime descending
select new Model.AntiCorrosionCheckRecordItem
{
diff --git a/SGGL/FineUIPro.Web/File/Fastreport/焊口打印_80x42.frx b/SGGL/FineUIPro.Web/File/Fastreport/焊口打印_80x42.frx
index e180c4ca..6f3dcfe3 100644
--- a/SGGL/FineUIPro.Web/File/Fastreport/焊口打印_80x42.frx
+++ b/SGGL/FineUIPro.Web/File/Fastreport/焊口打印_80x42.frx
@@ -1,5 +1,5 @@
-
+
using System;
using System.Collections;
using System.Collections.Generic;
@@ -99,7 +99,7 @@ namespace FastReport
}
-
+
@@ -108,6 +108,7 @@ namespace FastReport
+
@@ -140,26 +141,29 @@ namespace FastReport
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineListPDMSIn.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineListPDMSIn.aspx.cs
index cd5fb217..6897a8a7 100644
--- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineListPDMSIn.aspx.cs
+++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineListPDMSIn.aspx.cs
@@ -802,7 +802,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
if (!string.IsNullOrEmpty(col30))
{
// AF列为非必填项,只有填写时才按防腐字典校验并回填字典ID
- var paint = getPaintCodeDict.FirstOrDefault(x => !string.IsNullOrEmpty(x.PaintCode) && x.PaintCode.Contains(col30));
+ // LINQ to SQL 不支持翻译 string.IsNullOrEmpty;AF 已确认非空,直接按字典编码精确匹配。
+ var paint = getPaintCodeDict.FirstOrDefault(x => x.PaintCode == col30);
if (paint == null)
{
result.Add("第" + (i + 1).ToString() + "行," + "防腐等级" + "【" + col30 + "】不存在!" + "|");
diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldTask.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldTask.aspx.cs
index fd456007..29d189e6 100644
--- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldTask.aspx.cs
+++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldTask.aspx.cs
@@ -1422,15 +1422,23 @@ namespace FineUIPro.Web.HJGL.WeldingManage
{
BLL.FastReportService.ResetData();
- var result = Funs.DB.View_HJGL_WeldJoint.Where(x => jointids.Contains(x.WeldJointId)).Select(x => new
- {
- pipelineCode = x.PipelineCode,
- Mat = x.MaterialCode,
- WeldJointId = x.WeldJointId,
- Spec = x.Specification,
- SortIndex = x.WeldJointCode.Replace(x.PipelineCode + "/", ""),
- WeldJointPoint=x.WeldJointPoint
- }).OrderBy(x => x.pipelineCode).ThenBy(x => x.SortIndex).ToList();
+ // 防腐等级维护在管线上,打印时由焊口关联管线,再通过防腐字典取得显示代码。
+ var result = (from weldJoint in Funs.DB.View_HJGL_WeldJoint
+ where jointids.Contains(weldJoint.WeldJointId)
+ join pipeline in Funs.DB.HJGL_Pipeline on weldJoint.PipelineId equals pipeline.PipelineId into pipelineGroup
+ from pipeline in pipelineGroup.DefaultIfEmpty()
+ join paint in Funs.DB.Tw_PaintCodeDict on pipeline.PaintId equals paint.Id into paintGroup
+ from paint in paintGroup.DefaultIfEmpty()
+ select new
+ {
+ pipelineCode = weldJoint.PipelineCode,
+ Mat = weldJoint.MaterialCode,
+ WeldJointId = weldJoint.WeldJointId,
+ Spec = weldJoint.Specification,
+ SortIndex = weldJoint.WeldJointCode.Replace(weldJoint.PipelineCode + "/", ""),
+ WeldJointPoint = weldJoint.WeldJointPoint,
+ PaintCode = paint == null ? string.Empty : paint.PaintCode
+ }).OrderBy(x => x.pipelineCode).ThenBy(x => x.SortIndex).ToList();
var tb = LINQToDataTable(result);
if (tb != null && tb.Rows.Count > 0)
{