From 1530dd850b6ce87f0d1d169589a596b6c801b393 Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Thu, 23 Nov 2023 16:50:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DataBase/版本日志/SGGLDB_V2023-11-23.sql | 5 + .../1-5焊接管理(Menu_HJGL).sql | 6 + SGGL/BLL/Common/Const.cs | 4 + SGGL/BLL/HJGL/PersonManage/WelderService.cs | 4 +- SGGL/BLL/HJGL/PointTrust/PointBatchService.cs | 61 +++-- .../HJGL/WeldingManage/WeldJointService.cs | 43 ++-- .../CQMS/PersonManage/WelderManage.aspx | 9 + .../CQMS/PersonManage/WelderManage.aspx.cs | 6 +- .../WelderManage.aspx.designer.cs | 106 +++++---- .../PersonManage/WelderManageEdit.aspx.cs | 19 +- .../File/Excel/DataOut/焊口二次设计信息.xlsx | Bin 0 -> 9482 bytes SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 8 + .../HJGL/PersonManage/WelderManage.aspx | 9 + .../HJGL/PersonManage/WelderManage.aspx.cs | 20 +- .../WelderManage.aspx.designer.cs | 100 ++++---- .../PersonManage/WelderManageEdit.aspx.cs | 4 +- .../HJGL/WeldingManage/JotTwoDesign.aspx | 3 + .../HJGL/WeldingManage/JotTwoDesign.aspx.cs | 219 +++++++++++++----- .../JotTwoDesign.aspx.designer.cs | 9 + .../WeldingManage/PipelineListPDMSIn.aspx.cs | 100 ++++---- .../HJGL/WeldingManage/WeldJointList.aspx | 2 +- .../HJGL/WeldingManage/WeldJointView.aspx | 14 ++ .../HJGL/WeldingManage/WeldJointView.aspx.cs | 5 + .../WeldJointView.aspx.designer.cs | 27 +++ .../HJGL/WeldingReport/CheckResult.aspx | 99 ++++++++ .../HJGL/WeldingReport/CheckResult.aspx.cs | 174 ++++++++++++++ .../CheckResult.aspx.designer.cs | 168 ++++++++++++++ 27 files changed, 974 insertions(+), 250 deletions(-) create mode 100644 DataBase/版本日志/SGGLDB_V2023-11-23.sql create mode 100644 SGGL/FineUIPro.Web/File/Excel/DataOut/焊口二次设计信息.xlsx create mode 100644 SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx create mode 100644 SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx.cs create mode 100644 SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx.designer.cs diff --git a/DataBase/版本日志/SGGLDB_V2023-11-23.sql b/DataBase/版本日志/SGGLDB_V2023-11-23.sql new file mode 100644 index 00000000..a2f11d5d --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2023-11-23.sql @@ -0,0 +1,5 @@ + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('2C66A01D-B53F-46A1-89F0-30ED137C7498','','HJGL/WeldingReport/CheckResult.aspx',100,'F3B157B7-9BEE-4150-80CB-087828F1C51D','Menu_HJGL',0,1,1) + GO + INSERT INTO Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('C5671119-2DDD-4A64-B7C6-492B96C5AEC7','2C66A01D-B53F-46A1-89F0-30ED137C7498','鿴',1) + GO \ No newline at end of file diff --git a/DataBase/菜单初始化脚本/1-5焊接管理(Menu_HJGL).sql b/DataBase/菜单初始化脚本/1-5焊接管理(Menu_HJGL).sql index 20cc9602..a72dea5c 100644 --- a/DataBase/菜单初始化脚本/1-5焊接管理(Menu_HJGL).sql +++ b/DataBase/菜单初始化脚本/1-5焊接管理(Menu_HJGL).sql @@ -543,6 +543,12 @@ GO INSERT INTO Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('47A49DB1-4689-421A-A93E-DCBD7C34D917','854C79DF-A1C0-4E3C-BCB4-7D5CD044F72B','鿴',1) GO + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('2C66A01D-B53F-46A1-89F0-30ED137C7498','','HJGL/WeldingReport/CheckResult.aspx',100,'F3B157B7-9BEE-4150-80CB-087828F1C51D','Menu_HJGL',0,1,1) + GO + INSERT INTO Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('C5671119-2DDD-4A64-B7C6-492B96C5AEC7','2C66A01D-B53F-46A1-89F0-30ED137C7498','鿴',1) + GO + --INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) --VALUES('CF3CB43C-4031-4CFD-905F-154DC1CB881E','ۺϢ','HJGL/WeldingReport/IsoCompreInfo.aspx',80,'F3B157B7-9BEE-4150-80CB-087828F1C51D','Menu_HJGL',0,1,1) diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index 3a88432f..1ae05411 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -3451,6 +3451,10 @@ namespace BLL /// 公司平均工效统计模板文件原始虚拟路径 /// public const string CompanyConstructionLogWorkEfficiencyTemplateUrl = "File\\Excel\\ConstructionLog\\公司平均工效统计.xlsx"; + /// + /// 焊口二次设计信息模板文件原始虚拟路径 + /// + public const string JotTwoDesignTemplateUrl = "File\\Excel\\DataOut\\焊口二次设计信息.xlsx"; #endregion #region 初始化上传路径 diff --git a/SGGL/BLL/HJGL/PersonManage/WelderService.cs b/SGGL/BLL/HJGL/PersonManage/WelderService.cs index 937ad266..5d363875 100644 --- a/SGGL/BLL/HJGL/PersonManage/WelderService.cs +++ b/SGGL/BLL/HJGL/PersonManage/WelderService.cs @@ -65,10 +65,10 @@ namespace BLL /// /// /// - public static bool IsExisWelderCode(string welderId, string welderCode) + public static bool IsExisWelderCode(string welderId, string welderCode, string projectId) { bool isExitCode = false; - var q = from x in Funs.DB.SitePerson_Person where x.WelderCode == welderCode && x.PersonId != welderId select x; + var q = from x in Funs.DB.SitePerson_Person where x.WelderCode == welderCode && x.PersonId != welderId && x.ProjectId == projectId select x; if (q.Count() > 0) { isExitCode = true; diff --git a/SGGL/BLL/HJGL/PointTrust/PointBatchService.cs b/SGGL/BLL/HJGL/PointTrust/PointBatchService.cs index c0be47d9..db4ebadd 100644 --- a/SGGL/BLL/HJGL/PointTrust/PointBatchService.cs +++ b/SGGL/BLL/HJGL/PointTrust/PointBatchService.cs @@ -100,31 +100,31 @@ namespace BLL { var newWeldJoint = BLL.WeldJointService.GetWeldJointByWeldJointId(weldJointId); - if (newWeldJoint != null ) + if (newWeldJoint != null) { var isTrust = from x in Funs.DB.HJGL_Batch_BatchTrustItem where x.WeldJointId == weldJointId select x; ; if (!isTrust.Any()) - { - var pointBatchItems = from x in Funs.DB.HJGL_Batch_PointBatchItem where x.WeldJointId == weldJointId select x; - string pointBatchId = pointBatchItems.FirstOrDefault()?.PointBatchId; + { + var pointBatchItems = from x in Funs.DB.HJGL_Batch_PointBatchItem where x.WeldJointId == weldJointId select x; + string pointBatchId = pointBatchItems.FirstOrDefault()?.PointBatchId; - // 删除焊口所在批明细信息 - BLL.PointBatchDetailService.DeleteBatchDetail(weldJointId); + // 删除焊口所在批明细信息 + BLL.PointBatchDetailService.DeleteBatchDetail(weldJointId); + + // 删除批信息 + var batch = from x in Funs.DB.HJGL_Batch_PointBatchItem where x.PointBatchId == pointBatchId select x; + if (!string.IsNullOrEmpty(pointBatchId) && !batch.Any()) + { + DeleteBatch(pointBatchId); + } + //BLL.Batch_NDEItemService.DeleteAllNDEInfoToWeldJoint(item.WeldJointId); - // 删除批信息 - var batch = from x in Funs.DB.HJGL_Batch_PointBatchItem where x.PointBatchId == pointBatchId select x; - if (!string .IsNullOrEmpty(pointBatchId) && !batch.Any()) - { - DeleteBatch(pointBatchId); - } - //BLL.Batch_NDEItemService.DeleteAllNDEInfoToWeldJoint(item.WeldJointId); - } else { - // errlog += "焊口【" + newWeldJoint.WeldJointCode + "】已进委托单了,不能删除。"; + // errlog += "焊口【" + newWeldJoint.WeldJointCode + "】已进委托单了,不能删除。"; } } } @@ -138,7 +138,7 @@ namespace BLL var newWeldJoint = BLL.WeldJointService.GetWeldJointByWeldJointId(weldJointId); var pipeline = BLL.PipelineService.GetPipelineByPipelineId(newWeldJoint.PipelineId); var project = BLL.ProjectService.GetProjectByProjectId(pipeline.ProjectId); - var unitWork = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(pipeline.UnitWorkId); + var unitWork = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(pipeline.UnitWorkId); var WeldingDaily = BLL.WeldingDailyService.GetPipeline_WeldingDailyByWeldingDailyId(newWeldJoint.WeldingDailyId); var ndt = BLL.Base_DetectionTypeService.GetDetectionTypeByDetectionTypeId(pipeline.DetectionType); var ndtr = BLL.Base_DetectionRateService.GetDetectionRateByDetectionRateId(pipeline.DetectionRateId); @@ -236,8 +236,33 @@ namespace BLL batch.PointBatchId = SQLHelper.GetNewID(typeof(Model.HJGL_Batch_PointBatch)); batchId = batch.PointBatchId; string perfix = project.ProjectCode + "-" + unitWork.UnitWorkCode + "-GD-DK-" + ndt.DetectionTypeCode + "-" + ndtr.DetectionRateValue.ToString() + "%-"; - batch.PointBatchCode = BLL.SQLHelper.RunProcNewIdByProjectId("SpGetNewCode4ByProjectId", "dbo.HJGL_Batch_PointBatch", "PointBatchCode", project.ProjectId, perfix); - + //batch.PointBatchCode = BLL.SQLHelper.RunProcNewIdByProjectId("SpGetNewCode4ByProjectId", "dbo.HJGL_Batch_PointBatch", "PointBatchCode", project.ProjectId, perfix); + var maxBatch = (from x in Funs.DB.HJGL_Batch_PointBatch where x.ProjectId == project.ProjectId && x.PointBatchCode.Contains(perfix) select x).FirstOrDefault(); + if (maxBatch == null) + { + batch.PointBatchCode = perfix + "0001"; + } + else + { + int code = Funs.GetNewIntOrZero(maxBatch.PointBatchCode.Substring(maxBatch.PointBatchCode.Length - 4)); + code = code + 1; + if (code < 10) + { + batch.PointBatchCode = perfix + "000" + code.ToString(); + } + else if (code >= 10 && code < 100) + { + batch.PointBatchCode = perfix + "00" + code.ToString(); + } + else if (code >= 100 && code < 1000) + { + batch.PointBatchCode = perfix + "0" + code.ToString(); + } + else + { + batch.PointBatchCode = perfix + code.ToString(); + } + } batch.ProjectId = project.ProjectId; batch.UnitWorkId = pipeline.UnitWorkId; batch.BatchCondition = batchCondition; diff --git a/SGGL/BLL/HJGL/WeldingManage/WeldJointService.cs b/SGGL/BLL/HJGL/WeldingManage/WeldJointService.cs index dda5a978..805526f8 100644 --- a/SGGL/BLL/HJGL/WeldingManage/WeldJointService.cs +++ b/SGGL/BLL/HJGL/WeldingManage/WeldJointService.cs @@ -9,7 +9,7 @@ namespace BLL { public static class WeldJointService { - public static List hJGL_WeldJoints + public static List hJGL_WeldJoints { get; @@ -66,14 +66,14 @@ namespace BLL } public static List GetWeldJointsByPipelineId(string PipelineId) { - var q = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == PipelineId select x).ToList(); + var q = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == PipelineId select x).ToList(); return q; } public static Model.HJGL_WeldJoint GetWeldJointsByWeldJointCode(string PipelineId, string WeldJointCode) - { - var q=(from x in Funs.DB.HJGL_WeldJoint where x.PipelineId==PipelineId && x.WeldJointCode==WeldJointCode select x ).FirstOrDefault(); - + { + var q = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == PipelineId && x.WeldJointCode == WeldJointCode select x).FirstOrDefault(); + return q; } @@ -87,7 +87,6 @@ namespace BLL Model.SGGLDB db = Funs.DB; Model.HJGL_WeldJoint newWeldJoint = new Model.HJGL_WeldJoint { - WeldJointId = SQLHelper.GetNewID(typeof(Model.HJGL_WeldJoint)), ProjectId = weldJoint.ProjectId, PipelineId = weldJoint.PipelineId, PipelineCode = weldJoint.PipelineCode, @@ -97,7 +96,7 @@ namespace BLL Material2Id = weldJoint.Material2Id, Thickness = weldJoint.Thickness, Dia = weldJoint.Dia, - DNDia=weldJoint.DNDia, + DNDia = weldJoint.DNDia, Size = weldJoint.Size, DetectionTypeId = weldJoint.DetectionTypeId, JointArea = weldJoint.JointArea, @@ -120,9 +119,16 @@ namespace BLL Remark = weldJoint.Remark, IsTwoJoint = weldJoint.IsTwoJoint, SubmitMan = weldJoint.SubmitMan, - TwoJointType=weldJoint.TwoJointType + TwoJointType = weldJoint.TwoJointType }; - + if (!string.IsNullOrEmpty(weldJoint.WeldJointId)) + { + newWeldJoint.WeldJointId = weldJoint.WeldJointId; + } + else + { + newWeldJoint.WeldJointId = SQLHelper.GetNewID(typeof(Model.HJGL_WeldJoint)); + } db.HJGL_WeldJoint.InsertOnSubmit(newWeldJoint); db.SubmitChanges(); } @@ -285,7 +291,7 @@ namespace BLL public static void DeleteWeldJointByPipelineId(string pipelineId) { Model.SGGLDB db = Funs.DB; - var weldline = db.HJGL_WeldJoint.Where(e => e.PipelineId == pipelineId); + var weldline = db.HJGL_WeldJoint.Where(e => e.PipelineId == pipelineId); if (weldline != null) { db.HJGL_WeldJoint.DeleteAllOnSubmit(weldline); @@ -297,7 +303,7 @@ namespace BLL /// 根据unitworkid删除焊口 /// /// - public static void DeleteWeldJointByUnitWorkId(string unitworkId) + public static void DeleteWeldJointByUnitWorkId(string unitworkId) { var oldPipeline = BLL.PipelineService.GetPipelinesByUnitWordId(unitworkId); if (oldPipeline != null) @@ -353,14 +359,14 @@ namespace BLL { Model.SGGLDB db = Funs.DB; var q = (from x in db.HJGL_WeldJoint - join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId into tt - from g in tt.DefaultIfEmpty() - where g.UnitWorkId == UnitWorkId + join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId into tt + from g in tt.DefaultIfEmpty() + where g.UnitWorkId == UnitWorkId select x).ToList(); return q; } - public static List GetWeldJointByProjectid(string ProjectId) + public static List GetWeldJointByProjectid(string ProjectId) { Model.SGGLDB db = Funs.DB; @@ -368,7 +374,7 @@ namespace BLL where x.ProjectId == ProjectId select x).ToList(); return q; - } + } /// /// 根据焊口Id获取插入焊口数 @@ -445,13 +451,14 @@ namespace BLL public static List GetViewWeldJointsBymodel(Model.View_HJGL_WeldJoint model) { var q = (from x in Funs.DB.View_HJGL_WeldJoint - where + where (string.IsNullOrEmpty(model.ProjectId) || x.ProjectId.Contains(model.ProjectId)) && (string.IsNullOrEmpty(model.UnitWorkId) || x.UnitWorkId.Contains(model.UnitWorkId)) && (string.IsNullOrEmpty(model.PipelineId) || x.PipelineId.Contains(model.PipelineId)) && (string.IsNullOrEmpty(model.PipelineCode) || x.PipelineCode.Contains(model.PipelineCode)) && (string.IsNullOrEmpty(model.WeldJointCode) || x.WeldJointCode.Contains(model.WeldJointCode)) - orderby x.WeldJointCode select x).AsParallel().ToList(); + orderby x.WeldJointCode + select x).AsParallel().ToList(); return q; } /// diff --git a/SGGL/FineUIPro.Web/CQMS/PersonManage/WelderManage.aspx b/SGGL/FineUIPro.Web/CQMS/PersonManage/WelderManage.aspx index ab645096..19e89f0d 100644 --- a/SGGL/FineUIPro.Web/CQMS/PersonManage/WelderManage.aspx +++ b/SGGL/FineUIPro.Web/CQMS/PersonManage/WelderManage.aspx @@ -39,6 +39,15 @@ EmptyText="输入查询条件" Width="190px" LabelWidth="80px" LabelAlign="Right"> + + + + + + + diff --git a/SGGL/FineUIPro.Web/CQMS/PersonManage/WelderManage.aspx.cs b/SGGL/FineUIPro.Web/CQMS/PersonManage/WelderManage.aspx.cs index 2a96a30e..f7260c40 100644 --- a/SGGL/FineUIPro.Web/CQMS/PersonManage/WelderManage.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/PersonManage/WelderManage.aspx.cs @@ -191,11 +191,15 @@ namespace FineUIPro.Web.CQMS.PersonManage rootNode.Text = item.UnitName; rootNode.EnableClickEvent = true; this.tvControlItem.Nodes.Add(rootNode); - var getWelders = (from x in Funs.DB.SitePerson_Person where x.ProjectId == this.CurrUser.LoginProjectId && x.WorkPostId == Const.WorkPost_Welder && x.States == Const.ProjectPersonStates_1 && x.UnitId == item.UnitId select x).ToList(); + var getWelders = (from x in Funs.DB.SitePerson_Person where x.ProjectId == this.CurrUser.LoginProjectId && x.WorkPostId == Const.WorkPost_Welder && x.UnitId == item.UnitId select x).ToList(); if (!string.IsNullOrEmpty(txtQueryWelderCode.Text.Trim())) { getWelders = getWelders.Where(x => x.WelderCode.Contains(txtQueryWelderCode.Text.Trim())).ToList(); } + if (!string.IsNullOrEmpty(txtName.Text.Trim())) + { + getWelders = getWelders.Where(x => x.PersonName.Contains(txtName.Text.Trim())).ToList(); + } foreach (var sitem in getWelders) { TreeNode tn = new TreeNode(); diff --git a/SGGL/FineUIPro.Web/CQMS/PersonManage/WelderManage.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/PersonManage/WelderManage.aspx.designer.cs index 10b5cf05..3d1b574b 100644 --- a/SGGL/FineUIPro.Web/CQMS/PersonManage/WelderManage.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/PersonManage/WelderManage.aspx.designer.cs @@ -7,13 +7,11 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.CQMS.PersonManage -{ - - - public partial class WelderManage - { - +namespace FineUIPro.Web.CQMS.PersonManage { + + + public partial class WelderManage { + /// /// form1 控件。 /// @@ -22,7 +20,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -31,7 +29,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Panel1 控件。 /// @@ -40,7 +38,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel1; - + /// /// panelLeftRegion 控件。 /// @@ -49,7 +47,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel panelLeftRegion; - + /// /// Toolbar3 控件。 /// @@ -58,7 +56,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar3; - + /// /// txtQueryWelderCode 控件。 /// @@ -67,7 +65,25 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtQueryWelderCode; - + + /// + /// Toolbar4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar4; + + /// + /// txtName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtName; + /// /// btnQuery 控件。 /// @@ -76,7 +92,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnQuery; - + /// /// tvControlItem 控件。 /// @@ -85,7 +101,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Tree tvControlItem; - + /// /// panelCenterRegion 控件。 /// @@ -94,7 +110,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel panelCenterRegion; - + /// /// Toolbar1 控件。 /// @@ -103,7 +119,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// ToolbarFill2 控件。 /// @@ -112,7 +128,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarFill ToolbarFill2; - + /// /// btnEdit 控件。 /// @@ -121,7 +137,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnEdit; - + /// /// btnDelete 控件。 /// @@ -130,7 +146,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnDelete; - + /// /// SimpleForm1 控件。 /// @@ -139,7 +155,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form SimpleForm1; - + /// /// drpUnitId 控件。 /// @@ -148,7 +164,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label drpUnitId; - + /// /// txtWelderName 控件。 /// @@ -157,7 +173,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtWelderName; - + /// /// txtWelderCode 控件。 /// @@ -166,7 +182,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtWelderCode; - + /// /// rblSex 控件。 /// @@ -175,7 +191,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label rblSex; - + /// /// txtBirthday 控件。 /// @@ -184,7 +200,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtBirthday; - + /// /// txtCertificateCode 控件。 /// @@ -193,7 +209,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtCertificateCode; - + /// /// txtWelderLevel 控件。 /// @@ -202,7 +218,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtWelderLevel; - + /// /// cbIsOnDuty 控件。 /// @@ -211,7 +227,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.CheckBox cbIsOnDuty; - + /// /// txtCertificateLimitTime 控件。 /// @@ -220,7 +236,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtCertificateLimitTime; - + /// /// Grid1 控件。 /// @@ -229,7 +245,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// Toolbar2 控件。 /// @@ -238,7 +254,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar2; - + /// /// txtQualificationItem 控件。 /// @@ -247,7 +263,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtQualificationItem; - + /// /// ToolbarFill1 控件。 /// @@ -256,7 +272,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarFill ToolbarFill1; - + /// /// btnNew 控件。 /// @@ -265,7 +281,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnNew; - + /// /// ToolbarSeparator1 控件。 /// @@ -274,7 +290,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; - + /// /// ToolbarText1 控件。 /// @@ -283,7 +299,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarText ToolbarText1; - + /// /// ddlPageSize 控件。 /// @@ -292,7 +308,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList ddlPageSize; - + /// /// Window1 控件。 /// @@ -301,7 +317,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window1; - + /// /// Menu1 控件。 /// @@ -310,7 +326,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Menu Menu1; - + /// /// btnMenuAudit 控件。 /// @@ -319,7 +335,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuAudit; - + /// /// btnMenuEdit 控件。 /// @@ -328,7 +344,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuEdit; - + /// /// btnMenuDelete 控件。 /// @@ -337,7 +353,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuDelete; - + /// /// btnView 控件。 /// @@ -346,7 +362,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnView; - + /// /// Menu2 控件。 /// @@ -355,7 +371,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Menu Menu2; - + /// /// btnMenuTreeAudit 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/PersonManage/WelderManageEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/PersonManage/WelderManageEdit.aspx.cs index f54529fa..e5bf755e 100644 --- a/SGGL/FineUIPro.Web/CQMS/PersonManage/WelderManageEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/PersonManage/WelderManageEdit.aspx.cs @@ -170,7 +170,18 @@ namespace FineUIPro.Web.CQMS.PersonManage //newWelder.Sex = this.rblSex.SelectedValue; //newWelder.Birthday = Funs.GetNewDateTime(this.txtBirthday.Text.Trim()); newWelder.IdentityCard = this.txtIdentityCard.Text.Trim(); - newWelder.CertificateCode = this.txtCertificateCode.Text.Trim(); + if (!string.IsNullOrEmpty(this.txtCertificateCode.Text.Trim())) + { + newWelder.CertificateCode = this.txtCertificateCode.Text.Trim(); + } + else + { + var welder = BLL.SitePerson_PersonService.GetSitePersonByProjectIdPersonId(this.CurrUser.LoginProjectId, PersonId); + if (welder != null) + { + newWelder.CertificateCode = welder.IdentityCard; + } + } //newWelder.CertificateLimitTime = Funs.GetNewDateTime(this.txtCertificateLimitTime.Text.Trim()); newWelder.WelderLevel = this.txtWelderLevel.Text.Trim(); //if (this.cbIsOnDuty.Checked) @@ -184,10 +195,10 @@ namespace FineUIPro.Web.CQMS.PersonManage newWelder.Remark = this.txtRemark.Text.Trim(); //newWelder.PhotoUrl = this.PhotoAttachUrl; newWelder.Isprint = "0"; - // newWelder.IsUsed = true; + // newWelder.IsUsed = true; if (!string.IsNullOrEmpty(PersonId)) { - if (!BLL.WelderService.IsExisWelderCode(PersonId, this.txtWelderCode.Text)) + if (!BLL.WelderService.IsExisWelderCode(PersonId, this.txtWelderCode.Text, this.CurrUser.LoginProjectId)) { newWelder.PersonId = PersonId; BLL.WelderService.UpdateWelder(newWelder); @@ -201,7 +212,7 @@ namespace FineUIPro.Web.CQMS.PersonManage else { PersonId = SQLHelper.GetNewID(typeof(Model.SitePerson_Person)); - if (!BLL.WelderService.IsExisWelderCode(PersonId, this.txtWelderCode.Text)) + if (!BLL.WelderService.IsExisWelderCode(PersonId, this.txtWelderCode.Text, this.CurrUser.LoginProjectId)) { newWelder.PersonId = PersonId; // BLL.WelderService.AddWelder(newWelder); diff --git a/SGGL/FineUIPro.Web/File/Excel/DataOut/焊口二次设计信息.xlsx b/SGGL/FineUIPro.Web/File/Excel/DataOut/焊口二次设计信息.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..c62a090c4c85a757dc946efca5abe20645444bbb GIT binary patch literal 9482 zcmeHt1zTI&wsz3q?q008w@{$CJB8xKo!}`>(crGdDelFg&|<{`#a)U^i$l=@Bs)Z8Kk{$AJD}>U* zrFz>hvf$@LHg)F9#U)J)cmdO95hA{BoLj!11$G1%Q(ETHqp3bKHIyjiI)kGSW%j8c zIJPi==AJa@1-z%mqBcLE49JI@A~EH86(C{H#_(3C?K6um*~5hG^AG7P_$-KaF4An8 z4p~1Wd5)w_Tt-EfH8HYG!*cmj0Ge}rQXiw7v7|s4kjyC2Suh`2LR!RW6^mt@5NkN4 zm^Ve?-ka1gubdtnc>X*q^M{qK%Jv>_pL(JZtCRQW%YalJ0Jw(|oR) z4ZYgi+*n?ck1LS6kNQ?28obdxg<~MDY66sySBhi9OG?lq^nDt3c7?M$RJK=tT>OJw zxUv_wofTm^pfDnLyW41ZXXorD`g7rWbL66Ivkz(L@brY$W10-V*$r|4;O-6qp!PQ( zYW1iida;Z1V1z&gvxTwq?GaJ^rGqUSO==2LPL+=>OyV`XrrtBQ z9+f#-*tw>(RyG8EWHA&b+Mky|Mji!88KyJWCAE=}WGzWIbf$ciss!lAdoG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aS#B&fV~)DG#-BNv-SS~ DP`F>i literal 0 HcmV?d00001 diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 2e98eec6..52b765e6 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -721,6 +721,7 @@ + @@ -8977,6 +8978,13 @@ WeldTask.aspx + + CheckResult.aspx + ASPXCodeBehind + + + CheckResult.aspx + DefectStatistics.aspx ASPXCodeBehind diff --git a/SGGL/FineUIPro.Web/HJGL/PersonManage/WelderManage.aspx b/SGGL/FineUIPro.Web/HJGL/PersonManage/WelderManage.aspx index 067c0691..26d5e2b8 100644 --- a/SGGL/FineUIPro.Web/HJGL/PersonManage/WelderManage.aspx +++ b/SGGL/FineUIPro.Web/HJGL/PersonManage/WelderManage.aspx @@ -39,6 +39,15 @@ EmptyText="输入查询条件" Width="190px" LabelWidth="80px" LabelAlign="Right"> + + + + + + + diff --git a/SGGL/FineUIPro.Web/HJGL/PersonManage/WelderManage.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PersonManage/WelderManage.aspx.cs index be77a077..cdd7ea8a 100644 --- a/SGGL/FineUIPro.Web/HJGL/PersonManage/WelderManage.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PersonManage/WelderManage.aspx.cs @@ -37,9 +37,9 @@ namespace FineUIPro.Web.HJGL.PersonManage Model.SitePerson_Person welder = BLL.SitePerson_PersonService.GetSitePersonByProjectIdPersonId(this.CurrUser.LoginProjectId, this.tvControlItem.SelectedNodeID); if (welder != null) { - this.btnEdit.Hidden = false; - this.btnNew.Hidden = false; - this.btnDelete.Hidden = false; + //this.btnEdit.Hidden = false; + //this.btnNew.Hidden = false; + //this.btnDelete.Hidden = false; this.txtWelderCode.Text = welder.WelderCode; this.txtWelderName.Text = welder.PersonName; @@ -191,7 +191,15 @@ namespace FineUIPro.Web.HJGL.PersonManage rootNode.Text = item.UnitName; rootNode.EnableClickEvent = true; this.tvControlItem.Nodes.Add(rootNode); - var getWelders = (from x in Funs.DB.SitePerson_Person where x.ProjectId == this.CurrUser.LoginProjectId && x.WorkPostId == Const.WorkPost_Welder && x.UnitId == item.UnitId && x.WelderCode.Contains(txtQueryWelderCode.Text.Trim()) select x).ToList(); + var getWelders = (from x in Funs.DB.SitePerson_Person where x.ProjectId == this.CurrUser.LoginProjectId && x.WorkPostId == Const.WorkPost_Welder && x.UnitId == item.UnitId select x).ToList(); + if (!string.IsNullOrEmpty(txtQueryWelderCode.Text.Trim())) + { + getWelders = getWelders.Where(x => x.WelderCode.Contains(txtQueryWelderCode.Text.Trim())).ToList(); + } + if (!string.IsNullOrEmpty(txtName.Text.Trim())) + { + getWelders = getWelders.Where(x => x.PersonName.Contains(txtName.Text.Trim())).ToList(); + } foreach (var sitem in getWelders) { TreeNode tn = new TreeNode(); @@ -202,7 +210,7 @@ namespace FineUIPro.Web.HJGL.PersonManage } else { - tn.Text = sitem.PersonName+"【"+ sitem.WelderCode + "】"; + tn.Text = sitem.PersonName + "【" + sitem.WelderCode + "】"; } tn.EnableClickEvent = true; rootNode.Nodes.Add(tn); @@ -565,6 +573,6 @@ namespace FineUIPro.Web.HJGL.PersonManage #endregion - + } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HJGL/PersonManage/WelderManage.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/PersonManage/WelderManage.aspx.designer.cs index e825a743..f61b6951 100644 --- a/SGGL/FineUIPro.Web/HJGL/PersonManage/WelderManage.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HJGL/PersonManage/WelderManage.aspx.designer.cs @@ -7,13 +7,11 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.HJGL.PersonManage -{ - - - public partial class WelderManage - { - +namespace FineUIPro.Web.HJGL.PersonManage { + + + public partial class WelderManage { + /// /// form1 控件。 /// @@ -22,7 +20,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -31,7 +29,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Panel1 控件。 /// @@ -40,7 +38,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel1; - + /// /// panelLeftRegion 控件。 /// @@ -49,7 +47,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel panelLeftRegion; - + /// /// Toolbar3 控件。 /// @@ -58,7 +56,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar3; - + /// /// txtQueryWelderCode 控件。 /// @@ -67,7 +65,25 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtQueryWelderCode; - + + /// + /// Toolbar4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar4; + + /// + /// txtName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtName; + /// /// btnQuery 控件。 /// @@ -76,7 +92,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnQuery; - + /// /// tvControlItem 控件。 /// @@ -85,7 +101,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Tree tvControlItem; - + /// /// panelCenterRegion 控件。 /// @@ -94,7 +110,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel panelCenterRegion; - + /// /// Toolbar1 控件。 /// @@ -103,7 +119,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// ToolbarFill2 控件。 /// @@ -112,7 +128,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarFill ToolbarFill2; - + /// /// btnEdit 控件。 /// @@ -121,7 +137,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnEdit; - + /// /// btnDelete 控件。 /// @@ -130,7 +146,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnDelete; - + /// /// SimpleForm1 控件。 /// @@ -139,7 +155,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form SimpleForm1; - + /// /// drpUnitId 控件。 /// @@ -148,7 +164,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label drpUnitId; - + /// /// txtWelderName 控件。 /// @@ -157,7 +173,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtWelderName; - + /// /// txtWelderCode 控件。 /// @@ -166,7 +182,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtWelderCode; - + /// /// rblSex 控件。 /// @@ -175,7 +191,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label rblSex; - + /// /// txtBirthday 控件。 /// @@ -184,7 +200,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtBirthday; - + /// /// txtCertificateCode 控件。 /// @@ -193,7 +209,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtCertificateCode; - + /// /// txtWelderLevel 控件。 /// @@ -202,7 +218,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtWelderLevel; - + /// /// cbIsOnDuty 控件。 /// @@ -211,7 +227,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.CheckBox cbIsOnDuty; - + /// /// txtCertificateLimitTime 控件。 /// @@ -220,7 +236,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtCertificateLimitTime; - + /// /// Grid1 控件。 /// @@ -229,7 +245,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// Toolbar2 控件。 /// @@ -238,7 +254,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar2; - + /// /// txtQualificationItem 控件。 /// @@ -247,7 +263,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtQualificationItem; - + /// /// ToolbarFill1 控件。 /// @@ -256,7 +272,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarFill ToolbarFill1; - + /// /// btnNew 控件。 /// @@ -265,7 +281,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnNew; - + /// /// ToolbarSeparator1 控件。 /// @@ -274,7 +290,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; - + /// /// ToolbarText1 控件。 /// @@ -283,7 +299,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarText ToolbarText1; - + /// /// ddlPageSize 控件。 /// @@ -292,7 +308,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList ddlPageSize; - + /// /// Window1 控件。 /// @@ -301,7 +317,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window1; - + /// /// Menu1 控件。 /// @@ -310,7 +326,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Menu Menu1; - + /// /// btnMenuAudit 控件。 /// @@ -319,7 +335,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuAudit; - + /// /// btnMenuEdit 控件。 /// @@ -328,7 +344,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuEdit; - + /// /// btnMenuDelete 控件。 /// diff --git a/SGGL/FineUIPro.Web/HJGL/PersonManage/WelderManageEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PersonManage/WelderManageEdit.aspx.cs index fb0038e5..43af1acc 100644 --- a/SGGL/FineUIPro.Web/HJGL/PersonManage/WelderManageEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PersonManage/WelderManageEdit.aspx.cs @@ -178,7 +178,7 @@ namespace FineUIPro.Web.HJGL.PersonManage // newWelder.IsUsed = true; if (!string.IsNullOrEmpty(PersonId)) { - if (!BLL.WelderService.IsExisWelderCode(PersonId, this.txtWelderCode.Text)) + if (!BLL.WelderService.IsExisWelderCode(PersonId, this.txtWelderCode.Text, this.CurrUser.LoginProjectId)) { newWelder.PersonId = PersonId; BLL.WelderService.UpdateWelder(newWelder); @@ -192,7 +192,7 @@ namespace FineUIPro.Web.HJGL.PersonManage else { PersonId = SQLHelper.GetNewID(typeof(Model.SitePerson_Person)); - if (!BLL.WelderService.IsExisWelderCode(PersonId, this.txtWelderCode.Text)) + if (!BLL.WelderService.IsExisWelderCode(PersonId, this.txtWelderCode.Text, this.CurrUser.LoginProjectId)) { newWelder.PersonId = PersonId; // BLL.WelderService.AddWelder(newWelder); diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx b/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx index 356215ba..fd1d0ad3 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx @@ -83,6 +83,9 @@ + + diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.cs index a91c0e42..d92292ea 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.cs @@ -1,8 +1,10 @@ using BLL; +using NPOI.SS.Util; using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; +using System.IO; using System.Linq; using System.Text; using System.Web; @@ -839,27 +841,171 @@ namespace FineUIPro.Web.HJGL.WeldingManage #endregion #region 导出焊口信息 - /// - /// 导出焊口信息 + /// 导出按钮 /// /// /// protected void btnOut_Click(object sender, EventArgs e) { - //var iso = BLL.Pipeline_PipelineService.GetPipelineByPipelineId(this.tvControlItem.SelectedNodeID); - //var workArea = BLL.Project_WorkAreaService.GetProject_WorkAreaByWorkAreaId(this.tvControlItem.SelectedNodeID); - //if (iso != null) - //{ - // PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("JointInfoOut.aspx?PipelineId={0}", this.tvControlItem.SelectedNodeID, "导出 - "))); - //} - //else if (workArea != null) - //{ - // PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("JointInfoOut.aspx?WorkAreaId={0}", this.tvControlItem.SelectedNodeID, "导出 - "))); - //} - //else - //{ - // Alert.ShowInTop("请选择"PipelineOrArea, MessageBoxIcon.Warning); - //} + string rootPath = Server.MapPath("~/"); + string initTemplatePath = string.Empty; + string uploadfilepath = string.Empty; + string newUrl = string.Empty; + string filePath = string.Empty; + initTemplatePath = Const.JotTwoDesignTemplateUrl; + uploadfilepath = rootPath + initTemplatePath; + string constructionLogId = this.tvControlItem.SelectedNodeID; + Model.SGGLDB db = Funs.DB; + var workEfficiencys = from x in db.ZHGL_ConstructionLogWorkEfficiency + where x.ConstructionLogId == constructionLogId + select x; + var persons = from x in db.ZHGL_ConstructionLogPerson + where x.ConstructionLogId == constructionLogId + select x; + var machines = from x in db.ZHGL_ConstructionLogMachine + where x.ConstructionLogId == constructionLogId + select x; + if (this.Grid1.Rows.Count > 0) + { + newUrl = uploadfilepath.Replace(".xlsx", "(" + string.Format("{0:yyyy-MM-dd}", DateTime.Now) + ")" + ".xlsx"); + File.Copy(uploadfilepath, newUrl); + // 第一步:读取文件流 + NPOI.SS.UserModel.IWorkbook workbook; + using (FileStream stream = new FileStream(newUrl, FileMode.Open, FileAccess.Read)) + { + workbook = new NPOI.XSSF.UserModel.XSSFWorkbook(stream); + } + // 创建单元格样式 + NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle(); + cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; + cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; + cellStyle0.WrapText = true; + var font = workbook.CreateFont(); + font.FontHeightInPoints = 11; + font.IsBold = false; + cellStyle0.SetFont(font); + // 第二步:创建新数据行 + NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0); + int rowCount = 2; + for (int i = 0; i < this.Grid1.Rows.Count; i++) + { + NPOI.SS.UserModel.IRow row1 = sheet.CreateRow(rowCount); + NPOI.SS.UserModel.ICell cell; + cell = row1.CreateCell(0); + cell.CellStyle = cellStyle0; + cell.SetCellValue((i+1).ToString()); + cell = row1.CreateCell(1); + cell.CellStyle = cellStyle0; + cell.SetCellValue(this.Grid1.Rows[i].Values[2].ToString()); + cell = row1.CreateCell(2); + cell.CellStyle = cellStyle0; + cell.SetCellValue(this.Grid1.Rows[i].Values[3].ToString()); + cell = row1.CreateCell(3); + cell.CellStyle = cellStyle0; + cell.SetCellValue(this.Grid1.Rows[i].Values[4].ToString()); + cell = row1.CreateCell(4); + cell.CellStyle = cellStyle0; + string date1 = this.Grid1.Rows[i].Values[5].ToString(); + if (!string.IsNullOrEmpty(date1)) + { + date1 = string.Format("{0:yyyy-MM-dd}",Funs.GetNewDateTime(date1)); + } + cell.SetCellValue(date1); + cell = row1.CreateCell(5); + cell.CellStyle = cellStyle0; + cell.SetCellValue(this.Grid1.Rows[i].Values[6].ToString()); + cell = row1.CreateCell(6); + cell.CellStyle = cellStyle0; + string date2 = this.Grid1.Rows[i].Values[7].ToString(); + if (!string.IsNullOrEmpty(date2)) + { + date2 = string.Format("{0:yyyy-MM-dd}", Funs.GetNewDateTime(date2)); + } + cell.SetCellValue(date2); + cell = row1.CreateCell(7); + cell.CellStyle = cellStyle0; + string weldJointCode = string.Empty; + var weldJoint = BLL.WeldJointService.GetWeldJointByWeldJointId(this.Grid1.Rows[i].RowID); + if (weldJoint != null) + { + weldJointCode = weldJoint.WeldJointCode; + } + cell.SetCellValue(weldJointCode); + cell = row1.CreateCell(8); + cell.CellStyle = cellStyle0; + cell.SetCellValue(this.Grid1.Rows[i].Values[10].ToString()); + cell = row1.CreateCell(9); + cell.CellStyle = cellStyle0; + cell.SetCellValue(this.Grid1.Rows[i].Values[11].ToString()); + cell = row1.CreateCell(10); + cell.CellStyle = cellStyle0; + cell.SetCellValue(this.Grid1.Rows[i].Values[12].ToString()); + cell = row1.CreateCell(11); + cell.CellStyle = cellStyle0; + cell.SetCellValue(this.Grid1.Rows[i].Values[13].ToString()); + cell = row1.CreateCell(12); + cell.CellStyle = cellStyle0; + cell.SetCellValue(this.Grid1.Rows[i].Values[14].ToString()); + cell = row1.CreateCell(13); + cell.CellStyle = cellStyle0; + cell.SetCellValue(this.Grid1.Rows[i].Values[15].ToString()); + cell = row1.CreateCell(14); + cell.CellStyle = cellStyle0; + cell.SetCellValue(this.Grid1.Rows[i].Values[16].ToString()); + cell = row1.CreateCell(15); + cell.CellStyle = cellStyle0; + cell.SetCellValue(this.Grid1.Rows[i].Values[17].ToString()); + cell = row1.CreateCell(16); + cell.CellStyle = cellStyle0; + cell.SetCellValue(this.Grid1.Rows[i].Values[18].ToString()); + cell = row1.CreateCell(17); + cell.CellStyle = cellStyle0; + cell.SetCellValue(this.Grid1.Rows[i].Values[20].ToString()); + cell = row1.CreateCell(18); + cell.CellStyle = cellStyle0; + cell.SetCellValue(this.Grid1.Rows[i].Values[21].ToString()); + cell = row1.CreateCell(19); + cell.CellStyle = cellStyle0; + cell.SetCellValue(this.Grid1.Rows[i].Values[22].ToString()); + cell = row1.CreateCell(20); + cell.CellStyle = cellStyle0; + cell.SetCellValue(this.Grid1.Rows[i].Values[27].ToString()); + rowCount++; + } + + + + + // 第三步:写入文件流 + using (FileStream stream = new FileStream(newUrl, FileMode.Create, FileAccess.Write)) + { + workbook.Write(stream); + workbook.Close(); + } + + + + + string fileName = Path.GetFileName(newUrl); + FileInfo info = new FileInfo(newUrl); + long fileSize = info.Length; + Response.Clear(); + Response.ContentType = "application/x-zip-compressed"; + Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8)); + Response.AddHeader("Content-Length", fileSize.ToString()); + Response.TransmitFile(newUrl, 0, fileSize); + Response.Flush(); + Response.Close(); + File.Delete(newUrl); + } + else + { + ShowNotify("无数据可导出!", MessageBoxIcon.Warning); + } } /// @@ -887,47 +1033,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage // Alert.ShowInTop("请选择"PipelinetFirst, MessageBoxIcon.Warning); //} } - - /// - /// 导出方法 - /// - /// - /// - private string GetGridTableHtml(Grid grid) - { - StringBuilder sb = new StringBuilder(); - sb.Append(""); - sb.Append(""); - sb.Append(""); - foreach (GridColumn column in grid.Columns) - { - if (column.HeaderText != "序号") - { - sb.AppendFormat("", column.HeaderText); - } - } - sb.Append(""); - foreach (GridRow row in grid.Rows) - { - sb.Append(""); - foreach (GridColumn column in grid.Columns) - { - string html = row.Values[column.ColumnIndex].ToString(); - if (column.ColumnID != "tfNumber") - { - //html = (row.FindControl("lblNumber") as AspNet.Label).Text; - sb.AppendFormat("", html); - } - //sb.AppendFormat("", html); - } - - sb.Append(""); - } - - sb.Append("
{0}
{0}{0}
"); - - return sb.ToString(); - } #endregion #region 选择要显示列 diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.designer.cs index f798843a..8a5836cc 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.designer.cs @@ -201,6 +201,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// protected global::FineUIPro.Button btnOut2; + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + /// /// btnPrint 控件。 /// diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineListPDMSIn.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineListPDMSIn.aspx.cs index 2c73f034..9db0edd2 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineListPDMSIn.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineListPDMSIn.aspx.cs @@ -99,7 +99,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage var table = this.GetPagedDataTable(Grid2, tb); Grid2.DataSource = table; Grid2.DataBind(); - drpVersion.DataSource = BLL.HJGL_DesignBasisDataImportService.GetListVersionByUnitWorkId(Request.Params["UnitWorkId"], DataClassification); + drpVersion.DataSource = BLL.HJGL_DesignBasisDataImportService.GetListVersionByUnitWorkId(Request.Params["UnitWorkId"], DataClassification); drpVersion.DataBind(); } @@ -164,10 +164,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage try { var ds = MiniExcel.Query(fileName).ToList(); - var columns = MiniExcel.GetColumns(fileName); - var cnt = columns.Count; - var reposedata = AddDatasetToSQL(ds, cnt); - if (reposedata.code==1) + var columns = MiniExcel.GetColumns(fileName); + var cnt = columns.Count; + var reposedata = AddDatasetToSQL(ds, cnt); + if (reposedata.code == 1) { State = (int)ButtonState.Import; ShowNotify("审核完成请点击导入"); @@ -192,7 +192,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage } #endregion - + #region 将Dataset的数据导入数据库 /// @@ -204,7 +204,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage private Model.ResponeData AddDatasetToSQL(List pds, int count) { Model.ResponeData responeData = new Model.ResponeData(); - // string result = string.Empty; + // string result = string.Empty; List result = new List(); //pds = BLL.Funs.FilterBlankLines(pds); if (count < 28) @@ -245,7 +245,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage string pipeLineId = string.Empty; if (string.IsNullOrEmpty(col0)) { - result.Add( "第" + (i + 1).ToString() + "行," + "管线号" + "," + "此项为必填项!" + "|"); + result.Add("第" + (i + 1).ToString() + "行," + "管线号" + "," + "此项为必填项!" + "|"); } else { @@ -265,8 +265,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage var Medium = getMedium.FirstOrDefault(x => x.MediumCode == col3); if (Medium == null) { - // result += "第" + (i + 1).ToString() + "行," + "该介质不存在!" + "|"; - result .Add( col3 + "-该介质不存在!" + "|"); + // result += "第" + (i + 1).ToString() + "行," + "该介质不存在!" + "|"; + result.Add(col3 + "-该介质不存在!" + "|"); } else { @@ -284,7 +284,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage var PipeLineClass = getPipeLineClass.FirstOrDefault(x => x.PipingClassCode == col4); if (PipeLineClass == null) { - // result += "第" + (i + 1).ToString() + "行," + "该管道等级不存在!" + "|"; + // result += "第" + (i + 1).ToString() + "行," + "该管道等级不存在!" + "|"; result.Add(col4 + "-该管道等级不存在!" + "|"); } else @@ -299,7 +299,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage var DetectionRate = getDetectionRate.FirstOrDefault(x => x.DetectionRateValue.ToString() == col5.Replace("%", "") || x.DetectionRateCode == col5); if (DetectionRate == null) { - // result += "第" + (i + 1).ToString() + "行," + "该探伤比例不存在!" + "|"; + // result += "第" + (i + 1).ToString() + "行," + "该探伤比例不存在!" + "|"; result.Add(col5 + "-该探伤比例不存在!" + "|"); } else @@ -316,26 +316,18 @@ namespace FineUIPro.Web.HJGL.WeldingManage string col6 = pds[i].G; if (!string.IsNullOrEmpty(col6)) { - string[] types = col6.ToString().Split(','); - foreach (string t in types) + string typeStr = col6.ToString(); + var type = getDetectionType.FirstOrDefault(x => x.DetectionTypeCode == typeStr); + if (type == null) { - var type = getDetectionType.FirstOrDefault(x => x.DetectionTypeCode == t); - if (type == null) - { - //result += "第" + (i + 1).ToString() + "行," + "探伤类型【" + t + "】不存在!" + "|"; - result.Add("探伤类型【" + t + "】不存在!" + "|"); - } - else - { - pipeline.DetectionType += type.DetectionTypeId + "|"; - } + //result += "第" + (i + 1).ToString() + "行," + "探伤类型【" + t + "】不存在!" + "|"; + result.Add("探伤类型【" + typeStr + "】不存在!" + "|"); } - if (!string.IsNullOrEmpty(pipeline.DetectionType)) + else { - pipeline.DetectionType = pipeline.DetectionType.Substring(0, pipeline.DetectionType.Length - 1); + pipeline.DetectionType = type.DetectionTypeId; pipeline.DetectionTypeStr = col6; } - } else { @@ -378,7 +370,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage var PressurePipingClass = getPressurePipingClass.FirstOrDefault(x => x.PressurePipingClassCode == col11); if (PressurePipingClass == null) { - // result += "第" + (i + 1).ToString() + "行," + "该压力管道级别不存在!" + "|"; + // result += "第" + (i + 1).ToString() + "行," + "该压力管道级别不存在!" + "|"; result.Add(col11 + "-该压力管道级别不存在!" + "|"); } else @@ -447,7 +439,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage var material = getMaterial.FirstOrDefault(x => x.MaterialCode == col17); if (material == null) { - // result += "第" + (i + 1).ToString() + "行," + "该材质不存在!" + "|"; + // result += "第" + (i + 1).ToString() + "行," + "该材质不存在!" + "|"; result.Add(col17 + "-该材质不存在!" + "|"); } else @@ -456,7 +448,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage pipeline.PipeMaterialCode = col17; } } - pipeline.FlowingSection= Convert.ToString(pds[i].S); + pipeline.FlowingSection = Convert.ToString(pds[i].S); pipeline.Remark = Convert.ToString(pds[i].T); // 以下是焊口信息 @@ -480,17 +472,17 @@ namespace FineUIPro.Web.HJGL.WeldingManage } string col20 = ""; - if (pds[i].V!=null) + if (pds[i].V != null) { col20 = pds[i].V.ToString(); } - + if (!string.IsNullOrEmpty(col20)) { var material = getMaterial.FirstOrDefault(x => x.MaterialCode == col20); if (material == null) { - // result += "第" + (i + 1).ToString() + "行," + "该材质1不存在!" + "|"; + // result += "第" + (i + 1).ToString() + "行," + "该材质1不存在!" + "|"; result.Add(col20 + "-该材质1不存在!" + "|"); } else @@ -505,11 +497,11 @@ namespace FineUIPro.Web.HJGL.WeldingManage } string col21 = ""; - if (pds[i].W!=null) + if (pds[i].W != null) { col21 = pds[i].W.ToString(); } - + if (!string.IsNullOrEmpty(col21)) { var material = getMaterial.FirstOrDefault(x => x.MaterialCode == col21); @@ -530,10 +522,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage } string col22 = Convert.ToString(pds[i].X); - string col27 = ""; - if (pds[i].AC!=null) + string col27 = ""; + if (pds[i].AC != null) { - col27= pds[i].AC.ToString(); + col27 = pds[i].AC.ToString(); } if (rbDiaType.SelectedValue == "1") { @@ -576,7 +568,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage var col23 = Convert.ToString(pds[i].Y); - if (col23!=null) + if (col23 != null) { try { @@ -594,8 +586,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage } var col24 = Convert.ToString(pds[i].Z); - if (col24!=null) - { + if (col24 != null) + { // var Thickness = Convert.ToDecimal(col24); decimal Thickness = 0; string thickness = col24.ToString(); @@ -603,12 +595,12 @@ namespace FineUIPro.Web.HJGL.WeldingManage { if (rbDiaType.SelectedValue == "1")//外径 { - Thickness = (decimal)BLL.Base_DNCompareService.GetThicknessByDia(pipeline.Dia,thickness); + Thickness = (decimal)BLL.Base_DNCompareService.GetThicknessByDia(pipeline.Dia, thickness); pipeline.Thickness = Thickness; } else //DN直径 { - Thickness = (decimal)BLL.Base_DNCompareService.GetThicknessByDNDia(int.Parse( pipeline.DNDia.Replace("DN","")), thickness); + Thickness = (decimal)BLL.Base_DNCompareService.GetThicknessByDNDia(int.Parse(pipeline.DNDia.Replace("DN", "")), thickness); pipeline.Thickness = Thickness; } } @@ -635,7 +627,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage } } - + } else { @@ -658,7 +650,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage var weldType = getWeldType.FirstOrDefault(x => x.WeldTypeCode == col25); if (weldType == null) { - // result += "第" + (i + 1).ToString() + "行," + "该焊缝类型不存在!" + "|"; + // result += "第" + (i + 1).ToString() + "行," + "该焊缝类型不存在!" + "|"; result.Add(col25 + "-该焊缝类型不存在!" + "|"); } else @@ -746,7 +738,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage pipeline.ProjectId = this.CurrUser.LoginProjectId; PipelineList.Add(pipeline); } - + } if (result.Count > 0) @@ -840,21 +832,21 @@ namespace FineUIPro.Web.HJGL.WeldingManage { string rootPath = Server.MapPath("~/"); - string oldefilePath = rootPath+initPath + this.hdFileName.Text; + string oldefilePath = rootPath + initPath + this.hdFileName.Text; string unitworkId = Request.Params["UnitWorkId"]; - string filePath = rootPath+ Const.DesignBasisDataImportPath + this.hdFileName.Text; + string filePath = rootPath + Const.DesignBasisDataImportPath + this.hdFileName.Text; if (oldefilePath != string.Empty && System.IO.File.Exists(oldefilePath)) { if (!Directory.Exists(rootPath + Const.DesignBasisDataImportPath)) { Directory.CreateDirectory(rootPath + Const.DesignBasisDataImportPath); } - File.Move(oldefilePath, filePath); + File.Move(oldefilePath, filePath); //System.IO.File.Delete(oldefilePath);//删除上传的XLS文件 } string FileName = this.fuAttachUrl.FileName; - + if (DrpType.SelectedValue == "1")//更新导入 { @@ -863,8 +855,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage BLL.PipelineService.DeletePipelineByUnitworkId(unitworkId);//删除原有管线 AddView_HJGL_WeldJoint(PipelineList);//导入数据 - Model .HJGL_DesignBasisDataImport hJGL_DesignBasisDataImport = new Model .HJGL_DesignBasisDataImport(); - hJGL_DesignBasisDataImport.DesignBasisDataImportId= SQLHelper.GetNewID(); + Model.HJGL_DesignBasisDataImport hJGL_DesignBasisDataImport = new Model.HJGL_DesignBasisDataImport(); + hJGL_DesignBasisDataImport.DesignBasisDataImportId = SQLHelper.GetNewID(); hJGL_DesignBasisDataImport.ProjectId = this.CurrUser.LoginProjectId; hJGL_DesignBasisDataImport.UnitWorkId = unitworkId; hJGL_DesignBasisDataImport.ImportType = "1"; @@ -872,14 +864,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage hJGL_DesignBasisDataImport.FileName = FileName; hJGL_DesignBasisDataImport.FilePath = filePath.Replace(rootPath, ""); hJGL_DesignBasisDataImport.FileType = BLL.HJGL_DesignBasisDataImportService.GetFileType(FileName); - hJGL_DesignBasisDataImport.Version = BLL.HJGL_DesignBasisDataImportService.GetNewVersionByUnitWorkId(unitworkId,DataClassification); + hJGL_DesignBasisDataImport.Version = BLL.HJGL_DesignBasisDataImportService.GetNewVersionByUnitWorkId(unitworkId, DataClassification); hJGL_DesignBasisDataImport.Remark = txtRemark.Text; hJGL_DesignBasisDataImport.CreateMan = this.CurrUser.PersonId; hJGL_DesignBasisDataImport.CreateDate = DateTime.Now.ToString("yyyy-MM-dd HH-mm-ss"); BLL.HJGL_DesignBasisDataImportService.AddHJGL_DesignBasisDataImport(hJGL_DesignBasisDataImport); BLL.HJGL_DesignBasisDataImportVerSionLogService.UpdateVersion(this.CurrUser.LoginProjectId, unitworkId, (decimal)hJGL_DesignBasisDataImport.Version, DataClassification); - + } else //补充导入 diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointList.aspx b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointList.aspx index 74e8be30..5c31c106 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointList.aspx +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointList.aspx @@ -95,7 +95,7 @@ - + diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointView.aspx b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointView.aspx index d5b6d26e..e6b9af9d 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointView.aspx +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointView.aspx @@ -11,6 +11,16 @@
+ + + + + + + + + @@ -139,6 +149,10 @@ + diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointView.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointView.aspx.cs index beb00aa8..aa9b5c05 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointView.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointView.aspx.cs @@ -160,5 +160,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage } } + + protected void btnAttachUrl_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/WeldJoint&menuId={1}&type=-1", Request.Params["WeldJointId"], BLL.Const.HJGL_WeldJointMenuId))); + } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointView.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointView.aspx.designer.cs index e1b7b5f5..0c2ce3e5 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointView.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointView.aspx.designer.cs @@ -30,6 +30,24 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// protected global::FineUIPro.PageManager PageManager1; + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAttachUrl; + /// /// GroupPanel3 控件。 /// @@ -281,5 +299,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox hdGrooveType; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; } } diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx b/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx new file mode 100644 index 00000000..bb42e7c0 --- /dev/null +++ b/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx @@ -0,0 +1,99 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CheckResult.aspx.cs" Inherits="FineUIPro.Web.HJGL.WeldingReport.CheckResult" %> + + + + + + 检测结果汇总 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx.cs new file mode 100644 index 00000000..27adf4a0 --- /dev/null +++ b/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx.cs @@ -0,0 +1,174 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Text; +using AspNet = System.Web.UI.WebControls; + +namespace FineUIPro.Web.HJGL.WeldingReport +{ + public partial class CheckResult : PageBase + { + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString(); + BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(this.drpUnitId, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, true); + BLL.Base_DetectionTypeService.InitDetectionTypeDropDownList(drpDetectionType, true, string.Empty); + + } + } + + #region + /// + /// 绑定数据 + /// + private void BindGrid() + { + List listStr = new List(); + + listStr.Add(new SqlParameter("@projectId", this.CurrUser.LoginProjectId)); + if (this.drpUnitId.SelectedValue != BLL.Const._Null) + { + listStr.Add(new SqlParameter("@unitcode", this.drpUnitId.SelectedValue)); + } + else + { + listStr.Add(new SqlParameter("@unitcode", null)); + } + if (this.drpDetectionType.SelectedValue != BLL.Const._Null) + { + listStr.Add(new SqlParameter("@detectionTypeId", this.drpDetectionType.SelectedValue)); + } + else + { + listStr.Add(new SqlParameter("@detectionTypeId", null)); + } + + if (!string.IsNullOrEmpty(this.txtStarTime.Text)) + { + listStr.Add(new SqlParameter("@date1", this.txtStarTime.Text.Trim())); + } + else + { + listStr.Add(new SqlParameter("@date1", null)); + } + if (!string.IsNullOrEmpty(this.txtEndTime.Text)) + { + listStr.Add(new SqlParameter("@date2", this.txtEndTime.Text.Trim())); + } + else + { + listStr.Add(new SqlParameter("@date2", null)); + } + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunProc("sp_rpt_WelderFirstPassRate", parameter); + this.Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + + /// + /// 改变索引事件 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 分页下拉选择事件 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 统计按钮事件 + /// + /// 统计 + /// + /// + /// + protected void BtnAnalyse_Click(object sender, EventArgs e) + { + BindGrid(); + } + #endregion + + #region 导出按钮 + /// 导出按钮 + ///
+ /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("焊工一次合格率" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + Response.Write(GetGridTableHtml(Grid1)); + Response.End(); + } + + /// + /// 导出方法 + /// + /// + /// + private string GetGridTableHtml(Grid grid) + { + StringBuilder sb = new StringBuilder(); + sb.Append(""); + sb.Append(""); + sb.Append(""); + grid.PageSize = 10000; + BindGrid(); + foreach (GridColumn column in grid.Columns) + { + sb.AppendFormat("", column.HeaderText); + } + sb.Append(""); + foreach (GridRow row in grid.Rows) + { + sb.Append(""); + foreach (GridColumn column in grid.Columns) + { + string html = row.Values[column.ColumnIndex].ToString(); + if (column.ColumnID == "tfNumber") + { + html = (row.FindControl("labNumber") as AspNet.Label).Text; + } + sb.AppendFormat("", html); + } + + sb.Append(""); + } + + sb.Append("
{0}
{0}
"); + + return sb.ToString(); + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx.designer.cs new file mode 100644 index 00000000..3729067c --- /dev/null +++ b/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx.designer.cs @@ -0,0 +1,168 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.HJGL.WeldingReport { + + + public partial class CheckResult { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// drpUnitId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpUnitId; + + /// + /// drpDetectionType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpDetectionType; + + /// + /// txtStarTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStarTime; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label1; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// Toolbar3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar3; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// BtnAnalyse 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button BtnAnalyse; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + } +}