diff --git a/SGGL/BLL/HJGL/WeldingManage/WeldingDailyService.cs b/SGGL/BLL/HJGL/WeldingManage/WeldingDailyService.cs index 7943929a..160fcfb8 100644 --- a/SGGL/BLL/HJGL/WeldingManage/WeldingDailyService.cs +++ b/SGGL/BLL/HJGL/WeldingManage/WeldingDailyService.cs @@ -382,6 +382,53 @@ namespace BLL }, out totalCount).FirstOrDefault(); } + /// + /// 更新待审核明细的实际施工工艺参数。 + /// + /// 待审核明细及四项工艺参数 + /// 错误信息,空字符串表示成功 + public static string UpdateWeldingDailyTempDetailParameters(Model.WeldingDailyTempDetailEditInput input) + { + if (input == null || string.IsNullOrWhiteSpace(input.TempDetailId) + || string.IsNullOrWhiteSpace(input.ProjectId)) + { + return "待审核明细或项目不能为空"; + } + + string weldingMethodId = NormalizeOptionalId(input.WeldingMethodId); + string weldTypeId = NormalizeOptionalId(input.WeldTypeId); + string weldingWire = NormalizeOptionalId(input.WeldingWire); + string weldingRod = NormalizeOptionalId(input.WeldingRod); + string parameterError = ValidatePendingWeldingParameters( + weldingMethodId, weldTypeId, weldingWire, weldingRod); + if (!string.IsNullOrEmpty(parameterError)) + { + return parameterError; + } + + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + var detail = db.HJGL_WeldingDailyTempDetail.FirstOrDefault(x => + x.TempDetailId == input.TempDetailId && x.ProjectId == input.ProjectId); + if (detail == null) + { + return "待审核明细不存在"; + } + if (detail.AuditState >= AuditStateApproved) + { + return "该明细已完成审核,不能修改"; + } + + // 编辑页只维护临时工艺快照;正式焊口仍在专工审核通过时统一回写。 + detail.WeldingMethodId = weldingMethodId; + detail.WeldTypeId = weldTypeId; + detail.WeldingWire = weldingWire; + detail.WeldingRod = weldingRod; + db.SubmitChanges(); + } + return string.Empty; + } + /// /// 构造待审核查询。PC端列表和接口列表、明细均从这里读取,确保字段映射和待审核状态一致。 /// @@ -1109,6 +1156,11 @@ namespace BLL } } + private static string NormalizeOptionalId(string value) + { + return string.IsNullOrWhiteSpace(value) ? null : value.Trim(); + } + private static string FirstNotEmpty(params string[] values) { return values == null ? null : values.FirstOrDefault(x => !string.IsNullOrWhiteSpace(x)); diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 1c442671..f9a771b8 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -1719,6 +1719,7 @@ + @@ -11584,6 +11585,13 @@ WeldReport.aspx ASPXCodeBehind + + WeldingDailyTempDetailEdit.aspx + ASPXCodeBehind + + + WeldingDailyTempDetailEdit.aspx + WeldAppearanceCheck.aspx ASPXCodeBehind @@ -17342,4 +17350,4 @@ --> - \ No newline at end of file + diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx index 7c2b419a..7888c75b 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx @@ -266,6 +266,11 @@ + + @@ -364,6 +369,10 @@ +