diff --git a/DataBase/版本日志/SGGLDB_V2024-03-28.sql b/DataBase/版本日志/SGGLDB_V2024-03-28.sql new file mode 100644 index 00000000..d6b2aef1 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2024-03-28.sql @@ -0,0 +1,72 @@ + +ALTER VIEW [dbo].[View_HJGL_Pipeline] +AS +/*************ͼ*****************/ +SELECT pipeline.PipelineId, +pipeline.ProjectId, +pipeline.UnitId, +pipeline.UnitWorkId, +pipeline.PipelineCode, +pipeline.SingleName, +pipeline.SingleNumber, +pipeline.PipingClassId, +pipeline.MediumId, +pipingClass.PipingClassCode, +pipeline.DetectionRateId, +rate.DetectionRateCode, +pipeline.DetectionType, +pipeline.TestPressure, +pipeline.TestMedium, +pipeline.PressurePipingClassId, +pc.PressurePipingClassCode, +pipeline.PipeLenth, +pipeline.DesignPress, +pipeline.DesignTemperature, +pipeline.Remark, +pipeline.LeakPressure, +pipeline.LeakMedium, +pipeline.VacuumPressure, +pipeline.PCMedium , +pipeline.PCtype, +pipeline.MaterialId, +pipeline.PipeArea, +case pipeline.PipeArea when '1' then 'Ԥ' when '2' then 'ֳʩ' else '' end as PipeAreaStr, +pipeline.FlowingSection, +mat.MaterialCode, +dType.DetectionTypeCode, +lea.MediumName AS LeakMediumName, +pur.PurgeMethodName AS PCMediumName, +CAST((SELECT SUM(ISNULL(Size,0)) FROM dbo.HJGL_WeldJoint WHERE PipelineId=pipeline.PipelineId) AS DECIMAL(8,3)) AS TotalDin, +CAST((SELECT ISNULL(SUM(ISNULL(jot.Size,0)),0) FROM dbo.HJGL_WeldJoint jot WHERE jot.PipelineId=pipeline.PipelineId AND jot.WeldingDailyId IS NOT NULL) AS DECIMAL(8,3)) AS FinishSize, +(SELECT COUNT(WeldJointId) FROM dbo.HJGL_WeldJoint WHERE PipelineId=pipeline.PipelineId and IsTwoJoint is null) AS JointCount, +(SELECT COUNT(WeldJointId) FROM dbo.HJGL_WeldJoint WHERE PipelineId=pipeline.PipelineId and IsTwoJoint is null and WeldingDailyId IS NOT NULL) AS FinishJointCount, +unit.UnitName, +workArea.UnitWorkCode, +medium.MediumCode, +medium.MediumName AS MediumName, +testMedium.MediumCode AS TestMediumCode, +pipeline.ActEndDate AS FinishedDate, +pipeline.IsFinished +FROM dbo.HJGL_Pipeline AS pipeline +LEFT JOIN Base_PipingClass AS pipingClass ON pipingClass.PipingClassId=pipeline.PipingClassId +LEFT JOIN dbo.Base_Unit AS unit ON unit.UnitId=pipeline.UnitId +LEFT JOIN WBS_UnitWork AS workArea ON workArea.UnitWorkId=pipeline.UnitWorkId +LEFT JOIN Base_Medium AS medium ON medium.MediumId=pipeline.MediumId +LEFT JOIN dbo.Base_TestMedium AS testMedium ON testMedium.TestMediumId=pipeline.TestMedium +LEFT JOIN dbo.Base_DetectionRate rate ON rate.DetectionRateId = pipeline.DetectionRateId +LEFT JOIN dbo.Base_PressurePipingClass pc ON pc.PressurePipingClassId = pipeline.PressurePipingClassId +LEFT JOIN dbo.Base_TestMedium AS lea ON lea.TestMediumId=pipeline.LeakMedium +LEFT JOIN dbo.Base_PurgeMethod AS pur ON pur.PurgeMethodId=pipeline.PCMedium +LEFT JOIN dbo.Base_Material AS mat ON mat.MaterialId=pipeline.MaterialId +LEFT JOIN dbo.Base_DetectionType dType on dType.DetectionTypeId=pipeline.DetectionType + + + + + + + + +GO + + diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj index 1d1d73f1..aefffb1c 100644 --- a/SGGL/BLL/BLL.csproj +++ b/SGGL/BLL/BLL.csproj @@ -69,14 +69,6 @@ ..\packages\Microsoft.Extensions.Logging.Abstractions.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Logging.Abstractions.dll - - ..\packages\Microsoft.Office.Interop.Excel.15.0.4795.1001\lib\net20\Microsoft.Office.Interop.Excel.dll - True - - - ..\packages\Microsoft.Office.Interop.Word.15.0.4797.1004\lib\net20\Microsoft.Office.Interop.Word.dll - False - False @@ -102,7 +94,8 @@ ..\packages\NPOI.2.5.6\lib\net45\NPOI.OpenXmlFormats.dll - + + ..\packages\MicrosoftOfficeCore.15.0.0\lib\net35\Office.dll True @@ -110,8 +103,8 @@ ..\packages\QRCoder.1.4.3\lib\net40\QRCoder.dll - - ..\packages\Quartz.3.7.0\lib\netstandard2.0\Quartz.dll + + ..\packages\Quartz.3.8.1\lib\netstandard2.0\Quartz.dll ..\packages\RestSharp.106.15.0\lib\net452\RestSharp.dll @@ -850,6 +843,33 @@ + + {2DF8D04C-5BFA-101B-BDE5-00AA0044DE52} + 2 + 4 + 0 + primary + False + True + + + {00020813-0000-0000-C000-000000000046} + 1 + 6 + 0 + primary + False + True + + + {00020905-0000-0000-C000-000000000046} + 8 + 4 + 0 + primary + False + False + {0002E157-0000-0000-C000-000000000046} 5 diff --git a/SGGL/BLL/Common/PrinterDocService.cs b/SGGL/BLL/Common/PrinterDocService.cs index 0d8782e1..99df54a3 100644 --- a/SGGL/BLL/Common/PrinterDocService.cs +++ b/SGGL/BLL/Common/PrinterDocService.cs @@ -56,6 +56,32 @@ System.Web.HttpContext.Current.Response.End(); } } + public static void PrinterRectifyNoticesHtmlAll(string projectId, string type) + { + System.Web.HttpContext.Current.Response.ClearContent(); + string htmlStr = string.Empty; + string name = "隐患整改通知单"; + if (type == "1") + { + htmlStr = GetRectifyNoticesTableHtmlAll(projectId); + } + else + { + htmlStr = GetRectifyNoticesTableHtmlAll2(projectId); + name = "隐患整改反馈单"; + } + + if (!string.IsNullOrEmpty(htmlStr)) + { + string filename = name + Funs.GetNewFileName(); + System.Web.HttpContext.Current.Response.AddHeader("content-disposition", "attachment; filename=" + + System.Web.HttpUtility.UrlEncode(filename, Encoding.UTF8) + ".doc"); + System.Web.HttpContext.Current.Response.ContentType = "application/word"; + System.Web.HttpContext.Current.Response.ContentEncoding = Encoding.UTF8; + System.Web.HttpContext.Current.Response.Write(htmlStr); + System.Web.HttpContext.Current.Response.End(); + } + } #region 隐患整改通知单 /// @@ -237,6 +263,190 @@ } return sb.ToString(); } + + /// + /// 导出方法 + /// + /// + /// + public static string GetRectifyNoticesTableHtmlAll(string projectId) + { + StringBuilder sb = new StringBuilder(); + var getRectifyNoticesAll = from x in Funs.DB.Check_RectifyNotices + orderby x.RectifyNoticesCode + where x.ProjectId == projectId + select x; + sb.Append(""); + foreach (var getRectifyNotices in getRectifyNoticesAll) + { + sb.Append(""); + sb.Append(""); + sb.AppendFormat(" ", "安全隐患整改通知单"); + sb.Append(""); + + sb.Append(""); + sb.AppendFormat(" ", "项目名称:" + BLL.ProjectService.GetProjectNameByProjectId(getRectifyNotices.ProjectId)); + sb.AppendFormat(" ", "编号:" + getRectifyNotices.RectifyNoticesCode); + sb.Append(""); + + sb.Append(""); + sb.AppendFormat(" ", "受检单位名称"); + sb.AppendFormat(" ", UnitService.GetUnitNameByUnitId(getRectifyNotices.UnitId)); + sb.AppendFormat(" ", "单位工程名称"); + sb.AppendFormat(" ", UnitWorkService.GetUnitWorkName(getRectifyNotices.WorkAreaId)); + sb.Append(""); + + sb.Append(""); + sb.AppendFormat(" ", "检查人员"); + sb.AppendFormat(" ", Person_PersonsService.getPersonsNamesPersonIds(getRectifyNotices.CheckManIds)); + sb.Append(""); + + sb.Append(""); + sb.AppendFormat(" ", "检查日期"); + sb.AppendFormat(" ", string.Format("{0:yyyy-MM-dd}", getRectifyNotices.CheckedDate)); + sb.Append(""); + + sb.Append(""); + sb.AppendFormat(" ", "隐患类别"); + if (getRectifyNotices.HiddenHazardType == "3") + { + sb.AppendFormat(" ", "☐一般 ☐较大 √重大"); + } + else if (getRectifyNotices.HiddenHazardType == "2") + { + sb.AppendFormat(" ", "☐一般 √较大 ☐重大"); + } + else + { + sb.AppendFormat(" ", "√一般 ☐较大 ☐重大"); + } + sb.Append(""); + + sb.Append(""); + sb.AppendFormat(" ", "贵公司存在的安全隐患及整改要求如下:"); + sb.Append(""); + + var getItem = from x in Funs.DB.Check_RectifyNoticesItem + where x.RectifyNoticesId == getRectifyNotices.RectifyNoticesId + orderby x.RectifyNoticesItemId + select x; + int i = 1; + foreach (var item in getItem) + { + string contStr = "   " + i.ToString() + "." + item.WrongContent + "(详见附图" + i.ToString() + "),整改要求:" + item.Requirement; + if (item.LimitTime.HasValue) + { + contStr += " 整改期限" + string.Format("{0:yyyy-MM-dd HH:mm:ss}", item.LimitTime); + } + + sb.Append(""); + sb.AppendFormat(" ", contStr); + sb.Append(""); + i++; + } + + sb.Append(""); + sb.AppendFormat(" ", ""); + sb.Append(""); + + sb.Append(""); + sb.AppendFormat(" ", "总包单位项目安全经理:" + Person_PersonsService.getSignatureName(getRectifyNotices.SignPerson) + "   "); + sb.Append(""); + + sb.Append(""); + sb.AppendFormat(" ", "日期:" + string.Format("{0:yyyy-MM-dd HH:mm:ss}", getRectifyNotices.SignDate) + "   "); + sb.Append(""); + + sb.Append(""); + sb.AppendFormat(" ", "抄送:"); + if (string.IsNullOrEmpty(getRectifyNotices.ProfessionalEngineerId)) + { + sb.AppendFormat(" ", "☐专业工程师:"); + sb.AppendFormat(" ", "日期:"); + } + else + { + sb.AppendFormat(" ", "√专业工程师:" + Person_PersonsService.getSignatureName(getRectifyNotices.ProfessionalEngineerId)); + sb.AppendFormat(" ", "日期:" + string.Format("{0:yyyy-MM-dd HH:mm:ss}", getRectifyNotices.ProfessionalEngineerTime1)); + } + sb.Append(""); + + sb.Append(""); + if (string.IsNullOrEmpty(getRectifyNotices.ConstructionManagerId)) + { + sb.AppendFormat(" ", "☐施工经理:"); + sb.AppendFormat(" ", "日期:"); + } + else + { + sb.AppendFormat(" ", "√施工经理:" + Person_PersonsService.getSignatureName(getRectifyNotices.ConstructionManagerId)); + sb.AppendFormat(" ", "日期:" + string.Format("{0:yyyy-MM-dd HH:mm:ss}", getRectifyNotices.ConstructionManagerTime1)); + } + sb.Append(""); + + sb.Append(""); + if (string.IsNullOrEmpty(getRectifyNotices.ProjectManagerId)) + { + sb.AppendFormat(" ", "☐项目经理:"); + sb.AppendFormat(" ", "日期:"); + } + else + { + sb.AppendFormat(" ", "√项目经理:" + Person_PersonsService.getSignatureName(getRectifyNotices.ProjectManagerId)); + sb.AppendFormat(" ", "日期:" + string.Format("{0:yyyy-MM-dd HH:mm:ss}", getRectifyNotices.ProjectManagerTime1)); + } + sb.Append(""); + + sb.Append(""); + sb.AppendFormat(" ", "接收人"); + sb.AppendFormat(" ", Person_PersonsService.getSignatureName(getRectifyNotices.DutyPersonId)); + sb.AppendFormat(" ", "接收日期"); + sb.AppendFormat(" ", string.Format("{0:yyyy-MM-dd HH:mm:ss}", getRectifyNotices.DutyPersonTime)); + sb.Append(""); + + sb.Append(""); + sb.AppendFormat(" ", "注: 1.本表由总包单位项目安全经理签发,一般隐患抄送专业工程师监督;较大隐患抄送施工经理监督;重大隐患需要由项目经理签字并报公司施工管理部备案。"); + sb.Append(""); + + sb.Append(""); + sb.AppendFormat(" ", "   2.本表一式2份,签发单位和接收单位各一份。"); + sb.Append(""); + + sb.Append(""); + sb.AppendFormat(" ", "附图:"); + sb.Append(""); + + sb.Append(""); + sb.AppendFormat(" ", "整改前的照片"); + sb.Append(""); + + int j = 1; + foreach (var item in getItem) + { + var att = AttachFileService.GetAttachFile(item.RectifyNoticesItemId.ToString() + "#1", BLL.Const.ProjectRectifyNoticesMenuId); + if (att != null && !string.IsNullOrEmpty(att.AttachUrl)) + { + string imgStr = string.Empty; + List listStr = Funs.GetStrListByStr(att.AttachUrl, ','); + foreach (var urlItem in listStr) + { + imgStr += "  "; + } + sb.Append(""); + sb.AppendFormat(" ", imgStr); + sb.Append(""); + sb.Append(""); + sb.AppendFormat(" ", "图 " + j.ToString()); + sb.Append(""); + + j++; + } + } + sb.Append("
{0}
{0}{0}
{0}{0}{0}{0}
{0}{0}
{0}{0}
{0}{0}{0}{0}
{0}
{0}
{0}
{0}
{0}
{0}{0}{0}{0}{0}
{0}{0}{0}{0}
{0}{0}{0}{0}
{0}{0}{0}{0}
{0}
{0}
{0}
{0}
{0}
{0}
"); + } + + return sb.ToString(); + } #endregion #region 安全隐患整改反馈单 @@ -421,6 +631,186 @@ } return sb.ToString(); } + + public static string GetRectifyNoticesTableHtmlAll2(string projectId) + { + StringBuilder sb = new StringBuilder(); + sb.Append(""); + var getRectifyNoticesAll = from x in Funs.DB.Check_RectifyNotices + orderby x.RectifyNoticesCode + where x.ProjectId == projectId + select x; + foreach (var getRectifyNotices in getRectifyNoticesAll) + { + sb.Append(""); + sb.Append(""); + sb.AppendFormat(" ", "安全隐患整改反馈单"); + sb.Append(""); + + sb.Append(""); + sb.AppendFormat(" ", "项目名称:" + BLL.ProjectService.GetProjectNameByProjectId(getRectifyNotices.ProjectId)); + sb.AppendFormat(" ", "编号:" + getRectifyNotices.RectifyNoticesCode); + sb.Append(""); + + sb.Append(""); + sb.AppendFormat(" ", "受检单位名称"); + sb.AppendFormat(" ", UnitService.GetUnitNameByUnitId(getRectifyNotices.UnitId)); + sb.AppendFormat(" ", "单位工程名称"); + sb.AppendFormat(" ", UnitWorkService.GetUnitWorkName(getRectifyNotices.WorkAreaId)); + sb.Append(""); + + sb.Append(""); + sb.AppendFormat(" ", "检查人员"); + sb.AppendFormat(" ", Person_PersonsService.getPersonsNamesPersonIds(getRectifyNotices.CheckManIds)); + sb.Append(""); + + sb.Append(""); + sb.AppendFormat(" ", "检查日期"); + sb.AppendFormat(" ", string.Format("{0:yyyy-MM-dd}", getRectifyNotices.CheckedDate)); + sb.Append(""); + + sb.Append(""); + sb.AppendFormat(" ", "隐患类别"); + if (getRectifyNotices.HiddenHazardType == "3") + { + sb.AppendFormat(" ", "☐一般 ☐较大 √重大"); + } + else if (getRectifyNotices.HiddenHazardType == "2") + { + sb.AppendFormat(" ", "☐一般 √较大 ☐重大"); + } + else + { + sb.AppendFormat(" ", "√一般 ☐较大 ☐重大"); + } + sb.Append(""); + + sb.Append(""); + sb.AppendFormat(" ", "   我单位接到编号为 " + getRectifyNotices.RectifyNoticesCode + " 的安全隐患整改通知单后,现已按要求完成了整改,具体整改情况如下:"); + sb.Append(""); + + var getItem = from x in Funs.DB.Check_RectifyNoticesItem + where x.RectifyNoticesId == getRectifyNotices.RectifyNoticesId + orderby x.RectifyNoticesItemId + select x; + int i = 1; + foreach (var item in getItem) + { + string contStr = "   " + i.ToString() + "." + item.RectifyResults + "(详见附图" + i.ToString() + ")。是否合格:" + (item.IsRectify.HasValue ? (item.IsRectify == true ? "合格" : "不合格") : ""); + sb.Append(""); + sb.AppendFormat(" ", contStr); + sb.Append(""); + i++; + } + + sb.Append(""); + sb.AppendFormat(" ", ""); + sb.Append(""); + + sb.Append(""); + sb.AppendFormat(" ", "施工单位项目安全经理:" + Person_PersonsService.getSignatureName(getRectifyNotices.DutyPersonId) + "   " + + "日期:" + string.Format("{0:yyyy-MM-dd HH:mm:ss}", getRectifyNotices.CompleteDate) + "   "); + sb.Append(""); + + sb.Append(""); + sb.AppendFormat(" ", "施工单位项目负责人:" + Person_PersonsService.getSignatureName(getRectifyNotices.UnitHeadManId) + "   " + + "日期:" + string.Format("{0:yyyy-MM-dd HH:mm:ss}", getRectifyNotices.UnitHeadManDate) + "   "); + sb.Append(""); + + sb.Append(""); + sb.AppendFormat(" ", "总包单位复查意见:"); + sb.Append(""); + + sb.Append(""); + sb.AppendFormat(" ", "   " + getRectifyNotices.ReCheckOpinion); + sb.Append(""); + + sb.Append(""); + sb.AppendFormat(" ", ""); + sb.Append(""); + + sb.Append(""); + sb.AppendFormat(" ", "安全经理/安全工程师:" + Person_PersonsService.getSignatureName(getRectifyNotices.CheckPerson) + "   "); + sb.Append(""); + + sb.Append(""); + sb.AppendFormat(" ", "日期:" + string.Format("{0:yyyy-MM-dd HH:mm:ss}", getRectifyNotices.ReCheckDate) + "   "); + sb.Append(""); + + sb.Append(""); + sb.AppendFormat(" ", "抄送:"); + if (string.IsNullOrEmpty(getRectifyNotices.ProfessionalEngineerId)) + { + sb.AppendFormat(" ", "☐专业工程师:"); + sb.AppendFormat(" ", "日期:"); + } + else + { + sb.AppendFormat(" ", "√专业工程师:" + Person_PersonsService.getSignatureName(getRectifyNotices.ProfessionalEngineerId)); + sb.AppendFormat(" ", "日期:" + string.Format("{0:yyyy-MM-dd HH:mm:ss}", getRectifyNotices.ProfessionalEngineerTime2)); + } + sb.Append(""); + + sb.Append(""); + if (string.IsNullOrEmpty(getRectifyNotices.ConstructionManagerId)) + { + sb.AppendFormat(" ", "☐施工经理:"); + sb.AppendFormat(" ", "日期:"); + } + else + { + sb.AppendFormat(" ", "√施工经理:" + Person_PersonsService.getSignatureName(getRectifyNotices.ConstructionManagerId)); + sb.AppendFormat(" ", "日期:" + string.Format("{0:yyyy-MM-dd HH:mm:ss}", getRectifyNotices.ConstructionManagerTime2)); + } + sb.Append(""); + + sb.Append(""); + if (string.IsNullOrEmpty(getRectifyNotices.ProjectManagerId)) + { + sb.AppendFormat(" ", "☐项目经理:"); + sb.AppendFormat(" ", "日期:"); + } + else + { + sb.AppendFormat(" ", "√项目经理:" + Person_PersonsService.getSignatureName(getRectifyNotices.ProjectManagerId)); + sb.AppendFormat(" ", "日期:" + string.Format("{0:yyyy-MM-dd HH:mm:ss}", getRectifyNotices.ProjectManagerTime2)); + } + sb.Append(""); + + sb.Append(""); + sb.AppendFormat(" ", "附图:"); + sb.Append(""); + + sb.Append(""); + sb.AppendFormat(" ", "整改后的照片"); + sb.Append(""); + + int j = 1; + foreach (var item in getItem) + { + var att = AttachFileService.GetAttachFile(item.RectifyNoticesItemId.ToString() + "#2", BLL.Const.ProjectRectifyNoticesMenuId); + if (att != null && !string.IsNullOrEmpty(att.AttachUrl)) + { + string imgStr = string.Empty; + List listStr = Funs.GetStrListByStr(att.AttachUrl, ','); + foreach (var urlItem in listStr) + { + imgStr += "  "; + } + sb.Append(""); + sb.AppendFormat(" ", imgStr); + sb.Append(""); + sb.Append(""); + sb.AppendFormat(" ", "图 " + j.ToString()); + sb.Append(""); + j++; + } + } + + sb.Append("
{0}
{0}{0}
{0}{0}{0}{0}
{0}{0}
{0}{0}
{0}{0}{0}{0}
{0}
{0}
{0}
{0}
{0}
{0}
{0}
{0}
{0}
{0}
{0}{0}{0}{0}{0}
{0}{0}{0}{0}
{0}{0}{0}{0}
{0}
{0}
{0}
{0}
"); + } + return sb.ToString(); + } #endregion #region 安全月报 @@ -1795,7 +2185,7 @@ sb.Append(""); sb.AppendFormat("{0} ", "项目名称"); - sb.AppendFormat("{0} ", BLL.ProjectService.GetProjectNameByProjectId(getCostManage.ProjectId)); + sb.AppendFormat("{0} ", BLL.ProjectService.GetProjectNameByProjectId(getCostManage.ProjectId)); sb.Append(""); sb.Append(""); @@ -1833,7 +2223,7 @@ sb.AppendFormat("{0} ", "分项名称"); sb.AppendFormat("{0} ", "子项名称"); sb.Append(""); - var getItem = BLL.CostManageItemService.GetCostManageItemByCostManageId(costManageId); + var getItem = BLL.CostManageItemService.GetCostManageItemByCostManageId(costManageId); int i = 1; foreach (var item in getItem) { @@ -1843,12 +2233,12 @@ sb.AppendFormat("{0} ", item.CostTypeName); sb.AppendFormat("{0} ", item.InvestCostProject); sb.AppendFormat("{0} ", item.PriceMoney.ToString()); - sb.AppendFormat("{0} ",""); + sb.AppendFormat("{0} ", ""); sb.Append(""); i++; } - string opinin1 = string.Empty;string date1 = string.Empty;string signatureName1 = string.Empty; + string opinin1 = string.Empty; string date1 = string.Empty; string signatureName1 = string.Empty; var getFlow1 = Funs.DB.CostGoods_CostManageFlowOperate.FirstOrDefault(x => x.CostManageId == costManageId && x.SortIndex == 1); if (getFlow1 != null) { @@ -1937,7 +2327,7 @@ } return sb.ToString(); } - + #endregion } } \ No newline at end of file diff --git a/SGGL/BLL/HJGL/PreDesign/PackagingManageService .cs b/SGGL/BLL/HJGL/PreDesign/PackagingManageService .cs index c2a01581..613be122 100644 --- a/SGGL/BLL/HJGL/PreDesign/PackagingManageService .cs +++ b/SGGL/BLL/HJGL/PreDesign/PackagingManageService .cs @@ -121,7 +121,7 @@ namespace BLL } return PlanStartDate; } - public static List GetPackagingManageList(string projectId, string PackagingCode) + public static List GetPackagingManageList(string projectId, string PackagingCode, int pageIndex, int pageSize) { using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { @@ -147,7 +147,7 @@ namespace BLL Code = x.PackagingCode.Substring(0, x.PackagingCode.LastIndexOf("-")).Substring(x.PackagingCode.Substring(0, x.PackagingCode.LastIndexOf("-")).LastIndexOf("-") + 1), }).Distinct(); - return q.OrderByDescending(x => x.Code).ToList(); + return q.OrderByDescending(x => x.Code).Skip(pageIndex * pageSize).Take(pageSize).ToList(); } } diff --git a/SGGL/FineUIPro.Mobile/PHTGL/ContractCompile/ContractReviewDetail.aspx.cs b/SGGL/FineUIPro.Mobile/PHTGL/ContractCompile/ContractReviewDetail.aspx.cs index c81d8499..e7528686 100644 --- a/SGGL/FineUIPro.Mobile/PHTGL/ContractCompile/ContractReviewDetail.aspx.cs +++ b/SGGL/FineUIPro.Mobile/PHTGL/ContractCompile/ContractReviewDetail.aspx.cs @@ -194,12 +194,10 @@ namespace FineUIPro.Mobile.Mobile btnAgree.Enabled = false; btnDisgree.Enabled = false; } - - - DataTable tb = BLL.PHTGL_ApproveService.GetAllApproveData(ContractReviewId); - //Grid1.RecordCount = tb.Rows.Count; - //var table = this.GetPagedDataTable(Grid1, tb); - Grid1.DataSource = tb; + + ////Grid1.RecordCount = tb.Rows.Count; + ////var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = BLL.PHTGL_ApproveService.GetAllApproveData(ContractReviewId); ; Grid1.DataBind(); } diff --git a/SGGL/FineUIPro.Web/File/Word/HSSE/安全隐患整改通知单202403270342077313.doc b/SGGL/FineUIPro.Web/File/Word/HSSE/安全隐患整改通知单202403270342077313.doc new file mode 100644 index 00000000..c53590cb Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Word/HSSE/安全隐患整改通知单202403270342077313.doc differ diff --git a/SGGL/FineUIPro.Web/File/Word/HSSE/安全隐患整改通知单202403270342077313.pdf b/SGGL/FineUIPro.Web/File/Word/HSSE/安全隐患整改通知单202403270342077313.pdf new file mode 100644 index 00000000..7128c229 Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Word/HSSE/安全隐患整改通知单202403270342077313.pdf differ diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 04ed84a6..351c8cac 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -107,14 +107,6 @@ ..\FineUIPro\Reference BLL\Interop.WIA.dll - - ..\packages\Microsoft.Office.Interop.Excel.15.0.4795.1001\lib\net20\Microsoft.Office.Interop.Excel.dll - True - - - ..\packages\Microsoft.Office.Interop.Word.15.0.4797.1004\lib\net20\Microsoft.Office.Interop.Word.dll - True - False @@ -136,6 +128,10 @@ ..\packages\NPOI.2.5.6\lib\net45\NPOI.OpenXmlFormats.dll + + ..\packages\MicrosoftOfficeCore.15.0.0\lib\net35\Office.dll + True + ..\packages\RestSharp.106.15.0\lib\net452\RestSharp.dll @@ -14449,6 +14445,24 @@ + + {2DF8D04C-5BFA-101B-BDE5-00AA0044DE52} + 2 + 4 + 0 + primary + False + True + + + {00020905-0000-0000-C000-000000000046} + 8 + 4 + 0 + primary + False + True + {0002E157-0000-0000-C000-000000000046} 5 @@ -14469,7 +14483,7 @@ True 0 / - http://localhost:8653/ + http://localhost:6233/ False False diff --git a/SGGL/FineUIPro.Web/HJGL/InfoQuery/PipelineQuery.aspx b/SGGL/FineUIPro.Web/HJGL/InfoQuery/PipelineQuery.aspx index df85e54c..330b1bd5 100644 --- a/SGGL/FineUIPro.Web/HJGL/InfoQuery/PipelineQuery.aspx +++ b/SGGL/FineUIPro.Web/HJGL/InfoQuery/PipelineQuery.aspx @@ -130,9 +130,9 @@ HeaderText="总焊口量" HeaderTextAlign="Center" TextAlign="Right"> - + diff --git a/SGGL/FineUIPro.Web/HJGL/InfoQuery/PipelineQuery.aspx.cs b/SGGL/FineUIPro.Web/HJGL/InfoQuery/PipelineQuery.aspx.cs index ab5246b4..208981a3 100644 --- a/SGGL/FineUIPro.Web/HJGL/InfoQuery/PipelineQuery.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/InfoQuery/PipelineQuery.aspx.cs @@ -317,7 +317,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery 完成焊口=x.FinishJointCount, 总达因数 =x.TotalDin, 总焊口量=x.JointCount, - 单位名称=x.UnitName, + 管线划分 = x.PipeAreaStr, 无损检测类型=x.DetectionTypeCode, 探伤比例 =x.DetectionRateCode, 介质名称=x.MediumName, diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManage.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManage.aspx.cs index 6a822746..1e440eb3 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManage.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManage.aspx.cs @@ -66,8 +66,9 @@ namespace FineUIPro.Web.HJGL.PreDesign //var table = this.GetPagedDataTable(Grid1, tb); //Grid1.DataSource = table; //Grid1.DataBind(); - var list= BLL.HJGL_PackagingmanageService.GetPackagingManageList(this.CurrUser.LoginProjectId, this.txtPackagingCode.Text.Trim()); - Grid1.RecordCount = list.Count; + var list2 = BLL.HJGL_PackagingmanageService.GetPackagingManageList(this.CurrUser.LoginProjectId, this.txtPackagingCode.Text.Trim(), 0, 10000); + var list = BLL.HJGL_PackagingmanageService.GetPackagingManageList(this.CurrUser.LoginProjectId, this.txtPackagingCode.Text.Trim(), this.Grid1.PageIndex, this.Grid1.PageSize); + Grid1.RecordCount = list2.Count; Grid1.DataSource = list; Grid1.DataBind(); } @@ -145,13 +146,13 @@ namespace FineUIPro.Web.HJGL.PreDesign #endregion protected void Grid1_RowCommand(object sender, GridCommandEventArgs e) { - if (e.CommandName == "cmd_detail" ) + if (e.CommandName == "cmd_detail") { string id = Grid1.SelectedRowID; string url = "PackagingManageView.aspx?PackagingManageId={0}"; PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format(url, id, "操作 - "))); } - else if (e.CommandName== "cmd_print") + else if (e.CommandName == "cmd_print") { string Id = this.Grid1.SelectedRowID; Pring(Id); @@ -219,9 +220,9 @@ namespace FineUIPro.Web.HJGL.PreDesign string url = string.Empty; var wpq = BLL.HJGL_PackagingmanageService.GetHJGL_PackagingManageById(id); if (wpq != null) - { - url = "PackagingManageEdit.aspx?PackagingManageId={0}"; - + { + url = "PackagingManageEdit.aspx?PackagingManageId={0}"; + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format(url, id, "操作 - "))); } } @@ -429,9 +430,9 @@ namespace FineUIPro.Web.HJGL.PreDesign { if (state != null) { - string txt= HJGL_PackagingmanageService.GetState().FirstOrDefault(x => x.Value == state.ToString()).Text; + string txt = HJGL_PackagingmanageService.GetState().FirstOrDefault(x => x.Value == state.ToString()).Text; - return txt; + return txt; } return ""; } diff --git a/SGGL/FineUIPro.Web/HSSE/Check/RectifyNotices.aspx b/SGGL/FineUIPro.Web/HSSE/Check/RectifyNotices.aspx index 2840a5b9..748cdf3d 100644 --- a/SGGL/FineUIPro.Web/HSSE/Check/RectifyNotices.aspx +++ b/SGGL/FineUIPro.Web/HSSE/Check/RectifyNotices.aspx @@ -6,7 +6,7 @@ - + 隐患整改通知单 @@ -16,7 +16,7 @@ ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch"> @@ -62,7 +62,7 @@ - <%-- --%> + OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged"> - - - - + + + + diff --git a/SGGL/FineUIPro.Web/HSSE/Check/RectifyNotices.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Check/RectifyNotices.aspx.cs index 9a410f68..eaf27479 100644 --- a/SGGL/FineUIPro.Web/HSSE/Check/RectifyNotices.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Check/RectifyNotices.aspx.cs @@ -397,7 +397,12 @@ namespace FineUIPro.Web.HSSE.Check Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); return; } + + printRectify(getRectify); + } + private void printRectify(Model.Check_RectifyNotices getRectify) + { string rootPath = Server.MapPath("~/"); string initTemplatePath = string.Empty; string uploadfilepath = string.Empty; @@ -714,7 +719,7 @@ namespace FineUIPro.Web.HSSE.Check Response.Close(); File.Delete(newUrl); File.Delete(pdfUrl); - //PrinterDocService.PrinterDocMethod(Const.ProjectRectifyNoticesMenuId + "#1", Grid1.SelectedRowID, "隐患整改通知单"); + //PrinterDocService.PrinterDocMethod(Const.ProjectRectifyNoticesMenuId + "#1", Grid1.SelectedRowID, "隐患整改通知单"); } #endregion @@ -1109,5 +1114,14 @@ namespace FineUIPro.Web.HSSE.Check PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("RectifyNoticesView.aspx?RectifyNoticesId={0}", Grid1.SelectedRowID, "查看 - "))); } + + protected void btnAll_Click(object sender, EventArgs e) + { + PrinterDocService.PrinterRectifyNoticesHtmlAll(this.ProjectId,"1"); + } + protected void btnAll2_Click(object sender, EventArgs e) + { + PrinterDocService.PrinterRectifyNoticesHtmlAll(this.ProjectId, "2"); + } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/Check/RectifyNotices.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/Check/RectifyNotices.aspx.designer.cs index 9435acdf..8f7a5802 100644 --- a/SGGL/FineUIPro.Web/HSSE/Check/RectifyNotices.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HSSE/Check/RectifyNotices.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.HSSE.Check { - - - public partial class RectifyNotices { - +namespace FineUIPro.Web.HSSE.Check +{ + + + public partial class RectifyNotices + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Panel1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel1; - + /// /// Grid1 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// Toolbar2 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar2; - + /// /// txtUnitName 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtUnitName; - + /// /// txtWorkAreaName 控件。 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtWorkAreaName; - + /// /// txtRectifyNoticesCode 控件。 /// @@ -83,7 +85,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtRectifyNoticesCode; - + /// /// Toolbar1 控件。 /// @@ -92,7 +94,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// rbStates 控件。 /// @@ -101,7 +103,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.RadioButtonList rbStates; - + /// /// ToolbarFill2 控件。 /// @@ -110,7 +112,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarSeparator ToolbarFill2; - + /// /// rbrbHiddenHazardType 控件。 /// @@ -119,7 +121,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.RadioButtonList rbrbHiddenHazardType; - + /// /// ToolbarFill1 控件。 /// @@ -128,7 +130,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarFill ToolbarFill1; - + /// /// btnNew 控件。 /// @@ -137,7 +139,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnNew; - + /// /// btnOut 控件。 /// @@ -146,7 +148,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnOut; - + /// /// Label2 控件。 /// @@ -155,7 +157,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.Label Label2; - + /// /// ToolbarSeparator1 控件。 /// @@ -164,7 +166,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; - + /// /// ToolbarText1 控件。 /// @@ -173,7 +175,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarText ToolbarText1; - + /// /// ddlPageSize 控件。 /// @@ -182,7 +184,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList ddlPageSize; - + /// /// Window1 控件。 /// @@ -191,7 +193,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window1; - + /// /// Menu1 控件。 /// @@ -200,7 +202,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Menu Menu1; - + /// /// btnMenuModify 控件。 /// @@ -209,7 +211,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuModify; - + /// /// btnView 控件。 /// @@ -218,7 +220,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnView; - + /// /// btnPrinter 控件。 /// @@ -227,7 +229,16 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnPrinter; - + + /// + /// btnAll 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnAll; + /// /// btnPrinterReturn 控件。 /// @@ -236,7 +247,16 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnPrinterReturn; - + + /// + /// btnAll2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnAll2; + /// /// btnMenuDel 控件。 /// diff --git a/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx b/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx index 751e5a4b..0a7fc2c8 100644 --- a/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx +++ b/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx @@ -161,9 +161,9 @@ EnableColumnLines="true" DataIDField="PipeArea" PageSize="15"> - + TextAlign="Center" Width="110px"> listStr = new List(); if (this.rbType.SelectedValue == "1") { - strSql = @"select '工厂预制' as PipeArea,UnitWorkId,TotalDin,TodayFinishSize,FinishSize,CONVERT(NVARCHAR(10),(CAST((CASE ISNULL(TotalDin,0) WHEN 0 THEN 0 + strSql = @"select '工厂预制焊口' as PipeArea,UnitWorkId,TotalDin,TodayFinishSize,FinishSize,CONVERT(NVARCHAR(10),(CAST((CASE ISNULL(TotalDin,0) WHEN 0 THEN 0 ELSE 100.0 * ISNULL(FinishSize,0)/(1.0 * TotalDin) END) AS DECIMAL(8,2))))+'%' AS Rate from (select b.UnitWorkId,CAST((SELECT ISNULL(SUM(ISNULL(Size,0)),0) FROM dbo.HJGL_WeldJoint jot left join dbo.HJGL_Pipeline pipeline on jot.PipelineId=pipeline.PipelineId WHERE pipeline.UnitWorkId=b.UnitWorkId and PipeArea='1' and jot.JointAttribute='预制口') AS DECIMAL(12,3)) AS TotalDin, @@ -189,7 +189,7 @@ CAST((SELECT ISNULL(SUM(ISNULL(jot.Size,0)),0) FROM dbo.HJGL_WeldJoint jot left CAST((SELECT ISNULL(SUM(ISNULL(jot.Size,0)),0) FROM dbo.HJGL_WeldJoint jot left join dbo.HJGL_Pipeline pipeline on jot.PipelineId=pipeline.PipelineId left join dbo.HJGL_WeldingDaily d on d.WeldingDailyId=jot.WeldingDailyId WHERE pipeline.UnitWorkId=b.UnitWorkId and PipeArea='1' and jot.JointAttribute='预制口' AND jot.WeldingDailyId IS NOT NULL and d.WeldingDate<=@WeldingDate) AS DECIMAL(12,3)) AS FinishSize from WBS_UnitWork b) v where UnitWorkId=@UnitWorkId union -select '现场施工' as PipeArea,UnitWorkId,TotalDin,TodayFinishSize,FinishSize,CONVERT(NVARCHAR(10),(CAST((CASE ISNULL(TotalDin,0) WHEN 0 THEN 0 +select '现场施工焊口' as PipeArea,UnitWorkId,TotalDin,TodayFinishSize,FinishSize,CONVERT(NVARCHAR(10),(CAST((CASE ISNULL(TotalDin,0) WHEN 0 THEN 0 ELSE 100.0 * ISNULL(FinishSize,0)/(1.0 * TotalDin) END) AS DECIMAL(8,2))))+'%' AS Rate from (select b.UnitWorkId,CAST((SELECT ISNULL(SUM(ISNULL(Size,0)),0) FROM dbo.HJGL_WeldJoint jot left join dbo.HJGL_Pipeline pipeline on jot.PipelineId=pipeline.PipelineId WHERE pipeline.UnitWorkId=b.UnitWorkId and PipeArea='2')+(SELECT ISNULL(SUM(ISNULL(Size,0)),0) FROM dbo.HJGL_WeldJoint jot left join dbo.HJGL_Pipeline pipeline on jot.PipelineId=pipeline.PipelineId WHERE pipeline.UnitWorkId=b.UnitWorkId and PipeArea='1' and jot.JointAttribute='安装口') AS DECIMAL(12,3)) AS TotalDin, @@ -201,7 +201,7 @@ select '现场施工' as PipeArea,UnitWorkId,TotalDin,TodayFinishSize,FinishSize } else { - strSql = @"select '工厂预制' as PipeArea,UnitWorkId,TotalDin,TodayFinishSize,FinishSize,CONVERT(NVARCHAR(10),(CAST((CASE ISNULL(TotalDin,0) WHEN 0 THEN 0 + strSql = @"select '工厂预制焊口' as PipeArea,UnitWorkId,TotalDin,TodayFinishSize,FinishSize,CONVERT(NVARCHAR(10),(CAST((CASE ISNULL(TotalDin,0) WHEN 0 THEN 0 ELSE 100.0 * ISNULL(FinishSize,0)/(1.0 * TotalDin) END) AS DECIMAL(8,2))))+'%' AS Rate from (select b.UnitWorkId,CAST((SELECT ISNULL(SUM(ISNULL(Size,0)),0) FROM dbo.HJGL_WeldJoint jot left join dbo.HJGL_Pipeline pipeline on jot.PipelineId=pipeline.PipelineId WHERE pipeline.UnitWorkId=b.UnitWorkId and PipeArea='1' and jot.JointAttribute='预制口') AS DECIMAL(12,3)) AS TotalDin, @@ -209,7 +209,7 @@ select '现场施工' as PipeArea,UnitWorkId,TotalDin,TodayFinishSize,FinishSize CAST((SELECT ISNULL(SUM(ISNULL(jot.Size,0)),0) FROM dbo.HJGL_WeldJoint jot left join dbo.HJGL_Pipeline pipeline on jot.PipelineId=pipeline.PipelineId left join dbo.HJGL_WeldingDaily d on d.WeldingDailyId=jot.WeldingDailyId WHERE pipeline.UnitWorkId=b.UnitWorkId and PipeArea='1' and jot.JointAttribute='预制口' AND jot.WeldingDailyId IS NOT NULL and d.WeldingDate<=@WeldingEndDate) AS DECIMAL(12,3)) AS FinishSize from WBS_UnitWork b) v where UnitWorkId=@UnitWorkId union -select '现场施工' as PipeArea,UnitWorkId,TotalDin,TodayFinishSize,FinishSize,CONVERT(NVARCHAR(10),(CAST((CASE ISNULL(TotalDin,0) WHEN 0 THEN 0 +select '现场施工焊口' as PipeArea,UnitWorkId,TotalDin,TodayFinishSize,FinishSize,CONVERT(NVARCHAR(10),(CAST((CASE ISNULL(TotalDin,0) WHEN 0 THEN 0 ELSE 100.0 * ISNULL(FinishSize,0)/(1.0 * TotalDin) END) AS DECIMAL(8,2))))+'%' AS Rate from (select b.UnitWorkId,CAST((SELECT ISNULL(SUM(ISNULL(Size,0)),0) FROM dbo.HJGL_WeldJoint jot left join dbo.HJGL_Pipeline pipeline on jot.PipelineId=pipeline.PipelineId WHERE pipeline.UnitWorkId=b.UnitWorkId and PipeArea='2')+(SELECT ISNULL(SUM(ISNULL(Size,0)),0) FROM dbo.HJGL_WeldJoint jot left join dbo.HJGL_Pipeline pipeline on jot.PipelineId=pipeline.PipelineId WHERE pipeline.UnitWorkId=b.UnitWorkId and PipeArea='1' and jot.JointAttribute='安装口') AS DECIMAL(12,3)) AS TotalDin, diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index 8d0535a0..645a9a07 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -11823,7 +11823,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 @@ -151511,7 +151511,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 @@ -182470,7 +182470,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 @@ -182590,7 +182590,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 @@ -182650,7 +182650,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 @@ -183034,7 +183034,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 @@ -183339,6 +183339,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; @@ -183367,16 +183377,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); @@ -183385,6 +183385,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); @@ -183413,16 +183423,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() @@ -183470,6 +183470,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 { @@ -183750,106 +183850,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; @@ -205073,7 +205073,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WrongContent", DbType="NChar(10)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WrongContent", DbType="NVarChar(500)")] public string WrongContent { get @@ -205093,7 +205093,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Requirement", DbType="NChar(10)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Requirement", DbType="NVarChar(500)")] public string Requirement { get @@ -205133,7 +205133,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RectifyResults", DbType="NChar(10)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RectifyResults", DbType="NVarChar(500)")] public string RectifyResults { get @@ -274903,6 +274903,8 @@ namespace Model private string _PipeArea; + private string _PipeAreaStr; + private string _FlowingSection; private string _MaterialCode; @@ -275387,6 +275389,22 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PipeAreaStr", DbType="VarChar(8) NOT NULL", CanBeNull=false)] + public string PipeAreaStr + { + get + { + return this._PipeAreaStr; + } + set + { + if ((this._PipeAreaStr != value)) + { + this._PipeAreaStr = value; + } + } + } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FlowingSection", DbType="NVarChar(200)")] public string FlowingSection { @@ -296026,7 +296044,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 @@ -296603,7 +296621,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 @@ -296794,7 +296812,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 @@ -302081,7 +302099,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 @@ -303553,7 +303571,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 @@ -313104,7 +313122,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 @@ -313124,7 +313142,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