Explorar el Código

国标导出帧图数优化

cxs hace 1 año
padre
commit
81ad4dd964

+ 13 - 2
OTSIncAReportApp/1-UI/OTSReportExport/DataIntegration/GBData.cs

@@ -47,8 +47,9 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
         public void criterion_out(GBReport GB_Report, OTSReport_Export in_export,int Index,DataTable dev_internationalLanguage,bool gb_1,bool gb_2,bool AmericanStandard,bool GermanStandard)
         {
             //首页信息
+           
             GB_Report = new GBReport(in_export);
-            GB_Report.setResultGrid(m_otsreport_export.m_mbszclass);
+            
             GB_Report.International_language(dev_internationalLanguage);
 
 
@@ -58,9 +59,19 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
                 string resultfile = m_otsreport_export.m_ReportApp.m_rstDataMgr.ResultFilesList[i].FilePath.ToString() + "\\" + m_otsreport_export.m_ReportApp.m_rstDataMgr.ResultFilesList[i].FileName_real.ToString();
                 m_otsreport_export.m_ReportApp.m_rstDataMgr.m_ReportMgr.AddASmplMsrResultMgr(resultfile, anothername);
             }
-            OTSCLRINTERFACE.CPropParamClr clr_prop = m_otsreport_export.m_ReportApp.m_rstDataMgr.m_ReportMgr.GetPropertyParamTable();
+           
             List<string> datasourcelist = m_otsreport_export.m_ReportApp.m_conditionChoose.m_conditionData.GetComboDownListByItemName(OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE);
 
+            OTSCLRINTERFACE.CPropParamClr clr_prop = m_otsreport_export.m_ReportApp.m_rstDataMgr.m_ReportMgr.GetPropertyParamTable();
+            clr_prop.SetDataSourceList(datasourcelist);
+            clr_prop.SetDataSourceId(Index);//
+            clr_prop.SetCalTableType((int)CALCULATE_TABLE_TYPE.GB_Method1);
+            clr_prop.SetType((int)DisplayPicutureType.AnalyzeDataTable);//table
+
+            var tbl = m_otsreport_export.m_ReportApp.m_rstDataMgr.m_ReportMgr.GetAllGBFields(clr_prop);
+            GB_Report.setResultGrid(m_otsreport_export.m_mbszclass, tbl);
+
+
             if (gb_1)
             {
                 List<DataTable> GB1 = InsertReportTemplateTable_ChineseStandardABCDDS(clr_prop, datasourcelist, Index, (int)CALCULATE_TABLE_TYPE.GB_Method1);

+ 4 - 2
OTSIncAReportApp/1-UI/OTSReportExport/Template/GBTemplate.cs

@@ -274,8 +274,10 @@ namespace OTSIncAReportApp.ReportTemplate
         /// 首页部分数据插入
         /// </summary>
         /// <param name="m_mbszclass"></param>
-        public void setResultGrid(c_TemplateClass m_mbszclass)
+        public void setResultGrid(c_TemplateClass m_mbszclass, DataTable tb)
         {
+
+        
             #region 从Grid表中读取样品数据
             //------------------加载模块,获取数据-------------------------------------------------
             ResultGrid ls_resultgrid = new ResultGrid(m_otsreport_export.m_ReportApp);
@@ -294,7 +296,7 @@ namespace OTSIncAReportApp.ReportTemplate
 
             setXRLabelData(GB_dev_jcjgwj_text, str_CLJGMC);
             setXRLabelData(GB_dev_yxsj_text, str_YXSJ);
-            setXRLabelData(GB_dev_sczs_text, str_SCZS);
+            setXRLabelData(GB_dev_sczs_text, tb.Rows.Count.ToString());
             setXRLabelData(GB_dev_flfa_text, str_FLFA);
             setXRLabelData(GB_dev_yjctz_text, str_YJCTZ);
             setXRLabelData(GB_dev_scmj_text, str_SCMJ);