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
e9c96f39
Commit
e9c96f39
authored
Sep 12, 2019
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
中介费被收款方
parent
e855d343
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
54 deletions
+63
-54
OrderLog.php
application/api_broker/controller/OrderLog.php
+4
-2
OrderLogService.php
application/api_broker/service/OrderLogService.php
+59
-52
No files found.
application/api_broker/controller/OrderLog.php
View file @
e9c96f39
...
@@ -155,6 +155,7 @@ class OrderLog extends Basic
...
@@ -155,6 +155,7 @@ class OrderLog extends Basic
"pay_id" => 1,
"pay_id" => 1,
"receipt_number" => "12312",
"receipt_number" => "12312",
"transfer_name" => "sdafsdf",
"transfer_name" => "sdafsdf",
"be_charged_party" => 1,
);*/
);*/
$vip_services
=
new
VipService
();
$vip_services
=
new
VipService
();
if
(
$vip_services
->
vip
(
$params
[
'agent_id'
],
'broker/collectingBill'
))
{
if
(
$vip_services
->
vip
(
$params
[
'agent_id'
],
'broker/collectingBill'
))
{
...
@@ -175,14 +176,15 @@ class OrderLog extends Basic
...
@@ -175,14 +176,15 @@ class OrderLog extends Basic
$received_money
=
isset
(
$params
[
"received_money"
])
?
$params
[
"received_money"
]
:
0
;
$received_money
=
isset
(
$params
[
"received_money"
])
?
$params
[
"received_money"
]
:
0
;
$type_ext
=
isset
(
$params
[
"type_ext"
])
?
$params
[
"type_ext"
]
:
0
;
$type_ext
=
isset
(
$params
[
"type_ext"
])
?
$params
[
"type_ext"
]
:
0
;
$is_open
=
isset
(
$params
[
'is_open'
])
?
$params
[
'is_open'
]
:
0
;
$is_open
=
isset
(
$params
[
'is_open'
])
?
$params
[
'is_open'
]
:
0
;
$be_charged_party
=
isset
(
$params
[
'be_charged_party'
])
?
$params
[
'$be_charged_party'
]
:
0
;
if
(
$pay_id
>
0
)
{
if
(
$pay_id
>
0
)
{
$source
=
2
;
$source
=
2
;
}
}
$is_ok
=
$this
->
service_
->
addCollectingBill
(
$params
[
"agent_id"
],
$params
[
"agent_name"
],
$params
[
"report_id"
],
$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"
],
$params
[
"order_id"
],
$params
[
"order_no"
],
$params
[
"collecting_bill"
],
$params
[
"house_number"
],
$params
[
"industry_type"
],
$remark
,
$transfer_img
,
$source
,
$income_time
,
$params
[
"is_dividend"
],
$last_transfer_time
,
$pay_id
,
$remark
,
$transfer_img
,
$source
,
$income_time
,
$params
[
"is_dividend"
],
$last_transfer_time
,
$pay_id
,
$receipt_number
,
$
receipt_number
,
$transfer_name
,
$received_money
,
$type_ext
,
$params
[
'bargain_id'
],
$is_open
,
$this
->
siteId
);
$
transfer_name
,
$received_money
,
$type_ext
,
$params
[
'bargain_id'
],
$is_open
,
$this
->
siteId
,
$be_charged_party
);
if
(
$is_ok
>
0
)
{
if
(
$is_ok
>
0
)
{
return
$this
->
response
(
"200"
,
"request success"
,
[
"bill_id"
=>
$is_ok
]);
return
$this
->
response
(
"200"
,
"request success"
,
[
"bill_id"
=>
$is_ok
]);
...
...
application/api_broker/service/OrderLogService.php
View file @
e9c96f39
...
@@ -67,6 +67,7 @@ class OrderLogService
...
@@ -67,6 +67,7 @@ class OrderLogService
* @param $bargain_id
* @param $bargain_id
* @param $is_open
* @param $is_open
* @param $site_id
* @param $site_id
* @param $be_charged_party
* @return int|string
* @return int|string
* @throws \think\Exception
* @throws \think\Exception
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DataNotFoundException
...
@@ -76,7 +77,7 @@ class OrderLogService
...
@@ -76,7 +77,7 @@ class OrderLogService
public
function
addCollectingBill
(
$agent_id
,
$agent_name
,
$report_id
,
$order_id
,
$order_no
,
$collecting_bill
,
$house_number
,
public
function
addCollectingBill
(
$agent_id
,
$agent_name
,
$report_id
,
$order_id
,
$order_no
,
$collecting_bill
,
$house_number
,
$industry_type
,
$remark
,
$transfer_img
,
$source
,
$income_time
,
$is_dividend
,
$industry_type
,
$remark
,
$transfer_img
,
$source
,
$income_time
,
$is_dividend
,
$last_transfer_time
,
$pay_id
,
$receipt_number
,
$transfer_name
,
$received_money
,
$last_transfer_time
,
$pay_id
,
$receipt_number
,
$transfer_name
,
$received_money
,
$type_ext
,
$bargain_id
,
$is_open
,
$site_id
)
$type_ext
,
$bargain_id
,
$is_open
,
$site_id
,
$be_charged_party
)
{
{
$bill_arr
=
$params
=
[];
$bill_arr
=
$params
=
[];
$father_id
=
0
;
$father_id
=
0
;
...
@@ -92,7 +93,7 @@ class OrderLogService
...
@@ -92,7 +93,7 @@ class OrderLogService
}
}
foreach
(
$collecting_bill
as
$collecting
)
{
foreach
(
$collecting_bill
as
$collecting
)
{
if
(
isset
(
$collecting
[
"type"
])
&&
isset
(
$collecting
[
"pay_type"
])
&&
isset
(
$collecting
[
"money"
]))
{
if
(
isset
(
$collecting
[
"type"
])
&&
isset
(
$collecting
[
"pay_type"
])
&&
isset
(
$collecting
[
"money"
]))
{
if
(
!
$this
->
verifyType
(
$collecting
[
"type"
],
$collecting
[
"pay_type"
],
$receipt_number
))
{
if
(
!
$this
->
verifyType
(
$collecting
[
"type"
],
$collecting
[
"pay_type"
],
$receipt_number
,
$be_charged_party
))
{
return
-
1
;
return
-
1
;
}
}
$money
=
$collecting
[
"money"
];
$money
=
$collecting
[
"money"
];
...
@@ -107,13 +108,13 @@ class OrderLogService
...
@@ -107,13 +108,13 @@ class OrderLogService
$params
=
$this
->
collectingBillBin
(
$father_id
,
$collecting
,
$agent_id
,
$agent_name
,
$report_id
,
$params
=
$this
->
collectingBillBin
(
$father_id
,
$collecting
,
$agent_id
,
$agent_name
,
$report_id
,
$order_id
,
$order_no
,
$house_number
,
$industry_type
,
$remark
,
$transfer_img
,
$source
,
$income_time
,
$order_id
,
$order_no
,
$house_number
,
$industry_type
,
$remark
,
$transfer_img
,
$source
,
$income_time
,
$is_dividend
,
$last_transfer_time
,
$receipt_number
,
$transfer_name
,
$received_money
,
$type_ext
,
$is_dividend
,
$last_transfer_time
,
$receipt_number
,
$transfer_name
,
$received_money
,
$type_ext
,
$bargain_id
,
$is_open
,
$store_id
);
$bargain_id
,
$is_open
,
$store_id
,
$be_charged_party
);
$father_id
=
$this
->
payLogModel
->
insertPayLog
(
$params
);
$father_id
=
$this
->
payLogModel
->
insertPayLog
(
$params
);
}
else
{
}
else
{
array_push
(
$bill_arr
,
$this
->
collectingBillBin
(
$father_id
,
$collecting
,
$agent_id
,
$agent_name
,
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
,
$report_id
,
$order_id
,
$order_no
,
$house_number
,
$industry_type
,
$remark
,
$transfer_img
,
$source
,
$income_time
,
$is_dividend
,
$last_transfer_time
,
$receipt_number
,
$transfer_name
,
$received_money
,
$income_time
,
$is_dividend
,
$last_transfer_time
,
$receipt_number
,
$transfer_name
,
$received_money
,
$type_ext
,
$bargain_id
,
$is_open
,
$store_id
));
$type_ext
,
$bargain_id
,
$is_open
,
$store_id
,
$be_charged_party
));
}
}
//$this->updateBargainIsOpen($bargain_id, $collecting['type'], $is_open);
//$this->updateBargainIsOpen($bargain_id, $collecting['type'], $is_open);
}
}
...
@@ -179,9 +180,10 @@ class OrderLogService
...
@@ -179,9 +180,10 @@ class OrderLogService
* @param $type
* @param $type
* @param $pay_type
* @param $pay_type
* @param $receipt_number
* @param $receipt_number
* @param $be_charged_party
* @return bool
* @return bool
*/
*/
private
function
verifyType
(
$type
,
$pay_type
,
$receipt_number
)
private
function
verifyType
(
$type
,
$pay_type
,
$receipt_number
,
$be_charged_party
)
{
{
switch
(
$pay_type
)
{
switch
(
$pay_type
)
{
...
@@ -254,6 +256,8 @@ class OrderLogService
...
@@ -254,6 +256,8 @@ class OrderLogService
case
90
:
case
90
:
break
;
break
;
case
91
:
case
91
:
if
(
$be_charged_party
==
0
)
return
false
;
break
;
break
;
case
92
:
case
92
:
break
;
break
;
...
@@ -285,38 +289,41 @@ class OrderLogService
...
@@ -285,38 +289,41 @@ class OrderLogService
* @param $type_ext
* @param $type_ext
* @param $bargain_id
* @param $bargain_id
* @param $is_open
* @param $is_open
* @param $store_id
* @param $be_charged_party
* @return mixed
* @return mixed
*/
*/
private
function
collectingBillBin
(
$father_id
,
$collecting_arr
,
$agent_id
,
$agent_name
,
$report_id
,
$order_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
,
$order_no
,
$house_number
,
$industry_type
,
$remark
,
$transfer_img
,
$source
,
$income_time
,
$is_dividend
,
$last_transfer_time
,
$receipt_number
,
$transfer_name
,
$income_time
,
$is_dividend
,
$last_transfer_time
,
$receipt_number
,
$transfer_name
,
$received_money
,
$type_ext
,
$bargain_id
,
$is_open
,
$store_id
)
$received_money
,
$type_ext
,
$bargain_id
,
$is_open
,
$store_id
,
$be_charged_party
)
{
{
$arr
[
"report_id"
]
=
$report_id
;
$arr
[
"report_id"
]
=
$report_id
;
$arr
[
"father_id"
]
=
$father_id
;
$arr
[
"father_id"
]
=
$father_id
;
$arr
[
"order_no"
]
=
$order_no
;
$arr
[
"order_no"
]
=
$order_no
;
$arr
[
"order_id"
]
=
$order_id
;
$arr
[
"order_id"
]
=
$order_id
;
$arr
[
"source"
]
=
$source
;
$arr
[
"source"
]
=
$source
;
$arr
[
"agent_id"
]
=
$agent_id
;
$arr
[
"agent_id"
]
=
$agent_id
;
$arr
[
"reckon_in_store"
]
=
$store_id
;
$arr
[
"reckon_in_store"
]
=
$store_id
;
$arr
[
"agent_name"
]
=
$agent_name
;
$arr
[
"agent_name"
]
=
$agent_name
;
$arr
[
"type"
]
=
$collecting_arr
[
"type"
];
$arr
[
"type"
]
=
$collecting_arr
[
"type"
];
$arr
[
"pay_type"
]
=
$collecting_arr
[
"pay_type"
];
$arr
[
"pay_type"
]
=
$collecting_arr
[
"pay_type"
];
$arr
[
"money"
]
=
$collecting_arr
[
"money"
];
$arr
[
"money"
]
=
$collecting_arr
[
"money"
];
$arr
[
"house_number"
]
=
$house_number
;
$arr
[
"house_number"
]
=
$house_number
;
$arr
[
"industry_type"
]
=
$industry_type
;
$arr
[
"industry_type"
]
=
$industry_type
;
$arr
[
"remark"
]
=
$remark
;
$arr
[
"remark"
]
=
$remark
;
$arr
[
"receipt_number"
]
=
$receipt_number
;
$arr
[
"receipt_number"
]
=
$receipt_number
;
$arr
[
"transfer_name"
]
=
$transfer_name
;
$arr
[
"transfer_name"
]
=
$transfer_name
;
$arr
[
"transfer_img"
]
=
$transfer_img
;
$arr
[
"transfer_img"
]
=
$transfer_img
;
$arr
[
"create_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
$arr
[
"create_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
$arr
[
"update_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
$arr
[
"update_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
$arr
[
"is_dividend"
]
=
$is_dividend
;
$arr
[
"is_dividend"
]
=
$is_dividend
;
$arr
[
"received_money"
]
=
$received_money
;
$arr
[
"received_money"
]
=
$received_money
;
$arr
[
"type_ext"
]
=
$type_ext
;
$arr
[
"type_ext"
]
=
$type_ext
;
$arr
[
"bargain_id"
]
=
$bargain_id
;
$arr
[
"bargain_id"
]
=
$bargain_id
;
$arr
[
"is_open"
]
=
$is_open
;
$arr
[
"is_open"
]
=
$is_open
;
$arr
[
"be_charged_party"
]
=
$be_charged_party
;
if
(
$income_time
)
{
if
(
$income_time
)
{
$arr
[
"income_time"
]
=
date
(
"Y-m-d H:i:s"
,
$income_time
);
$arr
[
"income_time"
]
=
date
(
"Y-m-d H:i:s"
,
$income_time
);
}
}
...
@@ -765,11 +772,11 @@ class OrderLogService
...
@@ -765,11 +772,11 @@ class OrderLogService
$sort
=
0
;
$sort
=
0
;
// 1.验证订单是否存在
// 1.验证订单是否存在
$oReportModel
=
new
OReportModel
();
$oReportModel
=
new
OReportModel
();
$oMarchInModel
=
new
OMarchInModel
();
$oMarchInModel
=
new
OMarchInModel
();
$oPayLogModel
=
new
OPayLogModel
();
$oPayLogModel
=
new
OPayLogModel
();
$oRefundModel
=
new
ORefundModel
();
$oRefundModel
=
new
ORefundModel
();
$oBargainModel
=
new
OBargainModel
();
$oBargainModel
=
new
OBargainModel
();
$uPhoneFollowModel
=
new
UPhoneFollowUp
(
$site_id
);
$uPhoneFollowModel
=
new
UPhoneFollowUp
(
$site_id
);
$uPhoneFollowTempModel
=
new
UPhoneFollowUpTemporary
(
$site_id
);
$uPhoneFollowTempModel
=
new
UPhoneFollowUpTemporary
(
$site_id
);
...
@@ -939,8 +946,8 @@ class OrderLogService
...
@@ -939,8 +946,8 @@ class OrderLogService
$sort
=
0
;
$sort
=
0
;
// 1.验证订单是否存在
// 1.验证订单是否存在
$oReportModel
=
new
OReportModel
();
$oReportModel
=
new
OReportModel
();
$oMarchInModel
=
new
OMarchInModel
();
$oMarchInModel
=
new
OMarchInModel
();
//$followUpLogModel = new FollowUpLogModel();
//$followUpLogModel = new FollowUpLogModel();
$oPayLogModel
=
new
OPayLogModel
();
$oPayLogModel
=
new
OPayLogModel
();
$oRefundModel
=
new
ORefundModel
();
$oRefundModel
=
new
ORefundModel
();
...
@@ -1005,21 +1012,21 @@ class OrderLogService
...
@@ -1005,21 +1012,21 @@ class OrderLogService
}
}
//跟进
//跟进
/* $field_follow_up = "a.id,a.agent_id,a.agent_name,a.user_type,a.decision_maker,a.industry_type,a.area_requirement,a.price_requirement,a.province,a.city,
/* $field_follow_up = "a.id,a.agent_id,a.agent_name,a.user_type,a.decision_maker,a.industry_type,a.area_requirement,a.price_requirement,a.province,a.city,
a.district,a.business_area,a.explain,a.explain_img,a.create_time,b.name,b.img,c.store_name";
a.district,a.business_area,a.explain,a.explain_img,a.create_time,b.name,b.img,c.store_name";
$followUpLogData = $followUpLogModel->getFollowUpByOrderId($field_follow_up, $reportParams);
$followUpLogData = $followUpLogModel->getFollowUpByOrderId($field_follow_up, $reportParams);
if (count($followUpLogData) > 0) {
if (count($followUpLogData) > 0) {
foreach ($followUpLogData as $k => $v) {
foreach ($followUpLogData as $k => $v) {
$v["step_name"] = "follow_up_log";
$v["step_name"] = "follow_up_log";
$v["step"] = "跟进";
$v["step"] = "跟进";
$v = $this->convertFollowUp($v);
$v = $this->convertFollowUp($v);
$v["img_path"] = CHAT_IMG_URL;
$v["img_path"] = CHAT_IMG_URL;
$v["explain_img"] = $v["explain_img"];
$v["explain_img"] = $v["explain_img"];
$result[$sort++] = $v;
$result[$sort++] = $v;
}
}
}*/
}*/
//收款
//收款
$field_pay_log
=
"a.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"
;
$field_pay_log
=
"a.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"
;
...
...
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