浏览代码

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

zty 3 年之前
父节点
当前提交
3c34ccb94b

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

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?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">
   <Collection RegName="Stagelist">
     <Member strName="圆形九圆孔50mm">
     <Member strName="圆形九圆孔50mm">
       <Member RegName="boundary" PolygonPoint="" rectDomian="0,0,50000,0" shape="0" />
       <Member RegName="boundary" PolygonPoint="" rectDomian="0,0,50000,0" shape="0" />

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

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

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

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

+ 22 - 3
OTSIncAReportApp/3-ServiceCenter/DataOperation/DataAccess/ParticleData.cs

@@ -356,7 +356,7 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
         public Particle GetParticleByFidAndPid(string fieldid, string particleid)
         public Particle GetParticleByFidAndPid(string fieldid, string particleid)
         {
         {
             string sqlp = @"select *,(select xraydata from xraydata where xrayindex=INcAData.xrayid and fieldid="
             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 + ") as Element from INcAData where fieldid="
             + fieldid + " and particleid= " + particleid;
             + fieldid + " and particleid= " + particleid;
 
 
@@ -372,7 +372,7 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
                 {
                 {
                     if (element.Split(';')[i] != "")
                     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);
                         ElementList.Add(ele);
                     }
                     }
                 }
                 }
@@ -454,7 +454,7 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
                 string ConcatenatedString = "";
                 string ConcatenatedString = "";
                 for (int j = 0; j < drs.Length; j++)
                 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;
                 particlesAll.Rows[i]["Element"] = ConcatenatedString;
             }
             }
@@ -465,6 +465,25 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
             //DataTable dt = dbHelper.ExecuteQuery(sqlliteString);
             //DataTable dt = dbHelper.ExecuteQuery(sqlliteString);
             return particlesAll;
             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)
         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;
             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;