From c585dd8ddbbdc5dece1033bd6a1201493ed610a0 Mon Sep 17 00:00:00 2001
From: patrick.xu <patrick.xu@broconcentric.com>
Date: 星期一, 24 五月 2021 08:50:12 +0800
Subject: [PATCH] 修改M423Project版本号

---
 SizeDetection.cs |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/SizeDetection.cs b/SizeDetection.cs
index 5656971..2f5f8cb 100644
--- a/SizeDetection.cs
+++ b/SizeDetection.cs
@@ -334,6 +334,10 @@
                         btyLength += compL;
                         btyWidth += compW;
 
+                        //闄愬埗绮惧害5浣�
+                        btyLength = Math.Round(btyLength, 5);
+                        btyWidth = Math.Round(btyWidth, 5);
+
                         lengthMeasureState = (btyLength >= opcConfig.batteryLengthLimit.Min && btyLength <= opcConfig.batteryLengthLimit.Max) ? MeasureState.OK : MeasureState.NG;
                         widthMeasureState = (btyWidth >= opcConfig.batteryWidthLimit.Min && btyWidth <= opcConfig.batteryWidthLimit.Max) ? MeasureState.OK : MeasureState.NG;
 
@@ -652,6 +656,15 @@
         {
             GregorianCalendar gc = new GregorianCalendar();
             int weekOfYear = gc.GetWeekOfYear(dt, CalendarWeekRule.FirstDay, DayOfWeek.Monday);
+
+            var weekPlusStr = ConfigurationManager.AppSettings["WeekPlus"];
+            int weekPlus = 0;
+            if (!int.TryParse(weekPlusStr, out weekPlus))
+            {
+                weekPlus = 0;
+            }
+            weekOfYear += weekPlus;
+
             string week = weekOfYear.ToString().Length == 1 ? "0" + weekOfYear.ToString() : weekOfYear.ToString();
             string year = dt.Year.ToString().Substring(dt.Year.ToString().Length - 1, 1);
             return year + week;

--
Gitblit v1.8.0