diff --git a/repository/test.data/report.list.go b/repository/test.data/report.list.go index 7ad0c26..d6e105c 100644 --- a/repository/test.data/report.list.go +++ b/repository/test.data/report.list.go @@ -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)) ||