数据分析平台 测试良率计算公式调整
This commit is contained in:
parent
06d52c108e
commit
8aa2e451ab
@ -1489,8 +1489,8 @@ func FTList(r *request.FTList) ([]*model.FTShowList, int64) {
|
||||
firstPassQuantityDecimal, _ := decimal.NewFromString(ftShowList.FirstPassQuantity)
|
||||
passQuantityDecimal, _ := decimal.NewFromString(ftShowList.PassQuantity)
|
||||
reportPassQuantityDecimal, _ := decimal.NewFromString(ftShowList.ReportPassQuantity)
|
||||
if !testQuantityDecimal.IsZero() {
|
||||
diff := reportTestQuantityDecimal.Sub(testQuantityDecimal).Div(testQuantityDecimal).Round(4).
|
||||
if !reportTestQuantityDecimal.IsZero() {
|
||||
diff := reportTestQuantityDecimal.Sub(testQuantityDecimal).Div(reportTestQuantityDecimal).Round(4).
|
||||
Mul(decimal.NewFromInt(100))
|
||||
if reportTestQuantityDecimal.Sub(testQuantityDecimal).LessThan(decimal.NewFromInt(0)) ||
|
||||
decimal.NewFromInt(5).LessThanOrEqual(diff) {
|
||||
@ -1498,6 +1498,10 @@ func FTList(r *request.FTList) ([]*model.FTShowList, int64) {
|
||||
}
|
||||
ftShowList.TestQuantityDiff = diff.String() + "%"
|
||||
ftShowList.TestQuantityDiffLabel = testQuantityDiffLabel
|
||||
}
|
||||
if !testQuantityDecimal.IsZero() {
|
||||
//diff := reportTestQuantityDecimal.Sub(testQuantityDecimal).Div(testQuantityDecimal).Round(4).
|
||||
// Mul(decimal.NewFromInt(100))
|
||||
probability := passQuantityDecimal.Sub(firstPassQuantityDecimal).Div(testQuantityDecimal).Round(4).
|
||||
Mul(decimal.NewFromInt(100))
|
||||
if probability.LessThan(decimal.NewFromInt(0)) ||
|
||||
|
Loading…
Reference in New Issue
Block a user