Accept Merge Request #155: (feature/hant -> develop)

Merge Request: 派单

Created By: @todayswind
Accepted By: @todayswind
URL: https://g-bcrc3009.coding.net/p/allocatr/d/allocatr/git/merge/155?initial=true
This commit is contained in:
todayswind 2025-06-18 11:15:46 +08:00 committed by Coding
commit 4f703b57a7

View File

@ -22,6 +22,7 @@ use think\exception\ValidateException;
class Worker extends Backend
{
protected $noNeedRight = ['dispatchList','dispatchMapList'];
/**
* Worker模型对象
* @var \app\admin\model\Worker
@ -283,6 +284,7 @@ class Worker extends Backend
$build = model('worker')
->where('status', 1)
->where('type',2)
->with(['area'])
->withCount(['myorder' => function ($query) {
$query->where('status', Order::STATUS_FINISHED);
@ -333,7 +335,7 @@ SELECT id,
point(lng, lat),
point(?, ?)
) AS distance
FROM fa_worker where status = 1
FROM fa_worker where status = 1 and type = 2
) AS t
WHERE distance < 50000
ORDER BY distance;",[$order->lng,$order->lat]);