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
f7d6da66
Commit
f7d6da66
authored
Sep 17, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
成交报告搜索分佣方
parent
309fb6c1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
Finance.php
application/index/controller/Finance.php
+12
-4
No files found.
application/index/controller/Finance.php
View file @
f7d6da66
...
@@ -120,14 +120,18 @@ class Finance extends Basic
...
@@ -120,14 +120,18 @@ class Finance extends Basic
if
(
!
empty
(
$agent_where
))
{
if
(
!
empty
(
$agent_where
))
{
$m_agent
=
new
AAgents
();
$m_agent
=
new
AAgents
();
$where_bargain_id
=
$m_agent
->
agentBargainAll
(
'b.id'
,
$agent_where
);
$where_bargain_id
=
$m_agent
->
agentBargainAll
(
'b.id
,b.father_id
'
,
$agent_where
);
if
(
empty
(
$where_bargain_id
))
{
if
(
empty
(
$where_bargain_id
))
{
return
$this
->
response
(
200
,
''
);
return
$this
->
response
(
200
,
''
);
}
else
{
}
else
{
$where_id
=
[];
$where_id
=
[];
foreach
(
$where_bargain_id
as
$k
=>
$v
)
{
foreach
(
$where_bargain_id
as
$k
=>
$v
)
{
$where_id
[]
=
$v
[
'id'
];
if
(
$v
[
'father_id'
]
==
0
)
{
$where_id
[]
=
$v
[
'id'
];
}
else
{
$where_id
[]
=
$v
[
'father_id'
];
}
}
}
$where
[
'a.id'
]
=
[
'in'
,
$where_id
];
$where
[
'a.id'
]
=
[
'in'
,
$where_id
];
}
}
...
@@ -136,14 +140,18 @@ class Finance extends Basic
...
@@ -136,14 +140,18 @@ class Finance extends Basic
//分佣方姓名
//分佣方姓名
if
(
!
empty
(
$this
->
params
[
'partial_id'
]))
{
if
(
!
empty
(
$this
->
params
[
'partial_id'
]))
{
$m_agent
=
new
AAgents
();
$m_agent
=
new
AAgents
();
$where_bargain_id
=
$m_agent
->
agentBargainAll
(
'b.id'
,
[
'a.id'
=>
$this
->
params
[
'partial_id'
]
]);
$where_bargain_id
=
$m_agent
->
agentBargainAll
(
'b.id
,b.father_id
'
,
[
'a.id'
=>
$this
->
params
[
'partial_id'
]
]);
if
(
empty
(
$where_bargain_id
))
{
if
(
empty
(
$where_bargain_id
))
{
return
$this
->
response
(
200
,
''
);
return
$this
->
response
(
200
,
''
);
}
else
{
}
else
{
$where_id
=
[];
$where_id
=
[];
foreach
(
$where_bargain_id
as
$k
=>
$v
)
{
foreach
(
$where_bargain_id
as
$k
=>
$v
)
{
$where_id
[]
=
$v
[
'id'
];
if
(
$v
[
'father_id'
]
==
0
)
{
$where_id
[]
=
$v
[
'id'
];
}
else
{
$where_id
[]
=
$v
[
'father_id'
];
}
}
}
$where
[
'a.id'
]
=
[
'in'
,
$where_id
];
$where
[
'a.id'
]
=
[
'in'
,
$where_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