Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-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 57438801
authored
May 17, 2021
by
刘宇峰
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
新e盾业务管理系统后台-围栏
1 parent
41af67b4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
5 deletions
src/main/java/cn/com/glsx/admin/modules/controller/ElectricFenceController.java
src/main/java/cn/com/glsx/admin/modules/service/ElectricFenceService.java
src/main/java/cn/com/glsx/admin/modules/controller/ElectricFenceController.java
View file @
5743880
package
cn
.
com
.
glsx
.
admin
.
modules
.
controller
;
package
cn
.
com
.
glsx
.
admin
.
modules
.
controller
;
import
cn.com.glsx.admin.modules.model.ElectricFenceBO
;
import
com.glsx.plat.common.annotation.SysLog
;
import
com.glsx.plat.core.web.R
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.
web.bind.annotation.RequestMapping
;
import
org.springframework.
validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.
RestController
;
import
org.springframework.web.bind.annotation.
*
;
@Slf4j
@Slf4j
@RestController
@RestController
@RequestMapping
(
value
=
"/fence"
)
@RequestMapping
(
value
=
"/fence"
)
public
class
ElectricFenceController
{
public
class
ElectricFenceController
{
/**
* 新增围栏
*
* @param fenceBO
* @return
*/
@SysLog
(
"新增围栏"
)
@PostMapping
(
value
=
"/add"
)
public
R
add
(
@RequestBody
@Validated
ElectricFenceBO
fenceBO
)
{
return
R
.
ok
();
}
/**
* 编辑围栏
*
* @param fenceBO
* @return
*/
@SysLog
(
"编辑围栏"
)
@PostMapping
(
value
=
"/edit"
)
public
R
edit
(
@RequestBody
@Validated
ElectricFenceBO
fenceBO
)
{
return
R
.
ok
();
}
/**
* 围栏详情
*
* @param fenceId
* @return
*/
@GetMapping
(
value
=
"/info"
)
public
R
info
(
@RequestParam
(
"fenceId"
)
Long
fenceId
)
{
return
R
.
ok
();
}
/**
* 删除围栏
*
* @param fenceId
* @return
*/
@SysLog
(
"删除围栏"
)
@GetMapping
(
value
=
"/delete"
)
public
R
delete
(
@RequestParam
(
"fenceId"
)
Long
fenceId
)
{
return
R
.
ok
();
}
}
}
src/main/java/cn/com/glsx/admin/modules/service/ElectricFenceService.java
View file @
5743880
...
@@ -38,8 +38,7 @@ public class ElectricFenceService {
...
@@ -38,8 +38,7 @@ public class ElectricFenceService {
//设置定位信息类型为gps类型 默认都是创建gps类型围栏
//设置定位信息类型为gps类型 默认都是创建gps类型围栏
fence
.
setLocationType
(
fenceBO
.
getLocationType
()
==
null
?
1
:
fenceBO
.
getLocationType
());
fence
.
setLocationType
(
fenceBO
.
getLocationType
()
==
null
?
1
:
fenceBO
.
getLocationType
());
fence
.
setRecord
(
"操作时间:"
+
DateUtils
.
formatNormal
(
new
Date
())
fence
.
setRecord
(
"操作时间:"
+
DateUtils
.
formatNormal
(
new
Date
())
+
" 操作人:"
+
" 操作人:"
+
ShieldContextHolder
.
getAccount
()
+
"("
+
ShieldContextHolder
.
getUserId
()
+
")"
+
ShieldContextHolder
.
getAccount
()
+
"("
+
ShieldContextHolder
.
getUserId
()
+
")"
+
"<br/>"
);
+
"<br/>"
);
fence
.
setCreatedBy
(
ShieldContextHolder
.
getUserId
());
fence
.
setCreatedBy
(
ShieldContextHolder
.
getUserId
());
fence
.
setCreatedDate
(
new
Date
());
fence
.
setCreatedDate
(
new
Date
());
...
@@ -79,7 +78,7 @@ public class ElectricFenceService {
...
@@ -79,7 +78,7 @@ public class ElectricFenceService {
fence
.
setBizFenceType
(
fenceBO
.
getBizFenceType
()
==
null
?
localFence
.
getBizFenceType
()
:
fenceBO
.
getBizFenceType
());
fence
.
setBizFenceType
(
fenceBO
.
getBizFenceType
()
==
null
?
localFence
.
getBizFenceType
()
:
fenceBO
.
getBizFenceType
());
fence
.
setLocationType
(
fenceBO
.
getLocationType
()
==
null
?
localFence
.
getLocationType
()
:
fenceBO
.
getLocationType
());
fence
.
setLocationType
(
fenceBO
.
getLocationType
()
==
null
?
localFence
.
getLocationType
()
:
fenceBO
.
getLocationType
());
fence
.
setRecord
(
localFence
.
getRecord
()
+
"操作时间:"
+
DateUtils
.
formatNormal
(
new
Date
())
fence
.
setRecord
(
localFence
.
getRecord
()
+
"操作时间:"
+
DateUtils
.
formatNormal
(
new
Date
())
+
ShieldContextHolder
.
getAccount
()
+
"("
+
ShieldContextHolder
.
getUserId
()
+
")"
+
" 操作人:"
+
ShieldContextHolder
.
getAccount
()
+
"("
+
ShieldContextHolder
.
getUserId
()
+
")"
+
"<br/>"
);
+
"<br/>"
);
fence
.
setStartTime
(
fenceBO
.
getStartTime
());
fence
.
setStartTime
(
fenceBO
.
getStartTime
());
fence
.
setEndTime
(
fenceBO
.
getEndTime
());
fence
.
setEndTime
(
fenceBO
.
getEndTime
());
...
...
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