Commit 5873a063 authored by clone's avatar clone

业绩监督执行列表

parent 5057c0e6
...@@ -388,4 +388,39 @@ class Performance extends Basic ...@@ -388,4 +388,39 @@ class Performance extends Basic
return $this->response("200", "success", $result["date"]); return $this->response("200", "success", $result["date"]);
} }
} }
/**
* 获取时间段进场数据
* @return \think\Response
*/
public function superviseList()
{
header('Access-Control-Allow-Origin:*');
$params = $this->params;
$params = array(
"agent_id" => 78,
"start_time" => "2018-06-12",
"end_time" => "2018-06-20",
"page_no" => 1,
"page_size" => 15
);
$checkResult = $this->validate($params, "PerformanceValidate.verifyOther");
if (true !== $checkResult) {
return $this->response("101", $checkResult);
}
//默认排序一周
$end_day = !empty($params["end_time"]) ? $params["end_time"] : date("Y-m-d", strtotime("-1 day"));
$start_day = !empty($params["start_time"]) ? $params["start_time"] : date("Y-m-d", strtotime("-7 day"));
$page_no = empty($params['page_no']) ? 1 : $params['page_no'];
$page_size = empty($params['page_size']) ? 15 : $params['page_size'];
$result = $this->service_->superviseList($params["agent_id"], $start_day, $end_day, $page_no, $page_size);
if ($result["code"] == 101) {
return $this->response("101", $result["date"]);
} else {
return $this->response("200", "success", $result["date"]);
}
}
} }
...@@ -31,7 +31,8 @@ class Supervise extends Basic ...@@ -31,7 +31,8 @@ class Supervise extends Basic
* *
* @return \think\Response * @return \think\Response
*/ */
public function add() { public function add()
{
if (empty($this->params['id'])) { if (empty($this->params['id'])) {
return $this->response(101, 'Id is null'); return $this->response(101, 'Id is null');
...@@ -39,24 +40,24 @@ class Supervise extends Basic ...@@ -39,24 +40,24 @@ class Supervise extends Basic
$supervision = new AgentsVisitors(); $supervision = new AgentsVisitors();
$data['id'] = ''; $data['id'] = '';
$data['user_id'] = $this->agentId; $data['user_id'] = $this->agentId;
$data['usertable'] = empty($this->params['usertable'])? "" : $this->params['usertable']; $data['usertable'] = empty($this->params['usertable']) ? "" : $this->params['usertable'];
$data['visitor'] = $this->agentPhone; $data['visitor'] = $this->agentPhone;
$data['visitor_name'] = $this->agentName; $data['visitor_name'] = $this->agentName;
$data['agentshopname'] = empty($this->params['agentshopname']) ? '' : $this->params['agentshopname']; $data['agentshopname'] = empty($this->params['agentshopname']) ? '' : $this->params['agentshopname'];
$data['leader_name'] = empty($this->params['leader_name']) ? '': $this->params['leader_name']; $data['leader_name'] = empty($this->params['leader_name']) ? '' : $this->params['leader_name'];
$data['leader_phone'] = empty($this->params['leader_phone']) ? '' : $this->params['leader_phone']; $data['leader_phone'] = empty($this->params['leader_phone']) ? '' : $this->params['leader_phone'];
$data['address'] = $this->params['address']; $data['address'] = $this->params['address'];
$data['remarks'] = $this->params['remarks']; $data['remarks'] = $this->params['remarks'];
$data['longitude'] = $this->params['longitude']; $data['longitude'] = $this->params['longitude'];
$data['latitude'] = $this->params['latitude']; $data['latitude'] = $this->params['latitude'];
$data['distance'] = empty($this->params['distance']) ? '' : $this->params['distance']; $data['distance'] = empty($this->params['distance']) ? '' : $this->params['distance'];
$data['shop_id'] = $this->params['shop_id']; $data['shop_id'] = $this->params['shop_id'];
$data['modified'] = date('Y-m-d H:i:s'); $data['modified'] = date('Y-m-d H:i:s');
$supervision->editData($data, $this->params['id']); $supervision->editData($data, $this->params['id']);
return $this->response(200, '', ['id'=>$this->params['id']]); return $this->response(200, '', [ 'id' => $this->params['id'] ]);
} }
/** /**
...@@ -64,29 +65,30 @@ class Supervise extends Basic ...@@ -64,29 +65,30 @@ class Supervise extends Basic
* *
* @return \think\Response * @return \think\Response
*/ */
public function uploadSuperviseFile() { public function uploadSuperviseFile()
{
$data['status'] = 101; $data['status'] = 101;
$data['msg'] = ''; $data['msg'] = '';
$data['data'] = ''; $data['data'] = '';
$file = $this->request->file('file'); $file = $this->request->file('file');
if($file){ if ($file) {
$path = ROOT_PATH . 'public' . DS . 'resource'. DS . 'lib'. DS .'Attachments'. DS .'images'.DS.'supervise'; $path = ROOT_PATH . 'public' . DS . 'resource' . DS . 'lib' . DS . 'Attachments' . DS . 'images' . DS . 'supervise';
$info = $file->validate(['size'=>1024000,'ext'=>'jpg,png'])->move($path); $info = $file->validate([ 'size' => 1024000, 'ext' => 'jpg,png' ])->move($path);
if($info){ if ($info) {
$img_path = $info->getSaveName(); //生成的图片路径 $img_path = $info->getSaveName(); //生成的图片路径
$data['scene_photo'] = $img_path; $data['scene_photo'] = $img_path;
$data['created'] = date('Y-m-d H:i:s'); $data['created'] = date('Y-m-d H:i:s');
$data['visit_type'] = empty($this->params['visit_type']) ? 0:1; //拜访类型(0代表门店拜访、1代表监督执行) $data['visit_type'] = empty($this->params['visit_type']) ? 0 : 1; //拜访类型(0代表门店拜访、1代表监督执行)
$supervision = new AgentsVisitors(); $supervision = new AgentsVisitors();
$supervision->editData($data); $supervision->editData($data);
$data['status'] = 200; $data['status'] = 200;
$data['msg'] = '上传成功'; $data['msg'] = '上传成功';
$data['data'] = [ $data['data'] = [
'file_name' => CK_IMG_URL .'images/supervise/' . $img_path, 'file_name' => CK_IMG_URL . 'images/supervise/' . $img_path,
'id' => $supervision->id 'id' => $supervision->id
]; ];
}else{ } else {
// 上传失败获取错误信息 // 上传失败获取错误信息
$data['msg'] = $file->getError(); $data['msg'] = $file->getError();
} }
...@@ -105,25 +107,26 @@ class Supervise extends Basic ...@@ -105,25 +107,26 @@ class Supervise extends Basic
* @throws \think\db\exception\ModelNotFoundException * @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException * @throws \think\exception\DbException
*/ */
public function getSupervise() { public function getSupervise()
{
$pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo']; $pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo'];
$pageSize = empty($this->params['pageSize']) ? 15 : $this->params['pageSize']; $pageSize = empty($this->params['pageSize']) ? 15 : $this->params['pageSize'];
$verify = new AAgents(); $verify = new AAgents();
$agent_data = $verify->getAgentInfo('level,store_id,district_id', $this->agentId); $agent_data = $verify->getAgentInfo('level,store_id,district_id', $this->agentId);
if ($agent_data['level'] == 10) { if ($agent_data['level'] == 10) {
$where = 'a.user_id = '.$this->params['agent_id']; $where = 'a.user_id = ' . $this->params['agent_id'];
} else { } else {
$where = 'b.store_id = '.$agent_data['store_id']; $where = 'b.store_id = ' . $agent_data['store_id'];
} }
//拜访类型(0代表门店拜访、1代表监督执行) //拜访类型(0代表门店拜访、1代表监督执行)
if (empty($this->params['visit_type'])) { if (empty($this->params['visit_type'])) {
$where .= ' AND visit_type = 0'; $where .= ' AND visit_type = 0';
$fields = 'a.longitude,a.latitude,c.province,c.city,c.district,c.address as agent_address,a.address,a.remarks,scene_photo,b.name,a.created,leader_name,leader_phone,b.phone,agentshopname'; $fields = 'a.longitude,a.latitude,c.province,c.city,c.district,c.address as agent_address,a.address,a.remarks,scene_photo,b.name,a.created,leader_name,leader_phone,b.phone,agentshopname';
} else { } else {
$where .= ' AND visit_type = 1'; $where .= ' AND visit_type = 1';
$fields = 'a.longitude,a.latitude,a.address,a.remarks,scene_photo,b.name,a.created'; $fields = 'a.longitude,a.latitude,a.address,a.remarks,scene_photo,b.name,a.created';
} }
...@@ -133,15 +136,15 @@ class Supervise extends Basic ...@@ -133,15 +136,15 @@ class Supervise extends Basic
$supervision = new AgentsVisitors(); $supervision = new AgentsVisitors();
$data['list'] = $supervision->getVisitorsList($pageNo, $pageSize, 'a.id desc', $fields, $where); $data['list'] = $supervision->getVisitorsList($pageNo, $pageSize, 'a.id desc', $fields, $where);
if (empty($this->params['visit_type'])) { if (empty($this->params['visit_type'])) {
foreach ($data['list'] as $k => $v) { foreach ($data['list'] as $k => $v) {
$data['list'][$k]['agent_address'] = $data['list'][$k]['province'].$data['list'][$k]['city'].$data['list'][$k]['district'].$data['list'][$k]['agent_address']; $data['list'][$k]['agent_address'] = $data['list'][$k]['province'] . $data['list'][$k]['city'] . $data['list'][$k]['district'] . $data['list'][$k]['agent_address'];
} }
} }
foreach ($data['list'] as $k=>$v) { foreach ($data['list'] as $k => $v) {
$data['list'][$k]['scene_photo'] = CK_IMG_URL .'images/supervise/' . $v['scene_photo']; $data['list'][$k]['scene_photo'] = CK_IMG_URL . 'images/supervise/' . $v['scene_photo'];
} }
$data['total'] = $supervision->getVisitorsListTotal($where); $data['total'] = $supervision->getVisitorsListTotal($where);
return $this->response(200, '', $data); return $this->response(200, '', $data);
...@@ -155,27 +158,28 @@ class Supervise extends Basic ...@@ -155,27 +158,28 @@ class Supervise extends Basic
* @throws \think\db\exception\ModelNotFoundException * @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException * @throws \think\exception\DbException
*/ */
public function searchInfo() { public function searchInfo()
{
$data['status'] = 200; $data['status'] = 200;
$data['data'] = ''; $data['data'] = '';
$data['msg'] = ''; $data['msg'] = '';
$pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo']; $pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo'];
$pageSize = empty($this->params['pageSize']) ? 10 : $this->params['pageSize']; $pageSize = empty($this->params['pageSize']) ? 10 : $this->params['pageSize'];
$where = 'a.status <> 2'; $where = 'a.status <> 2';
if ($this->params['search']) { if ($this->params['search']) {
$where .= ' AND (concat(phone,name) like "%'.$this->params['search'].'%" or store_name like "%'.$this->params['search'].'%")'; $where .= ' AND (concat(phone,name) like "%' . $this->params['search'] . '%" or store_name like "%' . $this->params['search'] . '%")';
} }
if ($this->params['level']) { if ($this->params['level']) {
$where .= ' AND level in ('.$this->params['level'].')'; $where .= ' AND level in (' . $this->params['level'] . ')';
} else { } else {
$where .= ' AND level in (20,40)'; $where .= ' AND level in (20,40)';
} }
if ($where) { if ($where) {
$agent = new AAgents(); $agent = new AAgents();
$field = 'a.id,b.store_name,a.name,a.phone,b.province,b.city,b.district,b.address,b.longitude,b.latitude,a.store_id'; $field = 'a.id,b.store_name,a.name,a.phone,b.province,b.city,b.district,b.address,b.longitude,b.latitude,a.store_id';
$data['data'] = $agent->searchAgentShop($pageNo, $pageSize, 'id DESC', $field, $where); $data['data'] = $agent->searchAgentShop($pageNo, $pageSize, 'id DESC', $field, $where);
} else { } else {
...@@ -196,7 +200,7 @@ class Supervise extends Basic ...@@ -196,7 +200,7 @@ class Supervise extends Basic
$file = request()->file('image'); $file = request()->file('image');
$data = []; $data = [];
if ($file) { if ($file) {
$path = './resource' . DS . 'lib' . DS . 'Attachments'. DS . 'images'. DS . 'supervise'; $path = './resource' . DS . 'lib' . DS . 'Attachments' . DS . 'images' . DS . 'supervise';
$info = $file->validate([ 'size' => 10240000, 'ext' => 'jpg,png' ])//限制100m $info = $file->validate([ 'size' => 10240000, 'ext' => 'jpg,png' ])//限制100m
->move($path); ->move($path);
if ($info) { if ($info) {
...@@ -207,7 +211,7 @@ class Supervise extends Basic ...@@ -207,7 +211,7 @@ class Supervise extends Basic
$data = [ $data = [
'name' => $img_path, 'name' => $img_path,
'path' => CK_IMG_URL .'images/supervise/' . $img_path 'path' => CK_IMG_URL . 'images/supervise/' . $img_path
]; ];
} else { } else {
// 上传失败获取错误信息 // 上传失败获取错误信息
...@@ -226,7 +230,8 @@ class Supervise extends Basic ...@@ -226,7 +230,8 @@ class Supervise extends Basic
* Date: 2018/6/20 * Date: 2018/6/20
* Time: 13:10:33 * Time: 13:10:33
*/ */
public function addSupervise(){ public function addSupervise()
{
$params = $this->params; $params = $this->params;
/* /*
...@@ -238,13 +243,19 @@ class Supervise extends Basic ...@@ -238,13 +243,19 @@ class Supervise extends Basic
*/ */
if (!isset($params['agent_id']) || !isset($params['agent_name']) || !isset($params['remark']) || !isset($params['img'])) { if (!isset($params['agent_id']) || !isset($params['agent_name']) || !isset($params['remark']) || !isset($params['img'])) {
return $this->response("300", "参数不全", [ 'remote_groupid' => '' ]); return $this->response("300", "参数不全");
} }
$res = $this->aSuperviseModel->saveSupervise(['agent_id' => $params['agent_id'],'agent_name' => $params['agent_name'],'remark' => $params['remark'],'img' => $params['img'],'address' => $params['address']]); $insert["agent_id"] = $params['agent_id'];
//dump($UPhoneFollowPp->id);exit; $insert["agent_name"] = $params['agent_name'];
$insert["remark"] = $params['remark'];
$insert["img"] = $params['img'];
$insert["address"] = $params['address'];
$res = $this->aSuperviseModel->saveSupervise($insert);
if ($res) { if ($res) {
return $this->response("200", "success!",$res); return $this->response("200", "success!", $res);
} else { } else {
return $this->response("101", "失败!"); return $this->response("101", "失败!");
} }
...@@ -257,7 +268,8 @@ class Supervise extends Basic ...@@ -257,7 +268,8 @@ class Supervise extends Basic
* Date: 2018/6/15 * Date: 2018/6/15
* Time: 13:10:33 * Time: 13:10:33
*/ */
public function superviseList(){ public function superviseList()
{
$result = ''; $result = '';
...@@ -273,38 +285,38 @@ class Supervise extends Basic ...@@ -273,38 +285,38 @@ class Supervise extends Basic
//搜索条件 start //搜索条件 start
//1.上传时间 //1.上传时间
if (!empty($params['create_time_start']) && !empty($params['create_time_end'])) { if (!empty($params['create_time_start']) && !empty($params['create_time_end'])) {
$where['a.create_time'] = ['between time', [$params['create_time_start']. ' 00:00:00', $params['create_time_end'] . ' 23:59:59']]; $where['a.create_time'] = [ 'between time', [ $params['create_time_start'] . ' 00:00:00', $params['create_time_end'] . ' 23:59:59' ] ];
} }
//2.部门 //2.部门
if (!empty($params['district_id'])) { if (!empty($params['district_id'])) {
$where['b.district_id'] = $params['district_id']; $where['b.district_id'] = $params['district_id'];
} }
//3.门店名称 //3.门店名称
if (!empty($params['store_id'])) { if (!empty($params['store_id'])) {
$where['b.store_id'] = $params['store_id']; $where['b.store_id'] = $params['store_id'];
} }
//4.提交人手机号 //4.提交人手机号
if (!empty($params['phone'])) { if (!empty($params['phone'])) {
$where['b.phone'] = ['LIKE','%'.$params['phone'].'%']; $where['b.phone'] = [ 'LIKE', '%' . $params['phone'] . '%' ];
} }
//5.跟进内容 //5.跟进内容
if (!empty($params['remark'])) { if (!empty($params['remark'])) {
$where['a.remark'] = ['LIKE','%'.$params['remark'].'%']; $where['a.remark'] = [ 'LIKE', '%' . $params['remark'] . '%' ];
} }
//搜索条件 end //搜索条件 end
$fields_evaluate = 'a.create_time,a.agent_name,a.address,a.img as supervise_img,a.remark,b.name,b.phone,c.store_name'; $fields_evaluate = 'a.create_time,a.agent_name,a.address,a.img as supervise_img,a.remark,b.name,b.phone,c.store_name';
$data['list'] = $this->aSuperviseModel->findSuperviseList($pageNo, $pageSize, 'a.id desc', $fields_evaluate, $where); $data['list'] = $this->aSuperviseModel->findSuperviseList($pageNo, $pageSize, 'a.id desc', $fields_evaluate, $where);
$data['total'] = $this->aSuperviseModel->findSuperviseListCount($fields_evaluate, $where); $data['total'] = $this->aSuperviseModel->findSuperviseListCount($fields_evaluate, $where);
foreach ($data['list'] as $k=>$v) { foreach ($data['list'] as $k => $v) {
$data['list'][$k]['supervise_img'] = CK_IMG_URL .'images/supervise/' . $v['supervise_img']; $data['list'][$k]['supervise_img'] = CK_IMG_URL . 'images/supervise/' . $v['supervise_img'];
} }
//var_dump($result); //var_dump($result);
//return $result; //return $result;
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
namespace app\api_broker\service; namespace app\api_broker\service;
use app\model\AAgents; use app\model\AAgents;
use app\model\ASuperviseModel;
use app\model\GHouses; use app\model\GHouses;
use app\model\GHousesImgs; use app\model\GHousesImgs;
use app\model\OBargainModel; use app\model\OBargainModel;
...@@ -32,6 +33,7 @@ class PerformanceService ...@@ -32,6 +33,7 @@ class PerformanceService
private $marchInModel; private $marchInModel;
private $payLogModel; private $payLogModel;
private $gHousesImgModel; private $gHousesImgModel;
private $superviseModel;
public function __construct() public function __construct()
{ {
...@@ -46,6 +48,7 @@ class PerformanceService ...@@ -46,6 +48,7 @@ class PerformanceService
$this->marchInModel = new OMarchInModel(); $this->marchInModel = new OMarchInModel();
$this->payLogModel = new OPayLogModel(); $this->payLogModel = new OPayLogModel();
$this->gHousesImgModel = new GHousesImgs(); $this->gHousesImgModel = new GHousesImgs();
$this->superviseModel = new ASuperviseModel();
} }
...@@ -613,13 +616,14 @@ class PerformanceService ...@@ -613,13 +616,14 @@ class PerformanceService
$params = $this->getAgentId($agent_id, 2, $start_time, $end_time); $params = $this->getAgentId($agent_id, 2, $start_time, $end_time);
if (!$params) if (!$params)
return [ "code" => 101, "date" => "传入的参数错误" ]; return [ "code" => 101, "date" => "传入的参数错误" ];
$field = "a.id,a.user_name,a.user_phone,a.predict_see_time,b.house_title"; $field = "a.id,a.user_name,a.user_phone,a.predict_see_time,b.house_title";
$reportList = $this->reportModel->getAddReportList($params, $field, $page_no, $page_size); $reportList = $this->reportModel->getAddReportList($params, $field, $page_no, $page_size);
foreach ($reportList as $key => $val) { foreach ($reportList as $key => $val) {
$reportList[$key]["user_phone"] = preg_replace('/(\d{3})\d{4}(\d{4})/', '$1****$2', $val["user_phone"]); $reportList[$key]["user_phone"] = preg_replace('/(\d{3})\d{4}(\d{4})/', '$1****$2', $val["user_phone"]);
} }
return [ "code" => 200, "date" => $reportList ]; return [ "code" => 200, "date" => $reportList ];
} }
/** /**
* 获取进场数据 * 获取进场数据
* @param $agent_id * @param $agent_id
...@@ -635,14 +639,15 @@ class PerformanceService ...@@ -635,14 +639,15 @@ class PerformanceService
$params = $this->getAgentId($agent_id, 2, $start_time, $end_time); $params = $this->getAgentId($agent_id, 2, $start_time, $end_time);
if (!$params) if (!$params)
return [ "code" => 101, "date" => "传入的参数错误" ]; return [ "code" => 101, "date" => "传入的参数错误" ];
$field = "a.id,c.user_name,c.user_phone,c.predict_see_time,b.house_title"; $field = "a.id,c.user_name,c.user_phone,c.predict_see_time,b.house_title";
$addMarchInList = $this->marchInModel->getAddMarchInList($params, $field, $page_no, $page_size); $addMarchInList = $this->marchInModel->getAddMarchInList($params, $field, $page_no, $page_size);
//获取图片信息 //获取图片信息
foreach ($addMarchInList as $key => $val) { foreach ($addMarchInList as $key => $val) {
$addMarchInList[$key]["user_phone"] = preg_replace('/(\d{3})\d{4}(\d{4})/', '$1****$2', $val["user_phone"]); $addMarchInList[$key]["user_phone"] = preg_replace('/(\d{3})\d{4}(\d{4})/', '$1****$2', $val["user_phone"]);
} }
return [ "code" => 200, "date" => $addMarchInList ]; return [ "code" => 200, "date" => $addMarchInList ];
} }
/** /**
* 获取收款数据 * 获取收款数据
* @param $agent_id * @param $agent_id
...@@ -658,14 +663,15 @@ class PerformanceService ...@@ -658,14 +663,15 @@ class PerformanceService
$params = $this->getAgentId($agent_id, 2, $start_time, $end_time); $params = $this->getAgentId($agent_id, 2, $start_time, $end_time);
if (!$params) if (!$params)
return [ "code" => 101, "date" => "传入的参数错误" ]; return [ "code" => 101, "date" => "传入的参数错误" ];
$field = "a.id,c.user_name,c.user_phone,c.predict_see_time,b.house_title"; $field = "a.id,c.user_name,c.user_phone,c.predict_see_time,b.house_title";
$payLogList = $this->payLogModel->getAddPayLogList($params, $field, $page_no, $page_size); $payLogList = $this->payLogModel->getAddPayLogList($params, $field, $page_no, $page_size);
//获取图片信息 //获取图片信息
foreach ($payLogList as $key => $val) { foreach ($payLogList as $key => $val) {
$payLogList[$key]["user_phone"] = preg_replace('/(\d{3})\d{4}(\d{4})/', '$1****$2', $val["user_phone"]); $payLogList[$key]["user_phone"] = preg_replace('/(\d{3})\d{4}(\d{4})/', '$1****$2', $val["user_phone"]);
} }
return [ "code" => 200, "date" => $payLogList ]; return [ "code" => 200, "date" => $payLogList ];
} }
/** /**
* 获取业绩数据 * 获取业绩数据
* @param $type * @param $type
...@@ -676,15 +682,40 @@ class PerformanceService ...@@ -676,15 +682,40 @@ class PerformanceService
* @param $page_size * @param $page_size
* @return array|false|\PDOStatement|string|\think\Collection * @return array|false|\PDOStatement|string|\think\Collection
*/ */
public function performanceList($type,$agent_id, $start_time, $end_time, $page_no, $page_size) public function performanceList($type, $agent_id, $start_time, $end_time, $page_no, $page_size)
{ {
$params = $this->getAgentId($agent_id, $type, $start_time, $end_time); $params = $this->getAgentId($agent_id, $type, $start_time, $end_time);
if (!$params) if (!$params)
return [ "code" => 101, "date" => "传入的参数错误" ]; return [ "code" => 101, "date" => "传入的参数错误" ];
$field = "a.id,b.name,c.store_name,d.district_name,a.scale_fee,a.create_time"; $field = "a.id,b.name,c.store_name,d.district_name,a.scale_fee,a.create_time";
$performanceList = $this->bargainModel->getAddBargainList($params, $field, $page_no, $page_size); $performanceList = $this->bargainModel->getAddBargainList($params, $field, $page_no, $page_size);
return [ "code" => 200, "date" => $performanceList ]; return [ "code" => 200, "date" => $performanceList ];
} }
/**
* 获取监督执行记录
* @param $agent_id
* @param $start_time
* @param $end_time
* @param $page_no
* @param $page_size
* @return array
*/
public function superviseList($agent_id, $start_time, $end_time, $page_no, $page_size)
{
$params = $this->getAgentId($agent_id, 2, $start_time, $end_time);
if (!$params)
return [ "code" => 101, "date" => "传入的参数错误" ];
$field = "a.id,a.agent_id,a.agent_name,a.remark,a.img,a.address,a.create_time";
$where_["a.agent_id"] = $params["agent_id"];
$where_["a.create_time"] = $params["create_time"];
$superviseList = $this->superviseModel->findSuperviseList($page_no, $page_size, 'id desc', $field, $where_);
foreach ($superviseList as $k => $v) {
$superviseList[$k]['img'] = CK_IMG_URL . 'images/supervise/' . $v['img'];
}
return [ "code" => 200, "date" => $superviseList ];
}
} }
\ No newline at end of file
...@@ -22,7 +22,7 @@ class UWxInfo extends Model ...@@ -22,7 +22,7 @@ class UWxInfo extends Model
* 新增微信拉取用户信息 * 新增微信拉取用户信息
* @param $params * @param $params
* @return int|string * @return int|string
* @throws Exception * @throws Exception xx
*/ */
public function addWxInfo(array $params): int public function addWxInfo(array $params): int
{ {
......
...@@ -468,6 +468,7 @@ Route::group('broker', [ ...@@ -468,6 +468,7 @@ Route::group('broker', [
'marchInList' => [ 'api_broker/Performance/marchInList', [ 'method' => 'POST|GET' ] ], //进场list 'marchInList' => [ 'api_broker/Performance/marchInList', [ 'method' => 'POST|GET' ] ], //进场list
'paylogList' => [ 'api_broker/Performance/paylogList', [ 'method' => 'POST|GET' ] ], //收款list 'paylogList' => [ 'api_broker/Performance/paylogList', [ 'method' => 'POST|GET' ] ], //收款list
'performanceList' => [ 'api_broker/Performance/performanceList', [ 'method' => 'POST|GET' ] ], //业绩list 'performanceList' => [ 'api_broker/Performance/performanceList', [ 'method' => 'POST|GET' ] ], //业绩list
'superviseList' => [ 'api_broker/Performance/superviseList', [ 'method' => 'POST|GET' ] ], //监督执行list
//user //user
'returnSearchCondition' => [ 'api_broker/User/returnSearchCondition', [ 'method' => 'get' ] ], //客户搜索条件 'returnSearchCondition' => [ 'api_broker/User/returnSearchCondition', [ 'method' => 'get' ] ], //客户搜索条件
......
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