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
f57b8d50
Commit
f57b8d50
authored
Mar 05, 2018
by
zw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单详情-时间轴
parent
747c44e3
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
86 additions
and
40 deletions
+86
-40
OrderLog.php
application/api_broker/controller/OrderLog.php
+7
-6
OrderLogService.php
application/api_broker/service/OrderLogService.php
+58
-27
FollowUpLogModel.php
application/model/FollowUpLogModel.php
+1
-0
OBargainModel.php
application/model/OBargainModel.php
+4
-1
OMarchInModel.php
application/model/OMarchInModel.php
+4
-1
OPayLogModel.php
application/model/OPayLogModel.php
+4
-1
ORefundModel.php
application/model/ORefundModel.php
+4
-1
OrderModel.php
application/model/OrderModel.php
+3
-3
route.php
application/route.php
+1
-0
No files found.
application/api_broker/controller/OrderLog.php
View file @
f57b8d50
...
@@ -188,9 +188,9 @@ class OrderLog extends Basic
...
@@ -188,9 +188,9 @@ class OrderLog extends Basic
*/
*/
public
function
orderDetail
(){
public
function
orderDetail
(){
$params
=
$this
->
params
;
$params
=
$this
->
params
;
$params
=
array
(
/*
$params = array(
"order_id" => 1,
"order_id" => 1,
);
);
*/
if
(
!
isset
(
$params
[
"order_id"
])){
if
(
!
isset
(
$params
[
"order_id"
])){
return
$this
->
response
(
"101"
,
"order_id不能为空"
);
return
$this
->
response
(
"101"
,
"order_id不能为空"
);
}
}
...
@@ -215,14 +215,15 @@ class OrderLog extends Basic
...
@@ -215,14 +215,15 @@ class OrderLog extends Basic
*/
*/
public
function
selectReportAll
()
public
function
selectReportAll
()
{
{
$params
=
$this
->
params
;
/*
$params = $this->params;
if (!isset($params["order_no"])) {
if (!isset($params["order_no"])) {
return $this->response("101", "请求参数错误");
return $this->response("101", "请求参数错误");
}
}
*/
$params
=
array
(
$params
=
array
(
"order_
no"
=>
"1212312312"
,
"order_
id"
=>
1
,
);
);
$data
=
$this
->
service_
->
selectListByOrderNo
(
$params
[
"order_no"
]);
$data
=
$this
->
service_
->
selectListByOrderNo
(
$params
[
"order_id"
]);
return
$this
->
response
(
"200"
,
"request success"
,
$data
);
}
}
...
...
application/api_broker/service/OrderLogService.php
View file @
f57b8d50
...
@@ -147,12 +147,13 @@ class OrderLogService
...
@@ -147,12 +147,13 @@ class OrderLogService
/**
/**
* 查询流程
* 查询流程
* @param $order_
no
* @param $order_
id
* @return array
* @return array
*/
*/
public
function
selectListByOrderNo
(
$order_
no
)
public
function
selectListByOrderNo
(
$order_
id
)
{
{
$result
=
[];
$result
=
[];
$sort
=
0
;
//todo 1.验证订单是否存在
//todo 1.验证订单是否存在
$orderModel
=
new
OrderModel
();
$orderModel
=
new
OrderModel
();
...
@@ -164,7 +165,7 @@ class OrderLogService
...
@@ -164,7 +165,7 @@ class OrderLogService
$oBargainModel
=
new
OBargainModel
();
$oBargainModel
=
new
OBargainModel
();
$orderData
=
$orderModel
->
selectOrderByOrder
NO
(
"f_id,house_title"
,
[
"order_no"
=>
$order_no
]);
$orderData
=
$orderModel
->
selectOrderByOrder
Id
(
"f_id,house_title"
,
[
"id"
=>
$order_id
]);
if
(
count
(
$orderData
)
==
0
)
{
if
(
count
(
$orderData
)
==
0
)
{
return
[
"101"
,
"找不到此订单编号"
];
return
[
"101"
,
"找不到此订单编号"
];
}
}
...
@@ -177,52 +178,82 @@ class OrderLogService
...
@@ -177,52 +178,82 @@ class OrderLogService
return
[
"101"
,
"报备记录未找到"
];
return
[
"101"
,
"报备记录未找到"
];
}
}
//报备
//报备
$result
[
"report"
]
=
$reportData
[
0
];
$reportData
[
0
][
"step_name"
]
=
"report"
;
$result
[
"report"
][
"house_title"
]
=
$orderData
[
0
][
"house_title"
];
$reportData
[
0
][
"house_title"
]
=
$orderData
[
0
][
"house_title"
];
$result
[
$sort
++
]
=
$reportData
[
0
];
//进场 march in
//进场 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"
;
$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_
no"
=>
$order_no
]);
$marchInData
=
$oMarchInModel
->
selectMarchInByOrderNo
(
$field_march_in
,
[
"order_
id"
=>
$order_id
]);
if
(
count
(
$marchInData
)
>
0
)
{
if
(
count
(
$marchInData
)
>
0
)
{
$result
[
"march_in"
]
=
$reportData
;
foreach
(
$marchInData
as
$k
=>
$v
){
$v
[
"step_name"
]
=
"march_in"
;
$result
[
$sort
++
]
=
$v
;
}
}
}
//跟进
//跟进
$field_follow_up
=
""
;
$field_follow_up
=
"id,user_type,decision_maker,industry_type,area_requirement,price_requirement,province,city,
$followUpLogData
=
$followUpLogModel
->
selectFollowUpListByReportId
(
$field_follow_up
,
[
"order_no"
=>
$order_no
]);
district,business_area,explain,explain_img,create_time"
;
if
(
count
(
$marchInData
)
>
0
)
{
$followUpLogData
=
$followUpLogModel
->
selectFollowUpListByReportId
(
$field_follow_up
,
[
"report_id"
=>
$report_id
]);
$result
[
"follow_up_log"
]
=
$reportData
;
if
(
count
(
$followUpLogData
)
>
0
)
{
foreach
(
$followUpLogData
as
$k
=>
$v
){
$v
[
"step_name"
]
=
"follow_up_log"
;
$result
[
$sort
++
]
=
$v
;
}
}
}
//收款
//收款
$field_pay_log
=
""
;
$field_pay_log
=
"id,order_no,order_id,agent_id,agent_name,type,pay_type,money,house_number,industry_type,
$payLogData
=
$oPayLogModel
->
selectPayLogByOrderNo
(
$field_pay_log
,
[
"order_no"
=>
$order_no
]);
remark,transfer_img,create_time"
;
$payLogData
=
$oPayLogModel
->
selectPayLogByOrderNo
(
$field_pay_log
,
[
"order_id"
=>
$order_id
]);
if
(
count
(
$payLogData
)
>
0
)
{
if
(
count
(
$payLogData
)
>
0
)
{
$result
[
"pay_log"
]
=
$payLogData
;
foreach
(
$payLogData
as
$k
=>
$v
){
$v
[
"step_name"
]
=
"pay_log"
;
$result
[
$sort
++
]
=
$v
;
}
}
}
//退款
$field_refund
=
""
;
//退款
$refundData
=
$oRefundModel
->
selectRefundByOrderNo
(
$field_refund
,
[
"order_no"
=>
$order_no
]);
$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
)
{
if
(
count
(
$refundData
)
>
0
)
{
$result
[
"refund"
]
=
$refundData
;
foreach
(
$refundData
as
$k
=>
$v
){
$v
[
"step_name"
]
=
"refund"
;
$result
[
$sort
++
]
=
$v
;
}
}
}
//成交报告
//成交报告
$field_bargain
=
""
;
$field_bargain
=
"id,report_id,order_id,trade_type,submit_agent_id,price,commission,role,agent_id,scale,
$bargainData
=
$oBargainModel
->
selectBargainByOrderNo
(
$field_bargain
,
[
"order_no"
=>
$order_no
]);
scale_fee,create_time"
;
$bargainData
=
$oBargainModel
->
selectBargainByOrderNo
(
$field_bargain
,
[
"order_id"
=>
$order_id
]);
if
(
count
(
$bargainData
)
>
0
)
{
if
(
count
(
$bargainData
)
>
0
)
{
$result
[
"bargain"
]
=
$bargainData
;
foreach
(
$bargainData
as
$k
=>
$v
){
$v
[
"step_name"
]
=
"bargain"
;
$result
[
$sort
++
]
=
$v
;
}
}
}
//todo 财务审核
return
$this
->
sortByTime
(
$result
);
return
$this
->
sortByTime
(
$result
);
}
}
/**
* 排序时间
* @param $result
* @return mixed
*/
private
function
sortByTime
(
$result
)
private
function
sortByTime
(
$result
)
{
{
//todo 根据时间排序
for
(
$i
=
0
;
$i
<
count
(
$result
);
$i
++
){
return
array
();
for
(
$j
=
$i
+
1
;
$j
<
count
(
$result
)
;
$j
++
){
if
(
strtotime
(
$result
[
$j
][
"create_time"
])
-
strtotime
(
$result
[
$i
][
"create_time"
])
>
0
){
$temp
=
$result
[
$j
];
$result
[
$j
]
=
$result
[
$i
];
$result
[
$i
]
=
$temp
;
}
}
}
return
$result
;
}
}
...
...
application/model/FollowUpLogModel.php
View file @
f57b8d50
...
@@ -88,6 +88,7 @@ class FollowUpLogModel extends Model
...
@@ -88,6 +88,7 @@ class FollowUpLogModel extends Model
$where_
[
"agent_id"
]
=
$params
[
"agent_id"
];
$where_
[
"agent_id"
]
=
$params
[
"agent_id"
];
}
}
return
$this
->
db_
return
$this
->
db_
->
field
(
$field
)
->
field
(
$field
)
->
where
(
$where_
)
->
where
(
$where_
)
...
...
application/model/OBargainModel.php
View file @
f57b8d50
...
@@ -70,11 +70,14 @@ class OBargainModel extends Model
...
@@ -70,11 +70,14 @@ class OBargainModel extends Model
if
(
isset
(
$params
[
"order_no"
]))
{
if
(
isset
(
$params
[
"order_no"
]))
{
$where_
[
"order_no"
]
=
$params
[
"order_no"
];
$where_
[
"order_no"
]
=
$params
[
"order_no"
];
}
}
if
(
isset
(
$params
[
"order_id"
]))
{
$where_
[
"order_id"
]
=
$params
[
"order_id"
];
}
if
(
isset
(
$params
[
"agent_id"
]))
{
if
(
isset
(
$params
[
"agent_id"
]))
{
$where_
[
"agent_id"
]
=
$params
[
"agent_id"
];
$where_
[
"agent_id"
]
=
$params
[
"agent_id"
];
}
}
return
$this
->
db
return
$this
->
db
_
->
field
(
$filed
)
->
field
(
$filed
)
->
where
(
$where_
)
->
where
(
$where_
)
->
select
();
->
select
();
...
...
application/model/OMarchInModel.php
View file @
f57b8d50
...
@@ -65,8 +65,11 @@ class OMarchInModel extends Model
...
@@ -65,8 +65,11 @@ class OMarchInModel extends Model
if
(
isset
(
$params
[
"order_no"
]))
{
if
(
isset
(
$params
[
"order_no"
]))
{
$where_
[
"order_no"
]
=
$params
[
"order_no"
];
$where_
[
"order_no"
]
=
$params
[
"order_no"
];
}
}
if
(
isset
(
$params
[
"order_id"
]))
{
$where_
[
"order_id"
]
=
$params
[
"order_id"
];
}
return
$this
->
db
return
$this
->
db
_model
->
field
(
$filed
)
->
field
(
$filed
)
->
where
(
$where_
)
->
where
(
$where_
)
->
select
();
->
select
();
...
...
application/model/OPayLogModel.php
View file @
f57b8d50
...
@@ -50,11 +50,14 @@ class OPayLogModel extends Model
...
@@ -50,11 +50,14 @@ class OPayLogModel extends Model
if
(
isset
(
$params
[
"order_no"
]))
{
if
(
isset
(
$params
[
"order_no"
]))
{
$where_
[
"order_no"
]
=
$params
[
"order_no"
];
$where_
[
"order_no"
]
=
$params
[
"order_no"
];
}
}
if
(
isset
(
$params
[
"order_id"
]))
{
$where_
[
"order_id"
]
=
$params
[
"order_id"
];
}
if
(
isset
(
$params
[
"agent_id"
]))
{
if
(
isset
(
$params
[
"agent_id"
]))
{
$where_
[
"agent_id"
]
=
$params
[
"agent_id"
];
$where_
[
"agent_id"
]
=
$params
[
"agent_id"
];
}
}
return
$this
->
db
return
$this
->
db
_
->
field
(
$filed
)
->
field
(
$filed
)
->
where
(
$where_
)
->
where
(
$where_
)
->
select
();
->
select
();
...
...
application/model/ORefundModel.php
View file @
f57b8d50
...
@@ -89,11 +89,14 @@ class ORefundModel extends Model{
...
@@ -89,11 +89,14 @@ class ORefundModel extends Model{
if
(
isset
(
$params
[
"order_no"
]))
{
if
(
isset
(
$params
[
"order_no"
]))
{
$where_
[
"order_no"
]
=
$params
[
"order_no"
];
$where_
[
"order_no"
]
=
$params
[
"order_no"
];
}
}
if
(
isset
(
$params
[
"order_id"
]))
{
$where_
[
"order_id"
]
=
$params
[
"order_id"
];
}
if
(
isset
(
$params
[
"agent_id"
]))
{
if
(
isset
(
$params
[
"agent_id"
]))
{
$where_
[
"agent_id"
]
=
$params
[
"agent_id"
];
$where_
[
"agent_id"
]
=
$params
[
"agent_id"
];
}
}
return
$this
->
db
return
$this
->
db
_
->
field
(
$filed
)
->
field
(
$filed
)
->
where
(
$where_
)
->
where
(
$where_
)
->
select
();
->
select
();
...
...
application/model/OrderModel.php
View file @
f57b8d50
...
@@ -36,11 +36,11 @@ class OrderModel extends Model
...
@@ -36,11 +36,11 @@ class OrderModel extends Model
}
}
public
function
selectOrderByOrder
NO
(
$filed
,
$params
)
public
function
selectOrderByOrder
Id
(
$filed
,
$params
)
{
{
$where_
=
[];
$where_
=
[];
if
(
isset
(
$params
[
"order_
no
"
]))
{
if
(
isset
(
$params
[
"order_
id
"
]))
{
$where_
[
"order_
no"
]
=
$params
[
"order_no
"
];
$where_
[
"order_
id"
]
=
$params
[
"order_id
"
];
}
}
if
(
isset
(
$params
[
"f_id"
]))
{
if
(
isset
(
$params
[
"f_id"
]))
{
$where_
[
"f_id"
]
=
$params
[
"f_id"
];
$where_
[
"f_id"
]
=
$params
[
"f_id"
];
...
...
application/route.php
View file @
f57b8d50
...
@@ -271,6 +271,7 @@ Route::group('broker', [
...
@@ -271,6 +271,7 @@ Route::group('broker', [
'reportList'
=>
[
'api_broker/Report/reportList'
,
[
'method'
=>
'get'
]
],
'reportList'
=>
[
'api_broker/Report/reportList'
,
[
'method'
=>
'get'
]
],
'orderDetail'
=>
[
'api_broker/OrderLog/orderDetail'
,
[
'method'
=>
'get|post'
]
],
'orderDetail'
=>
[
'api_broker/OrderLog/orderDetail'
,
[
'method'
=>
'get|post'
]
],
'selectReportAll'
=>
[
'api_broker/OrderLog/selectReportAll'
,
[
'method'
=>
'get|post'
]
],
'token'
=>
[
'api_broker/broker/token'
,
[
'method'
=>
'get'
]
],
'token'
=>
[
'api_broker/broker/token'
,
[
'method'
=>
'get'
]
],
...
...
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