diff --git a/DataBase/版本日志/SGGLDB_V2025-06-18-001_bwj.sql b/DataBase/版本日志/SGGLDB_V2025-06-18-001_bwj.sql new file mode 100644 index 00000000..98e86ecc --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2025-06-18-001_bwj.sql @@ -0,0 +1,90 @@ +ALTER VIEW [dbo].[View_Batch_BatchTrust] +AS +/********ί********/ +SELECT BatchTrust.TrustBatchId, +BatchTrust.TrustBatchCode, +(CASE WHEN BatchTrust.TrustType='1' THEN BatchTrust.TrustBatchCode + WHEN BatchTrust.TrustType='2' THEN BatchTrust.TrustBatchCode+'K1' + WHEN BatchTrust.TrustType='3' THEN BatchTrust.TrustBatchCode+'R1' END) AS NewTrustBatchCode, +BatchTrust.TrustDate, +BatchTrust.NDEUnit, +BatchTrust.ProjectId, +project.ProjectCode, +project.ProjectName, +BatchTrust.UnitId, +BatchTrust.UnitWorkId, +BatchTrust.TrustType, +BatchTrust.DetectionTypeId, +BatchTrust.DetectionRateId, +BatchTrust.IsCheck, +BatchTrust.IsAudit, +BatchTrust.TopointBatch, +BatchTrust.PointBatchId, +Unit.UnitCode, +Unit.UnitName, +UnitWork.UnitWorkCode, +UnitWork.UnitWorkName, +DetectionType.DetectionTypeCode, +detectionRate.DetectionRateValue, +ndtCheck.TrustBatchId AS CheckTrustBatchId +FROM dbo.HJGL_Batch_BatchTrust AS BatchTrust +LEFT JOIN Base_Unit AS Unit ON Unit.UnitId=BatchTrust.UnitId +LEFT JOIN WBS_UnitWork AS UnitWork ON UnitWork.UnitWorkId=BatchTrust.UnitWorkId +LEFT JOIN Base_DetectionType AS DetectionType ON DetectionType.DetectionTypeId=BatchTrust.DetectionTypeId +LEFT JOIN dbo.Base_Project project ON project.ProjectId = BatchTrust.ProjectId +LEFT JOIN dbo.HJGL_Batch_NDE ndtCheck ON ndtCheck.TrustBatchId = BatchTrust.TrustBatchId +left join Base_DetectionRate detectionRate on detectionRate.DetectionRateId = BatchTrust.DetectionRateId +go + + +ALTER VIEW [dbo].[View_Batch_BatchTrustItem] +AS +/********ί********/ +SELECT +ROW_NUMBER() OVER(ORDER BY WeldJointCode) AS Number, +BatchTrustItem.TrustBatchItemId, +BatchTrustItem.TrustBatchId, +BatchTrustItem.PointBatchItemId, +BatchTrustItem.WeldJointId, +BatchTrustItem.CreateDate, +BatchTrustItem.TrustNum, +BatchTrust.TrustType, +BatchTrustItem.RepairNum, +BatchTrust.TrustBatchCode, --ίе +BatchTrust.ProjectId, +BatchTrust.UnitWorkId, +UnitWork.UnitWorkCode, --λ +pipe.PipelineCode, --ߺ +pipingClass.PipingClassCode, --ߵȼ +jot.WeldJointCode+isnull((select top 1 RepairMark from [dbo].[HJGL_RepairRecord] where [WeldJointId]=BatchTrustItem.WeldJointId and RepairRecordId=BatchTrustItem.RepairRecordId),'')+(case when PointBatchItem.PointState='2' then 'K' else '' end) as WeldJointCode, --ں +mat.MaterialCode, -- +jot.JointArea, -- +welder.WelderCode AS WelderCode, -- +weldType.WeldTypeCode, -- +jot.Dia, --⾶ +jot.Size, --羶 +jot.Thickness, --ں +method.WeldingMethodCode, --ӷ +rate.DetectionRateCode, +null as CheckDefects, +PointBatchItem.PointDate, -- +grooveType.GrooveTypeCode,--¿ʽ +BatchTrust.DetectionTypeId +FROM dbo.HJGL_Batch_BatchTrustItem AS BatchTrustItem +LEFT JOIN dbo.HJGL_Batch_BatchTrust AS BatchTrust ON BatchTrust.TrustBatchId=BatchTrustItem.TrustBatchId +LEFT JOIN dbo.HJGL_Batch_PointBatchItem AS PointBatchItem ON PointBatchItem.PointBatchItemId=BatchTrustItem.PointBatchItemId +LEFT JOIN dbo.HJGL_Batch_PointBatch point ON point.PointBatchId = PointBatchItem.PointBatchId +LEFT JOIN dbo.Base_DetectionRate rate ON rate.DetectionRateId = point.DetectionRateId +LEFT JOIN dbo.HJGL_WeldJoint jot ON jot.WeldJointId = BatchTrustItem.WeldJointId +LEFT JOIN dbo.HJGL_Pipeline pipe ON pipe.PipelineId = jot.PipelineId +LEFT JOIN Base_PipingClass AS pipingClass ON PipingClass.PipingClassId=pipe.PipingClassId +LEFT JOIN dbo.WBS_UnitWork UnitWork ON UnitWork.UnitWorkId = BatchTrust.UnitWorkId +LEFT JOIN dbo.Base_WeldType weldType ON weldType.WeldTypeId = jot.WeldTypeId +LEFT JOIN dbo.SitePerson_Person welder ON welder.PersonId = jot.BackingWelderId and welder.ProjectId=BatchTrust.ProjectId +LEFT JOIN dbo.Base_Material mat ON mat.MaterialId = jot.Material1Id +LEFT JOIN dbo.Base_WeldingMethod method ON method.WeldingMethodId = jot.WeldingMethodId +left join Base_GrooveType grooveType on grooveType.GrooveTypeId = jot.GrooveTypeId + +GO + + diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index a7db9083..6ac9f10e 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -3509,6 +3509,12 @@ namespace BLL /// 试压包导入模板 /// public const string TestPackageTemplateUrl = "File\\Excel\\DataIn\\试压包导入模版.xlsx"; + + /// + /// 管道焊口检测结果通知单导入模板 + /// + public const string NDTBatchTemplateUrl = "File\\Excel\\DataIn\\管道焊口检测结果通知单导入模板.xlsx"; + #endregion #region 初始化上传路径 diff --git a/SGGL/BLL/HJGL/BaseInfo/Base_DefectService.cs b/SGGL/BLL/HJGL/BaseInfo/Base_DefectService.cs index 71b646c5..29e34dde 100644 --- a/SGGL/BLL/HJGL/BaseInfo/Base_DefectService.cs +++ b/SGGL/BLL/HJGL/BaseInfo/Base_DefectService.cs @@ -213,5 +213,10 @@ namespace BLL } } #endregion + + public static Model.Base_Defect GetDefectByDefectName(string defectName) + { + return Funs.DB.Base_Defect.FirstOrDefault(e => e.DefectName == defectName); + } } } diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/管道焊口检测结果通知单导入模板.xlsx b/SGGL/FineUIPro.Web/File/Excel/DataIn/管道焊口检测结果通知单导入模板.xlsx new file mode 100644 index 00000000..609cd519 Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/DataIn/管道焊口检测结果通知单导入模板.xlsx differ diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index c3f28f23..72398c32 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -1531,6 +1531,7 @@ + @@ -10398,6 +10399,13 @@ NDTBatchEdit.aspx + + NDTBatchImport.aspx + ASPXCodeBehind + + + NDTBatchImport.aspx + RepairNotice.aspx ASPXCodeBehind diff --git a/SGGL/FineUIPro.Web/HJGL/NDT/NDTBatch.aspx b/SGGL/FineUIPro.Web/HJGL/NDT/NDTBatch.aspx index e7f6b12f..4672e66c 100644 --- a/SGGL/FineUIPro.Web/HJGL/NDT/NDTBatch.aspx +++ b/SGGL/FineUIPro.Web/HJGL/NDT/NDTBatch.aspx @@ -229,6 +229,9 @@ IsModal="true" Width="1280px" Height="800px"> + diff --git a/SGGL/FineUIPro.Web/HJGL/NDT/NDTBatch.aspx.cs b/SGGL/FineUIPro.Web/HJGL/NDT/NDTBatch.aspx.cs index 09846a9b..6320be34 100644 --- a/SGGL/FineUIPro.Web/HJGL/NDT/NDTBatch.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/NDT/NDTBatch.aspx.cs @@ -393,6 +393,7 @@ namespace FineUIPro.Web.HJGL.NDT if (buttonList.Contains(BLL.Const.BtnSave)) { this.btnEdit.Hidden = false; + this.btnDataIn.Hidden = false; } if (buttonList.Contains(BLL.Const.BtnAuditing)) { @@ -1031,5 +1032,19 @@ namespace FineUIPro.Web.HJGL.NDT InitTreeMenu(); } #endregion + + protected void btnDataIn_Click(object sender, EventArgs e) + { + if (this.tvControlItem.SelectedNode != null && this.tvControlItem.SelectedNode.CommandName == "委托单号") + { + string window = String.Format("NDTBatchImport.aspx?trustBatchId={0}", tvControlItem.SelectedNodeID, "导入 - "); + PageContext.RegisterStartupScript(Window1.GetSaveStateReference(this.hdTrustBatchId.ClientID) + + Window1.GetShowReference(window)); + } + else + { + ShowNotify("请选择委托单号!", MessageBoxIcon.Warning); + } + } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HJGL/NDT/NDTBatch.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/NDT/NDTBatch.aspx.designer.cs index ae94f6b0..e042d122 100644 --- a/SGGL/FineUIPro.Web/HJGL/NDT/NDTBatch.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HJGL/NDT/NDTBatch.aspx.designer.cs @@ -300,6 +300,15 @@ namespace FineUIPro.Web.HJGL.NDT { /// protected global::FineUIPro.Menu Menu1; + /// + /// btnDataIn 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnDataIn; + /// /// btnNew 控件。 /// diff --git a/SGGL/FineUIPro.Web/HJGL/NDT/NDTBatchImport.aspx b/SGGL/FineUIPro.Web/HJGL/NDT/NDTBatchImport.aspx new file mode 100644 index 00000000..aca92b1c --- /dev/null +++ b/SGGL/FineUIPro.Web/HJGL/NDT/NDTBatchImport.aspx @@ -0,0 +1,151 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NDTBatchImport.aspx.cs" Inherits="FineUIPro.Web.HJGL.NDT.NDTBatchImport" %> + + + + + + + 检测结果通知单导入 + + +
+ + + + + + + + + + + + + + + <%----%> + <%----%> + + + + + <%----%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/HJGL/NDT/NDTBatchImport.aspx.cs b/SGGL/FineUIPro.Web/HJGL/NDT/NDTBatchImport.aspx.cs new file mode 100644 index 00000000..b080ccd1 --- /dev/null +++ b/SGGL/FineUIPro.Web/HJGL/NDT/NDTBatchImport.aspx.cs @@ -0,0 +1,875 @@ +using BLL; +using MiniExcelLibs; +using Model; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.IO; +using System.Linq; + +namespace FineUIPro.Web.HJGL.NDT +{ + public partial class NDTBatchImport : PageBase + { + #region 定义项 + /// + /// 委托单主键 + /// + public string TrustBatchId + { + get + { + return (string)ViewState["TrustBatchId"]; + } + set + { + ViewState["TrustBatchId"] = value; + } + } + + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl;//"File\\Excel\\DataIn\\"; + + /// + /// 错误集合 + /// + public static string errorInfos = string.Empty; + /// + /// 导入数据分类(NDTBatch) + /// + public static string DataClassification = "NDTBatch"; + + public static List ndes = new List(); + public static List ndeItems= new List(); + + public enum ButtonState { Check = 0, Import = 1, Save = 2 } + + public static int State; + #endregion + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + TrustBatchId = Request.Params["trustBatchId"]; + this.hdFileName.Text = string.Empty; + errorInfos = string.Empty; + State = (int)ButtonState.Check; + if (ndeItems != null) + { + ndeItems.Clear(); + } + //lbVersion.Text = BLL.HJGL_DesignBasisDataImportService.GetNowVersionByUnitWorkId(Request.Params["UnitWorkId"], DataClassification).ToString(); + BindGrid2(); + } + } + #endregion + void BindGrid2() + { + string strSql = @" select Import.DesignBasisDataImportId + ,Import.ProjectId + ,Import.UnitWorkId + ,(Case Import.ImportType when '0' then '补充导入' + when '1' then '更新导入' end) as ImportType + ,Import.FileName + ,Import.FilePath + ,Import.DataClassification + ,Import.FileType + ,Import.FileSize + ,Import.FileId + ,Import.Version + ,Import.Remark + ,Import.CreateMan + ,Import.CreateDate + , Users.PersonName + from HJGL_DesignBasisDataImport as Import + left join Person_Persons as Users on Users.PersonId=Import.CreateMan + where Import.UnitWorkId=@UnitWorkId and Import.ProjectId=@ProjectId and Import.DataClassification=@DataClassification + order by Import.CreateDate"; + List listStr = new List(); + listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); + if (!string.IsNullOrEmpty(this.TrustBatchId)) + { + var trustBatch = BLL.Batch_BatchTrustService.GetBatchTrustById(this.TrustBatchId); + if (trustBatch!=null) + { + if (!string.IsNullOrEmpty(trustBatch.UnitWorkId)) + { + listStr.Add(new SqlParameter("@UnitWorkId", trustBatch.UnitWorkId)); + } + } + } + listStr.Add(new SqlParameter("@DataClassification", DataClassification)); + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + + // 2.获取当前分页数据 + //var table = this.GetPagedDataTable(Grid1, tb1); + Grid2.RecordCount = tb.Rows.Count; + //tb = GetFilteredTable(Grid2.FilteredData, tb); + var table = this.GetPagedDataTable(Grid2, tb); + Grid2.DataSource = table; + Grid2.DataBind(); + } + + #region 模板下载 + /// + /// 模板下载 + /// + /// + /// + protected void btnDownLoad_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Confirm.GetShowReference("确定要下载模板吗?", String.Empty, MessageBoxIcon.Question, PageManager1.GetCustomEventReference(false, "Confirm_OK"), PageManager1.GetCustomEventReference("Confirm_Cancel"))); + } + + /// + /// 下载导入模板 + /// + /// + /// + protected void PageManager1_CustomEvent(object sender, CustomEventArgs e) + { + if (e.EventArgument == "Confirm_OK") + { + //string rootPath = Server.MapPath("~/"); + //string uploadfilepath = rootPath + Const.NDTBatchTemplateUrl; + //string filePath = Const.NDTBatchTemplateUrl; + //string fileName = Path.GetFileName(filePath); + //FileInfo info = new FileInfo(uploadfilepath); + //long fileSize = info.Length; + //Response.ClearContent(); + //Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8)); + //Response.ContentType = "excel/plain"; + //Response.ContentEncoding = System.Text.Encoding.UTF8; + //Response.AddHeader("Content-Length", fileSize.ToString().Trim()); + //Response.TransmitFile(uploadfilepath, 0, fileSize); + //Response.End(); + string rootPath = Server.MapPath("~/"); + string initTemplatePath = Const.NDTBatchTemplateUrl; + string uploadfilepath = string.Empty; + string newUrl = string.Empty; + uploadfilepath = rootPath + initTemplatePath; + + var batchTrust = (from x in Funs.DB.View_Batch_BatchTrust where x.TrustBatchId == TrustBatchId select x).FirstOrDefault(); + + var batchTrustItemLists = (from x in Funs.DB.View_Batch_BatchTrustItem + where x.TrustBatchId == TrustBatchId + select x); + if (batchTrustItemLists != null) + { + newUrl = uploadfilepath.Replace("管道焊口检测结果通知单导入模板", "管道焊口检测结果通知单(" + DateTime.Now.ToString("yyyyMMdd") + ")"); + if (File.Exists(newUrl)) + { + File.Delete(newUrl); + } + 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); + //workbook = new NPOI.HSSF.UserModel.HSSFWorkbook(stream); + } + // 创建单元格样式 + NPOI.SS.UserModel.ICellStyle cellStyle = workbook.CreateCellStyle(); + cellStyle.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyle.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyle.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; + cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; + cellStyle.WrapText = true;//自动换行 + var font = workbook.CreateFont(); + font.FontHeightInPoints = 10; + cellStyle.SetFont(font); + + // 第二步:创建新数据行 + NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0); + NPOI.SS.UserModel.IRow row = sheet.GetRow(0); + NPOI.SS.UserModel.ICell cell; + + // 添加数据 + cell = row.CreateCell(7); + cell.CellStyle = cellStyle; + cell.SetCellValue(batchTrust.ProjectName);//工程名称 + + NPOI.SS.UserModel.IRow row1 = sheet.GetRow(1); + cell = row1.CreateCell(7); + cell.CellStyle = cellStyle; + cell.SetCellValue(batchTrust.UnitWorkName);// 单位工程名称 + + NPOI.SS.UserModel.IRow row2 = sheet.GetRow(2); + cell = row2.CreateCell(3); + cell.CellStyle = cellStyle; + cell.SetCellValue(batchTrust.UnitName);//委托单位 + + cell = row2.CreateCell(7); + cell.CellStyle = cellStyle; + cell.SetCellValue(batchTrust.TrustBatchCode);//委托单号 + + NPOI.SS.UserModel.IRow row3 = sheet.GetRow(3); + cell = row3.CreateCell(3); + cell.CellStyle = cellStyle; + cell.SetCellValue("焊后");//检测时机 + + cell = row3.CreateCell(7); + cell.CellStyle = cellStyle; + cell.SetCellValue("NB/T47013.2-2015");//检测标准 + + NPOI.SS.UserModel.IRow row4 = sheet.GetRow(4); + cell = row4.CreateCell(3); + cell.CellStyle = cellStyle; + if (!string.IsNullOrEmpty(batchTrustItemLists.FirstOrDefault().WeldingMethodCode)) + { + cell.SetCellValue(batchTrustItemLists.FirstOrDefault().WeldingMethodCode);//焊接方法 + } + + NPOI.SS.UserModel.IRow row5 = sheet.GetRow(5); + cell = row5.CreateCell(1); + cell.CellStyle = cellStyle; + cell.SetCellValue(batchTrust.DetectionTypeCode);//检测方法 + + cell = row5.CreateCell(3); + cell.CellStyle = cellStyle; + if (!string.IsNullOrEmpty(batchTrustItemLists.FirstOrDefault().GrooveTypeCode)) + { + cell.SetCellValue(batchTrustItemLists.FirstOrDefault().GrooveTypeCode);//坡口形式 + } + + cell = row5.CreateCell(7); + cell.CellStyle = cellStyle; + cell.SetCellValue(batchTrust.DetectionRateValue + "%");//检测比例 + + + int i = 9; + foreach (var item in batchTrustItemLists) + { + // 第二步:创建新数据行 + row = sheet.CreateRow(i); + // 添加数据 + cell = row.CreateCell(0); + cell.CellStyle = cellStyle; + cell.SetCellValue((i - 8).ToString());//序号 + + cell = row.CreateCell(1); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.PipelineCode.ToString());//管线号 + + cell = row.CreateCell(2); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.WeldJointCode);//焊口号 + + cell = row.CreateCell(3); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.WelderCode);//焊工号 + + cell = row.CreateCell(4); + cell.CellStyle = cellStyle; + cell.SetCellValue("");//检测总数 + + cell = row.CreateCell(5); + cell.CellStyle = cellStyle; + cell.SetCellValue("");//合格数 + + cell = row.CreateCell(6); + cell.CellStyle = cellStyle; + cell.SetCellValue("");//是否合格 + + cell = row.CreateCell(7); + cell.CellStyle = cellStyle; + cell.SetCellValue("");//评定级别 + + cell = row.CreateCell(8); + cell.CellStyle = cellStyle; + cell.SetCellValue("");//缺陷 + + cell = row.CreateCell(9); + cell.CellStyle = cellStyle; + cell.SetCellValue("");//返修位置 + + cell = row.CreateCell(10); + cell.CellStyle = cellStyle; + cell.SetCellValue("");//备注 + i++; + } + // 第三步:写入文件流 + 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); + } + } + } + #endregion + #region 将Dataset的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集行数 + /// + private Model.ResponeData AddDatasetToSQL(List pds, int count) + { + Model.ResponeData responeData = new Model.ResponeData(); + List result = new List(); + + if (count < 9) + { + responeData.code = 0; + responeData.message = "导入Excel格式错误!Excel只有" + count.ToString().Trim() + "列"; + return responeData; + } + if (pds.Count > 0 && pds != null) + { + string NDEId = string.Empty; + //string unitworkId = string.Empty; + //unitworkId = Request.Params["UnitWorkId"]; + //var batchTrusts = from x in Funs.DB.View_Batch_BatchTrust where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == unitworkId select x; + //var batchTrustItemLists = from x in Funs.DB.View_Batch_BatchTrustItem where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == Request.Params["UnitWorkId"] select x; + var defects = from x in Funs.DB.Base_Defect select x;//缺陷 + var checkUnits = from x in Funs.DB.Base_Unit + join y in Funs.DB.Project_ProjectUnit on x.UnitId equals y.UnitId + where y.ProjectId == this.CurrUser.LoginProjectId + && y.UnitType == BLL.Const.ProjectUnitType_5 + select x;//检测单位 + + //var trustUnits = from x in Funs.DB.Base_Unit + // join y in Funs.DB.Project_ProjectUnit on x.UnitId equals y.UnitId + // where y.ProjectId == this.CurrUser.LoginProjectId + // && y.UnitType == BLL.Const.ProjectUnitType_2 + // select x;//委托单位 + + //string trustBatchId = batchTrustItemLists.FirstOrDefault().TrustBatchId; + var batchNDE = from x in Funs.DB.HJGL_Batch_NDE where x.TrustBatchId == this.TrustBatchId select x; + if (batchNDE.Count() == 0) + { + var batchTrust = BLL.Batch_BatchTrustService.GetBatchTrustViewById(this.TrustBatchId); + if (batchTrust != null) + { + HJGL_Batch_NDE nde = new HJGL_Batch_NDE(); + nde.NDEID = SQLHelper.GetNewID(typeof(Model.HJGL_Batch_NDE)); + NDEId = nde.NDEID; + nde.TrustBatchId = this.TrustBatchId; + nde.ProjectId = this.CurrUser.LoginProjectId; + nde.UnitId = batchTrust.UnitId; + nde.UnitWorkId = batchTrust.UnitWorkId; + + if (pds[2].B != null && !string.IsNullOrEmpty(pds[2].B.ToString())) + { + string checkUnitName = pds[2].B.ToString(); + var checkUnit = checkUnits.FirstOrDefault(x => x.UnitName == checkUnitName); + if (checkUnit == null) + { + result.Add("检测单位[" + checkUnitName + "]不存在"); + } + else + { + nde.NDEUnit = checkUnit.UnitId; + } + } + if (pds[3].B == null || string.IsNullOrEmpty(pds[3].B.ToString())) + { + result.Add("[检测批号]不能为空
"); + } + else + { + nde.NDECode = pds[3].B.ToString(); + } + if (!string.IsNullOrEmpty(pds[6].C.ToString()) && pds[6].C != null) + { + try + { + nde.NDEDate = Funs.GetNewDateTime(pds[6].C.ToString()); + if (nde.NDEDate == null) + { + result.Add("检测日期[" + pds[6].C.ToString() + "]格式错误"); + } + } + catch (Exception) + { + result.Add("检测日期[" + pds[6].C.ToString() + "]格式错误"); + } + } + ndes.Add(nde); + } + + for (int i = 9; i < pds.Count; i++) + { + HJGL_Batch_NDEItem item = new HJGL_Batch_NDEItem(); + item.NDEItemID = SQLHelper.GetNewID(typeof(Model.HJGL_Batch_NDEItem)); + item.NDEID = NDEId; + var batchTrustItems = BLL.Batch_BatchTrustItemService.GetViewBatchTrustItem(this.TrustBatchId); + if (batchTrustItems != null) + { + var trustItem = batchTrustItems.FirstOrDefault(x => x.PipelineCode == pds[i].B.ToString() && x.WeldJointCode == pds[i].C.ToString()); + if (trustItem != null) + { + item.TrustBatchItemId = trustItem.TrustBatchItemId; + item.DetectionTypeId = trustItem.DetectionTypeId; + + //检测总数 + if (pds[i].E != null && !string.IsNullOrEmpty(pds[i].E.ToString())) + { + try + { + item.TotalFilm = Funs.GetNewInt(pds[i].E.ToString()); + if (item.TotalFilm == null) + { + result.Add("检测总数[" + pds[i].E.ToString() + "]格式错误"); + } + } + catch (Exception) + { + result.Add("检测总数[" + pds[i].E.ToString() + "]格式错误"); + } + } + //合格数 + if (pds[i].F != null && !string.IsNullOrEmpty(pds[i].F.ToString())) + { + try + { + item.PassFilm = Funs.GetNewInt(pds[i].F.ToString()); + if (item.PassFilm == null) + { + result.Add("合格数[" + pds[i].F.ToString() + "]格式错误"); + } + } + catch (Exception) + { + result.Add("合格数[" + pds[i].F.ToString() + "]格式错误"); + } + } + //是否合格 + if (pds[i].G != null && !string.IsNullOrEmpty(pds[i].G.ToString())) + { + if (pds[i].G.ToString() == "合格" || pds[i].G.ToString() == "不合格") + { + item.CheckResult = pds[i].G.ToString() == "合格" ? "1" : "2"; + } + else + { + result.Add("是否合格[" + pds[i].G.ToString() + "]格式错误"); + } + } + //评定级别 + if (pds[i].H != null && !string.IsNullOrEmpty(pds[i].H.ToString())) + { + string gudgeGrade = pds[i].H.ToString(); + if (gudgeGrade != "Ⅰ" && gudgeGrade != "Ⅱ" && gudgeGrade != "Ⅲ" && gudgeGrade != "Ⅳ" && gudgeGrade != "Ⅴ") + { + result.Add("评定级别" + gudgeGrade + "错误"); + } + else + { + item.JudgeGrade = gudgeGrade; + } + } + //缺陷 + if (pds[i].I != null && !string.IsNullOrEmpty(pds[i].I.ToString())) + { + string checkDefects = pds[i].I.ToString(); + string defectIds = string.Empty; + string[] lists = checkDefects.Split(','); + foreach (var j in lists) + { + var u = defects.Where(x => x.DefectName == j.Trim()).FirstOrDefault(); + if (u == null) + { + result.Add("缺陷" + j.Trim() + "不存在"); + } + else + { + var q = BLL.Base_DefectService.GetDefectByDefectName(u.DefectName); + defectIds += q.DefectId + ","; + } + } + if (!string.IsNullOrEmpty(defectIds)) + { + defectIds = defectIds.Substring(0, defectIds.LastIndexOf(",")); + item.CheckDefects = defectIds; + } + } + //返修位置 + if (pds[i].J != null && !string.IsNullOrEmpty(pds[i].J.ToString())) + { + item.RepairLocation = pds[i].J.ToString(); + } + if (pds[i].K != null && !string.IsNullOrEmpty(pds[i].K.ToString())) + { + item.Remark = pds[i].K.ToString(); + } + //报告日期 + if (pds[6].H != null && !string.IsNullOrEmpty(pds[6].H.ToString())) + { + try + { + item.ReportDate = Funs.GetNewDateTime(pds[6].H.ToString()); + if (item.ReportDate == null) + { + result.Add("报告日期" + pds[6].H.ToString() + "格式错误"); + } + } + catch (Exception) + { + result.Add("报告日期" + pds[6].H.ToString() + "格式错误"); + } + } + } + else + { + result.Add("管线[" + pds[i].B.ToString() + "]焊口[" + pds[i].C.ToString() + "]" + "不存在该委托单中"); + } + //var model = ndeItems.Where(x => x.TrustBatchItemId == item.TrustBatchItemId); + //if (model.Count() == 0) + //{ + item.SubmitDate = DateTime.Now; + ndeItems.Add(item); + //} + // } + } + #region 数据验证和赋值 + + #endregion + } + } + else + { + result.Add("该委托单已检测"); + } + + if (result.Count > 0) + { + ndeItems.Clear(); + errorInfos = string.Join("|", result.Distinct()); + responeData.code = 0; + responeData.message = errorInfos; + } + else + { + errorInfos = string.Empty; + } + } + else + { + responeData.code = 0; + responeData.message = "导入数据为空!"; + } + return responeData; + } + #endregion + + /// + /// 审核 + /// + /// + /// + protected void btnAudit_Click(object sender, EventArgs e) + { + string message = string.Empty; + + if (this.fuAttachUrl.HasFile == false) + { + ShowNotify("请选择Excel文件!", MessageBoxIcon.Warning); + return; + } + string IsXls = Path.GetExtension(this.fuAttachUrl.FileName).ToString().Trim().ToLower(); + if (IsXls != ".xlsx") + { + ShowNotify("只能选择Excel文件!", MessageBoxIcon.Warning); + return; + } + + string rootPath = Server.MapPath("~/"); + string initFullPath = rootPath + initPath; + if (!Directory.Exists(initFullPath)) + { + Directory.CreateDirectory(initFullPath); + } + //指定上传文件名称 + this.hdFileName.Text = BLL.Funs.GetNewFileName() + IsXls; + //上传文件路径 + string filePath = initFullPath + this.hdFileName.Text; + //文件上传服务器 + this.fuAttachUrl.PostedFile.SaveAs(filePath); + //文件上传服务器后的名称 + string fileName = rootPath + initPath + this.hdFileName.Text; + //读取Excel + var ds = MiniExcel.Query(fileName).ToList(); + var columns = MiniExcel.GetColumns(fileName); + var cnt = columns.Count; + var reposedata = AddDatasetToSQL(ds, cnt); + if (reposedata.code == 1) + { + State = (int)ButtonState.Import; + ShowNotify("审核完成请点击导入"); + } + else + { + Alert alert = new Alert + { + Message = reposedata.message, + Target = Target.Self + }; + alert.Show(); + } + } + #region 导入 + /// + /// 导入 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + if (State == (int)ButtonState.Check) + { + ShowNotify("请先审核"); + return; + + } + if (string.IsNullOrEmpty(errorInfos)) + { + if (!string.IsNullOrEmpty(this.hdFileName.Text)) + { + if (ndeItems.Count > 0) + { + //this.Grid1.Hidden = false; + this.Grid1.DataSource = ndeItems; + this.Grid1.DataBind(); + Grid1.RecordCount = ndeItems.Count; + } + } + else + { + ShowNotify("请先审核要导入的文件!", MessageBoxIcon.Warning); + } + } + else + { + ShowNotify("请先将错误数据修正,再重新导入提交!", MessageBoxIcon.Warning); + } + State = (int)ButtonState.Save; + ShowNotify("数据导入成功!", MessageBoxIcon.Success); + } + #endregion + /// + /// 提交 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + if (State != (int)ButtonState.Save) + { + ShowNotify("请先审核/导入"); + return; + } + if (string.IsNullOrEmpty(errorInfos)) + { + string rootPath = Server.MapPath("~/"); + string oldefilePath = rootPath + initPath + this.hdFileName.Text; + //string unitworkId = Request.Params["UnitWorkId"]; + 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); + } + string FileName = this.fuAttachUrl.FileName; + + + //if (DrpType.SelectedValue == "1")//更新导入 + //{ + // //BLL.Batch_NDEService.DeleteNDEByUnitWorkId(unitworkId);//删除 + // AddNDE(ndes); + // AddNDEItem(ndeItems); + + // //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"; + // //hJGL_DesignBasisDataImport.DataClassification = DataClassification; + // //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.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 //补充导入 + //{ + AddNDE(ndes); + AddNDEItem(ndeItems); + + //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 = "0"; + //hJGL_DesignBasisDataImport.DataClassification = DataClassification; + //hJGL_DesignBasisDataImport.FileName = FileName; + //hJGL_DesignBasisDataImport.FilePath = filePath.Replace(rootPath, ""); ; + //hJGL_DesignBasisDataImport.FileType = BLL.HJGL_DesignBasisDataImportService.GetFileType(FileName); + //hJGL_DesignBasisDataImport.Version = BLL.HJGL_DesignBasisDataImportService.GetNowVersionByUnitWorkId(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); + //} + ShowNotify("导入成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + ShowNotify("请先将错误数据修正,再重新导入提交!", MessageBoxIcon.Warning); + } + } + + public void AddNDE(List ndeList) + { + foreach (var item in ndeList) + { + var nde = from x in Funs.DB.HJGL_Batch_NDE where x.NDEID == item.NDEID select x; + if (nde.Count() == 0 || nde == null) + { + //item.NDEID = SQLHelper.GetNewID(typeof(Model.HJGL_Batch_NDE)); + item.NDEID = item.NDEID; + BLL.Batch_NDEService.AddNDE(item); + + //更新委托中的检测状态 + var trustBatch = BLL.Batch_BatchTrustService.GetBatchTrustById(item.TrustBatchId); + if (trustBatch!=null) + { + trustBatch.IsCheck = true; + BLL.Batch_BatchTrustService.UpdatTrustBatchtState(item.TrustBatchId, trustBatch.IsCheck); + } + } + else + { + item.NDEID = item.NDEID; + BLL.Batch_NDEService.UpdateNDE(item); + } + } + } + + public void AddNDEItem(List itemList) + { + foreach (var item in itemList) + { + //var ndeItem = from x in Funs.DB.HJGL_Batch_NDEItem where x.TrustBatchItemId==item.TrustBatchItemId select x; + //if (ndeItem.Count() == 0 || ndeItem == null) + //{ + //item.NDEItemID = SQLHelper.GetNewID(typeof(Model.HJGL_Batch_NDEItem)); + BLL.Batch_NDEItemService.AddNDEItem(item); + //} + //else + //{ + // item.NDEItemID = ndeItem.First().NDEItemID; + // BLL.Batch_NDEItemService.UpdateNDEItem(item); + //} + } + } + + #region 格式化字符串 + protected string ConvertPipeLineCode(object trustBatchItemId) + { + string pipelineCode = string.Empty; + if (trustBatchItemId != null) + { + var trustBatchItem = (from x in Funs.DB.View_Batch_BatchTrustItem where x.TrustBatchItemId == trustBatchItemId.ToString() select x).FirstOrDefault(); + if (trustBatchItem!=null) + { + pipelineCode = trustBatchItem.PipelineCode; + } + } + return pipelineCode; + } + + protected string ConvertWeldjointNo(object trustBatchItemId) + { + string weldJointCode = string.Empty; + if (trustBatchItemId != null) + { + var trustBatchItem = (from x in Funs.DB.View_Batch_BatchTrustItem where x.TrustBatchItemId == trustBatchItemId.ToString() select x).FirstOrDefault(); + if (trustBatchItem != null) + { + weldJointCode = trustBatchItem.WeldJointCode; + } + } + return weldJointCode; + } + + protected string ConvertWelderCode(object trustBatchItemId) + { + string welderCode = string.Empty; + if (trustBatchItemId != null) + { + var trustBatchItem = (from x in Funs.DB.View_Batch_BatchTrustItem where x.TrustBatchItemId == trustBatchItemId.ToString() select x).FirstOrDefault(); + if (trustBatchItem != null) + { + welderCode = trustBatchItem.WelderCode; + } + } + return welderCode; + } + protected string ConvertCheckResult(object CheckResult) + { + string result = string.Empty; + if (CheckResult != null) + { + if (CheckResult.ToString()=="1") + { + result = "合格"; + } + else + { + result = "不合格"; + } + } + return result; + } + + protected string ConvertCheckDefects(object CheckDefects) + { + string str = string.Empty; + if (CheckDefects != null) + { + str = BLL.Base_DefectService.GetDefectNameStrByDefectIdStr(CheckDefects.ToString()); + } + return str; + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HJGL/NDT/NDTBatchImport.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/NDT/NDTBatchImport.aspx.designer.cs new file mode 100644 index 00000000..96709025 --- /dev/null +++ b/SGGL/FineUIPro.Web/HJGL/NDT/NDTBatchImport.aspx.designer.cs @@ -0,0 +1,186 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.HJGL.NDT { + + + public partial class NDTBatchImport { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// fuAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FileUpload fuAttachUrl; + + /// + /// DrpType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList DrpType; + + /// + /// hdFileName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdFileName; + + /// + /// btnDownLoad 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDownLoad; + + /// + /// Toolbar3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar3; + + /// + /// btnAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label3; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label1; + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label2; + + /// + /// Label4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label4; + + /// + /// lbCheckDefects 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lbCheckDefects; + + /// + /// Grid2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid2; + } +} diff --git a/SGGL/FineUIPro.Web/common/Menu_HJGL.xml b/SGGL/FineUIPro.Web/common/Menu_HJGL.xml index f01d72d1..a5d4a3cd 100644 --- a/SGGL/FineUIPro.Web/common/Menu_HJGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_HJGL.xml @@ -16,7 +16,6 @@ - diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index c626c90a..526e2fc8 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -270431,6 +270431,8 @@ namespace Model private string _ProjectCode; + private string _ProjectName; + private string _UnitId; private string _UnitWorkId; @@ -270459,6 +270461,8 @@ namespace Model private string _DetectionTypeCode; + private System.Nullable _DetectionRateValue; + private string _CheckTrustBatchId; public View_Batch_BatchTrust() @@ -270577,6 +270581,22 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectName", DbType="NVarChar(200)")] + public string ProjectName + { + get + { + return this._ProjectName; + } + set + { + if ((this._ProjectName != value)) + { + this._ProjectName = value; + } + } + } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] public string UnitId { @@ -270801,6 +270821,22 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DetectionRateValue", DbType="Int")] + public System.Nullable DetectionRateValue + { + get + { + return this._DetectionRateValue; + } + set + { + if ((this._DetectionRateValue != value)) + { + this._DetectionRateValue = value; + } + } + } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckTrustBatchId", DbType="NVarChar(50)")] public string CheckTrustBatchId { @@ -270844,6 +270880,8 @@ namespace Model private string _ProjectId; + private string _UnitWorkId; + private string _UnitWorkCode; private string _PipelineCode; @@ -270874,6 +270912,10 @@ namespace Model private System.Nullable _PointDate; + private string _GrooveTypeCode; + + private string _DetectionTypeId; + public View_Batch_BatchTrustItem() { } @@ -271054,6 +271096,22 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitWorkId", DbType="NVarChar(50)")] + public string UnitWorkId + { + get + { + return this._UnitWorkId; + } + set + { + if ((this._UnitWorkId != value)) + { + this._UnitWorkId = value; + } + } + } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitWorkCode", DbType="NVarChar(10)")] public string UnitWorkCode { @@ -271293,6 +271351,38 @@ namespace Model } } } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_GrooveTypeCode", DbType="NVarChar(50)")] + public string GrooveTypeCode + { + get + { + return this._GrooveTypeCode; + } + set + { + if ((this._GrooveTypeCode != value)) + { + this._GrooveTypeCode = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DetectionTypeId", DbType="NVarChar(50)")] + public string DetectionTypeId + { + get + { + return this._DetectionTypeId; + } + set + { + if ((this._DetectionTypeId != value)) + { + this._DetectionTypeId = value; + } + } + } } [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_Batch_NDE")]