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
73399ef3
Commit
73399ef3
authored
Oct 16, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
实收明细分佣列表修改
parent
4fa680d0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
53 deletions
+7
-53
Finance.php
application/index/controller/Finance.php
+6
-53
OPartialCommission.php
application/model/OPartialCommission.php
+1
-0
No files found.
application/index/controller/Finance.php
View file @
73399ef3
...
...
@@ -701,39 +701,15 @@ class Finance extends Basic
$where
[
'a.is_del'
]
=
$select
=
0
;
if
(
!
empty
(
$this
->
params
[
'create_time'
])
&&
empty
(
$this
->
params
[
'end_time'
]))
{
$
income_where
[
'
income_time'
]
=
[
'>= time'
,
$this
->
params
[
'create_time'
]
.
' 00:00:00'
];
$
where
[
'f.
income_time'
]
=
[
'>= time'
,
$this
->
params
[
'create_time'
]
.
' 00:00:00'
];
}
if
(
!
empty
(
$this
->
params
[
'end_time'
])
&&
empty
(
$this
->
params
[
'create_time'
]))
{
$
income_where
[
'
income_time'
]
=
[
'<= time'
,
$this
->
params
[
'end_time'
]
.
' 23:59:59'
];
$
where
[
'f.
income_time'
]
=
[
'<= time'
,
$this
->
params
[
'end_time'
]
.
' 23:59:59'
];
}
if
(
!
empty
(
$this
->
params
[
'end_time'
])
&&
!
empty
(
$this
->
params
[
'create_time'
]))
{
$income_where
[
'income_time'
]
=
[
'between time'
,
[
$this
->
params
[
'create_time'
]
.
' 00:00:00'
,
$this
->
params
[
'end_time'
]
.
' 23:59:59'
]
];
}
if
(
!
empty
(
$income_where
))
{
$m_real
=
new
ORealIncome
();
$bargain_arr
=
$m_real
->
getRealIncomeBargain
(
'bargain_id'
,
$income_where
);
if
(
$bargain_arr
[
'status'
]
==
'successful'
)
{
if
(
empty
(
$bargain_arr
[
'data'
]))
{
return
$this
->
response
(
200
,
''
);
}
foreach
(
$bargain_arr
[
'data'
]
as
$v
)
{
$bargain_id
[]
=
$v
[
'bargain_id'
];
}
if
(
!
empty
(
$bargain_id
))
{
$bargain_id_string
=
implode
(
','
,
$bargain_id
);
$where
[]
=
[
'EXP'
,
'b.id in ('
.
$bargain_id_string
.
') or b.father_id in ('
.
$bargain_id_string
.
')'
];
}
$select
=
1
;
}
else
{
return
$this
->
response
(
101
,
'内部错误:'
.
$bargain_arr
[
'msg'
]);
}
$where
[
'f.income_time'
]
=
[
'between time'
,
[
$this
->
params
[
'create_time'
]
.
' 00:00:00'
,
$this
->
params
[
'end_time'
]
.
' 23:59:59'
]
];
}
if
(
!
empty
(
$this
->
params
[
'internal_address'
]))
{
...
...
@@ -799,38 +775,15 @@ class Finance extends Basic
$where
[
'a.confirm_status'
]
=
1
;
$where
[
'a.is_del'
]
=
0
;
if
(
!
empty
(
$this
->
params
[
'create_time'
])
&&
empty
(
$this
->
params
[
'end_time'
]))
{
$
income_where
[
'
income_time'
]
=
[
'>= time'
,
$this
->
params
[
'create_time'
]
.
' 00:00:00'
];
$
where
[
'f.
income_time'
]
=
[
'>= time'
,
$this
->
params
[
'create_time'
]
.
' 00:00:00'
];
}
if
(
!
empty
(
$this
->
params
[
'end_time'
])
&&
empty
(
$this
->
params
[
'create_time'
]))
{
$
income_where
[
'
income_time'
]
=
[
'<= time'
,
$this
->
params
[
'end_time'
]
.
' 23:59:59'
];
$
where
[
'f.
income_time'
]
=
[
'<= time'
,
$this
->
params
[
'end_time'
]
.
' 23:59:59'
];
}
if
(
!
empty
(
$this
->
params
[
'end_time'
])
&&
!
empty
(
$this
->
params
[
'create_time'
]))
{
$income_where
[
'income_time'
]
=
[
'between time'
,
[
$this
->
params
[
'create_time'
]
.
' 00:00:00'
,
$this
->
params
[
'end_time'
]
.
' 23:59:59'
]
];
}
if
(
!
empty
(
$income_where
))
{
$m_real
=
new
ORealIncome
();
$bargain_arr
=
$m_real
->
getRealIncomeBargain
(
'bargain_id'
,
$income_where
);
if
(
$bargain_arr
[
'status'
]
==
'successful'
)
{
if
(
empty
(
$bargain_arr
[
'data'
]))
{
return
$this
->
response
(
200
,
''
);
}
foreach
(
$bargain_arr
[
'data'
]
as
$v
)
{
$bargain_id
[]
=
$v
[
'bargain_id'
];
}
if
(
!
empty
(
$bargain_id
))
{
$bargain_id_string
=
implode
(
','
,
$bargain_id
);
$where
[]
=
[
'EXP'
,
'b.id in ('
.
$bargain_id_string
.
') or b.father_id in ('
.
$bargain_id_string
.
')'
];
}
}
else
{
return
$this
->
response
(
101
,
'内部错误:'
.
$bargain_arr
[
'msg'
]);
}
$where
[
'f.income_time'
]
=
[
'between time'
,
[
$this
->
params
[
'create_time'
]
.
' 00:00:00'
,
$this
->
params
[
'end_time'
]
.
' 23:59:59'
]
];
}
if
(
!
empty
(
$this
->
params
[
'internal_address'
]))
{
...
...
application/model/OPartialCommission.php
View file @
73399ef3
...
...
@@ -119,6 +119,7 @@ class OPartialCommission extends BaseModel
->
join
(
'o_order c'
,
'b.order_id = c.id'
,
'left'
)
->
join
(
'g_houses d'
,
'c.house_id = d.id'
,
'left'
)
->
join
(
'a_agents e'
,
'b.agent_id = e.id'
,
'left'
)
->
join
(
'o_real_income f'
,
'a.real_income_id = f.id'
,
'left'
)
->
where
(
$where
)
->
order
(
$order_
)
->
limit
(
$pageSize
)
...
...
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