From cb3c2c65ad0f494f9415382960c3e8101b0fb152 Mon Sep 17 00:00:00 2001 From: fei550 <1420031550@qq.com> Date: Fri, 29 May 2026 14:35:20 +0800 Subject: [PATCH 1/6] =?UTF-8?q?feat(hjgl):=E5=A2=9E=E5=8A=A0=E7=84=8A?= =?UTF-8?q?=E6=8E=A5=E6=97=A5=E6=8A=A5=E5=AE=A1=E6=A0=B8=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BLL/API/HJGL/APIPreWeldingDailyService.cs | 240 +-- .../HJGL/WeldingManage/WeldingDailyService.cs | 402 +++++ SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 2 +- .../HJGL/WeldingManage/WeldReport.aspx | 91 +- .../HJGL/WeldingManage/WeldReport.aspx.cs | 178 +- .../WeldingManage/WeldReport.aspx.designer.cs | 101 +- .../HJGL/WeldingManage/WeldReportEdit.aspx | 2 +- .../HJGL/WeldingManage/WeldReportEdit.aspx.cs | 193 +-- SGGL/Model/Model.cs | 1541 ++++++++++++++--- 9 files changed, 2109 insertions(+), 641 deletions(-) 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 65f577f8..d70cb478 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -17042,7 +17042,7 @@ - + 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/Model/Model.cs b/SGGL/Model/Model.cs index a757b5cc..22818dc6 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -173,6 +173,9 @@ namespace Model partial void InsertBase_MaterialType(Base_MaterialType instance); partial void UpdateBase_MaterialType(Base_MaterialType instance); partial void DeleteBase_MaterialType(Base_MaterialType instance); + partial void InsertBase_MaterialUnit(Base_MaterialUnit instance); + partial void UpdateBase_MaterialUnit(Base_MaterialUnit instance); + partial void DeleteBase_MaterialUnit(Base_MaterialUnit instance); partial void InsertBase_Medium(Base_Medium instance); partial void UpdateBase_Medium(Base_Medium instance); partial void DeleteBase_Medium(Base_Medium instance); @@ -731,6 +734,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); @@ -1016,6 +1022,9 @@ namespace Model partial void InsertMaterial_NoticeAndSupervision(Material_NoticeAndSupervision instance); partial void UpdateMaterial_NoticeAndSupervision(Material_NoticeAndSupervision instance); partial void DeleteMaterial_NoticeAndSupervision(Material_NoticeAndSupervision instance); + partial void InsertMaterialInAndOutRecord(MaterialInAndOutRecord instance); + partial void UpdateMaterialInAndOutRecord(MaterialInAndOutRecord instance); + partial void DeleteMaterialInAndOutRecord(MaterialInAndOutRecord instance); partial void InsertMeeting_AttendMeeting(Meeting_AttendMeeting instance); partial void UpdateMeeting_AttendMeeting(Meeting_AttendMeeting instance); partial void DeleteMeeting_AttendMeeting(Meeting_AttendMeeting instance); @@ -2344,6 +2353,14 @@ namespace Model } } + public System.Data.Linq.Table Base_MaterialUnit + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Base_Medium { get @@ -3840,6 +3857,14 @@ namespace Model } } + public System.Data.Linq.Table HJGL_WeldingDailyTempDetail + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table HJGL_WeldJoint { get @@ -4600,6 +4625,14 @@ namespace Model } } + public System.Data.Linq.Table MaterialInAndOutRecord + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Meeting_AttendMeeting { get @@ -12442,7 +12475,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveIdea", DbType="NVarChar(2000)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveIdea", DbType="NVarChar(200)")] public string ApproveIdea { get @@ -22621,6 +22654,8 @@ namespace Model private string _UnitId; + private string _ProjectId; + private string _MaterialId; private string _ColorName; @@ -22631,8 +22666,6 @@ namespace Model private string _Remark; - private string _ProjectId; - #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -22641,6 +22674,8 @@ namespace Model partial void OnMaterialColorIdChanged(); partial void OnUnitIdChanging(string value); partial void OnUnitIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); partial void OnMaterialIdChanging(string value); partial void OnMaterialIdChanged(); partial void OnColorNameChanging(string value); @@ -22651,8 +22686,6 @@ namespace Model partial void OnRGBChanged(); partial void OnRemarkChanging(string value); partial void OnRemarkChanged(); - partial void OnProjectIdChanging(string value); - partial void OnProjectIdChanged(); #endregion public Base_MaterialColor() @@ -22700,6 +22733,26 @@ namespace Model } } + [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="_MaterialId", DbType="NVarChar(50)")] public string MaterialId { @@ -22800,26 +22853,6 @@ namespace Model } } - [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(); - } - } - } - public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -23003,6 +23036,140 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Base_MaterialUnit")] + public partial class Base_MaterialUnit : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _MaterialUnitId; + + private string _MaterialUnitName; + + private string _MaterialUnitCode; + + private string _Remark; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnMaterialUnitIdChanging(string value); + partial void OnMaterialUnitIdChanged(); + partial void OnMaterialUnitNameChanging(string value); + partial void OnMaterialUnitNameChanged(); + partial void OnMaterialUnitCodeChanging(string value); + partial void OnMaterialUnitCodeChanged(); + partial void OnRemarkChanging(string value); + partial void OnRemarkChanged(); + #endregion + + public Base_MaterialUnit() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialUnitId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string MaterialUnitId + { + get + { + return this._MaterialUnitId; + } + set + { + if ((this._MaterialUnitId != value)) + { + this.OnMaterialUnitIdChanging(value); + this.SendPropertyChanging(); + this._MaterialUnitId = value; + this.SendPropertyChanged("MaterialUnitId"); + this.OnMaterialUnitIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialUnitName", DbType="NVarChar(100)")] + public string MaterialUnitName + { + get + { + return this._MaterialUnitName; + } + set + { + if ((this._MaterialUnitName != value)) + { + this.OnMaterialUnitNameChanging(value); + this.SendPropertyChanging(); + this._MaterialUnitName = value; + this.SendPropertyChanged("MaterialUnitName"); + this.OnMaterialUnitNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialUnitCode", DbType="NVarChar(50)")] + public string MaterialUnitCode + { + get + { + return this._MaterialUnitCode; + } + set + { + if ((this._MaterialUnitCode != value)) + { + this.OnMaterialUnitCodeChanging(value); + this.SendPropertyChanging(); + this._MaterialUnitCode = value; + this.SendPropertyChanged("MaterialUnitCode"); + this.OnMaterialUnitCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="NVarChar(200)")] + public string Remark + { + get + { + return this._Remark; + } + set + { + if ((this._Remark != value)) + { + this.OnRemarkChanging(value); + this.SendPropertyChanging(); + this._Remark = value; + this.SendPropertyChanged("Remark"); + this.OnRemarkChanged(); + } + } + } + + 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.Base_Medium")] public partial class Base_Medium : INotifyPropertyChanging, INotifyPropertyChanged { @@ -24797,8 +24964,6 @@ namespace Model private EntitySet _Base_ProjectSate; - private EntitySet _Base_Warehouse; - private EntitySet _HJGL_Batch_NDE; private EntitySet _HJGL_Batch_PointBatch; @@ -25083,6 +25248,8 @@ namespace Model private EntitySet _Sys_FlowOperate; + private EntitySet _Sys_Log; + private EntitySet _Sys_RoleItem; private EntitySet _Sys_UserRead; @@ -25229,7 +25396,6 @@ namespace Model this._Base_ProjectType = default(EntityRef); this._Base_Unit = default(EntityRef); this._Base_ProjectSate = new EntitySet(new Action(this.attach_Base_ProjectSate), new Action(this.detach_Base_ProjectSate)); - this._Base_Warehouse = new EntitySet(new Action(this.attach_Base_Warehouse), new Action(this.detach_Base_Warehouse)); this._HJGL_Batch_NDE = new EntitySet(new Action(this.attach_HJGL_Batch_NDE), new Action(this.detach_HJGL_Batch_NDE)); this._HJGL_Batch_PointBatch = new EntitySet(new Action(this.attach_HJGL_Batch_PointBatch), new Action(this.detach_HJGL_Batch_PointBatch)); this._Check_CheckColligation = new EntitySet(new Action(this.attach_Check_CheckColligation), new Action(this.detach_Check_CheckColligation)); @@ -25372,6 +25538,7 @@ namespace Model this._Sys_CodeRecords = new EntitySet(new Action(this.attach_Sys_CodeRecords), new Action(this.detach_Sys_CodeRecords)); this._Sys_CQMS_DataInTemp = new EntitySet(new Action(this.attach_Sys_CQMS_DataInTemp), new Action(this.detach_Sys_CQMS_DataInTemp)); this._Sys_FlowOperate = new EntitySet(new Action(this.attach_Sys_FlowOperate), new Action(this.detach_Sys_FlowOperate)); + this._Sys_Log = new EntitySet(new Action(this.attach_Sys_Log), new Action(this.detach_Sys_Log)); this._Sys_RoleItem = new EntitySet(new Action(this.attach_Sys_RoleItem), new Action(this.detach_Sys_RoleItem)); this._Sys_UserRead = new EntitySet(new Action(this.attach_Sys_UserRead), new Action(this.detach_Sys_UserRead)); this._Technical_TechnicalDisclose = new EntitySet(new Action(this.attach_Technical_TechnicalDisclose), new Action(this.detach_Technical_TechnicalDisclose)); @@ -26416,19 +26583,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Base_Warehouse_Project", Storage="_Base_Warehouse", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] - public EntitySet Base_Warehouse - { - get - { - return this._Base_Warehouse; - } - set - { - this._Base_Warehouse.Assign(value); - } - } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Batch_NDECheck_Base_Project", Storage="_HJGL_Batch_NDE", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] public EntitySet HJGL_Batch_NDE { @@ -28275,6 +28429,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Sys_Log_Base_Project", Storage="_Sys_Log", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] + public EntitySet Sys_Log + { + get + { + return this._Sys_Log; + } + set + { + this._Sys_Log.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Sys_RoleItem_Base_Project", Storage="_Sys_RoleItem", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] public EntitySet Sys_RoleItem { @@ -28762,18 +28929,6 @@ namespace Model entity.Base_Project = null; } - private void attach_Base_Warehouse(Base_Warehouse entity) - { - this.SendPropertyChanging(); - entity.Base_Project = this; - } - - private void detach_Base_Warehouse(Base_Warehouse entity) - { - this.SendPropertyChanging(); - entity.Base_Project = null; - } - private void attach_HJGL_Batch_NDE(HJGL_Batch_NDE entity) { this.SendPropertyChanging(); @@ -30478,6 +30633,18 @@ namespace Model entity.Base_Project = null; } + private void attach_Sys_Log(Sys_Log entity) + { + this.SendPropertyChanging(); + entity.Base_Project = this; + } + + private void detach_Sys_Log(Sys_Log entity) + { + this.SendPropertyChanging(); + entity.Base_Project = null; + } + private void attach_Sys_RoleItem(Sys_RoleItem entity) { this.SendPropertyChanging(); @@ -39008,8 +39175,6 @@ namespace Model private System.Nullable _ModifyTime; - private EntityRef _Base_Project; - #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -39034,7 +39199,6 @@ namespace Model public Base_Warehouse() { - this._Base_Project = default(EntityRef); OnCreated(); } @@ -39109,10 +39273,6 @@ namespace Model { if ((this._ProjectId != value)) { - if (this._Base_Project.HasLoadedOrAssignedValue) - { - throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); - } this.OnProjectIdChanging(value); this.SendPropertyChanging(); this._ProjectId = value; @@ -39202,40 +39362,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Base_Warehouse_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] - public Base_Project Base_Project - { - get - { - return this._Base_Project.Entity; - } - set - { - Base_Project previousValue = this._Base_Project.Entity; - if (((previousValue != value) - || (this._Base_Project.HasLoadedOrAssignedValue == false))) - { - this.SendPropertyChanging(); - if ((previousValue != null)) - { - this._Base_Project.Entity = null; - previousValue.Base_Warehouse.Remove(this); - } - this._Base_Project.Entity = value; - if ((value != null)) - { - value.Base_Warehouse.Add(this); - this._ProjectId = value.ProjectId; - } - else - { - this._ProjectId = default(string); - } - this.SendPropertyChanged("Base_Project"); - } - } - } - public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -61309,6 +61435,8 @@ namespace Model private string _SType; + private string _SourceDes; + private string _MeasurementRange; private string _Precision; @@ -61335,8 +61463,6 @@ namespace Model private string _Remark; - private string _SourceDes; - private EntityRef _Base_CNProfessional; private EntityRef _Base_Project; @@ -61391,6 +61517,8 @@ namespace Model partial void OnIsCheckOKChanged(); partial void OnSTypeChanging(string value); partial void OnSTypeChanged(); + partial void OnSourceDesChanging(string value); + partial void OnSourceDesChanged(); partial void OnMeasurementRangeChanging(string value); partial void OnMeasurementRangeChanged(); partial void OnPrecisionChanging(string value); @@ -61417,8 +61545,6 @@ namespace Model partial void OnCalibrationWarningChanged(); partial void OnRemarkChanging(string value); partial void OnRemarkChanged(); - partial void OnSourceDesChanging(string value); - partial void OnSourceDesChanged(); #endregion public Comprehensive_InspectionMachine() @@ -61881,6 +62007,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SourceDes", DbType="NVarChar(500)")] + public string SourceDes + { + get + { + return this._SourceDes; + } + set + { + if ((this._SourceDes != value)) + { + this.OnSourceDesChanging(value); + this.SendPropertyChanging(); + this._SourceDes = value; + this.SendPropertyChanged("SourceDes"); + this.OnSourceDesChanged(); + } + } + } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MeasurementRange", DbType="NVarChar(50)")] public string MeasurementRange { @@ -62141,26 +62287,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SourceDes", DbType="NVarChar(500)")] - public string SourceDes - { - get - { - return this._SourceDes; - } - set - { - if ((this._SourceDes != value)) - { - this.OnSourceDesChanging(value); - this.SendPropertyChanging(); - this._SourceDes = value; - this.SendPropertyChanged("SourceDes"); - this.OnSourceDesChanged(); - } - } - } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Comprehensive_InspectionMachine_Base_CNProfessional", Storage="_Base_CNProfessional", ThisKey="CNProfessionalId", OtherKey="CNProfessionalId", IsForeignKey=true)] public Base_CNProfessional Base_CNProfessional { @@ -101508,10 +101634,10 @@ namespace Model private string _TrainNumber; - private System.Nullable _TypeInt; - private string _TrainNumberId; + private System.Nullable _TypeInt; + private string _CompileMan; private System.Nullable _CompileDate; @@ -101546,10 +101672,10 @@ namespace Model partial void OnReceiveDateChanged(); partial void OnTrainNumberChanging(string value); partial void OnTrainNumberChanged(); - partial void OnTypeIntChanging(System.Nullable value); - partial void OnTypeIntChanged(); partial void OnTrainNumberIdChanging(string value); partial void OnTrainNumberIdChanged(); + partial void OnTypeIntChanging(System.Nullable value); + partial void OnTypeIntChanged(); partial void OnCompileManChanging(string value); partial void OnCompileManChanged(); partial void OnCompileDateChanging(System.Nullable value); @@ -101803,26 +101929,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TypeInt", DbType="Int")] - public System.Nullable TypeInt - { - get - { - return this._TypeInt; - } - set - { - if ((this._TypeInt != value)) - { - this.OnTypeIntChanging(value); - this.SendPropertyChanging(); - this._TypeInt = value; - this.SendPropertyChanged("TypeInt"); - this.OnTypeIntChanged(); - } - } - } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TrainNumberId", DbType="VarChar(50)")] public string TrainNumberId { @@ -101843,6 +101949,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TypeInt", DbType="Int")] + public System.Nullable TypeInt + { + get + { + return this._TypeInt; + } + set + { + if ((this._TypeInt != value)) + { + this.OnTypeIntChanging(value); + this.SendPropertyChanging(); + this._TypeInt = value; + this.SendPropertyChanged("TypeInt"); + this.OnTypeIntChanged(); + } + } + } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] public string CompileMan { @@ -108820,6 +108946,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 { @@ -113138,7 +113734,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Rectification", DbType="NVarChar(500)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Rectification", DbType="NVarChar(50)")] public string Rectification { get @@ -113264,7 +113860,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Measures", DbType="NVarChar(500)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Measures", DbType="NVarChar(50)")] public string Measures { get @@ -164302,6 +164898,356 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.MaterialInAndOutRecord")] + public partial class MaterialInAndOutRecord : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _Id; + + private string _ProjectId; + + private string _GoodsCategoryId; + + private string _GoodsCategoryName; + + private string _MaterialModel; + + private System.Nullable _InOutDate; + + private string _UnitId; + + private string _InOrOut; + + private System.Nullable _Number; + + private string _MaterialUnitId; + + private string _Remark; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnIdChanging(string value); + partial void OnIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnGoodsCategoryIdChanging(string value); + partial void OnGoodsCategoryIdChanged(); + partial void OnGoodsCategoryNameChanging(string value); + partial void OnGoodsCategoryNameChanged(); + partial void OnMaterialModelChanging(string value); + partial void OnMaterialModelChanged(); + partial void OnInOutDateChanging(System.Nullable value); + partial void OnInOutDateChanged(); + partial void OnUnitIdChanging(string value); + partial void OnUnitIdChanged(); + partial void OnInOrOutChanging(string value); + partial void OnInOrOutChanged(); + partial void OnNumberChanging(System.Nullable value); + partial void OnNumberChanged(); + partial void OnMaterialUnitIdChanging(string value); + partial void OnMaterialUnitIdChanged(); + partial void OnRemarkChanging(string value); + partial void OnRemarkChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnCompileDateChanging(System.Nullable value); + partial void OnCompileDateChanged(); + #endregion + + public MaterialInAndOutRecord() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string Id + { + get + { + return this._Id; + } + set + { + if ((this._Id != value)) + { + this.OnIdChanging(value); + this.SendPropertyChanging(); + this._Id = value; + this.SendPropertyChanged("Id"); + this.OnIdChanged(); + } + } + } + + [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="_GoodsCategoryId", DbType="NVarChar(50)")] + public string GoodsCategoryId + { + get + { + return this._GoodsCategoryId; + } + set + { + if ((this._GoodsCategoryId != value)) + { + this.OnGoodsCategoryIdChanging(value); + this.SendPropertyChanging(); + this._GoodsCategoryId = value; + this.SendPropertyChanged("GoodsCategoryId"); + this.OnGoodsCategoryIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_GoodsCategoryName", DbType="NVarChar(100)")] + public string GoodsCategoryName + { + get + { + return this._GoodsCategoryName; + } + set + { + if ((this._GoodsCategoryName != value)) + { + this.OnGoodsCategoryNameChanging(value); + this.SendPropertyChanging(); + this._GoodsCategoryName = value; + this.SendPropertyChanged("GoodsCategoryName"); + this.OnGoodsCategoryNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialModel", DbType="NVarChar(100)")] + public string MaterialModel + { + get + { + return this._MaterialModel; + } + set + { + if ((this._MaterialModel != value)) + { + this.OnMaterialModelChanging(value); + this.SendPropertyChanging(); + this._MaterialModel = value; + this.SendPropertyChanged("MaterialModel"); + this.OnMaterialModelChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InOutDate", DbType="DateTime")] + public System.Nullable InOutDate + { + get + { + return this._InOutDate; + } + set + { + if ((this._InOutDate != value)) + { + this.OnInOutDateChanging(value); + this.SendPropertyChanging(); + this._InOutDate = value; + this.SendPropertyChanged("InOutDate"); + this.OnInOutDateChanged(); + } + } + } + + [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="_InOrOut", DbType="NVarChar(10)")] + public string InOrOut + { + get + { + return this._InOrOut; + } + set + { + if ((this._InOrOut != value)) + { + this.OnInOrOutChanging(value); + this.SendPropertyChanging(); + this._InOrOut = value; + this.SendPropertyChanged("InOrOut"); + this.OnInOrOutChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Number", DbType="Decimal(18,2)")] + public System.Nullable Number + { + get + { + return this._Number; + } + set + { + if ((this._Number != value)) + { + this.OnNumberChanging(value); + this.SendPropertyChanging(); + this._Number = value; + this.SendPropertyChanged("Number"); + this.OnNumberChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialUnitId", DbType="NVarChar(50)")] + public string MaterialUnitId + { + get + { + return this._MaterialUnitId; + } + set + { + if ((this._MaterialUnitId != value)) + { + this.OnMaterialUnitIdChanging(value); + this.SendPropertyChanging(); + this._MaterialUnitId = value; + this.SendPropertyChanged("MaterialUnitId"); + this.OnMaterialUnitIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="NVarChar(200)")] + public string Remark + { + get + { + return this._Remark; + } + set + { + if ((this._Remark != value)) + { + this.OnRemarkChanging(value); + this.SendPropertyChanging(); + this._Remark = value; + this.SendPropertyChanged("Remark"); + this.OnRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + this.OnCompileManChanging(value); + this.SendPropertyChanging(); + this._CompileMan = value; + this.SendPropertyChanged("CompileMan"); + this.OnCompileManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")] + public System.Nullable CompileDate + { + get + { + return this._CompileDate; + } + set + { + if ((this._CompileDate != value)) + { + this.OnCompileDateChanging(value); + this.SendPropertyChanging(); + this._CompileDate = value; + this.SendPropertyChanged("CompileDate"); + this.OnCompileDateChanged(); + } + } + } + + 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.Meeting_AttendMeeting")] public partial class Meeting_AttendMeeting : INotifyPropertyChanging, INotifyPropertyChanged { @@ -166641,7 +167587,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttentPerson", DbType="NVarChar(3000)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttentPerson", DbType="NVarChar(500)")] public string AttentPerson { get @@ -197648,7 +198594,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectDescription", DbType="VarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectDescription", DbType="VarChar(255)")] public string ProjectDescription { get @@ -197768,7 +198714,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CalculationRule", DbType="VarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CalculationRule", DbType="VarChar(255)")] public string CalculationRule { get @@ -197828,7 +198774,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructionSubcontractor", DbType="VarChar(100)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructionSubcontractor", DbType="VarChar(50)")] public string ConstructionSubcontractor { get @@ -198212,7 +199158,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPackageEstimate", DbType="Decimal(18,3)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPackageEstimate", DbType="Decimal(18,2)")] public System.Nullable WorkPackageEstimate { get @@ -198517,16 +199463,6 @@ namespace Model private string _ProjectId; - private string _ContractId; - - private string _OrderCode; - - private System.Nullable _OrderInDate; - - private System.Nullable _OrderOutDate; - - private string _MaterialRequisitionUnit; - private System.Nullable _State; private string _InvoiceCode; @@ -198555,6 +199491,16 @@ namespace Model private string _CreateUser; + private string _ContractId; + + private System.Nullable _OrderInDate; + + private string _OrderCode; + + private System.Nullable _OrderOutDate; + + private string _MaterialRequisitionUnit; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -198563,16 +199509,6 @@ namespace Model partial void OnInvoiceIdChanged(); partial void OnProjectIdChanging(string value); partial void OnProjectIdChanged(); - partial void OnContractIdChanging(string value); - partial void OnContractIdChanged(); - partial void OnOrderCodeChanging(string value); - partial void OnOrderCodeChanged(); - partial void OnOrderInDateChanging(System.Nullable value); - partial void OnOrderInDateChanged(); - partial void OnOrderOutDateChanging(System.Nullable value); - partial void OnOrderOutDateChanged(); - partial void OnMaterialRequisitionUnitChanging(string value); - partial void OnMaterialRequisitionUnitChanged(); partial void OnStateChanging(System.Nullable value); partial void OnStateChanged(); partial void OnInvoiceCodeChanging(string value); @@ -198601,6 +199537,16 @@ namespace Model partial void OnCreateDateChanged(); partial void OnCreateUserChanging(string value); partial void OnCreateUserChanged(); + partial void OnContractIdChanging(string value); + partial void OnContractIdChanged(); + partial void OnOrderInDateChanging(System.Nullable value); + partial void OnOrderInDateChanged(); + partial void OnOrderCodeChanging(string value); + partial void OnOrderCodeChanged(); + partial void OnOrderOutDateChanging(System.Nullable value); + partial void OnOrderOutDateChanged(); + partial void OnMaterialRequisitionUnitChanging(string value); + partial void OnMaterialRequisitionUnitChanged(); #endregion public PHTGL_Invoice() @@ -198648,106 +199594,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractId", DbType="NVarChar(50)")] - public string ContractId - { - get - { - return this._ContractId; - } - set - { - if ((this._ContractId != value)) - { - this.OnContractIdChanging(value); - this.SendPropertyChanging(); - this._ContractId = value; - this.SendPropertyChanged("ContractId"); - this.OnContractIdChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderCode", DbType="NVarChar(50)")] - public string OrderCode - { - get - { - return this._OrderCode; - } - set - { - if ((this._OrderCode != value)) - { - this.OnOrderCodeChanging(value); - this.SendPropertyChanging(); - this._OrderCode = value; - this.SendPropertyChanged("OrderCode"); - this.OnOrderCodeChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderInDate", DbType="Date")] - public System.Nullable OrderInDate - { - get - { - return this._OrderInDate; - } - set - { - if ((this._OrderInDate != value)) - { - this.OnOrderInDateChanging(value); - this.SendPropertyChanging(); - this._OrderInDate = value; - this.SendPropertyChanged("OrderInDate"); - this.OnOrderInDateChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderOutDate", DbType="Date")] - public System.Nullable OrderOutDate - { - get - { - return this._OrderOutDate; - } - set - { - if ((this._OrderOutDate != value)) - { - this.OnOrderOutDateChanging(value); - this.SendPropertyChanging(); - this._OrderOutDate = value; - this.SendPropertyChanged("OrderOutDate"); - this.OnOrderOutDateChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialRequisitionUnit", DbType="NVarChar(100)")] - public string MaterialRequisitionUnit - { - get - { - return this._MaterialRequisitionUnit; - } - set - { - if ((this._MaterialRequisitionUnit != value)) - { - this.OnMaterialRequisitionUnitChanging(value); - this.SendPropertyChanging(); - this._MaterialRequisitionUnit = value; - this.SendPropertyChanged("MaterialRequisitionUnit"); - this.OnMaterialRequisitionUnitChanged(); - } - } - } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_State", DbType="Int")] public System.Nullable State { @@ -199028,6 +199874,106 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractId", DbType="NVarChar(50)")] + public string ContractId + { + get + { + return this._ContractId; + } + set + { + if ((this._ContractId != value)) + { + this.OnContractIdChanging(value); + this.SendPropertyChanging(); + this._ContractId = value; + this.SendPropertyChanged("ContractId"); + this.OnContractIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderInDate", DbType="Date")] + public System.Nullable OrderInDate + { + get + { + return this._OrderInDate; + } + set + { + if ((this._OrderInDate != value)) + { + this.OnOrderInDateChanging(value); + this.SendPropertyChanging(); + this._OrderInDate = value; + this.SendPropertyChanged("OrderInDate"); + this.OnOrderInDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderCode", DbType="NVarChar(50)")] + public string OrderCode + { + get + { + return this._OrderCode; + } + set + { + if ((this._OrderCode != value)) + { + this.OnOrderCodeChanging(value); + this.SendPropertyChanging(); + this._OrderCode = value; + this.SendPropertyChanged("OrderCode"); + this.OnOrderCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderOutDate", DbType="Date")] + public System.Nullable OrderOutDate + { + get + { + return this._OrderOutDate; + } + set + { + if ((this._OrderOutDate != value)) + { + this.OnOrderOutDateChanging(value); + this.SendPropertyChanging(); + this._OrderOutDate = value; + this.SendPropertyChanged("OrderOutDate"); + this.OnOrderOutDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialRequisitionUnit", DbType="NVarChar(100)")] + public string MaterialRequisitionUnit + { + get + { + return this._MaterialRequisitionUnit; + } + set + { + if ((this._MaterialRequisitionUnit != value)) + { + this.OnMaterialRequisitionUnitChanging(value); + this.SendPropertyChanging(); + this._MaterialRequisitionUnit = value; + this.SendPropertyChanged("MaterialRequisitionUnit"); + this.OnMaterialRequisitionUnitChanged(); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -200406,7 +201352,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReviewResults", DbType="NVarChar(50)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReviewResults", DbType="NVarChar(1000)")] public string ReviewResults { get @@ -259518,6 +260464,8 @@ namespace Model private System.Nullable _LogSource; + private EntityRef _Base_Project; + private EntityRef _Person_Persons; #region 可扩展性方法定义 @@ -259552,6 +260500,7 @@ namespace Model public Sys_Log() { + this._Base_Project = default(EntityRef); this._Person_Persons = default(EntityRef); OnCreated(); } @@ -259691,6 +260640,10 @@ namespace Model { if ((this._ProjectId != value)) { + if (this._Base_Project.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } this.OnProjectIdChanging(value); this.SendPropertyChanging(); this._ProjectId = value; @@ -259800,6 +260753,40 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Sys_Log_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] + public Base_Project Base_Project + { + get + { + return this._Base_Project.Entity; + } + set + { + Base_Project previousValue = this._Base_Project.Entity; + if (((previousValue != value) + || (this._Base_Project.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Project.Entity = null; + previousValue.Sys_Log.Remove(this); + } + this._Base_Project.Entity = value; + if ((value != null)) + { + value.Sys_Log.Add(this); + this._ProjectId = value.ProjectId; + } + else + { + this._ProjectId = default(string); + } + this.SendPropertyChanged("Base_Project"); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Sys_Log_Person_Persons", Storage="_Person_Persons", ThisKey="UserId", OtherKey="PersonId", IsForeignKey=true)] public Person_Persons Person_Persons { @@ -324393,7 +325380,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(200)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(50)")] public string Name { get @@ -324970,7 +325957,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")] public string PackageContent { get @@ -325161,7 +326148,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")] public string PackageContent { get @@ -330500,7 +331487,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")] public string PackageContent { get @@ -331972,7 +332959,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")] public string PackageContent { get @@ -341873,7 +342860,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractNo", DbType="NVarChar(1500)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractNo", DbType="NVarChar(500)")] public string ContractNo { get @@ -341893,7 +342880,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitWorks", DbType="NVarChar(1500)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitWorks", DbType="NVarChar(500)")] public string UnitWorks { get From 3fc908e389b82c0df342eee418afdb597d64dd7d Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Fri, 29 May 2026 14:41:25 +0800 Subject: [PATCH 2/6] 1 --- SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 4 +- SGGL/FineUIPro.Web/common/Menu_DigData.xml | 63 ++++------------------ SGGL/FineUIPro.Web/common/Menu_HJGL.xml | 10 ++-- SGGL/FineUIPro.Web/common/Menu_HTGL.xml | 6 +-- SGGL/FineUIPro.Web/common/Menu_JDGL.xml | 6 +-- SGGL/FineUIPro.Web/common/Menu_PHTGL.xml | 2 +- SGGL/FineUIPro.Web/common/Menu_ZHGL.xml | 42 +++++++++++++++ 7 files changed, 64 insertions(+), 69 deletions(-) diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 33bc6655..87ca2703 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/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 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 9d64107cdc7b5c04fb45c5bdb5846d67cc6ac1b5 Mon Sep 17 00:00:00 2001 From: fei550 <1420031550@qq.com> Date: Fri, 29 May 2026 14:43:41 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E7=84=8A=E6=8E=A5=E6=97=A5=E6=8A=A5?= =?UTF-8?q?=E5=AE=A1=E6=A0=B8=E4=BF=AE=E6=94=B9=E8=84=9A=E6=9C=AC=E8=A1=A5?= =?UTF-8?q?=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + 1 file changed, 1 insertion(+) 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 From 0890ddbba3451793a4604ad68904cc254eb8109d Mon Sep 17 00:00:00 2001 From: fei550 <1420031550@qq.com> Date: Fri, 29 May 2026 14:43:50 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E7=84=8A=E6=8E=A5=E6=97=A5=E6=8A=A5?= =?UTF-8?q?=E5=AE=A1=E6=A0=B8=E4=BF=AE=E6=94=B9=E8=84=9A=E6=9C=AC=E8=A1=A5?= =?UTF-8?q?=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DataBase/版本日志/SGGLDB_V2026-05-29-lpf.sql | 37 ++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 DataBase/版本日志/SGGLDB_V2026-05-29-lpf.sql 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 From 8643e29a09b80b8e5949afbe21ba45cedc5f0793 Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Fri, 29 May 2026 14:44:33 +0800 Subject: [PATCH 5/6] 1 --- SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index ae434ca2..87ca2703 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -17166,7 +17166,7 @@ - + From b4e117fd16f314ecec8aa07084fa66b8985508ec Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Fri, 29 May 2026 14:49:27 +0800 Subject: [PATCH 6/6] 1 --- SGGL/Model/Model.cs | 1060 +++++++++++-------------------------------- 1 file changed, 277 insertions(+), 783 deletions(-) diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index 396091df..0d237201 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -173,9 +173,6 @@ namespace Model partial void InsertBase_MaterialType(Base_MaterialType instance); partial void UpdateBase_MaterialType(Base_MaterialType instance); partial void DeleteBase_MaterialType(Base_MaterialType instance); - partial void InsertBase_MaterialUnit(Base_MaterialUnit instance); - partial void UpdateBase_MaterialUnit(Base_MaterialUnit instance); - partial void DeleteBase_MaterialUnit(Base_MaterialUnit instance); partial void InsertBase_Medium(Base_Medium instance); partial void UpdateBase_Medium(Base_Medium instance); partial void DeleteBase_Medium(Base_Medium instance); @@ -1022,9 +1019,6 @@ namespace Model partial void InsertMaterial_NoticeAndSupervision(Material_NoticeAndSupervision instance); partial void UpdateMaterial_NoticeAndSupervision(Material_NoticeAndSupervision instance); partial void DeleteMaterial_NoticeAndSupervision(Material_NoticeAndSupervision instance); - partial void InsertMaterialInAndOutRecord(MaterialInAndOutRecord instance); - partial void UpdateMaterialInAndOutRecord(MaterialInAndOutRecord instance); - partial void DeleteMaterialInAndOutRecord(MaterialInAndOutRecord instance); partial void InsertMeeting_AttendMeeting(Meeting_AttendMeeting instance); partial void UpdateMeeting_AttendMeeting(Meeting_AttendMeeting instance); partial void DeleteMeeting_AttendMeeting(Meeting_AttendMeeting instance); @@ -2353,14 +2347,6 @@ namespace Model } } - public System.Data.Linq.Table Base_MaterialUnit - { - get - { - return this.GetTable(); - } - } - public System.Data.Linq.Table Base_Medium { get @@ -4625,14 +4611,6 @@ namespace Model } } - public System.Data.Linq.Table MaterialInAndOutRecord - { - get - { - return this.GetTable(); - } - } - public System.Data.Linq.Table Meeting_AttendMeeting { get @@ -12475,7 +12453,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveIdea", DbType="NVarChar(200)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveIdea", DbType="NVarChar(2000)")] public string ApproveIdea { get @@ -22654,8 +22632,6 @@ namespace Model private string _UnitId; - private string _ProjectId; - private string _MaterialId; private string _ColorName; @@ -22666,6 +22642,8 @@ namespace Model private string _Remark; + private string _ProjectId; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -22674,8 +22652,6 @@ namespace Model partial void OnMaterialColorIdChanged(); partial void OnUnitIdChanging(string value); partial void OnUnitIdChanged(); - partial void OnProjectIdChanging(string value); - partial void OnProjectIdChanged(); partial void OnMaterialIdChanging(string value); partial void OnMaterialIdChanged(); partial void OnColorNameChanging(string value); @@ -22686,6 +22662,8 @@ namespace Model partial void OnRGBChanged(); partial void OnRemarkChanging(string value); partial void OnRemarkChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); #endregion public Base_MaterialColor() @@ -22733,26 +22711,6 @@ namespace Model } } - [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="_MaterialId", DbType="NVarChar(50)")] public string MaterialId { @@ -22853,6 +22811,26 @@ namespace Model } } + [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(); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -23036,140 +23014,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Base_MaterialUnit")] - public partial class Base_MaterialUnit : INotifyPropertyChanging, INotifyPropertyChanged - { - - private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); - - private string _MaterialUnitId; - - private string _MaterialUnitName; - - private string _MaterialUnitCode; - - private string _Remark; - - #region 可扩展性方法定义 - partial void OnLoaded(); - partial void OnValidate(System.Data.Linq.ChangeAction action); - partial void OnCreated(); - partial void OnMaterialUnitIdChanging(string value); - partial void OnMaterialUnitIdChanged(); - partial void OnMaterialUnitNameChanging(string value); - partial void OnMaterialUnitNameChanged(); - partial void OnMaterialUnitCodeChanging(string value); - partial void OnMaterialUnitCodeChanged(); - partial void OnRemarkChanging(string value); - partial void OnRemarkChanged(); - #endregion - - public Base_MaterialUnit() - { - OnCreated(); - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialUnitId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] - public string MaterialUnitId - { - get - { - return this._MaterialUnitId; - } - set - { - if ((this._MaterialUnitId != value)) - { - this.OnMaterialUnitIdChanging(value); - this.SendPropertyChanging(); - this._MaterialUnitId = value; - this.SendPropertyChanged("MaterialUnitId"); - this.OnMaterialUnitIdChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialUnitName", DbType="NVarChar(100)")] - public string MaterialUnitName - { - get - { - return this._MaterialUnitName; - } - set - { - if ((this._MaterialUnitName != value)) - { - this.OnMaterialUnitNameChanging(value); - this.SendPropertyChanging(); - this._MaterialUnitName = value; - this.SendPropertyChanged("MaterialUnitName"); - this.OnMaterialUnitNameChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialUnitCode", DbType="NVarChar(50)")] - public string MaterialUnitCode - { - get - { - return this._MaterialUnitCode; - } - set - { - if ((this._MaterialUnitCode != value)) - { - this.OnMaterialUnitCodeChanging(value); - this.SendPropertyChanging(); - this._MaterialUnitCode = value; - this.SendPropertyChanged("MaterialUnitCode"); - this.OnMaterialUnitCodeChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="NVarChar(200)")] - public string Remark - { - get - { - return this._Remark; - } - set - { - if ((this._Remark != value)) - { - this.OnRemarkChanging(value); - this.SendPropertyChanging(); - this._Remark = value; - this.SendPropertyChanged("Remark"); - this.OnRemarkChanged(); - } - } - } - - 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.Base_Medium")] public partial class Base_Medium : INotifyPropertyChanging, INotifyPropertyChanged { @@ -24964,6 +24808,8 @@ namespace Model private EntitySet _Base_ProjectSate; + private EntitySet _Base_Warehouse; + private EntitySet _HJGL_Batch_NDE; private EntitySet _HJGL_Batch_PointBatch; @@ -25248,8 +25094,6 @@ namespace Model private EntitySet _Sys_FlowOperate; - private EntitySet _Sys_Log; - private EntitySet _Sys_RoleItem; private EntitySet _Sys_UserRead; @@ -25396,6 +25240,7 @@ namespace Model this._Base_ProjectType = default(EntityRef); this._Base_Unit = default(EntityRef); this._Base_ProjectSate = new EntitySet(new Action(this.attach_Base_ProjectSate), new Action(this.detach_Base_ProjectSate)); + this._Base_Warehouse = new EntitySet(new Action(this.attach_Base_Warehouse), new Action(this.detach_Base_Warehouse)); this._HJGL_Batch_NDE = new EntitySet(new Action(this.attach_HJGL_Batch_NDE), new Action(this.detach_HJGL_Batch_NDE)); this._HJGL_Batch_PointBatch = new EntitySet(new Action(this.attach_HJGL_Batch_PointBatch), new Action(this.detach_HJGL_Batch_PointBatch)); this._Check_CheckColligation = new EntitySet(new Action(this.attach_Check_CheckColligation), new Action(this.detach_Check_CheckColligation)); @@ -25538,7 +25383,6 @@ namespace Model this._Sys_CodeRecords = new EntitySet(new Action(this.attach_Sys_CodeRecords), new Action(this.detach_Sys_CodeRecords)); this._Sys_CQMS_DataInTemp = new EntitySet(new Action(this.attach_Sys_CQMS_DataInTemp), new Action(this.detach_Sys_CQMS_DataInTemp)); this._Sys_FlowOperate = new EntitySet(new Action(this.attach_Sys_FlowOperate), new Action(this.detach_Sys_FlowOperate)); - this._Sys_Log = new EntitySet(new Action(this.attach_Sys_Log), new Action(this.detach_Sys_Log)); this._Sys_RoleItem = new EntitySet(new Action(this.attach_Sys_RoleItem), new Action(this.detach_Sys_RoleItem)); this._Sys_UserRead = new EntitySet(new Action(this.attach_Sys_UserRead), new Action(this.detach_Sys_UserRead)); this._Technical_TechnicalDisclose = new EntitySet(new Action(this.attach_Technical_TechnicalDisclose), new Action(this.detach_Technical_TechnicalDisclose)); @@ -26583,6 +26427,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Base_Warehouse_Project", Storage="_Base_Warehouse", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] + public EntitySet Base_Warehouse + { + get + { + return this._Base_Warehouse; + } + set + { + this._Base_Warehouse.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Batch_NDECheck_Base_Project", Storage="_HJGL_Batch_NDE", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] public EntitySet HJGL_Batch_NDE { @@ -28429,19 +28286,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Sys_Log_Base_Project", Storage="_Sys_Log", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] - public EntitySet Sys_Log - { - get - { - return this._Sys_Log; - } - set - { - this._Sys_Log.Assign(value); - } - } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Sys_RoleItem_Base_Project", Storage="_Sys_RoleItem", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] public EntitySet Sys_RoleItem { @@ -28929,6 +28773,18 @@ namespace Model entity.Base_Project = null; } + private void attach_Base_Warehouse(Base_Warehouse entity) + { + this.SendPropertyChanging(); + entity.Base_Project = this; + } + + private void detach_Base_Warehouse(Base_Warehouse entity) + { + this.SendPropertyChanging(); + entity.Base_Project = null; + } + private void attach_HJGL_Batch_NDE(HJGL_Batch_NDE entity) { this.SendPropertyChanging(); @@ -30633,18 +30489,6 @@ namespace Model entity.Base_Project = null; } - private void attach_Sys_Log(Sys_Log entity) - { - this.SendPropertyChanging(); - entity.Base_Project = this; - } - - private void detach_Sys_Log(Sys_Log entity) - { - this.SendPropertyChanging(); - entity.Base_Project = null; - } - private void attach_Sys_RoleItem(Sys_RoleItem entity) { this.SendPropertyChanging(); @@ -39175,6 +39019,8 @@ namespace Model private System.Nullable _ModifyTime; + private EntityRef _Base_Project; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -39199,6 +39045,7 @@ namespace Model public Base_Warehouse() { + this._Base_Project = default(EntityRef); OnCreated(); } @@ -39273,6 +39120,10 @@ namespace Model { if ((this._ProjectId != value)) { + if (this._Base_Project.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } this.OnProjectIdChanging(value); this.SendPropertyChanging(); this._ProjectId = value; @@ -39362,6 +39213,40 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Base_Warehouse_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] + public Base_Project Base_Project + { + get + { + return this._Base_Project.Entity; + } + set + { + Base_Project previousValue = this._Base_Project.Entity; + if (((previousValue != value) + || (this._Base_Project.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Project.Entity = null; + previousValue.Base_Warehouse.Remove(this); + } + this._Base_Project.Entity = value; + if ((value != null)) + { + value.Base_Warehouse.Add(this); + this._ProjectId = value.ProjectId; + } + else + { + this._ProjectId = default(string); + } + this.SendPropertyChanged("Base_Project"); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -61435,8 +61320,6 @@ namespace Model private string _SType; - private string _SourceDes; - private string _MeasurementRange; private string _Precision; @@ -61463,6 +61346,8 @@ namespace Model private string _Remark; + private string _SourceDes; + private EntityRef _Base_CNProfessional; private EntityRef _Base_Project; @@ -61517,8 +61402,6 @@ namespace Model partial void OnIsCheckOKChanged(); partial void OnSTypeChanging(string value); partial void OnSTypeChanged(); - partial void OnSourceDesChanging(string value); - partial void OnSourceDesChanged(); partial void OnMeasurementRangeChanging(string value); partial void OnMeasurementRangeChanged(); partial void OnPrecisionChanging(string value); @@ -61545,6 +61428,8 @@ namespace Model partial void OnCalibrationWarningChanged(); partial void OnRemarkChanging(string value); partial void OnRemarkChanged(); + partial void OnSourceDesChanging(string value); + partial void OnSourceDesChanged(); #endregion public Comprehensive_InspectionMachine() @@ -62007,26 +61892,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SourceDes", DbType="NVarChar(500)")] - public string SourceDes - { - get - { - return this._SourceDes; - } - set - { - if ((this._SourceDes != value)) - { - this.OnSourceDesChanging(value); - this.SendPropertyChanging(); - this._SourceDes = value; - this.SendPropertyChanged("SourceDes"); - this.OnSourceDesChanged(); - } - } - } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MeasurementRange", DbType="NVarChar(50)")] public string MeasurementRange { @@ -62287,6 +62152,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SourceDes", DbType="NVarChar(500)")] + public string SourceDes + { + get + { + return this._SourceDes; + } + set + { + if ((this._SourceDes != value)) + { + this.OnSourceDesChanging(value); + this.SendPropertyChanging(); + this._SourceDes = value; + this.SendPropertyChanged("SourceDes"); + this.OnSourceDesChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Comprehensive_InspectionMachine_Base_CNProfessional", Storage="_Base_CNProfessional", ThisKey="CNProfessionalId", OtherKey="CNProfessionalId", IsForeignKey=true)] public Base_CNProfessional Base_CNProfessional { @@ -101634,10 +101519,10 @@ namespace Model private string _TrainNumber; - private string _TrainNumberId; - private System.Nullable _TypeInt; + private string _TrainNumberId; + private string _CompileMan; private System.Nullable _CompileDate; @@ -101672,10 +101557,10 @@ namespace Model partial void OnReceiveDateChanged(); partial void OnTrainNumberChanging(string value); partial void OnTrainNumberChanged(); - partial void OnTrainNumberIdChanging(string value); - partial void OnTrainNumberIdChanged(); partial void OnTypeIntChanging(System.Nullable value); partial void OnTypeIntChanged(); + partial void OnTrainNumberIdChanging(string value); + partial void OnTrainNumberIdChanged(); partial void OnCompileManChanging(string value); partial void OnCompileManChanged(); partial void OnCompileDateChanging(System.Nullable value); @@ -101929,26 +101814,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TrainNumberId", DbType="VarChar(50)")] - public string TrainNumberId - { - get - { - return this._TrainNumberId; - } - set - { - if ((this._TrainNumberId != value)) - { - this.OnTrainNumberIdChanging(value); - this.SendPropertyChanging(); - this._TrainNumberId = value; - this.SendPropertyChanged("TrainNumberId"); - this.OnTrainNumberIdChanged(); - } - } - } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TypeInt", DbType="Int")] public System.Nullable TypeInt { @@ -101969,6 +101834,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TrainNumberId", DbType="VarChar(50)")] + public string TrainNumberId + { + get + { + return this._TrainNumberId; + } + set + { + if ((this._TrainNumberId != value)) + { + this.OnTrainNumberIdChanging(value); + this.SendPropertyChanging(); + this._TrainNumberId = value; + this.SendPropertyChanged("TrainNumberId"); + this.OnTrainNumberIdChanged(); + } + } + } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] public string CompileMan { @@ -113854,7 +113739,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Rectification", DbType="NVarChar(50)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Rectification", DbType="NVarChar(500)")] public string Rectification { get @@ -113980,7 +113865,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Measures", DbType="NVarChar(50)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Measures", DbType="NVarChar(500)")] public string Measures { get @@ -165018,356 +164903,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.MaterialInAndOutRecord")] - public partial class MaterialInAndOutRecord : INotifyPropertyChanging, INotifyPropertyChanged - { - - private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); - - private string _Id; - - private string _ProjectId; - - private string _GoodsCategoryId; - - private string _GoodsCategoryName; - - private string _MaterialModel; - - private System.Nullable _InOutDate; - - private string _UnitId; - - private string _InOrOut; - - private System.Nullable _Number; - - private string _MaterialUnitId; - - private string _Remark; - - private string _CompileMan; - - private System.Nullable _CompileDate; - - #region 可扩展性方法定义 - partial void OnLoaded(); - partial void OnValidate(System.Data.Linq.ChangeAction action); - partial void OnCreated(); - partial void OnIdChanging(string value); - partial void OnIdChanged(); - partial void OnProjectIdChanging(string value); - partial void OnProjectIdChanged(); - partial void OnGoodsCategoryIdChanging(string value); - partial void OnGoodsCategoryIdChanged(); - partial void OnGoodsCategoryNameChanging(string value); - partial void OnGoodsCategoryNameChanged(); - partial void OnMaterialModelChanging(string value); - partial void OnMaterialModelChanged(); - partial void OnInOutDateChanging(System.Nullable value); - partial void OnInOutDateChanged(); - partial void OnUnitIdChanging(string value); - partial void OnUnitIdChanged(); - partial void OnInOrOutChanging(string value); - partial void OnInOrOutChanged(); - partial void OnNumberChanging(System.Nullable value); - partial void OnNumberChanged(); - partial void OnMaterialUnitIdChanging(string value); - partial void OnMaterialUnitIdChanged(); - partial void OnRemarkChanging(string value); - partial void OnRemarkChanged(); - partial void OnCompileManChanging(string value); - partial void OnCompileManChanged(); - partial void OnCompileDateChanging(System.Nullable value); - partial void OnCompileDateChanged(); - #endregion - - public MaterialInAndOutRecord() - { - OnCreated(); - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] - public string Id - { - get - { - return this._Id; - } - set - { - if ((this._Id != value)) - { - this.OnIdChanging(value); - this.SendPropertyChanging(); - this._Id = value; - this.SendPropertyChanged("Id"); - this.OnIdChanged(); - } - } - } - - [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="_GoodsCategoryId", DbType="NVarChar(50)")] - public string GoodsCategoryId - { - get - { - return this._GoodsCategoryId; - } - set - { - if ((this._GoodsCategoryId != value)) - { - this.OnGoodsCategoryIdChanging(value); - this.SendPropertyChanging(); - this._GoodsCategoryId = value; - this.SendPropertyChanged("GoodsCategoryId"); - this.OnGoodsCategoryIdChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_GoodsCategoryName", DbType="NVarChar(100)")] - public string GoodsCategoryName - { - get - { - return this._GoodsCategoryName; - } - set - { - if ((this._GoodsCategoryName != value)) - { - this.OnGoodsCategoryNameChanging(value); - this.SendPropertyChanging(); - this._GoodsCategoryName = value; - this.SendPropertyChanged("GoodsCategoryName"); - this.OnGoodsCategoryNameChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialModel", DbType="NVarChar(100)")] - public string MaterialModel - { - get - { - return this._MaterialModel; - } - set - { - if ((this._MaterialModel != value)) - { - this.OnMaterialModelChanging(value); - this.SendPropertyChanging(); - this._MaterialModel = value; - this.SendPropertyChanged("MaterialModel"); - this.OnMaterialModelChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InOutDate", DbType="DateTime")] - public System.Nullable InOutDate - { - get - { - return this._InOutDate; - } - set - { - if ((this._InOutDate != value)) - { - this.OnInOutDateChanging(value); - this.SendPropertyChanging(); - this._InOutDate = value; - this.SendPropertyChanged("InOutDate"); - this.OnInOutDateChanged(); - } - } - } - - [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="_InOrOut", DbType="NVarChar(10)")] - public string InOrOut - { - get - { - return this._InOrOut; - } - set - { - if ((this._InOrOut != value)) - { - this.OnInOrOutChanging(value); - this.SendPropertyChanging(); - this._InOrOut = value; - this.SendPropertyChanged("InOrOut"); - this.OnInOrOutChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Number", DbType="Decimal(18,2)")] - public System.Nullable Number - { - get - { - return this._Number; - } - set - { - if ((this._Number != value)) - { - this.OnNumberChanging(value); - this.SendPropertyChanging(); - this._Number = value; - this.SendPropertyChanged("Number"); - this.OnNumberChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialUnitId", DbType="NVarChar(50)")] - public string MaterialUnitId - { - get - { - return this._MaterialUnitId; - } - set - { - if ((this._MaterialUnitId != value)) - { - this.OnMaterialUnitIdChanging(value); - this.SendPropertyChanging(); - this._MaterialUnitId = value; - this.SendPropertyChanged("MaterialUnitId"); - this.OnMaterialUnitIdChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="NVarChar(200)")] - public string Remark - { - get - { - return this._Remark; - } - set - { - if ((this._Remark != value)) - { - this.OnRemarkChanging(value); - this.SendPropertyChanging(); - this._Remark = value; - this.SendPropertyChanged("Remark"); - this.OnRemarkChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] - public string CompileMan - { - get - { - return this._CompileMan; - } - set - { - if ((this._CompileMan != value)) - { - this.OnCompileManChanging(value); - this.SendPropertyChanging(); - this._CompileMan = value; - this.SendPropertyChanged("CompileMan"); - this.OnCompileManChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")] - public System.Nullable CompileDate - { - get - { - return this._CompileDate; - } - set - { - if ((this._CompileDate != value)) - { - this.OnCompileDateChanging(value); - this.SendPropertyChanging(); - this._CompileDate = value; - this.SendPropertyChanged("CompileDate"); - this.OnCompileDateChanged(); - } - } - } - - 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.Meeting_AttendMeeting")] public partial class Meeting_AttendMeeting : INotifyPropertyChanging, INotifyPropertyChanged { @@ -167707,7 +167242,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttentPerson", DbType="NVarChar(500)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttentPerson", DbType="NVarChar(3000)")] public string AttentPerson { get @@ -198714,7 +198249,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectDescription", DbType="VarChar(255)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectDescription", DbType="VarChar(MAX)", UpdateCheck=UpdateCheck.Never)] public string ProjectDescription { get @@ -198834,7 +198369,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CalculationRule", DbType="VarChar(255)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CalculationRule", DbType="VarChar(MAX)", UpdateCheck=UpdateCheck.Never)] public string CalculationRule { get @@ -198894,7 +198429,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructionSubcontractor", DbType="VarChar(50)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructionSubcontractor", DbType="VarChar(100)")] public string ConstructionSubcontractor { get @@ -199278,7 +198813,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPackageEstimate", DbType="Decimal(18,2)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPackageEstimate", DbType="Decimal(18,3)")] public System.Nullable WorkPackageEstimate { get @@ -199583,6 +199118,16 @@ namespace Model private string _ProjectId; + private string _ContractId; + + private string _OrderCode; + + private System.Nullable _OrderInDate; + + private System.Nullable _OrderOutDate; + + private string _MaterialRequisitionUnit; + private System.Nullable _State; private string _InvoiceCode; @@ -199611,16 +199156,6 @@ namespace Model private string _CreateUser; - private string _ContractId; - - private System.Nullable _OrderInDate; - - private string _OrderCode; - - private System.Nullable _OrderOutDate; - - private string _MaterialRequisitionUnit; - #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -199629,6 +199164,16 @@ namespace Model partial void OnInvoiceIdChanged(); partial void OnProjectIdChanging(string value); partial void OnProjectIdChanged(); + partial void OnContractIdChanging(string value); + partial void OnContractIdChanged(); + partial void OnOrderCodeChanging(string value); + partial void OnOrderCodeChanged(); + partial void OnOrderInDateChanging(System.Nullable value); + partial void OnOrderInDateChanged(); + partial void OnOrderOutDateChanging(System.Nullable value); + partial void OnOrderOutDateChanged(); + partial void OnMaterialRequisitionUnitChanging(string value); + partial void OnMaterialRequisitionUnitChanged(); partial void OnStateChanging(System.Nullable value); partial void OnStateChanged(); partial void OnInvoiceCodeChanging(string value); @@ -199657,16 +199202,6 @@ namespace Model partial void OnCreateDateChanged(); partial void OnCreateUserChanging(string value); partial void OnCreateUserChanged(); - partial void OnContractIdChanging(string value); - partial void OnContractIdChanged(); - partial void OnOrderInDateChanging(System.Nullable value); - partial void OnOrderInDateChanged(); - partial void OnOrderCodeChanging(string value); - partial void OnOrderCodeChanged(); - partial void OnOrderOutDateChanging(System.Nullable value); - partial void OnOrderOutDateChanged(); - partial void OnMaterialRequisitionUnitChanging(string value); - partial void OnMaterialRequisitionUnitChanged(); #endregion public PHTGL_Invoice() @@ -199714,6 +199249,106 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractId", DbType="NVarChar(50)")] + public string ContractId + { + get + { + return this._ContractId; + } + set + { + if ((this._ContractId != value)) + { + this.OnContractIdChanging(value); + this.SendPropertyChanging(); + this._ContractId = value; + this.SendPropertyChanged("ContractId"); + this.OnContractIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderCode", DbType="NVarChar(50)")] + public string OrderCode + { + get + { + return this._OrderCode; + } + set + { + if ((this._OrderCode != value)) + { + this.OnOrderCodeChanging(value); + this.SendPropertyChanging(); + this._OrderCode = value; + this.SendPropertyChanged("OrderCode"); + this.OnOrderCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderInDate", DbType="Date")] + public System.Nullable OrderInDate + { + get + { + return this._OrderInDate; + } + set + { + if ((this._OrderInDate != value)) + { + this.OnOrderInDateChanging(value); + this.SendPropertyChanging(); + this._OrderInDate = value; + this.SendPropertyChanged("OrderInDate"); + this.OnOrderInDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderOutDate", DbType="Date")] + public System.Nullable OrderOutDate + { + get + { + return this._OrderOutDate; + } + set + { + if ((this._OrderOutDate != value)) + { + this.OnOrderOutDateChanging(value); + this.SendPropertyChanging(); + this._OrderOutDate = value; + this.SendPropertyChanged("OrderOutDate"); + this.OnOrderOutDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialRequisitionUnit", DbType="NVarChar(100)")] + public string MaterialRequisitionUnit + { + get + { + return this._MaterialRequisitionUnit; + } + set + { + if ((this._MaterialRequisitionUnit != value)) + { + this.OnMaterialRequisitionUnitChanging(value); + this.SendPropertyChanging(); + this._MaterialRequisitionUnit = value; + this.SendPropertyChanged("MaterialRequisitionUnit"); + this.OnMaterialRequisitionUnitChanged(); + } + } + } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_State", DbType="Int")] public System.Nullable State { @@ -199994,106 +199629,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractId", DbType="NVarChar(50)")] - public string ContractId - { - get - { - return this._ContractId; - } - set - { - if ((this._ContractId != value)) - { - this.OnContractIdChanging(value); - this.SendPropertyChanging(); - this._ContractId = value; - this.SendPropertyChanged("ContractId"); - this.OnContractIdChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderInDate", DbType="Date")] - public System.Nullable OrderInDate - { - get - { - return this._OrderInDate; - } - set - { - if ((this._OrderInDate != value)) - { - this.OnOrderInDateChanging(value); - this.SendPropertyChanging(); - this._OrderInDate = value; - this.SendPropertyChanged("OrderInDate"); - this.OnOrderInDateChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderCode", DbType="NVarChar(50)")] - public string OrderCode - { - get - { - return this._OrderCode; - } - set - { - if ((this._OrderCode != value)) - { - this.OnOrderCodeChanging(value); - this.SendPropertyChanging(); - this._OrderCode = value; - this.SendPropertyChanged("OrderCode"); - this.OnOrderCodeChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderOutDate", DbType="Date")] - public System.Nullable OrderOutDate - { - get - { - return this._OrderOutDate; - } - set - { - if ((this._OrderOutDate != value)) - { - this.OnOrderOutDateChanging(value); - this.SendPropertyChanging(); - this._OrderOutDate = value; - this.SendPropertyChanged("OrderOutDate"); - this.OnOrderOutDateChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialRequisitionUnit", DbType="NVarChar(100)")] - public string MaterialRequisitionUnit - { - get - { - return this._MaterialRequisitionUnit; - } - set - { - if ((this._MaterialRequisitionUnit != value)) - { - this.OnMaterialRequisitionUnitChanging(value); - this.SendPropertyChanging(); - this._MaterialRequisitionUnit = value; - this.SendPropertyChanged("MaterialRequisitionUnit"); - this.OnMaterialRequisitionUnitChanged(); - } - } - } - public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -201472,7 +201007,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReviewResults", DbType="NVarChar(1000)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReviewResults", DbType="NVarChar(50)")] public string ReviewResults { get @@ -260584,8 +260119,6 @@ namespace Model private System.Nullable _LogSource; - private EntityRef _Base_Project; - private EntityRef _Person_Persons; #region 可扩展性方法定义 @@ -260620,7 +260153,6 @@ namespace Model public Sys_Log() { - this._Base_Project = default(EntityRef); this._Person_Persons = default(EntityRef); OnCreated(); } @@ -260760,10 +260292,6 @@ namespace Model { if ((this._ProjectId != value)) { - if (this._Base_Project.HasLoadedOrAssignedValue) - { - throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); - } this.OnProjectIdChanging(value); this.SendPropertyChanging(); this._ProjectId = value; @@ -260873,40 +260401,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Sys_Log_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] - public Base_Project Base_Project - { - get - { - return this._Base_Project.Entity; - } - set - { - Base_Project previousValue = this._Base_Project.Entity; - if (((previousValue != value) - || (this._Base_Project.HasLoadedOrAssignedValue == false))) - { - this.SendPropertyChanging(); - if ((previousValue != null)) - { - this._Base_Project.Entity = null; - previousValue.Sys_Log.Remove(this); - } - this._Base_Project.Entity = value; - if ((value != null)) - { - value.Sys_Log.Add(this); - this._ProjectId = value.ProjectId; - } - else - { - this._ProjectId = default(string); - } - this.SendPropertyChanged("Base_Project"); - } - } - } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Sys_Log_Person_Persons", Storage="_Person_Persons", ThisKey="UserId", OtherKey="PersonId", IsForeignKey=true)] public Person_Persons Person_Persons { @@ -325500,7 +324994,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(50)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(200)")] public string Name { get @@ -326077,7 +325571,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")] public string PackageContent { get @@ -326268,7 +325762,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")] public string PackageContent { get @@ -331607,7 +331101,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")] public string PackageContent { get @@ -333079,7 +332573,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")] public string PackageContent { get @@ -342980,7 +342474,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractNo", DbType="NVarChar(500)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractNo", DbType="NVarChar(1500)")] public string ContractNo { get @@ -343000,7 +342494,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitWorks", DbType="NVarChar(500)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitWorks", DbType="NVarChar(1500)")] public string UnitWorks { get