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
c1dd64b4
Commit
c1dd64b4
authored
Mar 13, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改jcs扫描问题
parent
f46f998d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
231 additions
and
256 deletions
+231
-256
AlertSubmittedServiceImpl.java
...odule/jcs/biz/service/impl/AlertSubmittedServiceImpl.java
+231
-256
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/AlertSubmittedServiceImpl.java
View file @
c1dd64b4
...
@@ -134,6 +134,7 @@ import com.yeejoin.amos.component.feign.model.FeignClientResult;
...
@@ -134,6 +134,7 @@ import com.yeejoin.amos.component.feign.model.FeignClientResult;
import
com.yeejoin.amos.component.rule.RuleTrigger
;
import
com.yeejoin.amos.component.rule.RuleTrigger
;
import
com.yeejoin.amos.component.rule.config.RuleConfig
;
import
com.yeejoin.amos.component.rule.config.RuleConfig
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
@@ -238,6 +239,33 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -238,6 +239,33 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
private
String
topicJa
;
private
String
topicJa
;
private
final
String
msgType
=
"jcs119"
;
private
final
String
msgType
=
"jcs119"
;
//定义常量 规避SonarLint检验
private
String
recDate
=
"recDate"
;
private
String
companyName
=
"companyName"
;
private
String
usIds
=
"usIds"
;
private
String
amosUserId
=
"amosUserId"
;
private
String
airportPost
=
"airportPost"
;
private
String
callTimeStr
=
"callTimeStr"
;
private
String
address
=
"address"
;
private
String
trappedNum
=
"trappedNum"
;
private
String
casualtiesNum
=
"casualtiesNum"
;
private
String
contactUser
=
"contactUser"
;
private
String
contactPhone
=
"contactPhone"
;
private
String
alertType
=
"alertType"
;
private
String
alterId
=
"alterId"
;
private
String
sendTime
=
"sendTime"
;
private
String
editContent
=
"editContent"
;
private
String
arrivalTime
=
"arrivalTime"
;
private
String
waterNum
=
"waterNum"
;
private
String
foamNum
=
"foamNum"
;
private
String
airportUnit
=
"airportUnit"
;
private
String
userId
=
"userId"
;
private
String
userName
=
"userName"
;
private
String
resourceNum
=
"resourcesNum"
;
private
String
mobilePhone
=
"mobilePhone"
;
private
String
amosId
=
"amosId"
;
@Override
@Override
public
SchedulingReportingDto
listSchedulingByParam
(
AlertSubmittedDto
queryParam
)
{
public
SchedulingReportingDto
listSchedulingByParam
(
AlertSubmittedDto
queryParam
)
{
...
@@ -302,19 +330,18 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -302,19 +330,18 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
definitions
.
put
(
"$callTime"
,
DateUtils
.
convertDateToString
(
alertCalled
.
getCallTime
(),
DateUtils
.
DATE_TIME_PATTERN
));
definitions
.
put
(
"$callTime"
,
DateUtils
.
convertDateToString
(
alertCalled
.
getCallTime
(),
DateUtils
.
DATE_TIME_PATTERN
));
definitions
.
put
(
"$replaceContent"
,
replaceContent
);
definitions
.
put
(
"$replaceContent"
,
replaceContent
);
definitions
.
put
(
"$address"
,
ValidationUtil
.
isEmpty
(
alertCalled
.
getAddress
())
?
""
:
alertCalled
.
getAddress
());
definitions
.
put
(
"$address"
,
ValidationUtil
.
isEmpty
(
alertCalled
.
getAddress
())
?
""
:
alertCalled
.
getAddress
());
// definitions.put("$recDate",DateUtils.dateTimeToDateString(alertCalled.getUpdateTime()));
definitions
.
put
(
"$contactUser"
,
ValidationUtil
.
isEmpty
(
alertCalled
.
getContactUser
())
?
""
:
alertCalled
.
getContactUser
());
definitions
.
put
(
"$contactUser"
,
ValidationUtil
.
isEmpty
(
alertCalled
.
getContactUser
())
?
""
:
alertCalled
.
getContactUser
());
definitions
.
put
(
"$trappedNum"
,
ValidationUtil
.
isEmpty
(
alertCalledRo
.
getTrappedNum
())
?
""
:
String
.
valueOf
(
alertCalled
.
getTrappedNum
()));
definitions
.
put
(
"$trappedNum"
,
ValidationUtil
.
isEmpty
(
alertCalledRo
.
getTrappedNum
())
?
""
:
String
.
valueOf
(
alertCalled
.
getTrappedNum
()));
definitions
.
put
(
"$casualtiesNum"
,
ValidationUtil
.
isEmpty
(
alertCalled
.
getCasualtiesNum
())
?
""
:
String
.
valueOf
(
alertCalled
.
getCasualtiesNum
()));
definitions
.
put
(
"$casualtiesNum"
,
ValidationUtil
.
isEmpty
(
alertCalled
.
getCasualtiesNum
())
?
""
:
String
.
valueOf
(
alertCalled
.
getCasualtiesNum
()));
definitions
.
put
(
"$contactPhone"
,
ValidationUtil
.
isEmpty
(
alertCalled
.
getContactPhone
())
?
""
:
alertCalled
.
getContactPhone
());
definitions
.
put
(
"$contactPhone"
,
ValidationUtil
.
isEmpty
(
alertCalled
.
getContactPhone
())
?
""
:
alertCalled
.
getContactPhone
());
String
company
Name
=
JSON
.
parseObject
(
alertSubmittedExtDto
.
getSubmissionContent
()).
getString
(
"$companyName"
)
;
String
company
=
JSON
.
parseObject
(
alertSubmittedExtDto
.
getSubmissionContent
()).
getString
(
"$companyName"
)
;
JSONObject
jsonObject
=
null
;
JSONObject
jsonObject
=
null
;
if
(!
ValidationUtil
.
isEmpty
(
alertCalled
.
getUpdateTime
()))
{
if
(!
ValidationUtil
.
isEmpty
(
alertCalled
.
getUpdateTime
()))
{
jsonObject
=
JSON
.
parseObject
(
alertSubmittedExtDto
.
getSubmissionContent
());
jsonObject
=
JSON
.
parseObject
(
alertSubmittedExtDto
.
getSubmissionContent
());
jsonObject
.
put
(
"recDate"
,
DateUtils
.
convertDateToString
(
alertCalled
.
getUpdateTime
(),
DateUtils
.
DATE_TIME_PATTERN
));
jsonObject
.
put
(
recDate
,
DateUtils
.
convertDateToString
(
alertCalled
.
getUpdateTime
(),
DateUtils
.
DATE_TIME_PATTERN
));
}
}
if
(
jsonObject
!=
null
)
{
if
(
jsonObject
!=
null
)
{
...
@@ -322,7 +349,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -322,7 +349,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
}
}
definitions
.
put
(
"$companyName"
,
null
==
company
Name
?
""
:
companyName
);
definitions
.
put
(
"$companyName"
,
null
==
company
?
""
:
company
);
String
content
=
getTaskInformation
(
template
.
getRichContent
(),
definitions
);
String
content
=
getTaskInformation
(
template
.
getRichContent
(),
definitions
);
...
@@ -342,23 +369,21 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -342,23 +369,21 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
}
}
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Boolean
save
(
AlertSubmittedDto
alertSubmittedDto
,
String
userName
)
{
public
Boolean
save
(
AlertSubmittedDto
alertSubmittedDto
,
String
userName
)
{
try
{
try
{
String
company
=
ValidationUtil
.
isEmpty
(
alertSubmittedDto
.
getSubmitContent
().
get
(
"companyName"
))
?
""
:
alertSubmittedDto
.
getSubmitContent
().
get
(
"companyName"
).
toString
()
;
String
company
=
ValidationUtil
.
isEmpty
(
alertSubmittedDto
.
getSubmitContent
().
get
(
companyName
))
?
""
:
alertSubmittedDto
.
getSubmitContent
().
get
(
companyName
).
toString
()
;
Map
<
String
,
String
>
map
=
saveAlertSubmitted
(
alertSubmittedDto
,
userName
);
Map
<
String
,
String
>
map
=
saveAlertSubmitted
(
alertSubmittedDto
,
userName
);
// 组装规则入参
// 组装规则入参
AlertCalled
alertCalled
=
alertCalledService
.
getById
(
alertSubmittedDto
.
getAlertCalledId
());
AlertCalled
alertCalled
=
alertCalledService
.
getById
(
alertSubmittedDto
.
getAlertCalledId
());
alertCalled
.
setCompanyName
(
company
);
alertCalled
.
setCompanyName
(
company
);
// if(AlertBusinessTypeEnum.警情结案.getCode().equals(alertSubmittedDto.getBusinessTypeCode())) {
//// alertCalled.setEndTimeStr()
//// }
AlertCalledObjsDto
alertCalledVo
=
(
AlertCalledObjsDto
)
alertCalledService
.
selectAlertCalledByIdNoRedisNew
(
alertCalled
.
getSequenceNbr
());
AlertCalledObjsDto
alertCalledVo
=
(
AlertCalledObjsDto
)
alertCalledService
.
selectAlertCalledByIdNoRedisNew
(
alertCalled
.
getSequenceNbr
());
alertCalledVo
.
setAlertCalled
(
alertCalled
);
alertCalledVo
.
setAlertCalled
(
alertCalled
);
// 调用规则
// 调用规则
ruleAlertCalledService
.
fireAlertCalledRule
(
alertCalledVo
,
map
.
get
(
"alertWay"
),
map
.
get
(
"mobiles"
),
map
.
get
(
"usIds"
),
map
.
get
(
"feedBack"
));
ruleAlertCalledService
.
fireAlertCalledRule
(
alertCalledVo
,
map
.
get
(
"alertWay"
),
map
.
get
(
"mobiles"
),
map
.
get
(
usIds
),
map
.
get
(
"feedBack"
));
//通知实战指挥页面发送mqtt 默认发送 String 类型 0, 新警情 1 警情状态变化
//通知实战指挥页面发送mqtt 默认发送 String 类型 0, 新警情 1 警情状态变化
emqKeeper
.
getMqttClient
().
publish
(
powertopic
,
"0"
.
getBytes
(),
RuleConfig
.
DEFAULT_QOS
,
true
);
emqKeeper
.
getMqttClient
().
publish
(
powertopic
,
"0"
.
getBytes
(),
RuleConfig
.
DEFAULT_QOS
,
true
);
...
@@ -378,7 +403,6 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -378,7 +403,6 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
info
(
"规则调用失败"
);
log
.
info
(
"规则调用失败"
);
}
}
}
}
ESAlertCalled
esAlertCalled
=
esAlertCalledService
.
queryById
(
alertSubmittedDto
.
getAlertCalledId
());
ESAlertCalled
esAlertCalled
=
esAlertCalledService
.
queryById
(
alertSubmittedDto
.
getAlertCalledId
());
if
(
alertCalled
.
getAlertStatus
())
if
(
alertCalled
.
getAlertStatus
())
...
@@ -420,10 +444,6 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -420,10 +444,6 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
AlertCalledObjsDto
alertCalledObjsDto
=
(
AlertCalledObjsDto
)
alertCalledService
.
selectAlertCalledByIdNoRedisNew
(
Long
.
valueOf
(
calledRo
.
getSequenceNbr
()));
AlertCalledObjsDto
alertCalledObjsDto
=
(
AlertCalledObjsDto
)
alertCalledService
.
selectAlertCalledByIdNoRedisNew
(
Long
.
valueOf
(
calledRo
.
getSequenceNbr
()));
alertCalled
=
alertCalledObjsDto
.
getAlertCalled
();
alertCalled
=
alertCalledObjsDto
.
getAlertCalled
();
// AlertCalledRo tempCalledRo = new AlertCalledRo();
// RuleAlertCalledService.init(tempCalledRo,alertCalledObjsDto);
// BeanUtils.copyProperties(tempCalledRo,calledRo,"feedback","usIds","ids","alertWay","replaceContent","unitInvolved","alertSubmittedId");
String
alertTypeCode
=
calledRo
.
getAlertTypeCode
();
String
alertTypeCode
=
calledRo
.
getAlertTypeCode
();
alertWay
=
calledRo
.
getAlertWay
();
alertWay
=
calledRo
.
getAlertWay
();
String
unitInvolved
=
calledRo
.
getUnitInvolved
();
String
unitInvolved
=
calledRo
.
getUnitInvolved
();
...
@@ -458,8 +478,8 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -458,8 +478,8 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
map
.
put
(
telephone
,
f
.
getMobilePhone
());
map
.
put
(
telephone
,
f
.
getMobilePhone
());
map
.
put
(
sequenceNbr
,
f
.
getSequenceNbr
());
map
.
put
(
sequenceNbr
,
f
.
getSequenceNbr
());
map
.
put
(
"bizOrgName"
,
f
.
getName
());
map
.
put
(
"bizOrgName"
,
f
.
getName
());
map
.
put
(
"amosUserId"
,
f
.
getAmosUserId
());
map
.
put
(
amosUserId
,
f
.
getAmosUserId
());
map
.
put
(
"companyName"
,
e
.
get
(
"name"
).
toString
());
map
.
put
(
companyName
,
e
.
get
(
"name"
).
toString
());
orgUsers
.
add
(
map
);
orgUsers
.
add
(
map
);
});
});
...
@@ -472,45 +492,39 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -472,45 +492,39 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
}
}
// 安运部
// 安运部
if
(
e
.
get
(
"type"
).
toString
().
equals
(
"AY"
))
{
if
(
e
.
get
(
"type"
).
toString
().
equals
(
"AY"
)
&&
e
.
containsKey
(
"name"
))
{
if
(
e
.
containsKey
(
"name"
))
{
String
[]
arr
=
e
.
get
(
airportPost
).
toString
().
split
(
","
);
String
[]
arr
=
e
.
get
(
"airportPost"
).
toString
().
split
(
","
);
List
<
String
>
list
=
Arrays
.
asList
(
arr
);
List
<
String
>
list
=
Arrays
.
asList
(
arr
);
List
<
Map
<
String
,
Object
>>
mapList
=
iOrgUsrService
.
queryCompanyId
(
e
.
get
(
"name"
).
toString
(),
list
);
List
<
Map
<
String
,
Object
>>
mapList
=
iOrgUsrService
.
queryCompanyId
(
e
.
get
(
"name"
).
toString
(),
list
);
orgUsers
.
addAll
(
mapList
);
orgUsers
.
addAll
(
mapList
);
}
}
}
// 事发单位
// 事发单位
if
(
e
.
get
(
"type"
).
toString
().
equals
(
"SF"
))
{
if
(
e
.
get
(
"type"
).
toString
().
equals
(
"SF"
)
&&
e
.
containsKey
(
airportPost
))
{
if
(
e
.
containsKey
(
"airportPost"
))
{
String
[]
arr
=
e
.
get
(
airportPost
).
toString
().
split
(
","
);
String
[]
arr
=
e
.
get
(
"airportPost"
).
toString
().
split
(
","
);
List
<
String
>
list
=
Arrays
.
asList
(
arr
);
List
<
String
>
list
=
Arrays
.
asList
(
arr
);
List
<
Map
<
String
,
Object
>>
mapList
=
iOrgUsrService
.
queryCompanyId
(
unitInvolved
,
list
);
List
<
Map
<
String
,
Object
>>
mapList
=
iOrgUsrService
.
queryCompanyId
(
unitInvolved
,
list
);
orgUsers
.
addAll
(
mapList
);
orgUsers
.
addAll
(
mapList
);
}
}
}
}
}
// 突发事件救援 // 漏油现场安全保障 // 专机保障 // 其他
// 突发事件救援 // 漏油现场安全保障 // 专机保障 // 其他
if
(
alertTypeCode
.
equals
(
AlertStageEnums
.
TFSJ
.
getCode
())
||
alertTypeCode
.
equals
(
AlertStageEnums
.
LYXC
.
getCode
())
if
(
(
alertTypeCode
.
equals
(
AlertStageEnums
.
TFSJ
.
getCode
())
||
alertTypeCode
.
equals
(
AlertStageEnums
.
LYXC
.
getCode
())
||
alertTypeCode
.
equals
(
AlertStageEnums
.
ZJBZ
.
getCode
())
||
alertTypeCode
.
equals
(
AlertStageEnums
.
QTJQ
.
getCode
()))
{
||
alertTypeCode
.
equals
(
AlertStageEnums
.
ZJBZ
.
getCode
())
||
alertTypeCode
.
equals
(
AlertStageEnums
.
QTJQ
.
getCode
()))
&&
e
.
containsKey
(
onDuty
))
{
if
(
e
.
containsKey
(
onDuty
))
{
List
<
Map
<
String
,
Object
>>
mapList
=
iDutyPersonService
.
queryByCompanyNew
(
e
.
get
(
"name"
).
toString
());
List
<
Map
<
String
,
Object
>>
mapList
=
iDutyPersonService
.
queryByCompanyNew
(
e
.
get
(
"name"
).
toString
());
orgUsers
.
addAll
(
mapList
);
orgUsers
.
addAll
(
mapList
);
}
}
}
// 120急救
// 120急救
if
(
alertTypeCode
.
equals
(
AlertStageEnums
.
JJJQ
.
getCode
()))
{
if
(
alertTypeCode
.
equals
(
AlertStageEnums
.
JJJQ
.
getCode
())
&&
e
.
containsKey
(
"name"
))
{
if
(
e
.
containsKey
(
"name"
))
{
List
<
Map
<
String
,
Object
>>
mapList
=
iDutyPersonService
.
queryByCompanyNew
(
e
.
get
(
"name"
).
toString
());
List
<
Map
<
String
,
Object
>>
mapList
=
iDutyPersonService
.
queryByCompanyNew
(
e
.
get
(
"name"
).
toString
());
orgUsers
.
addAll
(
mapList
);
orgUsers
.
addAll
(
mapList
);
List
<
Map
<
String
,
Object
>>
mapList1
=
iOrgUsrService
.
queryCompanyIdNew
(
e
.
get
(
"name"
).
toString
());
List
<
Map
<
String
,
Object
>>
mapList1
=
iOrgUsrService
.
queryCompanyIdNew
(
e
.
get
(
"name"
).
toString
());
orgUsers
.
addAll
(
mapList1
);
orgUsers
.
addAll
(
mapList1
);
}
}
}
});
});
...
@@ -552,9 +566,6 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -552,9 +566,6 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
AlertSubmitted
alertSubmittedNew
=
null
;
AlertSubmitted
alertSubmittedNew
=
null
;
// Optional<AlertBusinessTypeEnum> alertBusinessTypeEnum =
// Optional<AlertBusinessTypeEnum> alertBusinessTypeEnum =
// EnumsUtils.getEnumObject(AlertBusinessTypeEnum.class,
// EnumsUtils.getEnumObject(AlertBusinessTypeEnum.class,
// e -> e.getCode().equals(calledRo.getAlertTypeCode()));
// smsCode = alertBusinessTypeEnum.get().getSms_code();
if
(!
alertWay
.
equals
(
AlertBusinessTypeEnum
.
警情初报
.
getCode
()))
{
if
(!
alertWay
.
equals
(
AlertBusinessTypeEnum
.
警情初报
.
getCode
()))
{
LambdaQueryWrapper
<
AlertSubmitted
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
AlertSubmitted
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
...
@@ -577,15 +588,15 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -577,15 +588,15 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
alertSubmittedObject
.
setAlertSubmittedId
(
Long
.
parseLong
(
alertSubmittedId
));
alertSubmittedObject
.
setAlertSubmittedId
(
Long
.
parseLong
(
alertSubmittedId
));
}
}
if
(!
ValidationUtil
.
isEmpty
(
orgUser
.
get
(
"amosUserId"
)))
{
if
(!
ValidationUtil
.
isEmpty
(
orgUser
.
get
(
amosUserId
)))
{
usIds
.
add
(
orgUser
.
get
(
"amosUserId"
).
toString
());
usIds
.
add
(
orgUser
.
get
(
amosUserId
).
toString
());
}
}
alertSubmittedObject
.
setType
(
false
);
alertSubmittedObject
.
setType
(
false
);
alertSubmittedObject
.
setUserId
(
Long
.
valueOf
(
String
.
valueOf
(
orgUser
.
get
(
sequenceNbr
))));
alertSubmittedObject
.
setUserId
(
Long
.
valueOf
(
String
.
valueOf
(
orgUser
.
get
(
sequenceNbr
))));
alertSubmittedObject
.
setTheUser
((
String
)
orgUser
.
get
(
"bizOrgName"
));
alertSubmittedObject
.
setTheUser
((
String
)
orgUser
.
get
(
"bizOrgName"
));
alertSubmittedObject
.
setCompanyName
((
String
)
orgUser
.
get
(
"companyName"
));
alertSubmittedObject
.
setCompanyName
((
String
)
orgUser
.
get
(
companyName
));
if
(!
ValidationUtil
.
isEmpty
(
orgUser
.
get
(
telephone
)))
{
if
(!
ValidationUtil
.
isEmpty
(
orgUser
.
get
(
telephone
)))
{
mobiles
.
add
(
orgUser
.
get
(
telephone
).
toString
());
mobiles
.
add
(
orgUser
.
get
(
telephone
).
toString
());
...
@@ -595,20 +606,20 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -595,20 +606,20 @@ 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
)
:
""
);
smsParams
.
put
(
"endTimeStr"
,
!
ValidationUtil
.
isEmpty
(
alertCalled
.
getUpdateTime
())
?
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
());
smsParams
.
put
(
"casualtiesNum"
,
calledRo
.
getCasualtiesNum
());
smsParams
.
put
(
casualtiesNum
,
calledRo
.
getCasualtiesNum
());
smsParams
.
put
(
"dangerousExplosives"
,
calledRo
.
getDangerousExplosives
());
smsParams
.
put
(
"dangerousExplosives"
,
calledRo
.
getDangerousExplosives
());
smsParams
.
put
(
"companyName"
,
calledRo
.
getCompanyName
());
smsParams
.
put
(
companyName
,
calledRo
.
getCompanyName
());
smsParams
.
put
(
"contactUser"
,
alertCalled
.
getContactUser
());
smsParams
.
put
(
contactUser
,
alertCalled
.
getContactUser
());
smsParams
.
put
(
"contactPhone"
,
alertCalled
.
getContactPhone
());
smsParams
.
put
(
contactPhone
,
alertCalled
.
getContactPhone
());
smsParams
.
put
(
"replaceContent"
,
calledRo
.
getReplaceContent
());
smsParams
.
put
(
"replaceContent"
,
calledRo
.
getReplaceContent
());
smsParams
.
put
(
"alertType"
,
calledRo
.
getAlertType
());
smsParams
.
put
(
alertType
,
calledRo
.
getAlertType
());
smsParams
.
put
(
"feedback"
,
calledRo
.
getFeedback
());
smsParams
.
put
(
"feedback"
,
calledRo
.
getFeedback
());
}
}
// 短信报送对象
// 短信报送对象
...
@@ -618,15 +629,15 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -618,15 +629,15 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
// 调用短信发送接口
// 调用短信发送接口
Map
<
String
,
String
>
besidesMap
=
new
HashMap
<>();
Map
<
String
,
String
>
besidesMap
=
new
HashMap
<>();
besidesMap
.
put
(
"alterId"
,
String
.
valueOf
(
alertCalled
.
getSequenceNbr
()));
besidesMap
.
put
(
alterId
,
String
.
valueOf
(
alertCalled
.
getSequenceNbr
()));
if
(
alertWay
.
equals
(
AlertBusinessTypeEnum
.
警情初报
.
getCode
()))
{
if
(
alertWay
.
equals
(
AlertBusinessTypeEnum
.
警情初报
.
getCode
()))
{
alertCalledAction
.
sendAlertCalleCmd
(
smsCode
,
mobiles
,
smsParams
);
alertCalledAction
.
sendAlertCalleCmd
(
smsCode
,
mobiles
,
smsParams
);
besidesMap
.
put
(
"sendTime"
,
DateUtils
.
dateFormat
(
alertCalled
.
getCallTime
(),
DateUtils
.
DATE_TIME_PATTERN
));
besidesMap
.
put
(
sendTime
,
DateUtils
.
dateFormat
(
alertCalled
.
getCallTime
(),
DateUtils
.
DATE_TIME_PATTERN
));
pushPowerTransferToAppAndWeb
(
AlertBusinessTypeEnum
.
警情初报
.
getCode
(),
besidesMap
,
smsParams
,
usIds
,
null
);
pushPowerTransferToAppAndWeb
(
AlertBusinessTypeEnum
.
警情初报
.
getCode
(),
besidesMap
,
smsParams
,
usIds
,
null
);
}
else
{
}
else
{
if
(
alertWay
.
equals
(
AlertBusinessTypeEnum
.
警情续报
.
getCode
()))
{
if
(
alertWay
.
equals
(
AlertBusinessTypeEnum
.
警情续报
.
getCode
()))
{
besidesMap
.
put
(
"sendTime"
,
DateUtils
.
dateFormat
(
alertCalled
.
getCallTime
(),
DateUtils
.
DATE_TIME_PATTERN
));
besidesMap
.
put
(
sendTime
,
DateUtils
.
dateFormat
(
alertCalled
.
getCallTime
(),
DateUtils
.
DATE_TIME_PATTERN
));
pushPowerTransferToAppAndWeb
(
AlertBusinessTypeEnum
.
警情续报
.
getCode
(),
besidesMap
,
smsParams
,
usIds
,
null
);
pushPowerTransferToAppAndWeb
(
AlertBusinessTypeEnum
.
警情续报
.
getCode
(),
besidesMap
,
smsParams
,
usIds
,
null
);
}
}
...
@@ -656,7 +667,8 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -656,7 +667,8 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
* @param alertSubmittedDto 警情信息
* @param alertSubmittedDto 警情信息
* @param userName 用户名
* @param userName 用户名
*/
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
// @Transactional(rollbackFor = Exception.class)
@Autowired
public
Map
<
String
,
String
>
saveAlertSubmitted
(
AlertSubmittedDto
alertSubmittedDto
,
String
userName
)
{
public
Map
<
String
,
String
>
saveAlertSubmitted
(
AlertSubmittedDto
alertSubmittedDto
,
String
userName
)
{
try
{
Long
alertSubmittedId
=
alertSubmittedDto
.
getSequenceNbr
();
try
{
Long
alertSubmittedId
=
alertSubmittedDto
.
getSequenceNbr
();
String
alertWay
=
""
;
String
alertWay
=
""
;
...
@@ -675,23 +687,23 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -675,23 +687,23 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
Optional
<
AlertBusinessTypeEnum
>
businessTypeEnum
=
EnumsUtils
.
getEnumObject
(
AlertBusinessTypeEnum
.
class
,
Optional
<
AlertBusinessTypeEnum
>
businessTypeEnum
=
EnumsUtils
.
getEnumObject
(
AlertBusinessTypeEnum
.
class
,
e
->
e
.
getCode
().
equals
(
bussTypeCode
));
e
->
e
.
getCode
().
equals
(
bussTypeCode
));
alertSubmitted
.
setBusinessType
(
businessTypeEnum
.
get
().
getName
()
);
alertSubmitted
.
setBusinessType
(
businessTypeEnum
.
isPresent
()?
businessTypeEnum
.
get
().
getName
():
null
);
alertSubmitted
.
setCallLogId
(
alertSubmittedDto
.
getCallLogId
());
alertSubmitted
.
setCallLogId
(
alertSubmittedDto
.
getCallLogId
());
alertSubmitted
.
setRecDate
(
alertSubmittedDto
.
getRecDate
());
alertSubmitted
.
setRecDate
(
alertSubmittedDto
.
getRecDate
());
alertSubmitted
.
setSubmissionMethodCode
(
alertSubmittedDto
.
getSubmissionMethodCode
());
alertSubmitted
.
setSubmissionMethodCode
(
alertSubmittedDto
.
getSubmissionMethodCode
());
Optional
<
SubmissionMethodEnum
>
submissionMethodEnum
=
EnumsUtils
.
getEnumObject
(
SubmissionMethodEnum
.
class
,
Optional
<
SubmissionMethodEnum
>
submissionMethodEnum
=
EnumsUtils
.
getEnumObject
(
SubmissionMethodEnum
.
class
,
e
->
e
.
getCode
().
equals
(
alertSubmittedDto
.
getSubmissionMethodCode
()));
e
->
e
.
getCode
().
equals
(
alertSubmittedDto
.
getSubmissionMethodCode
()));
alertSubmitted
.
setSubmissionMethod
(
submissionMethodEnum
.
get
().
getName
(
));
alertSubmitted
.
setSubmissionMethod
(
submissionMethodEnum
.
map
(
SubmissionMethodEnum:
:
getName
).
orElse
(
null
));
Optional
<
AlertSchedulingTypeEnum
>
alertSchedulingTypeEnum
=
Optional
<
AlertSchedulingTypeEnum
>
alertSchedulingTypeEnum
=
EnumsUtils
.
getEnumObject
(
AlertSchedulingTypeEnum
.
class
,
EnumsUtils
.
getEnumObject
(
AlertSchedulingTypeEnum
.
class
,
e
->
e
.
getCode
().
equals
(
alertSubmittedDto
.
getSchedulingTypeCode
()));
e
->
e
.
getCode
().
equals
(
alertSubmittedDto
.
getSchedulingTypeCode
()));
alertSubmitted
.
setSchedulingTypeCode
(
alertSubmittedDto
.
getSchedulingTypeCode
());
alertSubmitted
.
setSchedulingTypeCode
(
alertSubmittedDto
.
getSchedulingTypeCode
());
alertSubmitted
.
setSchedulingType
(
alertSchedulingTypeEnum
.
get
().
getName
(
));
alertSubmitted
.
setSchedulingType
(
alertSchedulingTypeEnum
.
map
(
AlertSchedulingTypeEnum:
:
getName
).
orElse
(
null
));
// 任务 4174 日常值班---融合调度----短信模版中的内容用户可以全部删除掉,按照自定义内容重新录入发送内容 by litw 2021年10月27日
// 任务 4174 日常值班---融合调度----短信模版中的内容用户可以全部删除掉,按照自定义内容重新录入发送内容 by litw 2021年10月27日
alertSubmitted
.
setBusinessTypeCode
(
alertSubmittedDto
.
getBusinessTypeCode
());
alertSubmitted
.
setBusinessTypeCode
(
alertSubmittedDto
.
getBusinessTypeCode
());
alertSubmittedDto
.
getSubmitContent
().
get
(
"recDate"
).
toString
();
alertSubmittedDto
.
getSubmitContent
().
get
(
recDate
).
toString
();
endDate
=
DateUtils
.
dateParse
(
alertSubmittedDto
.
getSubmitContent
().
get
(
"recDate"
).
toString
(),
DateUtils
.
HOUR_PATTERN
);
//endDate = DateUtils.dateParse(alertSubmittedDto.getSubmitContent().get(recDate
).toString(),DateUtils.HOUR_PATTERN);
alertSubmitted
.
setSubmissionContent
(
alertSubmittedDto
.
getSubmitContent
().
toJSONString
());
alertSubmitted
.
setSubmissionContent
(
alertSubmittedDto
.
getSubmitContent
().
toJSONString
());
...
@@ -745,21 +757,19 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -745,21 +757,19 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
// 查询AmousUserId
// 查询AmousUserId
LambdaQueryWrapper
<
OrgUsr
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
OrgUsr
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
in
(
true
,
OrgUsr:
:
getSequenceNbr
,
userIds
);
queryWrapper
.
in
(
true
,
OrgUsr:
:
getSequenceNbr
,
userIds
);
List
<
String
>
usI
ds
=
new
ArrayList
<>();
List
<
String
>
i
ds
=
new
ArrayList
<>();
List
<
OrgUsr
>
list
=
orgUsrService
.
getBaseMapper
().
selectList
(
queryWrapper
);
List
<
OrgUsr
>
list
=
orgUsrService
.
getBaseMapper
().
selectList
(
queryWrapper
);
if
(
null
!=
list
&&
list
.
size
()
>
0
)
{
if
(
null
!=
list
&&
list
.
size
()
>
0
)
{
list
.
stream
().
forEach
(
e
->{
list
.
stream
().
forEach
(
e
->{
if
(!
ValidationUtil
.
isEmpty
(
e
.
getAmosOrgId
()))
{
if
(!
ValidationUtil
.
isEmpty
(
e
.
getAmosOrgId
()))
{
usI
ds
.
add
(
e
.
getAmosOrgId
());
i
ds
.
add
(
e
.
getAmosOrgId
());
}
}
});
});
map
.
put
(
"usIds"
,
StringUtils
.
join
(
usI
ds
.
toArray
(
new
String
[
userIds
.
size
()]),
","
));
map
.
put
(
usIds
,
StringUtils
.
join
(
i
ds
.
toArray
(
new
String
[
userIds
.
size
()]),
","
));
}
else
{
}
else
{
map
.
put
(
"usIds"
,
""
);
map
.
put
(
usIds
,
""
);
}
}
// alertSubmittedObjectServiceImpl.saveBatch(alertSubmittedObjectList);
for
(
AlertSubmittedObject
object
:
alertSubmittedObjectList
)
{
for
(
AlertSubmittedObject
object
:
alertSubmittedObjectList
)
{
alertSubmittedObjectServiceImpl
.
save
(
object
);
alertSubmittedObjectServiceImpl
.
save
(
object
);
}
}
...
@@ -781,9 +791,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -781,9 +791,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
AlertCalledFormDto
alertCalledFormDto
=
(
AlertCalledFormDto
)
alertCalledService
.
selectAlertCalledById
(
alertSubmittedDto
.
getAlertCalledId
());
AlertCalledFormDto
alertCalledFormDto
=
(
AlertCalledFormDto
)
alertCalledService
.
selectAlertCalledById
(
alertSubmittedDto
.
getAlertCalledId
());
AlertCalled
alertCalled
=
alertCalledFormDto
.
getAlertCalled
();
AlertCalled
alertCalled
=
alertCalledFormDto
.
getAlertCalled
();
generateMob
(
alertCalled
);
generateMob
(
alertCalled
);
}
catch
(
FileNotFoundException
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
}
}
...
@@ -820,7 +828,6 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -820,7 +828,6 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
// 更新所有车辆状态为执勤
// 更新所有车辆状态为执勤
equipFeignClient
.
updateCarStatus
(
carStatusInfoDtoList
);
equipFeignClient
.
updateCarStatus
(
carStatusInfoDtoList
);
// //跟车辆状态
// //跟车辆状态
// powerTransferCompanyResourcesService.update(new UpdateWrapper<PowerTransferCompanyResources>().eq("resources_id", transferCarIdList).set("status", FireCarStatusEnum.返队.getCode()));
}
}
...
@@ -846,7 +853,6 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -846,7 +853,6 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
SerializerFeature
.
WriteMapNullValue
):
""
;
SerializerFeature
.
WriteMapNullValue
):
""
;
}
}
// String json=list4!=null&&list4.size()>0?JSON.toJSONString(list4.get(0), SerializerFeature.PrettyFormat, SerializerFeature.WriteMapNullValue):"";
emqKeeper
.
getMqttClient
().
publish
(
topicJa
,
json
.
getBytes
(),
RuleConfig
.
DEFAULT_QOS
,
false
);
emqKeeper
.
getMqttClient
().
publish
(
topicJa
,
json
.
getBytes
(),
RuleConfig
.
DEFAULT_QOS
,
false
);
}
}
...
@@ -858,7 +864,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -858,7 +864,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
JSONObject
submitContent
=
alertSubmittedDto
.
getSubmitContent
();
JSONObject
submitContent
=
alertSubmittedDto
.
getSubmitContent
();
String
feedBack
=
submitContent
.
get
(
"editContent"
)
!=
null
?
submitContent
.
get
(
"editContent"
).
toString
():
""
;
String
feedBack
=
submitContent
.
get
(
editContent
)
!=
null
?
submitContent
.
get
(
editContent
).
toString
():
""
;
// 4.2调用短信发送接口 废弃
// 4.2调用短信发送接口 废弃
...
@@ -870,7 +876,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -870,7 +876,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
return
map
;
return
map
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
throw
new
RuntimeException
(
"报送失败,系统异常!"
);
throw
new
BadRequest
(
"报送失败,系统异常!"
);
}
}
}
}
...
@@ -907,29 +913,25 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -907,29 +913,25 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
}
}
handleFunc
(
dto
,
first
.
get
(
i
));
handleFunc
(
dto
,
first
.
get
(
i
));
LocalDateTime
dateTime
=
(
LocalDateTime
)
first
.
get
(
i
).
get
(
"recDate"
);
LocalDateTime
dateTime
=
(
LocalDateTime
)
first
.
get
(
i
).
get
(
recDate
);
Date
date
=
Date
.
from
(
dateTime
.
toInstant
(
ZoneOffset
.
of
(
"+8"
)));
Date
date
=
Date
.
from
(
dateTime
.
toInstant
(
ZoneOffset
.
of
(
"+8"
)));
report
.
setToTime
((
DateUtils
.
dateFormat
(
date
,
DateUtils
.
HOUR_PATTERN
)));
report
.
setToTime
((
DateUtils
.
dateFormat
(
date
,
DateUtils
.
HOUR_PATTERN
)));
// report.setArriveTime((DateUtils.dateFormat(date,DateUtils.HOUR_PATTERN)));
//
// dto.setArriveTime((DateUtils.dateFormat(date,DateUtils.HOUR_PATTERN)));
// list.add(dto);
// 人数
// 人数
if
(!
ObjectUtils
.
isEmpty
(
dto
.
getPersonNum
())){
if
(!
ObjectUtils
.
isEmpty
(
dto
.
getPersonNum
())){
totalPeople
=
totalPeople
.
add
(
new
BigDecimal
(
dto
.
getPersonNum
()));
totalPeople
=
totalPeople
.
add
(
new
BigDecimal
(
dto
.
getPersonNum
()));
}
}
if
(!
ObjectUtils
.
isEmpty
(
first
.
get
(
i
).
get
(
"arrivalTime"
))){
if
(!
ObjectUtils
.
isEmpty
(
first
.
get
(
i
).
get
(
arrivalTime
))){
dto
.
setArriveTime
(
first
.
get
(
i
).
get
(
"arrivalTime"
).
toString
());
dto
.
setArriveTime
(
first
.
get
(
i
).
get
(
arrivalTime
).
toString
());
if
(!
ObjectUtils
.
isEmpty
(
report
.
getArriveTime
())){
if
(!
ObjectUtils
.
isEmpty
(
report
.
getArriveTime
())){
Date
parseOld
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
parse
(
report
.
getArriveTime
());
Date
parseOld
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
parse
(
report
.
getArriveTime
());
Date
parseNew
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
parse
(
first
.
get
(
i
).
get
(
"arrivalTime"
).
toString
());
Date
parseNew
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
parse
(
first
.
get
(
i
).
get
(
arrivalTime
).
toString
());
if
(
parseNew
.
getTime
()
<
parseOld
.
getTime
()){
if
(
parseNew
.
getTime
()
<
parseOld
.
getTime
()){
report
.
setArriveTime
(
first
.
get
(
i
).
get
(
"arrivalTime"
).
toString
());
report
.
setArriveTime
(
first
.
get
(
i
).
get
(
arrivalTime
).
toString
());
}
}
}
else
{
}
else
{
report
.
setArriveTime
(
first
.
get
(
i
).
get
(
"arrivalTime"
).
toString
());
report
.
setArriveTime
(
first
.
get
(
i
).
get
(
arrivalTime
).
toString
());
}
}
}
}
...
@@ -938,15 +940,15 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -938,15 +940,15 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
if
(!
ObjectUtils
.
isEmpty
(
first
.
get
(
i
).
get
(
"id"
))){
if
(!
ObjectUtils
.
isEmpty
(
first
.
get
(
i
).
get
(
"id"
))){
longs
.
add
(
Long
.
valueOf
(
first
.
get
(
i
).
get
(
"id"
).
toString
()));
longs
.
add
(
Long
.
valueOf
(
first
.
get
(
i
).
get
(
"id"
).
toString
()));
ResponseModel
<
Map
<
String
,
Object
>>
carPropertyByCarIds
=
equipFeignClient
.
getCarPropertyByCarIds
(
longs
);
ResponseModel
<
Map
<
String
,
Object
>>
carPropertyByCarIds
=
equipFeignClient
.
getCarPropertyByCarIds
(
longs
);
if
(!
ObjectUtils
.
isEmpty
(
carPropertyByCarIds
.
getResult
().
get
(
"waterNum"
))){
if
(!
ObjectUtils
.
isEmpty
(
carPropertyByCarIds
.
getResult
().
get
(
waterNum
))){
dto
.
setWater
(
String
.
valueOf
(
carPropertyByCarIds
.
getResult
().
get
(
"waterNum"
)));
dto
.
setWater
(
String
.
valueOf
(
carPropertyByCarIds
.
getResult
().
get
(
waterNum
)));
totalWater
=
totalWater
.
add
(
new
BigDecimal
(
String
.
valueOf
(
carPropertyByCarIds
.
getResult
().
get
(
"waterNum"
))));
totalWater
=
totalWater
.
add
(
new
BigDecimal
(
String
.
valueOf
(
carPropertyByCarIds
.
getResult
().
get
(
waterNum
))));
}
else
{
}
else
{
dto
.
setWater
(
"0"
);
dto
.
setWater
(
"0"
);
}
}
if
(!
ObjectUtils
.
isEmpty
(
carPropertyByCarIds
.
getResult
().
get
(
"foamNum"
))){
if
(!
ObjectUtils
.
isEmpty
(
carPropertyByCarIds
.
getResult
().
get
(
foamNum
))){
dto
.
setFoam
(
String
.
valueOf
(
carPropertyByCarIds
.
getResult
().
get
(
"foamNum"
)));
dto
.
setFoam
(
String
.
valueOf
(
carPropertyByCarIds
.
getResult
().
get
(
foamNum
)));
totalFoam
=
totalFoam
.
add
(
new
BigDecimal
(
String
.
valueOf
(
carPropertyByCarIds
.
getResult
().
get
(
"foamNum"
))));
totalFoam
=
totalFoam
.
add
(
new
BigDecimal
(
String
.
valueOf
(
carPropertyByCarIds
.
getResult
().
get
(
foamNum
))));
}
else
{
}
else
{
dto
.
setFoam
(
"0"
);
dto
.
setFoam
(
"0"
);
}
}
...
@@ -958,24 +960,19 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -958,24 +960,19 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
AlertCalledPowerInfoDto
dto
=
new
AlertCalledPowerInfoDto
();
AlertCalledPowerInfoDto
dto
=
new
AlertCalledPowerInfoDto
();
handleFunc
(
dto
,
other
.
get
(
i
));
handleFunc
(
dto
,
other
.
get
(
i
));
// LocalDateTime dateTime = (LocalDateTime)other.get(i).get("recDate");
// Date date = Date.from(dateTime.toInstant(ZoneOffset.of("+8")));
//
// dto.setArriveTime((DateUtils.dateFormat(date,DateUtils.HOUR_PATTERN)));
// list.add(dto);
if
(!
ObjectUtils
.
isEmpty
(
dto
.
getPersonNum
())){
if
(!
ObjectUtils
.
isEmpty
(
dto
.
getPersonNum
())){
totalPeople
=
totalPeople
.
add
(
new
BigDecimal
(
dto
.
getPersonNum
()));
totalPeople
=
totalPeople
.
add
(
new
BigDecimal
(
dto
.
getPersonNum
()));
}
}
if
(!
ObjectUtils
.
isEmpty
(
other
.
get
(
i
).
get
(
"arrivalTime"
))){
if
(!
ObjectUtils
.
isEmpty
(
other
.
get
(
i
).
get
(
arrivalTime
))){
dto
.
setArriveTime
(
other
.
get
(
i
).
get
(
"arrivalTime"
).
toString
());
dto
.
setArriveTime
(
other
.
get
(
i
).
get
(
arrivalTime
).
toString
());
if
(!
ObjectUtils
.
isEmpty
(
report
.
getArriveTime
())){
if
(!
ObjectUtils
.
isEmpty
(
report
.
getArriveTime
())){
Date
parseOld
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
parse
(
report
.
getArriveTime
());
Date
parseOld
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
parse
(
report
.
getArriveTime
());
Date
parseNew
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
parse
(
other
.
get
(
i
).
get
(
"arrivalTime"
).
toString
());
Date
parseNew
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
parse
(
other
.
get
(
i
).
get
(
arrivalTime
).
toString
());
if
(
parseNew
.
getTime
()
<
parseOld
.
getTime
()){
if
(
parseNew
.
getTime
()
<
parseOld
.
getTime
()){
report
.
setArriveTime
(
other
.
get
(
i
).
get
(
"arrivalTime"
).
toString
());
report
.
setArriveTime
(
other
.
get
(
i
).
get
(
arrivalTime
).
toString
());
}
}
}
else
{
}
else
{
report
.
setArriveTime
(
other
.
get
(
i
).
get
(
"arrivalTime"
).
toString
());
report
.
setArriveTime
(
other
.
get
(
i
).
get
(
arrivalTime
).
toString
());
}
}
}
}
...
@@ -984,15 +981,15 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -984,15 +981,15 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
if
(!
ObjectUtils
.
isEmpty
(
other
.
get
(
i
).
get
(
"id"
))){
if
(!
ObjectUtils
.
isEmpty
(
other
.
get
(
i
).
get
(
"id"
))){
longs
.
add
(
Long
.
valueOf
(
other
.
get
(
i
).
get
(
"id"
).
toString
()));
longs
.
add
(
Long
.
valueOf
(
other
.
get
(
i
).
get
(
"id"
).
toString
()));
ResponseModel
<
Map
<
String
,
Object
>>
carPropertyByCarIds
=
equipFeignClient
.
getCarPropertyByCarIds
(
longs
);
ResponseModel
<
Map
<
String
,
Object
>>
carPropertyByCarIds
=
equipFeignClient
.
getCarPropertyByCarIds
(
longs
);
if
(!
ObjectUtils
.
isEmpty
(
carPropertyByCarIds
.
getResult
().
get
(
"waterNum"
))){
if
(!
ObjectUtils
.
isEmpty
(
carPropertyByCarIds
.
getResult
().
get
(
waterNum
))){
dto
.
setWater
(
String
.
valueOf
(
carPropertyByCarIds
.
getResult
().
get
(
"waterNum"
)));
dto
.
setWater
(
String
.
valueOf
(
carPropertyByCarIds
.
getResult
().
get
(
waterNum
)));
totalWater
=
totalWater
.
add
(
new
BigDecimal
(
String
.
valueOf
(
carPropertyByCarIds
.
getResult
().
get
(
"waterNum"
))));
totalWater
=
totalWater
.
add
(
new
BigDecimal
(
String
.
valueOf
(
carPropertyByCarIds
.
getResult
().
get
(
waterNum
))));
}
else
{
}
else
{
dto
.
setWater
(
"0"
);
dto
.
setWater
(
"0"
);
}
}
if
(!
ObjectUtils
.
isEmpty
(
carPropertyByCarIds
.
getResult
().
get
(
"foamNum"
))){
if
(!
ObjectUtils
.
isEmpty
(
carPropertyByCarIds
.
getResult
().
get
(
foamNum
))){
dto
.
setFoam
(
String
.
valueOf
(
carPropertyByCarIds
.
getResult
().
get
(
"foamNum"
)));
dto
.
setFoam
(
String
.
valueOf
(
carPropertyByCarIds
.
getResult
().
get
(
foamNum
)));
totalFoam
=
totalFoam
.
add
(
new
BigDecimal
(
String
.
valueOf
(
carPropertyByCarIds
.
getResult
().
get
(
"foamNum"
))));
totalFoam
=
totalFoam
.
add
(
new
BigDecimal
(
String
.
valueOf
(
carPropertyByCarIds
.
getResult
().
get
(
foamNum
))));
}
else
{
}
else
{
dto
.
setFoam
(
"0"
);
dto
.
setFoam
(
"0"
);
}
}
...
@@ -1018,22 +1015,6 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -1018,22 +1015,6 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
}
}
// // 查询应急指挥辅屏值班人员
// List<Map<String, Object>> mapList = iDutyPersonService.listOnDutyPerson();
// List<AlertCallCommandDto> list1 = new ArrayList<>();
// mapList.forEach(e->{
// AlertCallCommandDto dto = new AlertCallCommandDto();
// dto.setName(e.get("userName").toString());
// dto.setDuty(e.get("postTypeName").toString());
// list1.add(dto);
// });
//
// if (mapList.size() == 0) {
// AlertCallCommandDto commandDto = new AlertCallCommandDto();
// commandDto.setName("");
// commandDto.setDuty("");
// list1.add(commandDto);
// }
report
.
setTotalWater
(
String
.
valueOf
(
totalWater
));
report
.
setTotalWater
(
String
.
valueOf
(
totalWater
));
report
.
setTotalFoam
(
String
.
valueOf
(
totalFoam
));
report
.
setTotalFoam
(
String
.
valueOf
(
totalFoam
));
...
@@ -1049,18 +1030,12 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -1049,18 +1030,12 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
InputStream
resourceAsStream
=
this
.
getClass
().
getClassLoader
().
getResourceAsStream
(
"templates/check-report-template.docx"
);
InputStream
resourceAsStream
=
this
.
getClass
().
getClassLoader
().
getResourceAsStream
(
"templates/check-report-template.docx"
);
String
path
=
this
.
getClass
().
getProtectionDomain
().
getCodeSource
().
getLocation
().
getPath
();
String
path
=
this
.
getClass
().
getProtectionDomain
().
getCodeSource
().
getLocation
().
getPath
();
// String checkReportTemplatePath = this.getClass().getClassLoader().getResource("templates/check-report-template" +
// String checkReportTemplatePath = this.getClass().getClassLoader().getResource("templates/check-report-template" +
// ".docx").getFile();
// String filePath = this.getClass().getClassLoader().getResource("templates").getPath();
String
filePath
=
""
;
String
filePath
=
""
;
String
fileName
=
""
;
String
fileName
=
""
;
if
(
os
.
toLowerCase
().
startsWith
(
"win"
))
{
if
(
os
.
toLowerCase
().
startsWith
(
"win"
))
{
filePath
=
this
.
getClass
().
getClassLoader
().
getResource
(
"templates"
).
getPath
();
filePath
=
this
.
getClass
().
getClassLoader
().
getResource
(
"templates"
).
getPath
();
fileName
=
filePath
+
"/"
+
System
.
currentTimeMillis
()
+
".docx"
;
fileName
=
filePath
+
"/"
+
System
.
currentTimeMillis
()
+
".docx"
;
}
else
{
}
else
{
// String [] arr = path.split("amos-boot-system-jcs-1.0.0.jar!");
// System.out.println(arr[0].substring(0,arr[0].lastIndexOf("/")));
// fileName = arr[0].substring(0,arr[0].lastIndexOf("/")) + "/" + System.currentTimeMillis() + ".docx";
fileName
=
"/opt/file/"
+
System
.
currentTimeMillis
()
+
".docx"
;
fileName
=
"/opt/file/"
+
System
.
currentTimeMillis
()
+
".docx"
;
}
}
...
@@ -1111,14 +1086,13 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -1111,14 +1086,13 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
document
.
saveToFile
(
pa1
,
FileFormat
.
Doc
);
document
.
saveToFile
(
pa1
,
FileFormat
.
Doc
);
}
else
{
}
else
{
document
.
loadFromFile
(
fileName
);
document
.
loadFromFile
(
fileName
);
System
.
out
.
printl
n
(
fileName
);
log
.
war
n
(
fileName
);
newFileName
=
"/opt/file/"
+
System
.
currentTimeMillis
()+
".doc"
;
newFileName
=
"/opt/file/"
+
System
.
currentTimeMillis
()+
".doc"
;
System
.
out
.
printl
n
(
newFileName
);
log
.
war
n
(
newFileName
);
document
.
saveToFile
(
newFileName
,
FileFormat
.
Doc
);
document
.
saveToFile
(
newFileName
,
FileFormat
.
Doc
);
pa1
=
newFileName
;
pa1
=
newFileName
;
}
}
System
.
out
.
println
(
pa1
);
log
.
warn
(
pa1
);
FeignClientResult
<
Map
<
String
,
String
>>
date
=
Systemctl
.
fileStorageClient
.
updateCommonFile
(
WordConverterUtils
.
fileToMultipartFile
(
new
File
(
pa1
)));
FeignClientResult
<
Map
<
String
,
String
>>
date
=
Systemctl
.
fileStorageClient
.
updateCommonFile
(
WordConverterUtils
.
fileToMultipartFile
(
new
File
(
pa1
)));
if
(
date
!=
null
)
{
if
(
date
!=
null
)
{
...
@@ -1128,7 +1102,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -1128,7 +1102,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
urlString
=
it
.
next
();
urlString
=
it
.
next
();
}
}
}
}
System
.
out
.
printl
n
(
urlString
);
log
.
war
n
(
urlString
);
// 更新警情信息
// 更新警情信息
alertCalled
.
setRecordUrl
(
urlString
);
alertCalled
.
setRecordUrl
(
urlString
);
...
@@ -1162,7 +1136,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -1162,7 +1136,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
dto
.
setCarName
(
map
.
get
(
"carName"
).
toString
());
dto
.
setCarName
(
map
.
get
(
"carName"
).
toString
());
}
}
dto
.
setStation
(
map
.
get
(
"companyName"
).
toString
());
dto
.
setStation
(
map
.
get
(
companyName
).
toString
());
// 随车人员
// 随车人员
if
(
map
.
containsKey
(
"id"
))
{
if
(
map
.
containsKey
(
"id"
))
{
List
<
PowerData
>
powerDataOne
=
powerTransferMapper
.
getPowerDataOne
(
Long
.
valueOf
(
map
.
get
(
"id"
).
toString
()));
List
<
PowerData
>
powerDataOne
=
powerTransferMapper
.
getPowerDataOne
(
Long
.
valueOf
(
map
.
get
(
"id"
).
toString
()));
...
@@ -1347,8 +1321,8 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -1347,8 +1321,8 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
public
void
getAlertSubmittedContent
(
Long
alertCalledId
,
ArrayList
<
TemplateDto
>
templateDtos
,
String
companyName
)
throws
IllegalAccessException
,
ParseException
{
public
void
getAlertSubmittedContent
(
Long
alertCalledId
,
ArrayList
<
TemplateDto
>
templateDtos
,
String
companyName
)
throws
IllegalAccessException
,
ParseException
{
AlertCalled
alertCalled
=
alertCalledService
.
getById
(
alertCalledId
);
AlertCalled
alertCalled
=
alertCalledService
.
getById
(
alertCalledId
);
Map
<
String
,
Object
>
map
=
objectToMap
(
alertCalled
);
Map
<
String
,
Object
>
map
=
objectToMap
(
alertCalled
);
map
.
put
(
"companyName"
,
companyName
);
map
.
put
(
companyName
,
companyName
);
map
.
put
(
"editContent"
,
"可自编辑续报内容"
);
map
.
put
(
editContent
,
"可自编辑续报内容"
);
AlertCalledObjsDto
alertCalledVo
=
(
AlertCalledObjsDto
)
alertCalledService
.
selectAlertCalledByIdNoRedisNew
(
alertCalled
.
getSequenceNbr
());
AlertCalledObjsDto
alertCalledVo
=
(
AlertCalledObjsDto
)
alertCalledService
.
selectAlertCalledByIdNoRedisNew
(
alertCalled
.
getSequenceNbr
());
...
@@ -1374,9 +1348,9 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -1374,9 +1348,9 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
definitions
.
put
(
"$contactUser"
,
ValidationUtil
.
isEmpty
(
alertCalled
.
getContactUser
())
?
""
:
alertCalled
.
getContactUser
()
);
definitions
.
put
(
"$contactUser"
,
ValidationUtil
.
isEmpty
(
alertCalled
.
getContactUser
())
?
""
:
alertCalled
.
getContactUser
()
);
definitions
.
put
(
"$contactPhone"
,
ValidationUtil
.
isEmpty
(
alertCalled
.
getContactPhone
())
?
""
:
alertCalled
.
getContactPhone
()
);
definitions
.
put
(
"$contactPhone"
,
ValidationUtil
.
isEmpty
(
alertCalled
.
getContactPhone
())
?
""
:
alertCalled
.
getContactPhone
()
);
if
(
alertCalled
.
getAlertStatus
())
{
if
(
alertCalled
.
getAlertStatus
())
{
map
.
put
(
"recDate"
,
DateUtils
.
convertDateToString
(
alertCalled
.
getUpdateTime
(),
DateUtils
.
DATE_TIME_PATTERN
));
map
.
put
(
recDate
,
DateUtils
.
convertDateToString
(
alertCalled
.
getUpdateTime
(),
DateUtils
.
DATE_TIME_PATTERN
));
}
else
{
}
else
{
map
.
put
(
"recDate"
,
DateUtils
.
convertDateToString
(
new
Date
(),
DateUtils
.
DATE_TIME_PATTERN
));
map
.
put
(
recDate
,
DateUtils
.
convertDateToString
(
new
Date
(),
DateUtils
.
DATE_TIME_PATTERN
));
}
}
String
content
=
getTaskInformation
(
template
.
getContent
(),
definitions
);
String
content
=
getTaskInformation
(
template
.
getContent
(),
definitions
);
...
@@ -1438,12 +1412,12 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -1438,12 +1412,12 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
case
"警情初报"
:
case
"警情初报"
:
content
=
"通知"
+
AlertSubmittedZHDto
.
getCompanyName
()
+
":"
+
AlertSubmittedZHDto
.
getUserName
()
+
","
+
js
.
getString
(
"address"
)
+
"发生"
+
js
.
getString
(
"alertType"
);
content
=
"通知"
+
AlertSubmittedZHDto
.
getCompanyName
()
+
":"
+
AlertSubmittedZHDto
.
getUserName
()
+
","
+
js
.
getString
(
address
)
+
"发生"
+
js
.
getString
(
alertType
);
break
;
break
;
case
"警情续报"
:
case
"警情续报"
:
content
=
"通知"
+
AlertSubmittedZHDto
.
getCompanyName
()
+
":"
+
AlertSubmittedZHDto
.
getUserName
()
+
","
+
"现场被困人数:"
+
js
.
getString
(
"trappedNum"
)
+
"人伤亡人数:"
+
js
.
getString
(
"casualtiesNum"
)
+
"人。"
;
content
=
"通知"
+
AlertSubmittedZHDto
.
getCompanyName
()
+
":"
+
AlertSubmittedZHDto
.
getUserName
()
+
","
+
"现场被困人数:"
+
js
.
getString
(
trappedNum
)
+
"人伤亡人数:"
+
js
.
getString
(
casualtiesNum
)
+
"人。"
;
break
;
break
;
case
"非警情确认"
:
case
"非警情确认"
:
...
@@ -1465,7 +1439,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -1465,7 +1439,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
});
});
// 获取归并得警情信息
// 获取归并得警情信息
LambdaQueryWrapper
<
AlertCalled
>
queryWrapper
=
new
LambdaQueryWrapper
();
LambdaQueryWrapper
<
AlertCalled
>
queryWrapper
=
new
LambdaQueryWrapper
<
AlertCalled
>
();
queryWrapper
.
eq
(
AlertCalled:
:
getFatherAlert
,
id
);
queryWrapper
.
eq
(
AlertCalled:
:
getFatherAlert
,
id
);
List
<
AlertCalled
>
alertCalleds
=
alertCalledService
.
getBaseMapper
().
selectList
(
queryWrapper
);
List
<
AlertCalled
>
alertCalleds
=
alertCalledService
.
getBaseMapper
().
selectList
(
queryWrapper
);
alertCalleds
.
stream
().
forEach
(
e
->{
alertCalleds
.
stream
().
forEach
(
e
->{
...
@@ -1482,7 +1456,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -1482,7 +1456,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
});
});
//增加自定义指令信息:实战指挥需求【1575】
//增加自定义指令信息:实战指挥需求【1575】
LambdaQueryWrapper
<
JcSituationDetail
>
qw
=
new
LambdaQueryWrapper
();
LambdaQueryWrapper
<
JcSituationDetail
>
qw
=
new
LambdaQueryWrapper
<
JcSituationDetail
>
();
qw
.
eq
(
JcSituationDetail:
:
getAlertCalledId
,
id
);
qw
.
eq
(
JcSituationDetail:
:
getAlertCalledId
,
id
);
List
<
JcSituationDetail
>
jcSituationDetailList
=
jcSituationDetailMapper
.
selectList
(
qw
);
List
<
JcSituationDetail
>
jcSituationDetailList
=
jcSituationDetailMapper
.
selectList
(
qw
);
...
@@ -1495,7 +1469,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -1495,7 +1469,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
if
(
item
.
getInfo
().
contains
(
"/photos:"
)){
if
(
item
.
getInfo
().
contains
(
"/photos:"
)){
String
[]
info
=
item
.
getInfo
().
split
(
"/photos:"
);
String
[]
info
=
item
.
getInfo
().
split
(
"/photos:"
);
String
photoUrl
=
info
[
1
];
String
photoUrl
=
info
[
1
];
StringBu
ffer
stringBuffer
=
new
StringBuff
er
();
StringBu
ilder
stringBuffer
=
new
StringBuild
er
();
if
(
photoUrl
.
contains
(
","
)){
if
(
photoUrl
.
contains
(
","
)){
List
<
String
>
list
=
Arrays
.
asList
(
photoUrl
.
split
(
","
));
List
<
String
>
list
=
Arrays
.
asList
(
photoUrl
.
split
(
","
));
...
@@ -1563,7 +1537,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -1563,7 +1537,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
@SuppressWarnings
(
"unchecked"
)
@SuppressWarnings
(
"unchecked"
)
public
void
ruleCallbackActionForPowerTransferForCar
(
String
smsCode
,
List
sendIds
,
Object
object
,
List
<
Map
<
String
,
Object
>>
pList
)
public
void
ruleCallbackActionForPowerTransferForCar
(
String
smsCode
,
List
<
Object
>
sendIds
,
Object
object
,
List
<
Map
<
String
,
Object
>>
pList
)
throws
IllegalAccessException
,
MqttPersistenceException
,
MqttException
{
throws
IllegalAccessException
,
MqttPersistenceException
,
MqttException
{
List
<
AlertSubmittedObject
>
alertSubmittedObjectList
=
Lists
.
newArrayList
();
List
<
AlertSubmittedObject
>
alertSubmittedObjectList
=
Lists
.
newArrayList
();
...
@@ -1594,9 +1568,9 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -1594,9 +1568,9 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
sendIds
.
stream
().
forEach
(
e
->
{
sendIds
.
stream
().
forEach
(
e
->
{
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
e
));
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
e
));
// 消救部
// 消救部
if
(
jsonObject
.
containsKey
(
"airportUnit"
))
{
if
(
jsonObject
.
containsKey
(
airportUnit
))
{
String
departmentName
=
jsonObject
.
getString
(
"name"
);
String
departmentName
=
jsonObject
.
getString
(
"name"
);
if
(
jsonObject
.
containsKey
(
"airportUnit"
))
{
{
if
(
jsonObject
.
containsKey
(
airportUnit
))
{
{
List
<
Map
<
String
,
Object
>>
mapList
=
dynamicFormInstanceMapper
.
getFireRescueDepartmentStaff
(
departmentName
,
null
);
List
<
Map
<
String
,
Object
>>
mapList
=
dynamicFormInstanceMapper
.
getFireRescueDepartmentStaff
(
departmentName
,
null
);
userIdList
.
addAll
(
mapList
);
userIdList
.
addAll
(
mapList
);
}
}
...
@@ -1608,12 +1582,12 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -1608,12 +1582,12 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
}
}
}
}
});
});
List
<
Object
>
companyDetail
=
JSON
Array
.
parseArray
(
JSON
.
toJSON
(
calledRo
.
getCompany
()).
toString
(),
Object
.
class
);
List
<
Object
>
companyDetail
=
JSON
.
parseArray
(
JSON
.
toJSON
(
calledRo
.
getCompany
()).
toString
(),
Object
.
class
);
for
(
Object
powerTransferCompanyDto
:
companyDetail
)
{
for
(
Object
powerTransferCompanyDto
:
companyDetail
)
{
PowerTransferCompanyDto
powerDto
=
JSON
.
parseObject
(
JSON
.
toJSON
(
powerTransferCompanyDto
).
toString
(),
PowerTransferCompanyDto
.
class
);
PowerTransferCompanyDto
powerDto
=
JSON
.
parseObject
(
JSON
.
toJSON
(
powerTransferCompanyDto
).
toString
(),
PowerTransferCompanyDto
.
class
);
Long
companyId
=
powerDto
.
getCompanyId
();
Long
companyId
=
powerDto
.
getCompanyId
();
String
company
Name
=
powerDto
.
getCompanyName
();
String
company
=
powerDto
.
getCompanyName
();
StringBu
ffer
resourcesNum
=
new
StringBuff
er
();
StringBu
ilder
resourcesNum
=
new
StringBuild
er
();
Set
<
Map
<
String
,
Object
>>
sendUserIds
=
new
HashSet
<
Map
<
String
,
Object
>>();
Set
<
Map
<
String
,
Object
>>
sendUserIds
=
new
HashSet
<
Map
<
String
,
Object
>>();
FireTeam
fireTeam
=
fireTeamServiceImpl
.
getById
(
companyId
);
FireTeam
fireTeam
=
fireTeamServiceImpl
.
getById
(
companyId
);
sendIds
.
stream
().
forEach
(
e
->
{
sendIds
.
stream
().
forEach
(
e
->
{
...
@@ -1658,10 +1632,10 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -1658,10 +1632,10 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
alertSubmittedObject
.
setAlertSubmittedId
(
Long
.
parseLong
(
alertSubmittedId
));
alertSubmittedObject
.
setAlertSubmittedId
(
Long
.
parseLong
(
alertSubmittedId
));
alertSubmittedObject
.
setType
(
false
);
alertSubmittedObject
.
setType
(
false
);
alertSubmittedObject
.
setCompanyId
(
companyId
);
alertSubmittedObject
.
setCompanyId
(
companyId
);
alertSubmittedObject
.
setCompanyName
(
company
Name
);
alertSubmittedObject
.
setCompanyName
(
company
);
alertSubmittedObject
.
setType
(
false
);
alertSubmittedObject
.
setType
(
false
);
alertSubmittedObject
.
setUserId
(
Long
.
parseLong
(
orgUser
.
get
(
"userId"
).
toString
()));
alertSubmittedObject
.
setUserId
(
Long
.
parseLong
(
orgUser
.
get
(
userId
).
toString
()));
alertSubmittedObject
.
setTheUser
(
orgUser
.
get
(
"userName"
).
toString
());
alertSubmittedObject
.
setTheUser
(
orgUser
.
get
(
userName
).
toString
());
// 将发送人放入 list
// 将发送人放入 list
pList
.
add
(
orgUser
);
pList
.
add
(
orgUser
);
...
@@ -1672,15 +1646,15 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -1672,15 +1646,15 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
}
}
alertSubmittedObjectList
.
add
(
alertSubmittedObject
);
alertSubmittedObjectList
.
add
(
alertSubmittedObject
);
}
}
smsParams
.
put
(
"callTimeStr"
,
calledRo
.
getCallTimeStr
());
smsParams
.
put
(
callTimeStr
,
calledRo
.
getCallTimeStr
());
smsParams
.
put
(
"address"
,
calledRo
.
getAddress
());
smsParams
.
put
(
address
,
calledRo
.
getAddress
());
smsParams
.
put
(
"content"
,
calledRo
.
getContent
());
smsParams
.
put
(
"content"
,
calledRo
.
getContent
());
smsParams
.
put
(
"trappedNum"
,
calledRo
.
getTrappedNum
());
smsParams
.
put
(
trappedNum
,
calledRo
.
getTrappedNum
());
smsParams
.
put
(
"casualtiesNum"
,
calledRo
.
getCasualtiesNum
());
smsParams
.
put
(
casualtiesNum
,
calledRo
.
getCasualtiesNum
());
smsParams
.
put
(
"companyName"
,
calledRo
.
getCompanyName
());
smsParams
.
put
(
companyName
,
calledRo
.
getCompanyName
());
smsParams
.
put
(
"contactUser"
,
calledRo
.
getContactUser
());
smsParams
.
put
(
contactUser
,
calledRo
.
getContactUser
());
smsParams
.
put
(
"contactPhone"
,
calledRo
.
getContactPhone
());
smsParams
.
put
(
contactPhone
,
calledRo
.
getContactPhone
());
smsParams
.
put
(
"alertType"
,
calledRo
.
getAlertType
());
smsParams
.
put
(
alertType
,
calledRo
.
getAlertType
());
List
<
PowerTransferCompanyResourcesDto
>
list
=
powerDto
List
<
PowerTransferCompanyResourcesDto
>
list
=
powerDto
.
getPowerTransferCompanyResourcesDtoList
();
.
getPowerTransferCompanyResourcesDtoList
();
// 查询已绑定车辆人员id
// 查询已绑定车辆人员id
...
@@ -1696,7 +1670,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -1696,7 +1670,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
resourcesNum
.
append
(
"、"
);
resourcesNum
.
append
(
"、"
);
if
(
designatedDriver
)
{
if
(
designatedDriver
)
{
// 发送单个车辆的信息数据到客户
// 发送单个车辆的信息数据到客户
smsParams
.
put
(
"resourcesNum"
,
smsParams
.
put
(
resourceNum
,
resourcesNum
.
toString
());
resourcesNum
.
toString
());
List
<
AlertSubmittedObject
>
alertSubmittedObjectListSub
=
Lists
.
newArrayList
();
List
<
AlertSubmittedObject
>
alertSubmittedObjectListSub
=
Lists
.
newArrayList
();
Map
<
String
,
Object
>
map
=
dynamicFormInstanceMapper
Map
<
String
,
Object
>
map
=
dynamicFormInstanceMapper
...
@@ -1705,49 +1679,49 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -1705,49 +1679,49 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
alertSubmittedObjectSub
.
setAlertSubmittedId
(
Long
.
parseLong
(
alertSubmittedId
));
alertSubmittedObjectSub
.
setAlertSubmittedId
(
Long
.
parseLong
(
alertSubmittedId
));
alertSubmittedObjectSub
.
setType
(
false
);
alertSubmittedObjectSub
.
setType
(
false
);
alertSubmittedObjectSub
.
setCompanyId
(
companyId
);
alertSubmittedObjectSub
.
setCompanyId
(
companyId
);
alertSubmittedObjectSub
.
setCompanyName
(
company
Name
);
alertSubmittedObjectSub
.
setCompanyName
(
company
);
alertSubmittedObjectSub
.
setType
(
false
);
alertSubmittedObjectSub
.
setType
(
false
);
if
(
map
==
null
||
!
map
.
containsKey
(
"userId"
))
{
if
(
map
==
null
||
!
map
.
containsKey
(
userId
))
{
continue
;
continue
;
}
}
alertSubmittedObjectSub
.
setUserId
(
Long
.
parseLong
(
map
.
get
(
"userId"
).
toString
()));
alertSubmittedObjectSub
.
setUserId
(
Long
.
parseLong
(
map
.
get
(
userId
).
toString
()));
alertSubmittedObjectSub
.
setTheUser
(
map
.
get
(
"userName"
).
toString
());
alertSubmittedObjectSub
.
setTheUser
(
map
.
get
(
userName
).
toString
());
//
//
pList
.
add
(
map
);
pList
.
add
(
map
);
Set
<
String
>
mobile
=
null
;
Set
<
String
>
mobile
=
null
;
List
<
String
>
userList
=
null
;
List
<
String
>
userList
=
null
;
if
(!
ValidationUtil
.
isEmpty
(
map
.
get
(
"mobilePhone"
)))
{
if
(!
ValidationUtil
.
isEmpty
(
map
.
get
(
mobilePhone
)))
{
mobile
=
new
HashSet
<
String
>()
{
mobile
=
new
HashSet
<
String
>()
{
{
{
add
(
map
.
get
(
"mobilePhone"
).
toString
());
add
(
map
.
get
(
mobilePhone
).
toString
());
}
}
};
};
userList
=
new
ArrayList
<
String
>();
userList
=
new
ArrayList
<
String
>();
// 车辆绑定人发送的是待办任务
// 车辆绑定人发送的是待办任务
if
(!
ValidationUtil
.
isEmpty
(
map
.
get
(
"amosId"
)))
{
if
(!
ValidationUtil
.
isEmpty
(
map
.
get
(
amosId
)))
{
if
(!
CollectionUtils
.
isEmpty
(
userIds
)){
if
(!
CollectionUtils
.
isEmpty
(
userIds
)){
if
(
userIds
.
contains
(
Long
.
valueOf
(
map
.
get
(
"amosId"
).
toString
()))){
if
(
userIds
.
contains
(
Long
.
valueOf
(
map
.
get
(
amosId
).
toString
()))){
Map
<
String
,
String
>
besidesMap
=
new
HashMap
<
String
,
String
>();
Map
<
String
,
String
>
besidesMap
=
new
HashMap
<
String
,
String
>();
besidesMap
.
put
(
"responseLevelString"
,
responseLevelString
);
besidesMap
.
put
(
"responseLevelString"
,
responseLevelString
);
besidesMap
.
put
(
"alterId"
,
alertCalledId
);
besidesMap
.
put
(
alterId
,
alertCalledId
);
ArrayList
<
String
>
strings
=
new
ArrayList
<>();
ArrayList
<
String
>
strings
=
new
ArrayList
<>();
strings
.
add
(
map
.
get
(
"amosId"
).
toString
());
strings
.
add
(
map
.
get
(
amosId
).
toString
());
pushPowerTransferToAppAndWeb
(
AlertBusinessTypeEnum
.
力量调派
.
getCode
(),
besidesMap
,
smsParams
,
strings
,
RuleConstant
.
TASK
);
pushPowerTransferToAppAndWeb
(
AlertBusinessTypeEnum
.
力量调派
.
getCode
(),
besidesMap
,
smsParams
,
strings
,
RuleConstant
.
TASK
);
}
else
{
}
else
{
userList
.
add
(
map
.
get
(
"amosId"
).
toString
());
userList
.
add
(
map
.
get
(
amosId
).
toString
());
}
}
}
else
{
}
else
{
userList
.
add
(
map
.
get
(
"amosId"
).
toString
());
userList
.
add
(
map
.
get
(
amosId
).
toString
());
}
}
}
}
alertSubmittedObjectSub
.
setUserPhone
(
map
.
get
(
"mobilePhone"
).
toString
());
alertSubmittedObjectSub
.
setUserPhone
(
map
.
get
(
mobilePhone
).
toString
());
}
}
alertSubmittedObjectListSub
.
add
(
alertSubmittedObjectSub
);
alertSubmittedObjectListSub
.
add
(
alertSubmittedObjectSub
);
// 调用短信发送接口
// 调用短信发送接口
alertCalledAction
.
sendAlertCalleCmd
(
smsCode
,
mobile
,
smsParams
);
alertCalledAction
.
sendAlertCalleCmd
(
smsCode
,
mobile
,
smsParams
);
Map
<
String
,
String
>
besidesMap
=
new
HashMap
<
String
,
String
>();
Map
<
String
,
String
>
besidesMap
=
new
HashMap
<
String
,
String
>();
besidesMap
.
put
(
"responseLevelString"
,
responseLevelString
);
besidesMap
.
put
(
"responseLevelString"
,
responseLevelString
);
besidesMap
.
put
(
"alterId"
,
alertCalledId
);
besidesMap
.
put
(
alterId
,
alertCalledId
);
if
(!
ValidationUtil
.
isEmpty
(
userList
))
{
if
(!
ValidationUtil
.
isEmpty
(
userList
))
{
pushPowerTransferToAppAndWeb
(
AlertBusinessTypeEnum
.
力量调派
.
getCode
(),
besidesMap
,
smsParams
,
userList
,
null
);
pushPowerTransferToAppAndWeb
(
AlertBusinessTypeEnum
.
力量调派
.
getCode
(),
besidesMap
,
smsParams
,
userList
,
null
);
}
}
...
@@ -1761,18 +1735,18 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -1761,18 +1735,18 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
List
<
String
>
userList
=
new
ArrayList
<
String
>();
List
<
String
>
userList
=
new
ArrayList
<
String
>();
ArrayList
<
String
>
taskUserIds
=
new
ArrayList
<>();
ArrayList
<
String
>
taskUserIds
=
new
ArrayList
<>();
sendUser
.
stream
().
forEach
(
i
->
{
sendUser
.
stream
().
forEach
(
i
->
{
if
(
i
.
containsKey
(
"mobilePhone"
))
{
if
(
i
.
containsKey
(
mobilePhone
))
{
mobiles
.
add
(
i
.
get
(
"mobilePhone"
).
toString
());
mobiles
.
add
(
i
.
get
(
mobilePhone
).
toString
());
}
}
if
(
i
.
containsKey
(
"amosId"
)&&
!
ValidationUtil
.
isEmpty
(
i
.
get
(
"amosId"
)))
{
if
(
i
.
containsKey
(
amosId
)&&
!
ValidationUtil
.
isEmpty
(
i
.
get
(
amosId
)))
{
if
(!
CollectionUtils
.
isEmpty
(
userIds
)){
if
(!
CollectionUtils
.
isEmpty
(
userIds
)){
if
(
userIds
.
contains
(
Long
.
valueOf
(
i
.
get
(
"amosId"
).
toString
()))){
if
(
userIds
.
contains
(
Long
.
valueOf
(
i
.
get
(
amosId
).
toString
()))){
taskUserIds
.
add
(
i
.
get
(
"amosId"
).
toString
());
taskUserIds
.
add
(
i
.
get
(
amosId
).
toString
());
}
else
{
}
else
{
userList
.
add
(
i
.
get
(
"amosId"
).
toString
());
userList
.
add
(
i
.
get
(
amosId
).
toString
());
}
}
}
else
{
}
else
{
userList
.
add
(
i
.
get
(
"amosId"
).
toString
());
userList
.
add
(
i
.
get
(
amosId
).
toString
());
}
}
}
}
...
@@ -1781,10 +1755,10 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -1781,10 +1755,10 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
if
(!
CollectionUtils
.
isEmpty
(
taskUserIds
)){
if
(!
CollectionUtils
.
isEmpty
(
taskUserIds
)){
Map
<
String
,
String
>
besidesMap
=
new
HashMap
<
String
,
String
>();
Map
<
String
,
String
>
besidesMap
=
new
HashMap
<
String
,
String
>();
besidesMap
.
put
(
"responseLevelString"
,
responseLevelString
);
//响应级别
besidesMap
.
put
(
"responseLevelString"
,
responseLevelString
);
//响应级别
besidesMap
.
put
(
"alterId"
,
alertCalledId
);
besidesMap
.
put
(
alterId
,
alertCalledId
);
pushPowerTransferToAppAndWeb
(
AlertBusinessTypeEnum
.
力量调派
.
getCode
(),
besidesMap
,
smsParams
,
taskUserIds
,
RuleConstant
.
TASK
);
pushPowerTransferToAppAndWeb
(
AlertBusinessTypeEnum
.
力量调派
.
getCode
(),
besidesMap
,
smsParams
,
taskUserIds
,
RuleConstant
.
TASK
);
}
}
smsParams
.
put
(
"resourcesNum"
,
resourcesNumStr
);
smsParams
.
put
(
resourceNum
,
resourcesNumStr
);
// 短信报送对象
// 短信报送对象
// 发送任务消息
// 发送任务消息
// 组织短信内容
// 组织短信内容
...
@@ -1792,10 +1766,11 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -1792,10 +1766,11 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
try
{
try
{
alertCalledAction
.
sendAlertCalleCmd
(
smsCode
,
mobiles
,
smsParams
);
alertCalledAction
.
sendAlertCalleCmd
(
smsCode
,
mobiles
,
smsParams
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
Map
<
String
,
String
>
besidesMap
=
new
HashMap
<
String
,
String
>();
Map
<
String
,
String
>
besidesMap
=
new
HashMap
<
String
,
String
>();
besidesMap
.
put
(
"responseLevelString"
,
responseLevelString
);
//响应级别
besidesMap
.
put
(
"responseLevelString"
,
responseLevelString
);
//响应级别
besidesMap
.
put
(
"alterId"
,
alertCalledId
);
besidesMap
.
put
(
alterId
,
alertCalledId
);
if
(
userList
.
size
()>
0
)
{
if
(
userList
.
size
()>
0
)
{
pushPowerTransferToAppAndWeb
(
AlertBusinessTypeEnum
.
力量调派
.
getCode
(),
besidesMap
,
smsParams
,
userList
,
null
);
pushPowerTransferToAppAndWeb
(
AlertBusinessTypeEnum
.
力量调派
.
getCode
(),
besidesMap
,
smsParams
,
userList
,
null
);
}
}
...
@@ -1813,7 +1788,7 @@ public Set<Map<String, Object>> getwone(Set<Map<String, Object>> sendUserIds){
...
@@ -1813,7 +1788,7 @@ 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
);
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
());
...
@@ -1828,7 +1803,7 @@ public Set<Map<String, Object>> getwone(Set<Map<String, Object>> sendUserIds){
...
@@ -1828,7 +1803,7 @@ public Set<Map<String, Object>> getwone(Set<Map<String, Object>> sendUserIds){
@SuppressWarnings
(
"unchecked"
)
@SuppressWarnings
(
"unchecked"
)
public
void
ruleCallbackActionForPowerTransferForSurvBrigade
(
String
smsCode
,
List
sendIds
,
Object
object
,
List
<
Map
<
String
,
Object
>>
pList
)
throws
MqttPersistenceException
,
MqttException
{
public
void
ruleCallbackActionForPowerTransferForSurvBrigade
(
String
smsCode
,
List
<
Object
>
sendIds
,
Object
object
,
List
<
Map
<
String
,
Object
>>
pList
)
throws
MqttPersistenceException
,
MqttException
{
List
<
AlertSubmittedObject
>
alertSubmittedObjectList
=
Lists
.
newArrayList
();
List
<
AlertSubmittedObject
>
alertSubmittedObjectList
=
Lists
.
newArrayList
();
// 查询已绑定车辆人员id
// 查询已绑定车辆人员id
...
@@ -1842,12 +1817,12 @@ public Set<Map<String, Object>> getwone(Set<Map<String, Object>> sendUserIds){
...
@@ -1842,12 +1817,12 @@ public Set<Map<String, Object>> getwone(Set<Map<String, Object>> sendUserIds){
String
alertSubmittedId
=
calledRo
.
getAlertSubmittedId
();
String
alertSubmittedId
=
calledRo
.
getAlertSubmittedId
();
alertCalledId
=
calledRo
.
getSequenceNbr
();
alertCalledId
=
calledRo
.
getSequenceNbr
();
Set
<
Map
<
String
,
Object
>>
userIds
=
new
HashSet
<
Map
<
String
,
Object
>>();
Set
<
Map
<
String
,
Object
>>
userIds
=
new
HashSet
<
Map
<
String
,
Object
>>();
List
<
Object
>
companyDetail
=
JSON
Array
.
parseArray
(
JSON
.
toJSON
(
calledRo
.
getCompany
()).
toString
(),
Object
.
class
);
List
<
Object
>
companyDetail
=
JSON
.
parseArray
(
JSON
.
toJSON
(
calledRo
.
getCompany
()).
toString
(),
Object
.
class
);
for
(
Object
e:
sendIds
)
{
for
(
Object
e:
sendIds
)
{
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
e
));
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
e
));
if
(
jsonObject
.
containsKey
(
"type"
)
&&(
(
jsonObject
.
getString
(
"type"
).
equals
(
AlertStageEnums
.
ZH
.
getCode
()))
||
jsonObject
.
getString
(
"type"
).
equals
(
AlertStageEnums
.
XJ
.
getCode
())))
{
if
(
jsonObject
.
containsKey
(
"type"
)
&&(
(
jsonObject
.
getString
(
"type"
).
equals
(
AlertStageEnums
.
ZH
.
getCode
()))
||
jsonObject
.
getString
(
"type"
).
equals
(
AlertStageEnums
.
XJ
.
getCode
())))
{
String
departmentName
=
jsonObject
.
getString
(
"name"
);
String
departmentName
=
jsonObject
.
getString
(
"name"
);
if
(
jsonObject
.
containsKey
(
"airportUnit"
))
{
{
if
(
jsonObject
.
containsKey
(
airportUnit
))
{
{
List
<
Map
<
String
,
Object
>>
mapList
=
dynamicFormInstanceMapper
.
getFireRescueDepartmentStaff
(
departmentName
,
null
);
List
<
Map
<
String
,
Object
>>
mapList
=
dynamicFormInstanceMapper
.
getFireRescueDepartmentStaff
(
departmentName
,
null
);
userIds
.
addAll
(
mapList
);
userIds
.
addAll
(
mapList
);
}
}
...
@@ -1862,7 +1837,7 @@ public Set<Map<String, Object>> getwone(Set<Map<String, Object>> sendUserIds){
...
@@ -1862,7 +1837,7 @@ public Set<Map<String, Object>> getwone(Set<Map<String, Object>> sendUserIds){
Set
<
Map
<
String
,
Object
>>
sendUserIds
=
new
HashSet
<
Map
<
String
,
Object
>>();
Set
<
Map
<
String
,
Object
>>
sendUserIds
=
new
HashSet
<
Map
<
String
,
Object
>>();
PowerTransferCompanyDto
powerDto
=
JSON
.
parseObject
(
JSON
.
toJSON
(
powerTransferCompanyDto
).
toString
(),
PowerTransferCompanyDto
.
class
);
PowerTransferCompanyDto
powerDto
=
JSON
.
parseObject
(
JSON
.
toJSON
(
powerTransferCompanyDto
).
toString
(),
PowerTransferCompanyDto
.
class
);
Long
companyId
=
powerDto
.
getCompanyId
();
Long
companyId
=
powerDto
.
getCompanyId
();
String
company
Name
=
powerDto
.
getCompanyName
();
String
company
=
powerDto
.
getCompanyName
();
FireTeam
fireTeam
=
fireTeamServiceImpl
.
getById
(
companyId
);
FireTeam
fireTeam
=
fireTeamServiceImpl
.
getById
(
companyId
);
for
(
Object
sendObject:
sendIds
)
{
for
(
Object
sendObject:
sendIds
)
{
...
@@ -1873,7 +1848,7 @@ public Set<Map<String, Object>> getwone(Set<Map<String, Object>> sendUserIds){
...
@@ -1873,7 +1848,7 @@ public Set<Map<String, Object>> getwone(Set<Map<String, Object>> sendUserIds){
DateUtils
.
getDateNowShortStr
(),
fireTeam
.
getCompanyName
());
DateUtils
.
getDateNowShortStr
(),
fireTeam
.
getCompanyName
());
sendUserIds
.
addAll
(
dutyList
);
sendUserIds
.
addAll
(
dutyList
);
}
}
if
(
jsonObject1
.
containsKey
(
"airportUnit"
))
{
{
if
(
jsonObject1
.
containsKey
(
airportUnit
))
{
{
List
<
Map
<
String
,
Object
>>
mapList
=
dynamicFormInstanceMapper
.
getFireRescueDepartmentStaff
(
fireTeam
.
getCompanyName
(),
null
);
List
<
Map
<
String
,
Object
>>
mapList
=
dynamicFormInstanceMapper
.
getFireRescueDepartmentStaff
(
fireTeam
.
getCompanyName
(),
null
);
sendUserIds
.
addAll
(
mapList
);
sendUserIds
.
addAll
(
mapList
);
}
}
...
@@ -1892,10 +1867,10 @@ public Set<Map<String, Object>> getwone(Set<Map<String, Object>> sendUserIds){
...
@@ -1892,10 +1867,10 @@ public Set<Map<String, Object>> getwone(Set<Map<String, Object>> sendUserIds){
alertSubmittedObject
.
setAlertSubmittedId
(
Long
.
parseLong
(
alertSubmittedId
));
alertSubmittedObject
.
setAlertSubmittedId
(
Long
.
parseLong
(
alertSubmittedId
));
alertSubmittedObject
.
setType
(
false
);
alertSubmittedObject
.
setType
(
false
);
alertSubmittedObject
.
setCompanyId
(
companyId
);
alertSubmittedObject
.
setCompanyId
(
companyId
);
alertSubmittedObject
.
setCompanyName
(
company
Name
);
alertSubmittedObject
.
setCompanyName
(
company
);
alertSubmittedObject
.
setType
(
false
);
alertSubmittedObject
.
setType
(
false
);
alertSubmittedObject
.
setUserId
(
Long
.
parseLong
(
orgUser
.
get
(
"userId"
).
toString
()));
alertSubmittedObject
.
setUserId
(
Long
.
parseLong
(
orgUser
.
get
(
userId
).
toString
()));
alertSubmittedObject
.
setTheUser
(
orgUser
.
get
(
"userName"
).
toString
());
alertSubmittedObject
.
setTheUser
(
orgUser
.
get
(
userName
).
toString
());
pList
.
add
(
orgUser
);
pList
.
add
(
orgUser
);
if
(!
ValidationUtil
.
isEmpty
(
orgUser
.
get
(
telephone
)))
{
if
(!
ValidationUtil
.
isEmpty
(
orgUser
.
get
(
telephone
)))
{
...
@@ -1904,31 +1879,31 @@ public Set<Map<String, Object>> getwone(Set<Map<String, Object>> sendUserIds){
...
@@ -1904,31 +1879,31 @@ public Set<Map<String, Object>> getwone(Set<Map<String, Object>> sendUserIds){
}
}
alertSubmittedObjectList
.
add
(
alertSubmittedObject
);
alertSubmittedObjectList
.
add
(
alertSubmittedObject
);
}
}
smsParams
.
put
(
"callTimeStr"
,
calledRo
.
getCallTimeStr
());
smsParams
.
put
(
callTimeStr
,
calledRo
.
getCallTimeStr
());
smsParams
.
put
(
"address"
,
calledRo
.
getAddress
());
smsParams
.
put
(
address
,
calledRo
.
getAddress
());
smsParams
.
put
(
"content"
,
calledRo
.
getContent
());
smsParams
.
put
(
"content"
,
calledRo
.
getContent
());
smsParams
.
put
(
"trappedNum"
,
calledRo
.
getTrappedNum
());
smsParams
.
put
(
trappedNum
,
calledRo
.
getTrappedNum
());
smsParams
.
put
(
"casualtiesNum"
,
calledRo
.
getCasualtiesNum
());
smsParams
.
put
(
casualtiesNum
,
calledRo
.
getCasualtiesNum
());
smsParams
.
put
(
"companyName"
,
calledRo
.
getCompanyName
());
smsParams
.
put
(
companyName
,
calledRo
.
getCompanyName
());
smsParams
.
put
(
"contactUser"
,
calledRo
.
getContactUser
());
smsParams
.
put
(
contactUser
,
calledRo
.
getContactUser
());
smsParams
.
put
(
"contactPhone"
,
calledRo
.
getContactPhone
());
smsParams
.
put
(
contactPhone
,
calledRo
.
getContactPhone
());
smsParams
.
put
(
"alertType"
,
calledRo
.
getAlertType
());
smsParams
.
put
(
alertType
,
calledRo
.
getAlertType
());
List
<
String
>
userList
=
new
ArrayList
<
String
>();
List
<
String
>
userList
=
new
ArrayList
<
String
>();
ArrayList
<
String
>
taskUserIds
=
new
ArrayList
<>();
ArrayList
<
String
>
taskUserIds
=
new
ArrayList
<>();
sendUser
.
stream
().
forEach
(
i
->
{
sendUser
.
stream
().
forEach
(
i
->
{
if
(
i
.
containsKey
(
"mobilePhone"
))
{
if
(
i
.
containsKey
(
mobilePhone
))
{
mobiles
.
add
(
i
.
get
(
"mobilePhone"
).
toString
());
mobiles
.
add
(
i
.
get
(
mobilePhone
).
toString
());
}
}
if
(
i
.
containsKey
(
"amosId"
)&&
!
ValidationUtil
.
isEmpty
(
i
.
get
(
"amosId"
)))
{
if
(
i
.
containsKey
(
amosId
)&&
!
ValidationUtil
.
isEmpty
(
i
.
get
(
amosId
)))
{
if
(!
CollectionUtils
.
isEmpty
(
userCarIds
)){
if
(!
CollectionUtils
.
isEmpty
(
userCarIds
)){
if
(
userCarIds
.
contains
(
Long
.
valueOf
(
i
.
get
(
"amosId"
).
toString
()))){
if
(
userCarIds
.
contains
(
Long
.
valueOf
(
i
.
get
(
amosId
).
toString
()))){
taskUserIds
.
add
(
i
.
get
(
"amosId"
).
toString
());
taskUserIds
.
add
(
i
.
get
(
amosId
).
toString
());
}
else
{
}
else
{
userList
.
add
(
i
.
get
(
"amosId"
).
toString
());
userList
.
add
(
i
.
get
(
amosId
).
toString
());
}
}
}
else
{
}
else
{
userList
.
add
(
i
.
get
(
"amosId"
).
toString
());
userList
.
add
(
i
.
get
(
amosId
).
toString
());
}
}
}
}
...
@@ -1936,10 +1911,10 @@ public Set<Map<String, Object>> getwone(Set<Map<String, Object>> sendUserIds){
...
@@ -1936,10 +1911,10 @@ public Set<Map<String, Object>> getwone(Set<Map<String, Object>> sendUserIds){
// 绑定车辆人员发送的是待办消息
// 绑定车辆人员发送的是待办消息
if
(!
CollectionUtils
.
isEmpty
(
taskUserIds
)){
if
(!
CollectionUtils
.
isEmpty
(
taskUserIds
)){
Map
<
String
,
String
>
besidesMap
=
new
HashMap
<
String
,
String
>();
Map
<
String
,
String
>
besidesMap
=
new
HashMap
<
String
,
String
>();
besidesMap
.
put
(
"alterId"
,
alertCalledId
);
besidesMap
.
put
(
alterId
,
alertCalledId
);
pushPowerTransferToAppAndWeb
(
AlertBusinessTypeEnum
.
力量调派
.
getCode
(),
besidesMap
,
smsParams
,
taskUserIds
,
RuleConstant
.
TASK
);
pushPowerTransferToAppAndWeb
(
AlertBusinessTypeEnum
.
力量调派
.
getCode
(),
besidesMap
,
smsParams
,
taskUserIds
,
RuleConstant
.
TASK
);
}
}
smsParams
.
put
(
"resourcesNum"
,
companyName
);
smsParams
.
put
(
resourceNum
,
company
);
// 短信报送对象
// 短信报送对象
// 发送任务消息
// 发送任务消息
// 组织短信内容
// 组织短信内容
...
@@ -1950,7 +1925,7 @@ public Set<Map<String, Object>> getwone(Set<Map<String, Object>> sendUserIds){
...
@@ -1950,7 +1925,7 @@ public Set<Map<String, Object>> getwone(Set<Map<String, Object>> sendUserIds){
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
Map
<
String
,
String
>
besidesMap
=
new
HashMap
<
String
,
String
>();
Map
<
String
,
String
>
besidesMap
=
new
HashMap
<
String
,
String
>();
besidesMap
.
put
(
"alterId"
,
alertCalledId
);
besidesMap
.
put
(
alterId
,
alertCalledId
);
if
(
userList
.
size
()>
0
)
{
if
(
userList
.
size
()>
0
)
{
pushPowerTransferToAppAndWeb
(
AlertBusinessTypeEnum
.
力量调派
.
getCode
(),
besidesMap
,
smsParams
,
userList
,
null
);
pushPowerTransferToAppAndWeb
(
AlertBusinessTypeEnum
.
力量调派
.
getCode
(),
besidesMap
,
smsParams
,
userList
,
null
);
}
}
...
@@ -1963,7 +1938,7 @@ public Set<Map<String, Object>> getwone(Set<Map<String, Object>> sendUserIds){
...
@@ -1963,7 +1938,7 @@ public Set<Map<String, Object>> getwone(Set<Map<String, Object>> sendUserIds){
public
void
ruleCallbackActionForPowerTransferForAid
(
String
smsCode
,
List
sendIds
,
Object
object
,
List
<
Map
<
String
,
Object
>>
pList
)
throws
MqttPersistenceException
,
MqttException
{
public
void
ruleCallbackActionForPowerTransferForAid
(
String
smsCode
,
List
<
Object
>
sendIds
,
Object
object
,
List
<
Map
<
String
,
Object
>>
pList
)
throws
MqttPersistenceException
,
MqttException
{
// 查询已绑定车辆人员id
// 查询已绑定车辆人员id
List
<
UserCar
>
userCars
=
userCarMapper
.
selectList
(
new
QueryWrapper
<
UserCar
>().
lambda
().
eq
(
UserCar:
:
getIsDelete
,
false
));
List
<
UserCar
>
userCars
=
userCarMapper
.
selectList
(
new
QueryWrapper
<
UserCar
>().
lambda
().
eq
(
UserCar:
:
getIsDelete
,
false
));
List
<
Long
>
userCarIds
=
userCars
.
stream
().
map
(
UserCar:
:
getAmosUserId
).
collect
(
Collectors
.
toList
());
List
<
Long
>
userCarIds
=
userCars
.
stream
().
map
(
UserCar:
:
getAmosUserId
).
collect
(
Collectors
.
toList
());
...
@@ -1985,7 +1960,7 @@ public Set<Map<String, Object>> getwone(Set<Map<String, Object>> sendUserIds){
...
@@ -1985,7 +1960,7 @@ public Set<Map<String, Object>> getwone(Set<Map<String, Object>> sendUserIds){
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
e
));
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
e
));
if
(
jsonObject
.
containsKey
(
"type"
)
&&(
(
jsonObject
.
getString
(
"type"
).
equals
(
AlertStageEnums
.
ZH
.
getCode
()))
||
jsonObject
.
getString
(
"type"
).
equals
(
AlertStageEnums
.
XJ
.
getCode
())))
{
if
(
jsonObject
.
containsKey
(
"type"
)
&&(
(
jsonObject
.
getString
(
"type"
).
equals
(
AlertStageEnums
.
ZH
.
getCode
()))
||
jsonObject
.
getString
(
"type"
).
equals
(
AlertStageEnums
.
XJ
.
getCode
())))
{
String
departmentName
=
jsonObject
.
getString
(
"name"
);
String
departmentName
=
jsonObject
.
getString
(
"name"
);
if
(
jsonObject
.
containsKey
(
"airportUnit"
))
{
{
if
(
jsonObject
.
containsKey
(
airportUnit
))
{
{
List
<
Map
<
String
,
Object
>>
mapList
=
dynamicFormInstanceMapper
.
getFireRescueDepartmentStaff
(
departmentName
,
null
);
List
<
Map
<
String
,
Object
>>
mapList
=
dynamicFormInstanceMapper
.
getFireRescueDepartmentStaff
(
departmentName
,
null
);
userIds
.
addAll
(
mapList
);
userIds
.
addAll
(
mapList
);
}
}
...
@@ -2002,7 +1977,7 @@ public Set<Map<String, Object>> getwone(Set<Map<String, Object>> sendUserIds){
...
@@ -2002,7 +1977,7 @@ public Set<Map<String, Object>> getwone(Set<Map<String, Object>> sendUserIds){
Set
<
Map
<
String
,
Object
>>
sendUserIds
=
new
HashSet
<
Map
<
String
,
Object
>>();
Set
<
Map
<
String
,
Object
>>
sendUserIds
=
new
HashSet
<
Map
<
String
,
Object
>>();
PowerTransferCompanyDto
powerDto
=
JSON
.
parseObject
(
JSON
.
toJSON
(
powerTransferCompanyDto
).
toString
(),
PowerTransferCompanyDto
.
class
);
PowerTransferCompanyDto
powerDto
=
JSON
.
parseObject
(
JSON
.
toJSON
(
powerTransferCompanyDto
).
toString
(),
PowerTransferCompanyDto
.
class
);
Long
companyId
=
powerDto
.
getCompanyId
();
Long
companyId
=
powerDto
.
getCompanyId
();
String
companyNa
me
=
powerDto
.
getCompanyName
();
String
companyNa
=
powerDto
.
getCompanyName
();
FireTeam
fireTeam
=
fireTeamServiceImpl
.
getById
(
companyId
);
//这个公司ID实际上是120急救站的id值
FireTeam
fireTeam
=
fireTeamServiceImpl
.
getById
(
companyId
);
//这个公司ID实际上是120急救站的id值
for
(
Object
e:
sendIds
)
{
for
(
Object
e:
sendIds
)
{
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
e
));
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
e
));
...
@@ -2029,42 +2004,42 @@ public Set<Map<String, Object>> getwone(Set<Map<String, Object>> sendUserIds){
...
@@ -2029,42 +2004,42 @@ public Set<Map<String, Object>> getwone(Set<Map<String, Object>> sendUserIds){
AlertSubmittedObject
alertSubmittedObject
=
new
AlertSubmittedObject
();
AlertSubmittedObject
alertSubmittedObject
=
new
AlertSubmittedObject
();
alertSubmittedObject
.
setAlertSubmittedId
(
Long
.
parseLong
(
alertSubmittedId
));
alertSubmittedObject
.
setAlertSubmittedId
(
Long
.
parseLong
(
alertSubmittedId
));
alertSubmittedObject
.
setCompanyId
(
companyId
);
alertSubmittedObject
.
setCompanyId
(
companyId
);
alertSubmittedObject
.
setCompanyName
(
companyNa
me
);
alertSubmittedObject
.
setCompanyName
(
companyNa
);
alertSubmittedObject
.
setType
(
false
);
alertSubmittedObject
.
setType
(
false
);
alertSubmittedObject
.
setUserId
(
Long
.
parseLong
(
orgUser
.
get
(
"userId"
).
toString
()));
alertSubmittedObject
.
setUserId
(
Long
.
parseLong
(
orgUser
.
get
(
userId
).
toString
()));
alertSubmittedObject
.
setTheUser
(
orgUser
.
get
(
"userName"
).
toString
());
alertSubmittedObject
.
setTheUser
(
orgUser
.
get
(
userName
).
toString
());
pList
.
add
(
orgUser
);
pList
.
add
(
orgUser
);
if
(!
ValidationUtil
.
isEmpty
(
orgUser
.
get
(
"mobilePhone"
)))
{
if
(!
ValidationUtil
.
isEmpty
(
orgUser
.
get
(
mobilePhone
)))
{
mobiles
.
add
((
String
)
orgUser
.
get
(
"mobilePhone"
));
mobiles
.
add
((
String
)
orgUser
.
get
(
mobilePhone
));
alertSubmittedObject
.
setUserPhone
(
orgUser
.
get
(
"mobilePhone"
).
toString
());
alertSubmittedObject
.
setUserPhone
(
orgUser
.
get
(
mobilePhone
).
toString
());
}
}
alertSubmittedObjectList
.
add
(
alertSubmittedObject
);
alertSubmittedObjectList
.
add
(
alertSubmittedObject
);
}
}
smsParams
.
put
(
"callTimeStr"
,
calledRo
.
getCallTimeStr
());
smsParams
.
put
(
callTimeStr
,
calledRo
.
getCallTimeStr
());
smsParams
.
put
(
"address"
,
calledRo
.
getAddress
());
smsParams
.
put
(
address
,
calledRo
.
getAddress
());
smsParams
.
put
(
"content"
,
calledRo
.
getContent
());
smsParams
.
put
(
"content"
,
calledRo
.
getContent
());
smsParams
.
put
(
"trappedNum"
,
calledRo
.
getTrappedNum
());
smsParams
.
put
(
trappedNum
,
calledRo
.
getTrappedNum
());
smsParams
.
put
(
"casualtiesNum"
,
calledRo
.
getCasualtiesNum
());
smsParams
.
put
(
casualtiesNum
,
calledRo
.
getCasualtiesNum
());
smsParams
.
put
(
"companyName"
,
calledRo
.
getCompanyName
());
smsParams
.
put
(
companyName
,
calledRo
.
getCompanyName
());
smsParams
.
put
(
"contactUser"
,
calledRo
.
getContactUser
());
smsParams
.
put
(
contactUser
,
calledRo
.
getContactUser
());
smsParams
.
put
(
"contactPhone"
,
calledRo
.
getContactPhone
());
smsParams
.
put
(
contactPhone
,
calledRo
.
getContactPhone
());
smsParams
.
put
(
"alertType"
,
calledRo
.
getAlertType
());
smsParams
.
put
(
alertType
,
calledRo
.
getAlertType
());
List
<
String
>
userList
=
new
ArrayList
<
String
>();
List
<
String
>
userList
=
new
ArrayList
<
String
>();
List
<
String
>
taskUserIds
=
new
ArrayList
<
String
>();
List
<
String
>
taskUserIds
=
new
ArrayList
<
String
>();
sendUser
.
stream
().
forEach
(
i
->
{
sendUser
.
stream
().
forEach
(
i
->
{
if
(
i
.
containsKey
(
"mobilePhone"
))
{
if
(
i
.
containsKey
(
mobilePhone
))
{
mobiles
.
add
(
i
.
get
(
"mobilePhone"
).
toString
());
mobiles
.
add
(
i
.
get
(
mobilePhone
).
toString
());
}
}
if
(
i
.
containsKey
(
"amosId"
)&&
!
ValidationUtil
.
isEmpty
(
i
.
get
(
"amosId"
)))
{
if
(
i
.
containsKey
(
amosId
)&&
!
ValidationUtil
.
isEmpty
(
i
.
get
(
amosId
)))
{
if
(!
CollectionUtils
.
isEmpty
(
userCarIds
)){
if
(!
CollectionUtils
.
isEmpty
(
userCarIds
)){
if
(
userCarIds
.
contains
(
Long
.
valueOf
(
i
.
get
(
"amosId"
).
toString
()))){
if
(
userCarIds
.
contains
(
Long
.
valueOf
(
i
.
get
(
amosId
).
toString
()))){
taskUserIds
.
add
(
i
.
get
(
"amosId"
).
toString
());
taskUserIds
.
add
(
i
.
get
(
amosId
).
toString
());
}
else
{
}
else
{
userList
.
add
(
i
.
get
(
"amosId"
).
toString
());
userList
.
add
(
i
.
get
(
amosId
).
toString
());
}
}
}
else
{
}
else
{
userList
.
add
(
i
.
get
(
"amosId"
).
toString
());
userList
.
add
(
i
.
get
(
amosId
).
toString
());
}
}
}
}
...
@@ -2072,22 +2047,22 @@ public Set<Map<String, Object>> getwone(Set<Map<String, Object>> sendUserIds){
...
@@ -2072,22 +2047,22 @@ public Set<Map<String, Object>> getwone(Set<Map<String, Object>> sendUserIds){
// 绑定车辆人员发送的是待办消息
// 绑定车辆人员发送的是待办消息
if
(
CollectionUtils
.
isEmpty
(
taskUserIds
)){
if
(
CollectionUtils
.
isEmpty
(
taskUserIds
)){
Map
<
String
,
String
>
besidesMap
=
new
HashMap
<
String
,
String
>();
Map
<
String
,
String
>
besidesMap
=
new
HashMap
<
String
,
String
>();
besidesMap
.
put
(
"alterId"
,
alertCalledId
);
besidesMap
.
put
(
alterId
,
alertCalledId
);
pushPowerTransferToAppAndWeb
(
AlertBusinessTypeEnum
.
力量调派
.
getCode
(),
besidesMap
,
smsParams
,
taskUserIds
,
RuleConstant
.
TASK
);
pushPowerTransferToAppAndWeb
(
AlertBusinessTypeEnum
.
力量调派
.
getCode
(),
besidesMap
,
smsParams
,
taskUserIds
,
RuleConstant
.
TASK
);
}
}
smsParams
.
put
(
"resourcesNum"
,
companyName
);
smsParams
.
put
(
resourceNum
,
companyName
);
// 短信报送对象
// 短信报送对象
// 发送任务消息
// 发送任务消息
// 组织短信内容
// 组织短信内容
// 调用短信发送接口
// 调用短信发送接口
try
{
try
{
alertCalledAction
.
sendAlertCalleCmd
(
smsCode
,
mobiles
,
smsParams
);
alertCalledAction
.
sendAlertCalleCmd
(
smsCode
,
mobiles
,
smsParams
);
}
catch
(
Exception
e
)
{
//
TODO: handle exception
}
catch
(
Exception
e
)
{
//
e
.
printStackTrace
();
}
}
Map
<
String
,
String
>
besidesMap
=
new
HashMap
<
String
,
String
>();
Map
<
String
,
String
>
besidesMap
=
new
HashMap
<
String
,
String
>();
besidesMap
.
put
(
"alterId"
,
alertCalledId
);
besidesMap
.
put
(
alterId
,
alertCalledId
);
if
(
userList
.
size
()>
0
)
{
if
(
!
userList
.
isEmpty
()
)
{
pushPowerTransferToAppAndWeb
(
AlertBusinessTypeEnum
.
力量调派
.
getCode
(),
besidesMap
,
smsParams
,
userList
,
null
);
pushPowerTransferToAppAndWeb
(
AlertBusinessTypeEnum
.
力量调派
.
getCode
(),
besidesMap
,
smsParams
,
userList
,
null
);
}
}
...
@@ -2105,7 +2080,7 @@ public Set<Map<String, Object>> getwone(Set<Map<String, Object>> sendUserIds){
...
@@ -2105,7 +2080,7 @@ 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
){
PushMessageWebAndAppRo
pushMessageWebAndAppRo
=
new
PushMessageWebAndAppRo
();
PushMessageWebAndAppRo
pushMessageWebAndAppRo
=
new
PushMessageWebAndAppRo
();
pushMessageWebAndAppRo
.
setRelationId
(
besidesMap
.
get
(
"alterId"
));
pushMessageWebAndAppRo
.
setRelationId
(
besidesMap
.
get
(
alterId
));
pushMessageWebAndAppRo
.
setRecivers
(
userList
);
pushMessageWebAndAppRo
.
setRecivers
(
userList
);
// 默认发送消息通知,力量调派车辆绑定人发送待办任务。
// 默认发送消息通知,力量调派车辆绑定人发送待办任务。
if
(
null
!=
messageType
){
if
(
null
!=
messageType
){
...
@@ -2119,36 +2094,36 @@ public Set<Map<String, Object>> getwone(Set<Map<String, Object>> sendUserIds){
...
@@ -2119,36 +2094,36 @@ public Set<Map<String, Object>> getwone(Set<Map<String, Object>> sendUserIds){
pushMessageWebAndAppRo
.
setMsgType
(
this
.
msgType
);
pushMessageWebAndAppRo
.
setMsgType
(
this
.
msgType
);
pushMessageWebAndAppRo
.
setTerminal
(
RuleConstant
.
APP_WEB
);
pushMessageWebAndAppRo
.
setTerminal
(
RuleConstant
.
APP_WEB
);
Map
<
String
,
String
>
map
=
new
HashMap
<
String
,
String
>();
Map
<
String
,
String
>
map
=
new
HashMap
<
String
,
String
>();
map
.
put
(
sequenceNbr
,
besidesMap
.
get
(
"alterId"
));
map
.
put
(
sequenceNbr
,
besidesMap
.
get
(
alterId
));
if
(
AlertBusinessTypeEnum
.
警情结案
.
getCode
().
equals
(
type
))
{
if
(
AlertBusinessTypeEnum
.
警情结案
.
getCode
().
equals
(
type
))
{
pushMessageWebAndAppRo
.
setName
(
"消息"
);
pushMessageWebAndAppRo
.
setName
(
"消息"
);
pushMessageWebAndAppRo
.
setStartTime
(
besidesMap
.
get
(
"startTime"
));
pushMessageWebAndAppRo
.
setStartTime
(
besidesMap
.
get
(
"startTime"
));
pushMessageWebAndAppRo
.
setEndTime
(
besidesMap
.
get
(
"endTime"
));
pushMessageWebAndAppRo
.
setEndTime
(
besidesMap
.
get
(
"endTime"
));
pushMessageWebAndAppRo
.
setAddress
(
smsParams
.
get
(
"address"
));
pushMessageWebAndAppRo
.
setAddress
(
smsParams
.
get
(
address
));
pushMessageWebAndAppRo
.
setRuleType
(
"endAlert"
);
pushMessageWebAndAppRo
.
setRuleType
(
"endAlert"
);
}
}
if
(
AlertBusinessTypeEnum
.
非警情确认
.
getCode
().
equals
(
type
))
{
if
(
AlertBusinessTypeEnum
.
非警情确认
.
getCode
().
equals
(
type
))
{
pushMessageWebAndAppRo
.
setName
(
"消息"
);
pushMessageWebAndAppRo
.
setName
(
"消息"
);
pushMessageWebAndAppRo
.
setSendTime
(
smsParams
.
get
(
"callTimeStr"
));
pushMessageWebAndAppRo
.
setSendTime
(
smsParams
.
get
(
callTimeStr
));
pushMessageWebAndAppRo
.
setAddress
(
smsParams
.
get
(
"address"
));
pushMessageWebAndAppRo
.
setAddress
(
smsParams
.
get
(
address
));
pushMessageWebAndAppRo
.
setRuleType
(
"notAlert"
);
pushMessageWebAndAppRo
.
setRuleType
(
"notAlert"
);
}
}
if
(
AlertBusinessTypeEnum
.
警情续报
.
getCode
().
equals
(
type
))
{
if
(
AlertBusinessTypeEnum
.
警情续报
.
getCode
().
equals
(
type
))
{
pushMessageWebAndAppRo
.
setName
(
"消息"
);
pushMessageWebAndAppRo
.
setName
(
"消息"
);
pushMessageWebAndAppRo
.
setCompanyName
(
smsParams
.
get
(
"alertType"
));
pushMessageWebAndAppRo
.
setCompanyName
(
smsParams
.
get
(
alertType
));
pushMessageWebAndAppRo
.
setAddress
(
smsParams
.
get
(
"address"
));
pushMessageWebAndAppRo
.
setAddress
(
smsParams
.
get
(
address
));
pushMessageWebAndAppRo
.
setSendTime
(
besidesMap
.
get
(
"sendTime"
));
pushMessageWebAndAppRo
.
setSendTime
(
besidesMap
.
get
(
sendTime
));
pushMessageWebAndAppRo
.
setTransferLocation
(
smsParams
.
get
(
"replaceContent"
));
pushMessageWebAndAppRo
.
setTransferLocation
(
smsParams
.
get
(
"replaceContent"
));
pushMessageWebAndAppRo
.
setTrappedNum
(
smsParams
.
get
(
"trappedNum"
));
//被困人数
pushMessageWebAndAppRo
.
setTrappedNum
(
smsParams
.
get
(
trappedNum
));
//被困人数
pushMessageWebAndAppRo
.
setCasualtiesNum
(
smsParams
.
get
(
"casualtiesNum"
));
//伤亡人数
pushMessageWebAndAppRo
.
setCasualtiesNum
(
smsParams
.
get
(
casualtiesNum
));
//伤亡人数
pushMessageWebAndAppRo
.
setRuleType
(
"followReportAlert"
);
pushMessageWebAndAppRo
.
setRuleType
(
"followReportAlert"
);
}
}
if
(
AlertBusinessTypeEnum
.
力量调派
.
getCode
().
equals
(
type
))
{
if
(
AlertBusinessTypeEnum
.
力量调派
.
getCode
().
equals
(
type
))
{
pushMessageWebAndAppRo
.
setName
(
AlertBusinessTypeEnum
.
力量调派
.
getName
());
pushMessageWebAndAppRo
.
setName
(
AlertBusinessTypeEnum
.
力量调派
.
getName
());
pushMessageWebAndAppRo
.
setCompanyName
(
smsParams
.
get
(
"resourcesNum"
));
pushMessageWebAndAppRo
.
setCompanyName
(
smsParams
.
get
(
resourceNum
));
pushMessageWebAndAppRo
.
setAddress
(
smsParams
.
get
(
"address"
));
pushMessageWebAndAppRo
.
setAddress
(
smsParams
.
get
(
address
));
pushMessageWebAndAppRo
.
setSendTime
(
smsParams
.
get
(
"callTimeStr"
));
pushMessageWebAndAppRo
.
setSendTime
(
smsParams
.
get
(
callTimeStr
));
if
(
StringUtils
.
isNotBlank
(
besidesMap
.
get
(
"transferLocation"
)))
{
if
(
StringUtils
.
isNotBlank
(
besidesMap
.
get
(
"transferLocation"
)))
{
pushMessageWebAndAppRo
.
setTransferLocation
(
besidesMap
.
get
(
"responseLevelString"
));
//响应级别
pushMessageWebAndAppRo
.
setTransferLocation
(
besidesMap
.
get
(
"responseLevelString"
));
//响应级别
pushMessageWebAndAppRo
.
setRuleType
(
"fullTime"
);
pushMessageWebAndAppRo
.
setRuleType
(
"fullTime"
);
...
@@ -2159,14 +2134,14 @@ public Set<Map<String, Object>> getwone(Set<Map<String, Object>> sendUserIds){
...
@@ -2159,14 +2134,14 @@ public Set<Map<String, Object>> getwone(Set<Map<String, Object>> sendUserIds){
if
(
AlertBusinessTypeEnum
.
警情初报
.
getCode
().
equals
(
type
))
{
if
(
AlertBusinessTypeEnum
.
警情初报
.
getCode
().
equals
(
type
))
{
pushMessageWebAndAppRo
.
setRuleType
(
"reportAlert"
);
pushMessageWebAndAppRo
.
setRuleType
(
"reportAlert"
);
pushMessageWebAndAppRo
.
setName
(
AlertBusinessTypeEnum
.
警情初报
.
getName
());
pushMessageWebAndAppRo
.
setName
(
AlertBusinessTypeEnum
.
警情初报
.
getName
());
pushMessageWebAndAppRo
.
setSendTime
(
besidesMap
.
get
(
"sendTime"
));
pushMessageWebAndAppRo
.
setSendTime
(
besidesMap
.
get
(
sendTime
));
pushMessageWebAndAppRo
.
setCompanyName
(
smsParams
.
get
(
"companyName"
));
//发送单位
pushMessageWebAndAppRo
.
setCompanyName
(
smsParams
.
get
(
companyName
));
//发送单位
pushMessageWebAndAppRo
.
setAddress
(
smsParams
.
get
(
"address"
));
pushMessageWebAndAppRo
.
setAddress
(
smsParams
.
get
(
address
));
pushMessageWebAndAppRo
.
setFireSituation
(
smsParams
.
get
(
"fireSituation"
));
//火势情况
pushMessageWebAndAppRo
.
setFireSituation
(
smsParams
.
get
(
"fireSituation"
));
//火势情况
pushMessageWebAndAppRo
.
setTrappedNum
(
smsParams
.
get
(
"trappedNum"
));
//被困人数
pushMessageWebAndAppRo
.
setTrappedNum
(
smsParams
.
get
(
trappedNum
));
//被困人数
pushMessageWebAndAppRo
.
setCasualtiesNum
(
smsParams
.
get
(
"casualtiesNum"
));
//伤亡人数
pushMessageWebAndAppRo
.
setCasualtiesNum
(
smsParams
.
get
(
casualtiesNum
));
//伤亡人数
}
}
pushMessageWebAndAppRo
.
setExtras
(
map
);
;
pushMessageWebAndAppRo
.
setExtras
(
map
);
try
{
try
{
ruleTrigger
.
publish
(
pushMessageWebAndAppRo
,
"消息/addAlterMessageCheck"
,
new
String
[
0
]);
ruleTrigger
.
publish
(
pushMessageWebAndAppRo
,
"消息/addAlterMessageCheck"
,
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