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
3c812db1
Commit
3c812db1
authored
Apr 09, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
9455f671
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
32 deletions
+38
-32
OrderLog.php
application/api_broker/controller/OrderLog.php
+3
-2
Shop.php
application/api_broker/controller/Shop.php
+2
-0
OrderLogService.php
application/api_broker/service/OrderLogService.php
+33
-30
No files found.
application/api_broker/controller/OrderLog.php
View file @
3c812db1
...
...
@@ -92,12 +92,13 @@ class OrderLog extends Basic
{
$params
=
$this
->
params
;
if
(
!
isset
(
$params
[
"agent_id"
])
||
!
isset
(
$params
[
"report_id"
])
||
!
isset
(
$params
[
"order_id"
])
||
!
isset
(
$params
[
"order_no"
])
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
...
...
@@ -117,7 +118,7 @@ class OrderLog extends Basic
$remark
=
isset
(
$params
[
"remark"
])
?
$params
[
"remark"
]
:
""
;
$transfer_img
=
isset
(
$params
[
"transfer_img"
])
?
$params
[
"transfer_img"
]
:
""
;
$is_ok
=
$this
->
service_
->
addCollectingBill
(
$params
[
"agent_id"
],
$params
[
"report_id"
],
$params
[
"order_id"
],
$params
[
"order_no"
],
$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
);
if
(
$is_ok
>
0
)
{
...
...
application/api_broker/controller/Shop.php
View file @
3c812db1
...
...
@@ -166,6 +166,8 @@ class Shop extends Basic
//获取图片信息
foreach
(
$result
as
$key
=>
$val
)
{
$result
[
$key
][
"api_path"
]
=
CK_IMG_URL
;
$result
[
$key
][
"rent_price"
]
=
$result
[
$key
][
"rent_price"
]
*
0.01
;
$param
[
"house_id"
]
=
$val
[
"id"
];
$param
[
"img_type"
]
=
1
;
//默认主图
$result
[
$key
][
"images"
]
=
$this
->
gHousesImgModel
->
getHouseImages
(
$param
,
1
);
...
...
application/api_broker/service/OrderLogService.php
View file @
3c812db1
...
...
@@ -36,6 +36,7 @@ class OrderLogService
/**
*批量插入收款记录
* @param $agent_id
* @param $agent_name
* @param $report_id
* @param $order_id
* @param $order_no
...
...
@@ -46,7 +47,7 @@ class OrderLogService
* @param $transfer_img
* @return int
*/
public
function
addCollectingBill
(
$agent_id
,
$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
)
{
$bill_arr
=
[];
...
...
@@ -54,11 +55,11 @@ class OrderLogService
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
,
$report_id
,
$order_id
,
$order_no
,
$params
=
$this
->
collectingBillBin
(
$father_id
,
$collecting
,
$agent_id
,
$
agent_name
,
$
report_id
,
$order_id
,
$order_no
,
$house_number
,
$industry_type
,
$remark
,
$transfer_img
);
$father_id
=
$this
->
payLogModel
->
insertPayLog
(
$params
);
}
else
{
array_push
(
$bill_arr
,
$this
->
collectingBillBin
(
$father_id
,
$collecting
,
$agent_id
,
$report_id
,
$order_id
,
$order_no
,
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
));
}
}
...
...
@@ -92,7 +93,7 @@ class OrderLogService
return
$father_id
;
}
private
function
collectingBillBin
(
$father_id
,
$collecting_arr
,
$agent_id
,
$report_id
,
$order_id
,
$order_no
,
$house_number
,
private
function
collectingBillBin
(
$father_id
,
$collecting_arr
,
$agent_id
,
$
agent_name
,
$
report_id
,
$order_id
,
$order_no
,
$house_number
,
$industry_type
,
$remark
,
$transfer_img
)
{
...
...
@@ -101,6 +102,7 @@ class OrderLogService
$arr
[
"order_no"
]
=
$order_no
;
$arr
[
"order_id"
]
=
$order_id
;
$arr
[
"agent_id"
]
=
$agent_id
;
$arr
[
"agent_name"
]
=
$agent_name
;
$arr
[
"type"
]
=
$collecting_arr
[
"type"
];
$arr
[
"pay_type"
]
=
$collecting_arr
[
"pay_type"
];
$arr
[
"money"
]
=
$collecting_arr
[
"money"
];
...
...
@@ -127,7 +129,7 @@ class OrderLogService
* @param $commission_arr
* @return int
*/
public
function
addBargain
(
$submit_agent_id
,
$submit_agent_name
,
$report_id
,
$order_id
,
$order_no
,
$trade_type
,
$price
,
$commission
,
$commission_arr
)
public
function
addBargain
(
$submit_agent_id
,
$submit_agent_name
,
$report_id
,
$order_id
,
$order_no
,
$trade_type
,
$price
,
$commission
,
$commission_arr
)
{
$bargain_arr
=
[];
$father_id
=
0
;
...
...
@@ -135,11 +137,11 @@ class OrderLogService
if
(
isset
(
$commission_val
[
"role"
])
&&
isset
(
$commission_val
[
"agent_id"
])
&&
isset
(
$commission_val
[
"scale"
])
&&
isset
(
$commission_val
[
"scale_fee"
]))
{
if
(
$father_id
==
0
)
{
$params
=
$this
->
bargainBin
(
$father_id
,
$commission_val
,
$submit_agent_id
,
$submit_agent_name
,
$report_id
,
$order_id
,
$params
=
$this
->
bargainBin
(
$father_id
,
$commission_val
,
$submit_agent_id
,
$submit_agent_name
,
$report_id
,
$order_id
,
$order_no
,
$trade_type
,
$price
,
$commission
);
$father_id
=
$this
->
bargainModel
->
insertBargain
(
$params
);
}
else
{
array_push
(
$bargain_arr
,
$this
->
bargainBin
(
$father_id
,
$commission_val
,
$submit_agent_id
,
$submit_agent_name
,
$report_id
,
array_push
(
$bargain_arr
,
$this
->
bargainBin
(
$father_id
,
$commission_val
,
$submit_agent_id
,
$submit_agent_name
,
$report_id
,
$order_id
,
$order_no
,
$trade_type
,
$price
,
$commission
));
}
...
...
@@ -152,23 +154,23 @@ class OrderLogService
return
$father_id
;
}
private
function
bargainBin
(
$father_id
,
$commission_val
,
$submit_agent_id
,
$submit_agent_name
,
$report_id
,
$order_id
,
$order_no
,
$trade_type
,
$price
,
$commission
)
private
function
bargainBin
(
$father_id
,
$commission_val
,
$submit_agent_id
,
$submit_agent_name
,
$report_id
,
$order_id
,
$order_no
,
$trade_type
,
$price
,
$commission
)
{
$arr
[
"report_id"
]
=
$report_id
;
$arr
[
"father_id"
]
=
$father_id
;
$arr
[
"order_no"
]
=
$order_no
;
$arr
[
"order_id"
]
=
$order_id
;
$arr
[
"submit_agent_id"
]
=
$submit_agent_id
;
$arr
[
"report_id"
]
=
$report_id
;
$arr
[
"father_id"
]
=
$father_id
;
$arr
[
"order_no"
]
=
$order_no
;
$arr
[
"order_id"
]
=
$order_id
;
$arr
[
"submit_agent_id"
]
=
$submit_agent_id
;
$arr
[
"submit_agent_name"
]
=
$submit_agent_name
;
$arr
[
"trade_type"
]
=
$trade_type
;
$arr
[
"price"
]
=
$price
;
$arr
[
"commission"
]
=
$commission
;
$arr
[
"role"
]
=
$commission_val
[
"role"
];
$arr
[
"agent_id"
]
=
$commission_val
[
"agent_id"
];
$arr
[
"scale"
]
=
$commission_val
[
"scale"
];
$arr
[
"scale_fee"
]
=
$commission_val
[
"scale_fee"
];
$arr
[
"create_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
$arr
[
"update_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
$arr
[
"trade_type"
]
=
$trade_type
;
$arr
[
"price"
]
=
$price
;
$arr
[
"commission"
]
=
$commission
;
$arr
[
"role"
]
=
$commission_val
[
"role"
];
$arr
[
"agent_id"
]
=
$commission_val
[
"agent_id"
];
$arr
[
"scale"
]
=
$commission_val
[
"scale"
];
$arr
[
"scale_fee"
]
=
$commission_val
[
"scale_fee"
];
$arr
[
"create_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
$arr
[
"update_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
return
$arr
;
}
...
...
@@ -359,8 +361,8 @@ class OrderLogService
$item
[
"price_requirement"
]
=
"其他"
;
}
$regions
=
new
Regions
();
$cityInfo
=
$regions
->
getAddressByDiscCode
(
$item
[
"district"
]);
$regions
=
new
Regions
();
$cityInfo
=
$regions
->
getAddressByDiscCode
(
$item
[
"district"
]);
$item
[
"area_detail"
]
=
$cityInfo
;
return
$item
;
}
...
...
@@ -526,14 +528,15 @@ class OrderLogService
* 成交报告提交后用户状态从求租变成已租
* @param $report_id
*/
public
function
userUpdateInfo
(
$report_id
){
$reportModel
=
new
OReportModel
();
$filed
=
"id,user_id"
;
public
function
userUpdateInfo
(
$report_id
)
{
$reportModel
=
new
OReportModel
();
$filed
=
"id,user_id"
;
$params
[
"id"
]
=
$report_id
;
$result
=
$reportModel
->
selectReportById
(
$filed
,
$params
);
if
(
count
(
$result
)
>
0
)
{
$result
=
$reportModel
->
selectReportById
(
$filed
,
$params
);
if
(
count
(
$result
)
>
0
)
{
$Users
=
new
Users
();
$Users
->
update_user_status
([
'id'
=>
$result
[
0
][
"user_id"
],
'user_status'
=>
1
]);
$Users
->
update_user_status
([
'id'
=>
$result
[
0
][
"user_id"
],
'user_status'
=>
1
]);
}
}
...
...
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