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
e0388a11
Commit
e0388a11
authored
Aug 09, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
1c55606c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
2 deletions
+20
-2
PerformanceInfo.php
application/index/controller/PerformanceInfo.php
+3
-2
OBargainModel.php
application/model/OBargainModel.php
+17
-0
No files found.
application/index/controller/PerformanceInfo.php
View file @
e0388a11
...
...
@@ -28,7 +28,7 @@ class PerformanceInfo extends Basic
*/
public
function
performanceInfo
()
{
if
(
$this
->
request
->
isAjax
())
{
if
(
!
$this
->
request
->
isAjax
())
{
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
15
:
$this
->
params
[
'pageSize'
];
...
...
@@ -88,9 +88,10 @@ class PerformanceInfo extends Basic
$field
.=
'Houses.landmark,'
;
$field
.=
'Oorder.house_id'
;
$return
=
$this
->
oBargainModel
->
performancelInfo
(
$where
,
$field
,
$pageSize
,
$pageNo
);
$return_total
=
$this
->
oBargainModel
->
performancelInfoTotal
(
$where
,
$field
);
$field
=
'sum(Obargain.scale_fee) as scale_fee_sum'
;
$return_sum
=
$this
->
oBargainModel
->
performancelInfo
(
$where
,
$field
,
$pageSize
,
$pageNo
);
return
$this
->
response
(
200
,
''
,
[
'scale_fee_sum'
=>
$return_sum
[
0
][
'scale_fee_sum'
],
'data'
=>
$return
]);
return
$this
->
response
(
200
,
''
,
[
'scale_fee_sum'
=>
$return_sum
[
0
][
'scale_fee_sum'
],
'data'
=>
$return
,
'total'
=>
$return_total
]);
}
else
{
return
view
(
'performanceInfo'
);
}
...
...
application/model/OBargainModel.php
View file @
e0388a11
...
...
@@ -1249,4 +1249,20 @@ class OBargainModel extends Model
// echo $this->db_->getLastSql();
return
$result
;
}
public
function
performancelInfoTotal
(
$where
,
$filed
){
$result
=
$this
->
db_
->
field
(
$filed
)
->
alias
(
"Obargain"
)
->
join
(
"o_report Oreport"
,
"Obargain.report_id = Oreport.id"
,
"left"
)
->
join
(
"o_order Oorder"
,
"Obargain.order_id = Oorder.id"
,
"left"
)
->
join
(
"g_houses Houses"
,
"Oorder.house_id = Houses.id"
,
"left"
)
->
join
(
"a_agents Agent"
,
"Obargain.agent_id = Agent.id"
,
"left"
)
->
join
(
'a_store Store'
,
'Agent.store_id = Store.id'
,
'left'
)
->
join
(
'a_district District'
,
'Agent.district_id = District.id'
,
'left'
)
->
where
(
$where
)
->
count
();
// echo $this->db_->getLastSql();
return
$result
;
}
}
\ No newline at end of file
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