diff --git a/business/jxstore/tempop/tempop.go b/business/jxstore/tempop/tempop.go index ac15da539..86de6121f 100644 --- a/business/jxstore/tempop/tempop.go +++ b/business/jxstore/tempop/tempop.go @@ -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)