diff --git a/business/jxstore/cms/job.go b/business/jxstore/cms/job.go index 0d89a07cc..6acffa2fb 100644 --- a/business/jxstore/cms/job.go +++ b/business/jxstore/cms/job.go @@ -710,6 +710,7 @@ func CheckJdDeliveryWeight(ctx *jxcontext.Context) (err error) { return retVal, err } if waybill.DeliveryID == deliveryOrder.VendorWaybillID { + deliveryOrder.IsWeight = 1 if waybill.Weight > 3 && math.Floor(deliveryOrder.Weight) < math.Floor(waybill.Weight) { diffPrice := (math.Floor(waybill.Weight) - math.Floor(deliveryOrder.Weight)) * waybillKgPrice if err != nil { @@ -718,8 +719,10 @@ func CheckJdDeliveryWeight(ctx *jxcontext.Context) (err error) { if err = financial.AddExpendUpdateAccount(db, userBill, model.BillTypeJdWaybillOverWeight, utils.Float64TwoInt(diffPrice)); err != nil { return retVal, err } + deliveryOrder.IsWeight = 2 } } + dao.UpdateEntity(db, deliveryOrder, "IsWeight") return retVal, err }, deliveryOrders) tasksch.HandleTask(task, nil, true).Run()