This commit is contained in:
邹宗楠
2024-05-31 13:34:11 +08:00
parent 165988ec58
commit d7263034f3
4 changed files with 17 additions and 16 deletions

View File

@@ -42,8 +42,8 @@ func (c *DeliveryHandler) CreateStore(ctx *jxcontext.Context, storeDetail *dao.S
createStore := &fnpsapi.CreateStoreBaseInfo{
ContactPhone: storeDetail.Tel1,
Address: storeDetail.Address,
Longitude: utils.Int2Float64(storeDetail.Lng) / 1000000,
Latitude: utils.Int2Float64(storeDetail.Lat) / 1000000,
Longitude: jxutils.IntCoordinate2Standard(storeDetail.Lng),
Latitude: jxutils.IntCoordinate2Standard(storeDetail.Lat),
PositionSource: 3,
OutShopCode: utils.Int2Str(storeDetail.ID),
CategoryID: "51",
@@ -119,8 +119,8 @@ func (c *DeliveryHandler) UpdateStore(ctx *jxcontext.Context, storeDetail *dao.S
ChainStoreID: fnStore.ChainStoreID,
ContactPhone: storeDetail.Tel1,
Address: storeDetail.Address,
Longitude: utils.Int2Float64(storeDetail.Lng) / 1000000,
Latitude: utils.Int2Float64(storeDetail.Lat) / 1000000,
Longitude: jxutils.IntCoordinate2Standard(storeDetail.Lng),
Latitude: jxutils.IntCoordinate2Standard(storeDetail.Lat),
PositionSource: 3,
OutShopCode: utils.Int2Str(storeDetail.ID),
CategoryID: "51",

View File

@@ -121,8 +121,8 @@ func (c *DeliveryHandler) CreateWaybill(order *model.GoodsOrder, maxDeliveryFee
OrderType: 1,
PositionSource: 3,
ReceiverAddress: order.ConsigneeAddress,
ReceiverLongitude: utils.Int2Float64(order.ConsigneeLng) / 1000000,
ReceiverLatitude: utils.Int2Float64(order.ConsigneeLat) / 1000000,
ReceiverLongitude: jxutils.IntCoordinate2Standard(order.ConsigneeLng),
ReceiverLatitude: jxutils.IntCoordinate2Standard(order.ConsigneeLat),
GoodsTotalAmountCent: order.SalePrice,
GoodsActualAmountCent: order.ActualPayPrice,
GoodsWeight: utils.Int2Float64(order.Weight) / 1000,
@@ -198,8 +198,8 @@ func (c *DeliveryHandler) GetWaybillFee(order *model.GoodsOrder) (deliveryFeeInf
OrderType: 1,
PositionSource: 3,
ReceiverAddress: order.ConsigneeAddress,
ReceiverLongitude: utils.Int2Float64(order.ConsigneeLng) / 1000000,
ReceiverLatitude: utils.Int2Float64(order.ConsigneeLat) / 1000000,
ReceiverLongitude: jxutils.IntCoordinate2Standard(order.ConsigneeLng),
ReceiverLatitude: jxutils.IntCoordinate2Standard(order.ConsigneeLat),
GoodsTotalAmountCent: order.SalePrice,
GoodsActualAmountCent: order.ActualPayPrice,
GoodsWeight: utils.Int2Float64(order.Weight) / 1000,

View File

@@ -658,15 +658,15 @@ func GetVendorRiderInfo(wayBillVendorId, vendorId int, vendorOrderId, vendorWayb
return nil, err
}
if order.Status >= model.OrderStatusEndBegin {
riderInfo.Longitude = utils.Float64ToStr(utils.Int2Float64(order.ConsigneeLng) / 1000000)
riderInfo.Latitude = utils.Float64ToStr(utils.Int2Float64(order.ConsigneeLat) / 1000000)
riderInfo.Longitude = utils.Float64ToStr(jxutils.IntCoordinate2Standard(order.ConsigneeLng))
riderInfo.Latitude = utils.Float64ToStr(jxutils.IntCoordinate2Standard(order.ConsigneeLat))
} else {
store, err := dao.GetStoreDetail(dao.GetDB(), order.JxStoreID, order.VendorID, order.VendorOrgCode)
if err != nil {
return nil, err
}
riderInfo.Longitude = utils.Float64ToStr(utils.Int2Float64(store.Lng) / 1000000)
riderInfo.Latitude = utils.Float64ToStr(utils.Int2Float64(store.Lat) / 1000000)
riderInfo.Longitude = utils.Float64ToStr(jxutils.IntCoordinate2Standard(store.Lng))
riderInfo.Latitude = utils.Float64ToStr(jxutils.IntCoordinate2Standard(store.Lat))
}
}