|  | @@ -3,7 +3,9 @@ using DevExpress.Utils.Extensions;
 | 
	
		
			
				|  |  |  using NPOI.Util;
 | 
	
		
			
				|  |  |  using OTSCommon.DBOperate;
 | 
	
		
			
				|  |  |  using OTSIncAReportApp._1_UI.OTSReportExport;
 | 
	
		
			
				|  |  | +using OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration;
 | 
	
		
			
				|  |  |  using OTSIncAReportApp._1_UI.OTSTemplateDesigner;
 | 
	
		
			
				|  |  | +using OTSIncAReportApp.DataOperation.DataAccess;
 | 
	
		
			
				|  |  |  using OTSIncAReportApp.OTSSampleReportInfo;
 | 
	
		
			
				|  |  |  using OTSIncAReportApp.SysMgrTools;
 | 
	
		
			
				|  |  |  using OTSPeriodicTable;
 | 
	
	
		
			
				|  | @@ -15,6 +17,7 @@ using System.Data;
 | 
	
		
			
				|  |  |  using System.Drawing;
 | 
	
		
			
				|  |  |  using System.IO;
 | 
	
		
			
				|  |  |  using System.Windows.Forms;
 | 
	
		
			
				|  |  | +using static DevExpress.XtraCharts.GLGraphics.GL;
 | 
	
		
			
				|  |  |  using static OTSDataType.otsdataconst;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  namespace OTSIncAReportApp.OTSTemplateDesigner
 | 
	
	
		
			
				|  | @@ -31,11 +34,15 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
 | 
	
		
			
				|  |  |          private bool SwitchCategories = false;
 | 
	
		
			
				|  |  |          private List<string> TCCleannessAList = new List<string>();
 | 
	
		
			
				|  |  |          private List<string> list_MainPriority = new List<string>();
 | 
	
		
			
				|  |  | -        #endregion
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        #region 构造函数及窗体加载
 | 
	
		
			
				|  |  | +		ParticleData fielddata;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        bool isRefresh = false;
 | 
	
		
			
				|  |  | +		#endregion
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        public OTSReport_Template_CleannessA(OTSReport_Export in_otsreport_export,string a_FileName)
 | 
	
		
			
				|  |  | +		#region 构造函数及窗体加载
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +		public OTSReport_Template_CleannessA(OTSReport_Export in_otsreport_export,string a_FileName)
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  |              InitializeComponent();
 | 
	
		
			
				|  |  |              m_OTSReport_Export = in_otsreport_export;
 | 
	
	
		
			
				|  | @@ -53,7 +60,11 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
 | 
	
		
			
				|  |  |              BindControl();
 | 
	
		
			
				|  |  |              //读取默认值
 | 
	
		
			
				|  |  |              LoadControls();
 | 
	
		
			
				|  |  | -            label_StandardLibraryName.Text= table["standardlibrary"].ToString() + m_OTSReport_Export.m_mbszclass.M_SY.StandardLibraryName;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +			TableHeaderData HeaderData = new TableHeaderData();
 | 
	
		
			
				|  |  | +			DataTable data = HeaderData.GetData(m_OTSReport_Export);
 | 
	
		
			
				|  |  | +			string strResultLibraryName = data.Rows[3][1].ToString()+".db";
 | 
	
		
			
				|  |  | +			label_StandardLibraryName.Text= table["standardlibrary"].ToString() + m_OTSReport_Export.m_mbszclass.M_SY.StandardLibraryName;
 | 
	
		
			
				|  |  |              for (int i=0;i< m_OTSReport_Export.LibraryName.Count;i++)
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  |                  comboBox1.Items.Add(m_OTSReport_Export.LibraryName[i][0]);
 | 
	
	
		
			
				|  | @@ -62,24 +73,39 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              for (int i=0;i< m_OTSReport_Export.LibraryName.Count;i++)
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  | -                if (m_OTSReport_Export.m_mbszclass.M_SY.StandardLibraryName== m_OTSReport_Export.LibraryName[i][0])
 | 
	
		
			
				|  |  | +                if (strResultLibraryName == m_OTSReport_Export.LibraryName[i][0])
 | 
	
		
			
				|  |  |                  {
 | 
	
		
			
				|  |  |                      CurrentName = i;
 | 
	
		
			
				|  |  |                      break;
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | -            if (m_OTSReport_Export.m_mbszclass.M_SY.StandardLibraryName !="")
 | 
	
		
			
				|  |  | +            //if (m_OTSReport_Export.m_mbszclass.M_SY.StandardLibraryName !="")
 | 
	
		
			
				|  |  | +            //{
 | 
	
		
			
				|  |  | +            //    comboBox1.SelectedIndex = CurrentName;
 | 
	
		
			
				|  |  | +            //}
 | 
	
		
			
				|  |  | +            if (m_OTSReport_Export.m_mbszclass.M_SY.StandardLibraryName == strResultLibraryName)
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  | -                comboBox1.SelectedIndex = CurrentName;
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | +				TCCleannessAList = m_OTSReport_Export.m_mbszclass.list_str_MainPriority_Serial.Copy();
 | 
	
		
			
				|  |  | +				list_MainPriority = m_OTSReport_Export.m_mbszclass.list_str_MainPriority.Copy();
 | 
	
		
			
				|  |  | +				textBox_zypxss.Text = m_OTSReport_Export.m_mbszclass.str_MainPriority;
 | 
	
		
			
				|  |  | +				comboBox1.SelectedIndex = CurrentName;
 | 
	
		
			
				|  |  | +			}
 | 
	
		
			
				|  |  | +			
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -            if (m_OTSReport_Export.m_ReportApp.m_RptConfigFile.Systype == OTS_SysType_ID.TCCleannessA)
 | 
	
		
			
				|  |  | +			if (m_OTSReport_Export.m_ReportApp.m_RptConfigFile.Systype == OTS_SysType_ID.TCCleannessA)
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  |                  cb_TccleanlinessA.Enabled = true;
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | -            
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | +			try
 | 
	
		
			
				|  |  | +			{
 | 
	
		
			
				|  |  | +				fielddata = new ParticleData(m_OTSReport_Export.m_ReportApp.m_rstDataMgr.ResultFilesList[m_OTSReport_Export.m_ReportApp.m_rstDataMgr.GetWorkingResultId()].FilePath);
 | 
	
		
			
				|  |  | +			}
 | 
	
		
			
				|  |  | +			catch
 | 
	
		
			
				|  |  | +			{
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +			}
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          /// <summary>
 | 
	
	
		
			
				|  | @@ -372,9 +398,12 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  |                  m_OTSReport_Export.m_mbszclass.M_YSFXJG.list_str_tb_ysfx_xsys.Add(after[i]);
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | -         
 | 
	
		
			
				|  |  | -            //主要优先显示
 | 
	
		
			
				|  |  | -            m_OTSReport_Export.m_mbszclass.list_str_MainPriority.Clear();
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            m_OTSReport_Export.m_mbszclass.M_SY.StandardLibraryName = comboBox1.Text;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +			//主要优先显示
 | 
	
		
			
				|  |  | +			m_OTSReport_Export.m_mbszclass.list_str_MainPriority.Clear();
 | 
	
		
			
				|  |  |              m_OTSReport_Export.m_mbszclass.list_str_MainPriority = list_MainPriority.Copy();
 | 
	
		
			
				|  |  |    
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -480,14 +509,13 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
 | 
	
		
			
				|  |  |              comboBox_p3.SelectedIndex = m_OTSReport_Export.m_mbszclass.M_KLLBXX.index_cb_kllb_sort_p3;
 | 
	
		
			
				|  |  |             
 | 
	
		
			
				|  |  |              //delete_Class.Text = m_OTSReport_Export.m_mbszclass.M_KLLBXX.str_kllb_DeleteClass;
 | 
	
		
			
				|  |  | -            textBox_zypxss.Text = m_OTSReport_Export.m_mbszclass.str_MainPriority;
 | 
	
		
			
				|  |  | +            
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              numericMin.Text = m_OTSReport_Export.m_mbszclass.M_KLLBXX.list_int_kllb_number.ToString();
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              textBox1.Text = m_OTSReport_Export.m_mbszclass.M_DZ.Notes;
 | 
	
		
			
				|  |  | -            TCCleannessAList = m_OTSReport_Export.m_mbszclass.list_str_MainPriority_Serial.Copy();
 | 
	
		
			
				|  |  | -            list_MainPriority = m_OTSReport_Export.m_mbszclass.list_str_MainPriority.Copy();
 | 
	
		
			
				|  |  | +            
 | 
	
		
			
				|  |  |              LoadingIcon();
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          private void  LoadingIcon()
 | 
	
	
		
			
				|  | @@ -790,12 +818,21 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
 | 
	
		
			
				|  |  |                  {
 | 
	
		
			
				|  |  |                      if (textBox_zypxss.Text.Split(',')[i] != "")
 | 
	
		
			
				|  |  |                          vs.Add(MainPriority[i]);
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  | +				}
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | +			DataTable fieldData = fielddata.GetAreaByAllIncA("");
 | 
	
		
			
				|  |  | +            DataTable ResultLibrary = fieldData.Clone();
 | 
	
		
			
				|  |  | +            for (int i = 0; i < fieldData.Rows.Count; i++)
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +                if (Convert.ToInt64(fieldData.Rows[i][0]) > 50000)
 | 
	
		
			
				|  |  | +                {
 | 
	
		
			
				|  |  | +                    ResultLibrary.Rows.Add(fieldData.Rows[i].ItemArray);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +				}
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -            //Category category = new Category(vs, ReadClassification(comboBox1.SelectedIndex));
 | 
	
		
			
				|  |  | -            Category category = new Category(m_OTSReport_Export.m_mbszclass.list_str_MainPriority_Serial.Copy(), ReadClassification(comboBox1.SelectedIndex),false);
 | 
	
		
			
				|  |  | +			//Category category = new Category(vs, ReadClassification(comboBox1.SelectedIndex));
 | 
	
		
			
				|  |  | +			Category category = new Category(m_OTSReport_Export.m_mbszclass.list_str_MainPriority_Serial.Copy(), ReadClassification(comboBox1.SelectedIndex),false, ResultLibrary);
 | 
	
		
			
				|  |  |              category.ShowDialog();
 | 
	
		
			
				|  |  |              List<string> ls = category.OutElementList;
 | 
	
		
			
				|  |  |              TCCleannessAList = category.vs;
 | 
	
	
		
			
				|  | @@ -842,11 +879,39 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  | +            if (!isRefresh)
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +                isRefresh = true;
 | 
	
		
			
				|  |  | +                return;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +			}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |              if (CurrentDatabase != comboBox1.Text)
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  |                  CurrentDatabase = comboBox1.Text;
 | 
	
		
			
				|  |  |                  SwitchCategories = true;
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | +                TCCleannessAList.Clear();
 | 
	
		
			
				|  |  | +                list_MainPriority.Clear();
 | 
	
		
			
				|  |  | +				DataTable dataTable = ReadClassification(comboBox1.SelectedIndex);
 | 
	
		
			
				|  |  | +                for (int i = 0; i < dataTable.Rows.Count; i++)
 | 
	
		
			
				|  |  | +                {
 | 
	
		
			
				|  |  | +                    TCCleannessAList.Add(dataTable.Rows[i][0].ToString());
 | 
	
		
			
				|  |  | +					list_MainPriority.Add(dataTable.Rows[i][1].ToString());
 | 
	
		
			
				|  |  | +				}
 | 
	
		
			
				|  |  | +				string str = "";
 | 
	
		
			
				|  |  | +				for (int i = 0; i < list_MainPriority.Count; i++)
 | 
	
		
			
				|  |  | +				{
 | 
	
		
			
				|  |  | +					if (i == list_MainPriority.Count - 1)
 | 
	
		
			
				|  |  | +					{
 | 
	
		
			
				|  |  | +						str = str + list_MainPriority[i];
 | 
	
		
			
				|  |  | +					}
 | 
	
		
			
				|  |  | +					else
 | 
	
		
			
				|  |  | +					{
 | 
	
		
			
				|  |  | +						str = str + list_MainPriority[i] + " , ";
 | 
	
		
			
				|  |  | +					}
 | 
	
		
			
				|  |  | +				}
 | 
	
		
			
				|  |  | +                textBox_zypxss.Text = str;
 | 
	
		
			
				|  |  | +			}
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  }
 |