This commit is contained in:
邹宗楠
2023-06-07 11:20:46 +08:00
parent f0422dae20
commit 2b4b23b2f5
9 changed files with 44 additions and 21 deletions

View File

@@ -35,6 +35,7 @@ func (c *BaseScheduler) CreateWaybillOnProviders(ctx *jxcontext.Context, order *
excludeCourierVendorIDMap := jxutils.IntList2Map(excludeCourierVendorIDs)
errList := errlist.New()
store, _ := dao.GetStoreDetail(dao.GetDB(), order.JxStoreID, order.VendorID, order.VendorOrgCode)
for _, storeCourier := range storeCourierList {
switch storeCourier.Status {
case model.YES:
@@ -45,8 +46,12 @@ func (c *BaseScheduler) CreateWaybillOnProviders(ctx *jxcontext.Context, order *
// 创建运单
bill, err2 := c.CreateWaybill(courierVendorID, order, maxDeliveryFee)
if err = err2; err == nil {
bill.DesiredFee += model.WayBillDeliveryMarkUp
bill.ActualFee += model.WayBillDeliveryMarkUp
// 其实这个bill没啥用,运单的创建是通过回调产生的
bill.DesiredFee += int64(model.WayBillDeliveryMarkUp + store.FreightMarkup)
if bill.WaybillVendorID == model.VendorIDFengNiao {
bill.DesiredFee += model.WayBillDeliveryMarkUp
}
bill.DesiredFee += int64(store.FreightMarkup)
bills = append(bills, bill)
if createOnlyOne {
break