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
9b1b53cc
Commit
9b1b53cc
authored
Dec 03, 2018
by
zw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
全部带看记录
parent
fb390dde
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
15 deletions
+64
-15
Report.php
application/api_broker/controller/Report.php
+14
-7
ReportService.php
application/api_broker/service/ReportService.php
+39
-0
OReportModel.php
application/model/OReportModel.php
+11
-8
No files found.
application/api_broker/controller/Report.php
View file @
9b1b53cc
...
...
@@ -107,13 +107,15 @@ class Report extends Basic
*/
public
function
reportList
()
{
/* $params = array(
"agent_id" =>10013,
"type" => 1,//1表示全部 2表示进场 3 表示收款 4成交报告
"page_no"=>1,
"page_size"=>15
);*/
$params
=
$this
->
params
;
/* $params = array(
"agent_id" =>10013,
"type" => 1,//1表示全部 2表示进场 3 表示收款 4成交报告
"is_all"=>1,//0搜索我自己的,1全部
"page_no"=>1,
"page_size"=>15
);*/
if
(
!
isset
(
$params
[
"agent_id"
])
||
!
isset
(
$params
[
"type"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
...
...
@@ -125,8 +127,13 @@ class Report extends Basic
$field
=
"a.id,a.user_id,a.user_phone,a.user_name,a.predict_see_time,a.create_time,b.id as order_id,b.order_no,b.house_id,b.house_title"
;
$params
[
"report_agent_id"
]
=
$params
[
"agent_id"
];
$result
=
[];
if
(
isset
(
$params
[
"is_all"
])
&&
$params
[
"is_all"
]
==
1
){
$result
=
$this
->
service_
->
orderListAll
(
$field
,
$params
,
$pageNo
,
$pageSize
);
}
else
{
$result
=
$this
->
service_
->
orderList
(
$field
,
$params
,
$pageNo
,
$pageSize
);
}
$result
=
$this
->
service_
->
orderList
(
$field
,
$params
,
$pageNo
,
$pageSize
);
if
(
count
(
$result
)
>
0
)
{
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
...
...
application/api_broker/service/ReportService.php
View file @
9b1b53cc
...
...
@@ -155,6 +155,45 @@ class ReportService
return
null
;
}
/**
* 报备订单列表All
* @param $field
* @param $params
* @param $pageNo
* @param $pageSize
* @return mixed|null
* @throws \think\db\exception\BindParamException
* @throws \think\exception\PDOException
*/
public
function
orderListAll
(
$field
,
$params
,
$pageNo
,
$pageSize
)
{
$params
=
[];
$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"]);
$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"
])
.
","
;
}
}
}
return
$result
;
}
return
null
;
}
/**
* 报备订单列表
* @param $field
...
...
application/model/OReportModel.php
View file @
9b1b53cc
...
...
@@ -173,12 +173,15 @@ class OReportModel extends Model
*/
public
function
selectReportList
(
$filed
=
"id"
,
$params
,
$pageNo
,
$pageSize
)
{
$report_agent_str
=
$house_str
=
"1=1 "
;
$start_index
=
(
$pageNo
-
1
)
*
$pageSize
;
if
(
isset
(
$params
[
"report_agent_id"
]))
{
$report_agent_id
=
$params
[
"report_agent_id"
];
$report_agent_str
=
"a.report_agent_id IN (
$report_agent_id
)"
;
}
if
(
isset
(
$params
[
"house_ids"
]))
{
$house_ids
=
$params
[
"house_ids"
];
$house_str
=
"b.house_id IN (
$house_ids
)"
;
}
// 约带看时间 开始 结束
...
...
@@ -226,7 +229,7 @@ class OReportModel extends Model
LEFT JOIN `o_order` `b` ON `a`.`id` = `b`.`f_id`
RIGHT JOIN `o_march_in` `c` ON `b`.`id` = `c`.`order_id`
WHERE
`a`.`report_agent_id` IN (
$report_agent_id
)
$report_agent_str
AND `a`.`status` = 0
AND `b`.`is_del` = 0
GROUP BY
...
...
@@ -239,7 +242,7 @@ class OReportModel extends Model
LEFT JOIN `o_order` `b` ON `a`.`id` = `b`.`f_id`
RIGHT JOIN `o_march_in` `c` ON `b`.`id` = `c`.`order_id`
WHERE
`b`.`house_id` IN (
$house_ids
)
$house_str
AND `a`.`status` = 0
AND `b`.`is_del` = 0
GROUP BY
...
...
@@ -259,7 +262,7 @@ class OReportModel extends Model
LEFT JOIN `o_order` `b` ON `a`.`id` = `b`.`f_id`
RIGHT JOIN `o_paylog` `c` ON `b`.`id` = `c`.`order_id`
WHERE
`a`.`report_agent_id` IN (
$report_agent_id
)
$report_agent_str
AND `a`.`status` = 0
AND `b`.`is_del` = 0
GROUP BY
...
...
@@ -274,7 +277,7 @@ class OReportModel extends Model
LEFT JOIN `o_order` `b` ON `a`.`id` = `b`.`f_id`
RIGHT JOIN `o_paylog` `c` ON `b`.`id` = `c`.`order_id`
WHERE
`b`.`house_id` IN (
$house_ids
)
$house_str
AND `a`.`status` = 0
AND `b`.`is_del` = 0
GROUP BY
...
...
@@ -294,7 +297,7 @@ class OReportModel extends Model
LEFT JOIN `o_order` `b` ON `a`.`id` = `b`.`f_id`
RIGHT JOIN `o_bargain` `c` ON `b`.`id` = `c`.`order_id`
WHERE
`a`.`report_agent_id` IN (
$report_agent_id
)
$report_agent_str
AND `a`.`status` = 0
AND `b`.`is_del` = 0
GROUP BY
...
...
@@ -309,7 +312,7 @@ class OReportModel extends Model
LEFT JOIN `o_order` `b` ON `a`.`id` = `b`.`f_id`
RIGHT JOIN `o_bargain` `c` ON `b`.`id` = `c`.`order_id`
WHERE
`b`.`house_id` IN (
$house_ids
)
$house_str
AND `a`.`status` = 0
AND `b`.`is_del` = 0
GROUP BY
...
...
@@ -326,7 +329,7 @@ class OReportModel extends Model
`o_report` `a`
LEFT JOIN `o_order` `b` ON `a`.`id` = `b`.`f_id`
WHERE
`a`.`report_agent_id` IN (
$report_agent_id
)
$report_agent_str
AND `a`.`status` = 0
AND `b`.`is_del` = 0)
UNION
...
...
@@ -336,7 +339,7 @@ class OReportModel extends Model
`o_report` `a`
LEFT JOIN `o_order` `b` ON `a`.`id` = `b`.`f_id`
WHERE
`b`.`house_id` IN (
$house_ids
)
$house_str
AND `a`.`status` = 0
AND `b`.`is_del` = 0
) ) as aaa
$where_params
ORDER BY `create_time` DESC limit
$start_index
,
$pageSize
"
;
...
...
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