diff --git a/SGGL/BLL/BaseInfo/PersonManageService.cs b/SGGL/BLL/BaseInfo/PersonManageService.cs index 849d6bb0..d89acfe8 100644 --- a/SGGL/BLL/BaseInfo/PersonManageService.cs +++ b/SGGL/BLL/BaseInfo/PersonManageService.cs @@ -116,7 +116,16 @@ namespace BLL return Funs.DB.BS_Welder.FirstOrDefault(e => e.WED_ID == WED_ID); } - + /// + /// 根据id查询人员信息 + /// + /// + /// + public static Model.BS_Welder GetBSWelderByProjectIdUnitIdAndWED_Code(string projectId,string unitId,string WED_Code) + { + return Funs.DB.BS_Welder.FirstOrDefault(e => e.ProjectId == projectId && e.WED_Unit== unitId && e.WED_Code== WED_Code); + } + /// /// 添加人员信息 /// diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonEdit.aspx.cs index 6cdea5e5..eda3be29 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonEdit.aspx.cs @@ -213,6 +213,17 @@ namespace FineUIPro.Web.CQMS.Comprehensive { inspectionPerson.InspectionPersonId = this.InspectionPersonId; BLL.InspectionPersonService.UpdateInspectionPerson(inspectionPerson); + // 焊工部分 + var oldWelder = BLL.PersonManageService.GetBSWelderByProjectIdUnitIdAndWED_Code(welder.ProjectId, welder.WED_Unit, welder.WED_Code); + if (oldWelder != null) + { + welder.WED_ID = oldWelder.WED_ID; + BLL.PersonManageService.UpdateBSWelder(welder); + } + else + { + BLL.PersonManageService.AddBSWelder(welder); + } } ShowNotify("保存成功!", MessageBoxIcon.Success); PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());