From 84ba1d3f701f6f128ffc1b23b333453ea153b5f5 Mon Sep 17 00:00:00 2001
From: liujiandao <274878379@qq.com>
Date: 星期二, 09 四月 2024 09:56:19 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.5.5:10010/r/silk/silkServer

---
 service/fineness.go |   21 +++++++++++++++------
 1 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/service/fineness.go b/service/fineness.go
index e44e1ab..863c71f 100644
--- a/service/fineness.go
+++ b/service/fineness.go
@@ -51,12 +51,12 @@
 				})
 			}
 			item = &models.FinenessCheckItem{
-				FinenessRegisterID:   finenessRegister.ID,
-				Position:             lastCarNo,
-				FinenessRoundingItem: roundingItems,
-				Deviation:            deviation,
-				FinenessGrade:        finenessGrade,
-				Remark:               "",
+				FinenessRegisterID:    finenessRegister.ID,
+				Position:              lastCarNo,
+				FinenessRoundingItems: roundingItems,
+				Deviation:             deviation,
+				FinenessGrade:         finenessGrade,
+				Remark:                "",
 			}
 
 			finenessCheckItems = append(finenessCheckItems, item)
@@ -202,3 +202,12 @@
 	result = float32(math.Round(float64(result)*10) / 10)
 	return result
 }
+
+func FinenessReCheck(finenessCheck *models.FinenessCheck) (err error) {
+	standardMap, err := GetSilkRankStandard()
+	if err != nil {
+		return err
+	}
+	finenessCheck.FinenessGrade = CalcFinenessGrade(finenessCheck.Deviation, finenessCheck.TotalDeviation, finenessCheck.Cleanliness, finenessCheck.Purity, finenessCheck.TwiceChange, standardMap)
+	return
+}

--
Gitblit v1.8.0