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
d0cda860
Commit
d0cda860
authored
Dec 29, 2021
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
b86478b9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
2 deletions
+38
-2
AlertCalledServiceImpl.java
...t/module/jcs/biz/service/impl/AlertCalledServiceImpl.java
+23
-1
AlertSubmittedServiceImpl.java
...odule/jcs/biz/service/impl/AlertSubmittedServiceImpl.java
+15
-1
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/AlertCalledServiceImpl.java
View file @
d0cda860
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
service
.
impl
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
...
...
@@ -9,6 +10,7 @@ import java.util.Set;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
import
org.apache.commons.beanutils.BeanUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
...
...
@@ -422,7 +424,22 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
par
.
setAlertId
(
alertCalled
.
getSequenceNbr
());
List
<
AlertCalledZhDto
>
list
=
this
.
alertCalledListByAlertStatus
(
null
,
null
,
par
);
String
json
=
list
!=
null
&&
list
.
size
()>
0
?
JSONObject
.
toJSONString
(
list
.
get
(
0
),
SerializerFeature
.
PrettyFormat
,
SerializerFeature
.
WriteMapNullValue
):
""
;
String
json
=
""
;
if
(
list
!=
null
&&
list
.
size
()>
0
){
AlertCalledZhDto
ll
=
list
.
get
(
0
);
Map
<
String
,
String
>
map
=
BeanUtils
.
describe
((
Object
)
list
.
get
(
0
));
String
strDateFormat
=
"yyyy-MM-dd HH:mm:ss"
;
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
strDateFormat
);
map
.
put
(
"callTime"
,
ll
.
getCallTime
()!=
null
?
sdf
.
format
(
ll
.
getCallTime
()):
""
);
map
.
put
(
"updateTime"
,
ll
.
getUpdateTime
()!=
null
?
sdf
.
format
(
ll
.
getUpdateTime
()):
""
);
json
=
list
!=
null
&&
list
.
size
()>
0
?
JSONObject
.
toJSONString
(
map
,
SerializerFeature
.
PrettyFormat
,
SerializerFeature
.
WriteMapNullValue
):
""
;
}
emqKeeper
.
getMqttClient
().
publish
(
topicData
,
json
.
getBytes
(),
RuleConfig
.
DEFAULT_QOS
,
false
);
/**
...
...
@@ -448,6 +465,11 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
throw
new
RuntimeException
(
"报送失败,系统异常!"
);
}
}
/**
* 根据id 修改警情 type:警情相关 操作类型 0警情续报 1非警情确认 2 警情结案
*/
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/AlertSubmittedServiceImpl.java
View file @
d0cda860
...
...
@@ -8,6 +8,7 @@ import java.io.IOException;
import
java.io.InputStream
;
import
java.lang.reflect.Field
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.time.LocalDateTime
;
import
java.time.ZoneOffset
;
import
java.util.ArrayList
;
...
...
@@ -743,7 +744,20 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
par
.
setAlertId
(
alertSubmittedDto
.
getAlertCalledId
());
List
<
AlertCalledZhDto
>
list4
=
alertCalledService
.
alertCalledListByAlertStatus
(
null
,
null
,
par
);
String
json
=
list4
!=
null
&&
list4
.
size
()>
0
?
JSONObject
.
toJSONString
(
list4
.
get
(
0
),
SerializerFeature
.
PrettyFormat
,
SerializerFeature
.
WriteMapNullValue
):
""
;
String
json
=
""
;
if
(
list
!=
null
&&
list
.
size
()>
0
){
AlertCalledZhDto
ll
=
list4
.
get
(
0
);
Map
<
String
,
String
>
map1
=
org
.
apache
.
commons
.
beanutils
.
BeanUtils
.
describe
((
Object
)
list4
.
get
(
0
));
String
strDateFormat
=
"yyyy-MM-dd HH:mm:ss"
;
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
strDateFormat
);
map1
.
put
(
"callTime"
,
ll
.
getCallTime
()!=
null
?
sdf
.
format
(
ll
.
getCallTime
()):
""
);
map1
.
put
(
"updateTime"
,
ll
.
getUpdateTime
()!=
null
?
sdf
.
format
(
ll
.
getUpdateTime
()):
""
);
json
=
list
!=
null
&&
list
.
size
()>
0
?
JSONObject
.
toJSONString
(
map1
,
SerializerFeature
.
PrettyFormat
,
SerializerFeature
.
WriteMapNullValue
):
""
;
}
// String json=list4!=null&&list4.size()>0?JSONObject.toJSONString(list4.get(0), SerializerFeature.PrettyFormat, SerializerFeature.WriteMapNullValue):"";
emqKeeper
.
getMqttClient
().
publish
(
topicJa
,
json
.
getBytes
(),
RuleConfig
.
DEFAULT_QOS
,
false
);
}
...
...
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