Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
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
项目统一框架
amos-boot-biz
Commits
ad96e8c6
Commit
ad96e8c6
authored
Sep 18, 2021
by
kongfm
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer' into developer
parents
d07d10ca
8e463fc1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
25 deletions
+22
-25
KeySiteController.java
.../boot/module/common/biz/controller/KeySiteController.java
+21
-24
StartLoader.java
.../yeejoin/amos/boot/module/jcs/biz/config/StartLoader.java
+1
-1
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/KeySiteController.java
View file @
ad96e8c6
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
controller
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
javax.servlet.http.HttpServletRequest
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
...
...
@@ -36,9 +14,28 @@ import com.yeejoin.amos.boot.module.common.api.service.IKeySiteService;
import
com.yeejoin.amos.boot.module.common.api.service.IOrgUsrService
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.KeySiteServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.SourceFileServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
/**
* 重点部位
...
...
@@ -75,7 +72,7 @@ public class KeySiteController extends BaseController {
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增重点部位"
,
notes
=
"新增重点部位"
)
public
ResponseModel
<
KeySiteDto
>
save
(
@RequestBody
KeySiteDto
model
)
{
JSONObject
json
=
getBulid
(
model
.
getBuildingId
());
if
(
json
!=
null
)
{
if
(
json
!=
null
&&
StringUtils
.
isNotBlank
(
json
.
getString
(
"latitude"
))
&&
StringUtils
.
isNotBlank
(
json
.
getString
(
"longitude"
))
)
{
model
.
setLatitude
(
Double
.
parseDouble
(
json
.
getString
(
"latitude"
)));
model
.
setLongitude
(
Double
.
parseDouble
(
json
.
getString
(
"longitude"
)));
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/config/StartLoader.java
View file @
ad96e8c6
...
...
@@ -46,7 +46,7 @@ public class StartLoader implements ApplicationRunner {
emqKeeper
.
getMqttClient
().
subscribe
(
topic
,
(
s
,
mqttMessage
)
->
{
byte
[]
payload
=
mqttMessage
.
getPayload
();
try
{
String
obj
=
new
String
(
payload
,
"GB2312"
);
String
obj
=
new
String
(
payload
);
if
(!
ValidationUtil
.
isEmpty
(
obj
))
{
JSONObject
json
=
JSON
.
parseObject
(
obj
);
AlertNewsDto
alertNewsDto
=
new
AlertNewsDto
(
"物联警情"
,
json
.
get
(
"unitInvolvedName"
)+
","
+
json
.
get
(
"address"
)+
",发生警情,请处理。"
,
json
.
get
(
"id"
).
toString
(),
json
);
...
...
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