This commit is contained in:
苏尹岚
2020-09-01 15:20:33 +08:00
parent 9cdee81b21
commit 9eb7a3b841
2 changed files with 57 additions and 0 deletions

View File

@@ -1584,6 +1584,33 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) {
// fmt.Println("updateList2", utils.Format4Output(updateList, false))
// fmt.Println("deleteList2", deleteList)
// cms.DeletedDuplicateWaitAuditData(ctx, dao.GetDB())
type tmp struct {
jdID string
s float64
}
var (
ss []*tmp
)
storeMaps, _ := dao.GetStoresMapList(dao.GetDB(), []int{model.VendorIDJD}, nil, nil, model.StoreStatusAll, model.StoreIsSyncAll, "", "")
for _, v := range storeMaps {
station, _ := jd.GetAPI("320406").GetDeliveryRangeByStationNo2(v.VendorStoreID)
if station.DeliveryRangeType == 2 {
ss = append(ss, &tmp{
jdID: v.VendorStoreID,
s: jxutils.ComputeSignedArea(strings.Split(station.DeliveryRange, ";")),
})
}
}
for i := 0; i < len(ss)-1; i++ {
for j := 0; j < len(ss)-1-i; j++ {
if ss[j].s > ss[j+1].s {
temp := ss[j]
ss[j] = ss[j+1]
ss[j+1] = temp
}
}
}
fmt.Println("111111111111111111111111111111111111111", utils.Format4Output(ss, false))
return err
}