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
7031c521
Commit
7031c521
authored
Jul 07, 2018
by
clone
Committed by
hujun
Jul 07, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
(cherry picked from commit
826e71ae
)
parent
c2bc93ea
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
95 additions
and
2 deletions
+95
-2
OrderLog.php
application/api_broker/controller/OrderLog.php
+47
-1
OrderLogService.php
application/api_broker/service/OrderLogService.php
+47
-1
route.php
application/route.php
+1
-0
No files found.
application/api_broker/controller/OrderLog.php
View file @
7031c521
...
...
@@ -88,7 +88,7 @@ class OrderLog extends Basic
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
collectingBill
()
public
function
collectingBill
V2
()
{
$params
=
$this
->
params
;
...
...
@@ -119,6 +119,51 @@ 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
;
$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
);
if
(
$is_ok
>
0
)
{
return
$this
->
response
(
"200"
,
"request success"
,
[
"bill_id"
=>
$is_ok
]);
}
return
$this
->
response
(
"101"
,
"request faild"
);
}
/**
* 收款
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
collectingBill
()
{
$params
=
$this
->
params
;
if
(
!
isset
(
$params
[
"agent_id"
])
||
!
isset
(
$params
[
"agent_id"
])
||
!
isset
(
$params
[
"report_id"
])
||
!
isset
(
$params
[
"order_id"
])
||
!
isset
(
$params
[
"order_no"
])
||
!
isset
(
$params
[
"collecting_bill"
])
||
!
isset
(
$params
[
"house_number"
])
||
!
isset
(
$params
[
"industry_type"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
/* $params = array(
"agent_id" => 1,//收款经纪人id
"agent_name" => 1,//收款经纪人id
"report_id" => 111,//报备id
"order_id" => 2, //关联order表id
"order_no" => "123123123", //订单no
// `type` '付款类型 10意向金 20定金 30保管金 40押金 50 租金 60 进场费 70转让费 80其他',
//`pay_type` '支付方式 10支付宝 20 微信 30pos机器 40转账 50现金',
// `money` '入账金额 存分',
"collecting_bill" => [ { "type" : 10, "pay_type" : 10, "money" : 1100 }, { "type" :10, "pay_type" : 10, "money": 1200 } ],
"house_number" => "3301号",
"industry_type" => "asdasdasd",
"remark" => "没什么备注",
"transfer_img" => "12312312312"
);*/
$params
[
"collecting_bill"
]
=
json_decode
(
$params
[
"collecting_bill"
],
true
);
$remark
=
isset
(
$params
[
"remark"
])
?
$params
[
"remark"
]
:
""
;
$transfer_img
=
isset
(
$params
[
"transfer_img"
])
?
$params
[
"transfer_img"
]
:
""
;
$source
=
$params
[
"source"
]
?
$params
[
"source"
]
:
0
;
$is_ok
=
$this
->
service_
->
addCollectingBill
(
$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
);
...
...
@@ -128,6 +173,7 @@ class OrderLog extends Basic
return
$this
->
response
(
"101"
,
"request faild"
);
}
/**
* 获取上次提交付款的门牌号业态等
* @return \think\Response
...
...
application/api_broker/service/OrderLogService.php
View file @
7031c521
...
...
@@ -59,7 +59,7 @@ class OrderLogService
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
addCollectingBill
(
$agent_id
,
$agent_name
,
$report_id
,
$order_id
,
$order_no
,
$collecting_bill
,
$house_number
,
public
function
addCollectingBill
V2
(
$agent_id
,
$agent_name
,
$report_id
,
$order_id
,
$order_no
,
$collecting_bill
,
$house_number
,
$industry_type
,
$remark
,
$transfer_img
,
$source
)
{
$bill_arr
=
$params
=
[];
...
...
@@ -91,6 +91,52 @@ class OrderLogService
return
$father_id
;
}
/**
* 批量插入收款记录
* @param $agent_id
* @param $agent_name
* @param $report_id
* @param $order_id
* @param $order_no
* @param $collecting_bill
* @param $house_number
* @param $industry_type
* @param $remark
* @param $transfer_img
* @param $source
* @return int|string
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
addCollectingBill
(
$agent_id
,
$agent_name
,
$report_id
,
$order_id
,
$order_no
,
$collecting_bill
,
$house_number
,
$industry_type
,
$remark
,
$transfer_img
,
$source
)
{
$bill_arr
=
$params
=
[];
$father_id
=
0
;
foreach
(
$collecting_bill
as
$collecting
)
{
if
(
isset
(
$collecting
[
"type"
])
&&
isset
(
$collecting
[
"pay_type"
])
&&
isset
(
$collecting
[
"money"
]))
{
if
(
$father_id
==
0
)
{
$params
=
$this
->
collectingBillBin
(
$father_id
,
$collecting
,
$agent_id
,
$agent_name
,
$report_id
,
$order_id
,
$order_no
,
$house_number
,
$industry_type
,
$remark
,
$transfer_img
,
$source
);
$father_id
=
$this
->
payLogModel
->
insertPayLog
(
$params
);
}
else
{
array_push
(
$bill_arr
,
$this
->
collectingBillBin
(
$father_id
,
$collecting
,
$agent_id
,
$agent_name
,
$report_id
,
$order_id
,
$order_no
,
$house_number
,
$industry_type
,
$remark
,
$transfer_img
,
$source
));
}
}
}
if
(
$father_id
>
0
)
{
$pushMarchIn
=
new
PushMessageService
(
$params
[
"report_id"
],
2
);
$pushMarchIn
->
pushMarchInMessage
(
$params
[
"report_id"
],
2
);
//推送
}
//todo if bill_arr not null, save database table
if
(
!
empty
(
$bill_arr
))
{
return
$this
->
payLogModel
->
addPayLog
(
$bill_arr
);
}
return
$father_id
;
}
private
function
collectingBillBin
(
$father_id
,
$collecting_arr
,
$agent_id
,
$agent_name
,
$report_id
,
$order_id
,
$order_no
,
$house_number
,
$industry_type
,
$remark
,
$transfer_img
,
$source
)
{
...
...
application/route.php
View file @
7031c521
...
...
@@ -381,6 +381,7 @@ Route::group('broker', [
'getBeforeBillInfo'
=>
[
'api_broker/OrderLog/getBeforeBillInfo'
,
[
'method'
=>
'get|post'
]
],
'savePosBillMessage'
=>
[
'api_broker/OrderLog/savePosBillMessage'
,
[
'method'
=>
'get|post'
]
],
'collectingBill'
=>
[
'api_broker/OrderLog/collectingBill'
,
[
'method'
=>
'get|post'
]
],
'collectingBillV2'
=>
[
'api_broker/OrderLog/collectingBillV2'
,
[
'method'
=>
'get|post'
]
],
'refund'
=>
[
'api_broker/OrderLog/refund'
,
[
'method'
=>
'get|post'
]
],
'bargain'
=>
[
'api_broker/OrderLog/bargain'
,
[
'method'
=>
'get|post'
]
],
'statusBargain'
=>
[
'api_broker/OrderLog/statusBargain'
,
[
'method'
=>
'get|post'
]
],
...
...
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