Commit fda360ef authored by hujun's avatar hujun

监督执行经纬度

parent e579f45c
...@@ -10,6 +10,7 @@ namespace app\api_broker\controller; ...@@ -10,6 +10,7 @@ namespace app\api_broker\controller;
use app\api_broker\extend\Basic; use app\api_broker\extend\Basic;
use app\api_broker\service\LocationService;
use app\model\AAgents; use app\model\AAgents;
use app\model\AgentsVisitors; use app\model\AgentsVisitors;
use app\model\ASuperviseModel; use app\model\ASuperviseModel;
...@@ -232,7 +233,7 @@ class Supervise extends Basic ...@@ -232,7 +233,7 @@ class Supervise extends Basic
*/ */
public function addSupervise() public function addSupervise()
{ {
$params = $this->params; $params = &$this->params;
/* /*
$params['agent_id']=78;//上传人 $params['agent_id']=78;//上传人
...@@ -255,6 +256,8 @@ class Supervise extends Basic ...@@ -255,6 +256,8 @@ class Supervise extends Basic
$res = $this->aSuperviseModel->saveSupervise($insert); $res = $this->aSuperviseModel->saveSupervise($insert);
if ($res) { if ($res) {
$s_location = new LocationService();
$s_location->add($this->agentId, $params['longitude'], $params['latitude'], 2, $res);
return $this->response("200", "success!", $res); return $this->response("200", "success!", $res);
} else { } else {
return $this->response("101", "失败!"); return $this->response("101", "失败!");
......
...@@ -27,7 +27,7 @@ class ASuperviseModel extends Model ...@@ -27,7 +27,7 @@ class ASuperviseModel extends Model
$data['create_time'] = $time; $data['create_time'] = $time;
$data['update_time'] = $time; $data['update_time'] = $time;
return $this->insert($data); return $this->insertGetId($data);
} }
public function findSuperviseList($pageNo = 1, $pageSize = 15, $order_ = 'id desc', $field, $params = '') { public function findSuperviseList($pageNo = 1, $pageSize = 15, $order_ = 'id desc', $field, $params = '') {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment