diff --git a/.gitignore b/.gitignore index e11f354b..de7ef9df 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,4 @@ SGGL/.svn /SGGL/CLAUDE.md /SGGL/.claude /SGGL/AGENTS.md +/SGGL/outputs/manual-20260529-prefab-welding/presentations/prefab-welding-doc diff --git a/DataBase/版本日志/SGGLDB_V2026-05-29-lpf.sql b/DataBase/版本日志/SGGLDB_V2026-05-29-lpf.sql new file mode 100644 index 00000000..df276a0a --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2026-05-29-lpf.sql @@ -0,0 +1,37 @@ +IF OBJECT_ID(N'dbo.HJGL_WeldingDailyTempDetail', N'U') IS NULL +BEGIN + CREATE TABLE dbo.HJGL_WeldingDailyTempDetail + ( + TempDetailId NVARCHAR(50) NOT NULL, + ProjectId NVARCHAR(50) NULL, + UnitId NVARCHAR(50) NULL, + UnitWorkId NVARCHAR(50) NULL, + WeldJointId NVARCHAR(50) NOT NULL, + WeldingDate DATETIME NOT NULL, + CoverWelderId NVARCHAR(50) NULL, + BackingWelderId NVARCHAR(50) NULL, + JointAttribute NVARCHAR(50) NULL, + WeldingLocationId NVARCHAR(50) NULL, + WeldingMode NVARCHAR(50) NULL, + AttachUrl NVARCHAR(500) NULL, + SubmitPersonId NVARCHAR(50) NULL, + SubmitDate DATETIME NOT NULL CONSTRAINT DF_HJGL_WeldingDailyTempDetail_SubmitDate DEFAULT(GETDATE()), + AuditState INT NOT NULL CONSTRAINT DF_HJGL_WeldingDailyTempDetail_AuditState DEFAULT(0), + AuditMan NVARCHAR(50) NULL, + AuditDate DATETIME NULL, + AuditRemark NVARCHAR(500) NULL, + CONSTRAINT PK_HJGL_WeldingDailyTempDetail PRIMARY KEY CLUSTERED (TempDetailId), + CONSTRAINT CK_HJGL_WeldingDailyTempDetail_AuditState CHECK (AuditState IN (0, 1)) + ); + + CREATE UNIQUE NONCLUSTERED INDEX UX_HJGL_WeldingDailyTempDetail_Pending + ON dbo.HJGL_WeldingDailyTempDetail (WeldJointId, WeldingDate) + WHERE AuditState = 0; + + CREATE NONCLUSTERED INDEX IX_HJGL_WeldingDailyTempDetail_Query + ON dbo.HJGL_WeldingDailyTempDetail (ProjectId, AuditState, WeldingDate, UnitWorkId); + + CREATE NONCLUSTERED INDEX IX_HJGL_WeldingDailyTempDetail_WeldJointId + ON dbo.HJGL_WeldingDailyTempDetail (WeldJointId); +END +GO \ No newline at end of file diff --git a/SGGL/BLL/API/HJGL/APIPreWeldingDailyService.cs b/SGGL/BLL/API/HJGL/APIPreWeldingDailyService.cs index 1b3a42ba..c0c884f1 100644 --- a/SGGL/BLL/API/HJGL/APIPreWeldingDailyService.cs +++ b/SGGL/BLL/API/HJGL/APIPreWeldingDailyService.cs @@ -255,125 +255,12 @@ namespace BLL public static string SaveWeldingDailyByWeldJointId(string WeldJointId, string Personid, string time) { - string res = ""; - using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) - { - try - { - var peson = db.Person_Persons.FirstOrDefault(x => x.PersonId == Personid); - if (peson == null) - { - res = "人员不存在"; - return res; - } - var joint = db.View_HJGL_WeldJoint.FirstOrDefault(x => x.WeldJointId == WeldJointId); - if (joint == null) - { - res = "焊口不存在"; - return res; - } - var weldingDaily = db.HJGL_WeldingDaily.FirstOrDefault(x => x.WeldingDate.Value.Date == Convert.ToDateTime(time).Date && x.UnitWorkId == joint.UnitWorkId); - var weldTask = db.HJGL_WeldTask.FirstOrDefault(x => x.WeldJointId == joint.WeldJointId); - if (weldingDaily == null) - { - string perfix = string.Format("{0:yyyyMMdd}", System.DateTime.Now) + "-" + peson.PersonName + "-"; - weldingDaily = new Model.HJGL_WeldingDaily(); - weldingDaily.WeldingDailyId = Guid.NewGuid().ToString(); - weldingDaily.WeldingDailyCode = BLL.SQLHelper.RunProcNewId("SpGetThreeNumber", "dbo.HJGL_WeldingDaily", "WeldingDailyCode", joint.ProjectId, perfix); - weldingDaily.WeldingDate = Convert.ToDateTime(time).Date; - weldingDaily.ProjectId = joint.ProjectId; - weldingDaily.UnitWorkId = joint.UnitWorkId; - weldingDaily.UnitId = weldTask?.UnitId; - weldingDaily.Tabler = Personid; - weldingDaily.TableDate = Convert.ToDateTime(time).Date; - db.HJGL_WeldingDaily.InsertOnSubmit(weldingDaily); - db.SubmitChanges(); - } - BLL.HJGL_PipelineComponentjointService.UpdateStateByWeldJointId(WeldJointId, (DateTime)weldingDaily.WeldingDate);//更改预制口实际时间和状态 - PipelineService.UpdataDateByWeldJointId(WeldJointId);//更改安装口时间和状态 - var batchC = BLL.Project_SysSetService.GetSysSetBySetId("5", joint.ProjectId); - if (batchC != null) - { - string batchCondition = batchC.SetValue; - InsertWeldingDailyItem(WeldJointId, Personid, Personid, joint.JointAttribute, weldingDaily.WeldingDate, batchCondition, true, weldingDaily.WeldingDailyId, joint.ProjectId); - } - BLL.WeldJointService.UpdateWeldJointAddG(WeldJointId, joint.JointAttribute, Const.BtnAdd); - } - catch (Exception ex) - { - APICommonService.SaveSysAPILog("erro", ex.ToString(), "-1"); - } - - } - return res; + return BLL.WeldingDailyService.SaveWeldingDailyTempDetailByMobile(WeldJointId, Personid, time, null, 0); } public static string SaveWeldingDailyByWeldJointId(string WeldJointId, string Personid, string time, string weldingLocation) { - string res = ""; - using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) - { - try - { - var peson = db.Person_Persons.FirstOrDefault(x => x.PersonId == Personid); - if (peson == null) - { - res = "人员不存在"; - return res; - } - var joint = db.View_HJGL_WeldJoint.FirstOrDefault(x => x.WeldJointId == WeldJointId); - if (joint == null) - { - res = "焊口不存在"; - return res; - } - var weldingLocationModel = db.Base_WeldingLocation.FirstOrDefault(x => x.WeldingLocationId == weldingLocation); - if (weldingLocationModel == null) - { - res = "焊口位置不存在"; - return res; - } - var weldingDaily = db.HJGL_WeldingDaily.FirstOrDefault(x => x.WeldingDate.Value.Date == Convert.ToDateTime(time).Date && x.UnitWorkId == joint.UnitWorkId); - var weldTask = db.HJGL_WeldTask.FirstOrDefault(x => x.WeldJointId == joint.WeldJointId); - var weldJoint = db.HJGL_WeldJoint.FirstOrDefault(x => x.WeldJointId == joint.WeldJointId); - if (weldingDaily == null) - { - string perfix = string.Format("{0:yyyyMMdd}", System.DateTime.Now) + "-" + peson.PersonName + "-"; - weldingDaily = new Model.HJGL_WeldingDaily(); - weldingDaily.WeldingDailyId = Guid.NewGuid().ToString(); - weldingDaily.WeldingDailyCode = BLL.SQLHelper.RunProcNewId("SpGetThreeNumber", "dbo.HJGL_WeldingDaily", "WeldingDailyCode", joint.ProjectId, perfix); - weldingDaily.WeldingDate = Convert.ToDateTime(time).Date; - weldingDaily.ProjectId = joint.ProjectId; - weldingDaily.UnitWorkId = joint.UnitWorkId; - weldingDaily.UnitId = weldTask?.UnitId; - weldingDaily.Tabler = Personid; - weldingDaily.TableDate = Convert.ToDateTime(time).Date; - db.HJGL_WeldingDaily.InsertOnSubmit(weldingDaily); - db.SubmitChanges(); - } - //更新焊口位置 - if (weldingDaily != null) - { - weldJoint.WeldingLocationId= weldingLocation; - WeldJointService.UpdateWeldJoint(weldJoint); - } - BLL.HJGL_PipelineComponentjointService.UpdateStateByWeldJointId(WeldJointId, (DateTime)weldingDaily.WeldingDate);//更改预制口实际时间和状态 - PipelineService.UpdataDateByWeldJointId(WeldJointId);//更改安装口时间和状态 - var batchC = BLL.Project_SysSetService.GetSysSetBySetId("5", joint.ProjectId); - if (batchC != null) - { - string batchCondition = batchC.SetValue; - InsertWeldingDailyItem(WeldJointId, Personid, Personid, joint.JointAttribute, weldingDaily.WeldingDate, batchCondition, true, weldingDaily.WeldingDailyId, joint.ProjectId); - } - BLL.WeldJointService.UpdateWeldJointAddG(WeldJointId, joint.JointAttribute, Const.BtnAdd); - } - catch (Exception ex) - { - APICommonService.SaveSysAPILog("erro", ex.ToString(), "-1"); - } - - } - return res; + return BLL.WeldingDailyService.SaveWeldingDailyTempDetailByMobile(WeldJointId, Personid, time, weldingLocation, 0); } /// @@ -387,101 +274,7 @@ namespace BLL /// public static string SaveWeldingDailyByWeldJointId(string WeldJointId, string Personid, string time, string weldingLocation, int welderType) { - string res = ""; - using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) - { - try - { - var peson = db.Person_Persons.FirstOrDefault(x => x.PersonId == Personid); - if (peson == null) - { - res = "人员不存在"; - return res; - } - var joint = db.View_HJGL_WeldJoint.FirstOrDefault(x => x.WeldJointId == WeldJointId); - if (joint == null) - { - res = "焊口不存在"; - return res; - } - var weldingLocationModel = db.Base_WeldingLocation.FirstOrDefault(x => x.WeldingLocationId == weldingLocation); - if (weldingLocationModel == null) - { - res = "焊口位置不存在"; - return res; - } - var weldTask = db.HJGL_WeldTask.FirstOrDefault(x => x.WeldJointId == joint.WeldJointId); - var weldJoint = db.HJGL_WeldJoint.FirstOrDefault(x => x.WeldJointId == joint.WeldJointId); - - // 根据焊工类型确定盖面/打底焊工ID,以及是否两者都已填充 - string coverWelderId; - string backingWelderId; - bool bothWeldersFilled; - - if (welderType == 0) - { - // 全部:打底和盖面都是同一人 - coverWelderId = Personid; - backingWelderId = Personid; - bothWeldersFilled = true; - } - else if (welderType == 1) - { - // 打底:只更新backingWelderId,coverWelderId取焊口已有值 - weldJoint.BackingWelderId = Personid; - coverWelderId = weldJoint.CoverWelderId; - backingWelderId = Personid; - bothWeldersFilled = !string.IsNullOrEmpty(coverWelderId) && !string.IsNullOrEmpty(backingWelderId); - } - else // welderType == 2 - { - // 盖面:只更新coverWelderId,backingWelderId取焊口已有值 - weldJoint.CoverWelderId = Personid; - coverWelderId = Personid; - backingWelderId = weldJoint.BackingWelderId; - bothWeldersFilled = !string.IsNullOrEmpty(coverWelderId) && !string.IsNullOrEmpty(backingWelderId); - } - - // 更新焊口位置 - weldJoint.WeldingLocationId = weldingLocation; - WeldJointService.UpdateWeldJoint(weldJoint); - - // 只有打底和盖面都填充了时才保存WeldingDate和进批 - if (bothWeldersFilled) - { - var weldingDaily = db.HJGL_WeldingDaily.FirstOrDefault(x => x.WeldingDate.Value.Date == Convert.ToDateTime(time).Date && x.UnitWorkId == joint.UnitWorkId); - if (weldingDaily == null) - { - string perfix = string.Format("{0:yyyyMMdd}", System.DateTime.Now) + "-" + peson.PersonName + "-"; - weldingDaily = new Model.HJGL_WeldingDaily(); - weldingDaily.WeldingDailyId = Guid.NewGuid().ToString(); - weldingDaily.WeldingDailyCode = BLL.SQLHelper.RunProcNewId("SpGetThreeNumber", "dbo.HJGL_WeldingDaily", "WeldingDailyCode", joint.ProjectId, perfix); - weldingDaily.WeldingDate = Convert.ToDateTime(time).Date; - weldingDaily.ProjectId = joint.ProjectId; - weldingDaily.UnitWorkId = joint.UnitWorkId; - weldingDaily.UnitId = weldTask?.UnitId; - weldingDaily.Tabler = Personid; - weldingDaily.TableDate = Convert.ToDateTime(time).Date; - BLL.WeldingDailyService.AddWeldingDaily(weldingDaily); - } - BLL.HJGL_PipelineComponentjointService.UpdateStateByWeldJointId(WeldJointId, (DateTime)weldingDaily.WeldingDate);//更改预制口实际时间和状态 - PipelineService.UpdataDateByWeldJointId(WeldJointId);//更改安装口时间和状态 - var batchC = BLL.Project_SysSetService.GetSysSetBySetId("5", joint.ProjectId); - if (batchC != null) - { - string batchCondition = batchC.SetValue; - InsertWeldingDailyItem(WeldJointId, coverWelderId, backingWelderId, joint.JointAttribute, weldingDaily.WeldingDate, batchCondition, true, weldingDaily.WeldingDailyId, joint.ProjectId); - } - BLL.WeldJointService.UpdateWeldJointAddG(WeldJointId, joint.JointAttribute, Const.BtnAdd); - } - } - catch (Exception ex) - { - APICommonService.SaveSysAPILog("erro", ex.ToString(), "-1"); - } - - } - return res; + return BLL.WeldingDailyService.SaveWeldingDailyTempDetailByMobile(WeldJointId, Personid, time, weldingLocation, welderType); } #region 保存焊接日报明细 @@ -635,6 +428,25 @@ namespace BLL /// /// private static string InsertWeldingDailyItem(string weldJointId, string coverWelderId, string backingWelderId, string jointAttribute, DateTime? weldingDate, string batchCondition, bool isSave, string weldingDailyId, string projectId) + { + return InsertWeldingDailyItem(weldJointId, coverWelderId, backingWelderId, jointAttribute, weldingDate, batchCondition, isSave, weldingDailyId, projectId, null); + } + + /// + /// 日报明细插入(更新焊口信息),组批等 + /// + /// 焊口ID + /// 盖面焊工ID + /// 打底焊工ID + /// 焊口属性 + /// 焊接日期 + /// 组批条件 + /// 是否保存 + /// 日报ID + /// 项目ID + /// 焊接位置ID + /// 错误信息 + private static string InsertWeldingDailyItem(string weldJointId, string coverWelderId, string backingWelderId, string jointAttribute, DateTime? weldingDate, string batchCondition, bool isSave, string weldingDailyId, string projectId, string weldingLocationId) { string errlog = string.Empty; var newWeldJoint = BLL.WeldJointService.GetWeldJointByWeldJointId(weldJointId); @@ -652,10 +464,10 @@ namespace BLL newWeldJoint.BackingWelderId = backingWelderId; newWeldJoint.CoverWelderTeamGroupId = SitePerson_PersonService.GetSitePersonByProjectIdPersonId(pipeline.ProjectId, coverWelderId).TeamGroupId; newWeldJoint.BackingWelderTeamGroupId = SitePerson_PersonService.GetSitePersonByProjectIdPersonId(pipeline.ProjectId, backingWelderId).TeamGroupId; - //if (item.WeldingLocationId != Const._Null) - //{ - // newWeldJoint.WeldingLocationId = item.WeldingLocationId; - //} + if (!string.IsNullOrEmpty(weldingLocationId)) + { + newWeldJoint.WeldingLocationId = weldingLocationId; + } newWeldJoint.JointAttribute = jointAttribute; BLL.WeldJointService.UpdateWeldJoint(newWeldJoint); diff --git a/SGGL/BLL/HJGL/WeldingManage/WeldingDailyService.cs b/SGGL/BLL/HJGL/WeldingManage/WeldingDailyService.cs index d0384827..b55df11b 100644 --- a/SGGL/BLL/HJGL/WeldingManage/WeldingDailyService.cs +++ b/SGGL/BLL/HJGL/WeldingManage/WeldingDailyService.cs @@ -293,6 +293,408 @@ namespace BLL db.SubmitChanges(); } } + + #region 焊接日报待审核 + /// + /// 移动端按焊口保存焊接日报待审核明细 + /// + /// 焊口ID + /// 提交焊工ID + /// 焊接日期 + /// 焊接位置ID + /// 焊工类型 0 全部 1 打底 2 盖面 + /// 错误信息 + public static string SaveWeldingDailyTempDetailByMobile(string weldJointId, string personId, string time, string weldingLocationId, int welderType) + { + string res = string.Empty; + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + try + { + DateTime weldingDate; + if (!DateTime.TryParse(time, out weldingDate)) + { + return "焊接日期不正确"; + } + weldingDate = weldingDate.Date; + + var person = db.Person_Persons.FirstOrDefault(x => x.PersonId == personId); + if (person == null) + { + return "人员不存在"; + } + + var joint = db.View_HJGL_WeldJoint.FirstOrDefault(x => x.WeldJointId == weldJointId); + string err = CheckWeldingDailyTempJoint(db, joint, weldingLocationId); + if (!string.IsNullOrEmpty(err)) + { + return err; + } + + var weldTask = db.HJGL_WeldTask.FirstOrDefault(x => x.WeldJointId == joint.WeldJointId); + var weldJoint = db.HJGL_WeldJoint.FirstOrDefault(x => x.WeldJointId == joint.WeldJointId); + var pending = GetPendingTempDetail(db, weldJointId, weldingDate); + + string coverWelderId = pending != null ? pending.CoverWelderId : weldJoint.CoverWelderId; + string backingWelderId = pending != null ? pending.BackingWelderId : weldJoint.BackingWelderId; + if (welderType == 0) + { + coverWelderId = personId; + backingWelderId = personId; + } + else if (welderType == 1) + { + backingWelderId = personId; + } + else if (welderType == 2) + { + coverWelderId = personId; + } + else + { + return "焊工类型不正确"; + } + + SaveWeldingDailyTempDetail(db, joint, weldTask, weldingDate, personId, coverWelderId, backingWelderId, + joint.JointAttribute, weldingLocationId, joint.ProjectId, null, null, joint.WeldingMode); + db.SubmitChanges(); + } + catch (Exception ex) + { + APICommonService.SaveSysAPILog("erro", ex.ToString(), "-1"); + res = ex.Message; + } + } + return res; + } + + /// + /// Web端保存焊接日报待审核明细 + /// + /// 焊口ID + /// 提交人ID + /// 焊接日期 + /// 盖面焊工ID + /// 打底焊工ID + /// 焊口属性 + /// 焊接位置ID + /// 项目ID + /// 单位ID + /// 单位工程ID + /// 焊接模式 + /// 错误信息 + public static string SaveWeldingDailyTempDetailByWeb(string weldJointId, string submitPersonId, DateTime weldingDate, string coverWelderId, + string backingWelderId, string jointAttribute, string weldingLocationId, string projectId, string unitId, string unitWorkId, string weldingMode) + { + string res = string.Empty; + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + try + { + weldingDate = weldingDate.Date; + weldingLocationId = NormalizeNullValue(weldingLocationId); + unitId = NormalizeNullValue(unitId); + unitWorkId = NormalizeNullValue(unitWorkId); + + if (string.IsNullOrEmpty(weldJointId)) + { + return "焊口不能为空"; + } + if (string.IsNullOrEmpty(coverWelderId) || string.IsNullOrEmpty(backingWelderId)) + { + return "未选择完整焊工"; + } + + var joint = db.View_HJGL_WeldJoint.FirstOrDefault(x => x.WeldJointId == weldJointId); + string err = CheckWeldingDailyTempJoint(db, joint, weldingLocationId); + if (!string.IsNullOrEmpty(err)) + { + return err; + } + + var coverWelder = db.SitePerson_Person.FirstOrDefault(x => x.ProjectId == projectId && x.PersonId == coverWelderId); + if (coverWelder == null) + { + return "盖面焊工不存在"; + } + var backingWelder = db.SitePerson_Person.FirstOrDefault(x => x.ProjectId == projectId && x.PersonId == backingWelderId); + if (backingWelder == null) + { + return "打底焊工不存在"; + } + + var weldTask = db.HJGL_WeldTask.FirstOrDefault(x => x.WeldJointId == weldJointId); + SaveWeldingDailyTempDetail(db, joint, weldTask, weldingDate, submitPersonId, coverWelderId, backingWelderId, + jointAttribute, weldingLocationId, projectId, unitId, unitWorkId, weldingMode); + db.SubmitChanges(); + } + catch (Exception ex) + { + APICommonService.SaveSysAPILog("erro", ex.ToString(), "-1"); + res = ex.Message; + } + } + return res; + } + + /// + /// 审核通过焊接日报待审核明细 + /// + /// 待审核明细ID集合 + /// 审核人 + /// 错误信息 + public static string AuditWeldingDailyTempDetails(string[] tempDetailIds, string auditMan) + { + string errlog = string.Empty; + if (tempDetailIds == null || tempDetailIds.Length == 0) + { + return "请选择要审核的记录"; + } + + foreach (string tempDetailId in tempDetailIds.Where(x => !string.IsNullOrEmpty(x)).Distinct()) + { + var tempDetail = Funs.DB.HJGL_WeldingDailyTempDetail.FirstOrDefault(x => x.TempDetailId == tempDetailId); + if (tempDetail == null) + { + errlog += "待审核记录不存在;"; + continue; + } + if (tempDetail.AuditState != 0) + { + errlog += "焊口待审核记录已审核;"; + continue; + } + if (string.IsNullOrEmpty(tempDetail.CoverWelderId) || string.IsNullOrEmpty(tempDetail.BackingWelderId)) + { + errlog += "焊口待审核记录未选择完整焊工;"; + continue; + } + + var weldJoint = BLL.WeldJointService.GetWeldJointByWeldJointId(tempDetail.WeldJointId); + if (weldJoint == null) + { + errlog += "焊口不存在;"; + continue; + } + if (!string.IsNullOrEmpty(weldJoint.WeldingDailyId)) + { + errlog += "焊口【" + weldJoint.WeldJointCode + "】已生成焊接日报;"; + continue; + } + + var batchC = BLL.Project_SysSetService.GetSysSetBySetId("5", tempDetail.ProjectId); + if (batchC == null) + { + errlog += "请设置项目的组批条件;"; + continue; + } + + var weldingDaily = GetOrCreateWeldingDailyByTempDetail(tempDetail); + string itemErr = InsertWeldingDailyItem(tempDetail.WeldJointId, tempDetail.CoverWelderId, tempDetail.BackingWelderId, + tempDetail.JointAttribute, weldingDaily.WeldingDate, batchC.SetValue, true, weldingDaily.WeldingDailyId, + tempDetail.ProjectId, tempDetail.WeldingLocationId); + if (!string.IsNullOrEmpty(itemErr)) + { + errlog += itemErr; + continue; + } + + BLL.HJGL_PipelineComponentjointService.UpdateStateByWeldJointId(tempDetail.WeldJointId, (DateTime)weldingDaily.WeldingDate);//更改预制口实际时间和状态 + PipelineService.UpdataDateByWeldJointId(tempDetail.WeldJointId);//更改安装口时间和状态 + tempDetail.AuditState = 1; + tempDetail.AuditMan = auditMan; + tempDetail.AuditDate = DateTime.Now; + Funs.DB.SubmitChanges(); + } + + return errlog; + } + + /// + /// 删除未审核的焊接日报待审核明细 + /// + /// 待审核明细ID集合 + /// 错误信息 + public static string DeleteWeldingDailyTempDetails(string[] tempDetailIds) + { + if (tempDetailIds == null || tempDetailIds.Length == 0) + { + return "请选择要删除的记录"; + } + + string errlog = string.Empty; + foreach (string tempDetailId in tempDetailIds.Where(x => !string.IsNullOrEmpty(x)).Distinct()) + { + var tempDetail = Funs.DB.HJGL_WeldingDailyTempDetail.FirstOrDefault(x => x.TempDetailId == tempDetailId); + if (tempDetail == null) + { + continue; + } + if (tempDetail.AuditState != 0) + { + errlog += "已审核记录不能删除;"; + continue; + } + Funs.DB.HJGL_WeldingDailyTempDetail.DeleteOnSubmit(tempDetail); + } + Funs.DB.SubmitChanges(); + return errlog; + } + + private static string CheckWeldingDailyTempJoint(Model.SGGLDB db, Model.View_HJGL_WeldJoint joint, string weldingLocationId) + { + if (joint == null) + { + return "焊口不存在"; + } + if (!string.IsNullOrEmpty(joint.WeldingDailyId)) + { + return "焊口【" + joint.WeldJointCode + "】已生成焊接日报,不能提交待审核"; + } + if (!string.IsNullOrEmpty(weldingLocationId)) + { + var weldingLocationModel = db.Base_WeldingLocation.FirstOrDefault(x => x.WeldingLocationId == weldingLocationId); + if (weldingLocationModel == null) + { + return "焊口位置不存在"; + } + } + return string.Empty; + } + + private static Model.HJGL_WeldingDailyTempDetail GetPendingTempDetail(Model.SGGLDB db, string weldJointId, DateTime weldingDate) + { + return db.HJGL_WeldingDailyTempDetail.FirstOrDefault(x => x.WeldJointId == weldJointId + && x.WeldingDate >= weldingDate.Date + && x.WeldingDate < weldingDate.Date.AddDays(1) + && x.AuditState == 0); + } + + private static void SaveWeldingDailyTempDetail(Model.SGGLDB db, Model.View_HJGL_WeldJoint joint, Model.HJGL_WeldTask weldTask, + DateTime weldingDate, string submitPersonId, string coverWelderId, string backingWelderId, string jointAttribute, + string weldingLocationId, string projectId, string unitId, string unitWorkId, string weldingMode) + { + var pending = GetPendingTempDetail(db, joint.WeldJointId, weldingDate); + if (pending == null) + { + pending = new Model.HJGL_WeldingDailyTempDetail + { + TempDetailId = Guid.NewGuid().ToString(), + WeldJointId = joint.WeldJointId, + WeldingDate = weldingDate.Date, + AuditState = 0, + SubmitDate = DateTime.Now + }; + db.HJGL_WeldingDailyTempDetail.InsertOnSubmit(pending); + } + + pending.ProjectId = !string.IsNullOrEmpty(projectId) ? projectId : joint.ProjectId; + pending.UnitId = !string.IsNullOrEmpty(unitId) ? unitId : (weldTask != null && !string.IsNullOrEmpty(weldTask.UnitId) ? weldTask.UnitId : joint.UnitId); + pending.UnitWorkId = !string.IsNullOrEmpty(unitWorkId) ? unitWorkId : joint.UnitWorkId; + pending.CoverWelderId = coverWelderId; + pending.BackingWelderId = backingWelderId; + pending.JointAttribute = !string.IsNullOrEmpty(jointAttribute) ? jointAttribute : joint.JointAttribute; + pending.WeldingLocationId = !string.IsNullOrEmpty(weldingLocationId) ? weldingLocationId : joint.WeldingLocationId; + pending.WeldingMode = !string.IsNullOrEmpty(weldingMode) ? weldingMode : joint.WeldingMode; + pending.SubmitPersonId = submitPersonId; + pending.SubmitDate = DateTime.Now; + } + + private static Model.HJGL_WeldingDaily GetOrCreateWeldingDailyByTempDetail(Model.HJGL_WeldingDailyTempDetail tempDetail) + { + var weldingDaily = Funs.DB.HJGL_WeldingDaily.FirstOrDefault(x => x.UnitWorkId == tempDetail.UnitWorkId + && x.WeldingDate >= tempDetail.WeldingDate.Date + && x.WeldingDate < tempDetail.WeldingDate.Date.AddDays(1)); + if (weldingDaily != null) + { + return weldingDaily; + } + + var submitPerson = Funs.DB.Person_Persons.FirstOrDefault(x => x.PersonId == tempDetail.SubmitPersonId); + string personName = submitPerson != null ? submitPerson.PersonName : string.Empty; + string perfix = string.Format("{0:yyyyMMdd}", tempDetail.WeldingDate) + "-" + personName + "-"; + weldingDaily = new Model.HJGL_WeldingDaily + { + WeldingDailyId = Guid.NewGuid().ToString(), + WeldingDailyCode = BLL.SQLHelper.RunProcNewId("SpGetThreeNumber", "dbo.HJGL_WeldingDaily", "WeldingDailyCode", tempDetail.ProjectId, perfix), + WeldingDate = tempDetail.WeldingDate.Date, + ProjectId = tempDetail.ProjectId, + UnitWorkId = tempDetail.UnitWorkId, + UnitId = tempDetail.UnitId, + Tabler = tempDetail.SubmitPersonId, + TableDate = tempDetail.WeldingDate.Date, + Remark = "焊接日报待审核通过" + }; + BLL.WeldingDailyService.AddWeldingDaily(weldingDaily); + return weldingDaily; + } + + private static string NormalizeNullValue(string value) + { + return value == Const._Null ? null : value; + } + + /// + /// 日报明细插入(更新焊口信息),组批等 + /// + /// 焊口ID + /// 盖面焊工ID + /// 打底焊工ID + /// 焊口属性 + /// 焊接日期 + /// 组批条件 + /// 是否保存 + /// 日报ID + /// 项目ID + /// 焊接位置ID + /// 错误信息 + private static string InsertWeldingDailyItem(string weldJointId, string coverWelderId, string backingWelderId, string jointAttribute, DateTime? weldingDate, string batchCondition, bool isSave, string weldingDailyId, string projectId, string weldingLocationId) + { + string errlog = string.Empty; + var newWeldJoint = BLL.WeldJointService.GetWeldJointByWeldJointId(weldJointId); + if (newWeldJoint == null) + { + return "焊口不存在;"; + } + + var pipeline = BLL.PipelineService.GetPipelineByPipelineId(newWeldJoint.PipelineId); + var weldingDaily = BLL.WeldingDailyService.GetPipeline_WeldingDailyByWeldingDailyId(weldingDailyId); + if (pipeline == null || weldingDaily == null) + { + return "焊口关联管线或日报不存在;"; + } + + if (!string.IsNullOrEmpty(coverWelderId) && !string.IsNullOrEmpty(backingWelderId)) + { + if (isSave) + { + newWeldJoint.WeldingDailyId = weldingDailyId; + newWeldJoint.WeldingDailyCode = weldingDaily.WeldingDailyCode; + newWeldJoint.CoverWelderId = coverWelderId; + newWeldJoint.BackingWelderId = backingWelderId; + newWeldJoint.CoverWelderTeamGroupId = SitePerson_PersonService.GetSitePersonByProjectIdPersonId(pipeline.ProjectId, coverWelderId).TeamGroupId; + newWeldJoint.BackingWelderTeamGroupId = SitePerson_PersonService.GetSitePersonByProjectIdPersonId(pipeline.ProjectId, backingWelderId).TeamGroupId; + if (!string.IsNullOrEmpty(weldingLocationId)) + { + newWeldJoint.WeldingLocationId = weldingLocationId; + } + newWeldJoint.JointAttribute = jointAttribute; + BLL.WeldJointService.UpdateWeldJoint(newWeldJoint); + + // 更新焊口号 修改固定焊口号后 +G + BLL.WeldJointService.UpdateWeldJointAddG(newWeldJoint.WeldJointId, newWeldJoint.JointAttribute, Const.BtnAdd); + errlog = PointBatchService.AddBatchByWeldJointId(weldJointId, weldingDate, batchCondition);//自动组批 + } + } + else + { + errlog = "焊口" + "【" + newWeldJoint.WeldJointCode + "】" + "未选择焊工"; + } + + return errlog; + } + #endregion + /// /// 日报明细删除 /// diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index df5494f8..6a6ed369 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -138,8 +138,8 @@ ..\packages\RestSharp.106.15.0\lib\net452\RestSharp.dll - - ..\packages\Spire.PDF.12.2.6\lib\net40\Spire.Pdf.dll + + ..\packages\Spire.PDF.12.5.8\lib\net40\Spire.Pdf.dll ..\packages\System.Buffers.4.6.0\lib\netstandard2.0\System.Buffers.dll diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx index 8f0d6882..7653e2cb 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx @@ -52,10 +52,10 @@ --%> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -245,4 +330,4 @@ } - \ No newline at end of file + diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx.cs index d3d74b88..4f99ed04 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx.cs @@ -19,7 +19,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage { this.txtMonth.Text = string.Format("{0:yyyy-MM}", DateTime.Now); this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString(); + this.ddlPendingPageSize.SelectedValue = this.GridPending.PageSize.ToString(); + this.txtPendingWeldingDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); this.InitTreeMenu();//加载树 + this.BindPendingGrid(); } } @@ -146,12 +149,16 @@ namespace FineUIPro.Web.HJGL.WeldingManage if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID)) { this.BindGrid(); + this.BindPendingGrid(); var daily = BLL.WeldingDailyService.GetPipeline_WeldingDailyByWeldingDailyId(tvControlItem.SelectedNodeID); - txtUnitName.Text = BLL.UnitService.GetUnitNameByUnitId(daily.UnitId); + if (daily != null) + { + txtUnitName.Text = BLL.UnitService.GetUnitNameByUnitId(daily.UnitId); - txtTabler.Text = BLL.Person_PersonsService.GetPersonsNameById(daily.Tabler); - txtTableDate.Text = string.Format("{0:yyyy-MM-dd}", daily.TableDate); - txtWeldingDate.Text = string.Format("{0:yyyy-MM-dd}", daily.WeldingDate); + txtTabler.Text = BLL.Person_PersonsService.GetPersonsNameById(daily.Tabler); + txtTableDate.Text = string.Format("{0:yyyy-MM-dd}", daily.TableDate); + txtWeldingDate.Text = string.Format("{0:yyyy-MM-dd}", daily.WeldingDate); + } //Model.Parameter3D parameter3D = new Model.Parameter3D(); //Model.ColorModel colorModel = new Model.ColorModel(); //colorModel = BLL.Project_SysSetService.GetColorModel(this.CurrUser.LoginProjectId); @@ -188,6 +195,13 @@ namespace FineUIPro.Web.HJGL.WeldingManage { if (this.tvControlItem.SelectedNode != null) { + var daily = BLL.WeldingDailyService.GetPipeline_WeldingDailyByWeldingDailyId(tvControlItem.SelectedNodeID); + if (daily == null) + { + Grid1.DataSource = null; + Grid1.DataBind(); + return; + } string strSql = @"SELECT WeldingDailyId,WeldJointId,PipelineCode,WeldJointCode, BackingWelderCode,CoverWelderCode,Material1Code,Material2Code, Dia,DNDia,Thickness,WeldTypeCode,WeldingMethodCode,WeldingWireCode,WeldingMode, @@ -229,6 +243,79 @@ namespace FineUIPro.Web.HJGL.WeldingManage } #endregion + #region 待审核数据绑定 + /// + /// 绑定待审核焊接日报明细 + /// + private void BindPendingGrid() + { + string strSql = @"SELECT temp.TempDetailId, + temp.WeldJointId, + temp.WeldingDate, + jot.PipelineCode, + jot.WeldJointCode, + coverWelder.WelderCode AS CoverWelderCode, + backingWelder.WelderCode AS BackingWelderCode, + temp.JointAttribute, + location.WeldingLocationCode, + jot.Size, + jot.Dia, + jot.Thickness, + jot.WeldingMethodCode, + submitPerson.PersonName AS SubmitPersonName, + temp.SubmitDate + FROM dbo.HJGL_WeldingDailyTempDetail AS temp + LEFT JOIN dbo.View_HJGL_WeldJoint AS jot ON jot.WeldJointId = temp.WeldJointId + LEFT JOIN dbo.SitePerson_Person AS coverWelder ON coverWelder.PersonId = temp.CoverWelderId + LEFT JOIN dbo.SitePerson_Person AS backingWelder ON backingWelder.PersonId = temp.BackingWelderId + LEFT JOIN dbo.Base_WeldingLocation AS location ON location.WeldingLocationId = temp.WeldingLocationId + LEFT JOIN dbo.Person_Persons AS submitPerson ON submitPerson.PersonId = temp.SubmitPersonId + WHERE temp.ProjectId = @ProjectId AND temp.AuditState = 0"; + List listStr = new List(); + listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); + + var unitWork = BLL.UnitWorkService.getUnitWorkByUnitWorkId(tvControlItem.SelectedNodeID); + if (unitWork == null) + { + var daily = BLL.WeldingDailyService.GetPipeline_WeldingDailyByWeldingDailyId(tvControlItem.SelectedNodeID); + if (daily != null) + { + unitWork = BLL.UnitWorkService.getUnitWorkByUnitWorkId(daily.UnitWorkId); + } + } + if (unitWork != null) + { + strSql += " AND temp.UnitWorkId = @UnitWorkId"; + listStr.Add(new SqlParameter("@UnitWorkId", unitWork.UnitWorkId)); + } + if (!string.IsNullOrEmpty(txtPendingWeldingDate.Text.Trim())) + { + strSql += " AND temp.WeldingDate >= @WeldingDate AND temp.WeldingDate < @WeldingDateEnd"; + DateTime weldingDate = Convert.ToDateTime(txtPendingWeldingDate.Text.Trim()).Date; + listStr.Add(new SqlParameter("@WeldingDate", weldingDate)); + listStr.Add(new SqlParameter("@WeldingDateEnd", weldingDate.AddDays(1))); + } + if (!string.IsNullOrEmpty(txtPendingPipelineCode.Text.Trim())) + { + strSql += " AND jot.PipelineCode LIKE @PendingPipelineCode"; + listStr.Add(new SqlParameter("@PendingPipelineCode", "%" + txtPendingPipelineCode.Text.Trim() + "%")); + } + if (!string.IsNullOrEmpty(txtPendingWelderCode.Text.Trim())) + { + strSql += " AND (coverWelder.WelderCode LIKE @PendingWelderCode OR backingWelder.WelderCode LIKE @PendingWelderCode)"; + listStr.Add(new SqlParameter("@PendingWelderCode", "%" + txtPendingWelderCode.Text.Trim() + "%")); + } + strSql += " ORDER BY jot.PipelineCode, jot.WeldJointCode"; + + DataTable tb = SQLHelper.GetDataTableRunText(strSql, listStr.ToArray()); + GridPending.RecordCount = tb.Rows.Count; + tb = GetFilteredTable(GridPending.FilteredData, tb); + var table = this.GetPagedDataTable(GridPending, tb); + GridPending.DataSource = table; + GridPending.DataBind(); + } + #endregion + #region 分页排序 #region 页索引改变事件 /// @@ -252,6 +339,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage { BindGrid(); } + + /// + /// 待审核排序 + /// + protected void GridPending_Sort(object sender, GridSortEventArgs e) + { + BindPendingGrid(); + } #endregion #region 分页选择下拉改变事件 @@ -265,6 +360,23 @@ namespace FineUIPro.Web.HJGL.WeldingManage Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); BindGrid(); } + + /// + /// 待审核页索引改变事件 + /// + protected void GridPending_PageIndexChange(object sender, GridPageEventArgs e) + { + BindPendingGrid(); + } + + /// + /// 待审核分页选择下拉改变事件 + /// + protected void ddlPendingPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + GridPending.PageSize = Convert.ToInt32(ddlPendingPageSize.SelectedValue); + BindPendingGrid(); + } #endregion #endregion @@ -509,6 +621,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { this.InitTreeMenu(); this.BindGrid(); + this.BindPendingGrid(); } #endregion @@ -522,6 +635,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage { BindGrid(); } + + /// + /// 待审核筛选 + /// + protected void PendingFilter_TextChanged(object sender, EventArgs e) + { + BindPendingGrid(); + } #endregion protected void btnOut_Click(object sender, EventArgs e) @@ -584,5 +705,52 @@ namespace FineUIPro.Web.HJGL.WeldingManage } + + /// + /// 待审核记录审核通过 + /// + protected void btnPendingAudit_Click(object sender, EventArgs e) + { + if (GridPending.SelectedRowIDArray.Length == 0) + { + ShowNotify("请选择要审核的记录", MessageBoxIcon.Warning); + return; + } + + string errlog = BLL.WeldingDailyService.AuditWeldingDailyTempDetails(GridPending.SelectedRowIDArray, this.CurrUser.PersonId); + this.InitTreeMenu(); + this.BindPendingGrid(); + if (string.IsNullOrEmpty(errlog)) + { + ShowNotify("审核通过!", MessageBoxIcon.Success); + } + else + { + Alert.ShowInTop("部分记录处理失败:" + errlog, MessageBoxIcon.Warning); + } + } + + /// + /// 删除未审核记录 + /// + protected void btnPendingDelete_Click(object sender, EventArgs e) + { + if (GridPending.SelectedRowIDArray.Length == 0) + { + ShowNotify("请选择要删除的记录", MessageBoxIcon.Warning); + return; + } + + string errlog = BLL.WeldingDailyService.DeleteWeldingDailyTempDetails(GridPending.SelectedRowIDArray); + this.BindPendingGrid(); + if (string.IsNullOrEmpty(errlog)) + { + ShowNotify("删除成功!", MessageBoxIcon.Success); + } + else + { + Alert.ShowInTop(errlog, MessageBoxIcon.Warning); + } + } } -} \ No newline at end of file +} diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx.designer.cs index 7db96382..ba616267 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx.designer.cs @@ -92,7 +92,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel panelCenterRegion; - + /// /// Grid1 控件。 /// @@ -245,6 +245,105 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// GridPending 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid GridPending; + + /// + /// ToolbarPending 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar ToolbarPending; + + /// + /// txtPendingWeldingDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtPendingWeldingDate; + + /// + /// txtPendingPipelineCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtPendingPipelineCode; + + /// + /// txtPendingWelderCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtPendingWelderCode; + + /// + /// ToolbarFillPending 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFillPending; + + /// + /// btnPendingAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnPendingAudit; + + /// + /// btnPendingDelete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnPendingDelete; + + /// + /// ToolbarSeparatorPending 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparatorPending; + + /// + /// ToolbarTextPending 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarTextPending; + + /// + /// ddlPendingPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPendingPageSize; /// /// Window1 控件。 diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx index d6bd1e47..d3ee8e3d 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx @@ -1,4 +1,4 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WeldingLocationId.aspx.cs" +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WeldReportEdit.aspx.cs" Inherits="FineUIPro.Web.WeldingProcess.WeldingManage.WeldReportEdit" %> diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx.cs index 9a9f438f..28ba30b3 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx.cs @@ -466,23 +466,17 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage ShowNotify("请选择单位名称!", MessageBoxIcon.Warning); return; } - if (BLL.WeldingDailyService.IsExistWeldingDailyCode(this.txtWeldingDailyCode.Text, - !string.IsNullOrEmpty(this.WeldingDailyId) ? this.WeldingDailyId : "", CurrUser.LoginProjectId)) - { - ShowNotify("日报编号已存在,请重新录入", MessageBoxIcon.Warning); - return; - } - if (string.IsNullOrEmpty(this.txtWeldingDate.Text) || string.IsNullOrEmpty(this.txtWeldingDailyCode.Text.Trim())) { ShowNotify("日报告号、焊接日期不能为空", MessageBoxIcon.Warning); return; } - // 创建新的焊接日报 - var newWeldingDaily = CreateNewWeldingDaily(); - // 获取焊接信息 - var weldJointView = GetWeldJointView(); + if (this.Grid1.SelectedRowIDArray == null || this.Grid1.SelectedRowIDArray.Length == 0) + { + ShowNotify("请选择要提交待审核的焊口!", MessageBoxIcon.Warning); + return; + } string errlog = string.Empty; string eventArg = string.Empty; @@ -491,20 +485,8 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage if (eventArg == string.Empty) //焊工焊接的所有焊口资质都符合要求) { - if (!string.IsNullOrEmpty(this.WeldingDailyId)) - { - newWeldingDaily.WeldingDailyId = this.WeldingDailyId; - BLL.WeldingDailyService.UpdateWeldingDaily(newWeldingDaily); - //BLL.Sys_LogService.AddLog(BLL.Const.System_6, this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.HJGL_WeldReportMenuId, Const.BtnModify, this.WeldingDailyId); - } - else - { - this.WeldingDailyId = SQLHelper.GetNewID(typeof(Model.HJGL_WeldingDaily)); - newWeldingDaily.WeldingDailyId = this.WeldingDailyId; - BLL.WeldingDailyService.AddWeldingDaily(newWeldingDaily); - //BLL.Sys_LogService.AddLog(BLL.Const.System_6, this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.HJGL_WeldReportMenuId, Const.BtnAdd, this.WeldingDailyId); - } - + DateTime weldingDate = Funs.GetNewDateTime(this.txtWeldingDate.Text) ?? DateTime.Now; + int saveCount = 0; foreach (JObject mergedRow in Grid1.GetMergedData()) { JObject values = mergedRow.Value("values"); @@ -514,119 +496,57 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage if (this.Grid1.SelectedRowIDArray.Contains(rowId)) { var t = BLL.WeldTaskService.GetWeldTaskById(rowId); - var newWeldJoint = BLL.WeldJointService.GetWeldJointByWeldJointId(t.WeldJointId); - - - if (newWeldJoint != null) + if (t == null) { - newWeldJoint.JointAttribute = values.Value("JointAttribute"); - newWeldJoint.WeldingLocationId = values.Value("WeldingLocationId"); - var coverWelderCode = (from x in Funs.DB.SitePerson_Person - where x.ProjectId == CurrUser.LoginProjectId && - x.WelderCode == values.Value("CoverWelderCode") - select x).FirstOrDefault(); - if (coverWelderCode != null) - { - t.CoverWelderId = coverWelderCode.PersonId; - newWeldJoint.CoverWelderId = coverWelderCode.PersonId; - newWeldJoint.CoverWelderTeamGroupId = coverWelderCode.TeamGroupId; - } - - var backingWelderCode = (from x in Funs.DB.SitePerson_Person - where x.ProjectId == CurrUser.LoginProjectId && - x.WelderCode == values.Value("BackingWelderCode") - select x).FirstOrDefault(); - if (backingWelderCode != null) - { - t.BackingWelderId = backingWelderCode.PersonId; - newWeldJoint.BackingWelderId = backingWelderCode.PersonId; - newWeldJoint.BackingWelderTeamGroupId = backingWelderCode.TeamGroupId; - } - - WeldTaskService.UpdateWeldTask(t); - WeldJointService.UpdateWeldJoint(newWeldJoint); - //if (!string.IsNullOrEmpty(values.Value("JointAttribute").ToString())) - //{ - // newWeldJoint.JointAttribute = values.Value("JointAttribute").ToString(); - //} - //BLL.WeldJointService.UpdateWeldJoint(newWeldJoint); - BLL.WeldJointService.UpdateWeldJointAddG(newWeldJoint.WeldJointId, - newWeldJoint.JointAttribute, Const.BtnAdd); + errlog += "焊接任务不存在;"; + continue; } - } - } - - // 获取组批条件 - var batchC = BLL.Project_SysSetService.GetSysSetBySetId("5", CurrUser.LoginProjectId); - if (batchC != null) - { - string batchCondition = batchC.SetValue; - // 新建日报 - if (weldJointView.Count() == 0) - { - foreach (string row in Grid1.SelectedRowIDArray) + var weldJoint = BLL.WeldJointService.GetWeldJointByWeldJointId(t.WeldJointId); + if (weldJoint == null) { - var t = BLL.WeldTaskService.GetWeldTaskById(row); - var newWeldJoint = BLL.WeldJointService.GetWeldJointByWeldJointId(t.WeldJointId); - errlog += InsertWeldingDailyItem(t.WeldJointId, t.CoverWelderId, t.BackingWelderId, - newWeldJoint.JointAttribute, newWeldingDaily.WeldingDate, batchCondition, true); + errlog += "焊口不存在;"; + continue; } - } - else - { - for (int i = 0; i < Grid1.Rows.Count; i++) + + string weldJointCode = values.Value("WeldJointCode"); + var coverWelderCode = (from x in Funs.DB.SitePerson_Person + where x.ProjectId == CurrUser.LoginProjectId && + x.WelderCode == values.Value("CoverWelderCode") + select x).FirstOrDefault(); + if (coverWelderCode == null) { - if (Grid1.SelectedRowIDArray.Contains(Grid1.Rows[i].RowID)) - { - var t = BLL.WeldTaskService.GetWeldTaskById(Grid1.Rows[i].RowID); - var newWeldJoint = BLL.WeldJointService.GetWeldJointByWeldJointId(t.WeldJointId); - errlog += InsertWeldingDailyItem(t.WeldJointId, t.CoverWelderId, t.BackingWelderId, - newWeldJoint.JointAttribute, newWeldingDaily.WeldingDate, batchCondition, true); - } - else - { - var t = BLL.WeldTaskService.GetWeldTaskById(Grid1.Rows[i].RowID); - errlog += BLL.WeldingDailyService - .DeleteWeldingDailyItemByweldJointId(t.WeldJointId); - } + errlog += "焊口【" + weldJointCode + "】盖面焊工不存在;"; + continue; } + var backingWelderCode = (from x in Funs.DB.SitePerson_Person + where x.ProjectId == CurrUser.LoginProjectId && + x.WelderCode == values.Value("BackingWelderCode") + select x).FirstOrDefault(); + if (backingWelderCode == null) + { + errlog += "焊口【" + weldJointCode + "】打底焊工不存在;"; + continue; + } + + string itemErr = BLL.WeldingDailyService.SaveWeldingDailyTempDetailByWeb( + t.WeldJointId, + CurrUser.PersonId, + weldingDate, + coverWelderCode.PersonId, + backingWelderCode.PersonId, + values.Value("JointAttribute"), + values.Value("WeldingLocationId"), + CurrUser.LoginProjectId, + this.drpUnit.SelectedValue, + this.drpUnitWork.SelectedValue != BLL.Const._Null ? this.drpUnitWork.SelectedValue : this.UnitWorkId, + weldJoint.WeldingMode); + if (!string.IsNullOrEmpty(itemErr)) + { + errlog += "焊口【" + weldJointCode + "】" + itemErr + ";"; + continue; + } + saveCount++; } - // 日报已存在的情况 暂时 - //else - //{ - // var weldJoints = from x in weldJointView select x.WeldJointId; - // foreach (var item in GetWeldingDailyItem) - // { - // // 如日报明细存在则只更新焊口信息,如进批条件改变,则只有删除后再重新增加 - // if (weldJoints.Contains(item.WeldJointId)) - // { - // var newWeldJoint = BLL.WeldJointService.GetWeldJointByWeldJointId(item.WeldJointId); - // newWeldJoint.WeldingDailyId = this.WeldingDailyId; - // newWeldJoint.WeldingDailyCode = this.txtWeldingDailyCode.Text.Trim(); - // newWeldJoint.CoverWelderId = item.CoverWelderId; - // newWeldJoint.BackingWelderId = item.BackingWelderId; - - // if (!string.IsNullOrEmpty(item.JointAttribute)) - // { - // newWeldJoint.JointAttribute = item.JointAttribute; - - // } - // BLL.WeldJointService.UpdateWeldJoint(newWeldJoint); - - // //更新焊口号 修改固定焊口号后 +G - // BLL.WeldJointService.UpdateWeldJointAddG(newWeldJoint.WeldJointId, newWeldJoint.JointAttribute, Const.BtnAdd); - - // } - // else - // { - // errlog += InsertWeldingDailyItem(item, newWeldingDaily.WeldingDate, batchCondition, true); - // } - // } - //} - } - else - { - errlog += "请设置项目的组批条件"; } #region 焊工每天超过60达因的提示(暂不用) @@ -676,14 +596,9 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage #endregion - System.Threading.Tasks.Task.Run(() => - { - ChanggeState(); - }); - if (string.IsNullOrEmpty(errlog)) { - ShowNotify("保存成功!", MessageBoxIcon.Success); + ShowNotify("已提交待审核!", MessageBoxIcon.Success); drpJointAttribute_SelectedIndexChanged(null, null); BindGrid(null); //PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); @@ -691,7 +606,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage else { // string okj = ActiveWindow.GetWriteBackValueReference(newWeldReportMain.WeldingDailyId) + ActiveWindow.GetHidePostBackReference(); - Alert.ShowInTop("保存成功!" + "焊接明细中" + errlog, "提交结果", MessageBoxIcon.Warning); + Alert.ShowInTop("已提交待审核" + saveCount + "条;焊接明细中" + errlog, "提交结果", MessageBoxIcon.Warning); drpJointAttribute_SelectedIndexChanged(null, null); BindGrid(null); // ShowAlert("焊接明细中" + errlog, MessageBoxIcon.Warning); @@ -1228,4 +1143,4 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage #endregion } -} \ No newline at end of file +} diff --git a/SGGL/FineUIPro.Web/common/Menu_DigData.xml b/SGGL/FineUIPro.Web/common/Menu_DigData.xml index bb7a7a34..b532a9bb 100644 --- a/SGGL/FineUIPro.Web/common/Menu_DigData.xml +++ b/SGGL/FineUIPro.Web/common/Menu_DigData.xml @@ -1,51 +1,9 @@  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + @@ -58,15 +16,12 @@ - - - - - - - - + + + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/common/Menu_HJGL.xml b/SGGL/FineUIPro.Web/common/Menu_HJGL.xml index b5ac8281..647cb874 100644 --- a/SGGL/FineUIPro.Web/common/Menu_HJGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_HJGL.xml @@ -10,17 +10,19 @@ + + - + + - - + @@ -29,7 +31,7 @@ - + diff --git a/SGGL/FineUIPro.Web/common/Menu_HTGL.xml b/SGGL/FineUIPro.Web/common/Menu_HTGL.xml index 129ab5fd..95eeab91 100644 --- a/SGGL/FineUIPro.Web/common/Menu_HTGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_HTGL.xml @@ -1,8 +1,8 @@  - - - + + + diff --git a/SGGL/FineUIPro.Web/common/Menu_JDGL.xml b/SGGL/FineUIPro.Web/common/Menu_JDGL.xml index fd6a0762..8d4aa005 100644 --- a/SGGL/FineUIPro.Web/common/Menu_JDGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_JDGL.xml @@ -1,11 +1,7 @@  - + - - - - \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/common/Menu_PHTGL.xml b/SGGL/FineUIPro.Web/common/Menu_PHTGL.xml index 53b0bd32..56efca63 100644 --- a/SGGL/FineUIPro.Web/common/Menu_PHTGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_PHTGL.xml @@ -4,10 +4,10 @@ + - diff --git a/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml b/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml index bd506a52..33fbfbf6 100644 --- a/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml @@ -58,9 +58,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index c782acab..0d237201 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -731,6 +731,9 @@ namespace Model partial void InsertHJGL_WeldingDaily(HJGL_WeldingDaily instance); partial void UpdateHJGL_WeldingDaily(HJGL_WeldingDaily instance); partial void DeleteHJGL_WeldingDaily(HJGL_WeldingDaily instance); + partial void InsertHJGL_WeldingDailyTempDetail(HJGL_WeldingDailyTempDetail instance); + partial void UpdateHJGL_WeldingDailyTempDetail(HJGL_WeldingDailyTempDetail instance); + partial void DeleteHJGL_WeldingDailyTempDetail(HJGL_WeldingDailyTempDetail instance); partial void InsertHJGL_WeldJoint(HJGL_WeldJoint instance); partial void UpdateHJGL_WeldJoint(HJGL_WeldJoint instance); partial void DeleteHJGL_WeldJoint(HJGL_WeldJoint instance); @@ -3840,6 +3843,14 @@ namespace Model } } + public System.Data.Linq.Table HJGL_WeldingDailyTempDetail + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table HJGL_WeldJoint { get @@ -108820,6 +108831,476 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.HJGL_WeldingDailyTempDetail")] + public partial class HJGL_WeldingDailyTempDetail : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _TempDetailId; + + private string _ProjectId; + + private string _UnitId; + + private string _UnitWorkId; + + private string _WeldJointId; + + private System.DateTime _WeldingDate; + + private string _CoverWelderId; + + private string _BackingWelderId; + + private string _JointAttribute; + + private string _WeldingLocationId; + + private string _WeldingMode; + + private string _AttachUrl; + + private string _SubmitPersonId; + + private System.DateTime _SubmitDate; + + private int _AuditState; + + private string _AuditMan; + + private System.Nullable _AuditDate; + + private string _AuditRemark; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnTempDetailIdChanging(string value); + partial void OnTempDetailIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnUnitIdChanging(string value); + partial void OnUnitIdChanged(); + partial void OnUnitWorkIdChanging(string value); + partial void OnUnitWorkIdChanged(); + partial void OnWeldJointIdChanging(string value); + partial void OnWeldJointIdChanged(); + partial void OnWeldingDateChanging(System.DateTime value); + partial void OnWeldingDateChanged(); + partial void OnCoverWelderIdChanging(string value); + partial void OnCoverWelderIdChanged(); + partial void OnBackingWelderIdChanging(string value); + partial void OnBackingWelderIdChanged(); + partial void OnJointAttributeChanging(string value); + partial void OnJointAttributeChanged(); + partial void OnWeldingLocationIdChanging(string value); + partial void OnWeldingLocationIdChanged(); + partial void OnWeldingModeChanging(string value); + partial void OnWeldingModeChanged(); + partial void OnAttachUrlChanging(string value); + partial void OnAttachUrlChanged(); + partial void OnSubmitPersonIdChanging(string value); + partial void OnSubmitPersonIdChanged(); + partial void OnSubmitDateChanging(System.DateTime value); + partial void OnSubmitDateChanged(); + partial void OnAuditStateChanging(int value); + partial void OnAuditStateChanged(); + partial void OnAuditManChanging(string value); + partial void OnAuditManChanged(); + partial void OnAuditDateChanging(System.Nullable value); + partial void OnAuditDateChanged(); + partial void OnAuditRemarkChanging(string value); + partial void OnAuditRemarkChanged(); + #endregion + + public HJGL_WeldingDailyTempDetail() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TempDetailId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string TempDetailId + { + get + { + return this._TempDetailId; + } + set + { + if ((this._TempDetailId != value)) + { + this.OnTempDetailIdChanging(value); + this.SendPropertyChanging(); + this._TempDetailId = value; + this.SendPropertyChanged("TempDetailId"); + this.OnTempDetailIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + this.OnProjectIdChanging(value); + this.SendPropertyChanging(); + this._ProjectId = value; + this.SendPropertyChanged("ProjectId"); + this.OnProjectIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + this.OnUnitIdChanging(value); + this.SendPropertyChanging(); + this._UnitId = value; + this.SendPropertyChanged("UnitId"); + this.OnUnitIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitWorkId", DbType="NVarChar(50)")] + public string UnitWorkId + { + get + { + return this._UnitWorkId; + } + set + { + if ((this._UnitWorkId != value)) + { + this.OnUnitWorkIdChanging(value); + this.SendPropertyChanging(); + this._UnitWorkId = value; + this.SendPropertyChanged("UnitWorkId"); + this.OnUnitWorkIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WeldJointId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string WeldJointId + { + get + { + return this._WeldJointId; + } + set + { + if ((this._WeldJointId != value)) + { + this.OnWeldJointIdChanging(value); + this.SendPropertyChanging(); + this._WeldJointId = value; + this.SendPropertyChanged("WeldJointId"); + this.OnWeldJointIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WeldingDate", DbType="DateTime NOT NULL")] + public System.DateTime WeldingDate + { + get + { + return this._WeldingDate; + } + set + { + if ((this._WeldingDate != value)) + { + this.OnWeldingDateChanging(value); + this.SendPropertyChanging(); + this._WeldingDate = value; + this.SendPropertyChanged("WeldingDate"); + this.OnWeldingDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CoverWelderId", DbType="NVarChar(50)")] + public string CoverWelderId + { + get + { + return this._CoverWelderId; + } + set + { + if ((this._CoverWelderId != value)) + { + this.OnCoverWelderIdChanging(value); + this.SendPropertyChanging(); + this._CoverWelderId = value; + this.SendPropertyChanged("CoverWelderId"); + this.OnCoverWelderIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BackingWelderId", DbType="NVarChar(50)")] + public string BackingWelderId + { + get + { + return this._BackingWelderId; + } + set + { + if ((this._BackingWelderId != value)) + { + this.OnBackingWelderIdChanging(value); + this.SendPropertyChanging(); + this._BackingWelderId = value; + this.SendPropertyChanged("BackingWelderId"); + this.OnBackingWelderIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JointAttribute", DbType="NVarChar(50)")] + public string JointAttribute + { + get + { + return this._JointAttribute; + } + set + { + if ((this._JointAttribute != value)) + { + this.OnJointAttributeChanging(value); + this.SendPropertyChanging(); + this._JointAttribute = value; + this.SendPropertyChanged("JointAttribute"); + this.OnJointAttributeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WeldingLocationId", DbType="NVarChar(50)")] + public string WeldingLocationId + { + get + { + return this._WeldingLocationId; + } + set + { + if ((this._WeldingLocationId != value)) + { + this.OnWeldingLocationIdChanging(value); + this.SendPropertyChanging(); + this._WeldingLocationId = value; + this.SendPropertyChanged("WeldingLocationId"); + this.OnWeldingLocationIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WeldingMode", DbType="NVarChar(50)")] + public string WeldingMode + { + get + { + return this._WeldingMode; + } + set + { + if ((this._WeldingMode != value)) + { + this.OnWeldingModeChanging(value); + this.SendPropertyChanging(); + this._WeldingMode = value; + this.SendPropertyChanged("WeldingMode"); + this.OnWeldingModeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttachUrl", DbType="NVarChar(500)")] + public string AttachUrl + { + get + { + return this._AttachUrl; + } + set + { + if ((this._AttachUrl != value)) + { + this.OnAttachUrlChanging(value); + this.SendPropertyChanging(); + this._AttachUrl = value; + this.SendPropertyChanged("AttachUrl"); + this.OnAttachUrlChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SubmitPersonId", DbType="NVarChar(50)")] + public string SubmitPersonId + { + get + { + return this._SubmitPersonId; + } + set + { + if ((this._SubmitPersonId != value)) + { + this.OnSubmitPersonIdChanging(value); + this.SendPropertyChanging(); + this._SubmitPersonId = value; + this.SendPropertyChanged("SubmitPersonId"); + this.OnSubmitPersonIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SubmitDate", DbType="DateTime NOT NULL")] + public System.DateTime SubmitDate + { + get + { + return this._SubmitDate; + } + set + { + if ((this._SubmitDate != value)) + { + this.OnSubmitDateChanging(value); + this.SendPropertyChanging(); + this._SubmitDate = value; + this.SendPropertyChanged("SubmitDate"); + this.OnSubmitDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AuditState", DbType="Int NOT NULL")] + public int AuditState + { + get + { + return this._AuditState; + } + set + { + if ((this._AuditState != value)) + { + this.OnAuditStateChanging(value); + this.SendPropertyChanging(); + this._AuditState = value; + this.SendPropertyChanged("AuditState"); + this.OnAuditStateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AuditMan", DbType="NVarChar(50)")] + public string AuditMan + { + get + { + return this._AuditMan; + } + set + { + if ((this._AuditMan != value)) + { + this.OnAuditManChanging(value); + this.SendPropertyChanging(); + this._AuditMan = value; + this.SendPropertyChanged("AuditMan"); + this.OnAuditManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AuditDate", DbType="DateTime")] + public System.Nullable AuditDate + { + get + { + return this._AuditDate; + } + set + { + if ((this._AuditDate != value)) + { + this.OnAuditDateChanging(value); + this.SendPropertyChanging(); + this._AuditDate = value; + this.SendPropertyChanged("AuditDate"); + this.OnAuditDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AuditRemark", DbType="NVarChar(500)")] + public string AuditRemark + { + get + { + return this._AuditRemark; + } + set + { + if ((this._AuditRemark != value)) + { + this.OnAuditRemarkChanging(value); + this.SendPropertyChanging(); + this._AuditRemark = value; + this.SendPropertyChanged("AuditRemark"); + this.OnAuditRemarkChanged(); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.HJGL_WeldJoint")] public partial class HJGL_WeldJoint : INotifyPropertyChanging, INotifyPropertyChanged {