Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
89f6071f
Commit
89f6071f
authored
Jun 20, 2019
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
b31af223
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
140 deletions
+8
-140
OfficeOrderLog.php
application/api_broker/controller/OfficeOrderLog.php
+0
-21
OfficeOrderLogService.php
application/api_broker/service/OfficeOrderLogService.php
+6
-117
OfficeFollowUpLogModel.php
application/model/OfficeFollowUpLogModel.php
+1
-1
OfficeORefundModel.php
application/model/OfficeORefundModel.php
+1
-1
No files found.
application/api_broker/controller/OfficeOrderLog.php
View file @
89f6071f
...
...
@@ -396,27 +396,6 @@ class OfficeOrderLog extends Basic{
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
()
{
$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
);
}
/**
* 修改成单状态
...
...
application/api_broker/service/OfficeOrderLogService.php
View file @
89f6071f
...
...
@@ -10,6 +10,7 @@ namespace app\api_broker\service;
use
app\model\AAgents
;
use
app\model\FollowUpLogModel
;
use
app\model\OfficeFollowUpLogModel
;
use
app\model\OfficeGHousesFollowUp
;
use
app\model\OfficeGRoom
;
use
app\model\OfficeGRoomToAgent
;
...
...
@@ -19,6 +20,7 @@ use app\model\OfficeOMarchInModel;
use
app\model\OfficeOPayLogAdjustment
;
use
app\model\OfficeOPayLogModel
;
use
app\model\OfficeOrderModel
;
use
app\model\OfficeORefundLogModel
;
use
app\model\OfficeORefundModel
;
use
app\model\OfficeOReportModel
;
use
app\model\ORealIncome
;
...
...
@@ -420,119 +422,6 @@ class OfficeOrderLogService
return
$result
;
}
/**
* 查询流程 订单时间轴
* @param $order_id
* @return mixed
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
selectListByOrderNoV2
(
$order_id
)
{
$result
=
[];
$sort
=
0
;
//todo 1.验证订单是否存在
$orderModel
=
new
OfficeOrderModel
();
$oReportModel
=
new
OfficeOReportModel
();
$oMarchInModel
=
new
OfficeOMarchInModel
();
$followUpLogModel
=
new
FollowUpLogModel
();
$oPayLogModel
=
new
OfficeOPayLogModel
();
$oRefundModel
=
new
OfficeORefundModel
();
$oBargainModel
=
new
OfficeOBargainModel
();
$orderData
=
$orderModel
->
selectOrderByOrderId
(
"a.f_id,a.house_title,c.address as internal_address"
,
[
"order_id"
=>
$order_id
]);
//dump($orderData);
if
(
count
(
$orderData
)
<=
0
)
{
return
[
"101"
,
"找不到此订单编号"
];
}
$report_id
=
$orderData
[
0
][
"f_id"
];
$field_report
=
"a.id,a.report_agent_id,a.report_agent_phone,a.report_agent_name,a.report_store_id,
a.user_id,a.user_phone,a.user_name,a.vehicle,a.intro,a.predict_see_time,a.create_time,b.store_name,c.district_name"
;
$reportData
=
$oReportModel
->
selectReportInfoById
(
$field_report
,
[
"id"
=>
$report_id
]);
if
(
count
(
$reportData
)
==
0
)
{
return
[
"101"
,
"报备记录未找到"
];
}
//报备
$reportData
[
0
][
"step_name"
]
=
"report"
;
$reportData
[
0
][
"house_title"
]
=
$orderData
[
0
][
"house_title"
];
$reportData
[
0
][
"internal_address"
]
=
$orderData
[
0
][
"internal_address"
];
$result
[
$sort
++
]
=
$reportData
[
0
];
//进场 march in
$field_march_in
=
"id,reception_id,reception_name,report_id,order_no,march_in_remark,march_in_img,march_in_area,create_time"
;
$marchInData
=
$oMarchInModel
->
selectMarchInByOrderNo
(
$field_march_in
,
[
"order_id"
=>
$order_id
]);
if
(
count
(
$marchInData
)
>
0
)
{
/* foreach ($marchInData as $k => $v) {
$v["step_name"] = "march_in";
$v["img_path"] = CHAT_IMG_URL;
$result[$sort++] = $v;
}*/
foreach
(
$marchInData
as
$k
=>
$v
)
{
$v
[
"step_name"
]
=
"march_in"
;
$v
[
"img_path"
]
=
CHAT_IMG_URL
;
$v
[
"img"
]
=
$this
->
getOImg
(
$v
[
"id"
],
1
);
$result
[
$sort
++
]
=
$v
;
}
}
//跟进
$field_follow_up
=
"id,agent_id,agent_name,user_type,decision_maker,industry_type,area_requirement,price_requirement,province,city,
district,business_area,explain,explain_img,create_time"
;
$followUpLogData
=
$followUpLogModel
->
selectFollowUpListByReportId
(
$field_follow_up
,
[
"report_id"
=>
$report_id
]);
if
(
count
(
$followUpLogData
)
>
0
)
{
foreach
(
$followUpLogData
as
$k
=>
$v
)
{
$v
[
"step_name"
]
=
"follow_up_log"
;
$v
=
$this
->
convertFollowUp
(
$v
);
$v
[
"img_path"
]
=
CHAT_IMG_URL
;
$result
[
$sort
++
]
=
$v
;
}
}
//收款
$field_pay_log
=
"id,order_no,father_id,order_id,agent_id,agent_name,type,pay_type,money,house_number,industry_type,
remark,transfer_img,real_money,source,create_time"
;
$payLogData
=
$oPayLogModel
->
selectPayLogByOrderNo
(
$field_pay_log
,
[
"order_id"
=>
$order_id
]);
if
(
count
(
$payLogData
)
>
0
)
{
$sortPayLogData
=
$this
->
arr2tree
(
$payLogData
);
foreach
(
$sortPayLogData
as
$k
=>
$v
)
{
$v
[
"step_name"
]
=
"pay_log"
;
$v
[
"img_path"
]
=
CHAT_IMG_URL
;
$result
[
$sort
++
]
=
$v
;
}
}
//退款
$field_refund
=
"id,report_id,agent_id,agent_name,order_no,order_id,refund_money,status,name,bank,card_no,
remark,remark_img,create_time"
;
$refundData
=
$oRefundModel
->
selectRefundByOrderNo
(
$field_refund
,
[
"order_id"
=>
$order_id
]);
if
(
count
(
$refundData
)
>
0
)
{
foreach
(
$refundData
as
$k
=>
$v
)
{
$v
[
"step_name"
]
=
"refund"
;
$v
[
"img_path"
]
=
CHAT_IMG_URL
;
$result
[
$sort
++
]
=
$v
;
}
}
//成交报告
$field_bargain
=
"a.id,a.father_id,a.house_number,a.is_open,a.report_id,a.order_id,a.trade_type,a.submit_agent_id,a.industry_type,
a.estimated_receipt_date,a.submit_agent_name, a.price,a.commission,a.role,a.agent_id,a.scale,a.scale_fee,a.create_time,b.name,b.phone,a.is_commission"
;
$bargainData
=
$oBargainModel
->
selectBargainListByOrderNo
(
$field_bargain
,
[
"order_id"
=>
$order_id
]);
if
(
count
(
$bargainData
)
>
0
)
{
$bargain_data_arr
=
$this
->
arr2TreeBargain
(
$bargainData
);
foreach
(
$bargain_data_arr
as
$k2
=>
$v2
)
{
$v2
[
"step_name"
]
=
"bargain"
;
$result
[
$sort
++
]
=
$v2
;
}
}
return
$this
->
sortByTime
(
$result
);
}
/**
* 查询流程 订单时间轴
...
...
@@ -551,12 +440,12 @@ class OfficeOrderLogService
$orderModel
=
new
OfficeOrderModel
();
$oReportModel
=
new
OfficeOReportModel
();
$oMarchInModel
=
new
OfficeOMarchInModel
();
$followUpLogModel
=
new
FollowUpLogModel
();
$followUpLogModel
=
new
Office
FollowUpLogModel
();
$oPayLogModel
=
new
OfficeOPayLogModel
();
$oRefundModel
=
new
OfficeORefundModel
();
$oBargainModel
=
new
OfficeOBargainModel
();
$oPayLogAdjustmentModel
=
new
OfficeOPayLogAdjustment
();
// $oRefundLogModel = new OfficeORefundLog
RefundLogModel();
$oRefundLogModel
=
new
OfficeO
RefundLogModel
();
$orderData
=
$orderModel
->
selectOrderByOrderId
(
"a.f_id,c.title,c.address,b.room_number"
,
[
"order_id"
=>
$order_id
]);
//dump($orderData);
...
...
@@ -651,7 +540,7 @@ class OfficeOrderLogService
}
}
//退款审核
/*
$field_turn_down = "id,refund_id,status,remark,operation_id,operation_name,create_time";
$field_turn_down
=
"id,refund_id,status,remark,operation_id,operation_name,create_time"
;
$turn_down
[
"order_id"
]
=
$order_id
;
$turn_down
[
"status"
]
=
array
(
"in"
,
(
"2,4"
));
$turn_down
[
"is_del"
]
=
0
;
...
...
@@ -663,7 +552,7 @@ class OfficeOrderLogService
$v2
[
"img"
]
=
$this
->
getOImg
(
$v2
[
"id"
],
4
);
$result
[
$sort
++
]
=
$v2
;
}
}
*/
}
return
$this
->
sortByTime
(
$result
);
}
...
...
application/model/OfficeFollowUpLogModel.php
View file @
89f6071f
...
...
@@ -107,7 +107,7 @@ class OfficeFollowUpLogModel extends Model
->
alias
(
"a"
)
->
join
(
"a_agents b"
,
"a.agent_id = b.id"
,
"left"
)
->
join
(
"a_store c"
,
"b.store_id = c.id"
,
"left"
)
->
join
(
"o_report d"
,
"a.report_id = d.id"
,
"left"
)
->
join
(
"o
ffice_o
_report d"
,
"a.report_id = d.id"
,
"left"
)
->
where
(
$where_
)
->
select
();
}
...
...
application/model/OfficeORefundModel.php
View file @
89f6071f
...
...
@@ -127,7 +127,7 @@ class OfficeORefundModel extends Model{
return
$this
->
db_
->
field
(
$filed
)
->
alias
(
"a"
)
->
join
(
"o_paylog b"
,
"a.pay_log_id = b.id"
,
"left"
)
->
join
(
"o
ffice_o
_paylog b"
,
"a.pay_log_id = b.id"
,
"left"
)
->
where
(
$where_
)
->
select
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment