feat(hjgl): 完善焊前检查和防腐检查流程

焊前检查需要同时覆盖下料、组对和防腐检查,并支持移动端查询与保存。
扩展焊前检查模型、服务和页面字段,补充检查结果、不合格原因、整改要求、
附件和防腐检查记录,便于按焊口和材料追溯检查过程。
This commit is contained in:
2026-07-07 10:40:21 +08:00
parent 02b524b895
commit bb6615ebb0
57 changed files with 5035 additions and 2057 deletions
@@ -204,7 +204,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
// string result = string.Empty;
List<string> result = new List<string>();
//pds = BLL.Funs.FilterBlankLines(pds);
if (count < 28)
if (count < 32)
{
responeData.code = 0;
responeData.message = "导入Excel格式错误!Excel只有" + count.ToString().Trim() + "列";
@@ -224,6 +224,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
var getPurgeMethod = from x in db.Base_PurgeMethod select x;
var getMaterial = from x in db.Base_Material select x;
var getWeldType = from x in db.Base_WeldType select x;
var getPaintCodeDict = from x in db.Tw_PaintCodeDict where x.IsUsed select x;
//var getComponents = from x in Funs.DB.Base_Components where x.ProjeceId == this.CurrUser.LoginProjectId select x;
Model.WBS_UnitWork unitWork = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(Request.Params["UnitWorkId"]);
@@ -254,6 +255,9 @@ namespace FineUIPro.Web.HJGL.WeldingManage
string col25 = Convert.ToString(pds[i].AA);
string col26 = Convert.ToString(pds[i].AB);
string col27 = Convert.ToString(pds[i].AC);
string col28 = Convert.ToString(pds[i].AD);
string col29 = Convert.ToString(pds[i].AE);
string col30 = Convert.ToString(pds[i].AF);
bool hasRequiredError = false;
Action<string> addRequiredError = colName =>
{
@@ -780,7 +784,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
result.Add("第" + (i + 1).ToString() + "行," + "焊口属性" + "," + "此项为必填项!" + "|");
}
string col28 = Convert.ToString(pds[i].AD);
if (!string.IsNullOrEmpty(col28))
{
if (col28.Trim() == "是")
@@ -790,12 +793,27 @@ namespace FineUIPro.Web.HJGL.WeldingManage
}
// 读取焊点坐标(AE列)
string col29 = Convert.ToString(pds[i].AE);
if (!string.IsNullOrEmpty(col29))
{
pipeline.WeldJointPoint = col29;
}
// 读取防腐等级(AF列),按字典精确匹配后保存字典ID
if (!string.IsNullOrEmpty(col30))
{
// AF列为非必填项,只有填写时才按防腐字典校验并回填字典ID
var paint = getPaintCodeDict.FirstOrDefault(x => !string.IsNullOrEmpty(x.PaintCode) && x.PaintCode.Contains(col30));
if (paint == null)
{
result.Add("第" + (i + 1).ToString() + "行," + "防腐等级" + "【" + col30 + "】不存在!" + "|");
}
else
{
pipeline.PaintCode = col30;
pipeline.PaintId = paint.Id;
}
}
if (!string.IsNullOrEmpty(pipeline.PipelineCode) && !string.IsNullOrEmpty(pipeline.WeldJointCode))
{
pipeline.ProjectId = this.CurrUser.LoginProjectId;
@@ -1006,6 +1024,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
VacuumPressure = x.VacuumPressure,
PCMedium = x.PCMedium,
MaterialId = x.MaterialId,
PaintId = x.PaintId,
Remark = x.Remark,
FlowingSection = x.FlowingSection
}).DistinctBy(temp => new
@@ -1032,6 +1051,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
temp.VacuumPressure,
temp.PCMedium,
temp.MaterialId,
temp.PaintId,
temp.Remark,
temp.FlowingSection
}).ToList();
@@ -1060,6 +1080,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
pipeline.VacuumPressure = pipelines[i].VacuumPressure;
pipeline.PCMedium = pipelines[i].PCMedium;
pipeline.MaterialId = pipelines[i].MaterialId;
pipeline.PaintId = pipelines[i].PaintId;
pipeline.Remark = pipelines[i].Remark;
pipeline.FlowingSection = pipelines[i].FlowingSection;