Commit eea59795 authored by zw's avatar zw

Merge branch '1016-v2.9.5' into test

# Conflicts: # application/api/controller/Broker.php # application/index/controller/Finance.php # application/index/controller/OperationData.php # application/index/controller/Remark.php # application/index/view/remark/remark_follow_index.html # application/route.php # public/app/js/detaila_tl.js # public/resource/template/commissionTotal_template_tpl.html
parents 1efca5b0 86904798
......@@ -5,7 +5,6 @@ namespace app\api\controller;
use app\api\extend\Basic;
use app\api_broker\service\VerifyRepetitionService;
use app\model\AAgents;
use app\model\AAgentsPhone;
use app\model\Evaluate;
use app\model\EvaluateSign;
use app\model\OBargainModel;
......@@ -291,7 +290,7 @@ class Broker extends Basic
} else {
$agents_data = $m_agents->getAgentInfo('id,update_time,call_number', '', ['agent_id'=>$this->params['agent_id']]);
}
$insert_data['update_time'] = $agents_data['update_time'];
$insert_data['call_number'] = $agents_data['call_number'] + 1;
$data['data'] = $m_agents->editData($insert_data, $agents_data['id']);
......@@ -319,29 +318,30 @@ class Broker extends Basic
$data['data'] = [];
$data['msg'] = '';
if (empty($this->params['phone'])) {
$data['status'] = 101;
$data['msg'] = 'phone is null';
} else {
$m_agents = new AAgents();
$agents_data = $m_agents->getAgentInfo('id,update_time,call_number', '', ['phone'=>$this->params['phone']]);
if (empty($agents_data['id'])) {
$m_agent_phone = new AAgentsPhone();
$agent_data_phone = $m_agent_phone->getList(1, 1, '', 'agents_id', ['phone'=>$this->params['phone']]);
$agent_id = $agent_data_phone['agents_id'];
} else {
$agent_id = $agents_data['id'];
}
if ($this->params['agent_id'] > 0) {
$redis = new VerifyRepetitionService();
$is = $redis->verifyStart(2, $this->params['phone'], 0);
if ($is) {
$m_agents = new AAgents();
$agents_data = $m_agents->getAgentInfo('id,update_time,call_number', '', ['agent_id'=> $this->params['agent_id']]);
if (empty($this->params['phone'])) {
$agents_data = $m_agents->getAgentInfo('id,update_time,call_number', $this->params['agent_id']);
} else {
$agents_data = $m_agents->getAgentInfo('id,update_time,call_number', '', ['agent_id'=>$this->params['agent_id']]);
}
if ($agent_id) {
$agents_data = $m_agents->getAgentInfo('id,update_time,call_number', $agent_id);
$insert_data['update_time'] = $agents_data['update_time'];
$insert_data['call_number'] = $agents_data['call_number'] + 1;
$data['data'] = $m_agents->editData($insert_data, $agent_id);
} else {
$data['msg'] = '没有该经纪人信息';
$data['data'] = $m_agents->editData($insert_data, $agents_data['id']);
}
} else {
$data['status'] = 101;
$data['msg'] = 'agent_id is null';
}
return $this->response($data['status'], $data['msg'], $data['data']);
......
<?php
namespace app\api_broker\controller;
namespace app\api\controller;
/**
* Created by PhpStorm.
* User: zhuwei
......@@ -8,7 +8,7 @@ namespace app\api_broker\controller;
*/
use app\api_broker\extend\Basic;
use app\api\extend\Basic;
use app\model\AUserCallAgent;
use think\Request;
......@@ -23,6 +23,10 @@ class CallAgent extends Basic
$this->aUserCallAgent = new AUserCallAgent();
}
/**
* 客户来电记录
* @return \think\Response
*/
public function addUserCallAgent(){
$params = $this->params;
......@@ -50,4 +54,12 @@ class CallAgent extends Basic
}
/**
* 客户来电记录
* @return \think\Response
*/
public function addUserCallAgentV2(){
}
}
\ No newline at end of file
......@@ -103,7 +103,7 @@ class Shop extends Basic
//c端查对外的名字 b端查对内的名字
if (isset($params['title'])) {
$conditions['external_title'] = array( "like", "%" . trim($params['title']) . "%" );
$conditions['external_title|external_address'] = array( "like", "%" . trim($params['title']) . "%" );
}
//c端查对外的名字 b端查对内的名字
......@@ -176,7 +176,7 @@ class Shop extends Basic
}
}
}
$order_ = "status asc,id desc";
$order_ = "is_exclusive_type desc,id desc";
break;
default:
return $this->response("101", "请求数据异常");
......@@ -336,6 +336,7 @@ class Shop extends Basic
$params = $this->params;
$city_code = isset($params["city_code"]) ? $params["city_code"] : "330000"; //上海310000 浙江 330000
$regions = new Regions();
$cityList = $regions->getRegionsCitySH($city_code);
$i = $j = 0;
......@@ -394,6 +395,78 @@ class Shop extends Basic
return $this->response("200", "request success", $result);
}
/**
* 搜索页搜索条件
* @return \think\Response
*/
public function filtrateConditionV2()
{
header('Access-Control-Allow-Origin:*');
$params = $this->params;
$params["city"] = "深圳市";
if(empty($params["city"])){
return $this->response("101", "参数错误");
}
$city = $params["city"];
$regions = new Regions();
$cityList = $regions->getRegionsByCity($city);
$i = $j = 0;
$result["area"][$i]["city"] = "全部";
$result["area"][$i]["disc"][] = "全部";
foreach ($cityList as $k => $v) {
$i++;
if (!empty($v["name"])) {
$result["area"][$i]["city"] = $v["name"];
$result["area"][$i]["disc"][] = "全" . $v["name"];
}
foreach ($v["city"] as $item) {
if (!empty($item)) {
$result["area"][$i]["disc"][] = $item;
}
}
if ($j == 0) {
$result["area"][$i]["business_district"][$j]['district'] = "全" . $v["name"];
$result["area"][$i]["business_district"][$j]['business'][] = [
'id'=>0,'name'=>'全部'
];
}
foreach ($v['business_district'] as $item2) {
if (!empty($item2)) {
$j++;
$result["area"][$i]["business_district"][$j] = $item2;
}
}
break; //目前只有上海和杭州其余的先不显示
}
$result['yetai'] = array( '全部', '商场美食', '沿街餐饮', '百货超市', '服饰鞋包', '亲子教育', '休闲娱乐', '办公', '其他' );
//租金租金(0:租金-大于三万; 1:租金一万到三万之间; 2:租金-小于一万)
$result['money'] = array( array( 'id' => '-1', 'value' => '全部' ), array( 'id' => '0', 'value' => '3万以上' ),
array( 'id' => '1', 'value' => '1万-3万' ), array( 'id' => '2', 'value' => '1万以下' ) );
//面积
$result['acreage'] = array( array( 'id' => '-1', 'value' => '全部' ), array( 'id' => '0', 'value' => '30m²以内' ),
array( 'id' => '1', 'value' => '30-60m²' ), array( 'id' => '2', 'value' => '60-100m²' ), array( 'id' => '3', 'value' => '100-300m²' )
, array( 'id' => '4', 'value' => '300-500m²' ), array( 'id' => '5', 'value' => '500m²以上' ) );
$result['more'][] = "全部";
$labelsResult = $this->labels->getLabels();
if (count($labelsResult) > 0) {
foreach ($labelsResult as $labelsKey => $labelsVal) {
if ($labelsVal['name']) {
$result['more'][] = $labelsVal['name'];
}
}
}
return $this->response("200", "request success", $result);
}
/**
* 商铺列表进场统计
* @return \think\Response
......
<?php
namespace app\api\controller;
/**
* Created by PhpStorm.
* User: zhuwei
* Date:2018-10-18
* Time:10:50:55
*/
use app\api\extend\Basic;
use app\index\service\UserService;
use app\model\ASite;
use think\Request;
class Site extends Basic
{
protected $aSite;
public function __construct($request = null)
{
parent::__construct($request);
$this->aSite = new ASite();
}
/**
* 设置站点
* User: 朱伟
* Date:2018-10-18
* Time:10:50:55
*/
public function setUserSite()
{
header('Access-Control-Allow-Origin:*');
$params = $this->params;
/*$params = array(
"user_id" => 1,
"site_id" =>'1,1'
);*/
$checkResult = $this->validate($params, "Site.setUserSite");
if (true !== $checkResult) {
return $this->response("101", $checkResult);
}
$user_service = new UserService();
$user_id =$params['user_id'];
$site_id =$params['site_id'];
$res = $user_service->setUserSites($user_id, $site_id);
if ($res) {
return $this->response("200", "成功");
} else {
return $this->response("101", "失败");
}
}
/**
* 获取站点列表
* User: 朱伟
* Date:2018-10-18
* Time:10:50:55
*/
public function getSiteList()
{
$params = $this->params;
/*$params = array(
"id" => 5740
);*/
$field = 'id,name,city,is_del';
$get_params['is_del'] = 0;
$res = $this->aSite->getSite($field, $params);
return $this->response("200", "成功", $res);
}
/**
* 关闭或开启站点
* @return \think\Response
*/
// public function delImageDepot(){
// $params = $this->params;
// $checkResult = $this->validate($params, "Site.delImageDepot");
// if (true !== $checkResult) {
// return $this->response("101", $checkResult);
// }
// $params_['id'] = $params['id'];
// $params_['is_del'] = $params['is_del'];
// $res = $this->aSite->updateSite($params_);//int(1)
// if($res == 1){
// return $this->response("200", "成功",['data'=>$res]);
// }else{
// return $this->response("300", "失败");
// }
// }
//
// public function siteLogList()
// {
// if (!$this->request->isAjax()) {
// return view('site/siteLogList');
// }
// }
}
\ No newline at end of file
......@@ -122,6 +122,9 @@ class Basic extends Controller
*/
public function getCity($userId)
{
if(!$userId){
return;
}
try {
$redis_ = RedisExt::getRedis();
if ($redis_) {
......
<?php
namespace app\api\validate;
use think\Validate;
class Site extends Validate {
protected $rule = [
'site_id' => 'require',
'user_id' => 'require|number|gt:0'
];
protected $message = [
'site_id.require' => '站点不能为空',
'user_id.require' => '用户id不能为空',
'user_id.number' => '用户id只能为数字',
'user_id.gt' => '用户id必须大于0',
];
protected $scene = [
'setUserSite' => [ 'user_id', 'site_id' ],
];
}
\ No newline at end of file
......@@ -4,6 +4,8 @@ namespace app\api_broker\controller;
use app\api_broker\extend\Basic;
use app\api_broker\service\BargainService;
use app\model\AAgents;
use think\Log;
use think\Request;
/**
......@@ -16,11 +18,15 @@ use think\Request;
class Bargain extends Basic
{
private $service_;
private $agentModel;
public function __construct($request = null)
{
parent::__construct($request);
$this->service_ = new BargainService();
$this->agentModel = new AAgents();
}
public function bargainList()
......@@ -35,6 +41,7 @@ class Bargain extends Basic
"page_no" => 1,
"page_size" => 10
);*/
$checkResult = $this->validate($params, "BargainValidate.bargainList");
if (true !== $checkResult) {
return $this->response("101", $checkResult);
......@@ -45,9 +52,17 @@ class Bargain extends Basic
$status = $params["status"];
$is_my_correlation = $params["is_my_correlation"];
$keyword = empty($params["keyword"]) ? "" : $params["keyword"];
if ($is_my_correlation == 0) {//返回空
return $this->response("200", "success");
/*业务员不允许点击查看全部成交报告 start*/
$agent_field = "a.level";
$agent_res = $this->agentModel->getAgentsInfoByAgentId($agent_field, [ "agent_id" => $submit_agent_id ]);
if(($agent_res[0]['level'] == 10) && ($is_my_correlation == 0)){
Log::write('暂无权限', '7151'); //记录日志
return $this->response("200", "暂无权限!");
}
/*业务员不允许点击查看全部成交报告 end*/
$result = $this->service_->getBargainList($pageNo, $pageSize, $submit_agent_id, $status, $is_my_correlation, $keyword);
return $this->response("200", "success", $result);
}
......
<?php
namespace app\api_broker\controller;
/**
* Created by PhpStorm.
* User: hu jun
......@@ -6,9 +8,6 @@
* Time: 16:59
*/
namespace app\api_broker\controller;
use app\api\untils\GenerateCodeUntils;
use app\api\untils\JwtUntils;
use app\api\untils\MessageUntils;
......@@ -22,6 +21,7 @@ use app\index\service\UserService;
use app\model\AAgents;
use app\model\ABindingDevice;
use app\model\ACollectUser;
use app\model\ASite;
use app\model\GOperatingRecords;
use app\model\NoteLog;
use app\model\UPhoneFollowPp;
......@@ -126,20 +126,17 @@ class Broker extends Basic
return $this->response("101", $checkResult);
}
$field = 'id,store_id,auth_group_id,district_id,level,name,phone,password,sex,img,inviter_id,status';
$field = 'id,store_id,auth_group_id,district_id,level,name,phone,password,sex,img,inviter_id,status,site_id';
$where['phone'] = $params['phone'];
$where['id'] = [ '<>', 1 ];
$where['status'] = ['<>', 3];
$agents_data = $this->a_agents->getAgentInfo($field, '', $where);
if (count($agents_data) <= 0) {
return $this->response(101, '没有该用户');
}
if ($agents_data['status'] == 2) {
return $this->response(101, '您已离职');
}
if ($agents_data['status'] == 1) {
return $this->response(101, '账号已冻结');
if ($agents_data['status'] == 1 || $agents_data['status'] == 2) {
return $this->response(101, '你目前是长假/离职状态,请联系人事进行更改');
}
if ($agents_data['password'] != md5($this->params['pwd'])) {
......@@ -160,7 +157,10 @@ class Broker extends Basic
if (!empty($agents_data['img'])) {
$agents_data['img'] = AGENTHEADERIMGURL . $agents_data->img;
}
$m_site = new ASite();
$site_city = $m_site->getSite('city', ['id'=>$agents_data['site_id'], 'is_del'=>0]);
$agents_data['city'] = $site_city[0]['city'];
$jwt_data['id'] = $agents_data['id'];
$jwt_data['name'] = $agents_data['name'];
$jwt_data['phone'] = $agents_data['phone'];
......@@ -172,6 +172,10 @@ class Broker extends Basic
$data['data']['AuthToken'] = $jwt->createToken($jwt_data);
$data['msg'] = '登陆成功';
$redis_ = RedisExt::getRedis();
$redis_->set("agent_city_" . $agents_data['id'], $site_city[0]['city']);
$redis_->set("agent_site_id_" . $agents_data['id'], $agents_data['site_id']);
return $this->response(200, $data['msg'], $data['data']);
}
......@@ -249,7 +253,7 @@ class Broker extends Basic
$pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo'];
$pageSize = empty($this->params['pageSize']) ? 10 : $this->params['pageSize'];
$where = 'status <> 2';
$where = 'status = 0';
if ($this->params['phone']) {
$where .= ' AND concat(phone,name) like "%' . $this->params['phone'] . '%"';
}
......@@ -258,6 +262,10 @@ class Broker extends Basic
$where .= ' AND level in (' . $this->params['level'] . ')';
}
if ($this->params['site_id']) {
$where .= ' AND site_id ='.$this->params['site_id'];
}
if ($where) {
$field = 'id,name,phone,img';
$data['data'] = $this->a_agents->getList($pageNo, $pageSize, 'id DESC', $field, '', $where);
......@@ -310,7 +318,7 @@ class Broker extends Basic
$params['disc'] = $result[0]['disc'] ? $result[0]['disc'] : '黄浦区';
}
$UPhoneFollowPp = new UPhoneFollowPp();
$UPhoneFollowPp = new UPhoneFollowPp($this->siteId);
$result = $UPhoneFollowPp->savePhoneFollow($params);
if ($result > 0) {
......@@ -319,7 +327,7 @@ class Broker extends Basic
$redis = RedisExt::getRedis();
$user_key = 'call_phone_user_' . date('Y-m-d');
$hash_key = $this->agentId . '-' . $params['user_id'];
$hash_key = $this->agentId . '-' . $params['user_id'].'-'.$this->siteId;
$redis->hDel($user_key, $hash_key);
return $this->response("200", "success!", $result);
} else {
......@@ -413,29 +421,6 @@ class Broker extends Basic
$user_id = $params['user_id'];
$agent = new AAgents();
/* $searchdate = empty($params['searchdate']) ? '':$params['searchdate'];
$pagenum = isset($params['pagenum']) ? $params['pagenum'] : 1;
$pagesize = 15;
$UPhoneFollowPp = new UPhoneFollowPp();
// 查询电话跟进数据
$UPhoneFollowPp_res = $UPhoneFollowPp->select_useraction_search($user_id,$searchdate);
foreach($UPhoneFollowPp_res as $k=>$v){
$agents_res = $agent->verifyUser('name,phone,img','',['id'=>$v['agent_id']]);
$UPhoneFollowPp_res[$k]['agentinfo'] = $agents_res ? $agents_res['name'].'-'.$agents_res['phone']:'未知';
$UPhoneFollowPp_res[$k]['user_pic'] = AGENTHEADERIMGURL.$agents_res['img'];
$UPhoneFollowPp_res[$k]['label'] = '';
//电话跟进标签
if($v['labels_id']){
$labels = new ULabels();
$table_res = $labels->get_labelsname($v['labels_id']);
$UPhoneFollowPp_res[$k]['label'] = $table_res[0]['name'];
}
}*/
$user = new Users();
$user_res = $user->useraction_search_user_res($user_id, 1);
......@@ -448,9 +433,21 @@ class Broker extends Basic
$user_res['agentinfo'] = $agents_res ? $agents_res['name'] . '-' . $agents_res['phone'] : '未知';
$data['agent_path'] = AGENTHEADERIMGURL;
/*查询站点名*/
$site_model = new ASite();
foreach (explode(',', $user_res['site_ids']) as $site_k => $site_v) {
$site_field = 'city';
$site_params['id'] = $site_v;
$site_model = $site_model->findByOne($site_field,$site_params);
//dump($site_model["city"]);
$user_res['site_name'][]= $site_model["city"] ;
}
/*查询站点名*/
$orderLog = new OrderLogService();
$data['user_date'] = $orderLog->selectListByUserId($user_id, '');
$data['user_date'] = $orderLog->selectListByUserId($user_id, '',$this->siteId);
/*修改记录部分 start*/
$records = new GOperatingRecords();
......@@ -546,7 +543,7 @@ class Broker extends Basic
return $this->response("101", "请输入需要检索的关键词");
}
$orderLog = new OrderLogService();
$data = $orderLog->selectListByUserId($params["user_id"], $params["keyword"]);
$data = $orderLog->selectListByUserId($params["user_id"], $params["keyword"],$this->siteId);
$data['agent_path'] = AGENTHEADERIMGURL;
return $this->response("200", "request success", $data);
}
......
......@@ -171,7 +171,7 @@ class Client extends Basic
*/
public function agentUserFollow(){
header('Access-Control-Allow-Origin:*');
$table= new UPhoneFollowPp;
$table= new UPhoneFollowPp($this->siteId);
$data['msg'] = '';
$params = $this->request->param();
$time=date("Y-m-d H:i:s",time());//当前时间
......@@ -283,7 +283,7 @@ class Client extends Basic
$total = $user->all_user_count($conditions);
}else{
//跟进
$UPhoneFollowPp = new UPhoneFollowPp();
$UPhoneFollowPp = new UPhoneFollowPp($this->siteId);
$user_res = $UPhoneFollowPp->all_user_search($phone_or_name,$pagesize,$pagenum);
$total = $UPhoneFollowPp->all_user_search_count($phone_or_name);
}
......
......@@ -29,7 +29,7 @@ class HomePageLog extends Basic
function __construct(Request $request = null)
{
parent::__construct($request);
$this->uPhoneFollowUpModel = new UPhoneFollowPp();
$this->uPhoneFollowUpModel = new UPhoneFollowPp($this->siteId);
$this->gHouseFollowUpModel = new GHousesFollowUp();
}
......@@ -96,7 +96,7 @@ class HomePageLog extends Basic
}
}
$where_["f.city"] = trim($this->city) ? trim($this->city) : '上海市';
//$where_["f.city"] = trim($this->city) ? trim($this->city) : '上海市';
$order = "f.id desc";
......@@ -176,10 +176,14 @@ class HomePageLog extends Basic
$where_["f.create_time"] = array( 'between', array( $start_time, $end_time ) );
}
if (empty($params['city'])) {
$where_["f.city"] = trim($this->city) ? trim($this->city) : '上海市';
} else {
$where_["f.city"] = $params['city'] ? $params['city'] : '上海市';
// if (empty($params['city'])) {
// $where_["f.city"] = trim($this->city) ? trim($this->city) : '上海市';
// } else {
// $where_["f.city"] = $params['city'] ? $params['city'] : '上海市';
// }
if ($this->city != '全部') {
$where_["f.city"] = $this->city;
}
if (!empty($params['disc'])) {
......
......@@ -32,7 +32,7 @@ class Location extends Basic
"agent_id" => 1,
"city" => "上海市"
);*/
$checkResult = $this->validate($params, "LocationValidate.saveSiteCityVerify");
/* $checkResult = $this->validate($params, "LocationValidate.saveSiteCityVerify");
if (true !== $checkResult) {
return $this->response("101", $checkResult);
}
......@@ -45,7 +45,7 @@ class Location extends Basic
$this->redis_->set(self::CITY_AGENTS . $agent_id, $city);
} else {
return $this->response("101", "redis service not found");
}
}*/
return $this->response("200", "success", []);
......
<?php
namespace app\api_broker\controller;
use app\api_broker\extend\Basic;
use app\model\GBusinessDistrict;
use app\model\GHouses;
use app\model\Regions;
use think\Request;
/**
* Created by PhpStorm.
* User : zw
* Date : 2018/10/17
* Time : 上午9:40
* Intro: 地图找房
*/
class MapFindHouse extends Basic
{
private $gHousesModel;
private $regionsModel;
public function __construct(Request $request = null)
{
parent::__construct($request);
$this->gHousesModel = new GHouses();
$this->regionsModel = new Regions();
}
/**
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getShopListByMap()
{
$params = $this->params;
/* $params = array(
"first_spot" => "1223,1213123",
"second_spot" => "1223,1213123",
"grade" => 1,//1 区,2商圈,3街道
"source" => 1,//来源 1b端,2c端
);*/
$checkResult = $this->validate($params, "MapFindHouseValidate.getShopListByMap");
if (true !== $checkResult) {
return $this->response("101", $checkResult);
}
$first_spot_arr = explode(",", $params["first_spot"]);
$second_spot_arr = explode(",", $params["second_spot"]);
if (count($first_spot_arr) < 2 || count($second_spot_arr) < 2) {
return $this->response("101", "坐标传入有误");
}
$conditions = [];
$conditions["latitude"] = array("between", array($second_spot_arr[0], $first_spot_arr[0]));
$conditions["longitude"] = array("between", array($second_spot_arr[1], $first_spot_arr[1]));
$field = "id,internal_title,longitude,latitude";
$result = $this->gHousesModel->getHousesListByMap($field, $conditions);
return $this->response("200", "success", $result);
}
/**
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getCityInfoByMap()
{
$params = $this->params;
/* $params = array(
"spot" => "1223,1213123",
"grade" => 1,//1 区,2商圈,3街道
"source" => 1,//来源 1b端,2c端
"city" => "上海市"//传城市就好了
);*/
$checkResult = $this->validate($params, "MapFindHouseValidate.getCityInfoByMap");
if (true !== $checkResult) {
return $this->response("101", $checkResult);
}
$conditions = [];
$result = [];
if ($params["grade"] == 1) {
$disc = $this->regionsModel->getDiscByCity($params["city"]);
$disc_str = "";
foreach ($disc as $item) {
$disc_str .= $item["name"] . ",";
}
$disc_str = rtrim($disc_str, ",");
$shop_arr = $this->gHousesModel->getHouseNumByDisc($disc_str);
$disc_arr = [];
foreach ($disc as $key => $item) {
foreach ($shop_arr as $i => $j) {
if ($item["name"] == $j["disc"]) {
$item["num"] = $j["num"];
$disc_arr[] = $item;
}
}
}
$result = $disc_arr;
} elseif ($params["grade"] == 2) {
$businessModel = new GBusinessDistrict();
$result = $businessModel->getListByMap($params["city"]);
}
return $this->response("200", "success", $result);
}
}
\ No newline at end of file
......@@ -73,7 +73,7 @@ class OrderLog extends Basic
$is_ok = $this->o_march_in_model->addMarchIn($params);
if ($is_ok > 0) {
$pushMarchIn = new PushMessageService();
$pushMarchIn->pushMarchInMessage($params["report_id"]); //推送
$pushMarchIn->pushMarchInMessage($params["report_id"], 1, $params["report_id"]); //推送
return $this->response("200", "request success", []);
} else {
return $this->response("101", "request faild");
......@@ -120,8 +120,9 @@ class OrderLog extends Basic
$transfer_img = isset($params["transfer_img"]) ? json_decode($params["transfer_img"] ,true): "";
Log::record("********************transfer_img**". json_encode($transfer_img));
$source = isset($params["source"]) ? $params["source"] : 0;
$income_time = isset($params["income_time"]) ? $params["income_time"] : "";
$is_ok = $this->service_->addCollectingBillV2($params["agent_id"], $params["agent_name"], $params["report_id"], $params["order_id"], $params["order_no"],
$params["collecting_bill"], $params["house_number"], $params["industry_type"], $remark, $transfer_img, $source);
$params["collecting_bill"], $params["house_number"], $params["industry_type"], $remark, $transfer_img, $source,$income_time);
if ($is_ok > 0) {
return $this->response("200", "request success", [ "bill_id" => $is_ok ]);
......@@ -372,34 +373,9 @@ class OrderLog extends Basic
}
/**
* 报备时间轴
*
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function selectReportAll()
{
$params = $this->params;
/* $params = array(
"order_id" => 38024,
);*/
if (!isset($params["order_id"])) {
return $this->response("101", "请求参数错误");
}
$data = $this->service_->selectListByOrderNo($params["order_id"]);
return $this->response("200", "request success", $data);
}
/**
* 报备时间轴
*
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function selectReportAllV2()
{
......@@ -410,7 +386,7 @@ class OrderLog extends Basic
if (!isset($params["order_id"])) {
return $this->response("101", "请求参数错误");
}
$data = $this->service_->selectListByOrderNoV2($params["order_id"]);
$data = [];
return $this->response("200", "request success", $data);
}
......@@ -422,7 +398,7 @@ class OrderLog extends Basic
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function selectReportAllV3()
public function selectReportAll()
{
$params = $this->params;
/* $params = array(
......@@ -431,7 +407,7 @@ class OrderLog extends Basic
if (!isset($params["order_id"])) {
return $this->response("101", "请求参数错误");
}
$data = $this->service_->selectListByOrderNoV3($params["order_id"]);
$data = $this->service_->selectListByOrderNo($params["order_id"]);
return $this->response("200", "request success", $data);
}
......
......@@ -43,7 +43,7 @@ class Performance extends Basic
"end_day" => "",
"start_day" =>""
);*/
if (!isset($params["agent_id"]) || !isset($params["type"])) {
if (!isset($params["agent_id"]) || !isset($params["type"]) || !isset($params["site_id"])) {
return $this->response("101", "请求参数错误");
}
//默认排序一周 2018-07-18改为本月
......@@ -51,7 +51,7 @@ class Performance extends Basic
$start_day = !empty($params["start_day"]) ? $params["start_day"] : date("Y-m-01", time());
$list = $this->service_->totalAgent($params["agent_id"], $params["type"], $start_day, $end_day);
$list = $this->service_->totalAgent($params["agent_id"], $params["type"], $start_day, $end_day,$params["site_id"]);
if (count($list) > 0) {
$result["list"] = $list;
$result["start_time"] = $start_day;
......@@ -107,8 +107,11 @@ class Performance extends Basic
"start_time" => "2018-06-25",
"end_time" => "2018-06-25",
);*/
if (!isset($params["agent_id"]) || !isset($params["site_id"])) {
return $this->response("101", "请求参数错误");
}
try {
$result = $this->service_->storePerformance($params["agent_id"], $params["start_time"], $params["end_time"]." 23:59:59");
$result = $this->service_->storePerformance($params["agent_id"], $params["start_time"], $params["end_time"]." 23:59:59",$params["site_id"]);
return $this->response("200", "request success", $result);
} catch (Exception $exception) {
return $this->response("101", "request error,msg:" . $exception);
......@@ -164,11 +167,11 @@ class Performance extends Basic
"end_time" => "2018-04-12",
);*/
if (!isset($params["agent_id"]) || !isset($params["start_time"]) || !isset($params["end_time"] )) {
if (!isset($params["agent_id"]) || !isset($params["start_time"]) || !isset($params["end_time"] )|| !isset($params["site_id"])) {
return $this->response("101", "请求参数错误");
}
try {
$result = $this->service_->storeSortByDistrictId($params["agent_id"], $params["is_store"], $params["start_time"], $params["end_time"]." 23:59:59");
$result = $this->service_->storeSortByDistrictId($params["agent_id"], $params["is_store"], $params["start_time"], $params["end_time"]." 23:59:59",$params["site_id"]);
return $this->response("200", "request success", $result);
} catch (Exception $exception) {
......@@ -485,10 +488,6 @@ class Performance extends Basic
$result = $this->service_->paylogListPcInfo($params["id"],$params["type"], $start_day, $end_day, $page_no, $page_size);
foreach ($result["date"] as $key => $val) {
//截取字符串前3位
$result["date"][$key]['landmark'] = $val["landmark"] ? mb_substr($val["landmark"],0,3,'utf-8').'****' : '';
}
if ($result["code"] == 101) {
return $this->response("101", $result["date"]);
} else {
......@@ -599,7 +598,8 @@ class Performance extends Basic
$page_no = empty($params['page_no']) ? 1 : $params['page_no'];
$page_size = empty($params['page_size']) ? 15 : $params['page_size'];
$result = $this->service_->getUserResourceListPcInfo($params["id"],$params["type"], $start_day, $end_day, $page_no, $page_size);
$result = $this->service_->getUserResourceListPcInfo($params["id"],$params["type"], $start_day, $end_day,
$page_no, $page_size,$this->siteId);
if ($result["code"] == 101) {
return $this->response("101", $result["date"]);
} else {
......@@ -624,7 +624,7 @@ class Performance extends Basic
$page_no = empty($params['page_no']) ? 1 : $params['page_no'];
$page_size = empty($params['page_size']) ? 15 : $params['page_size'];
// dump($params);
$result = $this->service_->getTeamNumPcInfo($params["id"],$params["type"], $start_day, $end_day, $page_no, $page_size);
$result = $this->service_->getTeamNumPcInfo($params["id"],$params["type"], $page_no, $page_size,$this->siteId);
if ($result["code"] == 101) {
return $this->response("101", $result["date"]);
} else {
......
......@@ -4,6 +4,7 @@ namespace app\api_broker\controller;
use app\api_broker\extend\Basic;
use app\api_broker\service\ReportService;
use app\index\service\UserService;
use app\model\AAgents;
use app\model\FollowUpLogModel;
use app\model\GHousesToAgents;
......@@ -21,6 +22,7 @@ class Report extends Basic
{
private $service_;
private $fulModel;
private $userService;
public function __construct($request = null)
......@@ -28,6 +30,8 @@ class Report extends Basic
parent::__construct($request);
$this->service_ = new ReportService();
$this->fulModel = new FollowUpLogModel();
$this->userService = new UserService();
}
......@@ -73,6 +77,7 @@ class Report extends Basic
$is_ok = $this->service_->verifyReport($agent_id, $agent_phone, $this->agentName, $store_id, $user_id, $userArr["user_phone"],
$userArr["user_name"], $house_ids, $vehicle, $intro, $predict_see_time);
if ($is_ok > 0) {
$this->userService->setUserSites($user_id, $this->siteId);//设置用户站点 朱伟 2018-10-22
return $this->response("200", "request success", []);
} else {
return $this->response("101", "save exception");
......
......@@ -98,7 +98,8 @@ class Shop extends Basic
,shop_area_start,shop_area_end,shop_type,residue_num,shop_sign,is_carefully_chosen,rent_type,rent_price,is_exclusive_type";
} else {
$field = "id,internal_title as title,internal_address as address,city,disc,business_district_id,status,industry_type
// $field = "id,internal_title as title,internal_address as address,city,disc,business_district_id,status,industry_type
$field = "id,external_title as title,internal_address as address,city,disc,business_district_id,status,industry_type
,shop_area_start,shop_area_end,shop_type,residue_num,shop_sign,is_carefully_chosen,rent_type,rent_price,is_lock
,is_exclusive_type";
......@@ -293,6 +294,14 @@ class Shop extends Basic
return $this->response("200", 'request success', $result);
}
/**
* 返回楼盘id
* @param $landlord_phone
* @return string
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
private function returnHouseId($landlord_phone)
{
$houseExtModel = new GHousesExt();
......@@ -307,6 +316,16 @@ class Shop extends Basic
return $ids;
}
/**
* 返回盘方楼盘id
* @param $p_district_name
* @param $p_store_name
* @param $p_agent_name
* @return false|null|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
private function returnHouseIdByPanParty($p_district_name, $p_store_name, $p_agent_name)
{
$agentModel = new AAgents();
......@@ -374,7 +393,8 @@ class Shop extends Basic
if ($params['site_area'] == 3) {
$field = "a.id,a.internal_title as title,a.internal_address as address,a.city,a.disc,a.business_district_id,a.status,
// $field = "a.id,a.internal_title as title,a.internal_address as address,a.city,a.disc,a.business_district_id,a.status,
$field = "a.id,a.external_title as title,a.external_address as address,a.city,a.disc,a.business_district_id,a.status,
a.industry_type,a.shop_area_start,a.shop_area_end,a.shop_type,a.residue_num,a.shop_sign,a.is_carefully_chosen,a.rent_type,
a.rent_price,a.management_fee,a.slotting_fee,a.total,a.market_area,a.is_has_gas,a.file_path,a.longitude,a.latitude,
b.enter_num,b.internal_item_advantage as item_advantage,b.sign_rule,b.do_business_date, b.opening_date,b.traffic,
......@@ -382,7 +402,8 @@ class Shop extends Basic
a.is_show,a.is_exclusive_type,a.update_time,a.external_title,a.external_address,b.external_item_advantage,b.agent_start_time,b.agent_end_time";
$conditions['a.status'] = array("neq", 3);
} else {
$field = "a.id,a.internal_title,a.internal_address,a.external_title,a.external_address,
//$field = "a.id,a.internal_title,a.internal_address,a.external_title,a.external_address,
$field = "a.id,a.external_title as internal_title,a.external_address as internal_address,a.external_title,a.external_address,
a.city,a.disc,a.business_district_id,a.status,a.industry_type,a.shop_area_start,a.shop_area_end,a.shop_type,
a.residue_num,a.shop_sign,a.is_carefully_chosen,a.rent_type, a.rent_price,a.management_fee,a.slotting_fee,
a.total,a.market_area,a.is_has_gas,a.file_path,a.longitude,a.latitude,a.is_show,a.is_exclusive_type,
......@@ -396,7 +417,7 @@ class Shop extends Basic
$field .= ',b.age_limit,b.payment_month,b.deposit_month,b.external_slotting_fee,c.agents_id, b.area_width,b.depth,
b.electric_quantity,b.voltage,b.exhaust_fume,b.running_water,b.downriver,b.business_scope,b.decoration,b.source
,b.rim_mating,b.section,b.crowd,b.other,a.is_lock';
,b.rim_mating,b.section,b.crowd,b.other,a.is_lock,b.project_name';
$result = $this->gHousesModel->getHouseDetailById($field, $conditions);
if (count($result) <= 0) {
return $this->response("101", '此楼盘不存在');
......
<?php
namespace app\api_broker\controller;
/**
* Created by PhpStorm.
* User: zhuwei
* Date:2018-10-18
* Time:10:50:55
*/
use app\api_broker\extend\Basic;
use app\model\ASite;
use think\Request;
class Site extends Basic
{
protected $aSite;
public function __construct($request = null)
{
parent::__construct($request);
$this->aSite = new ASite();
}
/**
* 获取站点列表
* User: 朱伟
* Date:2018-10-18
* Time:10:50:55
*/
public function getSiteList()
{
header('Access-Control-Allow-Origin:*');
$params = $this->params;
/*$params = array(
"id" => 5740
);*/
$field = 'id,name,city,is_del';
$get_params['is_del'] = 0;
$res = $this->aSite->getSite($field, $params);
return $this->response("200", "成功", $res);
}
}
\ No newline at end of file
......@@ -53,7 +53,9 @@ class User extends Basic
array( 'id' => '0', 'value' => '30m²以内' ),
array( 'id' => '1', 'value' => '30-60m²' ),
array( 'id' => '2', 'value' => '60-100m²' ),
array( 'id' => '3', 'value' => '100m²以上' )
array( 'id' => '3', 'value' => '100-300m²' ),
array( 'id' => '4', 'value' => '300-500m²' ),
array( 'id' => '5', 'value' => '500m²以上' )
);
return $this->response("200", "request success", $result);
......@@ -66,35 +68,14 @@ class User extends Basic
public function searchUser()
{
$params = $this->params;
$pageNo = empty($params['pageNo']) ? 1 : $params['pageNo'];
$pageSize = empty($params['pageSize']) ? 15 : $params['pageSize'];
//app_request_source_type 1:代表全部客户
$app_request_source_type = !empty($params["app_request_source_type"]) ? $params["app_request_source_type"] : 0;
/*$params = array(
"user_status" => 0,//客户状态(0:求租;1:已租;-1:无效)
"yetai" => "休闲娱乐",
"area_start" => 1,//面积起始范围 room_area2
"area_end" => 65,//面积结束范围
"money_start" => 1,//租金 price2
"money_end" => 10000,//租金
"start_time" => "2016-05-25",
"end_time" => "2018-05-30",
"id" => 1,
"user_name" => "12312",
"user_phone" => "138171212",
"pageNo" => 1,
"agent_id" => 5741,//传经纪人id代表我得客户
"pageSize" => 15,
"status" => 0,
);*/
$field = "id as user_id,sex,user_name,city,user_phone,user_status,agent_id,create_time,industry_type,price_demand,area_demand,vip,user_label,source_intro";
$conditions = [];
$pageNo = empty($params['pageNo']) ? 1 : $params['pageNo'];
$pageSize = empty($params['pageSize']) ? 15 : $params['pageSize'];
$conditions["city"] = trim($this->city) ? trim($this->city) : '上海市';
if (isset($params['user_status'])) {
$conditions['user_status'] = $params['user_status'];
}
......@@ -124,10 +105,8 @@ class User extends Basic
if ($area_start >= 0 && $area_end >= 0) { //面积
$conditions['area_demand'] = array( 'between', array( $area_start, $area_end ) );
$conditions['area_demand'] = array( 'between', array( $area_start, $area_end ) );
} else if ($area_start >= 0 && $area_end < 0) { //100米以上不用传结束面积
$conditions['area_demand'] = array( 'egt', $area_start );
$conditions['area_demand'] = array( 'egt', $area_start );
}
$price_start = isset($params['money_start']) ? $params['money_start'] : -1;
......@@ -148,33 +127,32 @@ class User extends Basic
if (isset($params['status'])) {
$conditions['status'] = $params['status'];
}
//是否vip客户 1是 0否
if (isset($params['is_vip']) ) {
$conditions['vip'] = $params['is_vip'];
}
//传了经纪人id则表示我的客户
if (isset($params["agent_id"])) {
$conditions['agent_id'] = $params['agent_id'];
$is_search = false;
//是我的客户就显示全部
}else{
if($app_request_source_type == 1){
//'全部客户列表' 需要排除排除纯房东客户
#全部客户列表 排除排除纯房东客户
$conditions['user_label'] = array( "neq", 2 );
if (!isset($conditions['create_time'])){//不存在$conditions['create_time']说明非精确搜索
//1.全部客户列表、非精确搜索 需要排除排除保护期内的客户
$time_now = date('Y-m-d H:i:s');//当前时间
//protect_time 将截止日期大于当前时间的数据排除掉
#根据时间搜索,要能搜到保护期客户
if(!$is_search && !isset($conditions['create_time'])){
#排除排除保护期内的客户 将截止日期大于当前时间的数据排除掉
$time_now = date('Y-m-d H:i:s');
$conditions['protect_time'] = array('lt',$time_now);
}
#默认显示经纪人所在站点的客户
$conditions['site_ids'] = [ 'LIKE', '%' . $this->siteId . '%' ];
}
}
//dump($app_request_source_type);exit;
/*if (!$is_search) {
$conditions['user_label'] = array( "neq", 2 );
}*/
$field = "id as user_id,sex,user_name,city,user_phone,user_status,agent_id,create_time,industry_type,price_demand,area_demand,vip,user_label,source_intro";
$userList = $this->userModel->selectUserList($field, $conditions, $pageNo, $pageSize, "id desc");
//dump($userList);
if (empty($userList)) {
return $this->response("200", "此条件没有找到数据");
}
......@@ -604,9 +582,9 @@ class User extends Basic
$where['a.province'] = $this->params['province'];
}
if (!empty($this->params['city'])) {
$where['a.city'] = $this->params['city'];
}
// if (!empty($this->params['city'])) {
// $where['a.city'] = $this->params['city'];
// }
if (!empty($this->params['disc'])) {
$where['a.disc'] = $this->params['disc'];
......@@ -644,7 +622,7 @@ class User extends Basic
// dump($where);exit;
$field = 'a.id,a.user_id,b.user_nick,b.user_nick,b.agent_id,b.vip,b.create_time';
$model = new UPhoneFollowPp();
$model = new UPhoneFollowPp($this->siteId);
$model_res = $model->getLastOrNextUserIDPhoneFollowP($where, $field, $limit = 1, $order);
if (!$model_res) {
......
......@@ -29,6 +29,7 @@ class Basic extends Controller
public $request;
public $params;
public $city;
public $siteId;
protected $authToken;
/**
......@@ -42,8 +43,6 @@ class Basic extends Controller
'broker/login',
'broker/loginV2',
'broker/token',
'broker/getShopList',
'broker/getShopDetail',
'broker/getRegions',
'broker/getAddress',
'broker/getBroker',
......@@ -56,7 +55,9 @@ class Basic extends Controller
'broker/sendSms',
'broker/getNewsInfo',
'broker/getComment',
'broker/getBusinessAll'
'broker/getBusinessAll',
"broker/getSiteListApp",
"broker/addUserCallAgentV2",
);
/**
......@@ -100,7 +101,6 @@ class Basic extends Controller
}
//获取默认城市
$this->getCity($this->agentId);
//$this->city = "上海市";
$requestPath = $this->request->routeInfo()["rule"][0] . "/" . $this->request->routeInfo()["rule"][1];
//过滤掉不需要验证token的接口
if (!in_array(trim($requestPath), $this->filterVerify)) {
......@@ -116,19 +116,34 @@ class Basic extends Controller
*/
public function getCity($agentId)
{
if (empty($agentId)) {
return ; //没有登陆
}
try {
$redis_ = RedisExt::getRedis();
if ($redis_) {
$city = $redis_->get("agent_city_" . $agentId);
$this->city = empty($city) ? "上海市" : $city;
} else {
$this->city = "上海市";
$this->city = $redis_->get("agent_city_" . $agentId);
$this->siteId = $redis_->get("agent_site_id_" . $agentId);
}
if(empty($this->city) || empty($this->siteId)){
$m_agent = new AAgents();
$site_city = $m_agent->getAgentsSite(['a.id'=>$agentId], 'a.site_id,b.city');
if (empty($site_city['city']) || empty($site_city['site_id'])) {
echo json_encode(array( "code" => "300", "msg" => '账号位置信息错误,请联系运营', "data" => [], "type" => "json" ));
exit;
} else {
$this->city = $site_city['city'];
$this->siteId = $site_city['site_id'];
$redis_->set("agent_city_" . $agentId,$this->city);
$redis_->set("agent_site_id_" . $agentId,$this->siteId);
}
}
} catch (Exception $exception) {
$this->city = "上海市";
echo json_encode(array( "code" => "300", "msg" => $exception, "data" => [], "type" => "json" ));
exit;
}
}
/**
......
......@@ -3,6 +3,7 @@
namespace app\api_broker\service;
use app\model\OBargainModel;
use think\Log;
/**
* Created by PhpStorm.
......@@ -55,7 +56,6 @@ class BargainService
$condition["keyword"] = $keyword;
}
$bargainModel = new OBargainModel();
$filed = "a.id,a.father_id,a.house_number,a.price,a.commission,a.agent_id,a.create_time,b.user_phone,b.user_name,b.user_id,c.id as order_id,
d.id as house_id,d.internal_title,d.internal_address";
......
......@@ -497,7 +497,7 @@ class CallPhoneService
*/
public function defaultFollowUp()
{
$m_follow_up = new UPhoneFollowPp();
$current_time = time();
$time = $current_time - 3600;
// $start_date = date('Y-m-d', $time);
......@@ -517,6 +517,12 @@ class CallPhoneService
$array = explode('-', $v);
$follow_where['agent_id'] = $array[0];
$follow_where['user_id'] = $array[1];
if(isset($array[2])){
$follow_where['site_id'] = $array[2];
}else{
$follow_where['site_id'] = "10001";
}
$m_follow_up = new UPhoneFollowPp($follow_where['site_id']);
$num = $m_follow_up->getFollowTotal($follow_where);
if (empty($num) && !empty($array[1])) {
......
......@@ -19,6 +19,7 @@ use app\model\MPushMessage;
use app\model\OrderModel;
use app\model\OReportModel;
use app\model\PushFeed;
use app\model\Users;
class PushMessageService
......@@ -59,35 +60,58 @@ class PushMessageService
/**
* 1.进场推送 2.收款推送
*
* @param int $report_id
* @param int $type
* @param $report_id
* @param $type
* @param $operation_id
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function pushMarchInMessage($report_id = 0, $type = 1)
public function pushMarchInMessage($report_id, $type, $operation_id)
{
$report = new OReportModel();
$field = 'house_title,user_name,report_store_id,report_agent_id';
$field = 'house_title,user_name,report_store_id,report_agent_id,a.user_id,b.house_id';
$report_data = $report->getReportOrder($field, [ 'a.id' => $report_id ]);
$agent = new AAgents();
$agent_id = [];
if ($type == 1) {
$content = "客户{$report_data['user_name']}进场【{$report_data['house_title']}】商铺";
$title = '进场';
$data['message'] = "客户{$report_data['user_name']}进场【{$report_data['house_title']}】商铺";
$push_type = 5;
} else {
$content = "【{$report_data['house_title']}】商铺收款";
$title = '收款';
}
$data['message'] = "【{$report_data['house_title']}】商铺收款";
$m_user = new Users();
$client_agent = $m_user->getUserByWhereValue('agent_id', ['id'=>$report_data['user_id']]);
if (!empty($client_agent)) {
$agent_id[] = $client_agent; //客方
}
$agent_house = new GHousesToAgents();
$house_where['houses_id'] = $report_data['house_id'];
$house_where['is_del'] = 0;
$house_where['type'] = 2;
$agent_house_id = $agent_house->getAgentHouseValue('agents_id', $house_where);
if (!empty($agent_house_id)) {
$agent_id[] = $agent_house_id; //
}
$push_type = 6;
}
$where['store_id'] = $report_data['report_store_id'];
$where['level'] = [ 'in', '20,40' ];
$agent_store = $agent->getAgentInfo('id', '', $where);
$agent_store = $agent->searchAgentsByKeyword('id', $where);
$this->pushAgentAllDeviceId($report_data['report_agent_id'], $title, $content);
$this->pushAgentAllDeviceId($agent_store['id'], $title, $content);
foreach ($agent_store as $k=>$v) {
$agent_id[] = $v['id'];
}
$agent_id[] = $report_data['report_agent_id'];
$this->record($push_type, 0, $agent_id, $operation_id, $data);
// $this->pushAgentAllDeviceId($report_data['report_agent_id'], $title, $content);
// $this->pushAgentAllDeviceId($agent_store['id'], $title, $content);
return;
}
......@@ -140,8 +164,8 @@ class PushMessageService
'click_num' => 10 //不要问什么,就是产品要加的。
]);
// $content = "恭喜【{$store_name}】店【{$report_data['report_agent_name']}】成交【{$report_data['house_title']}】商铺一套";
// $url = $this->push->http_host() . '/app/dist/index.html#/feeds?id=' . $feed->id;
// $feed->editData([ 'link' => $url ], $feed->id);
$url = $this->push->http_host() . '/app/dist/index.html#/feeds?id=' . $feed->id;
$feed->editData([ 'link' => $url ], $feed->id);
// $this->push->push_message_for_all($title, $content, $url);
......@@ -275,6 +299,15 @@ class PushMessageService
$data['house_id'] = $house_id;
$result = $m_push->addAgentIdArray($agent_id, $operation_id, $type, $data);
break;
case 4 :
$result = $m_push->addAgentIdArray($agent_id, $operation_id, $type, $data);
break;
case 5 :
$result = $m_push->addAgentIdArray($agent_id, $operation_id, $type, $data);
break;
case 6 :
$result = $m_push->addAgentIdArray($agent_id, $operation_id, $type, $data);
break;
default :
$result = $m_push->addData($data, $operation_id, $type);
}
......@@ -318,6 +351,13 @@ class PushMessageService
$id = $v['addressee_id'];
$type = 'down_line';
$is_forbidden = 1;
break;
case 5:
$title = '进场';
break;
case 6:
$title = '收款';
break;
}
$result = $this->pushAgentAllDeviceId($v['addressee_id'], $title, $v['message'], $type, $id, $is_forbidden);
......
<?php
namespace app\api_broker\validate;
use think\Validate;
/**
* Created by PhpStorm.
* User : zw
* Date : 2018/10/17
* Time : 上午10:19
* Intro:
*/
class MapFindHouseValidate extends Validate
{
protected $rule = [
'first_spot' => 'require',
'second_spot' => 'require',
'grade' => 'require|number|in:1,2,3',
'source' => 'require|number|in:1,2',
'spot' => 'require',
'city' => 'require',
];
protected $message = [
'first_spot.require' => '坐标为必传字段',
'second_spot.require' => '坐标为必传字段',
'spot.require' => '坐标为必传字段',
'city.require' => '城市为必传字段',
'grade.require' => '级别为必传',
'grade.number' => '级别为必传',
'grade.in' => '级别参数错误',
'source.require' => '来源为必传',
'source.number' => '来源为必传',
'source.in' => '来源参数错误',
];
protected $scene = [
'getShopListByMap' => ['first_spot', 'second_spot', 'grade', 'source'],
'getCityInfoByMap' => ['spot', 'city', 'grade', 'source'],
];
}
\ No newline at end of file
......@@ -173,9 +173,14 @@ class Index
return view('index/timeline_pc');
}
public function bargaininfo_detail_pc()
public function bargaininfo_detail_static_pc()
{
return view('index/bargaininfo_detail_pc');
return view('index/bargaininfo_detail_static_pc');
}
public function submit_report_pc()
{
return view('index/submit_report_pc');
}
public function shop_detail_pc()
......
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>同联商业</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />
<meta name="Keywords" content="" />
<meta name="Description" content="" />
</head>
<body style="display: none;">
<div>
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
×
</button>
<h4 class="modal-title detail-modal-header-tab">
<a href="javascript:;" class="btn btn-info">成交信息</a>
<a href="javascript:;" class="btn btn-default">分佣提成</a>
<a href="javascript:;" class="btn btn-default">开票税费</a>
</h4>
</div>
<div class="div-seat"></div>
<div class="modal-body detail-modal-body">
<div>
<div class="detail-modal-body-sec">
<form class="detail-modal-bargaininfo-form">
<div class="detail-modal-bargaininfo-main-left">
<span>商铺类型:</span>
<span id="bargaininfo_shop_type"></span>
<br />
<span>商铺地址:</span><span id="bargaininfo_internal_address"></span><br>
<span>客户姓名:</span><span id="bargaininfo_user_name"></span><br>
<span>成交类型:</span>
<select class="form-control" id="bargaininfo_type">
<option value="10">出租</option>
<option value="20">增佣</option>
<option value="30">代理</option>
<option value="40">好处费</option>
</select>
<br />
<span>应收总佣金:</span>&nbsp;<input class="form-control" id="bargaininfo_total_commission" type="number"><br>
</div>
<div class="detail-modal-bargaininfo-main-right">
<span>是否开业:</span>
<select class="form-control" id="bargaininfo_is_open">
<option value="0"></option>
<option value="1"></option>
</select> <br />
<span>商铺号:</span><span id="bargaininfo_shop_num"></span><br>
<span>客户电话:</span><span id="bargaininfo_user_phone"></span><br>
<span>成交日期:</span><span id="bargaininfo_create_time"></span><br>
</div>
<div class="detail-modal-bargaininfo-commission-inputpar">
<div class="detail-modal-bargaininfo-commission-addarea">
<div class="form-group detail-modal-bargaininfo-commission-sec">
<label class="">实收佣金:</label>
<div class="input-group">
<input type="number" class="form-control" placeholder="请输入">
<div class="input-group-addon"></div>
</div>
<label class="">收佣日期:</label>
<div class="input-group">
<input type="date" class="form-control" placeholder="请输入">
</div>
<!--<mark href="javascript:;" class="detail-modal-bargaininfo-commission-cancel-pic"><img src="/resource/image/search_gb.png" /></mark>-->
</div>
</div>
<div id="bargaininfo_commission_add_btn">
<img src="/resource/image/jia2@2x.png" />
</div>
</div>
<div>
<span class="detail-modal-bargaininfo-span-beizhu">备注:</span>
<textarea id="bargaininfo_beizhu"></textarea>
</div>
</form>
<div class="tc">
<button type="button" class="btn btn-primary" id="bargaininfo_btn_save">保存</button>
</div>
</div>
<div class="detail-modal-body-sec">
<div class="detail-modal-maid-top-btn-area oh">
<a class="btn btn-success" href="#modal_new_maid" data-toggle="modal">新增</a>
<a id="maid_new_btn" class="btn btn-primary" data-toggle="modal">增加实收</a>
</div>
<table class="table table-striped table-bordered table-hover table-condensed" id="maid_table_main">
<thead>
<tr>
<th class="text-center">分佣方</th>
<th class="text-center">业务员</th>
<th class="text-center">所属部门/门店</th>
<th class="text-center">分佣比例</th>
<th class="text-center">应分佣金(元)</th>
<th class="text-center">实分佣金(元)</th>
<th class="text-center">手续费(元)</th>
<th class="text-center">慈善基金(元)</th>
<th class="text-center">现金奖(元)</th>
<th class="text-center">实收佣金(元)</th>
<th class="text-center">确认时间</th>
</tr>
</thead>
<tbody class="text-center" id="maid_new_table_list">
<!--<tr>
<td>盘方</td>
<td>刘丹丹-13918937741</td>
<td>同联一部南京东路店</td>
<td contenteditable>30%</td>
<td contenteditable>350000</td>
<td colspan="6" class="detail-modal-maid-mix-td oh">
<div class="oh">
<span contenteditable></span>
<span contenteditable></span>
<span contenteditable></span>
<span contenteditable></span>
<span contenteditable></span>
<span></span>
</div>
</td>
</tr>
<tr>
<td>盘方</td>
<td>刘丹丹-13918937741</td>
<td>同联一部南京东路店</td>
<td contenteditable>30%</td>
<td contenteditable>350000</td>
<td colspan="6" class="detail-modal-maid-mix-td oh">
<div class="oh">
<span contenteditable></span>
<span contenteditable></span>
<span contenteditable></span>
<span contenteditable></span>
<span contenteditable></span>
<span></span>
</div>
</td>
</tr>-->
</tbody>
</table>
<div class="detail-modal-maid-bottom-btn-area text-right">
<a id="maid_ok_btn" class="btn btn-primary" data-toggle="modal">确认分佣</a>
<a id="maid_save_btn" class="btn btn-primary" data-toggle="modal">保存</a>
</div>
<!--分佣提成-->
</div>
<div class="detail-modal-body-sec">
<div>
<div class="tc">
<a class="btn btn-success" href="#modal_new_tax" data-toggle="modal">新增开票</a>
</div>
<div id="tax_main_box">
<!--内容为模板生成-->
</div>
</div>
</div>
</div>
</div>
<!-- /.modal-content -->
</div>
<script src="/app/js/libs/require.min.js" data-js="/app/js/bargaininfo_detail_pc.js" data-main="/app/js/main" data-norem="yes" defer async="true"></script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>同联商业</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />
<meta name="Keywords" content="" />
<meta name="Description" content="" />
</head>
<body class="body-pc" style="display: none;">
<div id="app">
<nav class="oh">
<a href="javascript:;" class="btn-pc">成交信息</a>
<a href="javascript:;" class="btn-pc">分佣提成</a>
<a href="javascript:;" class="btn-pc">开票税费</a>
</nav>
<main>
<section>
<div class="list-area1 oh">
<ul>
<li>
<div>商铺类型:</div>
<div>商场</div>
</li>
<li>
<div>商铺地址:</div>
<div>商场nnn</div>
</li>
<li>
<div>业态:</div>
<div>商场nnn</div>
</li>
<li>
<div>客户姓名:</div>
<div>商场nnn</div>
</li>
<li>
<div>成交类型:</div>
<div>商场nnn</div>
</li>
<li>
<div>应收总佣金:</div>
<div>商场nnn</div>
</li>
</ul>
<ul>
<li>
<div>是否开业:</div>
<div>商场</div>
</li>
<li>
<div>商铺号:</div>
<div>商场</div>
</li>
<li>
<div>预计收款时间:</div>
<div>商场</div>
</li>
<li>
<div>客户电话:</div>
<div>商场</div>
</li>
<li>
<div>成交日期:</div>
<div>商场</div>
</li>
<li>
<div>成交价:</div>
<div>商场</div>
</li>
</ul>
</div>
<div class="list-area2">
<p>分佣提成</p>
<ul></ul>
</div>
</section>
<section></section>
<section></section>
</main>
</div>
<script id="fenyong_li_tpl" type="text/template">
<li class="fenyong-li por">
<ul class="flex">
<li class="fenyong-sub-li flex">
<div>分佣方:</div>
<div class="arrow-select-pc flex-center">
<select class="fenyong-fang">
<option value="">请选择</option>
<option value="1">盘方</option>
<option value="2">客方</option>
<option value="3">反签</option>
<option value="4">独家</option>
<option value="5">合作方</option>
<option value="6">APP盘下载方</option>
<option value="7">APP客下载方</option>
</select>
</div>
<div></div>
</li>
<li class="fenyong-sub-li flex">
<div>业务员:</div>
<div class="flex-center por">
<input type="text" class="add_input_ywy" placeholder="请输入姓名或手机号" />
<ul></ul>
</div>
<div></div>
</li>
</ul>
<ul class="flex">
<li class="fenyong-sub-li flex">
<div>分佣比例:</div>
<div class="flex-center">
<input type="number" class="fenyong-rate" placeholder="请填写" />
</div>
<div>%</div>
</li>
<li class="fenyong-sub-li flex">
<div>应分佣金:</div>
<div class="flex-center">
<input type="number" class="yingfen-yongjin" placeholder="请填写" />
</div>
<div></div>
</li>
</ul>
<mark class="poa"><img src="/app/images/search_gb.png"></mark>
</li>
</script>
<script src="/app/js/libs/require.min.js" data-js="/app/js/bargaininfo_detail_static_pc.js" data-main="/app/js/main" data-norem="yes" defer async="true"></script>
</body>
</html>
\ No newline at end of file
......@@ -218,7 +218,7 @@
<script type="text/javascript" src="/app/js/jquery-1122-min.js"></script>
<script src="/app/js/common.js?new42" charset="utf-8"></script>
<script src="/app/js/customerinfo_details_new.js?new65"></script>
<script src="/app/js/customerinfo_details_new.js?new67"></script>
</body>
......
......@@ -42,7 +42,9 @@
</tr>
<tr>
<td colspan="2">对内商铺名称:{{d.internal_title}}</td>
<td colspan="2">对内商铺地址:{{d.province}}{{d.city+d.disc+d.internal_address}}</td>
<!--<td colspan="2">对内商铺地址:{{d.province}}{{d.city+d.disc+d.internal_address}}</td>-->
<td colspan="2">对内商铺地址:{{d.internal_address}}</td>
</tr>
<tr>
<td colspan="2">交通:{{d.traffic}}</td>
......@@ -56,6 +58,7 @@
<td>营业时间:{{d.do_business_date}}</td>
<td v-if="!d.shop_type">招商时间:{{d.opening_date}}</td>
<td v-if="!d.shop_type">开业时间:{{d.start_business_date}}</td>
<td v-if="!d.shop_type">项目(大厦)名称:{{d.project_name}}</td>
</tr>
<tr class="tr-seat">
<td colspan="4"></td>
......
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>同联商业</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />
<meta name="Keywords" content="" />
<meta name="Description" content="" />
</head>
<body style="display: none;">
<div id="app">
<main>
<section class="list-area1 oh">
<ul>
<li v-if="false">
<div>客户姓名:</div>
<div>QQQQ</div>
</li>
<li v-if="false">
<div>商铺类型:</div>
<div>商场</div>
</li>
<li>
<div>商铺号:</div>
<div class="flex-center">
<input type="number" v-model="house_number" placeholder="请输入" />
</div>
</li>
<li>
<div>业态品牌:</div>
<div class="flex-center">
<input type="text" v-model.trim="industry_type" placeholder="请输入" />
</div>
</li>
<li>
<div>成交价:</div>
<div class="flex-center">
<input type="number" v-model="price" placeholder="请输入" />
</div>
<div></div>
</li>
<li>
<div>预计收款时间:</div>
<div class="flex-center">
<input type="date" v-model="estimated_receipt_date" placeholder="请输入" />
</div>
</li>
</ul>
<ul>
<li v-if="false">
<div>客户电话:</div>
<div>QQQQ</div>
</li>
<li v-if="false">
<div>商铺地址:</div>
<div>bbbb</div>
</li>
<li>
<div>是否开业:</div>
<div class="arrow-select-pc flex-center">
<select v-model="is_open">
<option value="">请选择</option>
<option value="1"></option>
<option value="0"></option>
</select>
</div>
</li>
<li>
<div>成交类型:</div>
<div class="arrow-select-pc flex-center">
<select v-model="trade_type">
<option value="">请选择</option>
<option value="10">出租</option>
<option value="20">增佣</option>
<option value="30">代理</option>
<option value="40">好处费</option>
</select>
</div>
</li>
<li>
<div>应收佣金:</div>
<div class="flex-center">
<input type="number" v-model.trim="commission" id="commission_input" placeholder="请输入" />
</div>
<div></div>
</li>
</ul>
</section>
<section class="list-area2">
<p>分佣提成</p>
<ul></ul>
<div class="fenyong-add-area flex-center">
<img src="/app/images/jia2@2x.png">
</div>
</section>
<section class="btn-area">
<div></div>
<div class="flex-center">
<a href="javascript:;" @click="save">提交</a>
</div>
</section>
</main>
</div>
<script id="fenyong_li_tpl" type="text/template">
<li class="fenyong-li por">
<ul class="flex">
<li class="fenyong-sub-li flex">
<div>分佣方:</div>
<div class="arrow-select-pc flex-center">
<select class="fenyong-fang">
<option value="">请选择</option>
<option value="1">盘方</option>
<option value="2">客方</option>
<option value="3">反签</option>
<option value="4">独家</option>
<option value="5">合作方</option>
<option value="6">APP盘下载方</option>
<option value="7">APP客下载方</option>
</select>
</div>
<div></div>
</li>
<li class="fenyong-sub-li flex">
<div>业务员:</div>
<div class="flex-center por">
<input type="text" class="add_input_ywy" placeholder="请输入姓名或手机号" />
<ul></ul>
</div>
<div></div>
</li>
</ul>
<ul class="flex">
<li class="fenyong-sub-li flex">
<div>分佣比例:</div>
<div class="flex-center">
<input type="number" class="fenyong-rate" placeholder="请填写" />
</div>
<div>%</div>
</li>
<li class="fenyong-sub-li flex">
<div>应分佣金:</div>
<div class="flex-center">
<input type="number" class="yingfen-yongjin" placeholder="请填写" />
</div>
<div></div>
</li>
</ul>
<mark class="poa"><img src="/app/images/search_gb.png"></mark>
</li>
</script>
<script src="/app/js/libs/require.min.js" data-js="/app/js/submit_report_pc.js" data-main="/app/js/main" data-norem="yes" defer async="true"></script>
</body>
</html>
\ No newline at end of file
......@@ -38,6 +38,7 @@
<p v-if="item.step_name==='report'">约带看人:<span>{{item.report_agent_name}}</span></p>
<p v-if="item.step_name==='report'">约带看人电话:<span><a href="javascript:;">{{item.report_agent_phone}}</a></span></p>
<p v-if="item.step_name==='report'">预计到场时间:<span>{{item.predict_see_time}}</span></p>
<p v-if="item.step_name==='report'">商铺地址:<span>{{item.internal_address}}</span></p>
<p v-if="item.step_name==='follow_up_log'">属于哪类客户:<span>{{item.user_type}}</span></p>
<p v-if="item.step_name==='follow_up_log'">第一决策人:<span>{{item.decision_maker}}</span></p>
<p v-if="item.step_name==='follow_up_log'">租商铺做什么:<span>{{item.industry_type}}</span></p>
......
......@@ -13,7 +13,6 @@ namespace app\chat\service;
use app\chat\utils\RegisterUtil;
use app\chat\utils\RPush;
use app\model\AAgents;
use app\model\Agents;
use app\model\ChatMsg;
use app\model\ChatMsgExt;
use app\model\ChatMsgStatus;
......@@ -41,14 +40,12 @@ class ChatService
protected $userModel;
protected $agentsModel;
protected $chatUserModel;
protected $agentsV2Model;
public function __construct()
{
$this->userModel = new Users();
$this->agentsModel = new Agents();
$this->chatUserModel = new ChatUser();
$this->chatUserExtModel = new ChatUserExt();
$this->agentsV2Model = new AAgents();
......@@ -310,13 +307,6 @@ class ChatService
$info_arr = [];
if (count($agent_phone) > 0) {
/* $field = "id,realname as user_nick,phone as user_phone,head_portrait as user_pic,CONCAT(agentshopname,'-',sub_shopname) as shop_name";
$where_agent["phone"] = array( "in", $agent_phone );
$where_agent["inuse"] = 1;
$where_agent["level"] = array( "in", [ 2, 5 ] );
$agentsResult = $this->agentsModel->getAgentsById($field, $where_agent);*/
$field = "a.id,a.name as user_nick,a.phone as user_phone,a.img as user_pic,CONCAT(c.district_name,'-',b.store_name) as shop_name";
......
This diff is collapsed.
<?php
namespace app\index\controller;
use app\index\extend\Basic;
use app\index\service\HouseService;
use app\model\GBusinessDistrict;
use think\Log;
/**
* 批量处理控制器(数据库一些数据需要批量处理下)
* Class BatchProcessing
* @package app\index\controller
*/
class BatchProcessing extends Basic
{
public function __construct($request = null)
{
parent::__construct($request);
}
/**
* 批量设置商圈的经纬度
*/
public function getCityLatAadLng(){
$model = new GBusinessDistrict();
$house_service = new HouseService();
$field = 'id,name,city';
$get_params = '';
$model_res = $model->getBusinessDistrict($field, $get_params);
$success_num = 0;
$fail = 0;
foreach ($model_res as $key => $v) {
//dump($v['name']);
//dump($v['city']);
$id = $v['id'];
$address = $v['name'];
$city = $v['city'];
/*获取商圈经纬度*/
$res = $house_service->getLatLng($address, $city);
if($res){
$success_num ++;
$longitude = $res['lng'];//'经度'
$latitude = $res['lat'];//'维度'
}else{
$fail ++;
$longitude = '';//'经度'
$latitude = '';//'维度'
$log_text = '商圈:'.$v['name'].' 城市: '.$v['city'].' 数据库ID: '.$id;
Log::write($log_text, '获取商圈经纬度-失败'); //记录日志
}
$insert=[];
$insert["id"] = $id;
$insert["longitude"] = $longitude;
$insert["latitude"] = $latitude;
$res = $model->updateBusinessDistrict($insert);//int(1)
$log_text = '商圈:'.$v['name'].' 城市: '.$v['city'].' 经度: '.$longitude.' 纬度: '.$latitude.' 数据库写入返回值: '.$res;
Log::write($log_text, '获取商圈经纬度'); //记录日志
}
return $this->response("200", "处理完成",['成功数'=>$success_num,'失败数'=>$fail]);
}
}
This diff is collapsed.
......@@ -10,6 +10,7 @@ namespace app\index\controller;
use app\index\extend\Basic;
use app\index\service\HouseService;
use app\model\GBusinessDistrict;
use app\model\Regions;
......@@ -39,12 +40,20 @@ class BusinessDistrict extends Basic
if ($params['id']) {
$num = $business->save($data, ['id' => $params['id']]);
$business_district_id= $params['id'];
} else {
$business->save($data);
$num = $business->id;
$business_district_id= $num;
}
/*获取商圈经纬度*/
$house = new HouseService();
$house->setCityLatAadLng($business_district_id,$params['business'], $params['city']);
if ($num) {
$result['code'] = 200;
$result['msg'] = '添加成功';
} else {
......@@ -150,10 +159,8 @@ class BusinessDistrict extends Basic
$where['province'] = $this->params['province'];
}
if (!empty($this->params['city'])) {
// $where['city'] = '上海市';
// } else {
$where['city'] = $this->params['city'];
if (!empty($this->params['city']) && $this->userId != 1) {
$where['city'] = $this->userId;
}
if (!empty($this->params['disc'])) {
......@@ -201,9 +208,23 @@ class BusinessDistrict extends Basic
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getCity() {
public function getCityAll() {
$region = new Regions();
$city = $region->where('type',2)->select();
$city = $region->getCityAll('code,parentCode,name,fullName,longitude,latitude', ['type'=>2]);
return $this->response(200, '', $city);
}
/**
* 获取区数据
*
* @return \think\Response
* @throws \think\db\exception\BindParamException
* @throws \think\exception\PDOException
*/
public function getAllDisc() {
header('Access-Control-Allow-Origin:*');
$regions = new Regions();
$data = $regions->getDiscByCity($this->city);
return $this->response(200, '', $data);
}
}
\ No newline at end of file
......@@ -32,90 +32,106 @@ class Collection extends Basic
$pageSize = empty($this->params['pageSize']) ? 10 : $this->params['pageSize'];
$where = [];
$is_show = 0;
if (!empty($this->params['start_time']) && empty($this->params['end_time'])) {
$where['a.create_time'] = ['> time',$this->params['start_time'] . ' 00:00:00'];
$is_show = 1;
}
if (!empty($this->params['end_time']) && empty($this->params['start_time'])) {
$where['a.create_time'] = ['< time',$this->params['end_time'] . ' 23:59:59'];
$is_show = 1;
}
if (!empty($this->params['end_time']) && !empty($this->params['start_time'])) {
$where['a.create_time'] = ['between time', [
$this->params['start_time']. ' 00:00:00',$this->params['end_time']. ' 23:59:59'
]];
$is_show = 1;
}
if (!empty($this->params['income_start_time']) && empty($this->params['income_end_time'])) {
$where['a.income_time'] = ['> time',$this->params['income_start_time'] . ' 00:00:00'];
$is_show = 1;
}
if (!empty($this->params['income_end_time']) && empty($this->params['income_start_time'])) {
$where['a.income_time'] = ['< time',$this->params['end_time'] . ' 23:59:59'];
$is_show = 1;
}
if (!empty($this->params['income_end_time']) && !empty($this->params['income_start_time'])) {
$where['a.income_time'] = ['between time', [
$this->params['income_start_time']. ' 00:00:00',$this->params['income_end_time']. ' 23:59:59'
]];
$is_show = 1;
}
if (!empty($this->params['internal_title'])) {
$where['d.internal_title'] = ['like', '%'.$this->params['internal_title'].'%'];
$is_show = 1;
}
if (!empty($this->params['internal_address'])) {
$where['d.internal_address'] = ['like', '%'.$this->params['internal_address'].'%'];
$is_show = 1;
}
if (!empty($this->params['user_name'])) {
$where['c.user_name'] = ['like','%'.$this->params['user_name'].'%'];
$is_show = 1;
}
if (!empty($this->params['user_phone'])) {
$where['c.user_phone'] = ['like','%'.$this->params['user_phone'].'%'];
$is_show = 1;
}
if (!empty($this->params['id'])) {
$where['a.house_number'] = $this->params['id'];
$is_show = 1;
}
if (!empty($this->params['store_id'])) {
$where['e.store_id'] = $this->params['store_id'];
$is_show = 1;
}
if (!empty($this->params['district_id'])) {
$where['e.district_id'] = $this->params['district_id'];
$is_show = 1;
}
if (!empty($this->params['report_phone'])) {
$where['e.phone'] = ['like','%'.$this->params['report_phone'].'%'];
$is_show = 1;
}
if (!empty($this->params['pay_type'])) {
$where['a.pay_type'] = $this->params['pay_type'];
$is_show = 1;
}
if (!empty($this->params['type'])) {
$where['a.type'] = $this->params['type'];
$is_show = 1;
}
if (!empty($this->params['report_name'])) {
$where['e.name'] = ['like','%'.$this->params['report_name'].'%'];
$is_show = 1;
}
if (empty($this->params['excel'])) {
$field = 'a.id,a.father_id,a.order_id,a.create_time,c.user_name,c.user_phone,a.money,a.real_money,a.pay_type,
a.house_number,a.type,d.internal_title,d.internal_address,a.source,a.transaction_fee,c.report_agent_phone,
c.report_agent_name,f.store_name,g.district_name';
c.report_agent_name,f.store_name,g.district_name,a.income_time';
$data['data']['list'] = $order->getAddPayLogOrderListLmit($pageNo, $pageSize, $order_ = 'a.id desc', $field, $where);
$data['data']['total'] = $order->getAddPayLogOrderListLmitTotal($where);
//加时间条件
if ($where['a.create_time']) {
if (!empty($this->params['start_time']) && empty($this->params['end_time'])) {
$pay_where['create_time'] = ['> time',$this->params['start_time'] . ' 00:00:00'];
}
if (!empty($this->params['end_time']) && empty($this->params['start_time'])) {
$pay_where['create_time'] = ['< time',$this->params['end_time'] . ' 23:59:59'];
}
if (!empty($this->params['end_time']) && !empty($this->params['start_time'])) {
$pay_where['create_time'] = ['between time', [
$this->params['start_time']. ' 00:00:00',$this->params['end_time']. ' 23:59:59'
]];
}
$data['data']['money_total'] = $order->getMoneyTotal($pay_where); //总额
if ($is_show) {
$data['data']['money_total'] = $order->getMoneyTotal($where, 'a.money'); //总额
} else {
$data['data']['money_total'] = '';
}
......@@ -123,6 +139,10 @@ class Collection extends Basic
if (!empty($v['user_phone'])) {
$data['data']['list'][$k]['user_phone'] = substr_replace($v['user_phone'],'****',3,4);
}
if (!empty($v['income_time'])) {
$data['data']['list'][$k]['income_time'] = date('Y-m-d', strtotime($v['income_time']));
}
}
$data['data']['list'] = $this->numberTransitionString($data['data']['list']);
return $this->response(200, "", $data['data']);
......@@ -177,6 +197,10 @@ class Collection extends Basic
$where_["transaction_fee"] = $params["transaction_fee"];
}
if(isset($params["income_time"])){
$where_["income_time"] = $params["income_time"];
}
$order = new OPayLogModel();
$id = $order->updatePayLog($where_);
if($id > 0 ){
......
......@@ -35,14 +35,12 @@ class District extends Basic
$pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo'];
$pageSize = empty($this->params['pageSize']) ? 10 : $this->params['pageSize'];
$agents = new ADistrict();
$where = '';
$where = $field = '';
$join = 0;
$field = '';
if ($this->params['search'] != NULL) {
$field = 'a.id,a.district_name,a.create_time,b.name,b.phone';
$where .= "a.status=0 AND (phone like '{$this->params['search']}%' or name like '{$this->params['search']}%')";
$field = 'a.id,a.district_name,a.create_time,b.name,b.phone,a.site_id';
$where .= " a.status=0 AND (phone like '{$this->params['search']}%' or name like '{$this->params['search']}%')";
$join = 1;
}
......@@ -56,6 +54,10 @@ class District extends Basic
}
}
if (!empty($this->params['site_id'] && $this->userId != 1)) {
$where['a.site_id'] = $this->params['site_id'];
}
$data['list'] = $agents->getListDistrict($pageNo, $pageSize, 'id DESC', $field, $where,$join);
$data['total'] = $agents->getListDistrictTotal($where,$join);
return $this->response($data['status'], $data['msg'], $data);
......@@ -65,17 +67,15 @@ class District extends Basic
* 添加部门,绑定总监关系
*
* @return \think\Response
* @throws \Exception
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
* @throws \think\exception\PDOException
*/
public function addDistrict () {
$district = new ADistrict();
if ($this->request->isPost()) {
if ($this->params['department_name'] || $this->params['agents_id']) {
if ($this->params['department_name']) {
$this->data = $district->addDepartmentAgents($this->params, $this->params['agents_id']);
} else {
$this->code = 101;
......@@ -109,10 +109,14 @@ class District extends Basic
$pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo'];
$pageSize = empty($this->params['pageSize']) ? 10 : $this->params['pageSize'];
$where['status'] = 0;
if ($this->params['district_name']) {
$where['district_name'] = ['LIKE', $this->params['district_name']. '%'];
}
if (!empty($this->params['site_id'] && $this->userId != 1)) {
$where['site_id'] = $this->params['site_id'];
}
if ($where) {
$district = new ADistrict();
$field = 'id,district_name';
......@@ -138,10 +142,11 @@ class District extends Basic
$pageSize = empty($this->params['pageSize']) ? 10 : $this->params['pageSize'];
$agents = new ADistrict();
if (!empty($this->params['site_id'] && $this->userId != 1)) {
$where['site_id'] = $this->params['site_id'];
}
$where = [];
$field = 'id,district_name';
$where['status'] = 0;
$data['data'] = $agents->getList($pageNo, $pageSize, 'id DESC', $field, $where);
......
......@@ -432,7 +432,7 @@ class Finance extends Basic
$data['msg'] = "";
$data['data'] = [];
if (empty($this->params['id']) || empty($this->params['agent_id']) || empty($this->params['role'])) {
if (empty($this->params['id']) || empty($this->params['agent_id'])) {
$data['code'] = 101;
$data['msg'] = '提交信息错误!';
} else {
......@@ -702,14 +702,17 @@ class Finance extends Basic
if (!empty($this->params['create_time']) && empty($this->params['end_time'])) {
$where['f.income_time'] = [ '>= time', $this->params['create_time'] . ' 00:00:00' ];
$select = 1;
}
if (!empty($this->params['end_time']) && empty($this->params['create_time'])) {
$where['f.income_time'] = [ '<= time', $this->params['end_time'] . ' 23:59:59' ];
$select = 1;
}
if (!empty($this->params['end_time']) && !empty($this->params['create_time'])) {
$where['f.income_time'] = [ 'between time', [ $this->params['create_time'] . ' 00:00:00', $this->params['end_time'] . ' 23:59:59' ] ];
$select = 1;
}
if (!empty($this->params['internal_address'])) {
......@@ -775,15 +778,38 @@ class Finance extends Basic
$where['a.confirm_status'] = 1;
$where['a.is_del'] = 0;
if (!empty($this->params['create_time']) && empty($this->params['end_time'])) {
$where['f.income_time'] = [ '>= time', $this->params['create_time'] . ' 00:00:00' ];
$income_where['income_time'] = [ '>= time', $this->params['create_time'] . ' 00:00:00' ];
}
if (!empty($this->params['end_time']) && empty($this->params['create_time'])) {
$where['f.income_time'] = [ '<= time', $this->params['end_time'] . ' 23:59:59' ];
$income_where['income_time'] = [ '<= time', $this->params['end_time'] . ' 23:59:59' ];
}
if (!empty($this->params['end_time']) && !empty($this->params['create_time'])) {
$where['f.income_time'] = [ 'between time', [ $this->params['create_time'] . ' 00:00:00', $this->params['end_time'] . ' 23:59:59' ] ];
$income_where['income_time'] = [ 'between time', [ $this->params['create_time'] . ' 00:00:00', $this->params['end_time'] . ' 23:59:59' ] ];
}
if (!empty($income_where)) {
$m_real = new ORealIncome();
$bargain_arr = $m_real->getRealIncomeBargain('bargain_id', $income_where);
if ($bargain_arr['status'] == 'successful') {
if (empty($bargain_arr['data'])) {
return $this->response(200, '');
}
foreach ($bargain_arr['data'] as $v) {
$bargain_id[] = $v['bargain_id'];
}
if (!empty($bargain_id)) {
$bargain_id_string = implode(',', $bargain_id);
$where[] = ['EXP', 'b.id in ('.$bargain_id_string.') or b.father_id in ('.$bargain_id_string.')'];
}
} else {
return $this->response(101, '内部错误:'.$bargain_arr['msg']);
}
}
if (!empty($this->params['internal_address'])) {
......
......@@ -227,9 +227,8 @@ class Houses extends Basic
$where['shop_type'] = $this->params['shop_type'];
}
/*所在城市*/
if (!empty($this->params['city'])) {
$where['city'] = $this->params['city'];
if ($this->userId != 1) {
$where['city'] = $this->city;
}
/*所在区*/
......@@ -306,7 +305,7 @@ class Houses extends Basic
$where['industry_type'] = [ 'LIKE', '%' . $this->params['industry_type'] . '%' ];
}
$fields = 'id,shop_type,internal_title,rent_price,is_show,create_time,residue_num,rent_type,status,
$fields = 'id,shop_type,external_title as internal_title,rent_price,is_show,create_time,residue_num,rent_type,status,
shop_area_start,shop_area_end,industry_type,disc,is_carefully_chosen,is_exclusive_type,is_lock';
/*楼盘编号*/
......@@ -381,14 +380,6 @@ class Houses extends Basic
}
}
if ($this->params['city'] != NULL) {
$where['city'] = $this->params['city'];
}
if ($this->params['disc'] != NULL) {
$where['disc'] = $this->params['disc'];
}
if (!empty($this->params['area'])) {
switch ($this->params['area']) {
case 1:
......
......@@ -5,7 +5,9 @@ namespace app\index\controller;
use app\index\extend\Basic;
use app\index\service\ImageDepotService;
use app\index\service\UserService;
use app\model\GBusinessDistrict;
use app\model\GImageDepot;
use think\Log;
/**
* zhuwei
......@@ -175,16 +177,19 @@ class ImageDepot extends Basic
//查询客户是否在保护期内
//判断客户是否超过24小时保护期间 0:保护器内 1:超过保护期
$user_service = new UserService();
$is_outstrip_twenty_four_hours = $user_service->isUserProtect(1);
dump($is_outstrip_twenty_four_hours);
if($is_outstrip_twenty_four_hours == 0){
dump('保护器内');
}else{
dump('超过保护期');
}
// $is_outstrip_twenty_four_hours = $user_service->isUserProtect(1);
// dump($is_outstrip_twenty_four_hours);
// if ($is_outstrip_twenty_four_hours == 0) {
// dump('保护器内');
// } else {
// dump('超过保护期');
// }
$user_id =1;
$site_id ='100005,100005,100006,100007';
$user_service->setUserSites($user_id, $site_id);
}
}
......@@ -162,7 +162,7 @@ class Label extends Basic
if (empty($this->params['user_id'])) {
return $this->response(101, '没有用户信息');
}
$follow = new UPhoneFollowPp();
$follow = new UPhoneFollowPp($this->siteId);
$user_status = $follow->getUserFollowKey('user_status', ['user_id'=>$this->params['user_id']], 'id DESC');
return $this->response(200, '', $user_status);
}
......
......@@ -4,12 +4,13 @@ namespace app\index\controller;
use app\api\untils\JwtUntils;
use app\api_broker\service\BrokerService;
use app\extra\RedisExt;
use app\index\extend\Basic;
use app\model\AAgents;
use app\model\ASite;
use app\model\AStore;
use app\model\AuthGroup;
use app\model\AuthRule;
use phpDocumentor\Reflection\DocBlock\Tags\See;
use think\Session;
/**
......@@ -60,8 +61,8 @@ class Login extends Basic
}
$fields = 'a.id,a.store_id,a.auth_group_id,a.district_id,a.level,a.name,a.phone,a.sex,a.img,a.status,a.admin_off
,b.store_name,c.district_name';
,b.store_name,c.district_name,a.site_id';
$where['a.status'] = ['<>', 3];
try {
$where['password'] = md5($password);
$where['phone'] = trim($name);
......@@ -71,6 +72,9 @@ class Login extends Basic
return $this->response(101, '用户名或密码错误');
}
if ($user_data['status'] == 1 || $user_data['status'] == 2) {
return $this->response(101, '你目前是长假/离职状态,请联系人事进行更改');
}
$auth_group_id = '';
if (!empty($user_data['auth_group_id'])) {
$auth_group_id = $this->m_auth_group->getAuthGroupById($user_data['auth_group_id'], 'rules');
......@@ -123,6 +127,17 @@ class Login extends Basic
$update_data['last_login_time'] = date('Y-m-d H:i:s');
$update_data['last_login_ip'] = $last_login_ip;
$this->m_agent->updateData($user_data['id'], $update_data);
$redis_ = RedisExt::getRedis();
$site_city = [];
if (!empty($user_data['site_id'])) {
$m_site = new ASite();
$site_city = $m_site->getSite('city', ['id'=>$user_data['site_id'], 'is_del'=>0]);
$redis_->set("agent_city_" . $user_data['id'], $site_city[0]['city']);
$redis_->set("agent_site_id_" . $user_data['id'], $user_data['site_id']);
}
$user_data['city'] = $site_city[0]['city'];
} catch (\Exception $e) {
return $this->response(101, '内部错误,请联系运营!' . $e->getMessage());
}
......
......@@ -57,6 +57,10 @@ class LookShop extends Basic
if (!empty($params["agent_phone"])) {
$condition["a.agent_phone"] = array( "like", "%" . trim($params["agent_phone"]) . "%" );
}
if ($this->userId != 1) {
$condition["b.city"] = $this->city;
}
$field = "a.id,a.look_time,a.house_id,b.internal_title,a.agent_name,a.agent_phone";
$result = $this->tLookShopModel->getList($condition, $field, $pageNo, $pageSize);
......
......@@ -61,6 +61,13 @@ class Member extends Basic{
$type = 0;
$if_search_user = false;
//客方ID
$can_vip = true;
if (!empty($params['agent_id'])) {
$where['a.agent_id'] = $params['agent_id'];
$can_vip = false;
}
//APP状态
if (!empty($params['activate']) && $params['activate'] != -1) {
if ($params['activate'] == 1) {
......@@ -105,15 +112,19 @@ class Member extends Basic{
$where['a.create_time'] = ['between time', [$params['start_date']. ' 00:00:00', $params['end_date'] . ' 23:59:59']];
}else{
if (empty($params['id']) && empty($params['phone'])) {
// $time_ = date('Y-m-d H:i:s', strtotime("-1 day"));
// $where['a.create_time'] = array( 'lt', $time_ );
//排除排除保护期内的客户
$time_now = date('Y-m-d H:i:s');//当前时间
$time_after = date("Y-m-d H:i:s",strtotime("+1 day"));//24小时前的时间
$where['a.protect_time'] = array( 'not between', array( $time_now, $time_after ) );
if($can_vip) {
//$time_ = date('Y-m-d H:i:s', strtotime("-1 day"));//根据create_time排除保护期客户-废弃
//$where['a.create_time'] = array( 'lt', $time_ );//根据create_time排除保护期客户-废弃
//排除排除保护期内的客户
$time_now = date('Y-m-d H:i:s');//当前时间
//protect_time 将截止日期大于当前时间的数据排除掉
$where['a.protect_time'] = array( 'lt', $time_now );
$where['a.site_ids'] = [ 'LIKE', '%' . $this->siteId . '%' ];//默认显示经纪人所在站点的客户
}
}
}
//是否登录过
if (!empty($params['login_status']) && $params['login_status'] != -1) {
if ($params['login_status'] == 1) {
......@@ -233,10 +244,7 @@ class Member extends Basic{
}
//客方ID
if (!empty($params['agent_id'])) {
$where['a.agent_id'] = $params['agent_id'];
}
if (!empty($params['first_login_start'])) {
$where['a.first_login_time'] = $params['first_login_start'] . ' 00:00:00';
......@@ -254,17 +262,19 @@ class Member extends Basic{
if ($params['vip'] == 1) {
$where['a.vip'] = 1;
} else {
$where['a.vip'] = 0;
if($can_vip){
$where['a.vip'] = 0;
}
}
}
if (!empty($params['province'])) {
$where['a.province'] = $params['province'];
}
// if (!empty($params['province'])) {
// $where['a.province'] = $params['province'];
// }
if (!empty($params['city'])) {
$where['a.city'] = $params['city'];
}
// if ($this->city != '全部') {
// $where['a.city'] = $params['city'];
// }
if (!empty($params['disc'])) {
$where['a.disc'] = $params['disc'];
......@@ -307,8 +317,7 @@ class Member extends Basic{
a.user_name,a.status,a.first_login_time,a.last_login_time,a.agent_id,a.vip,a.price_demand,a.industry_type,a.area_demand,a.user_status,a.source';
try {
$data_list = $this->user->getUserAgent($pageNo, $pageSize, 'a.id DESC', $fields, $where, $type);
$clientService = new ClientService();
$data_list = $this->user->getUserAgent($pageNo, $pageSize, 'a.id DESC', $fields, $where, $type,$this->siteId);
$list = [];
foreach ($data_list as $k=>$v) {
$data_list[$k]['user_phone'] = hide_customer_phone($data_list[$k]['user_phone']);
......@@ -393,19 +402,19 @@ class Member extends Basic{
public function pcAddFollow(){
$status = 200;
$msg = '成功!';
$table = new UPhoneFollowPp;
$params = $this->request->param();
if(empty($params['content']) || empty($params['user_id'])) {
return $this->response(101, $msg = '缺少参数', $params);
}
$params['id'] = '';
//$params['id'] = '';
$params['labels_id'] = 0;
$params['agent_id'] = Session::get("user_info.id");
$params['type'] = 1;
$params['user_status'] = $params['user_status'];
$table->allowField(true)->save($params);
$model = new UPhoneFollowPp($this->siteId);
$result = $model->savePhoneFollow($params);
$user = new Users();
$user->update_user_status(['id'=>$params['user_id'],'user_status'=>$params['user_status']]);
......
......@@ -77,9 +77,7 @@ class OperationData extends Basic
foreach (explode(',',$agentIds) as $k1 => $v1) {
// 发起微聊用户数
$where['to_id'] = 'agent_' . $v1;
$where['from_id'] = [ 'LIKE', '%user_%' ];
$where['to_id'] = 'agent_'.$v1;
$group = '';
$res = $chatRelationModel->getChatUserNumOperation($where, $group);
$chat_user_all_num += $res;
......@@ -102,48 +100,26 @@ class OperationData extends Basic
* 客户来电数
* @return \think\Response
*/
// public function userPhoneNum()
// {
// $params = $this->params;1
// $params_['a.create_time'] = [ 'between', [ $params['create_time_start'] . ' 00:00:00', $params['create_time_end'] . ' 23:59:59' ] ];
// // 先查新所有部门
// $district_list = $this->getDistrict();
//
// foreach ($district_list as $key => $v) {
// $result_["id"] = $v['id'];
// $result_["district_name"] = $v['district_name'];
//
// // 客户来电数
// $params_["b.district_id"] = $v['id'];
// $params_["a.status"] = 0; //只查询正常状态的经纪人
// $model = new AUserCallAgent();
// $res = $model->getUserCallAgentCount($params_);
//
// $result_["user_phone_num"] = isset($res) ? $res : 0;
// $result[] = $result_;
// }
// return $this->response(200, 'success', $result);
// }
public function userPhoneNum()
{
$params = $this->params;
$where['create_time'] = [ 'between', [ $params['create_time_start'] . ' 00:00:00', $params['create_time_end'] . ' 23:59:59' ] ];
$params = $this->params;
$params_['a.create_time'] = [ 'between', [ $params['create_time_start'] . ' 00:00:00', $params['create_time_end'] . ' 23:59:59' ] ];
// 先查新所有部门
$district_list = $this->getDistrict();
foreach ($district_list as $key => $v) {
$result_["id"] = $v['id'];
$result_["id"] = $v['id'];
$result_["district_name"] = $v['district_name'];
// 客户来电数
$params = [];
$params["district_id"] = $v['id'];
//$params["status"] = 0; //只查询正常状态的经纪人
$field = "sum(call_number) as call_number_total";
$agentModel = new AAgents();
$res = $agentModel->getUserPhoneNum($field, $params);
$result_["user_phone_num"] = isset($res[0]["call_number_total"]) ? $res[0]["call_number_total"] : 0;;
$result_["user_phone_num"] = isset($res) ? $res : 0;
$result[] = $result_;
}
return $this->response(200, 'success', $result);
......
......@@ -35,7 +35,7 @@ class PerformanceInfo extends Basic
$pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo'];
$pageSize = empty($this->params['pageSize']) ? 15 : $this->params['pageSize'];
$where['Obargain.status'] = ['in', '10,11,13'];
$where['Obargain.status'] = array('neq',30);
/*开始结束时间*/
if (($this->params['create_time_start'] != NULL) && ($this->params['create_time_end'] != NULL)) {
$where['Obargain.create_time'] = ['between time', [$this->params['create_time_start']. ' 00:00:00', $this->params['create_time_end'] . ' 23:59:59']];
......@@ -51,11 +51,12 @@ class PerformanceInfo extends Basic
}
// 商铺地址
if ($this->params['landmark'] != NULL) {
$where['Houses.landmark'] = ['like', '%'.$this->params['landmark'].'%'];
$where['Houses.internal_address'] = ['like', '%'.$this->params['landmark'].'%'];
}
// 商铺编号
if ($this->params['house_id'] != NULL) {
$where['Houses.id'] = $this->params['house_id'];
$where['Oorder.house_id'] = $this->params['house_id'];
}
// 部门
......@@ -85,7 +86,7 @@ class PerformanceInfo extends Basic
if ($this->params['bargain_id'] != NULL) {
$where['Obargain.id'] = $this->params['bargain_id'];
}
//dump($where);
$field = 'Obargain.create_time,';
$field .= 'Obargain.id,';
$field .= 'Obargain.father_id,';
......@@ -93,26 +94,27 @@ class PerformanceInfo extends Basic
$field .= 'Obargain.agent_id,';//分佣方ID,前端做权限判断用
$field .= 'Obargain.scale,';
$field .= 'Obargain.scale_fee,';
$field .= 'Obargain.practical_fee,';
$field .= 'Obargain.order_id,';
$field .= 'Obargain.role,';
$field .= 'Obargain.price,';
$field .= 'Agent.name,';
$field .= 'Agent.phone,';
$field .= 'Store.store_name,';
$field .= 'District.district_name,';
$field .= 'Houses.internal_address,';
$field .= 'PartialCommission.practical_fee,';
$field .= 'Oorder.house_id';
$return = $this->oBargainModel->performancelInfo($where,$field,$pageSize,$pageNo);
/*o_partial_commission表查询实收数据 2018-10-10 10:35:42 朱伟*/
$m_commission = new OPartialCommission();
foreach ($return as $key => $val) {
$return_ = $m_commission->getPracticalFee($val["id"]);
$return[$key]['practical_fee'] = $return_[0]['practical_fee'] ? $return_[0]['practical_fee'] : 0;
//截取字符串前3位
//成交报告ID
$return[$key]['bargain_id'] = $val["father_id"] == 0 ? $val["id"] : $val["father_id"];
//分佣ID
$return[$key]['commission_id'] = $val["id"] ;
$return[$key]['practical_fee'] = $val["practical_fee"] ? $val["practical_fee"] : 0 ;
//商铺地址只显示前3位,后面*替代
$return[$key]['landmark'] = $val["internal_address"] ? mb_substr($val["internal_address"],0,3,'utf-8').'****' : '';
}//end
}
$return_total = $this->oBargainModel->performancelInfoTotal($where,$field);
$field = 'sum(Obargain.scale_fee) as scale_fee_sum';
......@@ -132,7 +134,7 @@ class PerformanceInfo extends Basic
public function getPerformanceInfoExcel()
{
$where['Obargain.status'] = ['in', '10,11,13'];
$where['Obargain.status'] = array('neq',30);
/*开始结束时间*/
if (($this->params['create_time_start'] != NULL) && ($this->params['create_time_end'] != NULL)) {
$where['Obargain.create_time'] = ['between time', [$this->params['create_time_start']. ' 00:00:00', $this->params['create_time_end'] . ' 23:59:59']];
......@@ -148,11 +150,11 @@ class PerformanceInfo extends Basic
}
// 商铺地址
if ($this->params['landmark'] != NULL) {
$where['Houses.landmark'] = ['like', '%'.$this->params['landmark'].'%'];
$where['Houses.internal_address'] = ['like', '%'.$this->params['landmark'].'%'];
}
// 商铺编号
if ($this->params['house_id'] != NULL) {
$where['Houses.id'] = $this->params['house_id'];
$where['Oorder.house_id'] = $this->params['house_id'];
}
// 部门
......@@ -183,7 +185,7 @@ class PerformanceInfo extends Basic
$field .= 'District.district_name,';
$field .= 'Obargain.scale,';
$field .= 'Obargain.scale_fee,';
$field .= 'Obargain.practical_fee';
$field .= 'PartialCommission.practical_fee';
$return = $this->oBargainModel->performancelInfoExcel($where,$field);
if(!$return){
......@@ -191,7 +193,7 @@ class PerformanceInfo extends Basic
}
$export = new ExportExcelUntil();
$e_data_new = [];
foreach ($return as $key => $v) {
$e_data_old['create_time'] = $v['create_time'];//提交时间
......@@ -205,10 +207,6 @@ class PerformanceInfo extends Basic
$e_data_old['trade_type'] = "好处费";
}
/*o_partial_commission表查询实收数据 2018-10-10 10:35:42 朱伟*/
$m_commission = new OPartialCommission();
$return_ = $m_commission->getPracticalFee($v["id"]);
$practical_fee = $return_[0]['practical_fee'] ? $return_[0]['practical_fee'] : 0;//end
//商铺地址截取字符串前3位,后面做隐藏 --暂时不用,后期可直接解除注释
//$landmark = $v["landmark"] ? mb_substr($v["landmark"],0,3,'utf-8').'****' : '';
......@@ -221,12 +219,12 @@ class PerformanceInfo extends Basic
$e_data_old['district_name'] = $v['store_name'];//所属部门
$e_data_old['scale'] = $v['scale'];//分佣比例
$e_data_old['scale_fee'] = $v['scale_fee'];//应收佣金
$e_data_old['practical_fee'] = $practical_fee;//实收佣金
$e_data_old['practical_fee'] = $v['practical_fee'];//实收佣金
$e_data_new[]=$e_data_old;
}
$title = [ '提交时间', '成交类型', '商铺地址', '商铺编号', '分佣提成方', '所属部门门店', '分佣比例', '应收佣金', '实收佣金' ];
$export->exportTable('业绩明细', $e_data_new, 10, '业绩明细表', $title);
$export->exportTable('业绩明细', $e_data_new, count($e_data_new[0]), '业绩明细表', $title);
return '';
}
......
......@@ -10,19 +10,20 @@ namespace app\index\controller;
use app\api_broker\service\CallPhoneService;
use app\api_broker\service\ClientService;
use app\extra\RedisExt;
use app\api_broker\service\UserExpiredTimeService;
use app\api_broker\service\VerifyRepetitionService;
use app\extra\RedisExt;
use
use app\index\extend\Basic;
use app\index\service\UserService;
use app\model\AAgents;
use app\model\AAgentsPhone;
use app\model\ASite;
use app\model\GOperatingRecords;
use app\model\Remarks;
use app\model\ULabels;
use app\model\UPhoneFollowPp;
use app\model\Users;
use think\Session;
class Remark extends Basic
{
......@@ -50,7 +51,7 @@ class Remark extends Basic
$pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo'];
$pageSize = empty($this->params['pageSize']) ? 15 : $this->params['pageSize'];
$u_phone_follow = new UPhoneFollowPp();
$u_phone_follow = new UPhoneFollowPp($this->siteId);
if (!empty($this->params['start_date']) && empty($this->params['end_date'])) {
$where['create_time'] = ['> time', $this->params['start_date'] . ' 00:00:00'];
......@@ -91,13 +92,17 @@ class Remark extends Basic
$agent_where['district_id'] = $this->params['remark_district_id'];
}
if (!empty($this->params['province'])) {
/*if (!empty($this->params['province'])) {
$where['province'] = $this->params['province'];
}
if (!empty($this->params['city'])) {
$where['city'] = $this->params['city'];
}
}*/
/*if ($this->city != '全部') {
$where['city'] = $this->city;
}*/
if (!empty($this->params['disc'])) {
$where['disc'] = $this->params['disc'];
......@@ -142,30 +147,26 @@ class Remark extends Basic
$is_outpace_call_num = 1;
}
$model = new AAgents();
$result = $model->searchAgentsByKeyword("id,name,phone", ["id" => $this->params["agent_id"]]);
$result = $model->searchAgentsByKeyword("id,name,phone", [ "id" => $this->params["agent_id"]]);
//$call = new CallPhoneService();
//$result = $call->getBindNum($v['user_phone'],$result[0]['phone']);
//if($result != 0){
// $is_outpace_call_num = 0;
//}
if ($is_outpace_call_num == 1 ) {
$is_privacy = $redis->get('s_is_privacy');//判断是否当前经纪人跟当前客户是否有电话绑定 从redis查询
if (empty($result[0]['phone'])) {
$m_agent_phone = new AAgentsPhone();
$agent_phone = $m_agent_phone->getList(1,1,'','phone', ['agent_id'=>$this->userId]);
$phone = $agent_phone[0]['phone'];
} else {
$phone = $result[0]['phone'];
}
$call_key = 'call_'.$this->userId.'_'.$phone.'_'.$v['user_phone'].'_'.$is_privacy;
$redis_res = $redis->get($call_key);
if ($is_outpace_call_num == 1) {
$is_privacy = $redis->get('s_is_privacy');//判断是否当前经纪人跟当前客户是否有电话绑定 从redis查询
if (empty($result[0]['phone'])) {
$m_agent_phone = new AAgentsPhone();
$agent_phone = $m_agent_phone->getList(1, 1, '', 'phone', ['agent_id' => $this->userId]);
$phone = $agent_phone[0]['phone'];
} else {
$phone = $result[0]['phone'];
}
$call_key = 'call_' . $this->userId . '_' . $phone . '_' . $v['user_phone'] . '_' . $is_privacy;
$redis_res = $redis->get($call_key);
if (empty($redis_res)) {
if(empty($redis_res)){
$is_outpace_call_num = 1;
}
}
$data['data']['list'][$k]['is_outpace_call_num'] = $is_outpace_call_num;
/* 判断当天被拨打是否超过5次,同时判断是否当前经纪人跟当前客户是否有电话绑定 end*/
......@@ -224,7 +225,7 @@ class Remark extends Basic
$pagesize = 15;
$user_id = $params['user_id'];
$UPhoneFollowPp = new UPhoneFollowPp();
$UPhoneFollowPp = new UPhoneFollowPp($this->siteId);
// 查询电话跟进数据
$UPhoneFollowPp_res = $UPhoneFollowPp->select_useraction_search($user_id, $searchdate);
......@@ -253,6 +254,17 @@ class Remark extends Basic
$user_res['agentinfo'] = $Agents_res ? $Agents_res['name'] . '/' . $Agents_res['phone'] : '未知';
/*查询站点名*/
$site_model = new ASite();
foreach (explode(',', $user_res['site_ids']) as $site_k => $site_v) {
$site_field = 'city';
$site_params['id'] = $site_v;
$site_model = $site_model->findByOne($site_field,$site_params);
//dump($site_model["city"]);
$user_res['site_name'][]= $site_model["city"] ;
}
/*查询站点名*/
//判断客户是否超过24小时保护期间 0:保护器内 1:超过保护期
/*$ser = new UserExpiredTimeService();
......@@ -327,19 +339,6 @@ class Remark extends Basic
);
}
/**
* 客方搜索
*
* @return \think\Response
*/
public function select_by_phone()
{
$phone = trim($this->params['phone']);
$table = new Agents();
$Agents_res = $table->select_by_phone($phone);
return $this->response("200", "success!", $Agents_res);
}
/**
* 电话跟进列表
*/
......@@ -348,49 +347,14 @@ class Remark extends Basic
header('Access-Control-Allow-Origin:*');
$params = $this->params;
$page_num = isset($params['pagenum']) ? $params['pagenum'] : 1;
$page_size = 15;
// if (!isset($params['user_id'])) {
// return $this->response("300", "参数不全", [ 'remote_groupid' => '' ]);
// }
$searchdate = $params['searchdate'];
$pagenum = isset($params['pagenum']) ? $params['pagenum'] : 1;
$pagesize = 15;
$user_id = $params['user_id'];
$UPhoneFollowPp = new UPhoneFollowPp();
$UPhoneFollowPp = new UPhoneFollowPp($this->siteId);
// 查询电话跟进数据
$UPhoneFollowPp_res = $UPhoneFollowPp->phone_up_list($pagesize, $pagenum);
//dump($UPhoneFollowPp_res);
/*dump($total);
var_dump($user_res);
exit;*/
//dump($UPhoneFollowPp_res);
/*foreach($UPhoneFollowPp_res as $k=>$v){
$table= new Agents();
$Agents_res =$table->Agents_res($v['agent_id']);
//dump($Agents_res);
$UPhoneFollowPp_res[$k]['agentinfo']=$Agents_res?$Agents_res['agentshopname'].'-'.$Agents_res['realname']:'未知';
$UPhoneFollowPp_res[$k]['user_pic']=ADMIN_URL_TL.'user_header/'.$Agents_res['head_portrait'];
$UPhoneFollowPp_res[$k]['label']='';
//dump($v['labels_id']);
//电话跟进标签
if($v['labels_id']){
$table= new ULabels();
$table_res =$table->get_labelsname($v['labels_id']);
//dump($table_res);
//exit;
$UPhoneFollowPp_res[$k]['label']=$table_res[0]['name'];
}
}*/
$UPhoneFollowPp = new UPhoneFollowPp();
$UPhoneFollowPp_res = $UPhoneFollowPp->phone_up_list($page_size, $page_num);
$total = $UPhoneFollowPp->phone_up_list_count();
//dump($total);
$total = intval($total / $pagesize) + (($total % $pagesize == 0) ? 0 : 1);
//dump($total);
$total = intval($total / $page_size) + (($total % $page_size == 0) ? 0 : 1);
return $this->response("200", "success!", [ 'user_date' => $UPhoneFollowPp_res, 'pagenum' => $pagenum, 'total' => $total ]);
}
......
<?php
namespace app\index\controller;
/**
* Created by PhpStorm.
* User: zhuwei
* Date:2018-10-18
* Time:10:50:55
*/
use app\index\extend\Basic;
use app\model\ASite;
use think\Request;
class Site extends Basic
{
protected $aSite;
public function __construct($request = null)
{
parent::__construct($request);
$this->aSite = new ASite();
}
/**
* 新增数据
* User: 朱伟
* Date:2018-10-18
* Time:10:50:55
*/
public function addSite()
{
header('Access-Control-Allow-Origin:*');
$params = $this->params;
/*$params = array(
"name" => 上海站,
"city" => 上海市,
);*/
$checkResult = $this->validate($params, "Site.addSite");
if (true !== $checkResult) {
return $this->response("101", $checkResult);
}
//先判断是否已经存在数据
$field = 'id,is_del';
//$get_params['name'] = $params["name"];
$get_params['city'] = $params["city"];
$res = $this->aSite->getSite($field,$get_params);
if($res){//如果存在
return $this->response("101", "重复添加");
}else{//不存在则新增数据
$insert["name"] = $params['name'];
$insert["city"] = $params['city'];
$insert["is_del"] = 0;
$res = $this->aSite->saveSite($insert);//int(1)
}
if ($res) {
return $this->response("200", "成功");
} else {
return $this->response("101", "失败");
}
}
/**
* 获取站点列表
* User: 朱伟
* Date:2018-10-18
* Time:10:50:55
*/
public function getSiteList()
{
$params = $this->params;
/*$params = array(
"id" => 5740
);*/
$field = 'id,name,city,is_del';
$get_params['is_del'] = 0;
$res = $this->aSite->getSite($field, $params);
$data['list'] = $res;
return $this->response("200", "成功", $data);
}
/**
* 关闭或开启站点
* @return \think\Response
*/
public function delImageDepot(){
$params = $this->params;
$checkResult = $this->validate($params, "Site.delImageDepot");
if (true !== $checkResult) {
return $this->response("101", $checkResult);
}
$params_['id'] = $params['id'];
$params_['is_del'] = $params['is_del'];
$res = $this->aSite->updateSite($params_);//int(1)
if($res == 1){
return $this->response("200", "成功",['data'=>$res]);
}else{
return $this->response("300", "失败");
}
}
public function siteLogList()
{
if (!$this->request->isAjax()) {
return view('site/siteLogList');
}
}
}
\ No newline at end of file
......@@ -11,6 +11,7 @@ namespace app\index\controller;
use app\index\extend\Basic;
use app\index\validate\StoreValidate;
use app\model\ADistrict;
use app\model\AStore;
class Store extends Basic
......@@ -77,22 +78,31 @@ class Store extends Basic
* @throws \think\exception\PDOException3
*/
public function addStore() {
if (empty($this->params['agents_id'])) {
return $this->response(101, '参数错误,修改失败!');
}
$store_validate = new StoreValidate();
$store = new AStore();
$m_district = new ADistrict();
if (empty($this->params['id'])) {
if (!$store_validate->scene('add')->check($this->params)) {
return $this->response(101, $store_validate->getError());
}
$this->params['site_id'] = $m_district->getDistrictKeyById('site_id', ['id'=>$this->params['district_id']]);
} else {
if (!$store_validate->scene('edit')->check($this->params)) {
return $this->response(101, $store_validate->getError());
}
$district_id = $store->getStoreKeyById('district_id', ['id'=>$this->params['id']]);
$old_site_id = $m_district->getDistrictKeyById('site_id', ['id'=>$district_id]);
if (!empty($old_site_id)) {
$new_site_id = $m_district->getDistrictKeyById('site_id', ['id'=>$this->params['district_id']]);
if ($old_site_id != $new_site_id) {
return $this->response(101, '编辑门店部门,导致所属城市不一致');
}
$this->params['site_id'] = $new_site_id;
}
}
$store = new AStore();
$this->data = $store->addStoreAgents($this->params, $this->params['agents_id']);
return $this->response($this->code, $this->msg, $this->data);
......
......@@ -38,6 +38,7 @@ class Basic extends Controller
public $lastLoginTime;
public $city;
public $siteId;
protected $filterVerify = array(
'index/login',
......@@ -58,7 +59,9 @@ class Basic extends Controller
'index/getCurrentCity',
'index/settingCity',
'index/getRealIncome',
'index/bargainInfo'
'index/bargainInfo',
'index/getSiteList',
'index/getAllDisc'
);
/**
......@@ -296,17 +299,31 @@ class Basic extends Controller
public function getCity($agentId)
{
try {
if (empty($agentId)) {
return ; //没有登陆
}
$redis_ = RedisExt::getRedis();
if ($redis_) {
$city = $redis_->get("agent_city_" . $agentId);
$this->city = empty($city) ? "上海市" : $city;
} else {
$this->city = "上海市";
$this->city = $redis_->get("agent_city_" . $agentId);
$this->siteId = $redis_->get("agent_site_id_" . $agentId);
}
if(empty($this->city) || empty($this->siteId)){
$m_agent = new AAgents();
$site_city = $m_agent->getAgentsSite(['a.id'=>$agentId], 'a.site_id,b.city');
if (empty($site_city['city']) || empty($site_city['site_id'])) {
echo json_encode(array( "code" => "300", "msg" => '账号位置信息错误,请联系运营', "data" => [], "type" => "json" ));
exit;
} else {
$this->city = $site_city['city'];
$this->siteId = $site_city['site_id'];
$redis_->set("agent_city_" . $agentId,$this->city);
$redis_->set("agent_site_id_" . $agentId,$this->siteId);
}
}
} catch (Exception $exception) {
$this->city = "上海市";
} catch (\Exception $exception) {
echo json_encode(array( "code" => "300", "msg" => $exception, "data" => [], "type" => "json" ));
exit;
}
}
}
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: hu jun
* Date: 2018/10/17
* Time: 14:48
*/
namespace app\index\service;
use app\api_broker\service\CallPhoneService;
use app\api_broker\service\PushMessageService;
use app\index\validate\AAgentValidate;
use app\model\AAgents;
use app\model\ABindingDevice;
use app\model\ADistrict;
use app\model\AOperatingRecords;
use app\model\GHousesToAgents;
use app\model\Users;
use think\Request;
class BrokerService
{
public $m_agent;
public function __construct()
{
$this->m_agent = new AAgents();
}
/**
* 新增或编辑经纪人
*
* @param array $data
* @param int $operation_id
* @return mixed
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function saveAgentData(array $data, int $operation_id)
{
$change_old_id = 0;
$result['status'] = 'fail';
$validate = new AAgentValidate();
$m_district = new ADistrict();
$data['site_id'] = $m_district->getDistrictKeyById('site_id', ['id' => $data['district_id']]);
if (empty($data['id'])) {
$check = $validate->scene('add')->check($data);
} else {
$check = $validate->scene('edit')->check($data);
}
if (!$check) {
$result['msg'] = $validate->getError();
return $result;
}
$where['phone'] = $data['phone'];
$where['site_id'] = $data['site_id'];
$agent_data = $this->m_agent->verifyUser('id,phone,password,site_id,district_id', '', $where);
if (empty($data['id'])) {
if (!empty($agent_data['status']) && $agent_data['status'] == 3) {
$result['msg'] = '该用户已转勤';
}
if (!empty($agent_data)) {
$result['msg'] = '该用户已存在';
return $result;
}
$agent_old = $this->m_agent->getAgentById('id', ['phone' => $data['phone'], 'status' => 0]);
if (empty($data['confirm_old'])) {
if (!empty($agent_old[0]['id'])) {
$result['msg'] = '转勤';
return $result;
}
} else {
$num = $this->m_agent->updateData($agent_old[0]['id'], ['status' => 3]); //更新原始账号状态
if ($num > 0) {
$change_old_id = $agent_old[0]['id'];
}
}
$msg = '新增成功';
$data['status'] = 0;
$data['level'] = 10;
if (empty($data['password'])) {
$data['password'] = substr($data['phone'], -6); //默认密码
}
} else {
if (empty($agent_data)) {
$result['msg'] = '没有该用户';
return $result;
}
$old_site_id = $m_district->getDistrictKeyById('site_id', ['id'=>$agent_data['district_id']]);
$new_site_id = $m_district->getDistrictKeyById('site_id', ['id'=>$data['district_id']]);
if ($old_site_id != $new_site_id) {
return $this->response(101, '编辑部门,导致所属城市不一致');
}
$msg = '编辑成功';
if (!empty($data['password'])) {
if (($agent_data['password'] == $data['password'])) {
unset($data['password']);
}
}
}
$id = $this->m_agent->saveAgent($data);
if ($id > 0) {
$result['status'] = 'successful';
$result['data'] = ['id' => $id];
$result['msg'] = $msg;
if ($change_old_id) {
$m_user = new Users();
$update_user = $update_house = [];
$user_id_arr = $m_user->getUserByWhereColumn(['agent_id' => $change_old_id], 'id');
foreach ($user_id_arr as $k=>$v) {
$update_user[$k]['id'] = $v;
$update_user[$k]['agent_id'] = $id;
}
$record_data['user_id'] = empty($user_id_arr) ? "" : implode(',', $user_id_arr);
$m_house = new GHousesToAgents();
$house_where['is_del'] = 0;
$house_where['agents_id'] = $change_old_id;
$house_where['type'] = ['in', '2,3'];
$house_id_arr = $m_house->getAgentHouseOne('id', $house_where);
foreach ($house_id_arr as $k=>$v) {
$update_house[$k]['id'] = $v;
$update_house[$k]['agents_id'] = $id;
}
$house_id_arr = array_unique($house_id_arr);
$record_data['house_id'] = empty($house_id_arr) ? "" : implode(',', $house_id_arr);
$m_records = new AOperatingRecords();
$record_data['remark'] = '转勤,旧id:'.$change_old_id;
$record_data['type'] = 0;
$record_data['operation_id'] = $operation_id;
$record_data['agent_id'] = $id;
$m_records->insertData($record_data);
if (!empty($update_user)) {
$m_user->updateUserAll($update_user);
}
if (!empty($update_house)) {
$m_house->updateUserAll($update_house);
}
}
} else {
$result['msg'] = '新增或编辑失败';
}
return $result;
}
/**
* 处理经纪人状态
*
* @param array $data
* @param int $operation_id
* @return mixed
*/
public function updateStatus(array $data, int $operation_id)
{
$result['status'] = 'successful';
$save_data['status'] = $data['status'];
$save_data['id'] = $data['ids'];
$id = $this->m_agent->saveAgent($save_data);
if ($id < 0) {
$result['status'] = 'fail';
$result['msg'] = '修改失败';
return $result;
}
//同时修改设备绑定表
try {
$m_agent_device = new ABindingDevice();
if ($data['status'] != 0) {
$update_where['agent_id'] = $id;
$m_agent_device->updateDate(['is_forbidden' => 1], $update_where);
}
} catch (\Exception $e) {
$result['status'] = 'fail';
$result['msg'] = '设备解绑失败';
return $result;
}
if ($data['status'] != 0) {
$where['a.id'] = $data['id'];
$where['b.status'] = 1;
$agent_phone = $this->m_agent->getAgentCallPhone('b.phone_a,b.phone_b,c.phone_x', $where);
if (!empty($agent_phone['data']) && $agent_phone['status'] != 'fail') {
$call = new CallPhoneService();
foreach ($agent_phone['data'] as $k => $v) {
$call->agentsUnBind($v['phone_a'], $v['phone_b'], $v['phone_x'], 0);
}
}
$push = new PushMessageService();
$message_data['message'] = '你的账号被冻结。';
$message_data['agent_id'] = $data['id'];
$push->record(4, 0, [$data['id']], $operation_id, $message_data);
}
return $result;
}
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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