通知
This commit is contained in:
parent
c9944b8b07
commit
495c0e3f33
|
|
@ -44,7 +44,7 @@ class OrderDispatchLog
|
|||
'dispatch_id' => $dispatch->id,
|
||||
'type' => 1,
|
||||
'outid' => md5(time().rand(1000,9999).rand(1000,9999)),
|
||||
'craate_time' => date('Y-m-d H:i:s'),
|
||||
'create_time' => date('Y-m-d H:i:s'),
|
||||
'status' => $alibaba_dyvms['sync']?1:0
|
||||
];
|
||||
$service = new NoticeLogic();
|
||||
|
|
|
|||
|
|
@ -69,8 +69,10 @@ class CheckOrderDispatchGotCommand extends Command
|
|||
//预约时间过了未上门检测
|
||||
private function _toarrive(){
|
||||
try {
|
||||
|
||||
//自动派单,改为待跟进
|
||||
$Model = new OrderDispatch();
|
||||
$now = date('Y-m-d H:i:s', time() - 5 * 60); //创建三十分名以上未接的任务
|
||||
$now = date('Y-m-d H:i:s');
|
||||
$count = $Model->whereIn('status', [OrderDispatch::STATUS_PLANIT,OrderDispatch::STATUS_OVERTIME])
|
||||
->where('type', 2)
|
||||
->where('follow', 1)
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ class CheckSmsPlantCommand extends Command
|
|||
|
||||
protected function execute(Input $input, Output $output){
|
||||
$Model = new OrderDispatch();
|
||||
$now = date('Y-m-d H:i:s'); //两小时通知
|
||||
$now = date('Y-m-d H:i:s'); //提前两小时通知
|
||||
$afterTwoHours = date('Y-m-d H:i:s', strtotime('+2 hours'));
|
||||
$Model->whereIn('status',[OrderDispatch::STATUS_PLANIT,OrderDispatch::STATUS_OVERTIME])
|
||||
->where('plan_time','between',[$now,$afterTwoHours])
|
||||
|
|
@ -32,7 +32,7 @@ class CheckSmsPlantCommand extends Command
|
|||
$ids[] = $item->id;
|
||||
try {
|
||||
SendMailLogic::sendToWorker($item->worker_tel);
|
||||
|
||||
echo '短信发送完成:'.$item->id.PHP_EOL;
|
||||
}catch (Exception $exception){
|
||||
|
||||
echo '短信发送失败:'.$exception->getMessage().PHP_EOL;
|
||||
|
|
@ -43,7 +43,6 @@ class CheckSmsPlantCommand extends Command
|
|||
'create_time' => date('Y-m-d H:i:s', time())
|
||||
]);
|
||||
}
|
||||
echo '短信发送完成:'.$item->id.PHP_EOL;
|
||||
}
|
||||
if(!empty($ids)){
|
||||
OrderDispatch::whereIn('id',$ids)->update(['notice_num'=>3,'notice_time'=>date('Y-m-d H:i:s')]);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user