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
575efd4a
Commit
575efd4a
authored
Nov 02, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
约带看时间
parent
75acbd13
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
49 deletions
+3
-49
Report.php
application/index/controller/Report.php
+1
-1
OReportModel.php
application/model/OReportModel.php
+2
-48
No files found.
application/index/controller/Report.php
View file @
575efd4a
...
...
@@ -30,7 +30,7 @@ class Report extends Basic
$m_report
=
new
OReportModel
();
$data
[
'code'
]
=
200
;
$data
[
'msg'
]
=
""
;
$where
=
[]
;
$where
[
"a.status"
]
=
0
;
if
(
!
empty
(
$this
->
params
[
'start_time'
])
&&
empty
(
$this
->
params
[
'end_time'
]))
{
$where
[
'a.create_time'
]
=
[
'> time'
,
$this
->
params
[
'start_time'
]
.
' 00:00:00'
];
}
...
...
application/model/OReportModel.php
View file @
575efd4a
...
...
@@ -646,34 +646,11 @@ class OReportModel extends Model
*/
public
function
getReportList
(
$pageNo
=
1
,
$pageSize
=
15
,
$order_
=
'a.id desc'
,
$field
=
''
,
$params
=
''
)
{
$where_
=
[];
if
(
isset
(
$params
[
"agent_id"
]))
{
$where_
[
"a.report_agent_id"
]
=
$params
[
"agent_id"
];
}
if
(
isset
(
$params
[
"create_time"
]))
{
$where_
[
"a.create_time"
]
=
$params
[
"create_time"
];
}
if
(
isset
(
$params
[
"house_ids"
]))
{
$where_
[
"b.house_id"
]
=
array
(
"in"
,
$params
[
"house_ids"
]
);
}
if
(
isset
(
$params
[
'report_agent_name'
]))
{
$where_
[
"a.report_agent_name"
]
=
$params
[
'report_agent_name'
];
}
if
(
isset
(
$params
[
'report_agent_phone'
]))
{
$where_
[
"a.report_agent_phone"
]
=
$params
[
'report_agent_phone'
];
}
if
(
isset
(
$params
[
'internal_title'
]))
{
$where_
[
"c.internal_title"
]
=
$params
[
'internal_title'
];
}
if
(
isset
(
$params
[
'user_phone'
]))
{
$where_
[
"a.user_phone"
]
=
$params
[
'user_phone'
];
}
$where_
[
"a.status"
]
=
0
;
$result
=
$this
->
db
->
field
(
$field
)
->
alias
(
"a"
)
->
join
(
"o_order b"
,
"a.id = b.f_id"
,
"left"
)
->
join
(
"g_houses c"
,
"b.house_id = c.id"
,
"left"
)
->
where
(
$
where_
)
->
where
(
$
params
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
order
(
$order_
)
...
...
@@ -689,33 +666,10 @@ class OReportModel extends Model
*/
public
function
getAddReportListTotal
(
$params
)
{
$where_
[
"a.status"
]
=
0
;
if
(
isset
(
$params
[
"agent_id"
]))
{
$where_
[
"a.report_agent_id"
]
=
$params
[
"agent_id"
];
}
if
(
isset
(
$params
[
"create_time"
]))
{
$where_
[
"a.create_time"
]
=
$params
[
"create_time"
];
}
if
(
isset
(
$params
[
"house_ids"
]))
{
$where_
[
"b.house_id"
]
=
array
(
"in"
,
$params
[
"house_ids"
]);
}
if
(
isset
(
$params
[
'report_agent_name'
]))
{
$where_
[
"a.report_agent_name"
]
=
$params
[
'report_agent_name'
];
}
if
(
isset
(
$params
[
'report_agent_phone'
]))
{
$where_
[
"a.report_agent_phone"
]
=
$params
[
'report_agent_phone'
];
}
if
(
isset
(
$params
[
'internal_title'
]))
{
$where_
[
"c.internal_title"
]
=
$params
[
'internal_title'
];
}
if
(
isset
(
$params
[
'user_phone'
]))
{
$where_
[
"a.user_phone"
]
=
$params
[
'user_phone'
];
}
return
$this
->
db
->
alias
(
"a"
)
->
join
(
"o_order b"
,
"a.id = b.f_id"
,
"left"
)
->
join
(
"g_houses c"
,
"b.house_id = c.id"
,
"left"
)
->
where
(
$
where_
)
->
where
(
$
params
)
->
count
(
'a.id'
);
}
...
...
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