From e5e68f83f5dbbd885a143d049703be683ffbc4b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Wed, 10 Mar 2021 15:48:27 +0800 Subject: [PATCH] aa --- business/jxstore/report/report.go | 1 + 1 file changed, 1 insertion(+) 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 }