Commit 185b5c10 张东亮

指定7*16归类高度改为7*20

1 个父辈 93047e7c
...@@ -597,7 +597,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -597,7 +597,7 @@ namespace OnlineStore.DeviceLibrary
//如果检测出<=15,都按照8计算 //如果检测出<=15,都按照8计算
var minHeight = ConfigHelper.Config.Get($"指定厚度以下的归类为8mm", 11); var minHeight = ConfigHelper.Config.Get($"指定厚度以下的归类为8mm", 11);
var minHeight2 = ConfigHelper.Config.Get($"最大厚度归类为12mm", 14); var minHeight2 = ConfigHelper.Config.Get($"最大厚度归类为12mm", 14);
if (height < minHeight) if (height <= minHeight)
{ {
LastHeight = 8; LastHeight = 8;
LastTotalHeight = 8; LastTotalHeight = 8;
...@@ -630,7 +630,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -630,7 +630,8 @@ namespace OnlineStore.DeviceLibrary
foreach (int h in heightList) foreach (int h in heightList)
{ {
//取差值最小的接近值 //取差值最小的接近值
float cha = Math.Abs(h - (height - 4)); var realH = width == 13 ? height : (height - 4);
float cha = Math.Abs(h - realH);
if (cha < minCha) if (cha < minCha)
{ {
LastHeight = h; LastHeight = h;
...@@ -645,8 +646,16 @@ namespace OnlineStore.DeviceLibrary ...@@ -645,8 +646,16 @@ namespace OnlineStore.DeviceLibrary
var height24MaxActualHeight = ConfigHelper.Config.Get($"7寸高度归类为24mm的最大实际高度", 24); var height24MaxActualHeight = ConfigHelper.Config.Get($"7寸高度归类为24mm的最大实际高度", 24);
if (LastTotalHeight >= height24MinActualHeight && LastTotalHeight <= height24MaxActualHeight) if (LastTotalHeight >= height24MinActualHeight && LastTotalHeight <= height24MaxActualHeight)
{ {
LastTotalHeight = 24;
LogUtil.info($"实际高度在{height24MinActualHeight}与{height24MaxActualHeight},实际高度归类为24");
}
var height20MinActualHeight = ConfigHelper.Config.Get($"7寸高度归类为20mm的最小实际高度", 15);
var height20MaxActualHeight = ConfigHelper.Config.Get($"7寸高度归类为20mm的最大实际高度", 20);
if (LastTotalHeight >= height20MinActualHeight && LastTotalHeight <= height20MaxActualHeight)
{
LastTotalHeight = 20; LastTotalHeight = 20;
LogUtil.info($"实际高度在{height24MinActualHeight}与{height24MaxActualHeight},实际高度归类为20"); LogUtil.info($"实际高度在{height20MinActualHeight}与{height20MaxActualHeight},实际高度归类为20");
} }
} }
else if (width > 7) else if (width > 7)
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!