aa
This commit is contained in:
@@ -8,8 +8,6 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"git.rosy.net.cn/jx-callback/globals"
|
|
||||||
|
|
||||||
"git.rosy.net.cn/baseapi/platformapi/mtwmapi"
|
"git.rosy.net.cn/baseapi/platformapi/mtwmapi"
|
||||||
|
|
||||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
"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++ {
|
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+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])
|
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[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 += (xyList[len(xyList)-1][0]*xyList[0][1] - xyList[0][0]*xyList[len(xyList)-1][1])
|
||||||
sum /= float64(2)
|
sum /= float64(2)
|
||||||
sum = math.Abs(sum)
|
sum = math.Abs(sum)
|
||||||
sum = utils.Str2Float64(fmt.Sprintf("%.2f", sum))
|
sum = utils.Str2Float64(fmt.Sprintf("%.2f", sum))
|
||||||
globals.SugarLogger.Debugf("CalculateCoverArea sum: []%v", sum)
|
|
||||||
return sum
|
return sum
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1872,7 +1872,7 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) {
|
|||||||
storeMaps []*model.StoreMap
|
storeMaps []*model.StoreMap
|
||||||
db = dao.GetDB()
|
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,
|
task := tasksch.NewParallelTask("uuuuu", tasksch.NewParallelConfig().SetIsContinueWhenError(true), ctx,
|
||||||
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
||||||
storeMap := batchItemList[0].(*model.StoreMap)
|
storeMap := batchItemList[0].(*model.StoreMap)
|
||||||
|
|||||||
Reference in New Issue
Block a user