From 3d7ce863defd866dcd36231e3ddca68308385b92 Mon Sep 17 00:00:00 2001 From: CPL <1179393954@qq.com> Date: Fri, 11 Apr 2025 11:04:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E6=9D=90=E6=96=99=E7=8E=B0=E5=9C=BA?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LeatherProject/LeatherApp/FrmVerList.resx | 6 +++++- LeatherProject/LeatherApp/Page/FHome.cs | 10 +++++++++- LeatherProject/LeatherApp/Utils/DBUtils.cs | 13 +++++++++---- .../obj/Debug/LeatherApp.FrmVerList.resources | Bin 4536 -> 4687 bytes 4 files changed, 23 insertions(+), 6 deletions(-) diff --git a/LeatherProject/LeatherApp/FrmVerList.resx b/LeatherProject/LeatherApp/FrmVerList.resx index 3744417..1f186e7 100644 --- a/LeatherProject/LeatherApp/FrmVerList.resx +++ b/LeatherProject/LeatherApp/FrmVerList.resx @@ -118,7 +118,11 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - v1.2.0.11(2024-12-09) + v1.2.0.12(2025-4-09) +1.门幅显示改为有效门幅 +2.新材料厚度上传修改为最大最小和中间值 +3.加入计米器偏差修正功能 +v1.2.0.11(2024-12-09) 1、修复bug 2、明新ERP更新 3、新材料功能更新 diff --git a/LeatherProject/LeatherApp/Page/FHome.cs b/LeatherProject/LeatherApp/Page/FHome.cs index 7e120ef..03e088a 100644 --- a/LeatherProject/LeatherApp/Page/FHome.cs +++ b/LeatherProject/LeatherApp/Page/FHome.cs @@ -3163,7 +3163,8 @@ namespace LeatherApp.Page errStep = 5; //门幅更新(含两侧孔洞)x,y cm float faceWidthX_cm = (float)Math.Round((scanPhotos0.photoIndex + 1) * mat.Height * 1.0f / Config.cm2px_y, 2); - float faceWidthY_cm = (float)Math.Round((mat.Width + Config.MarginHoleWidth * 2) * 1.0f / Config.cm2px_x + Config.EdgeOffset, 2); + //float faceWidthY_cm = (float)Math.Round((mat.Width + Config.MarginHoleWidth * 2) * 1.0f / Config.cm2px_x + Config.EdgeOffset, 2); + float faceWidthY_cm = (float)Math.Round((mat.Width) * 1.0f / Config.cm2px_x + Config.EdgeOffset, 2); faceWidthX_cm = (float)Math.Round(faceWidthX_cm, 2); #if OnLine faceWidthY_cm = (float)Math.Round(faceWidthY_cm, 2); @@ -3726,6 +3727,12 @@ namespace LeatherApp.Page //LastSplitLength = model.Len - confMgr.SysConfigParams.CutDis; model.Len = Math.Round(lastLength, 2); } + if(model.Len <= 1) + { + AddTextEvent(DateTime.Now, "入库失败", $"计米长度小于1m", WarningEnum.Low); + _isDefect = false; + return; + } model.BatchId = batchId; model.ReelId = reelId; @@ -5659,6 +5666,7 @@ namespace LeatherApp.Page frm.ShowDialog(); if (frm.IsOK) { + AddTextEvent(DateTime.Now, "标准修改", $"条码({curRecord.BarCode})批号({curRecord.BatchId})卷号({curRecord.ReelId})。"); curRecord.ProductInfo.QualifiedLimitList = frm.QualifiedLimits; } diff --git a/LeatherProject/LeatherApp/Utils/DBUtils.cs b/LeatherProject/LeatherApp/Utils/DBUtils.cs index 7459cb0..c5da9d2 100644 --- a/LeatherProject/LeatherApp/Utils/DBUtils.cs +++ b/LeatherProject/LeatherApp/Utils/DBUtils.cs @@ -274,7 +274,7 @@ namespace LeatherApp.Utils if(fdinfo.Length > 0) fdinfo = fdinfo.Remove(fdinfo.Length - 1); } - //厚度均值 + //厚度均值 再取最大最小中间值 double agvhd = 0; double hd1 = 0, hd2 = 0, hd3 = 0; if (records.ThicknessList != null && records.ThicknessList.Count > 0) @@ -293,9 +293,14 @@ namespace LeatherApp.Utils data3.Add(item.Value3); } agvhd = data.Average(); - hd1 = data1.Average(); - hd2 = data2.Average(); - hd3 = data3.Average(); + //现场需求不使用均值,使用最大最小和中间值 + //hd1 = data1.Average(); + //hd2 = data2.Average(); + //hd3 = data3.Average(); + data.Sort(); + hd1 = data.Min(); + hd2 = data[data.Count/2]; + hd3 = data.Max(); } //幅宽 double agvmf = 0; diff --git a/LeatherProject/LeatherApp/obj/Debug/LeatherApp.FrmVerList.resources b/LeatherProject/LeatherApp/obj/Debug/LeatherApp.FrmVerList.resources index 0548345cec884d650069ec1081699a04d4a63539..ad05db39f2ac330c9a7884808a3a6084dba4e614 100644 GIT binary patch delta 165 zcmdm?d|qY3o%)YTWrli2dIoxiMjA#2My9$Zx(1e-yj+HQFQ>0~y0i7!jD63S?0Pn3 z=aU_~p3UieHnjsH&dX(__iWmRXLBb!n>O=l->j#*mOa_g^<>Y2C;QjIR5v_bvi#Yc zhNm0)pHAv|vSaPb>06#Q?BV4y)_dBu;A!j97wZ;EJ>R(b>C6>R8~dMbUkB2<{xmj+7!