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
2ae2b1d3
Commit
2ae2b1d3
authored
Dec 01, 2022
by
ma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
下载文件新增设备SN列
parent
d65e92dc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
2 deletions
+13
-2
ResourceVo.java
...rc/main/java/iot/sixiang/license/model/vo/ResourceVo.java
+3
-0
ResourceManager.java
...in/java/iot/sixiang/license/resource/ResourceManager.java
+9
-1
ResourceMapper.xml
license/src/main/resources/mapper/ResourceMapper.xml
+1
-1
No files found.
license/src/main/java/iot/sixiang/license/model/vo/ResourceVo.java
View file @
2ae2b1d3
...
@@ -28,6 +28,9 @@ public class ResourceVo {
...
@@ -28,6 +28,9 @@ public class ResourceVo {
@ApiModelProperty
(
"设备编号"
)
@ApiModelProperty
(
"设备编号"
)
private
String
sn
;
private
String
sn
;
@ApiModelProperty
(
"绑定的SN"
)
private
String
snBind
;
@ApiModelProperty
(
"设备状态"
)
@ApiModelProperty
(
"设备状态"
)
private
String
status
;
private
String
status
;
...
...
license/src/main/java/iot/sixiang/license/resource/ResourceManager.java
View file @
2ae2b1d3
...
@@ -83,6 +83,10 @@ public class ResourceManager {
...
@@ -83,6 +83,10 @@ public class ResourceManager {
cell
=
row
.
createCell
((
short
)
5
);
//第六个单元格
cell
=
row
.
createCell
((
short
)
5
);
//第六个单元格
cell
.
setCellValue
(
"状态"
);
cell
.
setCellValue
(
"状态"
);
cell
.
setCellStyle
(
styleRow
);
cell
.
setCellStyle
(
styleRow
);
cell
=
row
.
createCell
((
short
)
6
);
//第七个单元格
cell
.
setCellValue
(
"设备编码"
);
cell
.
setCellStyle
(
styleRow
);
//第五步插入数据
//第五步插入数据
List
<
ResourceVo
>
resourceList
=
resourceService
.
getResource
(
userId
);
List
<
ResourceVo
>
resourceList
=
resourceService
.
getResource
(
userId
);
for
(
int
i
=
0
;
i
<
resourceList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
resourceList
.
size
();
i
++)
{
...
@@ -114,9 +118,13 @@ public class ResourceManager {
...
@@ -114,9 +118,13 @@ public class ResourceManager {
cell
=
row
.
createCell
((
short
)
5
);
// 第六个单元格
cell
=
row
.
createCell
((
short
)
5
);
// 第六个单元格
cell
.
setCellValue
(
resourceVo
.
getStatus
());
cell
.
setCellValue
(
resourceVo
.
getStatus
());
cell
.
setCellStyle
(
style
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
((
short
)
6
);
// 第七个单元格
cell
.
setCellValue
(
resourceVo
.
getSnBind
());
cell
.
setCellStyle
(
style
);
}
}
//在填完所有值以后,对每一列设置自适应宽度
//在填完所有值以后,对每一列设置自适应宽度
for
(
int
n
=
0
;
n
<
6
;
n
++)
{
for
(
int
n
=
0
;
n
<
7
;
n
++)
{
sheet
.
autoSizeColumn
(
n
);
sheet
.
autoSizeColumn
(
n
);
}
}
wb
.
write
(
os
);
wb
.
write
(
os
);
...
...
license/src/main/resources/mapper/ResourceMapper.xml
View file @
2ae2b1d3
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<mapper
namespace=
"iot.sixiang.license.mapper.ResourceMapper"
>
<mapper
namespace=
"iot.sixiang.license.mapper.ResourceMapper"
>
<select
id=
"getResource"
resultType=
"iot.sixiang.license.model.vo.ResourceVo"
>
<select
id=
"getResource"
resultType=
"iot.sixiang.license.model.vo.ResourceVo"
>
SELECT a.user_name,a.password,a.company,b.app_name,b.app_key,c.sn, b.app_id,
SELECT a.user_name,a.password,a.company,b.app_name,b.app_key,c.sn,
c.sn_bind,
b.app_id,
(CASE c.`status` WHEN 1 THEN '已使用' WHEN 2 THEN '失效' ELSE '未使用' END) `status`
(CASE c.`status` WHEN 1 THEN '已使用' WHEN 2 THEN '失效' ELSE '未使用' END) `status`
FROM USER a, apply b, device c WHERE a.user_id = b.user_id
FROM USER a, apply b, device c WHERE a.user_id = b.user_id
AND b.app_id = c.app_id AND a.user_id = #{userId}
AND b.app_id = c.app_id AND a.user_id = #{userId}
...
...
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