Merge remote-tracking branch 'origin/develop' into feature/hant

# Conflicts:
#	application/admin/controller/AutoDispatchLogic.php
#	application/common/Logic/OrderLogic.php
This commit is contained in:
hant 2025-06-05 22:14:46 +08:00
commit 7536a6d7cc
11 changed files with 38 additions and 10 deletions

View File

@ -4,6 +4,7 @@ namespace app\admin\behavior;
use app\admin\controller\SendMailLogic; use app\admin\controller\SendMailLogic;
use app\admin\model\OrderDispatch; use app\admin\model\OrderDispatch;
use app\admin\model\TtsLog;
use app\common\Logic\NoticeLogic; use app\common\Logic\NoticeLogic;
use app\common\model\Order; use app\common\model\Order;
use think\Exception; use think\Exception;
@ -48,6 +49,7 @@ class OrderDispatchLog
]; ];
$service = new NoticeLogic(); $service = new NoticeLogic();
$service->dispatchNotice($dispatch); $service->dispatchNotice($dispatch);
TtsLog::create($data);
} }
} }

View File

@ -55,7 +55,7 @@ class AutoDispatchLogic
//日志 //日志
$hookparams['order'] = $order; $hookparams['order'] = $order;
$hookparams['role'] = 1; $hookparams['role'] = 1;
$hookparams['auth'] = $auth; $hookparams['auth'] = null;
$hookparams['remark'] = '系统自动完成派单';//. $worker->name.'('.$worker->tel.')'; $hookparams['remark'] = '系统自动完成派单';//. $worker->name.'('.$worker->tel.')';
Hook::listen('order_change', $hookparams); Hook::listen('order_change', $hookparams);

View File

@ -130,7 +130,7 @@ class Message extends Backend
$count = 0; $count = 0;
//超管不提醒新消息 //超管不提醒新消息
//if(!$this->auth->isSuperAdmin()){ //if(!$this->auth->isSuperAdmin()){
if(!$this->auth->id != 1){ // if(!$this->auth->id != 1){
$count = $this->model $count = $this->model
->where('type',1) ->where('type',1)
->where('to_id',$this->auth->id) ->where('to_id',$this->auth->id)
@ -139,7 +139,7 @@ class Message extends Backend
->whereRaw("FIND_IN_SET({$this->auth->id}, read_uid) = 0 OR read_uid = '' or read_uid is null") ->whereRaw("FIND_IN_SET({$this->auth->id}, read_uid) = 0 OR read_uid = '' or read_uid is null")
->whereTime('create_time', '>=', '-3 days') ->whereTime('create_time', '>=', '-3 days')
->count(); ->count();
} // }
return [ return [
'count' => $count 'count' => $count
]; ];

View File

@ -141,7 +141,7 @@ class Dispatchrecord extends Backend
$dispatch->follow = 1; $dispatch->follow = 1;
} }
$dispatch->record_count ++; $dispatch->record_count ++;
$params['admin_id'] = $this->auth->id; //$params['admin_id'] = $this->auth->id;
$result = $this->model->allowField(true)->save($params); $result = $this->model->allowField(true)->save($params);
$dispatch->save(); $dispatch->save();
Db::commit(); Db::commit();

View File

@ -17,7 +17,7 @@ class CheckOrderDispatchGotCommand extends Command
protected function configure() protected function configure()
{ {
$this->setName('check:dispatch-toget') $this->setName('check:dispatch-toget')
->setDescription('【自动派单未接单检测,五分钟未接单,重派派单】/【自动派单上门时间已到,未完成上门】,5分钟执行一次'); ->setDescription('【自动派单未接单检测,五分钟未接单,重派派单】/【自动派单上门时间已到,未完成上门】,分钟执行一次');
} }
protected function execute(Input $input, Output $output){ protected function execute(Input $input, Output $output){

View File

@ -14,7 +14,7 @@ class CheckSmsPlantCommand extends Command
protected function configure() protected function configure()
{ {
$this->setName('check:dispatch-sms-plant') $this->setName('check:dispatch-sms-plant')
->setDescription('dispatch已预约任务短信提醒小时执行一次'); ->setDescription('dispatch已预约任务短信提醒5分钟执行一次');
} }
protected function execute(Input $input, Output $output){ protected function execute(Input $input, Output $output){

View File

@ -17,7 +17,7 @@ class CheckTTSOverTimeCommand extends Command
protected function configure() protected function configure()
{ {
$this->setName('check:dispatch-tts-overtime') $this->setName('check:dispatch-tts-overtime')
->setDescription('dispatch超时未完成任务语音通知10分钟执行一次'); ->setDescription('dispatch超时未完成任务语音通知5分钟执行一次');
} }
protected function execute(Input $input, Output $output){ protected function execute(Input $input, Output $output){

View File

@ -17,7 +17,7 @@ class CheckTTSPlantCommand extends Command
protected function configure() protected function configure()
{ {
$this->setName('check:dispatch-tts-plant') $this->setName('check:dispatch-tts-plant')
->setDescription('dispatch已预约任务语音提醒小时执行一次'); ->setDescription('dispatch已预约任务语音提醒5分钟执行一次');
} }
protected function execute(Input $input, Output $output){ protected function execute(Input $input, Output $output){

View File

@ -17,7 +17,7 @@ class CheckTTSTaskCommand extends Command
protected function configure() protected function configure()
{ {
$this->setName('check:dispatch-tts-task') $this->setName('check:dispatch-tts-task')
->setDescription('语音发送任务,每分钟执行一次'); ->setDescription('语音发送任务,每1分钟执行一次');
} }
protected function execute(Input $input, Output $output){ protected function execute(Input $input, Output $output){

View File

@ -79,6 +79,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'jstree'],
// } // }
return Table.api.formatter.operate.call(this, value, row, index); return Table.api.formatter.operate.call(this, value, row, index);
}, },
align: 'left',
buttons: [ buttons: [
{ {
name: "setArea", name: "setArea",
@ -91,6 +92,31 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'jstree'],
icon: 'fa fa-add', icon: 'fa fa-add',
refresh: true, refresh: true,
}, },
{
name: 'edit',
text: "修改",
icon: 'fa fa-pencil',
title: __('Edit'),
extend: 'data-toggle="tooltip" data-container="body"',
classname: 'btn btn-xs btn-info btn-editone',
},
{
name: 'del',
text: "删除",
icon: 'fa fa-trash',
title: __('Delete'),
extend: 'data-toggle="tooltip"',
classname: 'btn btn-xs btn-danger btn-delone',
visible: function (row) {
if (row.id == Config.admin.id) {
return false;
}
if (row.id == 1 || row.id == 100) {
return false;
}
return true;
}
},
], ],
} }
] ]

View File

@ -90,7 +90,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form','layer'], function ($,
{field: 'worker_name', title: __('Worker_name'), operate: 'LIKE'}, {field: 'worker_name', title: __('Worker_name'), operate: 'LIKE'},
{field: 'worker_tel', title: __('Worker_tel'), operate: 'LIKE'}, {field: 'worker_tel', title: __('Worker_tel'), operate: 'LIKE'},
{field: 'type', title: __('Type'), searchList: {"1":__('Type 1'),"2":__('自动')}, formatter: Table.api.formatter.normal, {field: 'type', title: __('Type'), searchList: {"1":__('Type 1'),"2":__('自动')}, formatter: Table.api.formatter.normal,
defaultValue: '1' // defaultValue: '1'
}, },