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
eac9d5f6
Commit
eac9d5f6
authored
Feb 18, 2019
by
zw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
带看列表
parent
3b2faff0
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
70 additions
and
13 deletions
+70
-13
Report.php
application/api_broker/controller/Report.php
+4
-4
ReportService.php
application/api_broker/service/ReportService.php
+5
-8
OReportModel.php
application/model/OReportModel.php
+61
-1
No files found.
application/api_broker/controller/Report.php
View file @
eac9d5f6
...
@@ -109,10 +109,10 @@ class Report extends Basic
...
@@ -109,10 +109,10 @@ class Report extends Basic
public
function
reportList
()
public
function
reportList
()
{
{
$params
=
$this
->
params
;
$params
=
$this
->
params
;
/*
$params = array(
/*
$params = array(
"agent_id" =>
6446
,
"agent_id" =>
5741
,
"type" =>
1
,//1表示全部 2表示进场 3 表示收款 4成交报告
"type" =>
2
,//1表示全部 2表示进场 3 表示收款 4成交报告
"is_all"=>
0
,//0搜索我自己的,1全部
"is_all"=>
1
,//0搜索我自己的,1全部
"page_no"=>1,
"page_no"=>1,
"page_size"=>15
"page_size"=>15
);*/
);*/
...
...
application/api_broker/service/ReportService.php
View file @
eac9d5f6
...
@@ -106,13 +106,11 @@ class ReportService
...
@@ -106,13 +106,11 @@ class ReportService
*/
*/
public
function
orderList
(
$field
,
$params
,
$pageNo
,
$pageSize
)
public
function
orderList
(
$field
,
$params
,
$pageNo
,
$pageSize
)
{
{
//todo 获取我报备的我的案场的,如果是店长则获取其下所有的经纪人
//todo 获取我报备的我的案场的,
//如果是店长则获取其下所有的经纪人 这里去掉了for190218
$vModel
=
new
VerifyService
();
$vModel
=
new
VerifyService
();
$agentArr
=
$vModel
->
getAgentsByAgentId
(
$params
[
"report_agent_id"
]);
// $agentArr = $vModel->getAgentsByAgentId($params["report_agent_id"]);
if
(
$agentArr
)
{
$params
[
"agent_id_s"
]
=
array
(
"in"
,
$params
[
"report_agent_id"
]
);
$params
[
"agent_id_s"
]
=
array
(
"in"
,
$agentArr
);
$params
[
"report_agent_id"
]
=
$agentArr
;
}
$caseHouseId
=
$vModel
->
getCaseHouseIdByAgentId
(
$params
[
"agent_id_s"
]);
$caseHouseId
=
$vModel
->
getCaseHouseIdByAgentId
(
$params
[
"agent_id_s"
]);
$ids
=
""
;
$ids
=
""
;
...
@@ -188,8 +186,7 @@ class ReportService
...
@@ -188,8 +186,7 @@ class ReportService
*/
*/
public
function
orderListAll
(
$field
,
$params
,
$pageNo
,
$pageSize
)
public
function
orderListAll
(
$field
,
$params
,
$pageNo
,
$pageSize
)
{
{
$params
=
[];
$result
=
$this
->
oReportModel
->
selectReportListAll
(
$field
,
$params
,
$pageNo
,
$pageSize
);
$result
=
$this
->
oReportModel
->
selectReportList
(
$field
,
$params
,
$pageNo
,
$pageSize
);
return
$this
->
returnResult
(
$result
);
return
$this
->
returnResult
(
$result
);
}
}
...
...
application/model/OReportModel.php
View file @
eac9d5f6
...
@@ -186,6 +186,61 @@ class OReportModel extends Model
...
@@ -186,6 +186,61 @@ class OReportModel extends Model
->
select
();
->
select
();
}
}
public
function
selectReportListAll
(
$filed
=
"id"
,
$params
,
$pageNo
,
$pageSize
){
$result
=
[];
$where
[
"a.status"
]
=
0
;
$where
[
"b.is_del"
]
=
0
;
switch
(
$params
[
"type"
])
{
case
2
:
$result
=
$this
->
db
->
field
(
$filed
)
->
alias
(
"a"
)
->
join
(
"o_order b"
,
"a.id=b.f_id"
,
"left"
)
->
join
(
"o_march_in c"
,
"b.id=c.order_id"
,
"right"
)
->
where
(
$where
)
->
order
(
"b.id desc"
)
->
page
(
$pageNo
)
->
limit
(
$pageSize
)
->
select
();
break
;
case
3
:
$result
=
$this
->
db
->
field
(
$filed
)
->
alias
(
"a"
)
->
join
(
"o_order b"
,
"a.id=b.f_id"
,
"left"
)
->
join
(
"o_paylog c"
,
"b.id=c.order_id"
,
"right"
)
->
where
(
$where
)
->
order
(
"b.id desc"
)
->
page
(
$pageNo
)
->
limit
(
$pageSize
)
->
select
();
break
;
case
4
:
$result
=
$this
->
db
->
field
(
$filed
)
->
alias
(
"a"
)
->
join
(
"o_order b"
,
"a.id=b.f_id"
,
"left"
)
->
join
(
"o_bargain c"
,
"b.id=c.order_id"
,
"right"
)
->
where
(
$where
)
->
order
(
"b.id desc"
)
->
page
(
$pageNo
)
->
limit
(
$pageSize
)
->
select
();
break
;
default
:
$result
=
$this
->
db
->
field
(
$filed
)
->
alias
(
"a"
)
->
join
(
"o_order b"
,
"a.id=b.f_id"
,
"left"
)
->
where
(
$where
)
->
order
(
"b.id desc"
)
->
page
(
$pageNo
)
->
limit
(
$pageSize
)
->
select
();
}
//echo $this->getLastSql();
return
$result
;
}
/**
/**
* @param string $filed
* @param string $filed
* @param $params
* @param $params
...
@@ -370,7 +425,7 @@ class OReportModel extends Model
...
@@ -370,7 +425,7 @@ class OReportModel extends Model
$result
=
$this
->
db
->
query
(
$sql
);
$result
=
$this
->
db
->
query
(
$sql
);
//
echo $this->getLastSql();
//
echo $this->getLastSql();
return
$result
;
return
$result
;
}
}
...
@@ -1002,3 +1057,8 @@ class OReportModel extends Model
...
@@ -1002,3 +1057,8 @@ class OReportModel extends Model
return
$this
->
db
->
where
(
$where
)
->
value
(
$field
);
return
$this
->
db
->
where
(
$where
)
->
value
(
$field
);
}
}
}
}
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