fix(hjgl): 修复焊口打印与防腐数据处理

This commit is contained in:
2026-08-13 16:58:22 +08:00
parent 5160dde702
commit 0fb67e2006
6 changed files with 50 additions and 33 deletions
@@ -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)
{