|
@@ -110,11 +110,14 @@ func RefreshCalculateNszydpjjs(edbInfoId, source, formulaInt int, fromEdbInfo *E
|
|
|
}
|
|
|
}
|
|
|
valArrLen := len(valArr)
|
|
|
- var totalVal float64
|
|
|
+ totalVal := decimal.NewFromFloat(0.00)
|
|
|
for _, v := range valArr {
|
|
|
- totalVal = totalVal + v
|
|
|
+ //totalVal = totalVal + v
|
|
|
+ newDecimal := decimal.NewFromFloat(v)
|
|
|
+ totalVal = totalVal.Add(newDecimal)
|
|
|
}
|
|
|
- af := decimal.NewFromFloat(totalVal)
|
|
|
+ //af := decimal.NewFromFloat(totalVal)
|
|
|
+ af := totalVal
|
|
|
bf := decimal.NewFromFloat(float64(valArrLen))
|
|
|
val, _ := af.Div(bf).Float64()
|
|
|
currentDate, err := time.Parse(utils.FormatDate, av)
|