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
fbdcc47a
Commit
fbdcc47a
authored
Dec 14, 2018
by
zw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
带看列表显示商铺地址
parent
660b994a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
84 deletions
+35
-84
OrderLogService.php
application/api_broker/service/OrderLogService.php
+9
-26
ReportService.php
application/api_broker/service/ReportService.php
+26
-58
No files found.
application/api_broker/service/OrderLogService.php
View file @
fbdcc47a
...
@@ -1148,10 +1148,13 @@ class OrderLogService
...
@@ -1148,10 +1148,13 @@ class OrderLogService
}
}
/**
/**
* @param $params 1.客户姓名 2.报备人电话 3.报备人姓名 4.商铺名称 5.商铺地址
* @param $params1.客户姓名 2.报备人电话 3.报备人姓名 4.商铺名称 5.商铺地址
* @return mixed
* @param $pageNo
* @throws \think\db\exception\BindParamException
* @param $pageSize
* @throws \think\exception\PDOException
* @return array|mixed
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
*/
public
function
getSearchOrderByAll
(
$params
,
$pageNo
,
$pageSize
)
public
function
getSearchOrderByAll
(
$params
,
$pageNo
,
$pageSize
)
{
{
...
@@ -1191,29 +1194,9 @@ class OrderLogService
...
@@ -1191,29 +1194,9 @@ class OrderLogService
$orderModel
=
new
OrderModel
();
$orderModel
=
new
OrderModel
();
$result
=
$orderModel
->
searchOrderAll
(
$field
,
$condition
,
$where_
,
$pageNo
,
$pageSize
);
$result
=
$orderModel
->
searchOrderAll
(
$field
,
$condition
,
$where_
,
$pageNo
,
$pageSize
);
$reportService
=
new
ReportService
();
return
$reportService
->
returnResult
(
$result
);
$ids_str
=
""
;
if
(
count
(
$result
)
<=
0
)
{
return
null
;
}
else
{
foreach
(
$result
as
$k
=>
$v
)
{
$ids_str
.=
$v
[
"id"
]
.
","
;
}
$ids_str
=
rtrim
(
$ids_str
,
","
);
$reportService
=
new
ReportService
();
$sign_arr
=
$reportService
->
orderSign
(
$ids_str
);
foreach
(
$result
as
$k
=>
$v
)
{
foreach
(
$sign_arr
as
$value
)
{
if
(
$v
[
"id"
]
==
$value
[
"order_id"
])
{
$result
[
$k
][
"sign"
]
.=
$reportService
->
signTitle
(
$value
[
"type"
])
.
","
;
}
}
}
return
$result
;
}
}
}
/**
/**
...
...
application/api_broker/service/ReportService.php
View file @
fbdcc47a
...
@@ -127,20 +127,32 @@ class ReportService
...
@@ -127,20 +127,32 @@ class ReportService
$params
[
"house_ids"
]
=
$ids
;
$params
[
"house_ids"
]
=
$ids
;
$result
=
$this
->
oReportModel
->
selectReportList
(
$field
,
$params
,
$pageNo
,
$pageSize
);
$result
=
$this
->
oReportModel
->
selectReportList
(
$field
,
$params
,
$pageNo
,
$pageSize
);
return
$this
->
returnResult
(
$result
);
}
/**
* @param $result
* @return mixed
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
returnResult
(
$result
){
$ids_str
=
""
;
$ids_str
=
""
;
$house_id_str
=
""
;
$house_id_str
=
""
;
if
(
count
(
$result
)
>
0
)
{
if
(
count
(
$result
)
>
0
)
{
foreach
(
$result
as
$k
=>
$v
)
{
foreach
(
$result
as
$k
=>
$v
)
{
//$result[$k]["user_phone"] = preg_replace('/(\d{3})\d{4}(\d{4})/', '$1****$2', $v["user_phone"]);
//$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"
]
.
","
;
$house_id_str
.=
$v
[
"house_id"
]
.
","
;
$house_id_str
.=
$v
[
"house_id"
]
.
","
;
}
}
$ids_str
=
rtrim
(
$ids_str
,
","
);
$ids_str
=
rtrim
(
$ids_str
,
","
);
$house_id_str
=
rtrim
(
$house_id_str
,
","
);
$house_id_str
=
rtrim
(
$house_id_str
,
","
);
$sign_arr
=
$this
->
orderSign
(
$ids_str
);
$sign_arr
=
$this
->
orderSign
(
$ids_str
);
$house_arr
=
$this
->
houseInfo
(
$house_id_str
);
$house_arr
=
$this
->
houseInfo
(
$house_id_str
);
foreach
(
$result
as
$k
=>
$v
)
{
foreach
(
$result
as
$k
=>
$v
)
{
...
@@ -157,11 +169,9 @@ class ReportService
...
@@ -157,11 +169,9 @@ class ReportService
}
}
}
}
return
$result
;
}
}
return
null
;
return
$result
;
}
}
/**
/**
* 报备订单列表All
* 报备订单列表All
* @param $field
* @param $field
...
@@ -176,38 +186,7 @@ class ReportService
...
@@ -176,38 +186,7 @@ class ReportService
{
{
$params
=
[];
$params
=
[];
$result
=
$this
->
oReportModel
->
selectReportList
(
$field
,
$params
,
$pageNo
,
$pageSize
);
$result
=
$this
->
oReportModel
->
selectReportList
(
$field
,
$params
,
$pageNo
,
$pageSize
);
return
$this
->
returnResult
(
$result
);
$ids_str
=
""
;
$house_id_str
=
""
;
if
(
count
(
$result
)
>
0
)
{
foreach
(
$result
as
$k
=>
$v
)
{
$ids_str
.=
$v
[
"order_id"
]
.
","
;
$house_id_str
.=
$v
[
"house_id"
]
.
","
;
}
$ids_str
=
rtrim
(
$ids_str
,
","
);
$house_id_str
=
rtrim
(
$house_id_str
,
","
);
$sign_arr
=
$this
->
orderSign
(
$ids_str
);
$house_arr
=
$this
->
houseInfo
(
$house_id_str
);
foreach
(
$result
as
$k
=>
$v
)
{
$result
[
$k
][
"sign"
]
=
""
;
foreach
(
$sign_arr
as
$value
)
{
if
(
$v
[
"order_id"
]
==
$value
[
"order_id"
])
{
$result
[
$k
][
"sign"
]
.=
$this
->
signTitle
(
$value
[
"type"
])
.
","
;
}
foreach
(
$house_arr
as
$item
)
{
if
(
$v
[
"house_id"
]
==
$item
[
"id"
])
{
$result
[
$k
][
"house_address"
]
.=
$item
[
"internal_title"
];
}
}
}
}
return
$result
;
}
return
null
;
}
}
/**
/**
...
@@ -244,27 +223,9 @@ class ReportService
...
@@ -244,27 +223,9 @@ class ReportService
$result
=
$this
->
oReportModel
->
selectReportList
(
$field
,
$params
,
$pageNo
,
$pageSize
);
$result
=
$this
->
oReportModel
->
selectReportList
(
$field
,
$params
,
$pageNo
,
$pageSize
);
$count
=
$this
->
oReportModel
->
selectReportCount
(
$field
,
$params
);
$count
=
$this
->
oReportModel
->
selectReportCount
(
$field
,
$params
);
$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"]);
$ids_str
.=
$v
[
"order_id"
]
.
","
;
}
$ids_str
=
rtrim
(
$ids_str
,
","
);
$sign_arr
=
$this
->
orderSign
(
$ids_str
);
foreach
(
$result
as
$k
=>
$v
)
{
$result
[
$k
][
"sign"
]
=
""
;
foreach
(
$sign_arr
as
$value
)
{
if
(
$v
[
"order_id"
]
==
$value
[
"order_id"
])
{
$result
[
$k
][
"sign"
]
.=
$this
->
signTitle
(
$value
[
"type"
])
.
","
;
}
}
}
if
(
count
(
$result
)
>
0
)
{
$data
[
"result"
]
=
$
result
;
$data
[
"result"
]
=
$
this
->
returnResult
(
$result
)
;
$data
[
"total"
]
=
$count
[
0
][
"total"
]
?
$count
[
0
][
"total"
]
:
0
;
$data
[
"total"
]
=
$count
[
0
][
"total"
]
?
$count
[
0
][
"total"
]
:
0
;
return
$data
;
return
$data
;
}
}
...
@@ -277,6 +238,13 @@ class ReportService
...
@@ -277,6 +238,13 @@ class ReportService
return
$this
->
orderModel
->
selectSign
(
$ids_str
);
return
$this
->
orderModel
->
selectSign
(
$ids_str
);
}
}
/**
* @param $house_id_str
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
houseInfo
(
$house_id_str
)
public
function
houseInfo
(
$house_id_str
)
{
{
$houseModel
=
new
GHouses
();
$houseModel
=
new
GHouses
();
...
...
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