Browse Source

Merge branch 'Release2.4' of http://172.16.3.77:10080/gaoshipeng/OTS2_0 into Release2.4

gsp 3 years ago
parent
commit
d4d40f0848

+ 1 - 1
Bin/x64/Debug/Config/SysData/OTSStage.stg

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<XMLData Modify="true" PathName=".\Config\SysData\OTSStage.stg" WorkingStageId="0">
+<XMLData Modify="true" PathName=".\Config\SysData\OTSStage.stg" WorkingStageId="1">
   <Collection RegName="Stagelist">
     <Member strName="圆形九圆孔50mm">
       <Member RegName="boundary" PolygonPoint="" rectDomian="0,0,50000,0" shape="0" />

+ 2 - 2
Bin/x64/Debug/Resources/XMLData/AppResource_EN.xml

@@ -822,8 +822,8 @@
 	  <Control name="OriginalSplicing" text="Original splicing"/>
 	  <Control name="OriginalDistribution" text="Original distribution"/>
 	  <Control name="ParticleSizeTable" text="Particle size table"/>
-	  <Control name="ChineseStandard1" text="GB30834(10561)Function1"/>
-	  <Control name="ChineseStandard2" text="GB30834Function2"/>
+	  <Control name="ChineseStandard1" text="GB Function1(30834)"/>
+	  <Control name="ChineseStandard2" text="GB Function2(30834)"/>
 	  <Control name="AmericanStandard" text="American Standard"/>
 	  <Control name="GermanStandard" text="German standard"/>
 	  <Control name="CommonClassification" text="Common classification"/>

+ 2 - 2
Bin/x64/Debug/Resources/XMLData/AppResource_ZH.xml

@@ -818,8 +818,8 @@
 	  <Control name="OriginalSplicing" text="原图拼接" />
 	  <Control name="OriginalDistribution" text="原图颗粒分布" />
 	  <Control name="ParticleSizeTable" text="粒级表" />
-	  <Control name="ChineseStandard1" text="GB30834(10561)方法一" />
-	  <Control name="ChineseStandard2" text="GB30834方法二" />
+	  <Control name="ChineseStandard1" text="GB方法一(30834)" />
+	  <Control name="ChineseStandard2" text="GB方法二(30834)" />
 	  <Control name="AmericanStandard" text="美标" />
 	  <Control name="GermanStandard" text="德标" />
 	  <Control name="CommonClassification" text="颗粒成分分类" />

+ 1 - 1
OTSCPP/OTSClassifyEngine/InclutionEngine/OTSClassifyEng.cpp

@@ -1321,7 +1321,7 @@ namespace OTSClassifyEngine
 
 				// try to find the STD item
 				pOxideNitrSTDItem = GetSTDItemByName(listNitrideSTD, strOxide_NitrName);
-				if (strOxide_NitrName)
+				if (pOxideNitrSTDItem)
 				{
 					// found the STD item
 					a_nIncId = pOxideNitrSTDItem->GetSTDId();

+ 2 - 0
OTSCPP/OTSClrInterface/ClassificationClr/OTSClassifyEngineClr.cpp

@@ -55,7 +55,9 @@ namespace OTSCLRINTERFACE {
 	bool COTSClassifyEngineClr::Classify(COTSParticleClr^ particle, int SteelTech)
 	{
 		auto part = particle->GetOTSParticlePtr();
+	
 		auto xraydata = part->GetXrayInfo();
+	
 		return engine->Classify(part, SteelTech, xraydata);
 		
 	}

+ 7 - 2
OTSCPP/OTSControl/Oxford/OxfordWrapper/OxfordControllerWrapper.cpp

@@ -27,9 +27,9 @@ const long g_nMicrocopeConnectTimeOutMilliSeconds = 2000;
 // Oxford single point delay time(ms)
 const long g_nSinglePointCollectDelay = 3000;
 const long g_nSingleFeatureCollectDelay = 5000;
-const long g_nXrayControllerConnectTimeOutMilliSeconds = 10000;
+const long g_nXrayControllerConnectTimeOutMilliSeconds =20000;
 const long g_nImageTimeOutMilliSeconds = 40000;
-const long g_nStageTimeOutMilliSeconds = 15000;
+const long g_nStageTimeOutMilliSeconds = 40000;
 
 
 
@@ -1340,7 +1340,12 @@ void OxfordControllerWrapper::OnXrayAcquisitionFinished(Object^ sender, OINA::Ex
 			}
 
 			CString msg = Quant;
+			if (_oxfordControllerData.m_pXrayDataList == NULL)
+			{
+				return;
+			}
 			unsigned char* dst = _oxfordControllerData.m_pXrayDataList[_oxfordControllerData.m_nCollectedXrayCounts].m_strElementResult;
+			
 			for (int i = 0; i < msg.GetLength(); i++)
 			{
 				dst[i] = (unsigned char)msg.GetAt(i);

+ 3 - 0
OTSIncAMeasureApp/0-OTSModel/Measure/3-MeasureFlow/CSmplMeasure.cs

@@ -859,6 +859,9 @@ namespace OTSModelSharp
             {
                 log.Info("Begin to collect particle's xray data!");
                 Thread.Sleep(100);
+
+                m_EDSHardwareMgr.SetResolution(a_pBSEImg.GetWidth(), a_pBSEImg.GetHeight());
+
                 CollectParticlesXrayData(curFldData);
 
                 Thread.Sleep(100);

+ 1 - 1
OTSIncAReportApp/1-UI/Control_ECharts/EChart_ParticlesComposition.cs

@@ -1023,7 +1023,7 @@ namespace OTSIncAReportApp.Control_ECharts
         }
         private string getWhere(string max, string min, string col)
         {
-            return col + ">=" + min + " and " + col + "<=" + max;
+            return col + ">=" + min + " and " + col + "<" + max;
         }
         #endregion
 

+ 1 - 1
OTSIncAReportApp/1-UI/Control_ECharts/EChart_Trianglediagram.cs

@@ -535,7 +535,7 @@ namespace OTSIncAReportApp.Control_ECharts
                 //为页面图形提供数据参数
                 string str = m_ReportApp.data;
                 //执行网页脚本事件
-                m_ReportApp.browser_trio.ExecuteScriptAsync("showchart('" + str + "','triangle')");
+                m_ReportApp.browser_trio.ExecuteScriptAsync("showchart('" + str + "','','triangle')");
             }
         }
         //public string GetPic()

+ 33 - 4
OTSIncAReportApp/3-ServiceCenter/DataOperation/DataAccess/ParticleData.cs

@@ -356,7 +356,7 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
         public Particle GetParticleByFidAndPid(string fieldid, string particleid)
         {
             string sqlp = @"select *,(select xraydata from xraydata where xrayindex=INcAData.xrayid and fieldid="
-            + fieldid + ") as XRayData,(select group_concat(name || '-' || Percentage, ';')from ElementChemistry where XRayId = INcAData.XRayId and fieldid ="
+            + fieldid + ") as XRayData,(select group_concat(name || '_' || Percentage, ';')from ElementChemistry where XRayId = INcAData.XRayId and fieldid ="
             + fieldid + ") as Element from INcAData where fieldid="
             + fieldid + " and particleid= " + particleid;
 
@@ -372,7 +372,7 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
                 {
                     if (element.Split(';')[i] != "")
                     {
-                        Element ele = new Element() { Name = element.Split(';')[i].Split('-')[0], Percentage = Convert.ToDouble(element.Split(';')[i].Split('-')[1]) };
+                        Element ele = new Element() { Name = element.Split(';')[i].Split('_')[0], Percentage = Convert.ToDouble(element.Split(';')[i].Split('_')[1]) };
                         ElementList.Add(ele);
                     }
                 }
@@ -446,7 +446,17 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
             }
             //particlesAll = GetInfoForPartucleDevidePage2("");
 
-            DataTable elementchemistry = GetElementChemistry();
+            //DataTable elementchemistry = GetElementChemistry();
+
+            DataTable dt_element = GetElementChemistry();
+            DataTable elementchemistry = dt_element.Clone();
+            for (int i = 0; i < dt_element.Rows.Count; i++)
+            {
+                if (dt_element.Rows[i]["Name"].ToString() != "Fe")
+                {
+                    elementchemistry.Rows.Add(dt_element.Rows[i].ItemArray);
+                }
+            }
             for (int i = 0; i < particlesAll.Rows.Count; i++)
             {
                 string str = "XRayId = " + particlesAll.Rows[i]["particleId"].ToString() + " and fieldid = " + particlesAll.Rows[i]["fieldid"].ToString();
@@ -454,7 +464,7 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
                 string ConcatenatedString = "";
                 for (int j = 0; j < drs.Length; j++)
                 {
-                    ConcatenatedString += drs[j]["name"] + "-" + drs[j]["Percentage"] + ';';
+                    ConcatenatedString += drs[j]["name"] + "-" + ChangeDataToD(drs[j]["Percentage"].ToString()) + ';';
                 }
                 particlesAll.Rows[i]["Element"] = ConcatenatedString;
             }
@@ -465,6 +475,25 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
             //DataTable dt = dbHelper.ExecuteQuery(sqlliteString);
             return particlesAll;
         }
+
+        /// <summary>
+        /// 保留两位小数
+        /// </summary>
+        /// <param name="strData"></param>
+        /// <returns></returns>
+        private string ChangeDataToD(string strData)
+        {
+            Decimal dData = 0.00M;
+            if (strData.Contains("E"))
+            {
+                dData = Convert.ToDecimal(Decimal.Parse(strData.ToString(), System.Globalization.NumberStyles.Float));
+            }
+            else
+            {
+                return Convert.ToDouble(strData).ToString("0.00");
+            }
+            return Convert.ToDouble(dData).ToString("0.00");
+        }
         public DataTable GetInfoForPartucleDevidePage2(string condition)
         {
             string sqliteString = "select fieldid,particleid,AveGray,RectLeft,RectTop,RectWidth,RectHeight,Area,PosX,PosY,TypeId,SegmentNum,FieldPosX as 'SEMPosX',FieldPosY as 'SEMPosY',XrayId,DMAX,DMIN,DPERP,PERIMETER,ORIENTATION,DINSCR,DMEAN,DELONG,DFERET,TypeName,TypeColor,SubParticles, (select group_concat(name || '-' || Percentage, ';') from ElementChemistry where XRayId = MergedParticleInfo.XRayId and fieldid = MergedParticleInfo.fieldid) as Element from MergedParticleInfo where 1=1 " + condition + " union select fieldid,particleid,AveGray,RectLeft,RectTop,RectWidth,RectHeight,Area,PosX,PosY,TypeId,SegmentNum,SEMPosX,SEMPosY,XrayId,DMAX,DMIN,DPERP,PERIMETER,ORIENTATION,DINSCR,DMEAN,DELONG,DFERET,TypeName,TypeColor,'' as SubParticles,'' as Element from INcAData where xrayid > -1 and instr(','||(select ifnull(group_concat(SubParticles, ','),'') from MergedParticleInfo)|| ',',',' || fieldid || ':' || particleid || ',')= 0 " + condition;