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
f9c2975c
Commit
f9c2975c
authored
Aug 21, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数组分页
parent
57b09f4f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
15 deletions
+13
-15
Broker.php
application/index/controller/Broker.php
+13
-15
No files found.
application/index/controller/Broker.php
View file @
f9c2975c
...
...
@@ -443,24 +443,22 @@ class Broker extends Basic
unset
(
$list
);
if
(
isset
(
$key_array
))
{
$total
=
count
(
$key_array
);
$max
=
400
;
$size
=
300
;;
$page_total
=
ceil
(
$total
/
$size
);
$m_bank
=
new
AAgentsBank
();
$bank_field
=
'agent_id,account,bank,card_no,id_card'
;
for
(
$i
=
0
;
$i
<
$total
;
$i
++
)
{
$id_string
[]
=
$key_array
[
$i
];
if
(
$i
==
$max
)
{
$max
+=
400
;
$bank_data
=
$m_bank
->
getDataAll
(
$bank_field
,
[
'agent_id'
=>
[
'in'
,
$id_string
],
'is_del'
=>
0
]);
foreach
(
$bank_data
as
$v2
)
{
$key
=
$v2
[
'agent_id'
];
$excel_data
[
$key
][
'id_card'
]
=
$v2
[
'id_card'
];
$excel_data
[
$key
][
'account'
]
=
$v2
[
'account'
];
$excel_data
[
$key
][
'card_no'
]
=
$v2
[
'card_no'
];
$excel_data
[
$key
][
'bank'
]
=
$v2
[
'bank'
];
}
unset
(
$id_string
);
unset
(
$bank_data
);
for
(
$i
=
0
;
$i
<
$page_total
;
$i
++
)
{
$id_array
=
array_slice
(
$key_array
,
$i
*
$size
,
$size
);
$bank_data
=
$m_bank
->
getDataAll
(
$bank_field
,
[
'agent_id'
=>
[
'in'
,
$id_array
],
'is_del'
=>
0
]);
foreach
(
$bank_data
as
$v2
)
{
$key
=
$v2
[
'agent_id'
];
$excel_data
[
$key
][
'id_card'
]
=
"
\t
"
.
$v2
[
'id_card'
];
$excel_data
[
$key
][
'account'
]
=
$v2
[
'account'
];
$excel_data
[
$key
][
'card_no'
]
=
$v2
[
'card_no'
];
$excel_data
[
$key
][
'bank'
]
=
$v2
[
'bank'
];
}
unset
(
$id_string
);
unset
(
$bank_data
);
}
}
$export
=
new
ExportExcelUntil
();
...
...
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