|
@@ -8,6 +8,7 @@ using System.Data;
|
|
|
using System.Linq;
|
|
|
using System.Text;
|
|
|
using System.Threading.Tasks;
|
|
|
+using static OTSDataType.otsdataconst;
|
|
|
using static OTSIncAReportApp.OTSReport_Export;
|
|
|
|
|
|
namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
|
|
@@ -186,7 +187,7 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
|
|
|
/// 分类整合大小分类都有
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
- public List<DataTable> GetClassificationConsolidationTable(BasicData basicData)
|
|
|
+ public List<DataTable> GetClassificationConsolidationTable(OTSReport_Export m_otsreport_export, BasicData basicData)
|
|
|
{
|
|
|
List<DataTable> datas = new List<DataTable>();
|
|
|
DataTable data = basicData.GetDBData();
|
|
@@ -258,63 +259,113 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
|
|
|
}
|
|
|
ls_Particel_dt.Rows.Add(dr2);
|
|
|
}
|
|
|
- //按照list列表进行物质类排序,物质类中的元素分类按照面积的大小进行排序
|
|
|
- List<string> ClassName = new List<string>();
|
|
|
- //DataTable getClass_dt = basicData.GetAllClass();
|
|
|
+ //按照list列表进行物质类排序,物质类中的元素分类按照面积的大小进行排序
|
|
|
+ List<string> ClassName = ObtainParticleCategory(m_otsreport_export, basicData);
|
|
|
+ // List<string> ClassName = new List<string>();
|
|
|
+ ////DataTable getClass_dt = basicData.GetAllClass();
|
|
|
|
|
|
- DataTable getClass_dt=ReadClassification(basicData);
|
|
|
+ //DataTable get_dt=ReadClassification(basicData);
|
|
|
+ // DataTable getClass_dt = get_dt.Clone();
|
|
|
+ //DataRow[] dataRow = get_dt.Select("", "iorder ASC");
|
|
|
+ // foreach (DataRow row in dataRow)
|
|
|
+ // {
|
|
|
+ // if (row.ItemArray[1].ToString() != "Default")
|
|
|
+ // {
|
|
|
+ // getClass_dt.ImportRow(row);
|
|
|
+ // }
|
|
|
+ //}
|
|
|
|
|
|
- for (int i = 0; i < getClass_dt.Rows.Count; i++)
|
|
|
- {
|
|
|
- ClassName.Add(getClass_dt.Rows[i][1].ToString());
|
|
|
|
|
|
- }
|
|
|
- //bool bl = false;
|
|
|
- // for (int i = 0; i < getClass_dt.Rows.Count; i++)
|
|
|
- // {
|
|
|
- // if (getClass_dt.Rows[i]["name"].ToString() != "NOT_INCLUTION" && getClass_dt.Rows[i]["name"].ToString() != "Invalid"
|
|
|
- // && getClass_dt.Rows[i]["name"].ToString() != "Not Identified")
|
|
|
- // if (getClass_dt.Rows[i]["name"].ToString() == "")
|
|
|
- // {
|
|
|
- // if (!bl)
|
|
|
- // {
|
|
|
- // ClassName.Add("Default");
|
|
|
- // bl = true;
|
|
|
- // }
|
|
|
- // }
|
|
|
- // else
|
|
|
- // {
|
|
|
- // bool isDefault = false;
|
|
|
-
|
|
|
- // for (int a = 0; a < ClassName.Count; a++)
|
|
|
- // {
|
|
|
- // if (getClass_dt.Rows[i]["name"].ToString() == "Default")
|
|
|
- // {
|
|
|
- // isDefault = true;
|
|
|
- // }
|
|
|
- // }
|
|
|
- // if (isDefault)
|
|
|
- // {
|
|
|
- // if (getClass_dt.Rows[i]["name"].ToString() != "Default")
|
|
|
- // {
|
|
|
- // ClassName.Add(getClass_dt.Rows[i]["GroupName"].ToString());
|
|
|
- // }
|
|
|
- // }
|
|
|
- // else
|
|
|
- // {
|
|
|
- // ClassName.Add(getClass_dt.Rows[i]["GroupName"].ToString());
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
+ // for (int i = 0; i < getClass_dt.Rows.Count; i++)
|
|
|
+ // {
|
|
|
+ // ClassName.Add(getClass_dt.Rows[i][1].ToString());
|
|
|
+ //}
|
|
|
+ // ClassName.Add("Default");
|
|
|
|
|
|
- //获取大分类信息
|
|
|
- DataTable dt = QuantityOfIntegratedSubstances(ls_Particel_dt, ClassName);
|
|
|
+
|
|
|
+
|
|
|
+ //获取大分类信息
|
|
|
+ DataTable dt = QuantityOfIntegratedSubstances(ls_Particel_dt, ClassName);
|
|
|
DataTable data2 = classIfIcationSort(ls_Particel_dt, ClassName, dt, colidCount);
|
|
|
datas.Add(ls_partsize_dt.Copy());
|
|
|
datas.Add(data2.Copy());
|
|
|
return datas;
|
|
|
}
|
|
|
+ /// <summary>
|
|
|
+ /// 获得颗粒类别
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ private List<string> ObtainParticleCategory(OTSReport_Export m_otsreport_export, BasicData basicData)
|
|
|
+ {
|
|
|
+ List<string> ClassName = new List<string>();
|
|
|
+ if (m_otsreport_export.m_ReportApp.m_RptConfigFile.Systype != OTS_SysType_ID.IncA)
|
|
|
+ {
|
|
|
+ DataTable get_dt = ReadClassification(basicData);
|
|
|
+ DataTable getClass_dt = get_dt.Clone();
|
|
|
+ DataRow[] dataRow = get_dt.Select("", "iorder ASC");
|
|
|
+ foreach (DataRow row in dataRow)
|
|
|
+ {
|
|
|
+ if (row.ItemArray[1].ToString() != "Default")
|
|
|
+ {
|
|
|
+ getClass_dt.ImportRow(row);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for (int i = 0; i < getClass_dt.Rows.Count; i++)
|
|
|
+ {
|
|
|
+ ClassName.Add(getClass_dt.Rows[i][1].ToString());
|
|
|
+ }
|
|
|
+ ClassName.Add("Default");
|
|
|
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ DataTable getClass_dt = ReadClassification(basicData);
|
|
|
+ for (int i = 0; i < getClass_dt.Rows.Count; i++)
|
|
|
+ {
|
|
|
+ ClassName.Add(getClass_dt.Rows[i][1].ToString());
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ bool bl = false;
|
|
|
+ for (int i = 0; i < getClass_dt.Rows.Count; i++)
|
|
|
+ {
|
|
|
+ if (getClass_dt.Rows[i]["GroupName"].ToString() != "NOT_INCLUTION" && getClass_dt.Rows[i]["GroupName"].ToString() != "Invalid"
|
|
|
+ && getClass_dt.Rows[i]["GroupName"].ToString() != "Not Identified")
|
|
|
+ if (getClass_dt.Rows[i]["GroupName"].ToString() == "")
|
|
|
+ {
|
|
|
+ if (!bl)
|
|
|
+ {
|
|
|
+ ClassName.Add("Default");
|
|
|
+ bl = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ bool isDefault = false;
|
|
|
+
|
|
|
+ for (int a = 0; a < ClassName.Count; a++)
|
|
|
+ {
|
|
|
+ if (getClass_dt.Rows[i]["GroupName"].ToString() == "Default")
|
|
|
+ {
|
|
|
+ isDefault = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (isDefault)
|
|
|
+ {
|
|
|
+ if (getClass_dt.Rows[i]["GroupName"].ToString() != "Default")
|
|
|
+ {
|
|
|
+ ClassName.Add(getClass_dt.Rows[i]["GroupName"].ToString());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ ClassName.Add(getClass_dt.Rows[i]["GroupName"].ToString());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return ClassName;
|
|
|
+ }
|
|
|
private DataTable ReadClassification(BasicData basicData )
|
|
|
{
|
|
|
DataTable dt_stl = new DataTable();
|