1
This commit is contained in:
@@ -170,7 +170,7 @@ func (d DeliveryHandler) CreateWaybill(order *model.GoodsOrder, maxDeliveryFee i
|
||||
VendorWaybillID: orderCode,
|
||||
VendorWaybillID2: originID,
|
||||
WaybillVendorID: model.VendorIDUUPT,
|
||||
DesiredFee: jxutils.StandardPrice2Int(utils.Str2Float64(price.NeedPayMoney)),
|
||||
DesiredFee: jxutils.StandardPrice2Int(utils.Str2Float64(price.TotalMoney)),
|
||||
}
|
||||
}
|
||||
delivery.OnWaybillCreated(bill)
|
||||
@@ -192,7 +192,8 @@ func (d DeliveryHandler) GetWaybillFee(order *model.GoodsOrder) (deliveryFeeInfo
|
||||
return nil, err
|
||||
} else {
|
||||
deliveryFeeInfo = &partner.WaybillFeeInfo{}
|
||||
deliveryFeeInfo.DeliveryFee = jxutils.StandardPrice2Int(utils.Str2Float64(orderPrice.NeedPayMoney))
|
||||
// deliveryFeeInfo.DeliveryFee = jxutils.StandardPrice2Int(utils.Str2Float64(orderPrice.NeedPayMoney)) 优惠后金额
|
||||
deliveryFeeInfo.DeliveryFee = jxutils.StandardPrice2Int(utils.Str2Float64(orderPrice.TotalMoney)) // 原始金额
|
||||
}
|
||||
return deliveryFeeInfo, err
|
||||
}
|
||||
@@ -308,37 +309,39 @@ func OnWaybillMsg(req *uuptapi.WaybillCallbackParam) (resp *uuptapi.CallbackResp
|
||||
dao.GetRow(dao.GetDB(), &good, sql, sqlParams)
|
||||
param.OrderVendorID = good.VendorID
|
||||
//查询运单价格
|
||||
if uuPrice, err := api.UuAPI.GetOrderDetail(req.OrderCode); err != nil {
|
||||
uuPrice, err := api.UuAPI.GetOrderDetail(req.OrderCode)
|
||||
if err != nil {
|
||||
reallyPrice = 0
|
||||
} else {
|
||||
reallyPrice = int64((utils.Str2Float64(uuPrice.OrderPrice) - utils.Str2Float64(uuPrice.PriceOff)) * 100)
|
||||
reallyPrice = int64(utils.Str2Float64(uuPrice.OrderPrice) * 100)
|
||||
}
|
||||
actualFee := int64((utils.Str2Float64(uuPrice.OrderPrice)-utils.Str2Float64(uuPrice.PriceOff))*100) - int64(utils.WayBillDeliveryMarkUp)
|
||||
switch req.State {
|
||||
case uuptapi.StateConfirmSuccess:
|
||||
param.Status = model.WaybillStatusNew //5 待调度
|
||||
param.DesiredFee = reallyPrice
|
||||
param.ActualFee = reallyPrice
|
||||
param.ActualFee = actualFee
|
||||
case uuptapi.StateRMGrabsOrder:
|
||||
param.Status = model.WaybillStatusCourierAssigned
|
||||
param.Remark = req.DriverName + "," + req.DriverMobile
|
||||
param.DesiredFee = reallyPrice
|
||||
param.ActualFee = reallyPrice
|
||||
param.ActualFee = actualFee
|
||||
case uuptapi.StateArrivedStore:
|
||||
param.Status = model.WaybillStatusCourierArrived
|
||||
param.DesiredFee = reallyPrice
|
||||
param.ActualFee = reallyPrice
|
||||
param.ActualFee = actualFee
|
||||
case uuptapi.StatePickUp:
|
||||
param.Status = model.WaybillStatusUuPickUp
|
||||
param.DesiredFee = reallyPrice
|
||||
param.ActualFee = reallyPrice
|
||||
param.ActualFee = actualFee
|
||||
case uuptapi.StateArrivedDestination:
|
||||
param.Status = model.WaybillStatusUuArrivedDestination
|
||||
param.DesiredFee = reallyPrice
|
||||
param.ActualFee = reallyPrice
|
||||
param.ActualFee = actualFee
|
||||
case uuptapi.StateReceiverGetGoods:
|
||||
param.Status = model.WaybillStatusDelivered
|
||||
param.DesiredFee = reallyPrice
|
||||
param.ActualFee = reallyPrice
|
||||
param.ActualFee = actualFee
|
||||
case uuptapi.StateOrderCancel:
|
||||
param.Status = model.WaybillStatusCanceled
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user