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 00000000..c62a090c Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/DataOut/焊口二次设计信息.xlsx differ 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; + } +}