delete qsv

This commit is contained in:
2025-11-05 13:47:25 +08:00
parent 5ce98df631
commit 649d44f001

View File

@@ -84,7 +84,7 @@ namespace TetraPackOCR
/// <summary> /// <summary>
/// 共印依据 QSV Design, Layers, Colours,产品规格 /// 共印依据 QSV Design, Layers, Colours,产品规格
/// </summary> /// </summary>
string QSV, ProductStandard; string ProductStandard;
/// <summary> /// <summary>
/// 幅数 包材宽 梯度 X距离 Y距离 /// 幅数 包材宽 梯度 X距离 Y距离
/// </summary> /// </summary>
@@ -686,16 +686,17 @@ namespace TetraPackOCR
sheet1 = package.Workbook.Worksheets["P2生成数据"]; sheet1 = package.Workbook.Worksheets["P2生成数据"];
sheet2 = package.Workbook.Worksheets["QSV对应产品规格和梯度"]; sheet2 = package.Workbook.Worksheets["QSV对应产品规格和梯度"];
sheet3 = package.Workbook.Worksheets["产品规格对应排布方式"]; sheet3 = package.Workbook.Worksheets["产品规格对应排布方式"];
//根据订单遍历sheet1 找Sequence QSV NumOFLanes 字符 //根据订单遍历sheet1 找Sequence QSV NumOFLanes 字符
string currentQSV = "";
for (int i = 1; i < sheet1.Dimension.Rows; i++) for (int i = 1; i < sheet1.Dimension.Rows; i++)
{ {
if (sheet1.GetValue(i, 3) != null) if (sheet1.GetValue(i, 3) != null)
{ {
if (sheet1.Cells[i, 3].Value.ToString() == order) if (sheet1.Cells[i, 3].Value.ToString() == order)
{ {
QSV = sheet1.Cells[i, 4].Value.ToString(); currentQSV = sheet1.Cells[i, 4].Value.ToString();
lbl_QSVShow.Text = QSV; lbl_QSVShow.Text = currentQSV;
log.Info("当前订单QSV:" + QSV); log.Info("当前订单QSV:" + currentQSV);
NumberOfLanes = Convert.ToInt32(sheet1.Cells[i, 5].Value.ToString()); NumberOfLanes = Convert.ToInt32(sheet1.Cells[i, 5].Value.ToString());
log.Info("当前订单Number Of Lanes:" + NumberOfLanes); log.Info("当前订单Number Of Lanes:" + NumberOfLanes);
lbl_NOFShow.Text = sheet1.Cells[i, 5].Value.ToString(); lbl_NOFShow.Text = sheet1.Cells[i, 5].Value.ToString();
@@ -726,14 +727,14 @@ namespace TetraPackOCR
} }
} }
if (!string.IsNullOrEmpty(QSV)) if (!string.IsNullOrEmpty(currentQSV))
{ {
string qsv; string qsv;
//根据得到的QSV遍历sheet2 找产品规格和宽度梯度 //根据得到的QSV遍历sheet2 找产品规格和宽度梯度
for (int j = 1; j <= sheet2.Dimension.Rows; j++) for (int j = 1; j <= sheet2.Dimension.Rows; j++)
{ {
qsv = sheet2.Cells[j, 1].Value.ToString(); qsv = sheet2.Cells[j, 1].Value.ToString();
if (qsv == QSV) if (qsv == currentQSV)
{ {
ProductStandard = sheet2.Cells[j, 2].Value.ToString(); ProductStandard = sheet2.Cells[j, 2].Value.ToString();
lbl_ProductStandardShow.Text = ProductStandard; lbl_ProductStandardShow.Text = ProductStandard;
@@ -1023,7 +1024,7 @@ namespace TetraPackOCR
/// </summary> /// </summary>
void ClearData() void ClearData()
{ {
QSV = null; ProductStandard = null; ProductStandard = null;
NumberOfLanes = 0; width = 0; Gradient = 0; DistX = 0; DistY = 0; NumberOfLanes = 0; width = 0; Gradient = 0; DistX = 0; DistY = 0;
} }
/// <summary> /// <summary>
@@ -2024,7 +2025,6 @@ namespace TetraPackOCR
log.Info("当前订单OCR区域共" + nol + "组:"); log.Info("当前订单OCR区域共" + nol + "组:");
for (int item = 0; item < nol; item++) for (int item = 0; item < nol; item++)
{ {
if (item == 0) if (item == 0)
{ {
ocrx = xx - ((float)DistX) * ((float)Math.Cos((rr * Math.PI) / 180)) - ((float)DistY) * ((float)Math.Sin((rr * Math.PI) / 180)); ocrx = xx - ((float)DistX) * ((float)Math.Cos((rr * Math.PI) / 180)) - ((float)DistY) * ((float)Math.Sin((rr * Math.PI) / 180));
@@ -2042,7 +2042,6 @@ namespace TetraPackOCR
l.Add(ocry); l.Add(ocry);
ocrxx.Add(ocrx); ocrxx.Add(ocrx);
ocryy.Add(ocry); ocryy.Add(ocry);
} }
log.Info("第" + (item + 1) + "组坐标为X" + ocrxx[item] + ",Y:" + ocryy[item] + "。"); log.Info("第" + (item + 1) + "组坐标为X" + ocrxx[item] + ",Y:" + ocryy[item] + "。");