Commit db99575f authored by clone's avatar clone

1

parent 878f0f50
...@@ -4,6 +4,7 @@ namespace app\api_broker\controller; ...@@ -4,6 +4,7 @@ namespace app\api_broker\controller;
use app\api_broker\extend\Basic; use app\api_broker\extend\Basic;
use app\api_broker\service\LookShopService; use app\api_broker\service\LookShopService;
use app\api_broker\service\OrderLogService;
use app\api_broker\service\VerifyService; use app\api_broker\service\VerifyService;
use app\api_broker\service\VipService; use app\api_broker\service\VipService;
use app\index\service\HouseService; use app\index\service\HouseService;
...@@ -1344,12 +1345,12 @@ class Shop extends Basic ...@@ -1344,12 +1345,12 @@ class Shop extends Basic
public function getUserLookShopList() public function getUserLookShopList()
{ {
header('Access-Control-Allow-Origin:*'); header('Access-Control-Allow-Origin:*');
$params = $this->params; $params = $this->params;
/* $params = array( /* $params = array(
"house_id" => 1, "house_id" => 1,
"pageNo" => 1, "pageNo" => 1,
"pageSize" => 15 "pageSize" => 15
);*/ );*/
$pageNo = empty($params['pageNo']) ? 1 : $params['pageNo']; $pageNo = empty($params['pageNo']) ? 1 : $params['pageNo'];
$pageSize = empty($params['pageSize']) ? 15 : $params['pageSize']; $pageSize = empty($params['pageSize']) ? 15 : $params['pageSize'];
if (!isset($params["house_id"])) { if (!isset($params["house_id"])) {
...@@ -1363,4 +1364,26 @@ class Shop extends Basic ...@@ -1363,4 +1364,26 @@ class Shop extends Basic
return $this->response("200", "success", $logArr); return $this->response("200", "success", $logArr);
} }
/**
* 商铺详情页带看动态
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getReportListByHouseId()
{
$params = $this->params;
$house_id = $params["house_id"];
if (!$house_id) {
return $this->response("101", "请求参数错误");
}
$orderLogService = new OrderLogService();
$houseArr = $orderLogService->selectReportListByHouseId($house_id);
if (count($houseArr) > 0) {
return $this->response("200", "success", $houseArr);
}
return $this->response("101", "null");
}
} }
...@@ -1080,6 +1080,117 @@ class OrderLogService ...@@ -1080,6 +1080,117 @@ class OrderLogService
return $this->sortByTime($result); return $this->sortByTime($result);
} }
/**
* 最新 商铺动态时间轴
* @param $house_id
* @return mixed
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function selectReportListByHouseId($house_id)
{
$result = [];
$sort = 0;
//todo 1.验证订单是否存在
$oReportModel = new OReportModel();
$oMarchInModel = new OMarchInModel();
$oPayLogModel = new OPayLogModel();
$oRefundModel = new ORefundModel();
$oBargainModel = new OBargainModel();
$field_report = "a.id,a.user_id,a.create_time,a.predict_see_time,a.intro,b.id as order_id,b.house_id,b.house_title,c.id as agent_id,c.name,c.img,d.store_name";
$reportData = $oReportModel->selectReportByUserId($field_report, ["house_id" => $house_id]);
$order_ids = $report_ids = "";
//报备
foreach ($reportData as $k => $v) {
$v["step_name"] = "report";
//$house_title = mb_substr($v['house_title'], 0, 3, 'utf-8') . "***";
$house_title = $v['house_title'];
$v["step"] = "报备【id:" . $v['house_id'] . " " . $house_title . "】";
$result[$sort++] = $v;
$order_ids .= $v["order_id"] . ",";
$report_ids .= $v["id"] . ",";
}
$order_ids = rtrim($order_ids, ",");
$report_ids = rtrim($report_ids, ",");
$orderParams["order_id"] = array("in", $order_ids);
$reportParams["report_id"] = array("in", $report_ids);
$tree = [];
foreach ($reportData as $i => $j) {
$tree[$j["id"]] = $j;
}
//进场 march in
$field_march_in = "a.id,a.reception_id,a.report_id,a.create_time,b.id as order_id,b.house_id,b.house_title,c.id as agent_id,c.name,c.img,d.store_name";
$marchInData = $oMarchInModel->getMarchInListByOrderId($field_march_in, $orderParams);
if (count($marchInData) > 0) {
foreach ($marchInData as $k => $v) {
$v["step_name"] = "march_in";
$v["user_id"] = $tree[$v["report_id"]]["user_id"];
//$house_title = mb_substr($v['house_title'], 0, 3, 'utf-8') . "***";
$house_title = $v['house_title'];
$v["step"] = "进场【id:" . $v['house_id'] . " " . $house_title . "】";
$result[$sort++] = $v;
}
}
//收款
$field_pay_log = "a.id,a.create_time,a.report_id,b.id as order_id,b.house_id,b.house_title,c.id as agent_id,c.name,c.img,d.store_name";
$payLogData = $oPayLogModel->getPayLogByOrderId($field_pay_log, $orderParams);
if (count($payLogData) > 0) {
foreach ($payLogData as $k => $v) {
$v["step_name"] = "pay_log";
$v["user_id"] = $tree[$v["report_id"]]["user_id"];
//$house_title = mb_substr($v['house_title'], 0, 3, 'utf-8') . "***";
$house_title = $v['house_title'];
$v["step"] = "收款【id:" . $v['house_id'] . " " . $house_title . "】";
$result[$sort++] = $v;
}
}
//退款
$field_refund = "a.id,a.create_time,a.report_id,b.id as order_id,b.house_id,b.house_title,c.id as agent_id,c.name,c.img,d.store_name";
$refundData = $oRefundModel->getRefundByOrderId($field_refund, $orderParams);
if (count($refundData) > 0) {
foreach ($refundData as $k => $v) {
$v["step_name"] = "refund";
$v["user_id"] = $tree[$v["report_id"]]["user_id"];
//$house_title = mb_substr($v['house_title'], 0, 3, 'utf-8') . "***";
$house_title = $v['house_title'];
$v["step"] = "退款【id:" . $v['house_id'] . " " . $house_title . "】";
$result[$sort++] = $v;
}
}
//成交报告
$field_bargain = "a.id,a.create_time,a.report_id,a.house_number,a.is_open,b.id as order_id,b.house_id,b.house_title,c.id as agent_id,c.name,c.img,d.store_name";
$bargainData = $oBargainModel->getBargainByOrderId($field_bargain, $orderParams);
if (count($bargainData) > 0) {
foreach ($bargainData as $k => $v) {
$v["step_name"] = "bargain";
$v["user_id"] = $tree[$v["report_id"]]["user_id"];
//$house_title = mb_substr($v['house_title'], 0, 3, 'utf-8') . "***";
$house_title = $v['house_title'];
$v["step"] = "成交报告【id:" . $v['house_id'] . " " . $house_title . "】";
$result[$sort++] = $v;
}
}
return $this->sortByTime($result);
}
/** /**
* 查询流程 商铺动态 * 查询流程 商铺动态
......
...@@ -579,7 +579,7 @@ Route::group('index', [ ...@@ -579,7 +579,7 @@ Route::group('index', [
'qualityAssessment' => ['index/WorkLearning/qualityAssessment', ['method' => 'GET']], //素质测评 'qualityAssessment' => ['index/WorkLearning/qualityAssessment', ['method' => 'GET']], //素质测评
'valueAssessment' => ['index/WorkLearning/valueAssessment', ['method' => 'GET']], //价值观考核 'valueAssessment' => ['index/WorkLearning/valueAssessment', ['method' => 'GET']], //价值观考核
'storeDataExcel' => ['index/CostParameter/storeDataExcel', ['method' => 'POST']], 'storeDataExcel' => ['index/CostParameter/storeDataExcel', ['method' => 'POST']],
'intentionsWarning' => ['index/PayLog/intentionsWarning', ['method' => 'GET']],//意向金预警 'intentionsWarning' => ['index/PayLog/intentionsWarning', ['method' => 'GET']],//意向金预警
'recoverPayLog' => ['index/PayLog/recoverPayLog', ['method' => 'POST']],//恢复删除收款 'recoverPayLog' => ['index/PayLog/recoverPayLog', ['method' => 'POST']],//恢复删除收款
...@@ -761,10 +761,10 @@ Route::group('task', [ ...@@ -761,10 +761,10 @@ Route::group('task', [
'updateShopAddress' => ['task/JobTask/updateShopAddress', ['method' => 'get']], //默认图片 'updateShopAddress' => ['task/JobTask/updateShopAddress', ['method' => 'get']], //默认图片
'updateShopAgeLimit' => ['task/JobTask/updateShopAgeLimit', ['method' => 'get']], //默认年限 'updateShopAgeLimit' => ['task/JobTask/updateShopAgeLimit', ['method' => 'get']], //默认年限
'push' => ['task/PushMessageTask/push', ['method' => 'get']], //推送和客户推送 'push' => ['task/PushMessageTask/push', ['method' => 'get']], //推送和客户推送
'pushLastTransferTimeMsg' => ['task/PushMessageTask/pushLastTransferTimeMsg', ['method' => 'get']], //推送最后转定时间提醒-商铺 'pushLastTransferTimeMsg' => ['task/PushMessageTask/pushLastTransferTimeMsg', ['method' => 'get']], //推送最后转定时间提醒-商铺
'pushLastTransferOfficeMsg' => ['task/PushMessageTask/pushLastTransferOfficeMsg', ['method' => 'get']], //推送最后转定时间提醒-办公楼 'pushLastTransferOfficeMsg' => ['task/PushMessageTask/pushLastTransferOfficeMsg', ['method' => 'get']], //推送最后转定时间提醒-办公楼
'updateLandlordLimit' => ['task/JobTask/updateLandlordLimit', ['method' => 'get']], //转换房东手机号 'updateLandlordLimit' => ['task/JobTask/updateLandlordLimit', ['method' => 'get']], //转换房东手机号
'test' => ['task/FollowUpTask/test', ['method' => 'get']], 'test' => ['task/FollowUpTask/test', ['method' => 'get']],
...@@ -988,20 +988,21 @@ Route::group('broker', [ ...@@ -988,20 +988,21 @@ Route::group('broker', [
'getSiteListApp' => ['api_broker/Site/getSiteList', ['method' => 'POST|GET']], //获取站点列表 'getSiteListApp' => ['api_broker/Site/getSiteList', ['method' => 'POST|GET']], //获取站点列表
'getAgentSiteList' => ['api_broker/Site/getAgentSiteList', ['method' => 'POST|GET']], //获取经纪人站点列表 'getAgentSiteList' => ['api_broker/Site/getAgentSiteList', ['method' => 'POST|GET']], //获取经纪人站点列表
'getAgentSiteListV2' => ['api_broker/Site/getAgentSiteListV2', ['method' => 'POST|GET']], //获取经纪人站点列表 'getAgentSiteListV2' => ['api_broker/Site/getAgentSiteListV2', ['method' => 'POST|GET']], //获取经纪人站点列表
'getPhoneBook' => ['api_broker/broker/getPhoneBook', ['method' => 'POST|GET']], //消息页面--通讯录 'getPhoneBook' => ['api_broker/broker/getPhoneBook', ['method' => 'POST|GET']], //消息页面--通讯录
'commentAndDeal' => ['api_broker/broker/commentAndDeal', ['method' => 'get']],//获取当前经纪人的评价和交易列表 'commentAndDeal' => ['api_broker/broker/commentAndDeal', ['method' => 'get']],//获取当前经纪人的评价和交易列表
'addSpreadUser' => ['api_broker/SpreadUser/addSpreadUser', ['method' => 'POST|GET']], 'addSpreadUser' => ['api_broker/SpreadUser/addSpreadUser', ['method' => 'POST|GET']],
'getVolume' => ['api_broker/SpreadUser/getVolume', ['method' => 'POST|GET']], 'getVolume' => ['api_broker/SpreadUser/getVolume', ['method' => 'POST|GET']],
'getOurAppointment' => ['api_broker/AppointmentShop/getOurAppointment', ['method' => 'get']],//我的客户预约 'getOurAppointment' => ['api_broker/AppointmentShop/getOurAppointment', ['method' => 'get']],//我的客户预约
'addApplies' => ['api_broker/AppointmentShop/addApplies', ['method' => 'POST']],//我的客户预约转为 'addApplies' => ['api_broker/AppointmentShop/addApplies', ['method' => 'POST']],//我的客户预约转为
'addFollow' => ['api_broker/AppointmentShop/addFollow', ['method' => 'POST']],//我的客户跟进 'addFollow' => ['api_broker/AppointmentShop/addFollow', ['method' => 'POST']],//我的客户跟进
'getHouseAddress' => ['api_broker/shop/getHouseAddress', ['method' => 'get']], //搜索商铺地址 'getHouseAddress' => ['api_broker/shop/getHouseAddress', ['method' => 'get']], //搜索商铺地址
'getReportListByHouseId' => ['api_broker/shop/getReportListByHouseId', ['method' => 'get']], //商铺时间轴
//业绩日报周报重写 //业绩日报周报重写
'dayOrWeekStatement' => ['api_broker/Statement/dayOrWeekStatement', ['method' => 'get|post']], 'dayOrWeekStatement' => ['api_broker/Statement/dayOrWeekStatement', ['method' => 'get|post']],
'getExclusive' => ['api_broker/Shop/getExclusive', ['method' => 'get|post']], 'getExclusive' => ['api_broker/Shop/getExclusive', ['method' => 'get|post']],
......
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