20250618 检测单导入

This commit is contained in:
毕文静 2025-06-18 15:21:55 +08:00
parent b4792934d7
commit a742019dfd
13 changed files with 1438 additions and 1 deletions

View File

@ -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

View File

@ -3509,6 +3509,12 @@ namespace BLL
/// 试压包导入模板
/// </summary>
public const string TestPackageTemplateUrl = "File\\Excel\\DataIn\\试压包导入模版.xlsx";
/// <summary>
/// 管道焊口检测结果通知单导入模板
/// </summary>
public const string NDTBatchTemplateUrl = "File\\Excel\\DataIn\\管道焊口检测结果通知单导入模板.xlsx";
#endregion
#region

View File

@ -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);
}
}
}

View File

@ -1531,6 +1531,7 @@
<Content Include="HJGL\NDT\NDTBatch.aspx" />
<Content Include="HJGL\NDT\NDTBatchAudit.aspx" />
<Content Include="HJGL\NDT\NDTBatchEdit.aspx" />
<Content Include="HJGL\NDT\NDTBatchImport.aspx" />
<Content Include="HJGL\NDT\RepairNotice.aspx" />
<Content Include="HJGL\PersonManage\CheckerItem.aspx" />
<Content Include="HJGL\PersonManage\CheckerItemEdit.aspx" />
@ -10398,6 +10399,13 @@
<Compile Include="HJGL\NDT\NDTBatchEdit.aspx.designer.cs">
<DependentUpon>NDTBatchEdit.aspx</DependentUpon>
</Compile>
<Compile Include="HJGL\NDT\NDTBatchImport.aspx.cs">
<DependentUpon>NDTBatchImport.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="HJGL\NDT\NDTBatchImport.aspx.designer.cs">
<DependentUpon>NDTBatchImport.aspx</DependentUpon>
</Compile>
<Compile Include="HJGL\NDT\RepairNotice.aspx.cs">
<DependentUpon>RepairNotice.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>

View File

@ -229,6 +229,9 @@
IsModal="true" Width="1280px" Height="800px">
</f:Window>
<f:Menu ID="Menu1" runat="server">
<f:MenuButton ID="btnDataIn" OnClick="btnDataIn_Click" EnablePostBack="true" runat="server" Hidden="true" Icon="Add"
Text="导入">
</f:MenuButton>
<f:MenuButton ID="btnNew" OnClick="btnNew_Click" EnablePostBack="true" runat="server" Hidden="true" Icon="Add"
Text="新增">
</f:MenuButton>

View File

@ -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);
}
}
}
}

View File

@ -300,6 +300,15 @@ namespace FineUIPro.Web.HJGL.NDT {
/// </remarks>
protected global::FineUIPro.Menu Menu1;
/// <summary>
/// btnDataIn 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnDataIn;
/// <summary>
/// btnNew 控件。
/// </summary>

View File

@ -0,0 +1,151 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NDTBatchImport.aspx.cs" Inherits="FineUIPro.Web.HJGL.NDT.NDTBatchImport" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>检测结果通知单导入</title>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" OnCustomEvent="PageManager1_CustomEvent" />
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" ToolbarAlign="Right" runat="server">
<Items>
<f:FileUpload runat="server" ID="fuAttachUrl" EmptyText="选择要导入的文件" Label="选择要导入的文件"
LabelWidth="150px">
</f:FileUpload>
<f:DropDownList ID="DrpType" runat="server" Label="导入类型" Hidden="true">
<f:ListItem Text="补充导入" Value="0" />
<f:ListItem Text="更新导入" Value="1" />
</f:DropDownList>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:HiddenField ID="hdFileName" runat="server">
</f:HiddenField>
<f:Button ID="btnDownLoad" runat="server" Icon="ApplicationGo" ToolTip="下载委托单" Text="下载委托单" OnClick="btnDownLoad_Click">
</f:Button>
<%--<f:Label ID="lbVersion" runat="server" Label="当前版本:"></f:Label>--%>
<%--<f:HiddenField ID="hdTrustBatchId" runat="server"></f:HiddenField>--%>
</Items>
</f:Toolbar>
<f:Toolbar ID="Toolbar3" runat="server">
<Items>
<%--<f:TextArea runat="server" ID="txtRemark" Label="更新原因:"></f:TextArea>--%>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnAudit" Icon="ApplicationEdit" runat="server" ToolTip="审核" Text="审核" ValidateForms="SimpleForm1"
OnClick="btnAudit_Click">
</f:Button>
<f:Button ID="btnImport" Icon="ApplicationGet" runat="server" ToolTip="导入" Text="导入" ValidateForms="SimpleForm1"
OnClick="btnImport_Click">
</f:Button>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ToolTip="提交" Text="提交" ValidateForms="SimpleForm1"
OnClick="btnSave_Click">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Rows>
<f:FormRow>
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="检测记录" IsFluid="true" ForceFit="true"
EnableCollapse="false" runat="server" BoxFlex="1" DataKeyNames="NDEItemID"
AllowColumnLocking="true" EnableColumnLines="true" DataIDField="NDEItemID"
AllowSorting="true" SortField="SubmitDate" SortDirection="ASC"
IsDatabasePaging="false" PageSize="300" Height="450px">
<Columns>
<f:RowNumberField EnablePagingNumber="true" HeaderText="编号"
Width="60px" HeaderTextAlign="Center" TextAlign="Center" />
<f:TemplateField Width="220px" HeaderText="检件名称管线号" HeaderTextAlign="Center"
TextAlign="Center">
<ItemTemplate>
<asp:Label ID="Label3" runat="server" Text='<%# ConvertPipeLineCode(Eval("TrustBatchItemId")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField Width="220px" HeaderText="检件焊口号" HeaderTextAlign="Center"
TextAlign="Center">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# ConvertWeldjointNo(Eval("TrustBatchItemId")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField Width="150px" HeaderText="焊工号" HeaderTextAlign="Center"
TextAlign="Center">
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# ConvertWelderCode(Eval("TrustBatchItemId")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="130px" ColumnID="TotalFilm" DataField="TotalFilm" SortField="TotalFilm"
FieldType="String" HeaderText="检测总数" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField HeaderText="合格数" ColumnID="PassFilm"
DataField="PassFilm" SortField="PassFilm" FieldType="String" HeaderTextAlign="Center"
TextAlign="Left" Width="120px">
</f:RenderField>
<f:TemplateField Width="120px" HeaderText="是否合格" HeaderTextAlign="Center"
TextAlign="Center">
<ItemTemplate>
<asp:Label ID="Label4" runat="server" Text='<%# ConvertCheckResult(Eval("CheckResult")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="120px" ColumnID="JudgeGrade" DataField="JudgeGrade" FieldType="String"
HeaderText="评定级别" HeaderTextAlign="Center" TextAlign="Right">
</f:RenderField>
<f:TemplateField Width="150px" HeaderText="缺陷" HeaderTextAlign="Center"
TextAlign="Center" SortField="CheckDefects">
<ItemTemplate>
<asp:Label ID="lbCheckDefects" runat="server" Text='<%# ConvertCheckDefects(Eval("CheckDefects")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="200px" ColumnID="Remark" DataField="Remark" FieldType="String"
HeaderText="备注" HeaderTextAlign="Center" TextAlign="Right">
</f:RenderField>
</Columns>
</f:Grid>
</Items>
</f:FormRow>
<f:FormRow Hidden="true">
<Items>
<f:Grid ID="Grid2" ShowBorder="true" ShowHeader="false" Title="历史记录" IsFluid="true" ForceFit="true"
EnableCollapse="false" runat="server" BoxFlex="1" DataKeyNames="DesignBasisDataImportId"
AllowColumnLocking="true" EnableColumnLines="true" DataIDField="DesignBasisDataImportId"
AllowSorting="true" SortField="CreateDate" SortDirection="ASC" EnableMultiSelect="false"
IsDatabasePaging="false" AllowPaging="true" PageSize="300" EnableBigDataRowTip="false" EnableBigData="true">
<Columns>
<f:RowNumberField EnablePagingNumber="true" HeaderText="编号"
Width="60px" HeaderTextAlign="Center" TextAlign="Center" />
<f:RenderField HeaderText="名称" ColumnID="FileName"
DataField="FileName" SortField="FileName" FieldType="String" HeaderTextAlign="Center"
TextAlign="Left" Width="90px">
</f:RenderField>
<f:RenderField HeaderText="版本" ColumnID="Version"
DataField="Version" SortField="Version" FieldType="String" HeaderTextAlign="Center"
TextAlign="Left" Width="100px">
</f:RenderField>
<f:RenderField HeaderText="导入类型" ColumnID="ImportType"
DataField="ImportType" SortField="ImportType" FieldType="String" HeaderTextAlign="Center"
TextAlign="Left" Width="100px">
</f:RenderField>
<f:RenderField Width="200px" ColumnID="UserName" DataField="UserName" SortField="UserName"
FieldType="String" HeaderText="更新人" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField HeaderText="更新日期" ColumnID="CreateDate"
DataField="CreateDate" SortField="CreateDate" FieldType="String" HeaderTextAlign="Center"
TextAlign="Left" Width="90px">
</f:RenderField>
<f:RenderField Width="200px" ColumnID="Remark" DataField="Remark" FieldType="String"
HeaderText="更新原因" HeaderTextAlign="Center" TextAlign="Right">
</f:RenderField>
</Columns>
</f:Grid>
</Items>
</f:FormRow>
</Rows>
</f:Form>
</form>
</body>
</html>

View File

@ -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
/// <summary>
/// 委托单主键
/// </summary>
public string TrustBatchId
{
get
{
return (string)ViewState["TrustBatchId"];
}
set
{
ViewState["TrustBatchId"] = value;
}
}
/// <summary>
/// 上传预设的虚拟路径
/// </summary>
private string initPath = Const.ExcelUrl;//"File\\Excel\\DataIn\\";
/// <summary>
/// 错误集合
/// </summary>
public static string errorInfos = string.Empty;
/// <summary>
/// 导入数据分类NDTBatch
/// </summary>
public static string DataClassification = "NDTBatch";
public static List<HJGL_Batch_NDE> ndes = new List<HJGL_Batch_NDE>();
public static List<HJGL_Batch_NDEItem> ndeItems= new List<HJGL_Batch_NDEItem>();
public enum ButtonState { Check = 0, Import = 1, Save = 2 }
public static int State;
#endregion
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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<SqlParameter> listStr = new List<SqlParameter>();
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
/// <summary>
/// 模板下载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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")));
}
/// <summary>
/// 下载导入模板
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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的数据导入数据库
/// <summary>
/// 将Dataset的数据导入数据库
/// </summary>
/// <param name="pds">数据集</param>
/// <param name="Cols">数据集行数</param>
/// <returns></returns>
private Model.ResponeData AddDatasetToSQL(List<dynamic> pds, int count)
{
Model.ResponeData responeData = new Model.ResponeData();
List<string> result = new List<string>();
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("[检测批号]不能为空</br>");
}
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
/// <summary>
/// 审核
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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
/// <summary>
/// 导入
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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
/// <summary>
/// 提交
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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<HJGL_Batch_NDE> 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<HJGL_Batch_NDEItem> 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
}
}

View File

@ -0,0 +1,186 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.HJGL.NDT {
public partial class NDTBatchImport {
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// Toolbar2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
/// <summary>
/// fuAttachUrl 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FileUpload fuAttachUrl;
/// <summary>
/// DrpType 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList DrpType;
/// <summary>
/// hdFileName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hdFileName;
/// <summary>
/// btnDownLoad 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnDownLoad;
/// <summary>
/// Toolbar3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar3;
/// <summary>
/// btnAudit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAudit;
/// <summary>
/// btnImport 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnImport;
/// <summary>
/// btnSave 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// Grid1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Label3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label3;
/// <summary>
/// Label1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label1;
/// <summary>
/// Label2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label2;
/// <summary>
/// Label4 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label4;
/// <summary>
/// lbCheckDefects 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lbCheckDefects;
/// <summary>
/// Grid2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid2;
}
}

View File

@ -16,7 +16,6 @@
<TreeNode id="F18CFC0E-47E0-477A-9AB3-72B88D438299" Text="堆场规划" NavigateUrl="HJGL/PreDesign/YardPlanning.aspx"></TreeNode>
<TreeNode id="25DED954-10C9-47CC-99F2-C44FDE9E0A81" Text="包装管理" NavigateUrl="HJGL/PreDesign/PackagingManage.aspx"></TreeNode>
<TreeNode id="EEC0D060-C15E-4D25-B015-C2B91F735DAC" Text="车次管理" NavigateUrl="HJGL/PreDesign/TrainNumberManager.aspx"></TreeNode>
<TreeNode id="53948077-B51D-4FF3-BFB0-AB4E27C42875" Text="排产计划" NavigateUrl="HJGL/PreDesign/ProductionSchedulingPlan.aspx"></TreeNode>
<TreeNode id="BD9C587E-17C2-49F1-82AE-A05117E41D89" Text="安装清单" NavigateUrl="HJGL/PreDesign/InstallList.aspx"></TreeNode>
<TreeNode id="53948077-B51D-4FF3-BFB0-AB4E27C42875" Text="排产计划" NavigateUrl="HJGL/PreDesign/ProductionSchedulingPlan.aspx"></TreeNode>
</TreeNode>

View File

@ -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<int> _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<int> 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<System.DateTime> _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")]