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