Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
ioc_sixiang_license
Project
Project
Details
Activity
Releases
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
zengtianlai3
ioc_sixiang_license
Commits
40b5e282
Commit
40b5e282
authored
Jun 16, 2022
by
zengtianlai3
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
下载格式修改
parent
3d53b9e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
23 deletions
+15
-23
ResourceManager.java
...in/java/iot/sixiang/license/resource/ResourceManager.java
+15
-23
No files found.
license/src/main/java/iot/sixiang/license/resource/ResourceManager.java
View file @
40b5e282
...
...
@@ -50,27 +50,23 @@ public class ResourceManager {
//第四步创建单元格
HSSFCell
cell
=
row
.
createCell
((
short
)
0
);
//第一个单元格
cell
.
setCellValue
(
"用户"
);
//设定值
cell
.
setCellStyle
(
style
);
//内容居中
cell
=
row
.
createCell
((
short
)
1
);
//第二个单元格
cell
.
setCellValue
(
"密码"
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
((
short
)
2
);
//第三个单元格
cell
.
setCellValue
(
"公司名称"
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
((
short
)
3
);
//第四
个单元格
cell
=
row
.
createCell
((
short
)
1
);
//第二
个单元格
cell
.
setCellValue
(
"应用名称"
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
((
short
)
4
);
//第五个单元格
cell
.
setCellValue
(
"app
Key
"
);
cell
=
row
.
createCell
((
short
)
2
);
//第五个单元格
cell
.
setCellValue
(
"app
_id
"
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
((
short
)
5
);
//第六个单元格
cell
.
setCellValue
(
"SN"
);
cell
=
row
.
createCell
((
short
)
3
);
//第五个单元格
cell
.
setCellValue
(
"app_key"
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
((
short
)
4
);
//第六个单元格
cell
.
setCellValue
(
"sn"
);
cell
.
setCellStyle
(
style
);
//第五步插入数据
List
<
ResourceVo
>
resourceList
=
resourceService
.
getResource
(
userId
);
...
...
@@ -79,27 +75,24 @@ public class ResourceManager {
//创建行
row
=
sheet
.
createRow
((
short
)(
i
+
1
));
//创建单元格并且添加数据
cell
=
row
.
createCell
((
short
)
0
);
//第一个单元格
cell
.
setCellValue
(
resourceVo
.
getUserName
());
cell
=
row
.
createCell
((
short
)
0
);
// 第一个单元格
cell
.
setCellValue
(
resourceVo
.
getCompany
());
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
((
short
)
1
);
// 第二个单元格
cell
.
setCellValue
(
resourceVo
.
get
Password
());
cell
.
setCellValue
(
resourceVo
.
get
AppName
());
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
((
short
)
2
);
// 第三个单元格
cell
.
setCellValue
(
resourceVo
.
get
Compan
y
());
cell
.
setCellValue
(
resourceVo
.
get
AppKe
y
());
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
((
short
)
3
);
// 第四个单元格
cell
.
setCellValue
(
resourceVo
.
getAppName
());
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
((
short
)
4
);
// 第五个单元格
cell
.
setCellValue
(
resourceVo
.
getAppKey
());
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
((
short
)
5
);
// 第六
个单元格
cell
=
row
.
createCell
((
short
)
4
);
// 第五
个单元格
cell
.
setCellValue
(
resourceVo
.
getSn
());
cell
.
setCellStyle
(
style
);
}
...
...
@@ -108,7 +101,6 @@ public class ResourceManager {
sheet
.
autoSizeColumn
((
short
)
2
);
//调整第三列宽度
sheet
.
autoSizeColumn
((
short
)
3
);
//调整第四列宽度
sheet
.
autoSizeColumn
((
short
)
4
);
//调整第五列宽度
sheet
.
autoSizeColumn
((
short
)
5
);
//调整第六列宽度
wb
.
write
(
os
);
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
...
...
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