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
c93f38f0
Commit
c93f38f0
authored
Aug 01, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
成交报告导出
parent
213ef9b8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
6 deletions
+24
-6
Finance.php
application/index/controller/Finance.php
+12
-3
OfficeBargain.php
application/index/controller/OfficeBargain.php
+12
-3
No files found.
application/index/controller/Finance.php
View file @
c93f38f0
...
...
@@ -217,7 +217,7 @@ class Finance extends Basic
$order
=
'a.id DESC'
;
$where
[
'a.status'
]
=
10
;
$where
[
'a.audit_level'
]
=
0
;
$excel_title
.=
'-第
三
级审核'
;
$excel_title
.=
'-第
一
级审核'
;
}
if
(
!
empty
(
$this
->
params
[
'status'
]))
{
...
...
@@ -322,6 +322,7 @@ class Finance extends Basic
$data
[
'data'
][
'total_income_money'
]
=
0
;
}
}
else
{
$fields
.=
',e.role,e.agent_id'
;
$list_data
=
$this
->
m_bargain
->
getBargainList
(
1
,
50000
,
$order
,
$fields
,
$where
);
if
(
!
empty
(
$list_data
))
{
...
...
@@ -330,6 +331,7 @@ class Finance extends Basic
$trade_type_arr
=
[
10
=>
'出租 '
,
20
=>
'增佣'
,
30
=>
'代理'
,
40
=>
'好处费'
];
$redis
=
new
RedisCacheService
();
foreach
(
$list_data
as
$k
=>
$v
)
{
$excel_data
[
$k
][
'id'
]
=
$v
[
'id'
];
$excel_data
[
$k
][
'create_time'
]
=
$v
[
'create_time'
];
...
...
@@ -338,14 +340,21 @@ class Finance extends Basic
$excel_data
[
$k
][
'house_number'
]
=
$v
[
'house_number'
];
$excel_data
[
$k
][
'price'
]
=
$v
[
'price'
];
$excel_data
[
$k
][
'submit_agent_name'
]
=
$v
[
'submit_agent_name'
];
$excel_data
[
$k
][
'trade_type'
]
=
array_key_exists
(
$v
[
'trade_type'
],
$trade_type_arr
)
?
$trade_type_arr
[
$v
[
'
labels_id
'
]]
:
'其他'
;
$excel_data
[
$k
][
'trade_type'
]
=
array_key_exists
(
$v
[
'trade_type'
],
$trade_type_arr
)
?
$trade_type_arr
[
$v
[
'
trade_type
'
]]
:
'其他'
;
$excel_data
[
$k
][
'commission'
]
=
$v
[
'commission'
];
$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'
];
if
(
$v
[
'role'
]
==
3
)
{
$agent_data
=
$redis
->
getRedisCache
(
2
,
$v
[
'agent_id'
]);
$excel_data
[
$k
][
'agent_name'
]
=
$agent_data
[
'name'
];
}
else
{
$excel_data
[
$k
][
'agent_name'
]
=
''
;
}
}
$export
=
new
ExportExcelUntil
();
$title
=
[
'ID'
,
'提交时间'
,
'商铺地址'
,
'商铺号'
,
'成交价'
,
'提交人'
,
'成交类型'
,
'应收佣金(元)'
,
'已收佣金(元)'
,
'未收佣金(元)'
];
$title
=
[
'ID'
,
'提交时间'
,
'商铺地址'
,
'商铺号'
,
'成交价'
,
'提交人'
,
'成交类型'
,
'应收佣金(元)'
,
'已收佣金(元)'
,
'未收佣金(元)'
,
'反签方'
];
$export
->
exportTable
(
$excel_title
,
$excel_data
,
11
,
$excel_title
,
$title
);
}
}
...
...
application/index/controller/OfficeBargain.php
View file @
c93f38f0
...
...
@@ -197,7 +197,7 @@ class OfficeBargain extends Basic
$order
=
'a.id DESC'
;
$where
[
'a.status'
]
=
10
;
$where
[
'a.audit_level'
]
=
0
;
$excel_title
.=
'-第
三
级审核'
;
$excel_title
.=
'-第
一
级审核'
;
}
if
(
!
empty
(
$this
->
params
[
'status'
]))
{
...
...
@@ -302,6 +302,7 @@ class OfficeBargain extends Basic
$data
[
'data'
][
'total_income_money'
]
=
0
;
}
}
else
{
$fields
.=
',e.role,e.agent_id'
;
$list_data
=
$this
->
m_bargain
->
getBargainList
(
1
,
50000
,
$order
,
$fields
,
$where
);
if
(
!
empty
(
$list_data
))
{
...
...
@@ -310,6 +311,7 @@ class OfficeBargain extends Basic
$trade_type_arr
=
[
10
=>
'出租 '
,
20
=>
'增佣'
,
30
=>
'代理'
,
40
=>
'好处费'
];
$redis
=
new
RedisCacheService
();
foreach
(
$list_data
as
$k
=>
$v
)
{
$excel_data
[
$k
][
'id'
]
=
$v
[
'id'
];
$excel_data
[
$k
][
'create_time'
]
=
$v
[
'create_time'
];
...
...
@@ -318,14 +320,21 @@ class OfficeBargain extends Basic
$excel_data
[
$k
][
'house_number'
]
=
$v
[
'house_number'
];
$excel_data
[
$k
][
'price'
]
=
$v
[
'price'
];
$excel_data
[
$k
][
'submit_agent_name'
]
=
$v
[
'submit_agent_name'
];
$excel_data
[
$k
][
'trade_type'
]
=
array_key_exists
(
$v
[
'trade_type'
],
$trade_type_arr
)
?
$trade_type_arr
[
$v
[
'
labels_id
'
]]
:
'其他'
;
$excel_data
[
$k
][
'trade_type'
]
=
array_key_exists
(
$v
[
'trade_type'
],
$trade_type_arr
)
?
$trade_type_arr
[
$v
[
'
trade_type
'
]]
:
'其他'
;
$excel_data
[
$k
][
'commission'
]
=
$v
[
'commission'
];
$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'
];
if
(
$v
[
'role'
]
==
3
)
{
$agent_data
=
$redis
->
getRedisCache
(
2
,
$v
[
'agent_id'
]);
$excel_data
[
$k
][
'agent_name'
]
=
$agent_data
[
'name'
];
}
else
{
$excel_data
[
$k
][
'agent_name'
]
=
''
;
}
}
$export
=
new
ExportExcelUntil
();
$title
=
[
'ID'
,
'提交时间'
,
'商铺地址'
,
'商铺号'
,
'成交价'
,
'提交人'
,
'成交类型'
,
'应收佣金(元)'
,
'已收佣金(元)'
,
'未收佣金(元)'
];
$title
=
[
'ID'
,
'提交时间'
,
'商铺地址'
,
'商铺号'
,
'成交价'
,
'提交人'
,
'成交类型'
,
'应收佣金(元)'
,
'已收佣金(元)'
,
'未收佣金(元)'
,
'反签方'
];
$export
->
exportTable
(
$excel_title
,
$excel_data
,
11
,
$excel_title
,
$title
);
}
}
...
...
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