订单合并前
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"bytes"
|
||||
"context"
|
||||
"fmt"
|
||||
"math"
|
||||
"regexp"
|
||||
"strings"
|
||||
"time"
|
||||
@@ -1595,6 +1596,7 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) {
|
||||
type SpecialtyStoreSkus struct {
|
||||
StoreID int `json:"门店ID"`
|
||||
StoreName string `json:"门店名"`
|
||||
City string `json:"城市"`
|
||||
Area float64 `json:"面积"`
|
||||
}
|
||||
var (
|
||||
@@ -1602,6 +1604,7 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) {
|
||||
excelTitle = []string{
|
||||
"门店ID",
|
||||
"门店名",
|
||||
"城市",
|
||||
"面积",
|
||||
}
|
||||
sheetList []*excel.Obj2ExcelSheetConfig
|
||||
@@ -1619,7 +1622,7 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) {
|
||||
strs := strings.Split(station.DeliveryRange, ";")
|
||||
ss = append(ss, &tmp{
|
||||
JdID: v.VendorStoreID,
|
||||
S: jxutils.ComputeSignedArea(strs[:len(strs)-1]),
|
||||
S: math.Round(jxutils.ComputeSignedArea(strs[:len(strs)-1])),
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -1634,9 +1637,11 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) {
|
||||
}
|
||||
for _, v := range ss {
|
||||
storeDetail, _ := dao.GetStoreDetailByVendorStoreID(dao.GetDB(), v.JdID, model.VendorIDJD)
|
||||
place, _ := dao.GetPlaceByCode(dao.GetDB(), storeDetail.CityCode)
|
||||
specialtyStoreSku := &SpecialtyStoreSkus{
|
||||
StoreID: storeDetail.ID,
|
||||
StoreName: storeDetail.Name,
|
||||
City: place.Name,
|
||||
Area: v.S,
|
||||
}
|
||||
specialtyStoreSkus = append(specialtyStoreSkus, specialtyStoreSku)
|
||||
|
||||
Reference in New Issue
Block a user