feat(hjgl): 完善焊接任务与质量管理流程

This commit is contained in:
2026-08-19 17:13:33 +08:00
parent 08792e0dc8
commit 679e9f6cec
68 changed files with 2481 additions and 1170 deletions
@@ -52,6 +52,7 @@ namespace BLL
.Select(x => new Model.WeldAppearanceCheckItem
{
AppearanceCheckId = x.c.AppearanceCheckId,
CheckCode = x.c.CheckCode,
ProjectId = x.c.ProjectId,
WeldJointId = x.c.WeldJointId,
PipelineCode = x.w.PipelineCode,
@@ -62,6 +63,12 @@ namespace BLL
CheckPersonName = x.CheckPersonName,
CheckTime = x.c.CheckTime,
Remark = x.c.Remark,
WeldReinforcement = x.c.WeldReinforcement,
WeldHeight = x.c.WeldHeight,
WeldWidth = x.c.WeldWidth,
SurfaceDefect = x.c.SurfaceDefect,
PreheatTemperature = x.c.PreheatTemperature,
InterpassTemperature = x.c.InterpassTemperature,
CreateTime = x.c.CreateTime
}).ToList();
PopulateAttachUrls(data);
@@ -164,6 +171,16 @@ namespace BLL
throw new ArgumentException("只能对已焊接焊口进行外观检测。");
}
string unitWorkName = (from pipeline in db.HJGL_Pipeline
join unitWork in db.WBS_UnitWork on pipeline.UnitWorkId equals unitWork.UnitWorkId
where pipeline.PipelineId == joint.PipelineId
select unitWork.UnitWorkName).FirstOrDefault();
if (string.IsNullOrWhiteSpace(unitWorkName))
{
throw new ArgumentException("焊口所属单位工程不存在,无法生成检测编号。");
}
DateTime checkTime = item.CheckTime ?? DateTime.Now;
string id = string.IsNullOrWhiteSpace(item.AppearanceCheckId)
? Guid.NewGuid().ToString()
: item.AppearanceCheckId;
@@ -192,10 +209,18 @@ namespace BLL
check.ProjectId = string.IsNullOrEmpty(item.ProjectId) ? joint.ProjectId : item.ProjectId;
check.WeldJointId = item.WeldJointId;
// 检测编号由单位工程和检测日期统一生成,PC页面与WebAPI保存共用此规则。
check.CheckCode = "FCC-" + unitWorkName.Trim() + "-" + checkTime.ToString("yyyyMMdd");
check.IsQualified = item.IsQualified;
check.CheckPerson = item.CheckPerson;
check.CheckTime = item.CheckTime ?? DateTime.Now;
check.CheckTime = checkTime;
check.Remark = item.Remark;
check.WeldReinforcement = item.WeldReinforcement;
check.WeldHeight = item.WeldHeight;
check.WeldWidth = item.WeldWidth;
check.SurfaceDefect = item.SurfaceDefect;
check.PreheatTemperature = item.PreheatTemperature;
check.InterpassTemperature = item.InterpassTemperature;
db.SubmitChanges();
if (!string.IsNullOrWhiteSpace(item.AttachUrl))
@@ -250,6 +275,7 @@ namespace BLL
select new Model.WeldAppearanceCheckItem
{
AppearanceCheckId = c.AppearanceCheckId,
CheckCode = c.CheckCode,
ProjectId = c.ProjectId,
WeldJointId = c.WeldJointId,
PipelineCode = w.PipelineCode,
@@ -260,6 +286,12 @@ namespace BLL
CheckPersonName = p == null ? string.Empty : p.PersonName,
CheckTime = c.CheckTime,
Remark = c.Remark,
WeldReinforcement = c.WeldReinforcement,
WeldHeight = c.WeldHeight,
WeldWidth = c.WeldWidth,
SurfaceDefect = c.SurfaceDefect,
PreheatTemperature = c.PreheatTemperature,
InterpassTemperature = c.InterpassTemperature,
CreateTime = c.CreateTime
};
}