物料运单配送员更新修改
This commit is contained in:
@@ -321,7 +321,7 @@ func doDailyWork() {
|
||||
cms.CurVendorSync.SyncStore2(jxcontext.AdminCtx, dao.GetDB(), nil, nil, true, true)
|
||||
|
||||
syncStoreSku()
|
||||
|
||||
localjx.RefreshAllMatterOrderStatus()
|
||||
InitEx()
|
||||
|
||||
// 每天补全前一天与当天的订单
|
||||
|
||||
@@ -771,7 +771,6 @@ func jxOrder2GoodsOrder(ctx *jxcontext.Context, jxOrder *JxOrderInfo, deliveryAd
|
||||
order.FromStoreID = jxOrder.FromStoreID
|
||||
order.WaybillVendorID = model.VendorIDJDWL
|
||||
order.DeliveryFlag = model.OrderDeliveryFlagMaskScheduleDisabled
|
||||
order.DeliveryType = model.OrderDeliveryTypeSelfTake
|
||||
order.Flag = 1
|
||||
}
|
||||
return order, err
|
||||
@@ -808,6 +807,8 @@ func orderSolutionForWuLiao(order *model.GoodsOrder) (err error) {
|
||||
if err != nil || len(goods) == 0 {
|
||||
return err
|
||||
}
|
||||
order.WaybillVendorID = model.VendorIDJDWL
|
||||
dao.UpdateEntity(db, order, "WaybillVendorID")
|
||||
orderSkus := goods[0].Skus
|
||||
if order.Weight <= 5000 { //如果总重量小于5kg就直接发单
|
||||
var (
|
||||
@@ -845,7 +846,6 @@ func orderSolutionForWuLiao(order *model.GoodsOrder) (err error) {
|
||||
}
|
||||
order.EclpOutID = result
|
||||
dao.UpdateEntity(db, order, "EclpOutID")
|
||||
globals.SugarLogger.Debugf("tryToSplitMatterOrderaaa,[%v]", utils.Format4Output(order, false))
|
||||
waybill := &model.Waybill{
|
||||
VendorOrderID: order.VendorOrderID,
|
||||
OrderVendorID: model.VendorIDJX,
|
||||
@@ -1343,6 +1343,7 @@ func GetMatterOrderStatus(ctx *jxcontext.Context, vendorOrderID string) (result
|
||||
waybillCode = getTrackMessagePlusByOrderResult.ResultData[0].WaybillCode
|
||||
cName string
|
||||
cMobile string
|
||||
waybills []*model.Waybill
|
||||
)
|
||||
for _, vv := range getTrackMessagePlusByOrderResult.ResultData {
|
||||
if vv.OpeTitle == "配送员收货" {
|
||||
@@ -1352,7 +1353,9 @@ func GetMatterOrderStatus(ctx *jxcontext.Context, vendorOrderID string) (result
|
||||
break
|
||||
}
|
||||
}
|
||||
waybills, _ := dao.GetWayBillByOrderID(db, -1, model.VendorIDJX, -1, vendorOrderID)
|
||||
sql := "SELECT * FROM waybill WHERE vendor_order_id = ?"
|
||||
sqlParams := []interface{}{vendorOrderID}
|
||||
err = dao.GetRows(db, &waybills, sql, sqlParams)
|
||||
if len(waybills) > 0 {
|
||||
waybills[0].VendorWaybillID = waybillCode
|
||||
waybills[0].CourierName = cName
|
||||
|
||||
Reference in New Issue
Block a user