Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
open-source
/
rpc-openplatform
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit d4b664fa
authored
Jan 05, 2021
by
111-PC\111
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]设备导入
1 parent
e9e0ccf5
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
7 deletions
rpc-openplatform-api/src/main/java/cn/com/glsx/openplatform/service/DeviceMgrService.java
rpc-openplatform-api/src/main/java/cn/com/glsx/openplatform/vo/DeviceImportVo.java
rpc-openplatform-container/src/main/java/cn/com/glsx/openplatform/service/DeviceMgrServiceImpl.java
rpc-openplatform-api/src/main/java/cn/com/glsx/openplatform/service/DeviceMgrService.java
View file @
d4b664f
...
...
@@ -62,5 +62,5 @@ public interface DeviceMgrService {
* @param list 入参
* @return
*/
Map
<
String
,
Object
>
importDevice
(
Collection
<
DeviceImportVo
>
list
);
Map
<
String
,
Object
>
importDevice
(
List
<
DeviceImportVo
>
list
);
}
rpc-openplatform-api/src/main/java/cn/com/glsx/openplatform/vo/DeviceImportVo.java
View file @
d4b664f
package
cn
.
com
.
glsx
.
openplatform
.
vo
;
import
com.glsx.excel.poi.Version
;
import
com.glsx.excel.poi.annotation.ExcelColumn
;
import
com.glsx.excel.poi.annotation.ExcelExport
;
import
com.glsx.excel.poi.annotation.ExcelImport
;
import
com.glsx.poi.util.ExcelAnnotation
;
import
java.io.Serializable
;
...
...
@@ -8,15 +12,17 @@ import java.io.Serializable;
* @author zhouhaibao
* @date 2021/1/5 9:57
*/
@ExcelExport
(
version
=
Version
.
EXCEL2007
,
autoWidth
=
false
)
@ExcelImport
(
startRow
=
1
)
public
class
DeviceImportVo
implements
Serializable
{
@Excel
Annotation
(
"SN"
)
@Excel
Column
(
value
=
"SN"
,
index
=
0
)
private
String
deviceSn
;
@ExcelAnnotation
(
"类型"
)
private
String
deviceType
;
@ExcelAnnotation
(
"客户"
)
@ExcelColumn
(
value
=
"客户"
,
index
=
1
)
private
String
customerName
;
@ExcelAnnotation
(
"版本号"
)
@ExcelColumn
(
value
=
"类型"
,
index
=
2
)
private
String
deviceType
;
@ExcelColumn
(
value
=
"版本号"
,
index
=
3
)
private
String
version
;
private
Integer
customerId
;
...
...
rpc-openplatform-container/src/main/java/cn/com/glsx/openplatform/service/DeviceMgrServiceImpl.java
View file @
d4b664f
...
...
@@ -74,7 +74,7 @@ public class DeviceMgrServiceImpl implements DeviceMgrService {
}
@Override
public
Map
<
String
,
Object
>
importDevice
(
Collection
<
DeviceImportVo
>
list
)
{
public
Map
<
String
,
Object
>
importDevice
(
List
<
DeviceImportVo
>
list
)
{
Map
<
String
,
Object
>
objectMap
=
new
HashMap
<>();
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
checkDevice
(
list
,
objectMap
);
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment