diff --git a/business/jxstore/report/report.go b/business/jxstore/report/report.go index 732fb5e47..de96a2061 100644 --- a/business/jxstore/report/report.go +++ b/business/jxstore/report/report.go @@ -561,6 +561,7 @@ func CalculateCoverArea(coordinate []string, vendorID int) (area float64) { // sum += (xyList[0][0] - xyList[len(xyList)-1][0]) * (xyList[0][1] + xyList[len(xyList)-1][1]) sum += xyList[len(xyList)-1][0]*xyList[0][1] - xyList[0][0]*xyList[len(xyList)-1][1] sum /= float64(2) + sum = math.Abs(sum) area, _ = decimal.NewFromFloat(sum).Round(3).Float64() return area }