using NPOI.HSSF.UserModel;
|
using System;
|
using System.IO;
|
using System.Linq;
|
|
namespace TProduct.DataFile.PumpReport
|
{
|
/// <summary>
|
/// TPump里面的V5模版(来源淄博质检所)
|
/// </summary>
|
public class TestReportFileT1 : TestReportFileExcelBase
|
{
|
public TestReportFileT1() { }
|
|
protected string _strExcelFile = null;
|
|
|
public override string Create(string strFilePath, TProduct.Model.DispStautInfo infoDelegete)
|
{
|
//初始化文件
|
var message = InitialFile(strFilePath);
|
if (!string.IsNullOrEmpty(message))
|
{
|
infoDelegete("泵数据表V1 生成失败,Error:" + message, 1);
|
return message;
|
}
|
|
this._strExcelFile = strFilePath;
|
|
try
|
{
|
using (FileStream fileStream = new FileStream(_strExcelFile, FileMode.Open, FileAccess.ReadWrite))
|
{
|
_theBookHander = new HSSFWorkbook(fileStream);
|
}
|
|
if (_theBookHander == null)
|
{
|
infoDelegete("泵数据表V1 生成失败,Error:未能打开模版Excel文件", 1);
|
return "未能打开模版Excel文件";
|
}
|
|
|
|
|
WritePage封面(infoDelegete);
|
WritePage基本信息(infoDelegete);
|
WritePage分析报告(infoDelegete);
|
WritePage性能测试数据(infoDelegete);
|
WritePage性能测试曲线(infoDelegete);
|
|
using (var fileStream = new FileStream(_strExcelFile, FileMode.Create))
|
{
|
_theBookHander.Write(fileStream);
|
}
|
}
|
catch (Exception ex)
|
{
|
infoDelegete("泵数据表V1 生成失败,Error:" + ex.Message, 1);
|
return ex.Message;
|
}
|
finally
|
{
|
//workSheet.Save();
|
//workSheet.Close();
|
//workSheet = null;
|
}
|
|
return null;
|
}
|
public override string GetTemplateFilePath()
|
{
|
return System.IO.Path.Combine(
|
TProduct.DataFolderParas.FullPath,
|
"PumpFeatReportTemplate",
|
"P_CN_T1_V1.xls");
|
}
|
|
//初始化文件
|
private string InitialFile(string strFilePath)
|
{
|
string strTemplateFile = GetTemplateFilePath();
|
if (!File.Exists(strTemplateFile))
|
{
|
return strTemplateFile + ": 模板文件被非法删除";
|
}
|
|
if (File.Exists(strFilePath))
|
{
|
File.Delete(strFilePath);
|
}
|
|
File.Copy(strTemplateFile, strFilePath, true);
|
|
|
return null;
|
}
|
|
|
|
private bool WritePage封面(TProduct.Model.DispStautInfo infoDelegete)
|
{
|
NPOI.SS.UserModel.ISheet sheet封面 = _theBookHander.GetSheetAt(0);
|
if (sheet封面 == null)
|
{
|
infoDelegete(" 生成失败,Error:未发现模版封面页", 1);
|
return false;
|
}
|
//
|
//产品名称
|
SetCellValue(sheet封面, 11, "B", this._currentPart.Name);
|
//型号
|
SetCellValue(sheet封面, 12, "B", this._currentPump.Name);
|
//产品编号
|
SetCellValue(sheet封面, 13, "B", this._currentPart.Code);
|
//测试编号
|
SetCellValue(sheet封面, 14, "B", this._testProject.Code);
|
//生产单位/受检单位
|
var manufacture_name = new BLL.ManufacturerBase().GetNameByID(this._currentPart.ManufacturerID);
|
SetCellValue(sheet封面, 16, "B", manufacture_name);
|
//送检单位/委托单位
|
var sender_name = new BLL.Senderbase().GetNameByID(this._currentPart.SenderID);
|
SetCellValue(sheet封面, 17, "B", sender_name);
|
|
|
|
|
|
sheet封面.ForceFormulaRecalculation = true;
|
|
return true;
|
}
|
|
|
private bool WritePage基本信息(TProduct.Model.DispStautInfo infoDelegete)
|
{
|
NPOI.SS.UserModel.ISheet sheet基本信息 = _theBookHander.GetSheetAt(2);
|
if (sheet基本信息 == null)
|
{
|
infoDelegete(" 生成失败,Error:未发现模版基本信息页", 1);
|
return false;
|
}
|
|
//产品名称
|
SetCellValue(sheet基本信息, 4, "B", this._currentPart.Name);
|
//型号
|
SetCellValue(sheet基本信息, 4, "E", this._currentPump.Name);
|
|
//生产单位/受检单位
|
var manufacture_name = new BLL.ManufacturerBase().GetNameByID(this._currentPart.ManufacturerID);
|
SetCellValue(sheet基本信息, 6, "B", manufacture_name);
|
//送检单位/委托单位
|
var sender_name = new BLL.Senderbase().GetNameByID(this._currentPart.SenderID);
|
SetCellValue(sheet基本信息, 11, "B", sender_name);
|
|
//产品编号
|
SetCellValue(sheet基本信息, 10, "E", this._currentPart.Code);
|
//测试编号
|
SetCellValue(sheet基本信息, 11, "E", this._testProject.Code);
|
//生产日期
|
SetCellValue(sheet基本信息, 12, "E", this._currentPart.ManufactureTime);
|
//送检日期
|
SetCellValue(sheet基本信息, 14, "E", this._testProject.CreateTime.ToString("yyyy-MM-dd"));
|
|
|
|
sheet基本信息.ForceFormulaRecalculation = true;
|
|
return true;
|
}
|
|
|
private bool WritePage分析报告(TProduct.Model.DispStautInfo infoDelegete)
|
{
|
NPOI.SS.UserModel.ISheet sheet分析报告 = _theBookHander.GetSheetAt(3);
|
if (sheet分析报告 == null)
|
{
|
infoDelegete(" 生成失败,Error:未发现模版分析报告页", 1);
|
return false;
|
}
|
|
//报告编号
|
SetCellValue(sheet分析报告, 2, "B", this._testProject.ReportFileNO);
|
//型号
|
SetCellValue(sheet分析报告, 3, "B", this._currentPump.Name);
|
|
//测试编号
|
SetCellValue(sheet分析报告, 3, "G", this._testProject.Code);
|
|
|
//生产单位/受检单位
|
var manufacture_name = new BLL.ManufacturerBase().GetNameByID(this._currentPart.ManufacturerID);
|
SetCellValue(sheet分析报告, 3, "L", manufacture_name);
|
|
|
//试验日期
|
SetCellValue(sheet分析报告, 4, "L", this._testProject.CreateTime.ToString("yyyy-MM-dd"));
|
|
if (this._allMonitorPoints != null)
|
{
|
//double bwj = 0;
|
var mp_inlet = this._allMonitorPoints.Find(x => x.MonitorType == Model.eMonitorType.压力 && x.Property == TProduct.Model.MonitorTypeProperty.进口);
|
//if (mp_inlet != null)
|
//{
|
// if (mp_inlet.PipeDia.HasValue)
|
// {
|
// SetCellValue(sheet分析报告, 9, "D", mp_inlet.PipeDia.Value);
|
// }
|
// if (mp_inlet.Elevation.HasValue)
|
// bwj = bwj - mp_inlet.Elevation.Value;
|
//}
|
|
var mp_outlet = this._allMonitorPoints.Find(x => x.MonitorType == Model.eMonitorType.压力 && x.Property == TProduct.Model.MonitorTypeProperty.出口);
|
//if (mp_outlet != null)
|
//{
|
// if (mp_outlet.PipeDia.HasValue)
|
// {
|
// SetCellValue(sheet分析报告, 9, "M", mp_outlet.PipeDia.Value);
|
// }
|
// if (mp_outlet.Elevation.HasValue)
|
// bwj = bwj + mp_outlet.Elevation.Value;
|
//}
|
|
////进口压力表至进口压力表距离
|
//SetCellValue(sheet分析报告, 10, "M", bwj);
|
|
//基准高差
|
SetCellValue(sheet分析报告, 10, "D", this._ratedParas.NpshGaoChaZd);
|
|
//叶轮外径 (mm)
|
if (this._currentPump.D2 != null && this._currentPump.D2 > 0)
|
{
|
SetCellValue(sheet分析报告, 11, "D", this._currentPump.D2.Value);
|
}
|
|
//大气压力 (kPa)
|
var setting = new TProduct.Model.WorkBenchSetting4Pump(this._workBench.TestSetting);
|
SetCellValue(sheet分析报告, 12, "D", setting.AtmosphericPressure);
|
|
}
|
if (_currentMotor != null)
|
{
|
var ratedParasMotor = TProduct.Model.RatedParas4Motor.ToModel(_currentMotor.RatedParas);
|
if (ratedParasMotor.E_Self > 0)
|
{
|
SetCellValue(sheet分析报告, 11, "M", ratedParasMotor.E_Self);
|
}
|
SetCellValue(sheet分析报告, 13, "D", _currentMotor.Name);
|
}
|
if (_testParas != null)
|
{//介质温度
|
SetCellValue(sheet分析报告, 12, "M", _testParas.JzWenDu);
|
}
|
|
if (this._ratedParas != null)
|
{
|
SetCellValue(sheet分析报告, 17, "A", _ratedParas.Q);
|
SetCellValue(sheet分析报告, 17, "D", _ratedParas.H);
|
if (this._currentPump.Ratedn.HasValue)
|
SetCellValue(sheet分析报告, 17, "F", this._currentPump.Ratedn.Value);
|
SetCellValue(sheet分析报告, 17, "J", _ratedParas.E);
|
SetCellValue(sheet分析报告, 17, "H", _ratedParas.P);
|
if (_ratedParas.NPSHr.HasValue && _ratedParas.NPSHr > 0)
|
SetCellValue(sheet分析报告, 17, "M", _ratedParas.NPSHr.Value);
|
}
|
|
//实测性能
|
if (_testJudgeResults != null && _testJudgeResults.Count > 0)
|
{
|
var judge_flow = this._testJudgeResults.Find(x => x.TargeType == TProduct.Model.eTestJudgeTargetType.流量);
|
var judge_head = this._testJudgeResults.Find(x => x.TargeType == TProduct.Model.eTestJudgeTargetType.扬程);
|
|
SetCellValue(sheet分析报告, 22, "A", Math.Round(judge_flow.JudgeValue, 2));
|
|
SetCellValue(sheet分析报告, 22, "D", Math.Round(judge_head.JudgeValue, 2));
|
if (this._currentPump.Ratedn.HasValue)
|
SetCellValue(sheet分析报告, 22, "F", this._currentPump.Ratedn.Value);
|
|
|
|
|
//if (_ratedParas.NPSHr.HasValue && _ratedParas.NPSHr > 0)
|
// SetCellValue(sheet分析报告, 22, "M", _ratedParas.NPSHr.Value);
|
|
var flow_result = TProduct.Common.PumpTestJudgeHelper.ConnectFlow(_testJudgeResults);
|
SetCellValue(sheet分析报告, 26, "A", "流量");
|
SetCellValue(sheet分析报告, 26, "B", flow_result.RequestPercent);
|
SetCellValue(sheet分析报告, 26, "E", flow_result.RatedValue * flow_result.JudgeItem.ThresholdValue);
|
SetCellValue(sheet分析报告, 26, "G", flow_result.JudgeValue);
|
SetCellValue(sheet分析报告, 26, "J", flow_result.ItemJudgResultName);
|
|
var head_result = TProduct.Common.PumpTestJudgeHelper.ConnectHead(_testJudgeResults);
|
SetCellValue(sheet分析报告, 27, "A", "扬程");
|
SetCellValue(sheet分析报告, 27, "B", head_result.RequestPercent);
|
SetCellValue(sheet分析报告, 27, "E", head_result.RatedValue * head_result.JudgeItem.ThresholdValue);
|
SetCellValue(sheet分析报告, 27, "G", head_result.JudgeValue);
|
SetCellValue(sheet分析报告, 27, "J", head_result.ItemJudgResultName);
|
|
|
var eta_result = _testJudgeResults.Find(x => x.TargeType == TProduct.Model.eTestJudgeTargetType.泵效率);
|
if (eta_result != null)
|
{
|
SetCellValue(sheet分析报告, 28, "A", "效率");
|
SetCellValue(sheet分析报告, 28, "B", eta_result.RequestPercent);
|
SetCellValue(sheet分析报告, 28, "E", eta_result.RatedValue - head_result.JudgeItem.ThresholdValue);
|
SetCellValue(sheet分析报告, 28, "G", eta_result.JudgeValue);
|
SetCellValue(sheet分析报告, 28, "J", eta_result.ItemJudgResultName);
|
//var eta_j = Eventech.Common.FitCurveHelper.GetFitPointY(_curveExpressQE, Math.Round(judge_flow.JudgeValue, 2));
|
SetCellValue(sheet分析报告, 22, "J", Math.Round(eta_result.JudgeValue, 2));
|
|
|
var power = Eventech.Common.PumpParaHelper.CalculateP(Math.Round(judge_flow.JudgeValue, 2),
|
Math.Round(judge_head.JudgeValue, 2), Math.Round(eta_result.JudgeValue, 2));
|
//var power = Eventech.Common.FitCurveHelper.GetFitPointY(_curveExpressQP, Math.Round(judge_flow.JudgeValue, 2));
|
SetCellValue(sheet分析报告, 22, "H", Math.Round(power, 2));
|
|
|
}
|
|
|
|
|
if (this._testProject.JudgeResult == TProduct.Model.eTestJudgeResult.合格)
|
SetCellValue(sheet分析报告, 34, "C", "合格");
|
else
|
SetCellValue(sheet分析报告, 34, "C", "不合格");
|
|
}
|
|
//曲线分析
|
if (_curveExpressQH != null)
|
{
|
var min_flow = (from x in this._allRecords select x.CorrectPtQ).Min();
|
//最小流量点流量
|
SetCellValue(sheet分析报告, 32, "D", Math.Round(min_flow, 2));
|
|
var min_flow_head = Eventech.Common.FitCurveHelper.GetFitPointY(_curveExpressQH, Math.Round(min_flow, 2));
|
//最小流量点流量
|
SetCellValue(sheet分析报告, 32, "K", Math.Round(min_flow_head, 2));
|
|
//最高扬程(m)
|
var max_head_pt = Eventech.Common.FitCurveHelper.GetMaxPoint(_curveExpressQH, 200);
|
SetCellValue(sheet分析报告, 33, "D", Math.Round(max_head_pt.Y, 2));
|
}
|
|
|
SetCellValue(sheet分析报告, 37, "L", this._testUserName);
|
|
sheet分析报告.ForceFormulaRecalculation = true;
|
|
return true;
|
}
|
|
|
private bool WritePage性能测试数据(TProduct.Model.DispStautInfo infoDelegete)
|
{
|
NPOI.SS.UserModel.ISheet sheet性能测试数据 = _theBookHander.GetSheetAt(4);
|
if (sheet性能测试数据 == null)
|
{
|
infoDelegete(" 生成失败,Error:未发现模版 性能测试数据页", 1);
|
return false;
|
}
|
|
//报告编号
|
SetCellValue(sheet性能测试数据, 1, "B", this._testProject.ReportFileNO);
|
//设备编号
|
SetCellValue(sheet性能测试数据, 3, "B", this._currentPump.Code);
|
//产品编号
|
SetCellValue(sheet性能测试数据, 3, "E", this._currentPart.Code);
|
//型号
|
SetCellValue(sheet性能测试数据, 3, "H", this._currentPump.Name);
|
|
|
if (this._ratedParas != null)
|
{
|
SetCellValue(sheet性能测试数据, 4, "B", this._ratedParas.Q);
|
SetCellValue(sheet性能测试数据, 4, "E", this._ratedParas.H);
|
SetCellValue(sheet性能测试数据, 4, "H", this._ratedParas.E);
|
}
|
|
|
|
if (this._featTestItem.ElectricInfo != null &&
|
this._featTestItem.ElectricInfo.Ct > 0)
|
{
|
SetCellValue(sheet性能测试数据, 5, "B", this._featTestItem.ElectricInfo.Ct);
|
if (this._featTestItem.ElectricInfo.Pt > 0)
|
SetCellValue(sheet性能测试数据, 5, "E", this._featTestItem.ElectricInfo.Pt);
|
}
|
|
if (this._allMonitorPoints == null || this._allMonitorPoints.Count() == 0)
|
return false;
|
|
if (this._allRecords == null || this._allRecords.Count() == 0)
|
return false;
|
var sort_allRecords = (from x in this._allRecords orderby x.CorrectPtQ select x).ToList();
|
//序号
|
for (var index = 0; index < sort_allRecords.Count(); index++)
|
{
|
SetCellValue(sheet性能测试数据, 8 + index, "A", index + 1);
|
}
|
|
//入口压力
|
var mp_inlet = this._allMonitorPoints.Find(x => x.MonitorType == Model.eMonitorType.压力 && x.Property == TProduct.Model.MonitorTypeProperty.进口);
|
if (mp_inlet != null)
|
{
|
for (var index = 0; index < sort_allRecords.Count(); index++)
|
{
|
var rs = sort_allRecords[index].MonitorRecordList.Find(x => x.ID == mp_inlet.ID);
|
if (rs != null)
|
SetCellValue(sheet性能测试数据, 8 + index, "B", rs.Value);
|
}
|
}
|
|
//出口压力
|
var mp_outlet = this._allMonitorPoints.Find(x => x.MonitorType == Model.eMonitorType.压力 && x.Property == TProduct.Model.MonitorTypeProperty.出口);
|
if (mp_outlet != null)
|
{
|
for (var index = 0; index < sort_allRecords.Count(); index++)
|
{
|
var rs = sort_allRecords[index].MonitorRecordList.Find(x => x.ID == mp_outlet.ID);
|
if (rs != null)
|
SetCellValue(sheet性能测试数据, 8 + index, "C", rs.Value);
|
}
|
}
|
|
|
//流量
|
var mp_flow = this._allMonitorPoints.Find(x => x.MonitorType == Model.eMonitorType.流量);
|
if (mp_flow != null)
|
{
|
for (var index = 0; index < sort_allRecords.Count(); index++)
|
{
|
var rs = sort_allRecords[index].MonitorRecordList.Find(x => x.ID == mp_flow.ID);
|
if (rs != null)
|
SetCellValue(sheet性能测试数据, 8 + index, "D", rs.Value);
|
}
|
}
|
|
//转速
|
var mp_speed = this._allMonitorPoints.Find(x => x.MonitorType == Model.eMonitorType.转速);
|
if (mp_speed != null)
|
{
|
for (var index = 0; index < sort_allRecords.Count(); index++)
|
{
|
var rs = sort_allRecords[index].MonitorRecordList.Find(x => x.ID == mp_speed.ID);
|
if (rs != null)
|
SetCellValue(sheet性能测试数据, 8 + index, "E", rs.Value);
|
}
|
}
|
|
//介质温度
|
var mp_介质温度 = this._allMonitorPoints.Find(x => x.MonitorType == Model.eMonitorType.介质温度);
|
if (mp_介质温度 != null)
|
{
|
for (var index = 0; index < sort_allRecords.Count(); index++)
|
{
|
var rs = sort_allRecords[index].MonitorRecordList.Find(x => x.ID == mp_介质温度.ID);
|
if (rs != null)
|
SetCellValue(sheet性能测试数据, 8 + index, "F", rs.Value);
|
else
|
SetCellValue(sheet性能测试数据, 8 + index, "F", this._testParas.JzWenDu);
|
}
|
}
|
else
|
{
|
if (_testParas != null)
|
for (var index = 0; index < sort_allRecords.Count(); index++)
|
{
|
SetCellValue(sheet性能测试数据, 8 + index, "F", this._testParas.JzWenDu);
|
}
|
}
|
|
|
//电压
|
var mp_电压 = this._allMonitorPoints.Find(x => x.MonitorType == Model.eMonitorType.相电压 && x.Property == "B");
|
if (mp_电压 != null)
|
{
|
for (var index = 0; index < sort_allRecords.Count(); index++)
|
{
|
var rs = sort_allRecords[index].MonitorRecordList.Find(x => x.ID == mp_电压.ID);
|
if (rs != null)
|
SetCellValue(sheet性能测试数据, 8 + index, "G", rs.Value);
|
}
|
}
|
|
//电流
|
var mp_电流 = this._allMonitorPoints.Find(x => x.MonitorType == Model.eMonitorType.相电流 && x.Property == "B");
|
if (mp_电流 != null)
|
{
|
for (var index = 0; index < sort_allRecords.Count(); index++)
|
{
|
var rs = sort_allRecords[index].MonitorRecordList.Find(x => x.ID == mp_电流.ID);
|
if (rs != null)
|
SetCellValue(sheet性能测试数据, 8 + index, "H", rs.Value);
|
}
|
}
|
|
|
//功率
|
var mp_功率 = this._allMonitorPoints.Find(x => x.MonitorType == Model.eMonitorType.功率);
|
if (mp_功率 != null)
|
{
|
for (var index = 0; index < sort_allRecords.Count(); index++)
|
{
|
var rs = sort_allRecords[index].MonitorRecordList.Find(x => x.ID == mp_功率.ID);
|
if (rs != null)
|
SetCellValue(sheet性能测试数据, 8 + index, "I", Round(rs.Value, 1));
|
}
|
}
|
|
SetCellValue(sheet性能测试数据, 29, "H", this._currentPump.Ratedn.ToString());
|
//
|
for (var index = 0; index < sort_allRecords.Count(); index++)
|
{
|
SetCellValue(sheet性能测试数据, 32 + index, "A", index + 1);
|
SetCellValue(sheet性能测试数据, 32 + index, "B", sort_allRecords[index].CorrectPtQ);
|
SetCellValue(sheet性能测试数据, 32 + index, "C", "998");
|
SetCellValue(sheet性能测试数据, 32 + index, "D", sort_allRecords[index].TestPtH);
|
SetCellValue(sheet性能测试数据, 32 + index, "E", sort_allRecords[index].CorrectPtH);
|
|
SetCellValue(sheet性能测试数据, 32 + index, "G", Round(sort_allRecords[index].TestPtP, 1).ToString());
|
SetCellValue(sheet性能测试数据, 32 + index, "H", Round(sort_allRecords[index].CorrectPtP, 1).ToString());
|
|
SetCellValue(sheet性能测试数据, 32 + index, "I", sort_allRecords[index].CorrectPtE.ToString());
|
}
|
|
SetCellValue(sheet性能测试数据, 54, "H", this._testProject.CreateTime.ToString("yyyy-MM-dd"));
|
|
SetCellValue(sheet性能测试数据, 54, "B", this._testUserName);
|
|
sheet性能测试数据.ForceFormulaRecalculation = true;
|
|
return true;
|
}
|
|
private bool WritePage性能测试曲线(TProduct.Model.DispStautInfo infoDelegete)
|
{
|
NPOI.SS.UserModel.ISheet sheet性能测试曲线 = _theBookHander.GetSheetAt(5);
|
if (sheet性能测试曲线 == null)
|
{
|
infoDelegete(" 生成失败,Error:未发现模版性能测试曲线", 1);
|
return false;
|
}
|
|
//报告编号
|
SetCellValue(sheet性能测试曲线, 1, "B", this._testProject.ReportFileNO);
|
|
//试验编号
|
SetCellValue(sheet性能测试曲线, 6, "B", this._testProject.Code);
|
|
|
if (this._ratedParas != null)
|
{
|
SetCellValue(sheet性能测试曲线, 4, "B", this._ratedParas.Q);
|
SetCellValue(sheet性能测试曲线, 4, "D", this._ratedParas.H);
|
SetCellValue(sheet性能测试曲线, 4, "F", this._ratedParas.P);
|
SetCellValue(sheet性能测试曲线, 4, "H", this._currentPump.Ratedn.ToString());
|
SetCellValue(sheet性能测试曲线, 4, "J", this._ratedParas.E);
|
}
|
//实测性能
|
if (_testJudgeResults != null && _testJudgeResults.Count > 0)
|
{
|
var judge_flow = this._testJudgeResults.Find(x => x.TargeType == TProduct.Model.eTestJudgeTargetType.流量);
|
var judge_head = this._testJudgeResults.Find(x => x.TargeType == TProduct.Model.eTestJudgeTargetType.扬程);
|
|
SetCellValue(sheet性能测试曲线, 5, "B", Math.Round(judge_flow.JudgeValue, 2));
|
SetCellValue(sheet性能测试曲线, 5, "D", Math.Round(judge_head.JudgeValue, 2));
|
SetCellValue(sheet性能测试曲线, 5, "H", this._currentPump.Ratedn.ToString());
|
var judge_eta = _testJudgeResults.Find(x => x.TargeType == TProduct.Model.eTestJudgeTargetType.泵效率);
|
if (judge_eta != null)
|
{
|
SetCellValue(sheet性能测试曲线, 5, "F", Math.Round(judge_eta.JudgeValue, 2));
|
}
|
}
|
if (this._allMonitorPoints == null || this._allMonitorPoints.Count() == 0)
|
return false;
|
|
if (this._allRecords == null || this._allRecords.Count() == 0)
|
return false;
|
|
if (_featChartImage != null)
|
{
|
_featChartImage.SetDockType(PumpGraph.Picture.FeatChart.eDockType.测试报告, 769, 850);
|
var image1 = _featChartImage.CreateImage();
|
//System.Drawing.Image img = SPump.DataFile.BASE.NPIOExcelHelper.CreateNewLargeImage(image1, width, height);
|
AddImage1(sheet性能测试曲线, 8, "A", 56, "L", image1);//添加图片
|
}
|
|
|
|
SetCellValue(sheet性能测试曲线, 57, "I", this._testProject.CreateTime.ToString("yyyy-MM-dd"));
|
|
SetCellValue(sheet性能测试曲线, 57, "B", this._testUserName);
|
|
|
sheet性能测试曲线.ForceFormulaRecalculation = true;
|
|
return true;
|
}
|
|
}
|
}
|