소스 검색

删除无效备注,颗粒列表当前卡顿剩余待处理项:抠图

CXS 3 년 전
부모
커밋
ff5df59376
2개의 변경된 파일1개의 추가작업 그리고 69개의 파일을 삭제
  1. 1 11
      OTSIncAReportApp/Control_Grids/ParticlesGridDevidePage.cs
  2. 0 58
      OTSIncAReportApp/DataOperation/DataAccess/ParticleData.cs

+ 1 - 11
OTSIncAReportApp/Control_Grids/ParticlesGridDevidePage.cs

@@ -208,7 +208,7 @@ namespace OTSIncAReportGrids
         {
         {
             //多次测试发现 读取数据库时间耗时长,但读取条数目对读取数据库时长影响不大,故此处直接读取所有数据库信息,以取代多次连接数据库方式,优化分页速度
             //多次测试发现 读取数据库时间耗时长,但读取条数目对读取数据库时长影响不大,故此处直接读取所有数据库信息,以取代多次连接数据库方式,优化分页速度
             particlesAll = new DataTable();
             particlesAll = new DataTable();
-            particlesAll = Particledata.GetInfoForPartucleDevidePage3(condition);
+            particlesAll = Particledata.GetInfoForPartucleDevidePage2(condition);
             DataTable elementchemistry = Particledata.GetElementChemistry();
             DataTable elementchemistry = Particledata.GetElementChemistry();
 
 
             for (int i = 0; i < particlesAll.Rows.Count; i++)
             for (int i = 0; i < particlesAll.Rows.Count; i++)
@@ -648,16 +648,6 @@ namespace OTSIncAReportGrids
                 }
                 }
             }
             }
             
             
-            //for(int i=0;i< dgV_ParticlesDevidePage.Rows.Count;i++)
-            //{
-            //    for(int j= strs.Count()+5;j< dgV_ParticlesDevidePage.Columns.Count;j++)
-            //    {
-            //        if(dgV_ParticlesDevidePage.Rows[i].Cells[j].Value == null)
-            //        {
-            //            dgV_ParticlesDevidePage.Rows[i].Cells[j].Value = 0;
-            //        }
-            //    }
-            //}
 
 
             #region 加载进度条进度部份结束
             #region 加载进度条进度部份结束
             //加载完成设置鼠标为默认
             //加载完成设置鼠标为默认

+ 0 - 58
OTSIncAReportApp/DataOperation/DataAccess/ParticleData.cs

@@ -370,45 +370,6 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
         }
         }
 
 
         #region 分页添加读取数据库函数
         #region 分页添加读取数据库函数
-        /// <summary>
-        /// 获取颗粒全部所需信息
-        /// </summary>
-        /// <param name=""></param>
-        /// <param name=""></param>
-        /// <returns></returns>
-        public DataTable GetAllInfo(string condition)
-        {
-            string sqliteString = "select fieldid,particleid,AveGray,RectLeft,RectTop,RectWidth,RectHeight,Area,PosX,PosY,TypeId,ElementNum,SegmentNum,FieldPosX,FieldPosY,ParticleId,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,ElementNum,SegmentNum,FieldPosX,FieldPosY,ParticleId,DMAX,DMIN,DPERP,PERIMETER,ORIENTATION,DINSCR,DMEAN,DELONG,DFERET,TypeName,TypeColor,'' as SubParticles, (select group_concat(name || '-' || Percentage, ';') from ElementChemistry where XRayId = INcAData.XRayId and fieldid = INcAData.fieldid  ) as Element from INcAData where xrayid > -1 and instr(','||(select ifnull(group_concat(SubParticles, '&'),'') from MergedParticleInfo)|| ',',',' || fieldid || ':' || particleid || ',')= 0 " + condition;
-            DataTable DT = dbHelper.ExecuteQuery(sqliteString);
-            return DT;
-        }
-        /// <summary>
-        /// 获取合并颗粒总数
-        /// </summary>
-        /// <param name="condition"></param>
-        /// <returns></returns>
-        public int GetCountOfMergedParticles(string condition)
-        {
-            string sqliteString = "select count(*) from MergedParticleInfo where 1=1 " + condition;
-            DataTable DT = dbHelper.ExecuteQuery(sqliteString);
-            int Count = int.Parse(DT.Rows[0][0].ToString());
-            return Count;
-        }
-
-        /// <summary>
-        /// 获取正常颗粒总数,去除组成合并颗粒的几个部分
-        /// </summary>
-        /// <param name="condition"></param>
-        /// <returns></returns>
-        public int GetCountOfParticles(string condition)
-        {
-            string sqliteString = "select count ( * ) from INcAData where xrayid > -1"+condition+" and instr(','||(select ifnull(group_concat(SubParticles, ','),'') from MergedParticleInfo)|| ',',',' || fieldid || ':' || particleid || ',')= 0 ";
-            DataTable DT = dbHelper.ExecuteQuery(sqliteString);
-            int Count = int.Parse(DT.Rows[0][0].ToString());
-            return Count;
-        }
-
-
         /// <summary>
         /// <summary>
         /// 获取分页查询所需信息
         /// 获取分页查询所需信息
         /// </summary>
         /// </summary>
@@ -419,36 +380,17 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
         {
         {
             int p = (currentPage - 1) * pagesize;
             int p = (currentPage - 1) * pagesize;
             string sqliteString = "select fieldid,particleid,AveGray,RectLeft,RectTop,RectWidth,RectHeight,Area,PosX,PosY,TypeId,ElementNum,SegmentNum,FieldPosX as 'SEMPosX',FieldPosY as 'SEMPosY',ParticleId,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,ElementNum,SegmentNum,FieldPosX,FieldPosY,ParticleId,DMAX,DMIN,DPERP,PERIMETER,ORIENTATION,DINSCR,DMEAN,DELONG,DFERET,TypeName,TypeColor,'' as SubParticles,(select group_concat(name || '-' || Percentage, ';') from ElementChemistry where XRayId = INcAData.XRayId and fieldid = INcAData.fieldid  ) as Element from INcAData where xrayid > -1 and instr(','||(select ifnull(group_concat(SubParticles, ','),'') from MergedParticleInfo)|| ',',',' || fieldid || ':' || particleid || ',')= 0 " + condition + " order by " + OrderFunction + " limit " + pagesize.ToString() + " offset " + p.ToString();
             string sqliteString = "select fieldid,particleid,AveGray,RectLeft,RectTop,RectWidth,RectHeight,Area,PosX,PosY,TypeId,ElementNum,SegmentNum,FieldPosX as 'SEMPosX',FieldPosY as 'SEMPosY',ParticleId,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,ElementNum,SegmentNum,FieldPosX,FieldPosY,ParticleId,DMAX,DMIN,DPERP,PERIMETER,ORIENTATION,DINSCR,DMEAN,DELONG,DFERET,TypeName,TypeColor,'' as SubParticles,(select group_concat(name || '-' || Percentage, ';') from ElementChemistry where XRayId = INcAData.XRayId and fieldid = INcAData.fieldid  ) as Element from INcAData where xrayid > -1 and instr(','||(select ifnull(group_concat(SubParticles, ','),'') from MergedParticleInfo)|| ',',',' || fieldid || ':' || particleid || ',')= 0 " + condition + " order by " + OrderFunction + " limit " + pagesize.ToString() + " offset " + p.ToString();
-            //SQLiteTransaction tr = dbHelper.BeginTranscation();
             DataTable DT=new DataTable();
             DataTable DT=new DataTable();
             DT = dbHelper.ExecuteQuery(sqliteString);
             DT = dbHelper.ExecuteQuery(sqliteString);
             return DT;
             return DT;
         }
         }
-
         public DataTable GetInfoForPartucleDevidePage2(string condition)
         public DataTable GetInfoForPartucleDevidePage2(string condition)
-        {
-            string sqliteString = "select fieldid,particleid,AveGray,RectLeft,RectTop,RectWidth,RectHeight,Area,PosX,PosY,TypeId,ElementNum,SegmentNum,FieldPosX as 'SEMPosX',FieldPosY as 'SEMPosY',ParticleId,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,ElementNum,SegmentNum,FieldPosX,FieldPosY,ParticleId,DMAX,DMIN,DPERP,PERIMETER,ORIENTATION,DINSCR,DMEAN,DELONG,DFERET,TypeName,TypeColor,'' as SubParticles,(select group_concat(name || '-' || Percentage, ';') from ElementChemistry where XRayId = INcAData.XRayId and fieldid = INcAData.fieldid  ) as Element from INcAData where xrayid > -1 and instr(','||(select ifnull(group_concat(SubParticles, ','),'') from MergedParticleInfo)|| ',',',' || fieldid || ':' || particleid || ',')= 0 " + condition;
-            DataTable DT = new DataTable();
-            DT = dbHelper.ExecuteQuery(sqliteString);
-            return DT;
-        }
-
-        public DataTable GetInfoForPartucleDevidePage3(string condition)
         {
         {
             string sqliteString = "select fieldid,particleid,AveGray,RectLeft,RectTop,RectWidth,RectHeight,Area,PosX,PosY,TypeId,ElementNum,SegmentNum,FieldPosX as 'SEMPosX',FieldPosY as 'SEMPosY',ParticleId,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,ElementNum,SegmentNum,FieldPosX,FieldPosY,ParticleId,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,ElementNum,SegmentNum,FieldPosX as 'SEMPosX',FieldPosY as 'SEMPosY',ParticleId,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,ElementNum,SegmentNum,FieldPosX,FieldPosY,ParticleId,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;
             DataTable DT = new DataTable();
             DataTable DT = new DataTable();
             DT = dbHelper.ExecuteQuery(sqliteString);
             DT = dbHelper.ExecuteQuery(sqliteString);
             return DT;
             return DT;
         }
         }
-
-        public DataTable GetInfoForPartucleDevidePage4(string condition)
-        {
-            string sqliteString = "select (select group_concat(name || '-' || Percentage, ';') from ElementChemistry where XRayId = INcAData.XRayId and fieldid = INcAData.fieldid  ) as Element from INcAData where xrayid > -1 " + condition;
-            DataTable DT = new DataTable();
-            DT = dbHelper.ExecuteQuery(sqliteString);
-            return DT;
-        }
-
         public DataTable GetElementChemistry()
         public DataTable GetElementChemistry()
         {
         {
             string sqliteString = "select * from ElementChemistry";
             string sqliteString = "select * from ElementChemistry";