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
9f5ef99d
Commit
9f5ef99d
authored
Mar 26, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
1f7ef7d9
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
20 deletions
+38
-20
Report.php
application/api_broker/controller/Report.php
+2
-3
ReportService.php
application/api_broker/service/ReportService.php
+33
-16
OReportModel.php
application/model/OReportModel.php
+3
-1
No files found.
application/api_broker/controller/Report.php
View file @
9f5ef99d
...
...
@@ -13,13 +13,12 @@ use think\Exception;
* User : zw
* Date : 2018/1/24
* Time : 14:24
* Intro:
* Intro:
报备流程
*/
class
Report
extends
Basic
{
private
$service_
;
private
$fulModel
;
private
$oReportModel
;
...
...
@@ -84,7 +83,7 @@ class Report extends Basic
* @return \think\Response
*/
public
function
reportList
(){
/*
$params = array(
/*
$params = array(
"agent_id" =>1,
"type" => 1,//1表示全部 2表示进场 3 表示收款 4成交报告
"page_no"=>1,
...
...
application/api_broker/service/ReportService.php
View file @
9f5ef99d
...
...
@@ -83,25 +83,40 @@ class ReportService
}
public
function
orderList
(
$field
,
$params
,
$pageNo
,
$pageSize
){
$result
=
$this
->
oReportModel
->
selectReportList
(
$field
,
$params
,
$pageNo
,
$pageSize
);
/**
* 报备订单列表
* @param $field
* @param $params
* @param $pageNo
* @param $pageSize
* @return false|null|\PDOStatement|string|\think\Collection
*/
public
function
orderList
(
$field
,
$params
,
$pageNo
,
$pageSize
)
{
//todo 获取我报备的我的案场的,如果是店长则获取其下所有的经纪人
$vModel
=
new
VerifyService
();
$agentArr
=
$vModel
->
getAgentsByAgentId
(
$params
[
"report_agent_id"
]);
dump
(
$agentArr
);
if
(
$agentArr
)
{
$params
[
"report_agent_id"
]
=
array
(
"in"
,
$agentArr
);
}
$result
=
$this
->
oReportModel
->
selectReportList
(
$field
,
$params
,
$pageNo
,
$pageSize
);
$ids_str
=
""
;
if
(
count
(
$result
)
>
0
)
{
foreach
(
$result
as
$k
=>
$v
)
{
$result
[
$k
][
"user_phone"
]
=
preg_replace
(
'/(\d{3})\d{4}(\d{4})/'
,
'$1****$2'
,
$v
[
"user_phone"
]);
if
(
count
(
$result
)
>
0
)
{
foreach
(
$result
as
$k
=>
$v
)
{
$result
[
$k
][
"user_phone"
]
=
preg_replace
(
'/(\d{3})\d{4}(\d{4})/'
,
'$1****$2'
,
$v
[
"user_phone"
]);
$ids_str
.=
$v
[
"order_id"
]
.
","
;
$ids_str
.=
$v
[
"order_id"
]
.
","
;
}
$ids_str
=
rtrim
(
$ids_str
,
","
);
$sign_arr
=
$this
->
orderSign
(
$ids_str
);
foreach
(
$result
as
$k
=>
$v
)
{
foreach
(
$sign_arr
as
$value
){
if
(
$v
[
"order_id"
]
==
$value
[
"order_id"
])
{
$result
[
$k
][
"sign"
]
.=
$this
->
signTitle
(
$value
[
"type"
])
.
","
;
foreach
(
$result
as
$k
=>
$v
)
{
foreach
(
$sign_arr
as
$value
)
{
if
(
$v
[
"order_id"
]
==
$value
[
"order_id"
])
{
$result
[
$k
][
"sign"
]
.=
$this
->
signTitle
(
$value
[
"type"
])
.
","
;
}
}
...
...
@@ -112,13 +127,15 @@ class ReportService
return
null
;
}
public
function
orderSign
(
$ids_str
){
public
function
orderSign
(
$ids_str
)
{
return
$this
->
orderModel
->
selectSign
(
$ids_str
);
}
public
function
signTitle
(
$type
){
switch
(
$type
){
public
function
signTitle
(
$type
)
{
switch
(
$type
)
{
case
2
:
return
"进场"
;
case
3
:
...
...
@@ -180,8 +197,8 @@ class ReportService
private
function
orderBin
(
$order_no
,
$f_id
,
$house_id
)
{
$houseModel
=
new
GHouses
();
$houseResult
=
$houseModel
->
getHouseDetail
(
"id,internal_title"
,[
"id"
=>
$house_id
]);
$house_title
=
count
(
$houseResult
)
>
0
&&
isset
(
$houseResult
[
"internal_title"
])
?
$houseResult
[
"internal_title"
]
:
null
;
$houseResult
=
$houseModel
->
getHouseDetail
(
"id,internal_title"
,
[
"id"
=>
$house_id
]);
$house_title
=
count
(
$houseResult
)
>
0
&&
isset
(
$houseResult
[
"internal_title"
])
?
$houseResult
[
"internal_title"
]
:
null
;
$param
[
"order_no"
]
=
$order_no
;
$param
[
"f_id"
]
=
$f_id
;
$param
[
"house_id"
]
=
$house_id
;
...
...
application/model/OReportModel.php
View file @
9f5ef99d
...
...
@@ -124,7 +124,7 @@ class OReportModel extends Model
->
page
(
$pageNo
)
->
select
();
default
:
return
$this
->
db
$result
=
$this
->
db
->
field
(
$filed
)
->
alias
(
"a"
)
->
join
(
"o_order b"
,
"a.id= b.f_id"
,
"left"
)
...
...
@@ -132,6 +132,8 @@ class OReportModel extends Model
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
select
();
//echo $this->db->getLastSql();
return
$result
;
}
...
...
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