11
This commit is contained in:
@@ -45,7 +45,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
|
||||
/// </summary>
|
||||
private DataTable GetDataTable()
|
||||
{
|
||||
string strSql = @"SELECT weldJoint.WeldJointId,weldJoint.ProjectId,ins.InstallationCode,unit.UnitName,pipeline.PipelineCode,
|
||||
string strSql = @"SELECT weldJoint.WeldJointId,weldJoint.ProjectId,ins.InstallationCode,unit.UnitName,weldJoint.PipelineId,pipeline.PipelineCode,
|
||||
(CASE WHEN weldJoint.PageNum IS NOT NULL AND weldJoint.PageNum<>'' THEN pipeline.SingleNumber+'-'+weldJoint.PageNum ELSE pipeline.SingleNumber END) AS SingleNumber,
|
||||
pipeline.DrawingsNum,CONVERT(NVARCHAR(10),weldingDaily.WeldingDate,120) AS WeldingDate,rate.DetectionRateCode,weldJoint.WeldJointCode,
|
||||
CAST(ISNULL(weldJoint.Size,0) AS REAL) AS Size,(CAST(ISNULL(weldJoint.Thickness,0) AS REAL)) AS Thickness,weldJoint.Specification,
|
||||
@@ -138,7 +138,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
|
||||
if (tb.Rows.Count > 0)
|
||||
{
|
||||
// 合计
|
||||
var distinctPipelineCode = tb.AsEnumerable().GroupBy(row => row.Field<string>("PipelineCode")).Select(group => group.First());
|
||||
var distinctPipelineCode = tb.AsEnumerable().GroupBy(row => row.Field<string>("PipelineId")).Select(group => group.First());
|
||||
var distinctWelder = tb.AsEnumerable().GroupBy(row => row.Field<string>("WelderCode")).Select(group => group.First());
|
||||
decimal sumSize = decimal.Parse(tb.Compute("sum(Size)", "").ToString());
|
||||
string weldingDate = string.Empty;
|
||||
@@ -371,7 +371,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
|
||||
var style4 = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, VerticalAlignment.Center, NPOI.SS.UserModel.HorizontalAlignment.Center, 9, 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 distinctPipelineCode = dt.AsEnumerable().GroupBy(row => row.Field<string>("PipelineId")).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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user