This commit is contained in:
苏尹岚
2021-03-11 10:14:55 +08:00
parent 136f54f7fe
commit 33f6a0f304
2 changed files with 1 additions and 5 deletions

View File

@@ -8,8 +8,6 @@ import (
"strings"
"time"
"git.rosy.net.cn/jx-callback/globals"
"git.rosy.net.cn/baseapi/platformapi/mtwmapi"
"git.rosy.net.cn/jx-callback/business/jxutils"
@@ -560,13 +558,11 @@ func CalculateCoverArea(coordinate []string, vendorID int) (area float64) {
for i := 0; i < len(xyList)-1; i++ {
// sum += (xyList[i+1][0] - xyList[i][0]) * (xyList[i+1][1] + xyList[i][1])
sum += (xyList[i][0]*xyList[i+1][1] - xyList[i+1][0]*xyList[i][1])
fmt.Println("CalculateCoverArea ,", sum, xyList[i][0]*xyList[i+1][1], xyList[i+1][0]*xyList[i][1])
}
// 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)
sum = utils.Str2Float64(fmt.Sprintf("%.2f", sum))
globals.SugarLogger.Debugf("CalculateCoverArea sum: []%v", sum)
return sum
}

View File

@@ -1872,7 +1872,7 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) {
storeMaps []*model.StoreMap
db = dao.GetDB()
)
storeMaps, err = dao.GetStoresMapList(db, []int{3}, []int{100002}, nil, model.StoreStatusAll, model.StoreIsSyncAll, "", "", "")
storeMaps, err = dao.GetStoresMapList(db, []int{3}, nil, nil, model.StoreStatusAll, model.StoreIsSyncAll, "", "", "")
task := tasksch.NewParallelTask("uuuuu", tasksch.NewParallelConfig().SetIsContinueWhenError(true), ctx,
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
storeMap := batchItemList[0].(*model.StoreMap)