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