|
@@ -259,14 +259,16 @@ namespace OTSIncAReportApp._3_ServiceCenter
|
|
|
int picdataYmin = Convert.ToInt32(list_dt_picdata[0].Rows[0]["Y"]);
|
|
|
int picdataXmin = Convert.ToInt32(list_dt_picdata[0].Rows[0]["X"]);
|
|
|
var distinctY = distinctValuesY.ToList();
|
|
|
- distinctY.Sort();
|
|
|
+ distinctY.Sort((a, b) => b.CompareTo(a));
|
|
|
var distinctX = distinctValuesX.ToList();
|
|
|
distinctX.Sort();
|
|
|
|
|
|
- int Yzhou = (distinctY[0] - picdataYmin);
|
|
|
+ //int Yzhou = (distinctY[0] - picdataYmin);
|
|
|
+ int Yzhou = 0;
|
|
|
for (int i = 0; i < distinctY.Count; i++)
|
|
|
{
|
|
|
- int Xzhou = (distinctX[0] - picdataXmin);
|
|
|
+ //int Xzhou = (distinctX[0] - picdataXmin);
|
|
|
+ int Xzhou = 0;
|
|
|
DataTable number = CountTheNumberOfX_axes(GBDatatableOne, "fieldY", distinctY[i].ToString());
|
|
|
for (int j = 0; j < number.Rows.Count; j++)
|
|
|
{
|
|
@@ -286,10 +288,10 @@ namespace OTSIncAReportApp._3_ServiceCenter
|
|
|
OpenCvSharp.Cv2.Rectangle(save_pano, topLeft, bottomRight, color, thickness);
|
|
|
|
|
|
// 设置要绘制的文字及其位置
|
|
|
- string text = number.Rows[i]["data"].ToString();
|
|
|
+ string text = number.Rows[j]["data"].ToString();
|
|
|
|
|
|
|
|
|
- string input = number.Rows[i]["data"].ToString();
|
|
|
+ string input = number.Rows[j]["data"].ToString();
|
|
|
int chunkSize = 40; // 分割长度
|
|
|
|
|
|
// 使用LINQ的Enumerable.Chunk扩展方法分割字符串
|
|
@@ -304,7 +306,7 @@ namespace OTSIncAReportApp._3_ServiceCenter
|
|
|
//}
|
|
|
|
|
|
|
|
|
- int topgrade = Convert.ToInt32(number.Rows[i]["color"]);
|
|
|
+ int topgrade = Convert.ToInt32(number.Rows[j]["color"]);
|
|
|
// 设置字体样式和大小
|
|
|
Color color1 = new Color();
|
|
|
switch (topgrade)
|
|
@@ -332,7 +334,7 @@ namespace OTSIncAReportApp._3_ServiceCenter
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
- OpenCvSharp.Scalar fontColor = new OpenCvSharp.Scalar(color1.R, color1.G, color1.B, 255); // 文字颜色:黑色
|
|
|
+ OpenCvSharp.Scalar fontColor = new OpenCvSharp.Scalar(color1.B, color1.G, color1.R, 255); // 文字颜色:黑色
|
|
|
double fontScale = 2.5; // 字体大小缩放因子
|
|
|
//int thickness = 2; // 字体粗细
|
|
|
OpenCvSharp.LineTypes lineType = OpenCvSharp.LineTypes.AntiAlias; // 线条类型
|
|
@@ -379,7 +381,7 @@ namespace OTSIncAReportApp._3_ServiceCenter
|
|
|
if (name == dataTable.Rows[i][ColumnName].ToString())
|
|
|
{
|
|
|
DataRow dr = data.NewRow();
|
|
|
- dr["data"] = dataTable.Rows[i]["grade"].ToString();
|
|
|
+ dr["data"] = dataTable.Rows[i]["gradeDetail"].ToString();
|
|
|
dr["color"] = dataTable.Rows[i]["topGrade"].ToString();
|
|
|
data.Rows.Add(dr);
|
|
|
}
|