Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-trialdrive-admin
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 7615b4b6
authored
Oct 20, 2023
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1.25.0 围栏导出增加围栏类型字段
1 parent
b2f93072
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
1 deletions
src/main/java/cn/com/glsx/admin/common/enums/TypeConverseEnum.java
src/main/java/cn/com/glsx/admin/modules/service/ElectricFenceService.java
src/main/java/cn/com/glsx/admin/common/enums/TypeConverseEnum.java
View file @
7615b4b
...
@@ -420,4 +420,37 @@ public class TypeConverseEnum {
...
@@ -420,4 +420,37 @@ public class TypeConverseEnum {
return
userTypeStr
;
return
userTypeStr
;
}
}
}
}
/**
* 设备有源无源枚举类
*/
public
enum
FenceSourceStatusEnum
{
NO_SOURCE
(
0
,
"无线设备围栏"
),
HAS_SOURCE
(
1
,
"有线设备围栏"
);
private
final
Integer
sourceType
;
private
final
String
sourceTypeStr
;
FenceSourceStatusEnum
(
Integer
sourceType
,
String
sourceTypeStr
)
{
this
.
sourceType
=
sourceType
;
this
.
sourceTypeStr
=
sourceTypeStr
;
}
public
static
String
getStrBySourceType
(
Integer
sourceType
)
{
for
(
FenceSourceStatusEnum
sourceStatusEnum
:
FenceSourceStatusEnum
.
values
())
{
if
(
sourceStatusEnum
.
getSourceType
().
equals
(
sourceType
))
{
return
sourceStatusEnum
.
getSourceTypeStr
();
}
}
return
null
;
}
public
Integer
getSourceType
()
{
return
sourceType
;
}
public
String
getSourceTypeStr
()
{
return
sourceTypeStr
;
}
}
}
}
src/main/java/cn/com/glsx/admin/modules/service/ElectricFenceService.java
View file @
7615b4b
...
@@ -83,7 +83,7 @@ public class ElectricFenceService {
...
@@ -83,7 +83,7 @@ public class ElectricFenceService {
List
<
ElectricFenceExport
>
list
=
electricFenceMapper
.
export
(
search
);
List
<
ElectricFenceExport
>
list
=
electricFenceMapper
.
export
(
search
);
list
.
forEach
(
index
->
{
list
.
forEach
(
index
->
{
index
.
setTriggerType
(
FenceTriggerTypeEnum
.
getDescByCode
(
Integer
.
valueOf
(
index
.
getTriggerType
())));
index
.
setTriggerType
(
FenceTriggerTypeEnum
.
getDescByCode
(
Integer
.
valueOf
(
index
.
getTriggerType
())));
index
.
setSourceStr
(
TypeConverseEnum
.
Source
Enum
.
getStrBySourceType
(
index
.
getSource
()));
index
.
setSourceStr
(
TypeConverseEnum
.
FenceSourceStatus
Enum
.
getStrBySourceType
(
index
.
getSource
()));
});
});
return
list
;
return
list
;
}
}
...
...
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