This commit is contained in:
李云虎 2024-05-10 16:58:44 +08:00
commit a476086ac9
29 changed files with 61 additions and 557 deletions

6
.gitignore vendored
View File

@ -5725,3 +5725,9 @@ HJGLPackFile/版本日志/HJGLDB_2024.05.02.sql
/HJGL/FineUIPro.Web/ErrLog.txt
/HJGL/FineUIPro.Web/File/Excel/20240510091749
/HJGL/FineUIPro.Web/File/Excel/20240510092516
/HJGL/FineUIPro.Web/File/Excel/20240510100957/out.xlsx
/HJGL/FineUIPro.Web/File/Excel/20240510105614
/DataBase/hjglDB_7_2024.05.10.rar
/HJGL/FineUIPro.Web/File/Excel
/HJGLPackFile/PackFile
/HJGL/.vs/HJGL/v17/.suo

View File

@ -162,7 +162,7 @@
</site>
<site name="WebApi" id="2">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="E:\湛江巴斯夫\Basf_TCC7\HJGL\WebApi" />
<virtualDirectory path="/" physicalPath="E:\MyProject\ZJ_BSF\Basf_TCC7\HJGL\WebApi" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:3862:localhost" />
@ -240,6 +240,14 @@
<binding protocol="http" bindingInformation="*:50794:localhost" />
</bindings>
</site>
<site name="FineUIPro.Web(9)" id="12">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="E:\湛江巴斯夫\Basf_TCC7\HJGL\FineUIPro.Web" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:46121:localhost" />
</bindings>
</site>
<siteDefaults>
<!-- To enable logging, please change the below attribute "enabled" to "true" -->
<logFile logFormat="W3C" directory="%AppData%\Microsoft\IISExpressLogs" enabled="false" />

Binary file not shown.

View File

@ -1,16 +0,0 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index.aspx.cs" Inherits="FineUIPro.Web.Doc.index" %>
<!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">
<div>
</div>
</form>
</body>
</html>

View File

@ -1,17 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.Doc
{
public partial class index : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}

View File

@ -1,26 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.Doc
{
public partial class index
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
}
}

View File

@ -1,16 +0,0 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index.aspx.cs" Inherits="FineUIPro.Web.Downloads.index" %>
<!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">
<div>
</div>
</form>
</body>
</html>

View File

@ -1,17 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.Downloads
{
public partial class index : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}

View File

@ -1,26 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.Downloads
{
public partial class index
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
}
}

View File

@ -1,16 +0,0 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index.aspx.cs" Inherits="FineUIPro.Web.File.index" %>
<!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">
<div>
</div>
</form>
</body>
</html>

View File

@ -1,17 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.File
{
public partial class index : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}

View File

@ -1,26 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.File
{
public partial class index
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
}
}

View File

@ -246,11 +246,8 @@
<Content Include="WelderManage\WelderManage.aspx" />
<Content Include="WelderManage\WelderManageEdit.aspx" />
<Content Include="WelderManage\WelderManageView.aspx" />
<Content Include="Doc\index.aspx" />
<Content Include="Doc\ReportViewer安装.txt" />
<Content Include="Downloads\index.aspx" />
<Content Include="Encrypt.aspx" />
<Content Include="File\index.aspx" />
<Content Include="HotProcessHard\HardFeedback.aspx" />
<Content Include="HotProcessHard\HardReport.aspx" />
<Content Include="HotProcessHard\HardReportEdit.aspx" />
@ -263,7 +260,6 @@
<Content Include="HotProcessHard\HotProessTrust.aspx" />
<Content Include="HotProcessHard\HotProessTrustEdit.aspx" />
<Content Include="HotProcessHard\HotProessTrustItemEdit.aspx" />
<Content Include="Images\index.aspx" />
<Content Include="PublicInfo\BaseInfo\Components.aspx" />
<Content Include="PublicInfo\BaseInfo\ComponentsEdit.aspx" />
<Content Include="PublicInfo\BaseInfo\ComponentsView.aspx" />
@ -354,7 +350,6 @@
<Content Include="Images\dlu.gif" />
<Content Include="Images\dlu1.gif" />
<Content Include="Images\focus.swf" />
<Content Include="Images\LoginHSSE.jpg" />
<Content Include="Images\lv-1.gif" />
<Content Include="Images\Null.jpg" />
<Content Include="Images\Null.png" />
@ -392,8 +387,6 @@
<Content Include="Report\TestReport.aspx" />
<Content Include="Report\TestReport2.aspx" />
<Content Include="Report\ReportPrint.aspx" />
<Content Include="Scripts\index.aspx" />
<Content Include="Styles\index.aspx" />
<Content Include="WeldingProcess\CheckManage\CheckManage.aspx" />
<Content Include="WeldingProcess\CheckManage\CheckManageEdit.aspx" />
<Content Include="WeldingProcess\CheckManage\CheckManageIn.aspx" />
@ -3474,20 +3467,6 @@
<Compile Include="WelderManage\WelderManageView.aspx.designer.cs">
<DependentUpon>WelderManageView.aspx</DependentUpon>
</Compile>
<Compile Include="Doc\index.aspx.cs">
<DependentUpon>index.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Doc\index.aspx.designer.cs">
<DependentUpon>index.aspx</DependentUpon>
</Compile>
<Compile Include="Downloads\index.aspx.cs">
<DependentUpon>index.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Downloads\index.aspx.designer.cs">
<DependentUpon>index.aspx</DependentUpon>
</Compile>
<Compile Include="Encrypt.aspx.cs">
<DependentUpon>Encrypt.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@ -3495,13 +3474,6 @@
<Compile Include="Encrypt.aspx.designer.cs">
<DependentUpon>Encrypt.aspx</DependentUpon>
</Compile>
<Compile Include="File\index.aspx.cs">
<DependentUpon>index.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="File\index.aspx.designer.cs">
<DependentUpon>index.aspx</DependentUpon>
</Compile>
<Compile Include="HotProcessHard\HardFeedback.aspx.cs">
<DependentUpon>HardFeedback.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@ -3586,13 +3558,6 @@
<Compile Include="HotProcessHard\HotProessTrustItemEdit.aspx.designer.cs">
<DependentUpon>HotProessTrustItemEdit.aspx</DependentUpon>
</Compile>
<Compile Include="Images\index.aspx.cs">
<DependentUpon>index.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Images\index.aspx.designer.cs">
<DependentUpon>index.aspx</DependentUpon>
</Compile>
<Compile Include="PublicInfo\BaseInfo\Components.aspx.cs">
<DependentUpon>Components.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@ -4424,20 +4389,6 @@
<DependentUpon>imageUp.ashx</DependentUpon>
</Compile>
<Compile Include="res\umeditor\net\Uploader.cs" />
<Compile Include="Scripts\index.aspx.cs">
<DependentUpon>index.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Scripts\index.aspx.designer.cs">
<DependentUpon>index.aspx</DependentUpon>
</Compile>
<Compile Include="Styles\index.aspx.cs">
<DependentUpon>index.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Styles\index.aspx.designer.cs">
<DependentUpon>index.aspx</DependentUpon>
</Compile>
<Compile Include="WeldingProcess\CheckManage\CheckManage.aspx.cs">
<DependentUpon>CheckManage.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@ -4902,6 +4853,7 @@
</ItemGroup>
<ItemGroup>
<Folder Include="App_Themes\Default\Images\" />
<Folder Include="File\" />
<Folder Include="res\js\" />
<Folder Include="upload\" />
</ItemGroup>

View File

@ -11,37 +11,5 @@
<IISExpressUseClassicPipelineMode />
<UseGlobalApplicationHostFile />
</PropertyGroup>
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<StartPageUrl>Login.aspx</StartPageUrl>
<StartAction>SpecificPage</StartAction>
<AspNetDebugging>True</AspNetDebugging>
<SilverlightDebugging>False</SilverlightDebugging>
<NativeDebugging>False</NativeDebugging>
<SQLDebugging>False</SQLDebugging>
<ExternalProgram>
</ExternalProgram>
<StartExternalURL>
</StartExternalURL>
<StartCmdLineArguments>
</StartCmdLineArguments>
<StartWorkingDirectory>
</StartWorkingDirectory>
<EnableENC>True</EnableENC>
<AlwaysStartWebServerOnDebug>False</AlwaysStartWebServerOnDebug>
<UseIIS>True</UseIIS>
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>0</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:50794/</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>
</CustomServerUrl>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
<ProjectExtensions />
</Project>

View File

@ -115,15 +115,18 @@
}
else
{
int rnum = Funs.GetRandomNum(1, jotList.Count());
int j = 1;
foreach (var g in jotList)
if (jotList.Count() > 0)
{
if (rnum == j)
int rnum = Funs.GetRandomNum(1, jotList.Count());
int j = 1;
foreach (var g in jotList)
{
BLL.Batch_PointBatchItemService.UpdatePointBatchItem(g.PointBatchItemId, "1", System.DateTime.Now, null);
if (rnum == j)
{
BLL.Batch_PointBatchItemService.UpdatePointBatchItem(g.PointBatchItemId, "1", System.DateTime.Now, null);
}
j++;
}
j++;
}
}

View File

@ -1,16 +0,0 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index.aspx.cs" Inherits="FineUIPro.Web.Images.index" %>
<!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">
<div>
</div>
</form>
</body>
</html>

View File

@ -1,17 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.Images
{
public partial class index : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}

View File

@ -1,26 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.Images
{
public partial class index
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
}
}

View File

@ -1,16 +0,0 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index.aspx.cs" Inherits="FineUIPro.Web.Scripts.index" %>
<!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">
<div>
</div>
</form>
</body>
</html>

View File

@ -1,17 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.Scripts
{
public partial class index : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}

View File

@ -1,26 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.Scripts
{
public partial class index
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
}
}

View File

@ -1,16 +0,0 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index.aspx.cs" Inherits="FineUIPro.Web.Styles.index" %>
<!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">
<div>
</div>
</form>
</body>
</html>

View File

@ -1,17 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.Styles
{
public partial class index : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}

View File

@ -1,26 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.Styles
{
public partial class index
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
}
}

View File

@ -9,7 +9,7 @@
<section name="FineUIPro" type="FineUIPro.ConfigSection, FineUIPro" requirePermission="false"/>
</configSections>
<connectionStrings>
<add name="HJGLDBConnectionString" connectionString="Data Source=.;Initial Catalog=HJGLDB_ZJBSF;uid=sa;pwd=Sh@nghai9;"/>
<add name="HJGLDBConnectionString" connectionString="Data Source=.\sql2016;Initial Catalog=HJGLDB_ZJBSF;uid=sa;pwd=1111;"/>
<!--<add name="HJGLDBConnectionString" connectionString="Data Source=.;Initial Catalog=HJGLDB;Integrated Security=True"
providerName="System.Data.SqlClient" />-->
</connectionStrings>
@ -51,7 +51,7 @@
<add path="ChartImg.axd" verb="GET,POST,HEAD" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
<add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" validate="false"/>
</httpHandlers>
<compilation debug="true" targetFramework="4.8">
<compilation debug="false" targetFramework="4.8">
<assemblies>
<!--<add assembly="Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />-->
<add assembly="System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

View File

@ -303,7 +303,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
ws.SetColumnWidth(6, (int)(6.33 * 256));
ws.SetColumnWidth(7, (int)(9.11 * 256));
ws.SetColumnWidth(8, (int)(8.33 * 256));
ws.SetColumnWidth(9, (int)(7.44 * 256));
ws.SetColumnWidth(9, (int)(8.40 * 256));
ws.SetColumnWidth(10, (int)(15.67 * 256));
ws.SetColumnWidth(11, (int)(11.67 * 256));
ws.SetColumnWidth(12, (int)(8.22 * 256));
@ -315,70 +315,12 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
ws.SetColumnWidth(18, (int)(7.89 * 256));
ws.SetColumnWidth(19, (int)(9.33 * 256));
#endregion
//#region 数据部分
//DataTable dt = GetDataTable();
//int totalCount = dt.Rows.Count;
//int pageSize = 62;
//var pageNum =
//totalCount < pageSize ? 1
// : Math.Ceiling((float)(totalCount - pageSize) / pageSize) + 1;
//var style3 = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, VerticalAlignment.Center, NPOI.SS.UserModel.HorizontalAlignment.Center, 9, false, false, "sans-serif");
//for (int i = 1; i <= pageNum; i++)
//{
// ws = ExcelCreateRow(ws, hssfworkbook, rowIndex + 3, rowIndex + 66, style3, 0, 19);
// var tIndex = 3 + rowIndex;
// var dStart = 0;
// var dEnd = 0;
// if (i == 1)
// {
// dStart = 0;
// dEnd = pageSize;
// }
// else
// {
// dStart = i == 2 ? pageSize : ((i - 2) * pageSize) + pageSize;
// dEnd = ((i - 1) * pageSize) + pageSize;
// }
// var pageTb = GetPageToTable(dt, dStart, dEnd);
// for (int j = 0; j < pageTb.Rows.Count; j++)
// {
// int dataIndex = tIndex + j;
// ws.GetRow(dataIndex).GetCell(0).SetCellValue(j + 1);
// ws.GetRow(dataIndex).GetCell(1).SetCellValue(pageTb.Rows[j]["SingleNumber"].ToString());
// ws.GetRow(dataIndex).GetCell(2).SetCellValue(pageTb.Rows[j]["DrawingsNum"].ToString());
// ws.GetRow(dataIndex).GetCell(3).SetCellValue(pageTb.Rows[j]["WeldJointCode"].ToString());
// ws.GetRow(dataIndex).GetCell(4).SetCellValue(pageTb.Rows[j]["WeldTypeCode"].ToString());
// ws.GetRow(dataIndex).GetCell(5).SetCellValue(pageTb.Rows[j]["WeldingLocationCode"].ToString());
// ws.GetRow(dataIndex).GetCell(6).SetCellValue(pageTb.Rows[j]["Size"].ToString());
// ws.GetRow(dataIndex).GetCell(7).SetCellValue(pageTb.Rows[j]["Specification"].ToString());
// ws.GetRow(dataIndex).GetCell(8).SetCellValue(pageTb.Rows[j]["WelderCode"].ToString());
// ws.GetRow(dataIndex).GetCell(9).SetCellValue(pageTb.Rows[j]["ComponentsName1"].ToString());
// ws.GetRow(dataIndex).GetCell(10).SetCellValue(pageTb.Rows[j]["MaterialCode1"].ToString());
// ws.GetRow(dataIndex).GetCell(11).SetCellValue(pageTb.Rows[j]["HeartNo1"].ToString());
// ws.GetRow(dataIndex).GetCell(12).SetCellValue(pageTb.Rows[j]["ComponentsName2"].ToString());
// ws.GetRow(dataIndex).GetCell(13).SetCellValue(pageTb.Rows[j]["MaterialCode2"].ToString());
// ws.GetRow(dataIndex).GetCell(14).SetCellValue(pageTb.Rows[j]["HeartNo2"].ToString());
// ws.GetRow(dataIndex).GetCell(15).SetCellValue(pageTb.Rows[j]["WeldingMethodName"].ToString());
// ws.GetRow(dataIndex).GetCell(16).SetCellValue("ACC");
// ws.GetRow(dataIndex).GetCell(17).SetCellValue("ACC");
// ws.GetRow(dataIndex).GetCell(18).SetCellValue(pageTb.Rows[j]["WeldingDate"].ToString());
// ws.GetRow(dataIndex).GetCell(19).SetCellValue(pageTb.Rows[j]["Remark"].ToString());
// ws.GetRow(dataIndex).Height = 10 * 20;
// }
// rowIndex += tIndex + 63;
//}
//#endregion
const int pageSize = 64;
DataTable dt = GetDataTable();
var style3 = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, VerticalAlignment.Center, NPOI.SS.UserModel.HorizontalAlignment.Center, 9, false, false, "sans-serif");
ws = ExcelCreateRow(ws, hssfworkbook, rowIndex + 3, dt.Rows.Count+3, style3, 0, 19);
ws = ExcelCreateRow(ws, hssfworkbook, rowIndex + 3, dt.Rows.Count+2, style3, 0, 19);
for (int i = 0; i < dt.Rows.Count; i++)
{
int startIndex = (i + 3);
@ -410,6 +352,34 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
}
}
if (dt.Rows.Count > 0)
{
string weldingDate = string.Empty;
if (txtStarTime.Text == txtEndTime.Text)
{
weldingDate = txtStarTime.Text;
}
else
{
weldingDate = txtStarTime.Text + "-" + txtEndTime.Text;
}
var style4 = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, VerticalAlignment.Center, NPOI.SS.UserModel.HorizontalAlignment.Center, 10, true,true, "Arial");
ws = ExcelCreateRow(ws, hssfworkbook, dt.Rows.Count + 3, dt.Rows.Count + 3, style4, 0, 19);
var distinctPipelineCode = dt.AsEnumerable().GroupBy(row => row.Field<string>("PipelineCode")).Select(group => group.First());
var distinctWelder = dt.AsEnumerable().GroupBy(row => row.Field<string>("WelderCode")).Select(group => group.First());
decimal sumSize = decimal.Parse(dt.Compute("sum(Size)", "").ToString());
ws.GetRow(dt.Rows.Count + 3).GetCell(0).SetCellValue("合计");
ws.GetRow(dt.Rows.Count + 3).GetCell(1).SetCellValue($"{distinctPipelineCode.Count().ToString()}");
ws.GetRow(dt.Rows.Count + 3).GetCell(3).SetCellValue($"{dt.Rows.Count}");
ws.GetRow(dt.Rows.Count + 3).GetCell(6).SetCellValue($"{sumSize}");
ws.GetRow(dt.Rows.Count + 3).GetCell(8).SetCellValue($"{distinctWelder.Count().ToString()}");
}
#region
IFooter footer = ws.Footer;
string str = "CC7: 监理: Worley:";
@ -420,9 +390,6 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
#endregion
#region
#endregion
ws.FitToPage = false;
ws.SetMargin(MarginType.LeftMargin, (double)1.2 / 3);
@ -459,53 +426,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
Response.End();
}
/// <summary>
/// 导出方法
/// </summary>
/// <param name="grid"></param>
/// <returns></returns>
//private string GetGridTableHtml(Grid grid)
//{
// StringBuilder sb = new StringBuilder();
// grid.PageSize = 500000;
// BindGrid();
// sb.Append("<meta http-equiv=\"content-type\" content=\"application/excel; charset=UTF-8\"/>");
// sb.Append("<table cellspacing=\"0\" rules=\"all\" border=\"1\" style=\"border-collapse:collapse;\">");
// sb.Append("<tr>");
// foreach (GridColumn column in grid.Columns)
// {
// sb.AppendFormat("<td>{0}</td>", column.HeaderText);
// }
// sb.Append("</tr>");
// foreach (GridRow row in grid.Rows)
// {
// sb.Append("<tr>");
// foreach (GridColumn column in grid.Columns)
// {
// string html = row.Values[column.ColumnIndex].ToString();
// if (column.ColumnID == "tfNumber")
// {
// html = (row.FindControl("labNumber") as AspNet.Label).Text;
// }
// if (column.ColumnID == "tfIsHotProess")
// {
// html = (row.FindControl("lblIsHotProess") as AspNet.Label).Text;
// }
// //if (column.ColumnID == "tfif_dk")
// //{
// // html = (row.FindControl("lblif_dk") as AspNet.Label).Text;
// //}
// sb.AppendFormat("<td>{0}</td>", html);
// }
// sb.Append("</tr>");
// }
// sb.Append("</table>");
// return sb.ToString();
//}
#endregion
#endregion
#region
/// <summary>

View File

@ -8,7 +8,7 @@
<IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode />
<UseGlobalApplicationHostFile />
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
<NameOfLastUsedPublishProfile>FolderProfile</NameOfLastUsedPublishProfile>
</PropertyGroup>
<ProjectExtensions>