- 优化DefScheduler.updateOrderByBill,避免设置bill的WaybillVendorID和VendorWaybillID

This commit is contained in:
gazebo
2019-05-15 23:10:47 +08:00
parent 30d4aec63a
commit 4586ede2dc
5 changed files with 26 additions and 52 deletions

View File

@@ -72,7 +72,7 @@ func (s *DefScheduler) SelfDeliveringAndUpdateStatus(ctx *jxcontext.Context, ven
func (s *DefScheduler) canOrderCreateWaybillNormally(order *model.GoodsOrder) (err error) {
if !(order.LockStatus != model.OrderStatusLocked && order.Status >= model.OrderStatusFinishedPickup && order.Status < model.OrderStatusEndBegin) {
err = fmt.Errorf("当前订单%s没有处于拣货完成且没有结束没有锁定的订单才能进行召唤配送操作", order.VendorOrderID)
} else if model.IsOrderHasWaybill(order) {
} else if model.IsOrderHaveWaybill(order) {
err = fmt.Errorf("当前订单%s已经有了有效的承运人%s了", order.VendorOrderID, jxutils.GetVendorName(order.WaybillVendorID))
}
return err