diff --git a/HJGL/BLL/Common/Const.cs b/HJGL/BLL/Common/Const.cs index d49490c..503cd94 100644 --- a/HJGL/BLL/Common/Const.cs +++ b/HJGL/BLL/Common/Const.cs @@ -243,6 +243,11 @@ namespace BLL /// public const string WelderQueTemplateUrl = "File\\Excel\\WelderQue.xlsx"; + /// + /// Coode导入模板 + /// + public const string CoodeInTemplateUrl = "File\\Excel\\CoodeIn.xlsx"; + /// /// 委托单导入模板 /// @@ -564,6 +569,12 @@ namespace BLL /// public const string HJGL_PointManageMenuId = "3ACE25CE-C5CE-4CEC-AD27-0D5CF1DF2F01"; + /// + /// 点口待审核 + /// + public const string HJGL_PointForAuditMenuId = "7C4BD351-630C-4E2A-B9AD-F91C042ED7A0"; + + /// /// 无损委托单 /// diff --git a/HJGL/BLL/PublicInfo/BaseInfo/MaterialCoodeService.cs b/HJGL/BLL/PublicInfo/BaseInfo/MaterialCoodeService.cs index 0580930..ab6060d 100644 --- a/HJGL/BLL/PublicInfo/BaseInfo/MaterialCoodeService.cs +++ b/HJGL/BLL/PublicInfo/BaseInfo/MaterialCoodeService.cs @@ -29,8 +29,9 @@ namespace BLL ProjectId = coode.ProjectId, Coode = coode.Coode, HeartNo = coode.HeartNo, - Amount = coode.Amount - }; + Amount = coode.Amount, + IsUse = coode.IsUse + }; db.Base_MaterialCoode.InsertOnSubmit(newCoode); db.SubmitChanges(); } @@ -49,6 +50,7 @@ namespace BLL NewCoode.Coode = coode.Coode; NewCoode.HeartNo = coode.HeartNo; NewCoode.Amount = coode.Amount; + NewCoode.IsUse=coode.IsUse; db.SubmitChanges(); } } @@ -99,7 +101,7 @@ namespace BLL dropName.DataValueField = "MaterialCoode"; dropName.DataTextField = "MaterialCoode"; var sql = from x in Funs.DB.Base_MaterialCoode - where x.ProjectId == projectId + where x.ProjectId == projectId & x.IsUse == true orderby x.Coode, x.HeartNo select new { x.MaterialCoodeId, MaterialCoode = x.Coode + ":" + x.HeartNo}; dropName.DataSource = sql.ToList(); @@ -116,7 +118,7 @@ namespace BLL dropName.DataValueField = "Coode"; dropName.DataTextField = "Coode"; var sql = (from x in Funs.DB.Base_MaterialCoode - where x.ProjectId == projectId select x.Coode).Distinct(); + where x.ProjectId == projectId && x.IsUse==true select x.Coode).Distinct(); dropName.DataSource = sql; dropName.DataBind(); diff --git a/HJGL/BLL/WeldingProcess/DataIn/DataInTempService.cs b/HJGL/BLL/WeldingProcess/DataIn/DataInTempService.cs index e0c670f..2064dd9 100644 --- a/HJGL/BLL/WeldingProcess/DataIn/DataInTempService.cs +++ b/HJGL/BLL/WeldingProcess/DataIn/DataInTempService.cs @@ -69,6 +69,7 @@ namespace BLL newDataInTemp.Value37 = dataInTemp.Value37; newDataInTemp.Value38 = dataInTemp.Value38; newDataInTemp.Value39 = dataInTemp.Value39; + newDataInTemp.Value40 = dataInTemp.Value40; newDataInTemp.ToopValue = dataInTemp.ToopValue; db.Sys_DataInTemp.InsertOnSubmit(newDataInTemp); db.SubmitChanges(); @@ -124,6 +125,8 @@ namespace BLL newDataInTemp.Value36 = dataInTemp.Value36; newDataInTemp.Value37 = dataInTemp.Value37; newDataInTemp.Value38 = dataInTemp.Value38; + newDataInTemp.Value39 = dataInTemp.Value39; + newDataInTemp.Value40 = dataInTemp.Value40; newDataInTemp.ToopValue = dataInTemp.ToopValue; try { diff --git a/HJGL/FineUIPro.Web/File/Excel/CoodeIn.xlsx b/HJGL/FineUIPro.Web/File/Excel/CoodeIn.xlsx new file mode 100644 index 0000000..3c5fc00 Binary files /dev/null and b/HJGL/FineUIPro.Web/File/Excel/CoodeIn.xlsx differ diff --git a/HJGL/FineUIPro.Web/File/Excel/DailyReport.xlsx b/HJGL/FineUIPro.Web/File/Excel/DailyReport.xlsx index 8fd2c99..b76cd79 100644 Binary files a/HJGL/FineUIPro.Web/File/Excel/DailyReport.xlsx and b/HJGL/FineUIPro.Web/File/Excel/DailyReport.xlsx differ diff --git a/HJGL/FineUIPro.Web/FineUIPro.Web.csproj b/HJGL/FineUIPro.Web/FineUIPro.Web.csproj index 7b31679..ea19706 100644 --- a/HJGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/HJGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -231,6 +231,7 @@ + @@ -3418,6 +3419,13 @@ LogList.aspx + + PointForAudit.aspx + ASPXCodeBehind + + + PointForAudit.aspx + MaterialCoode.aspx ASPXCodeBehind diff --git a/HJGL/FineUIPro.Web/PublicInfo/BaseInfo/MaterialEdit.aspx b/HJGL/FineUIPro.Web/PublicInfo/BaseInfo/MaterialEdit.aspx index 0b3c521..9a97264 100644 --- a/HJGL/FineUIPro.Web/PublicInfo/BaseInfo/MaterialEdit.aspx +++ b/HJGL/FineUIPro.Web/PublicInfo/BaseInfo/MaterialEdit.aspx @@ -22,7 +22,7 @@ - diff --git a/HJGL/FineUIPro.Web/WelderManage/QualifiedProject.aspx.cs b/HJGL/FineUIPro.Web/WelderManage/QualifiedProject.aspx.cs index 3f3cedd..7a77c0c 100644 --- a/HJGL/FineUIPro.Web/WelderManage/QualifiedProject.aspx.cs +++ b/HJGL/FineUIPro.Web/WelderManage/QualifiedProject.aspx.cs @@ -527,6 +527,7 @@ namespace FineUIPro.Web.WelderManage updateQue.SizesMin = sizesMin; updateQue.MaterialTypeName = materialTypeName; updateQue.WeldType = weldType; + updateQue.IsPass = q.IsPass; BLL.WelderQualifiedService.UpdateWelderQualifiedProject(updateQue); } @@ -710,6 +711,7 @@ namespace FineUIPro.Web.WelderManage } + welderQue.IsPass = true; #endregion welderQueList.Add(welderQue); diff --git a/HJGL/FineUIPro.Web/WelderManage/WelderManage.aspx.cs b/HJGL/FineUIPro.Web/WelderManage/WelderManage.aspx.cs index 579b858..c96d124 100644 --- a/HJGL/FineUIPro.Web/WelderManage/WelderManage.aspx.cs +++ b/HJGL/FineUIPro.Web/WelderManage/WelderManage.aspx.cs @@ -379,7 +379,7 @@ namespace FineUIPro.Web.WelderManage string strSql = @"SELECT Welder.WelderId, Welder.WelderCode, Welder.WelderName, Welder.UnitId, Welder.Birthday,(CASE WHEN Welder.Sex=1 THEN '男' ELSE '女' END) AS Sex, - Welder.IdentityCard,Welder.IdentityCard, Welder.CertificateNum, Welder.CertificateValidity, + Welder.IdentityCard, Welder.CertificateNum, Welder.CertificateValidity, Welder.WelderLevel, Welder.Remark,Unit.UnitName,Welder.IsOnDuty FROM Welder_Welder AS Welder LEFT JOIN Base_Unit AS Unit ON Unit.UnitId = Welder.UnitId WHERE 1=1 "; @@ -416,7 +416,7 @@ namespace FineUIPro.Web.WelderManage //行0 CellRangeAddress region = new CellRangeAddress(rowIndex, rowIndex, 0, 11); ws.AddMergedRegion(region); - ws.GetRow(rowIndex).GetCell(0).SetCellValue("巴斯夫(广东)一体化项目专用化学品二区\r\n焊工信息登记表"); + ws.GetRow(rowIndex).GetCell(0).SetCellValue("巴斯夫(广东)一体化丁辛醇(OXO)\r\n焊工信息登记表"); ws.GetRow(rowIndex).GetCell(0).CellStyle = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, VerticalAlignment.Center, HorizontalAlignment.Center, 16); //行1 @@ -429,7 +429,7 @@ namespace FineUIPro.Web.WelderManage ws.GetRow(rowIndex + 2).GetCell(0).SetCellValue("序号"); ws.GetRow(rowIndex + 2).GetCell(1).SetCellValue("焊工姓名"); ws.GetRow(rowIndex + 2).GetCell(2).SetCellValue("考试中心焊工号"); - ws.GetRow(rowIndex + 2).GetCell(3).SetCellValue("CC7焊工号"); + ws.GetRow(rowIndex + 2).GetCell(3).SetCellValue("CC11焊工号"); ws.GetRow(rowIndex + 2).GetCell(4).SetCellValue("身份证号"); ws.GetRow(rowIndex + 2).GetCell(5).SetCellValue("焊工证号"); ws.GetRow(rowIndex + 2).GetCell(6).SetCellValue("合格项目"); @@ -456,23 +456,26 @@ namespace FineUIPro.Web.WelderManage { num = itemWelders.Count - 1; ws = ExcelCreateRow(ws, hssfworkbook, rowIndex, rowIndex + num, style, 0, 11); - //合并单元格 - region = new CellRangeAddress(rowIndex, rowIndex + num, 0, 0); - ws.AddMergedRegion(region); - region = new CellRangeAddress(rowIndex, rowIndex + num, 1, 1); - ws.AddMergedRegion(region); - region = new CellRangeAddress(rowIndex, rowIndex + num, 2, 2); - ws.AddMergedRegion(region); - region = new CellRangeAddress(rowIndex, rowIndex + num, 3, 3); - ws.AddMergedRegion(region); - region = new CellRangeAddress(rowIndex, rowIndex + num, 4, 4); - ws.AddMergedRegion(region); - region = new CellRangeAddress(rowIndex, rowIndex + num, 5, 5); - ws.AddMergedRegion(region); - region = new CellRangeAddress(rowIndex, rowIndex + num, 10, 10); - ws.AddMergedRegion(region); - region = new CellRangeAddress(rowIndex, rowIndex + num, 11, 11); - ws.AddMergedRegion(region); + if (num > 0) + { + //合并单元格 + region = new CellRangeAddress(rowIndex, rowIndex + num, 0, 0); + ws.AddMergedRegion(region); + region = new CellRangeAddress(rowIndex, rowIndex + num, 1, 1); + ws.AddMergedRegion(region); + region = new CellRangeAddress(rowIndex, rowIndex + num, 2, 2); + ws.AddMergedRegion(region); + region = new CellRangeAddress(rowIndex, rowIndex + num, 3, 3); + ws.AddMergedRegion(region); + region = new CellRangeAddress(rowIndex, rowIndex + num, 4, 4); + ws.AddMergedRegion(region); + region = new CellRangeAddress(rowIndex, rowIndex + num, 5, 5); + ws.AddMergedRegion(region); + region = new CellRangeAddress(rowIndex, rowIndex + num, 10, 10); + ws.AddMergedRegion(region); + region = new CellRangeAddress(rowIndex, rowIndex + num, 11, 11); + ws.AddMergedRegion(region); + } int j = 0; foreach (var item in itemWelders) { diff --git a/HJGL/FineUIPro.Web/WeldingProcess/DataIn/DataIn.aspx.cs b/HJGL/FineUIPro.Web/WeldingProcess/DataIn/DataIn.aspx.cs index 6120518..9b12e2b 100644 --- a/HJGL/FineUIPro.Web/WeldingProcess/DataIn/DataIn.aspx.cs +++ b/HJGL/FineUIPro.Web/WeldingProcess/DataIn/DataIn.aspx.cs @@ -65,7 +65,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn string strSql = @"SELECT TempId,ProjectId,UserId,Time,RowNo,ToopValue,Value1,Value2,Value3,Value4,Value5,Value6,Value7, Value8,Value9,Value10,Value11,Value12,Value13,Value14,Value15,Value16,Value17,Value18,Value19, Value20,Value21,Value22,Value23,Value24,Value25,Value26,Value27,Value28,Value29,Value30,Value31, - Value32,Value33,Value34,Value35,Value36,Value37,Value38 + Value32,Value33,Value34,Value35,Value36,Value37,Value38,Value39,Value40 FROM Sys_DataInTemp WHERE UserId=@UserId"; List listStr = new List(); @@ -1194,31 +1194,8 @@ namespace FineUIPro.Web.WeldingProcess.DataIn } } - if (!string.IsNullOrEmpty(tempData.Value39)) - { - var cood = coodeList.FirstOrDefault(x => x.Coode == tempData.Value39); - if (cood == null) - { - errInfo += "Coode1:[" + tempData.Value39 + "]不存在;"; - } - else - { - weldJoint.Coode1 = cood.Coode; - } - } - - if (!string.IsNullOrEmpty(tempData.Value40)) - { - var cood = coodeList.FirstOrDefault(x => x.Coode == tempData.Value40); - if (cood == null) - { - errInfo += "Coode2:[" + tempData.Value40 + "]不存在;"; - } - else - { - weldJoint.Coode2 = cood.Coode; - } - } + weldJoint.Coode1 = tempData.Value39; + weldJoint.Coode2 = tempData.Value40; if (!string.IsNullOrEmpty(tempData.Value25)) { diff --git a/HJGL/FineUIPro.Web/WeldingProcess/DataIn/DataInEdit.aspx b/HJGL/FineUIPro.Web/WeldingProcess/DataIn/DataInEdit.aspx index 5bd46da..4352b3c 100644 --- a/HJGL/FineUIPro.Web/WeldingProcess/DataIn/DataInEdit.aspx +++ b/HJGL/FineUIPro.Web/WeldingProcess/DataIn/DataInEdit.aspx @@ -149,8 +149,6 @@ - - @@ -160,13 +158,14 @@ + + - diff --git a/HJGL/FineUIPro.Web/WeldingProcess/DataIn/DataInEdit.aspx.designer.cs b/HJGL/FineUIPro.Web/WeldingProcess/DataIn/DataInEdit.aspx.designer.cs index 9076f9b..9fa41e9 100644 --- a/HJGL/FineUIPro.Web/WeldingProcess/DataIn/DataInEdit.aspx.designer.cs +++ b/HJGL/FineUIPro.Web/WeldingProcess/DataIn/DataInEdit.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.WeldingProcess.DataIn { - - - public partial class DataInEdit { - +namespace FineUIPro.Web.WeldingProcess.DataIn +{ + + + public partial class DataInEdit + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// SimpleForm1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form SimpleForm1; - + /// /// Toolbar1 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// ToolbarFill1 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarFill ToolbarFill1; - + /// /// ckAll 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.CheckBox ckAll; - + /// /// btnSave 控件。 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSave; - + /// /// lbErrCout 控件。 /// @@ -83,7 +85,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextArea lbErrCout; - + /// /// txtValue1 控件。 /// @@ -92,7 +94,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtValue1; - + /// /// txtValue2 控件。 /// @@ -101,7 +103,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtValue2; - + /// /// txtValue3 控件。 /// @@ -110,7 +112,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtValue3; - + /// /// txtValue4 控件。 /// @@ -119,7 +121,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtValue4; - + /// /// txtValue5 控件。 /// @@ -128,7 +130,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtValue5; - + /// /// txtValue6 控件。 /// @@ -137,7 +139,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtValue6; - + /// /// txtValue7 控件。 /// @@ -146,7 +148,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtValue7; - + /// /// txtValue8 控件。 /// @@ -155,7 +157,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtValue8; - + /// /// txtValue9 控件。 /// @@ -164,7 +166,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtValue9; - + /// /// txtValue10 控件。 /// @@ -173,7 +175,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtValue10; - + /// /// txtValue11 控件。 /// @@ -182,7 +184,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtValue11; - + /// /// txtValue12 控件。 /// @@ -191,7 +193,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtValue12; - + /// /// txtValue13 控件。 /// @@ -200,7 +202,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtValue13; - + /// /// txtValue14 控件。 /// @@ -209,7 +211,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtValue14; - + /// /// txtValue15 控件。 /// @@ -218,7 +220,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtValue15; - + /// /// txtValue16 控件。 /// @@ -227,7 +229,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtValue16; - + /// /// txtValue17 控件。 /// @@ -236,7 +238,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtValue17; - + /// /// txtValue18 控件。 /// @@ -245,7 +247,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtValue18; - + /// /// txtValue19 控件。 /// @@ -254,7 +256,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtValue19; - + /// /// txtValue20 控件。 /// @@ -263,7 +265,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtValue20; - + /// /// txtValue21 控件。 /// @@ -272,7 +274,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtValue21; - + /// /// txtValue22 控件。 /// @@ -281,7 +283,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtValue22; - + /// /// txtValue23 控件。 /// @@ -290,7 +292,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtValue23; - + /// /// txtValue24 控件。 /// @@ -299,7 +301,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtValue24; - + /// /// txtValue25 控件。 /// @@ -308,7 +310,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtValue25; - + /// /// txtValue26 控件。 /// @@ -317,7 +319,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtValue26; - + /// /// txtValue27 控件。 /// @@ -326,7 +328,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtValue27; - + /// /// txtValue28 控件。 /// @@ -335,7 +337,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtValue28; - + /// /// txtValue29 控件。 /// @@ -344,7 +346,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtValue29; - + /// /// txtValue30 控件。 /// @@ -353,7 +355,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtValue30; - + /// /// txtValue31 控件。 /// @@ -362,7 +364,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtValue31; - + /// /// txtValue32 控件。 /// @@ -371,7 +373,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtValue32; - + /// /// txtValue33 控件。 /// @@ -380,7 +382,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtValue33; - + /// /// txtValue34 控件。 /// @@ -389,16 +391,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtValue34; - - /// - /// txtValue35 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtValue35; - + /// /// txtValue36 控件。 /// @@ -407,7 +400,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtValue36; - + /// /// txtValue37 控件。 /// @@ -416,7 +409,16 @@ namespace FineUIPro.Web.WeldingProcess.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtValue37; - + + /// + /// txtValue35 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtValue35; + /// /// txtValue38 控件。 /// @@ -425,7 +427,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtValue38; - + /// /// txtValue39 控件。 /// @@ -434,7 +436,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtValue39; - + /// /// txtValue40 控件。 /// diff --git a/HJGL/FineUIPro.Web/WeldingProcess/TrustManage/PointForAudit.aspx b/HJGL/FineUIPro.Web/WeldingProcess/TrustManage/PointForAudit.aspx new file mode 100644 index 0000000..9a7b3c0 --- /dev/null +++ b/HJGL/FineUIPro.Web/WeldingProcess/TrustManage/PointForAudit.aspx @@ -0,0 +1,138 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PointForAudit.aspx.cs" Inherits="FineUIPro.Web.WeldingProcess.TrustManage.PointForAudit" %> + + + + + 点口待审核 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HJGL/FineUIPro.Web/WeldingProcess/TrustManage/PointForAudit.aspx.cs b/HJGL/FineUIPro.Web/WeldingProcess/TrustManage/PointForAudit.aspx.cs new file mode 100644 index 0000000..b9ea68c --- /dev/null +++ b/HJGL/FineUIPro.Web/WeldingProcess/TrustManage/PointForAudit.aspx.cs @@ -0,0 +1,352 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Reflection; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.WeldingProcess.TrustManage +{ + public partial class PointForAudit : PageBase + { + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString(); + + BLL.Base_DetectionTypeService.InitDetectionTypeDropDownList(drpNde, "", false, ""); + drpNde.SelectedValue = "296add43-e979-4cf3-b13e-a68bb00a75d2"; // 默认RT + BindGrid(); + } + } + + private void BindGrid() + { + string strSql = @"SELECT PointBatchItemId,PointBatchId,PointBatchCode,WeldJointId,PointState,PointDate,WorkAreaCode, + WeldJointCode,JointArea,Size,WelderCode,WeldingDate,PipelineCode,PipingClassName, + (CASE WHEN IsWelderFirst=1 THEN '是' ELSE '否' END) AS IsWelderFirst, + JLAudit,GLGSAudit,QTAudit,IsPointAudit + FROM dbo.View_Batch_PointBatchItem + WHERE PointState IS NOT NULL AND TrustBatchItemId IS NULL"; + List listStr = new List(); + if (!string.IsNullOrEmpty(this.txtPipeCode.Text)) + { + strSql += " AND PipelineCode LIKE @PipelineCode"; + listStr.Add(new SqlParameter("@PipelineCode", "%" + this.txtPipeCode.Text.Trim() + "%")); + } + if (!string.IsNullOrEmpty(this.txtPointStartDate.Text)) + { + strSql += " AND PointDate >= @PointStartDate"; + listStr.Add(new SqlParameter("@PointStartDate", Convert.ToDateTime(this.txtPointStartDate.Text))); + } + if (!string.IsNullOrEmpty(this.txtPointEndDate.Text)) + { + strSql += " AND PointDate < @PointEndDate"; + listStr.Add(new SqlParameter("@PointEndDate", Convert.ToDateTime(this.txtPointEndDate.Text).AddDays(1))); + } + if (drpNoAudit.SelectedValue != "0") + { + if (drpNoAudit.SelectedValue == "1") + { + strSql += " AND JLAudit='未审核'"; + } + if (drpNoAudit.SelectedValue == "2") + { + strSql += " AND GLGSAudit='未审核'"; + } + if (drpNoAudit.SelectedValue == "3") + { + strSql += " AND QTAudit='未审核'"; + } + } + else + { + strSql += " AND (JLAudit='未审核' OR GLGSAudit='未审核' OR QTAudit='未审核')"; + } + + if (drpNde.SelectedValue != null) + { + strSql += " AND DetectionTypeId=@DetectionTypeId"; + listStr.Add(new SqlParameter("@DetectionTypeId", drpNde.SelectedValue)); + } + + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + + Grid1.RecordCount = tb.Rows.Count; + // tb = GetFilteredTable(Grid1.FilteredData, tb); + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + + #region + /// + /// 改变索引事件 + /// + /// + /// + 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 + + protected void BtnAnalyse_Click(object sender, EventArgs e) + { + BindGrid(); + } + protected void Window2_Close(object sender, WindowCloseEventArgs e) + { + this.BindGrid(); + } + protected void btnJLAudit_Click(object sender, EventArgs e) + { + if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_PointForAuditMenuId, Const.BtnJLAudit)) + { + if (Grid1.SelectedRowIndexArray.Length <= 0) + { + Alert.ShowInTop("最少选中一行!", MessageBoxIcon.Warning); + return; + } + + string userId = CurrUser.UserId; + foreach (string pointBatchItemId in Grid1.SelectedRowIDArray) + { + var pointBatchItem = BLL.Batch_PointBatchItemService.GetPointBatchItemByPointBatchItemId(pointBatchItemId); + pointBatchItem.JLAudit = userId; + BLL.Funs.DB.SubmitChanges(); + } + Alert.ShowInTop("所选项审核完成!", MessageBoxIcon.Warning); + BindGrid(); + + } + else + { + ShowNotify(Resources.Lan.NoPrivilegePrompt, MessageBoxIcon.Warning); + return; + } + } + protected void btnGLGSAudit_Click(object sender, EventArgs e) + { + if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_PointForAuditMenuId, Const.BtnGLGSAudit)) + { + if (Grid1.SelectedRowIndexArray.Length <= 0) + { + Alert.ShowInTop("最少选中一行!", MessageBoxIcon.Warning); + return; + } + + string userId = CurrUser.UserId; + foreach (string pointBatchItemId in Grid1.SelectedRowIDArray) + { + var pointBatchItem = BLL.Batch_PointBatchItemService.GetPointBatchItemByPointBatchItemId(pointBatchItemId); + pointBatchItem.GLGSAudit = userId; + BLL.Funs.DB.SubmitChanges(); + } + Alert.ShowInTop("所选项审核完成!", MessageBoxIcon.Warning); + BindGrid(); + + } + else + { + ShowNotify(Resources.Lan.NoPrivilegePrompt, MessageBoxIcon.Warning); + return; + } + } + protected void btnOtherAudit_Click(object sender, EventArgs e) + { + if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_PointForAuditMenuId, Const.BtnQTAudit)) + { + if (Grid1.SelectedRowIndexArray.Length <= 0) + { + Alert.ShowInTop("最少选中一行!", MessageBoxIcon.Warning); + return; + } + + string userId = CurrUser.UserId; + foreach (string pointBatchItemId in Grid1.SelectedRowIDArray) + { + var pointBatchItem = BLL.Batch_PointBatchItemService.GetPointBatchItemByPointBatchItemId(pointBatchItemId); + pointBatchItem.QTAudit = userId; + BLL.Funs.DB.SubmitChanges(); + } + Alert.ShowInTop("所选项审核完成!", MessageBoxIcon.Warning); + BindGrid(); + + } + else + { + ShowNotify(Resources.Lan.NoPrivilegePrompt, MessageBoxIcon.Warning); + return; + } + } + + /// + /// 手动生成委托单 + /// + /// + /// + protected void btnHandGenerate_Click(object sender, EventArgs e) + { + if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_PointManageMenuId, Const.BtnHandGenerate)) + { + List selectRow = new List(); + + foreach (string pitem in Grid1.SelectedRowIDArray) + { + selectRow.Add(pitem); + } + + if (selectRow.Count() > 0) + { + List weldMot = new List(); + List grooveType = new List(); + List IsFist = new List(); + List pointBatchIds = new List(); + string error = string.Empty; + + foreach (string pointItemId in selectRow) + { + var pointItem = BLL.Batch_PointBatchItemService.GetPointBatchItemByPointBatchItemId(pointItemId); + var jot = BLL.Pipeline_WeldJointService.GetWeldJointByWeldJointId(pointItem.WeldJointId); + weldMot.Add(jot.WeldingMethodId); + grooveType.Add(jot.GrooveTypeId); + IsFist.Add(pointItem.IsWelderFirst == true ? true : false); + pointBatchIds.Add(pointItem.PointBatchId); + } + + if (pointBatchIds.Distinct().Count() > 1) + { + error = "勾选的焊口不在一个批次中,"; + } + if (weldMot.Distinct().Count() > 1) + { + error = "勾选的焊口焊接方法不一至,"; + } + if (grooveType.Distinct().Count() > 1) + { + error = error + "勾选的焊口坡口类型不一至,"; + } + if (IsFist.Distinct().Count() > 1) + { + error = error + "勾选的焊口是否首三不一至,"; + } + + if (error == string.Empty) + { + var point = BLL.Batch_PointBatchService.GetPointBatchById(pointBatchIds[0]); + var iso = BLL.Pipeline_PipelineService.GetPipelineByPipelineId(point.PipelineId); + var project = BLL.Base_ProjectService.GetProjectByProjectId(point.ProjectId); + var unit = BLL.Base_UnitService.GetUnit(point.UnitId); + var ndt = BLL.Base_DetectionTypeService.GetDetectionTypeByDetectionTypeId(point.DetectionTypeId); + var work = BLL.Project_WorkAreaService.GetProject_WorkAreaByWorkAreaId(iso.WorkAreaId); + + Model.Batch_BatchTrust newBatchTrust = new Model.Batch_BatchTrust(); + string perfix = string.Empty; + //perfix = unit.UnitCode + "-" + ins.InstallationCode + "-GD-" + ndt.DetectionTypeCode + "-"; + perfix = ndt.DetectionTypeCode + "-" + unit.UnitCode + "-" + work.WorkAreaCode + "-PI" + "-"; + newBatchTrust.TrustBatchCode = BLL.SQLHelper.RunProcNewId("SpGetNewCode", "dbo.Batch_BatchTrust", "TrustBatchCode", project.ProjectId, perfix); + + string trustBatchId = SQLHelper.GetNewID(typeof(Model.Batch_BatchTrust)); + newBatchTrust.TrustBatchId = trustBatchId; + + newBatchTrust.TrustDate = DateTime.Now; + newBatchTrust.ProjectId = point.ProjectId; + newBatchTrust.UnitId = point.UnitId; + newBatchTrust.InstallationId = point.InstallationId; + newBatchTrust.WorkAreaId = iso.WorkAreaId; + newBatchTrust.WeldingMethodId = weldMot[0]; + newBatchTrust.GrooveTypeId = grooveType[0]; + newBatchTrust.IsWelderFirst = IsFist[0]; + newBatchTrust.DetectionTypeId = point.DetectionTypeId; + newBatchTrust.PipelineId = point.PipelineId; + + BLL.Batch_BatchTrustService.AddBatchTrust(newBatchTrust); // 新增委托单 + + // 生成委托明细,并回写点口明细信息 + string toPointBatch = string.Empty; + foreach (string pointItemId in selectRow) + { + var pointItem = BLL.Batch_PointBatchItemService.GetPointBatchItemByPointBatchItemId(pointItemId); + if (BLL.Batch_PointBatchService.GetIsGenerateTrust(pointItem.PointBatchItemId)) ////生成委托单的条件判断 + { + if (!toPointBatch.Contains(pointItem.PointBatchId)) + { + toPointBatch = toPointBatch + pointItem.PointBatchId + ","; + } + + Model.Batch_BatchTrustItem trustItem = new Model.Batch_BatchTrustItem + { + TrustBatchItemId = SQLHelper.GetNewID(typeof(Model.Batch_BatchTrustItem)), + TrustBatchId = trustBatchId, + PointBatchItemId = pointItem.PointBatchItemId, + WeldJointId = pointItem.WeldJointId, + //FilmNum = fileNum, + CreateDate = DateTime.Now + }; + Batch_BatchTrustItemService.AddBatchTrustItem(trustItem); + } + + //Model.Batch_PointBatchItem pointBatchItem = Funs.DB.Batch_PointBatchItem.FirstOrDefault(e => e.PointBatchItemId == item.PointBatchItemId); + + pointItem.IsBuildTrust = true; + Funs.DB.SubmitChanges(); + } + + // 回写委托批对应点口信息 + if (!string.IsNullOrEmpty(toPointBatch)) + { + toPointBatch = toPointBatch.Substring(0, toPointBatch.Length - 1); + var updateTrut = BLL.Batch_BatchTrustService.GetBatchTrustById(trustBatchId); + if (updateTrut != null) + { + updateTrut.TopointBatch = toPointBatch; + BLL.Batch_BatchTrustService.UpdateBatchTrust(updateTrut); + } + } + + Alert.ShowInTop("委托单已生成!", MessageBoxIcon.Success); + } + else + { + Alert.ShowInTop(error + "不能组成一个委托单!", MessageBoxIcon.Warning); + } + } + else + { + Alert.ShowInTop("请勾选要生成委托单的焊口!", MessageBoxIcon.Warning); + } + } + else + { + ShowNotify(Resources.Lan.NoPrivilegePrompt, MessageBoxIcon.Warning); + return; + } + } + } +} \ No newline at end of file diff --git a/HJGL/FineUIPro.Web/WeldingProcess/TrustManage/PointForAudit.aspx.designer.cs b/HJGL/FineUIPro.Web/WeldingProcess/TrustManage/PointForAudit.aspx.designer.cs new file mode 100644 index 0000000..95dcc3d --- /dev/null +++ b/HJGL/FineUIPro.Web/WeldingProcess/TrustManage/PointForAudit.aspx.designer.cs @@ -0,0 +1,188 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.WeldingProcess.TrustManage +{ + + + public partial class PointForAudit + { + + /// + /// 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; + + /// + /// drpNoAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpNoAudit; + + /// + /// txtPipeCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtPipeCode; + + /// + /// drpNde 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpNde; + + /// + /// txtPointStartDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtPointStartDate; + + /// + /// txtPointEndDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtPointEndDate; + + /// + /// BtnAnalyse 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button BtnAnalyse; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnJLAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnJLAudit; + + /// + /// btnGLGSAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnGLGSAudit; + + /// + /// btnOtherAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOtherAudit; + + /// + /// btnHandGenerate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnHandGenerate; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + } +} diff --git a/HJGL/FineUIPro.Web/WeldingProcess/TrustManage/PointManage.aspx b/HJGL/FineUIPro.Web/WeldingProcess/TrustManage/PointManage.aspx index 8b065f6..968c4f7 100644 --- a/HJGL/FineUIPro.Web/WeldingProcess/TrustManage/PointManage.aspx +++ b/HJGL/FineUIPro.Web/WeldingProcess/TrustManage/PointManage.aspx @@ -118,7 +118,7 @@ runat="server" OnClick="btnbtnOpenResetPoint_Click"> + ConfirmText="确定要手动关闭批中待处理焊口吗?" OnClick="btnbtnClear_Click">