更新 ele/auto-meal-complete.user.js

This commit is contained in:
502647092 2023-12-06 03:21:47 +00:00
parent e8e8790c3e
commit 042fa4c040

View File

@ -106,18 +106,21 @@
// 骑手到店 并且大于最小上报时长 直接上报出餐
let cookTime = (Date.now() - new Date(cook.activeTime).getTime()) / 1000
let leftTime = cook.mealPreparationInfo.commonShowTime
if (cook.deliveryInfo.distTraceView.traceView.status == '骑士已到店'
&& cook.mealPreparationInfo.minMealCompleteTimeCount < 0
let deliveOnShop = cook.deliveryInfo.distTraceView.traceView.status == '骑士已到店'
if (deliveOnShop && cook.mealPreparationInfo.minMealCompleteTimeCount < 0
&& leftTime < ele.autoSubmitLeftTimeWhenOnShop) {
debug('订单 #' + daySn + ' 骑手到店 订单剩余时间 ' + leftTime + 's 小于 ' + ele.autoSubmitLeftTimeWhenOnShop + 's 模拟提交出餐.')
debug('订单 #' + daySn + ' 骑手已到店.')
debug('订单 #' + daySn + ' 剩余出餐时间 ' + leftTime + 's 小于 ' + ele.autoSubmitLeftTimeWhenOnShop + 's 模拟提交出餐.')
return mealComplete(cook, cookTime, '骑手到店出餐')
}
if (leftTime < ele.autoSubmitLeftTime) {
// 大于最小上报时长 并且距离上报超时不足 直接上报出餐
debug('订单 #' + daySn + ' 骑手未到店 订单剩余时间 ' + leftTime + 's 小于 ' + ele.autoSubmitLeftTime + 's 模拟提交出餐.')
debug('订单 #' + daySn + ' 骑手未到店.')
debug('订单 #' + daySn + ' 剩余出餐时间 ' + leftTime + 's 小于 ' + ele.autoSubmitLeftTime + 's 模拟提交出餐.')
return mealComplete(cook, cookTime, '骑手未到店出餐')
}
debug('订单 #' + daySn + ' 还剩 ' + cook.mealPreparationInfo.commonShowTime + 's 上报超时.')
debug('订单 #' + daySn + ' 还剩 ' + leftTime + 's 上报超时 将于 '
+ (leftTime - (deliveOnShop ? ele.autoSubmitLeftTimeWhenOnShop : ele.autoSubmitLeftTime)) + 's 后自动上报.')
cook.mealPreparationInfo.minMealCompleteTimeCount -= 5
cook.mealPreparationInfo.commonShowTime -= 5
}