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
ee4e279d
Commit
ee4e279d
authored
Nov 02, 2022
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
db6a4b97
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
17 deletions
+39
-17
MessageAction.java
...ejoin/amos/boot/biz/common/rule/action/MessageAction.java
+2
-1
AlertCalledServiceImpl.java
...t/module/jcs/biz/service/impl/AlertCalledServiceImpl.java
+9
-5
AlertSubmittedServiceImpl.java
...odule/jcs/biz/service/impl/AlertSubmittedServiceImpl.java
+28
-11
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/rule/action/MessageAction.java
View file @
ee4e279d
...
@@ -23,9 +23,10 @@ public class MessageAction {
...
@@ -23,9 +23,10 @@ public class MessageAction {
MessageModel
messageModel
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
msgObj
),
MessageModel
.
class
);
MessageModel
messageModel
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
msgObj
),
MessageModel
.
class
);
messageModel
.
setTitle
(
title
);
messageModel
.
setTitle
(
title
);
messageModel
.
setBody
(
RuleUtils
.
instedParams
(
content
,
msgObj
));
messageModel
.
setBody
(
RuleUtils
.
instedParams
(
content
,
msgObj
));
log
.
info
(
String
.
format
(
"接收规则返回数据: %s"
,
JSON
.
toJSONString
(
msgObj
)
));
log
.
info
(
String
.
format
(
"接收规则返回数据: %s"
,
msgObj
));
if
(!
ValidationUtil
.
isEmpty
(
messageModel
))
{
if
(!
ValidationUtil
.
isEmpty
(
messageModel
))
{
try
{
try
{
log
.
info
(
"调用平台消息接口参数: {}"
,
messageModel
);
Systemctl
.
messageClient
.
create
(
messageModel
);
Systemctl
.
messageClient
.
create
(
messageModel
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
...
...
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 @
ee4e279d
...
@@ -466,7 +466,9 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
...
@@ -466,7 +466,9 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
@Transactional
(
isolation
=
Isolation
.
READ_UNCOMMITTED
)
@Transactional
(
isolation
=
Isolation
.
READ_UNCOMMITTED
)
public
AlertCalledObjsDto
selectAlertCalledByIdNoRedisNew
(
Long
id
)
{
public
AlertCalledObjsDto
selectAlertCalledByIdNoRedisNew
(
Long
id
)
{
// 警情基本信息
// 警情基本信息
logger
.
info
(
"alertCalled6666666666"
+
id
);
AlertCalled
alertCalled
=
this
.
getById
(
id
);
AlertCalled
alertCalled
=
this
.
getById
(
id
);
logger
.
info
(
"alertCalled777777"
+
alertCalled
);
QueryWrapper
<
AlertFormValue
>
queryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
AlertFormValue
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"alert_called_id"
,
id
);
queryWrapper
.
eq
(
"alert_called_id"
,
id
);
// 警情动态表单数据
// 警情动态表单数据
...
@@ -476,6 +478,8 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
...
@@ -476,6 +478,8 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
AlertCalledObjsDto
alertCalledFormVo
=
new
AlertCalledObjsDto
();
AlertCalledObjsDto
alertCalledFormVo
=
new
AlertCalledObjsDto
();
alertCalledFormVo
.
setAlertCalled
(
alertCalled
);
alertCalledFormVo
.
setAlertCalled
(
alertCalled
);
alertCalledFormVo
.
setAlertFormValue
(
list
);
alertCalledFormVo
.
setAlertFormValue
(
list
);
logger
.
info
(
"alertCalled75555555"
+
alertCalledFormVo
);
return
alertCalledFormVo
;
return
alertCalledFormVo
;
}
}
...
@@ -569,10 +573,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
...
@@ -569,10 +573,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
iAlertFormValueService
.
saveBatch
(
alertFormValuelist
);
iAlertFormValueService
.
saveBatch
(
alertFormValuelist
);
alertCalledObjsDto
.
setAlertCalled
(
alertCalled
);
alertCalledObjsDto
.
setAlertCalled
(
alertCalled
);
alertCalledObjsDto
.
setAlertFormValue
(
alertFormValuelist
);
alertCalledObjsDto
.
setAlertFormValue
(
alertFormValuelist
);
// 警情报送
// 调用规则 警情初报
ruleAlertCalledService
.
fireAlertCalledRule
(
alertCalledObjsDto
,
AlertBusinessTypeEnum
.
警情初报
.
getCode
(),
null
,
null
,
null
);
// 通知实战指挥页面发送mqtt 默认发送 String 类型 0, 新警情 1 警情状态变化
// 通知实战指挥页面发送mqtt 默认发送 String 类型 0, 新警情 1 警情状态变化
emqKeeper
.
getMqttClient
().
publish
(
topic
,
"0"
.
getBytes
(),
RuleConfig
.
DEFAULT_QOS
,
false
);
emqKeeper
.
getMqttClient
().
publish
(
topic
,
"0"
.
getBytes
(),
RuleConfig
.
DEFAULT_QOS
,
false
);
...
@@ -621,7 +622,10 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
...
@@ -621,7 +622,10 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
eSOrgUsrService
.
saveAlertCalledToESNew
(
orgUsr
);
eSOrgUsrService
.
saveAlertCalledToESNew
(
orgUsr
);
}
}
// 警情报送
// 调用规则 警情初报
ruleAlertCalledService
.
fireAlertCalledRule
(
alertCalledObjsDto
,
AlertBusinessTypeEnum
.
警情初报
.
getCode
(),
null
,
null
,
null
);
}
}
// toSendCompletePoliceSituationMatch(alertCalled.getSequenceNbr());
// toSendCompletePoliceSituationMatch(alertCalled.getSequenceNbr());
return
alertCalledObjsDto
;
return
alertCalledObjsDto
;
...
...
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 @
ee4e279d
...
@@ -278,7 +278,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -278,7 +278,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
template
=
templateService
.
getByType
(
alertSubmittedExtDto
.
getBusinessTypeCode
());
template
=
templateService
.
getByType
(
alertSubmittedExtDto
.
getBusinessTypeCode
());
}
}
AlertCalledObjsDto
alertCalledVo
=
(
AlertCalledObjsDto
)
alertCalledService
.
selectAlertCalledByIdNoRedisNew
(
queryParam
.
getAlertCalledId
());
AlertCalledObjsDto
alertCalledVo
=
alertCalledService
.
selectAlertCalledByIdNoRedisNew
(
queryParam
.
getAlertCalledId
());
AlertCalled
alertCalled
=
alertCalledVo
.
getAlertCalled
();
AlertCalled
alertCalled
=
alertCalledVo
.
getAlertCalled
();
/**
/**
* 构建警情报送规则对象
* 构建警情报送规则对象
...
@@ -347,7 +347,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -347,7 +347,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
//// alertCalled.setEndTimeStr()
//// alertCalled.setEndTimeStr()
//// }
//// }
AlertCalledObjsDto
alertCalledVo
=
(
AlertCalledObjsDto
)
alertCalledService
.
selectAlertCalledByIdNoRedisNew
(
alertCalled
.
getSequenceNbr
());
AlertCalledObjsDto
alertCalledVo
=
alertCalledService
.
selectAlertCalledByIdNoRedisNew
(
alertCalled
.
getSequenceNbr
());
alertCalledVo
.
setAlertCalled
(
alertCalled
);
alertCalledVo
.
setAlertCalled
(
alertCalled
);
// 调用规则
// 调用规则
...
@@ -393,8 +393,13 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -393,8 +393,13 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
* 规则回调
* 规则回调
*/
*/
public
void
ruleCallbackAction
(
String
smsCode
,
List
<
Map
<
String
,
Object
>>
sendIds
,
Object
object
)
throws
Exception
{
public
void
ruleCallbackAction
(
String
smsCode
,
List
<
Map
<
String
,
Object
>>
sendIds
,
Object
object
)
throws
Exception
{
Thread
.
sleep
(
1000
);
log
.
info
(
"规则回调参数"
+
object
.
toString
());
// 获取报送对象列表
// 获取报送对象列表
List
<
AlertSubmittedObject
>
alertSubmittedObjectList
=
Lists
.
newArrayList
();
try
{
List
<
AlertSubmittedObject
>
alertSubmittedObjectList
=
Lists
.
newArrayList
();
Set
<
String
>
mobiles
=
new
HashSet
<>();
Set
<
String
>
mobiles
=
new
HashSet
<>();
HashMap
<
String
,
String
>
smsParams
=
new
HashMap
<>();
HashMap
<
String
,
String
>
smsParams
=
new
HashMap
<>();
...
@@ -410,7 +415,11 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -410,7 +415,11 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
String
alertSubmittedId
=
calledRo
.
getAlertSubmittedId
();
String
alertSubmittedId
=
calledRo
.
getAlertSubmittedId
();
alertCalledId
=
calledRo
.
getSequenceNbr
();
alertCalledId
=
calledRo
.
getSequenceNbr
();
AlertCalledObjsDto
alertCalledObjsDto
=
(
AlertCalledObjsDto
)
alertCalledService
.
selectAlertCalledByIdNoRedisNew
(
Long
.
valueOf
(
calledRo
.
getSequenceNbr
()));
log
.
info
(
"calledRo.getSequenceNbr()"
+
calledRo
.
getSequenceNbr
());
log
.
info
(
"alertCalledObjsDtoid"
+
Long
.
valueOf
(
calledRo
.
getSequenceNbr
()));
AlertCalledObjsDto
alertCalledObjsDto
=
alertCalledService
.
selectAlertCalledByIdNoRedisNew
(
Long
.
valueOf
(
calledRo
.
getSequenceNbr
()));
log
.
info
(
"alertCalledObjsDto"
+
alertCalledObjsDto
);
alertCalled
=
alertCalledObjsDto
.
getAlertCalled
();
alertCalled
=
alertCalledObjsDto
.
getAlertCalled
();
// AlertCalledRo tempCalledRo = new AlertCalledRo();
// AlertCalledRo tempCalledRo = new AlertCalledRo();
...
@@ -591,7 +600,8 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -591,7 +600,8 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
smsParams
.
put
(
"callTimeStr"
,
calledRo
.
getCallTimeStr
());
smsParams
.
put
(
"callTimeStr"
,
calledRo
.
getCallTimeStr
());
smsParams
.
put
(
"address"
,
calledRo
.
getAddress
());
smsParams
.
put
(
"address"
,
calledRo
.
getAddress
());
smsParams
.
put
(
"fireLocation"
,
calledRo
.
getFireLocation
());
smsParams
.
put
(
"fireLocation"
,
calledRo
.
getFireLocation
());
smsParams
.
put
(
"endTimeStr"
,
!
ValidationUtil
.
isEmpty
(
alertCalled
.
getUpdateTime
())
?
DateUtils
.
convertDateToString
(
alertCalled
.
getUpdateTime
(),
DateUtils
.
DATE_TIME_PATTERN
)
:
""
);
log
.
info
(
"alertCalled888888"
+
alertCalled
);
smsParams
.
put
(
"endTimeStr"
,
alertCalled
.
getUpdateTime
()!=
null
?
DateUtils
.
convertDateToString
(
alertCalled
.
getUpdateTime
(),
DateUtils
.
DATE_TIME_PATTERN
)
:
""
);
smsParams
.
put
(
"burningMaterial"
,
calledRo
.
getBurningMaterial
());
smsParams
.
put
(
"burningMaterial"
,
calledRo
.
getBurningMaterial
());
smsParams
.
put
(
"fireSituation"
,
calledRo
.
getFireSituation
());
smsParams
.
put
(
"fireSituation"
,
calledRo
.
getFireSituation
());
smsParams
.
put
(
"trappedNum"
,
calledRo
.
getTrappedNum
());
smsParams
.
put
(
"trappedNum"
,
calledRo
.
getTrappedNum
());
...
@@ -637,10 +647,11 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -637,10 +647,11 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
}
}
emqKeeper
.
getMqttClient
().
publish
(
topic
,
alertCalledId
.
getBytes
(),
RuleConfig
.
DEFAULT_QOS
,
false
);
emqKeeper
.
getMqttClient
().
publish
(
topic
,
alertCalledId
.
getBytes
(),
RuleConfig
.
DEFAULT_QOS
,
false
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
RuntimeException
();
}
}
}
/**
/**
...
@@ -1350,7 +1361,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -1350,7 +1361,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
map
.
put
(
"companyName"
,
companyName
);
map
.
put
(
"companyName"
,
companyName
);
map
.
put
(
"editContent"
,
"可自编辑续报内容"
);
map
.
put
(
"editContent"
,
"可自编辑续报内容"
);
AlertCalledObjsDto
alertCalledVo
=
(
AlertCalledObjsDto
)
alertCalledService
.
selectAlertCalledByIdNoRedisNew
(
alertCalled
.
getSequenceNbr
());
AlertCalledObjsDto
alertCalledVo
=
alertCalledService
.
selectAlertCalledByIdNoRedisNew
(
alertCalled
.
getSequenceNbr
());
/**
/**
* 构建警情报送规则对象
* 构建警情报送规则对象
...
@@ -1822,7 +1833,9 @@ public Set<Map<String, Object>> getwone(Set<Map<String, Object>> sendUserIds){
...
@@ -1822,7 +1833,9 @@ public Set<Map<String, Object>> getwone(Set<Map<String, Object>> sendUserIds){
if
(
sendUserIds
!=
null
&&
sendUserIds
.
size
()>
0
){
if
(
sendUserIds
!=
null
&&
sendUserIds
.
size
()>
0
){
for
(
Map
<
String
,
Object
>
sendUserId
:
sendUserIds
)
{
for
(
Map
<
String
,
Object
>
sendUserId
:
sendUserIds
)
{
map
.
put
(
sendUserId
.
get
(
"amosId"
).
toString
(),
sendUserId
);
if
(
sendUserId
!=
null
&&
sendUserId
.
get
(
"amosId"
)!=
null
){
map
.
put
(
sendUserId
.
get
(
"amosId"
).
toString
(),
sendUserId
);
}
}
}
}
}
Set
<
Map
<
String
,
Object
>>
set
=
new
HashSet
<>(
map
.
values
());
Set
<
Map
<
String
,
Object
>>
set
=
new
HashSet
<>(
map
.
values
());
...
@@ -2120,6 +2133,8 @@ public Set<Map<String, Object>> getwone(Set<Map<String, Object>> sendUserIds){
...
@@ -2120,6 +2133,8 @@ public Set<Map<String, Object>> getwone(Set<Map<String, Object>> sendUserIds){
*/
*/
public
void
pushPowerTransferToAppAndWeb
(
String
type
,
Map
<
String
,
String
>
besidesMap
,
HashMap
<
String
,
String
>
smsParams
,
List
<
String
>
userList
,
Integer
messageType
){
public
void
pushPowerTransferToAppAndWeb
(
String
type
,
Map
<
String
,
String
>
besidesMap
,
HashMap
<
String
,
String
>
smsParams
,
List
<
String
>
userList
,
Integer
messageType
){
log
.
info
(
"web ---消息/addAlterMessageCheck开始组装数据"
);
PushMessageWebAndAppRo
pushMessageWebAndAppRo
=
new
PushMessageWebAndAppRo
();
PushMessageWebAndAppRo
pushMessageWebAndAppRo
=
new
PushMessageWebAndAppRo
();
pushMessageWebAndAppRo
.
setRelationId
(
besidesMap
.
get
(
"alterId"
));
pushMessageWebAndAppRo
.
setRelationId
(
besidesMap
.
get
(
"alterId"
));
pushMessageWebAndAppRo
.
setRecivers
(
userList
);
pushMessageWebAndAppRo
.
setRecivers
(
userList
);
...
@@ -2186,9 +2201,11 @@ public Set<Map<String, Object>> getwone(Set<Map<String, Object>> sendUserIds){
...
@@ -2186,9 +2201,11 @@ public Set<Map<String, Object>> getwone(Set<Map<String, Object>> sendUserIds){
}
}
pushMessageWebAndAppRo
.
setExtras
(
map
);;
pushMessageWebAndAppRo
.
setExtras
(
map
);;
try
{
try
{
log
.
info
(
"消息/addAlterMessageCheck规则触发前"
);
ruleTrigger
.
publish
(
pushMessageWebAndAppRo
,
"消息/addAlterMessageCheck"
,
new
String
[
0
]);
ruleTrigger
.
publish
(
pushMessageWebAndAppRo
,
"消息/addAlterMessageCheck"
,
new
String
[
0
]);
log
.
info
(
"消息/addAlterMessageCheck规则触发后"
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
}
...
...
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