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
5a4f9b6a
Commit
5a4f9b6a
authored
Aug 07, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
name
parent
361f0663
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
10 deletions
+14
-10
Finance.php
application/index/controller/Finance.php
+7
-5
OfficeBargain.php
application/index/controller/OfficeBargain.php
+7
-5
No files found.
application/index/controller/Finance.php
View file @
5a4f9b6a
...
@@ -323,7 +323,6 @@ class Finance extends Basic
...
@@ -323,7 +323,6 @@ class Finance extends Basic
$data
[
'data'
][
'total_income_money'
]
=
0
;
$data
[
'data'
][
'total_income_money'
]
=
0
;
}
}
}
else
{
}
else
{
$fields
.=
',e.role,e.agent_id'
;
$list_data
=
$this
->
m_bargain
->
getBargainList
(
1
,
50000
,
$order
,
$fields
,
$where
);
$list_data
=
$this
->
m_bargain
->
getBargainList
(
1
,
50000
,
$order
,
$fields
,
$where
);
if
(
!
empty
(
$list_data
))
{
if
(
!
empty
(
$list_data
))
{
...
@@ -332,7 +331,6 @@ class Finance extends Basic
...
@@ -332,7 +331,6 @@ class Finance extends Basic
$trade_type_arr
=
[
$trade_type_arr
=
[
10
=>
'出租 '
,
20
=>
'增佣'
,
30
=>
'代理'
,
40
=>
'好处费'
10
=>
'出租 '
,
20
=>
'增佣'
,
30
=>
'代理'
,
40
=>
'好处费'
];
];
$redis
=
new
RedisCacheService
();
foreach
(
$list_data
as
$k
=>
$v
)
{
foreach
(
$list_data
as
$k
=>
$v
)
{
$excel_data
[
$k
][
'id'
]
=
$v
[
'id'
];
$excel_data
[
$k
][
'id'
]
=
$v
[
'id'
];
$excel_data
[
$k
][
'create_time'
]
=
$v
[
'create_time'
];
$excel_data
[
$k
][
'create_time'
]
=
$v
[
'create_time'
];
...
@@ -347,9 +345,13 @@ class Finance extends Basic
...
@@ -347,9 +345,13 @@ class Finance extends Basic
$excel_data
[
$k
][
'income_money'
]
=
$m_real
->
sumField
(
'money'
,[
'bargain_id'
=>
$v
[
'id'
],
'is_del'
=>
0
]);
$excel_data
[
$k
][
'income_money'
]
=
$m_real
->
sumField
(
'money'
,[
'bargain_id'
=>
$v
[
'id'
],
'is_del'
=>
0
]);
$excel_data
[
$k
][
'subtract'
]
=
$v
[
'commission'
]
-
$excel_data
[
$k
][
'income_money'
];
$excel_data
[
$k
][
'subtract'
]
=
$v
[
'commission'
]
-
$excel_data
[
$k
][
'income_money'
];
if
(
$v
[
'role'
]
==
3
)
{
$agent_data
=
$this
->
m_bargain
->
agentBargainAll
(
'b.name'
,
[
'a.id'
=>
$v
[
'id'
],
'a.status'
=>
[
'<>'
,
30
]]);
$agent_data
=
$redis
->
getRedisCache
(
2
,
$v
[
'agent_id'
]);
if
(
$agent_data
)
{
$excel_data
[
$k
][
'agent_name'
]
=
$agent_data
[
'name'
];
$name_string
=
''
;
foreach
(
$agent_data
as
$vv
)
{
$name_string
.=
$vv
[
'name'
]
.
','
;
}
$excel_data
[
$k
][
'agent_name'
]
=
rtrim
(
$name_string
,
','
);
}
else
{
}
else
{
$excel_data
[
$k
][
'agent_name'
]
=
''
;
$excel_data
[
$k
][
'agent_name'
]
=
''
;
}
}
...
...
application/index/controller/OfficeBargain.php
View file @
5a4f9b6a
...
@@ -302,7 +302,6 @@ class OfficeBargain extends Basic
...
@@ -302,7 +302,6 @@ class OfficeBargain extends Basic
$data
[
'data'
][
'total_income_money'
]
=
0
;
$data
[
'data'
][
'total_income_money'
]
=
0
;
}
}
}
else
{
}
else
{
$fields
.=
',e.role,e.agent_id'
;
$list_data
=
$this
->
m_bargain
->
getBargainList
(
1
,
50000
,
$order
,
$fields
,
$where
);
$list_data
=
$this
->
m_bargain
->
getBargainList
(
1
,
50000
,
$order
,
$fields
,
$where
);
if
(
!
empty
(
$list_data
))
{
if
(
!
empty
(
$list_data
))
{
...
@@ -311,7 +310,6 @@ class OfficeBargain extends Basic
...
@@ -311,7 +310,6 @@ class OfficeBargain extends Basic
$trade_type_arr
=
[
$trade_type_arr
=
[
10
=>
'出租 '
,
20
=>
'增佣'
,
30
=>
'代理'
,
40
=>
'好处费'
10
=>
'出租 '
,
20
=>
'增佣'
,
30
=>
'代理'
,
40
=>
'好处费'
];
];
$redis
=
new
RedisCacheService
();
foreach
(
$list_data
as
$k
=>
$v
)
{
foreach
(
$list_data
as
$k
=>
$v
)
{
$excel_data
[
$k
][
'id'
]
=
$v
[
'id'
];
$excel_data
[
$k
][
'id'
]
=
$v
[
'id'
];
$excel_data
[
$k
][
'create_time'
]
=
$v
[
'create_time'
];
$excel_data
[
$k
][
'create_time'
]
=
$v
[
'create_time'
];
...
@@ -326,9 +324,13 @@ class OfficeBargain extends Basic
...
@@ -326,9 +324,13 @@ class OfficeBargain extends Basic
$excel_data
[
$k
][
'income_money'
]
=
$m_real
->
sumField
(
'money'
,[
'bargain_id'
=>
$v
[
'id'
],
'is_del'
=>
0
]);
$excel_data
[
$k
][
'income_money'
]
=
$m_real
->
sumField
(
'money'
,[
'bargain_id'
=>
$v
[
'id'
],
'is_del'
=>
0
]);
$excel_data
[
$k
][
'subtract'
]
=
$v
[
'commission'
]
-
$excel_data
[
$k
][
'income_money'
];
$excel_data
[
$k
][
'subtract'
]
=
$v
[
'commission'
]
-
$excel_data
[
$k
][
'income_money'
];
if
(
$v
[
'role'
]
==
3
)
{
$agent_data
=
$this
->
m_bargain
->
agentBargainAll
(
'b.name'
,
[
'a.id'
=>
$v
[
'id'
],
'a.status'
=>
[
'<>'
,
30
]]);
$agent_data
=
$redis
->
getRedisCache
(
2
,
$v
[
'agent_id'
]);
if
(
$agent_data
)
{
$excel_data
[
$k
][
'agent_name'
]
=
$agent_data
[
'name'
];
$name_string
=
''
;
foreach
(
$agent_data
as
$vv
)
{
$name_string
.=
$vv
[
'name'
]
.
','
;
}
$excel_data
[
$k
][
'agent_name'
]
=
rtrim
(
$name_string
,
','
);
}
else
{
}
else
{
$excel_data
[
$k
][
'agent_name'
]
=
''
;
$excel_data
[
$k
][
'agent_name'
]
=
''
;
}
}
...
...
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