Browse Source

Fixed the bug where the spliced particles were not stored in the database

cxs 1 month ago
parent
commit
7214f723e7

+ 11 - 0
OTSIncAMeasureApp/1-OTSMeasure/Measure/DBDataTransition/ElementChemistryDB.cs

@@ -76,6 +76,17 @@ namespace OTSModelSharp.DTLBase
             return true;
             return true;
         }
         }
 
 
+
+
+
+
+
+
+
+
+
+
+
         public bool SaveElementChemistriesList_Batch(List<CPosXrayClr> a_xrayPointList)
         public bool SaveElementChemistriesList_Batch(List<CPosXrayClr> a_xrayPointList)
         {
         {
             List<KeyValuePair<string, SQLiteParameter[]>> list = new List<KeyValuePair<string, SQLiteParameter[]>>();
             List<KeyValuePair<string, SQLiteParameter[]>> list = new List<KeyValuePair<string, SQLiteParameter[]>>();

+ 1 - 4
OTSIncAMeasureApp/1-OTSMeasure/Measure/DBDataTransition/IncADataDB.cs

@@ -65,7 +65,7 @@ namespace OTSModelSharp
             paras[29].Value = a_pParticle.GetGrpName();
             paras[29].Value = a_pParticle.GetGrpName();
             paras[30].Value = a_pParticle.GetGrpColor();
             paras[30].Value = a_pParticle.GetGrpColor();
 
 
-            paras[27].Value = a_pParticle.GetConnectedParticlesName();
+            paras[31].Value = a_pParticle.GetConnectedParticlesName();
 
 
             List<KeyValuePair<string, SQLiteParameter[]>> cmds = new List<KeyValuePair<string, SQLiteParameter[]>>();
             List<KeyValuePair<string, SQLiteParameter[]>> cmds = new List<KeyValuePair<string, SQLiteParameter[]>>();
             cmds.Add(cmd);
             cmds.Add(cmd);
@@ -279,8 +279,5 @@ namespace OTSModelSharp
                 return;
                 return;
             }
             }
         }
         }
-
-
-
     }
     }
 }
 }

+ 1 - 6
OTSIncAReportApp/1-UI/frmMeasureRstMgr.cs

@@ -774,19 +774,14 @@ namespace OTSIncAReportApp
         }
         }
         public bool SaveMergedParticles(List<COTSParticleClr> mergedParts,string dbfile)
         public bool SaveMergedParticles(List<COTSParticleClr> mergedParts,string dbfile)
         {
         {
-
-            CheckExistGroupfield(dbfile);
             CIncAFileMgr pDBFileMgr = new CIncAFileMgr(dbfile);
             CIncAFileMgr pDBFileMgr = new CIncAFileMgr(dbfile);
             var partdb = pDBFileMgr.GetIncADB();
             var partdb = pDBFileMgr.GetIncADB();
-          
-
-            
             CPosXrayDBMgr pXrayDBMgr = pDBFileMgr.GetPosXrayDBMgr();
             CPosXrayDBMgr pXrayDBMgr = pDBFileMgr.GetPosXrayDBMgr();
             CElementChemistryDB xraydb = pXrayDBMgr.GetElementChemistryDB();foreach (COTSParticleClr part in mergedParts)
             CElementChemistryDB xraydb = pXrayDBMgr.GetElementChemistryDB();foreach (COTSParticleClr part in mergedParts)
             {
             {
                 partdb.SaveAParticle(part, part.GetXray());
                 partdb.SaveAParticle(part, part.GetXray());
                
                
-                xraydb.DeleteElementChemistryById(part.GetFieldId(), part.GetParticleId());
+                 xraydb.DeleteElementChemistryById(part.GetFieldId(), part.GetParticleId());
             }
             }
             List<CPosXrayClr> ches = new List<CPosXrayClr>();
             List<CPosXrayClr> ches = new List<CPosXrayClr>();
             foreach (COTSParticleClr part in mergedParts)
             foreach (COTSParticleClr part in mergedParts)

+ 1 - 0
OTSIncAReportApp/1-UI/frmReMeasure.cs

@@ -30,6 +30,7 @@ using OTSRptPeriodicTable;
 using ExportToExcel;
 using ExportToExcel;
 using ComboBoxItem = OTSMeasureApp.ComboBoxItem;
 using ComboBoxItem = OTSMeasureApp.ComboBoxItem;
 using OTSModelSharp.ServiceCenter;
 using OTSModelSharp.ServiceCenter;
+using OTSIncAReportApp._2_CommonFunction.CommonClass;
 
 
 namespace OTSIncAReportApp
 namespace OTSIncAReportApp
 {
 {

+ 1 - 5
OTSIncAReportApp/3-ServiceCenter/DataOperation/DataAccess/ParticleData.cs

@@ -972,11 +972,7 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
             return particlesAll;
             return particlesAll;
         }
         }
 
 
-        /// <summary>
-        /// 去除拼接颗粒组成颗粒
-        /// </summary>
-        /// <param name="dataTable_Particle"></param>
-        /// <param name="dataTable_MergeParticles"></param>
+        
         public void RemoveMergeParticles(ref DataTable dataTable_Particle, DataTable dataTable_MergeParticles)
         public void RemoveMergeParticles(ref DataTable dataTable_Particle, DataTable dataTable_MergeParticles)
         {
         {
             foreach (DataRow row in dataTable_Particle.Rows)
             foreach (DataRow row in dataTable_Particle.Rows)