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
1d9e1c51
Commit
1d9e1c51
authored
Jul 27, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
成交报告-增加搜索条件-表别名
parent
2dcacb31
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
Finance.php
application/index/controller/Finance.php
+4
-4
OBargainModel.php
application/model/OBargainModel.php
+4
-4
No files found.
application/index/controller/Finance.php
View file @
1d9e1c51
...
...
@@ -101,19 +101,19 @@ class Finance extends Basic
}
if
(
!
empty
(
$this
->
params
[
'district_id'
]))
{
$where
[
'
e
.district_id'
]
=
$this
->
params
[
'district_id'
];
$where
[
'
f
.district_id'
]
=
$this
->
params
[
'district_id'
];
}
if
(
!
empty
(
$this
->
params
[
'store_id'
]))
{
$where
[
'
e
.store_id'
]
=
$this
->
params
[
'store_id'
];
$where
[
'
f
.store_id'
]
=
$this
->
params
[
'store_id'
];
}
if
(
!
empty
(
$this
->
params
[
'agent_phone'
]))
{
$where
[
'
e
.phone'
]
=
[
'LIKE'
,
'%'
.
$this
->
params
[
'agent_phone'
]
.
'%'
];
$where
[
'
f
.phone'
]
=
[
'LIKE'
,
'%'
.
$this
->
params
[
'agent_phone'
]
.
'%'
];
}
if
(
!
empty
(
$this
->
params
[
'agent_name'
]))
{
$where
[
'
e
.name'
]
=
[
'LIKE'
,
'%'
.
$this
->
params
[
'agent_name'
]
.
'%'
];
$where
[
'
f
.name'
]
=
[
'LIKE'
,
'%'
.
$this
->
params
[
'agent_name'
]
.
'%'
];
}
switch
(
$check_status
)
{
...
...
application/model/OBargainModel.php
View file @
1d9e1c51
...
...
@@ -352,7 +352,7 @@ class OBargainModel extends Model
->
join
(
'o_report b'
,
'a.report_id = b.id'
,
'left'
)
->
join
(
'o_order c'
,
'a.order_id = c.id'
,
'left'
)
->
join
(
'g_houses d'
,
'c.house_id = d.id'
,
'left'
)
->
join
(
'a_agents
e'
,
'b.report_agent_id=e
.id'
,
'left'
)
->
join
(
'a_agents
f'
,
'b.report_agent_id=f
.id'
,
'left'
)
->
where
(
$params
)
->
having
(
'count(e.order_id) = 1'
)
->
order
(
$order_
)
...
...
@@ -365,7 +365,7 @@ class OBargainModel extends Model
->
join
(
'o_report b'
,
'a.report_id = b.id'
,
'left'
)
->
join
(
'o_order c'
,
'a.order_id = c.id'
,
'left'
)
->
join
(
'g_houses d'
,
'c.house_id = d.id'
,
'left'
)
->
join
(
'a_agents
e'
,
'b.report_agent_id=e
.id'
,
'left'
)
->
join
(
'a_agents
f'
,
'b.report_agent_id=f
.id'
,
'left'
)
->
where
(
$params
)
->
group
(
'a.id'
)
->
order
(
$order_
)
...
...
@@ -412,7 +412,7 @@ class OBargainModel extends Model
->
join
(
'o_report b'
,
'a.report_id = b.id'
,
'left'
)
->
join
(
'o_order c'
,
'a.order_id = c.id'
,
'left'
)
->
join
(
'g_houses d'
,
'c.house_id = d.id'
,
'left'
)
->
join
(
'a_agents
e'
,
'b.report_agent_id=e
.id'
,
'left'
)
->
join
(
'a_agents
f'
,
'b.report_agent_id=f
.id'
,
'left'
)
->
where
(
$params
)
->
having
(
'count(e.order_id) = 1'
)
->
group
(
'e.order_id'
)
...
...
@@ -422,7 +422,7 @@ class OBargainModel extends Model
->
join
(
'o_report b'
,
'a.report_id = b.id'
,
'left'
)
->
join
(
'o_order c'
,
'a.order_id = c.id'
,
'left'
)
->
join
(
'g_houses d'
,
'c.house_id = d.id'
,
'left'
)
->
join
(
'a_agents
e'
,
'b.report_agent_id=e
.id'
,
'left'
)
->
join
(
'a_agents
f'
,
'b.report_agent_id=f
.id'
,
'left'
)
->
where
(
$params
)
->
group
(
'a.id'
)
->
count
();
...
...
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