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
3b7d53fa
Commit
3b7d53fa
authored
Jun 25, 2021
by
郭武斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*)提交警情触发规则
parent
4ad6db7b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
16 deletions
+24
-16
AlertCalledRo.java
...m/yeejoin/amos/boot/module/jcs/api/dto/AlertCalledRo.java
+4
-4
AlertCalledAction.java
...os/boot/module/jcs/biz/rule/action/AlertCalledAction.java
+13
-9
RuleAlertCalledService.java
...t/module/jcs/biz/service/impl/RuleAlertCalledService.java
+7
-3
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/dto/AlertCalledRo.java
View file @
3b7d53fa
...
@@ -24,14 +24,14 @@ public class AlertCalledRo implements Serializable{
...
@@ -24,14 +24,14 @@ public class AlertCalledRo implements Serializable{
*
*
* </pre>
* </pre>
*/
*/
private
static
final
long
serialVersionUID
=
-
8105736102662461646
L
;
private
static
final
long
serialVersionUID
=
-
9034974124471572825
L
;
/**
/**
* 通用属性
* 通用属性
*/
*/
@Label
(
"警情id"
)
@Label
(
"警情id"
)
private
Lo
ng
sequenceNbr
;
private
Stri
ng
sequenceNbr
;
@Label
(
value
=
"警情类型"
)
@Label
(
value
=
"警情类型"
)
private
String
alertType
;
private
String
alertType
;
...
@@ -43,10 +43,10 @@ public class AlertCalledRo implements Serializable{
...
@@ -43,10 +43,10 @@ public class AlertCalledRo implements Serializable{
private
String
unitInvolved
;
private
String
unitInvolved
;
@Label
(
value
=
"被困人数"
)
@Label
(
value
=
"被困人数"
)
private
Integer
trappedNum
;
private
String
trappedNum
;
@Label
(
value
=
"伤亡人数"
)
@Label
(
value
=
"伤亡人数"
)
private
Integer
casualtiesNum
;
private
String
casualtiesNum
;
@Label
(
value
=
"地址"
)
@Label
(
value
=
"地址"
)
private
String
address
;
private
String
address
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/rule/action/AlertCalledAction.java
View file @
3b7d53fa
...
@@ -16,7 +16,7 @@ import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
...
@@ -16,7 +16,7 @@ import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledRo
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledRo
;
import
com.yeejoin.amos.boot.module.jcs.api.
dto.OrgUsrDto
;
import
com.yeejoin.amos.boot.module.jcs.api.
entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.OrgUsrServiceImpl
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.OrgUsrServiceImpl
;
import
com.yeejoin.amos.component.rule.RuleActionBean
;
import
com.yeejoin.amos.component.rule.RuleActionBean
;
import
com.yeejoin.amos.component.rule.RuleMethod
;
import
com.yeejoin.amos.component.rule.RuleMethod
;
...
@@ -39,7 +39,7 @@ public class AlertCalledAction {
...
@@ -39,7 +39,7 @@ public class AlertCalledAction {
@Autowired
@Autowired
private
OrgUsrServiceImpl
orgUsrService
;
private
OrgUsrServiceImpl
orgUsrService
;
public
void
sendSysMessage
(
String
msgType
,
AlertCalledRo
contingency
)
{
public
void
sendSysMessage
(
String
msgType
,
AlertCalledRo
contingency
)
{
// ContingencyRo ro = (ContingencyRo)contingency;
// ContingencyRo ro = (ContingencyRo)contingency;
// ro.setTelemetryMap(null);
// ro.setTelemetryMap(null);
...
@@ -79,22 +79,27 @@ public class AlertCalledAction {
...
@@ -79,22 +79,27 @@ public class AlertCalledAction {
*/
*/
@SuppressWarnings
(
"unchecked"
)
@SuppressWarnings
(
"unchecked"
)
@RuleMethod
(
methodLabel
=
"短信报送"
,
project
=
"西咸机场119接处警规则"
)
@RuleMethod
(
methodLabel
=
"短信报送"
,
project
=
"西咸机场119接处警规则"
)
public
void
sendcmd
(
String
smsCode
,
String
sendType
,
String
sendIds
,
Object
object
)
public
void
sendcmd
(
String
smsCode
,
String
sendType
,
String
sendIds
,
Object
object
)
throws
Exception
{
{
List
<
Long
>
seqs
=
StringUtil
.
String2LongList
(
sendIds
);
List
<
Long
>
seqs
=
StringUtil
.
String2LongList
(
sendIds
);
if
(
ValidationUtil
.
isEmpty
(
seqs
))
if
(
!
ValidationUtil
.
isEmpty
(
seqs
))
{
{
//构建短信参数
//构建短信参数
HashMap
<
String
,
String
>
smsParams
=
new
HashMap
<
String
,
String
>();
HashMap
<
String
,
String
>
smsParams
=
new
HashMap
<
String
,
String
>();
Map
<
String
,
String
>
objectMap
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
object
),
HashMap
.
class
);
Map
<
String
,
String
>
objectMap
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
object
),
HashMap
.
class
);
smsParams
.
putAll
(
objectMap
);
smsParams
.
putAll
(
objectMap
);
//查询人员手机号
//查询人员手机号
Set
<
String
>
mobiles
=
new
HashSet
<>();
Set
<
String
>
mobiles
=
new
HashSet
<>();
List
<
OrgUsrDto
>
orgUsrDtos
=
orgUsrService
.
queryBatchSeq
(
seqs
);
for
(
OrgUsrDto
orgUsrDto
:
orgUsrDto
s
)
for
(
Long
seq
:
seq
s
)
{
{
// mobiles.add(e);
OrgUsr
orgUsr
=
orgUsrService
.
getById
(
seq
);
Map
<
String
,
Object
>
result
=
orgUsrService
.
selectForShowById
(
orgUsr
,
seq
);
Object
telephone
=
result
.
get
(
"telephone"
);
if
(!
ValidationUtil
.
isEmpty
(
telephone
))
{
mobiles
.
add
(
String
.
valueOf
(
telephone
));
}
}
}
//发送短信
//发送短信
...
@@ -115,7 +120,6 @@ public class AlertCalledAction {
...
@@ -115,7 +120,6 @@ public class AlertCalledAction {
//发送短信
//发送短信
Systemctl
.
smsClient
.
sendCommonSms
(
smsParams
);
Systemctl
.
smsClient
.
sendCommonSms
(
smsParams
);
}
}
}
}
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/RuleAlertCalledService.java
View file @
3b7d53fa
...
@@ -4,7 +4,6 @@ import java.util.List;
...
@@ -4,7 +4,6 @@ import java.util.List;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
...
@@ -51,7 +50,13 @@ public class RuleAlertCalledService {
...
@@ -51,7 +50,13 @@ public class RuleAlertCalledService {
*/
*/
AlertCalledRo
alertCalledRo
=
new
AlertCalledRo
();
AlertCalledRo
alertCalledRo
=
new
AlertCalledRo
();
//通用属性
//通用属性
Bean
.
toModel
(
alertCalled
,
alertCalledRo
);
alertCalledRo
.
setSequenceNbr
(
String
.
valueOf
(
alertCalled
.
getSequenceNbr
()));
alertCalledRo
.
setAddress
(
alertCalled
.
getAddress
());
alertCalledRo
.
setAlertType
(
alertCalled
.
getAlertType
());
alertCalledRo
.
setAlertTypeCode
(
alertCalled
.
getAlertTypeCode
());
alertCalledRo
.
setCasualtiesNum
(
alertCalled
.
getCasualtiesNum
()
!=
null
?
String
.
valueOf
(
alertCalled
.
getCasualtiesNum
())
:
"无"
);
alertCalledRo
.
setTrappedNum
(
alertCalled
.
getTrappedNum
()
!=
null
?
String
.
valueOf
(
alertCalled
.
getTrappedNum
())
:
"无"
);
alertCalledRo
.
setUnitInvolved
(
alertCalled
.
getUnitInvolved
());
List
<
AlertFormValue
>
alertFormValues
=
alertCalledVo
.
getAlertFormValue
();
List
<
AlertFormValue
>
alertFormValues
=
alertCalledVo
.
getAlertFormValue
();
for
(
AlertFormValue
alertFormValue
:
alertFormValues
)
for
(
AlertFormValue
alertFormValue
:
alertFormValues
)
...
@@ -87,7 +92,6 @@ public class RuleAlertCalledService {
...
@@ -87,7 +92,6 @@ public class RuleAlertCalledService {
}
}
alertCalledRo
.
setAlertTypeCode
(
"229"
);
//触发规则
//触发规则
ruleTrigger
.
publish
(
alertCalledRo
,
"西咸机场119接处警规则/alertCalledRule"
,
new
String
[
0
]);
ruleTrigger
.
publish
(
alertCalledRo
,
"西咸机场119接处警规则/alertCalledRule"
,
new
String
[
0
]);
...
...
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