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
4fd148e0
Commit
4fd148e0
authored
Nov 21, 2022
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
web消息弹窗 航空器发生空白 数据源补充
parent
1bf0c08a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
461 additions
and
464 deletions
+461
-464
AlertCalledServiceImpl.java
...t/module/jcs/biz/service/impl/AlertCalledServiceImpl.java
+10
-0
AlertSubmittedServiceImpl.java
...odule/jcs/biz/service/impl/AlertSubmittedServiceImpl.java
+451
-464
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/AlertCalledServiceImpl.java
View file @
4fd148e0
...
@@ -58,6 +58,16 @@ import com.yeejoin.amos.boot.module.common.biz.service.impl.FirefightersServiceI
...
@@ -58,6 +58,16 @@ import com.yeejoin.amos.boot.module.common.biz.service.impl.FirefightersServiceI
import
com.yeejoin.amos.boot.module.common.biz.service.impl.KeySiteServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.KeySiteServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.WaterResourceServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.WaterResourceServiceImpl
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledFormDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledObjsDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledTodyDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledZhDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.ControllerDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.ControllerEquipDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.KeyValueLabel
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.PowerData
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.VoiceRecordFileDto
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.Aircraft
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.Aircraft
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue
;
...
...
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 @
4fd148e0
...
@@ -33,10 +33,10 @@ import java.util.stream.IntStream;
...
@@ -33,10 +33,10 @@ import java.util.stream.IntStream;
import
com.yeejoin.amos.boot.module.command.api.dto.FrontlineLiaisonDto
;
import
com.yeejoin.amos.boot.module.command.api.dto.FrontlineLiaisonDto
;
import
com.yeejoin.amos.boot.module.command.biz.service.impl.FrontlineLiaisonServiceImpl
;
import
com.yeejoin.amos.boot.module.command.biz.service.impl.FrontlineLiaisonServiceImpl
;
import
com.yeejoin.amos.boot.module.common.api.service.ISourceFileService
;
import
com.yeejoin.amos.boot.module.common.api.service.ISourceFileService
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.*
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.*
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.*
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.*
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.*
;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.JcSituationDetailMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.*
;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.UserCarMapper
;
import
com.yeejoin.amos.boot.module.jcs.biz.dao.ESAlertCalledRepository
;
import
com.yeejoin.amos.boot.module.jcs.biz.dao.ESAlertCalledRepository
;
import
com.yeejoin.amos.feign.systemctl.model.MessageModel
;
import
com.yeejoin.amos.feign.systemctl.model.MessageModel
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
...
@@ -99,32 +99,6 @@ import com.yeejoin.amos.boot.module.common.api.service.IFireTeamService;
...
@@ -99,32 +99,6 @@ import com.yeejoin.amos.boot.module.common.api.service.IFireTeamService;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.FireTeamServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.FireTeamServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.FirefightersServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.FirefightersServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertCallCommandDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertCallePowerTransferRo
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledFormDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledMobDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledObjsDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledPowerInfoDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledRo
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledZhDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertSubmittedDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertSubmittedExtDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertSubmittedSMSDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertSubmittedZHDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.CarStatusInfoDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.InstructionsZHDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.PowerData
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferCompanyDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferCompanyResourcesDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferCompanyZHDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.PushMessageWebAndAppRo
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.SchedulingReportingDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.TemplateDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.TemplateExtendDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.VoiceRecordFileDto
;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.AlertSubmittedMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.PowerTransferCompanyMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.PowerTransferMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IAlertSubmittedObjectService
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IAlertSubmittedObjectService
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IAlertSubmittedService
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IAlertSubmittedService
;
import
com.yeejoin.amos.boot.module.jcs.biz.rule.action.AlertCalledAction
;
import
com.yeejoin.amos.boot.module.jcs.biz.rule.action.AlertCalledAction
;
...
@@ -175,7 +149,8 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -175,7 +149,8 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
OrgUsrServiceImpl
iOrgUsrService
;
OrgUsrServiceImpl
iOrgUsrService
;
@Autowired
@Autowired
IDutyPersonService
iDutyPersonService
;
IDutyPersonService
iDutyPersonService
;
@Autowired
AlertFormValueServiceImpl
formValueService
;
@Autowired
@Autowired
PowerTransferMapper
powerTransferMapper
;
PowerTransferMapper
powerTransferMapper
;
...
@@ -262,23 +237,25 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -262,23 +237,25 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
alertSubmittedExtDtoList
.
forEach
(
alertSubmittedExtDto
->
{
alertSubmittedExtDtoList
.
forEach
(
alertSubmittedExtDto
->
{
try
{
try
{
alertSubmittedExtDto
.
setExtraInfo
(
String
.
format
(
_extraInfo
,
alertSubmittedExtDto
.
getCompanyName
(),
alertSubmittedExtDto
.
getUserName
()));
if
(
alertSubmittedExtDto
.
getUserName
()!=
null
){
if
(
alertSubmittedExtDto
.
getUserName
()!=
null
){
alertSubmittedExtDto
.
setExtraInfo
(
String
.
format
(
_extraInfo
,
alertSubmittedExtDto
.
getCompanyName
(),
alertSubmittedExtDto
.
setExtraInfo
(
String
.
format
(
_extraInfo
,
alertSubmittedExtDto
.
getCompanyName
(),
alertSubmittedExtDto
.
getUserName
()));
alertSubmittedExtDto
.
getUserName
()));
}
else
{
}
else
{
alertSubmittedExtDto
.
setExtraInfo
(
"未匹配到报送人"
);
alertSubmittedExtDto
.
setExtraInfo
(
"未匹配到报送人"
);
}
}
TemplateExtendDto
template
=
null
;
TemplateExtendDto
template
=
null
;
Template
templateN
=
null
;
Template
templateN
=
null
;
if
(
AlertBusinessTypeEnum
.
警情初报
.
getName
().
equals
(
alertSubmittedExtDto
.
getBusinessType
()))
{
if
(
AlertBusinessTypeEnum
.
警情初报
.
getName
().
equals
(
alertSubmittedExtDto
.
getBusinessType
()))
{
// 获取任务派发模板
// 获取任务派发模板
templateN
=
templateService
templateN
=
templateService
.
getOne
(
new
QueryWrapper
<
Template
>().
eq
(
"type_code"
,
"JQCB"
).
eq
(
"format"
,
false
));
.
getOne
(
new
QueryWrapper
<
Template
>().
eq
(
"type_code"
,
"JQCB"
).
eq
(
"format"
,
false
));
template
=
new
TemplateExtendDto
();
template
=
new
TemplateExtendDto
();
BeanUtils
.
copyProperties
(
templateN
,
template
);
BeanUtils
.
copyProperties
(
templateN
,
template
);
template
.
setRichContent
(
template
.
getContent
());
template
.
setRichContent
(
template
.
getContent
());
}
else
{
}
else
{
...
@@ -309,7 +286,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -309,7 +286,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
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
companyName
=
JSONObject
.
parseObject
(
alertSubmittedExtDto
.
getSubmissionContent
()).
getString
(
"companyName"
)
;
String
companyName
=
JSONObject
.
parseObject
(
alertSubmittedExtDto
.
getSubmissionContent
()).
getString
(
"companyName"
)
;
JSONObject
jsonObject
=
null
;
JSONObject
jsonObject
=
null
;
if
(!
ValidationUtil
.
isEmpty
(
alertCalled
.
getUpdateTime
()))
{
if
(!
ValidationUtil
.
isEmpty
(
alertCalled
.
getUpdateTime
()))
{
...
@@ -390,7 +367,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -390,7 +367,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
}
}
esAlertCalledRepository
.
deleteById
(
alertSubmittedDto
.
getAlertCalledId
());
esAlertCalledRepository
.
deleteById
(
alertSubmittedDto
.
getAlertCalledId
());
esAlertCalledRepository
.
save
(
esAlertCalled
);
esAlertCalledRepository
.
save
(
esAlertCalled
);
}
catch
(
MqttException
e
)
{
}
catch
(
MqttException
e
)
{
throw
new
RuntimeException
();
throw
new
RuntimeException
();
}
}
return
true
;
return
true
;
...
@@ -408,263 +385,273 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -408,263 +385,273 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
// 获取报送对象列表
// 获取报送对象列表
try
{
List
<
AlertSubmittedObject
>
alertSubmittedObjectList
=
Lists
.
newArrayList
();
try
{
List
<
AlertSubmittedObject
>
alertSubmittedObjectList
=
Lists
.
newArrayList
();
Set
<
String
>
mobiles
=
new
HashSet
<>();
Set
<
String
>
mobiles
=
new
HashSet
<>();
HashMap
<
String
,
String
>
smsParams
=
new
HashMap
<>();
HashMap
<
String
,
String
>
smsParams
=
new
HashMap
<>();
String
alertCalledId
=
null
;
String
alertCalledId
=
null
;
List
<
Map
<
String
,
Object
>>
orgUsers
=
new
LinkedList
<>();
List
<
Map
<
String
,
Object
>>
orgUsersqc
=
new
LinkedList
<>();
String
sCode
=
""
;
String
alertWay
=
""
;
AlertCalled
alertCalled
=
null
;
List
<
String
>
usIds
=
new
ArrayList
<>();
if
(
object
instanceof
AlertCalledRo
)
{
AlertCalledRo
calledRo
=
(
AlertCalledRo
)
object
;
String
alertSubmittedId
=
calledRo
.
getAlertSubmittedId
();
//航空器类型警情 web端消息弹窗 发生后面没有数据源 和测试沟通补充航空器子类为数据源
if
(
calledRo
.
getAlertTypeCode
().
equals
(
"230"
))
{
List
<
AlertFormValueDto
>
alertFormValueDtos
=
formValueService
.
listByCalledId
(
Long
.
valueOf
(
calledRo
.
getSequenceNbr
()));
alertFormValueDtos
.
forEach
(
e
->{
if
(
e
.
getFieldCode
().
equals
(
"aircraftRescueSub"
)){
calledRo
.
setFireSituation
(
e
.
getFieldValue
());
}
});
}
List
<
Map
<
String
,
Object
>>
orgUsers
=
new
LinkedList
<>();
alertCalledId
=
calledRo
.
getSequenceNbr
();
List
<
Map
<
String
,
Object
>>
orgUsersqc
=
new
LinkedList
<>();
String
sCode
=
""
;
String
alertWay
=
""
;
AlertCalled
alertCalled
=
null
;
List
<
String
>
usIds
=
new
ArrayList
<>();
if
(
object
instanceof
AlertCalledRo
)
{
AlertCalledRo
calledRo
=
(
AlertCalledRo
)
object
;
String
alertSubmittedId
=
calledRo
.
getAlertSubmittedId
();
alertCalledId
=
calledRo
.
getSequenceNbr
();
log
.
info
(
"calledRo.getSequenceNbr()"
+
calledRo
.
getSequenceNbr
());
log
.
info
(
"calledRo.getSequenceNbr()"
+
calledRo
.
getSequenceNbr
());
log
.
info
(
"alertCalledObjsDtoid"
+
Long
.
valueOf
(
calledRo
.
getSequenceNbr
()));
log
.
info
(
"alertCalledObjsDtoid"
+
Long
.
valueOf
(
calledRo
.
getSequenceNbr
()));
AlertCalledObjsDto
alertCalledObjsDto
=
alertCalledService
.
selectAlertCalledByIdNoRedisNew
(
Long
.
valueOf
(
calledRo
.
getSequenceNbr
()));
AlertCalledObjsDto
alertCalledObjsDto
=
alertCalledService
.
selectAlertCalledByIdNoRedisNew
(
Long
.
valueOf
(
calledRo
.
getSequenceNbr
()));
log
.
info
(
"alertCalledObjsDto"
+
alertCalledObjsDto
);
log
.
info
(
"alertCalledObjsDto"
+
alertCalledObjsDto
);
alertCalled
=
alertCalledObjsDto
.
getAlertCalled
();
alertCalled
=
alertCalledObjsDto
.
getAlertCalled
();
// AlertCalledRo tempCalledRo = new AlertCalledRo();
// AlertCalledRo tempCalledRo = new AlertCalledRo();
// RuleAlertCalledService.init(tempCalledRo,alertCalledObjsDto);
// RuleAlertCalledService.init(tempCalledRo,alertCalledObjsDto);
// BeanUtils.copyProperties(tempCalledRo,calledRo,"feedback","usIds","ids","alertWay","replaceContent","unitInvolved","alertSubmittedId");
// 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
();
// 警情续报 警情结案,非警情确认选择人员电话号码
// 警情续报 警情结案,非警情确认选择人员电话号码
String
ids
=
calledRo
.
getIds
();
String
ids
=
calledRo
.
getIds
();
if
(!
ValidationUtil
.
isEmpty
(
ids
))
{
if
(!
ValidationUtil
.
isEmpty
(
ids
))
{
List
<
String
>
ls
=
Arrays
.
asList
(
ids
.
split
(
","
));
List
<
String
>
ls
=
Arrays
.
asList
(
ids
.
split
(
","
));
for
(
String
s:
ls
for
(
String
s:
ls
)
{
)
{
mobiles
.
add
(
s
);
mobiles
.
add
(
s
);
}
}
// 获取报送规则
sendIds
.
stream
().
forEach
(
e
->{
// 一般火灾 // 航空器救援
if
(
alertTypeCode
.
equals
(
AlertStageEnums
.
YBHZ
.
getCode
())
||
alertTypeCode
.
equals
(
AlertStageEnums
.
HKJY
.
getCode
()))
{
// 当日值班人员:获值班表中包括消救部、综合办公室、消防支队、应急指挥科的值班人员。
if
(
e
.
containsKey
(
"onDuty"
))
{
String
[]
arr
=
e
.
get
(
"onDuty"
).
toString
().
split
(
","
);
List
<
String
>
list
=
Arrays
.
asList
(
arr
);
List
<
Map
<
String
,
Object
>>
mapList
=
iDutyPersonService
.
queryByCompanyId
(
list
);
orgUsers
.
addAll
(
mapList
);
}
//根据人员岗位:班组长、队长、通讯员; 消防队伍--消防人员 中,对应岗位的人员
if
(
e
.
containsKey
(
"fireBrigade"
))
{
List
<
FirefightersDto
>
fireBrigade
=
firefightersService
.
queryById
(
e
.
get
(
"fireBrigade"
).
toString
().
split
(
","
),
e
.
get
(
"name"
).
toString
());
fireBrigade
.
stream
().
forEach
(
f
->{
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"telephone"
,
f
.
getMobilePhone
());
map
.
put
(
"sequenceNbr"
,
f
.
getSequenceNbr
());
map
.
put
(
"bizOrgName"
,
f
.
getName
());
map
.
put
(
"amosUserId"
,
f
.
getAmosUserId
());
map
.
put
(
"companyName"
,
e
.
get
(
"name"
).
toString
());
orgUsers
.
add
(
map
);
});
}
//// 机场单位 模块 消防急救保障部中,“人员职务”不为空的人员
if
(
e
.
containsKey
(
"name"
))
{
List
<
Map
<
String
,
Object
>>
mapList
=
iOrgUsrService
.
queryCompanyIdNew
(
e
.
get
(
"name"
).
toString
());
orgUsers
.
addAll
(
mapList
);
}
}
}
// 安运部
// 获取报送规则
if
(
e
.
get
(
"type"
).
toString
().
equals
(
"AY"
))
{
sendIds
.
stream
().
forEach
(
e
->{
if
(
e
.
containsKey
(
"name"
))
{
String
[]
arr
=
e
.
get
(
"airportPost"
).
toString
().
split
(
","
);
// 一般火灾 // 航空器救援
if
(
alertTypeCode
.
equals
(
AlertStageEnums
.
YBHZ
.
getCode
())
||
alertTypeCode
.
equals
(
AlertStageEnums
.
HKJY
.
getCode
()))
{
// 当日值班人员:获值班表中包括消救部、综合办公室、消防支队、应急指挥科的值班人员。
if
(
e
.
containsKey
(
"onDuty"
))
{
String
[]
arr
=
e
.
get
(
"onDuty"
).
toString
().
split
(
","
);
List
<
String
>
list
=
Arrays
.
asList
(
arr
);
List
<
String
>
list
=
Arrays
.
asList
(
arr
);
List
<
Map
<
String
,
Object
>>
mapList
=
i
OrgUsrService
.
queryCompanyId
(
e
.
get
(
"name"
).
toString
(),
list
);
List
<
Map
<
String
,
Object
>>
mapList
=
i
DutyPersonService
.
queryByCompanyId
(
list
);
orgUsers
.
addAll
(
mapList
);
orgUsers
.
addAll
(
mapList
);
}
}
}
//根据人员岗位:班组长、队长、通讯员; 消防队伍--消防人员 中,对应岗位的人员
// 事发单位
if
(
e
.
containsKey
(
"fireBrigade"
))
{
if
(
e
.
get
(
"type"
).
toString
().
equals
(
"SF"
))
{
List
<
FirefightersDto
>
fireBrigade
=
firefightersService
.
queryById
(
e
.
get
(
"fireBrigade"
).
toString
().
split
(
","
),
e
.
get
(
"name"
).
toString
());
if
(
e
.
containsKey
(
"airportPost"
))
{
fireBrigade
.
stream
().
forEach
(
f
->{
String
[]
arr
=
e
.
get
(
"airportPost"
).
toString
().
split
(
","
);
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
List
<
String
>
list
=
Arrays
.
asList
(
arr
);
map
.
put
(
"telephone"
,
f
.
getMobilePhone
());
List
<
Map
<
String
,
Object
>>
mapList
=
iOrgUsrService
.
queryCompanyId
(
unitInvolved
,
list
);
map
.
put
(
"sequenceNbr"
,
f
.
getSequenceNbr
());
map
.
put
(
"bizOrgName"
,
f
.
getName
());
map
.
put
(
"amosUserId"
,
f
.
getAmosUserId
());
map
.
put
(
"companyName"
,
e
.
get
(
"name"
).
toString
());
orgUsers
.
add
(
map
);
});
}
//// 机场单位 模块 消防急救保障部中,“人员职务”不为空的人员
if
(
e
.
containsKey
(
"name"
))
{
List
<
Map
<
String
,
Object
>>
mapList
=
iOrgUsrService
.
queryCompanyIdNew
(
e
.
get
(
"name"
).
toString
());
orgUsers
.
addAll
(
mapList
);
orgUsers
.
addAll
(
mapList
);
}
}
}
}
// 突发事件救援 // 漏油现场安全保障 // 专机保障 // 其他
// 安运部
if
(
alertTypeCode
.
equals
(
AlertStageEnums
.
TFSJ
.
getCode
())
||
alertTypeCode
.
equals
(
AlertStageEnums
.
LYXC
.
getCode
())
if
(
e
.
get
(
"type"
).
toString
().
equals
(
"AY"
))
{
||
alertTypeCode
.
equals
(
AlertStageEnums
.
ZJBZ
.
getCode
())
||
alertTypeCode
.
equals
(
AlertStageEnums
.
QTJQ
.
getCode
()))
{
if
(
e
.
containsKey
(
"name"
))
{
if
(
e
.
containsKey
(
"onDuty"
))
{
String
[]
arr
=
e
.
get
(
"airportPost"
).
toString
().
split
(
","
);
List
<
Map
<
String
,
Object
>>
mapList
=
iDutyPersonService
.
queryByCompanyNew
(
e
.
get
(
"name"
).
toString
());
List
<
String
>
list
=
Arrays
.
asList
(
arr
);
orgUsers
.
addAll
(
mapList
);
List
<
Map
<
String
,
Object
>>
mapList
=
iOrgUsrService
.
queryCompanyId
(
e
.
get
(
"name"
).
toString
(),
list
);
orgUsers
.
addAll
(
mapList
);
}
}
// 事发单位
if
(
e
.
get
(
"type"
).
toString
().
equals
(
"SF"
))
{
if
(
e
.
containsKey
(
"airportPost"
))
{
String
[]
arr
=
e
.
get
(
"airportPost"
).
toString
().
split
(
","
);
List
<
String
>
list
=
Arrays
.
asList
(
arr
);
List
<
Map
<
String
,
Object
>>
mapList
=
iOrgUsrService
.
queryCompanyId
(
unitInvolved
,
list
);
orgUsers
.
addAll
(
mapList
);
}
}
}
}
}
// 120急救
if
(
alertTypeCode
.
equals
(
AlertStageEnums
.
JJJQ
.
getCode
()))
{
if
(
e
.
containsKey
(
"name"
))
{
List
<
Map
<
String
,
Object
>>
mapList
=
iDutyPersonService
.
queryByCompanyNew
(
e
.
get
(
"name"
).
toString
());
orgUsers
.
addAll
(
mapList
);
List
<
Map
<
String
,
Object
>>
mapList1
=
iOrgUsrService
.
queryCompanyIdNew
(
e
.
get
(
"name"
).
toString
());
// 突发事件救援 // 漏油现场安全保障 // 专机保障 // 其他
orgUsers
.
addAll
(
mapList1
);
if
(
alertTypeCode
.
equals
(
AlertStageEnums
.
TFSJ
.
getCode
())
||
alertTypeCode
.
equals
(
AlertStageEnums
.
LYXC
.
getCode
())
||
alertTypeCode
.
equals
(
AlertStageEnums
.
ZJBZ
.
getCode
())
||
alertTypeCode
.
equals
(
AlertStageEnums
.
QTJQ
.
getCode
()))
{
if
(
e
.
containsKey
(
"onDuty"
))
{
List
<
Map
<
String
,
Object
>>
mapList
=
iDutyPersonService
.
queryByCompanyNew
(
e
.
get
(
"onDuty"
).
toString
());
orgUsers
.
addAll
(
mapList
);
}
}
}
}
});
Map
<
String
,
Map
<
String
,
Object
>>
mapcq
=
new
HashMap
<>();
// 120急救
//对人员去重
if
(
alertTypeCode
.
equals
(
AlertStageEnums
.
JJJQ
.
getCode
()))
{
if
(
orgUsers
!=
null
&&
orgUsers
.
size
()>
0
){
if
(
e
.
containsKey
(
"name"
))
{
orgUsers
.
forEach
(
org
->
{
List
<
Map
<
String
,
Object
>>
mapList
=
iDutyPersonService
.
queryByCompanyNew
(
e
.
get
(
"name"
).
toString
());
if
(
org
.
get
(
"amosUserId"
)!=
null
){
orgUsers
.
addAll
(
mapList
);
mapcq
.
put
(
org
.
get
(
"amosUserId"
).
toString
(),
org
);
List
<
Map
<
String
,
Object
>>
mapList1
=
iOrgUsrService
.
queryCompanyIdNew
(
e
.
get
(
"name"
).
toString
());
orgUsers
.
addAll
(
mapList1
);
}
}
}
});
});
}
orgUsers
.
clear
();
orgUsers
.
addAll
(
mapcq
.
values
());
// 警情初报 续报 结案
Map
<
String
,
Map
<
String
,
Object
>>
mapcq
=
new
HashMap
<>();
// 1.保存警情记录主表
//对人员去重
AlertSubmitted
alertSubmitted
=
new
AlertSubmitted
();
if
(
orgUsers
!=
null
&&
orgUsers
.
size
()>
0
){
alertSubmitted
.
setAlertCalledId
(
Long
.
valueOf
(
calledRo
.
getSequenceNbr
()));
orgUsers
.
forEach
(
org
->
{
// 保存初报细分类型(一般火灾、航空器救援等)
if
(
org
.
get
(
"amosUserId"
)!=
null
){
alertSubmitted
.
setBusinessTypeCode
(
calledRo
.
getAlertTypeCode
());
mapcq
.
put
(
org
.
get
(
"amosUserId"
).
toString
(),
org
);
// 警情初报 --- 续报 结案
}
if
(
alertWay
.
equals
(
AlertBusinessTypeEnum
.
警情初报
.
getCode
()))
{
});
alertSubmitted
.
setBusinessType
(
AlertBusinessTypeEnum
.
警情初报
.
getName
());
}
orgUsers
.
clear
();
Optional
<
SubmissionMethodEnum
>
submissionMethodEnum
=
Optional
.
of
(
SubmissionMethodEnum
.
SMS
);
orgUsers
.
addAll
(
mapcq
.
values
());
alertSubmitted
.
setSubmissionMethodCode
(
submissionMethodEnum
.
get
().
getCode
());
alertSubmitted
.
setSubmissionMethod
(
submissionMethodEnum
.
get
().
getName
());
Optional
<
AlertSchedulingTypeEnum
>
alertSchedulingTypeEnum
=
Optional
.
of
(
AlertSchedulingTypeEnum
.
融合调度
);
// 警情初报 续报 结案
alertSubmitted
.
setSchedulingTypeCode
(
alertSchedulingTypeEnum
.
get
().
getCode
());
// 1.保存警情记录主表
alertSubmitted
.
setSchedulingType
(
alertSchedulingTypeEnum
.
get
().
getName
());
AlertSubmitted
alertSubmitted
=
new
AlertSubmitted
();
alertSubmitted
.
setSubmissionContent
(
JSONObject
.
toJSONString
(
objectToMap
(
calledRo
)));
alertSubmitted
.
setAlertCalledId
(
Long
.
valueOf
(
calledRo
.
getSequenceNbr
()));
alertSubmitted
.
setSender
(
alertCalled
.
getRecUserName
());
// 保存初报细分类型(一般火灾、航空器救援等)
alertSubmitted
.
setUpdateTime
(
new
Date
());
alertSubmitted
.
setBusinessTypeCode
(
calledRo
.
getAlertTypeCode
());
alertSubmitted
.
setSubmissionTime
(
new
Date
());
// 警情初报 --- 续报 结案
if
(
alertWay
.
equals
(
AlertBusinessTypeEnum
.
警情初报
.
getCode
()))
{
this
.
baseMapper
.
insert
(
alertSubmitted
);
alertSubmitted
.
setBusinessType
(
AlertBusinessTypeEnum
.
警情初报
.
getName
());
alertSubmittedId
=
alertSubmitted
.
getSequenceNbr
().
toString
();
Optional
<
SubmissionMethodEnum
>
submissionMethodEnum
=
Optional
.
of
(
SubmissionMethodEnum
.
SMS
);
}
else
if
(
alertWay
.
equals
(
AlertBusinessTypeEnum
.
警情续报
.
getCode
()))
{
alertSubmitted
.
setSubmissionMethodCode
(
submissionMethodEnum
.
get
().
getCode
());
alertSubmitted
.
setBusinessType
(
AlertBusinessTypeEnum
.
警情续报
.
getName
());
alertSubmitted
.
setSubmissionMethod
(
submissionMethodEnum
.
get
().
getName
());
sCode
=
"SMS_JCS_XB"
;
Optional
<
AlertSchedulingTypeEnum
>
alertSchedulingTypeEnum
=
Optional
.
of
(
AlertSchedulingTypeEnum
.
融合调度
);
}
else
if
(
alertWay
.
equals
(
AlertBusinessTypeEnum
.
警情结案
.
getCode
()))
{
alertSubmitted
.
setSchedulingTypeCode
(
alertSchedulingTypeEnum
.
get
().
getCode
());
alertSubmitted
.
setBusinessType
(
AlertBusinessTypeEnum
.
警情结案
.
getName
());
alertSubmitted
.
setSchedulingType
(
alertSchedulingTypeEnum
.
get
().
getName
());
sCode
=
"SMS_JCS_JA"
;
alertSubmitted
.
setSubmissionContent
(
JSONObject
.
toJSONString
(
objectToMap
(
calledRo
)));
}
else
{
alertSubmitted
.
setSender
(
alertCalled
.
getRecUserName
());
alertSubmitted
.
setBusinessType
(
AlertBusinessTypeEnum
.
非警情确认
.
getName
());
alertSubmitted
.
setUpdateTime
(
new
Date
());
sCode
=
"SMS_JCS_QR"
;
alertSubmitted
.
setSubmissionTime
(
new
Date
());
}
this
.
baseMapper
.
insert
(
alertSubmitted
);
alertSubmittedId
=
alertSubmitted
.
getSequenceNbr
().
toString
();
}
else
if
(
alertWay
.
equals
(
AlertBusinessTypeEnum
.
警情续报
.
getCode
()))
{
alertSubmitted
.
setBusinessType
(
AlertBusinessTypeEnum
.
警情续报
.
getName
());
sCode
=
"SMS_JCS_XB"
;
}
else
if
(
alertWay
.
equals
(
AlertBusinessTypeEnum
.
警情结案
.
getCode
()))
{
alertSubmitted
.
setBusinessType
(
AlertBusinessTypeEnum
.
警情结案
.
getName
());
sCode
=
"SMS_JCS_JA"
;
}
else
{
alertSubmitted
.
setBusinessType
(
AlertBusinessTypeEnum
.
非警情确认
.
getName
());
sCode
=
"SMS_JCS_QR"
;
}
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()));
// e -> e.getCode().equals(calledRo.getAlertTypeCode()));
// smsCode = alertBusinessTypeEnum.get().getSms_code();
// smsCode = alertBusinessTypeEnum.get().getSms_code();
if
(!
alertWay
.
equals
(
AlertBusinessTypeEnum
.
警情初报
.
getCode
()))
{
LambdaQueryWrapper
<
AlertSubmitted
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
AlertSubmitted:
:
getAlertCalledId
,
alertCalledId
);
queryWrapper
.
orderByDesc
(
AlertSubmitted:
:
getSequenceNbr
);
List
<
AlertSubmitted
>
alertSubmitteds
=
alertSubmittedMapper
.
selectList
(
queryWrapper
);
alertSubmittedNew
=
alertSubmitteds
.
get
(
0
);
if
(!
ValidationUtil
.
isEmpty
(
calledRo
.
getUsIds
()))
{
usIds
.
addAll
(
Arrays
.
asList
(
calledRo
.
getUsIds
().
split
(
","
)));
}
}
// 组装人员信息
for
(
Map
<
String
,
Object
>
orgUser
:
orgUsers
)
{
AlertSubmittedObject
alertSubmittedObject
=
new
AlertSubmittedObject
();
if
(!
alertWay
.
equals
(
AlertBusinessTypeEnum
.
警情初报
.
getCode
()))
{
if
(!
alertWay
.
equals
(
AlertBusinessTypeEnum
.
警情初报
.
getCode
()))
{
alertSubmittedObject
.
setAlertSubmittedId
(
alertSubmittedNew
.
getSequenceNbr
());
LambdaQueryWrapper
<
AlertSubmitted
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
}
else
{
queryWrapper
.
eq
(
AlertSubmitted:
:
getAlertCalledId
,
alertCalledId
);
alertSubmittedObject
.
setAlertSubmittedId
(
Long
.
parseLong
(
alertSubmittedId
));
queryWrapper
.
orderByDesc
(
AlertSubmitted:
:
getSequenceNbr
);
List
<
AlertSubmitted
>
alertSubmitteds
=
alertSubmittedMapper
.
selectList
(
queryWrapper
);
alertSubmittedNew
=
alertSubmitteds
.
get
(
0
);
if
(!
ValidationUtil
.
isEmpty
(
calledRo
.
getUsIds
()))
{
usIds
.
addAll
(
Arrays
.
asList
(
calledRo
.
getUsIds
().
split
(
","
)));
}
}
}
if
(!
ValidationUtil
.
isEmpty
(
orgUser
.
get
(
"amosUserId"
)))
{
// 组装人员信息
usIds
.
add
(
orgUser
.
get
(
"amosUserId"
).
toString
());
for
(
Map
<
String
,
Object
>
orgUser
:
orgUsers
)
{
}
AlertSubmittedObject
alertSubmittedObject
=
new
AlertSubmittedObject
();
if
(!
alertWay
.
equals
(
AlertBusinessTypeEnum
.
警情初报
.
getCode
()))
{
alertSubmittedObject
.
setAlertSubmittedId
(
alertSubmittedNew
.
getSequenceNbr
());
}
else
{
alertSubmittedObject
.
setAlertSubmittedId
(
Long
.
parseLong
(
alertSubmittedId
));
}
alertSubmittedObject
.
setType
(
false
);
if
(!
ValidationUtil
.
isEmpty
(
orgUser
.
get
(
"amosUserId"
)))
{
usIds
.
add
(
orgUser
.
get
(
"amosUserId"
).
toString
());
}
alertSubmittedObject
.
setUserId
(
Long
.
valueOf
(
String
.
valueOf
(
orgUser
.
get
(
"sequenceNbr"
))));
alertSubmittedObject
.
setType
(
false
);
alertSubmittedObject
.
setTheUser
((
String
)
orgUser
.
get
(
"bizOrgName"
));
alertSubmittedObject
.
setCompanyName
((
String
)
orgUser
.
get
(
"companyName"
));
if
(!
ValidationUtil
.
isEmpty
(
orgUser
.
get
(
"telephone"
)))
{
alertSubmittedObject
.
setUserId
(
Long
.
valueOf
(
String
.
valueOf
(
orgUser
.
get
(
"sequenceNbr"
))));
mobiles
.
add
(
orgUser
.
get
(
"telephone"
).
toString
());
alertSubmittedObject
.
setTheUser
((
String
)
orgUser
.
get
(
"bizOrgName"
));
alertSubmittedObject
.
setUserPhone
((
String
)
orgUser
.
get
(
"telephone"
));
alertSubmittedObject
.
setCompanyName
((
String
)
orgUser
.
get
(
"companyName"
));
if
(!
ValidationUtil
.
isEmpty
(
orgUser
.
get
(
"telephone"
)))
{
mobiles
.
add
(
orgUser
.
get
(
"telephone"
).
toString
());
alertSubmittedObject
.
setUserPhone
((
String
)
orgUser
.
get
(
"telephone"
));
}
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
(
"fireLocation"
,
calledRo
.
getFireLocation
());
smsParams
.
put
(
"fireLocation"
,
calledRo
.
getFireLocation
());
log
.
info
(
"alertCalled888888"
+
alertCalled
);
log
.
info
(
"alertCalled888888"
+
alertCalled
);
smsParams
.
put
(
"endTimeStr"
,
alertCalled
.
getUpdateTime
()!=
null
?
DateUtils
.
convertDateToString
(
alertCalled
.
getUpdateTime
(),
DateUtils
.
DATE_TIME_PATTERN
)
:
""
);
smsParams
.
put
(
"endTimeStr"
,
alertCalled
.
getUpdateTime
()!=
null
?
DateUtils
.
convertDateToString
(
alertCalled
.
getUpdateTime
(),
DateUtils
.
DATE_TIME_PATTERN
)
:
""
);
smsParams
.
put
(
"burningMaterial"
,
calledRo
.
getBurningMaterial
());
smsParams
.
put
(
"burningMaterial"
,
calledRo
.
getBurningMaterial
());
smsParams
.
put
(
"fireSituation"
,
calledRo
.
getFireSituation
());
smsParams
.
put
(
"fireSituation"
,
calledRo
.
getFireSituation
());
smsParams
.
put
(
"trappedNum"
,
calledRo
.
getTrappedNum
());
smsParams
.
put
(
"trappedNum"
,
calledRo
.
getTrappedNum
());
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
());
}
}
// 短信报送对象
// 短信报送对象
alertSubmittedObjectServiceImpl
.
saveBatch
(
alertSubmittedObjectList
);
alertSubmittedObjectServiceImpl
.
saveBatch
(
alertSubmittedObjectList
);
// 发送任务消息
// 发送任务消息
// 组织短信内容
// 组织短信内容
// 调用短信发送接口
// 调用短信发送接口
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
));
pushPowerTransferToAppAndWeb
(
AlertBusinessTypeEnum
.
警情初报
.
getCode
(),
besidesMap
,
smsParams
,
usIds
,
null
);
}
else
{
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
);
}
}
else
{
if
(
alertWay
.
equals
(
AlertBusinessTypeEnum
.
警情续报
.
getCode
()))
{
besidesMap
.
put
(
"sendTime"
,
DateUtils
.
dateFormat
(
alertCalled
.
getCallTime
(),
DateUtils
.
DATE_TIME_PATTERN
));
pushPowerTransferToAppAndWeb
(
AlertBusinessTypeEnum
.
警情续报
.
getCode
(),
besidesMap
,
smsParams
,
usIds
,
null
);
}
if
(
alertWay
.
equals
(
AlertBusinessTypeEnum
.
警情结案
.
getCode
()))
{
if
(
alertWay
.
equals
(
AlertBusinessTypeEnum
.
警情结案
.
getCode
()))
{
besidesMap
.
put
(
"startTime"
,
DateUtils
.
dateFormat
(
alertCalled
.
getCallTime
(),
DateUtils
.
DATE_TIME_PATTERN
));
besidesMap
.
put
(
"startTime"
,
DateUtils
.
dateFormat
(
alertCalled
.
getCallTime
(),
DateUtils
.
DATE_TIME_PATTERN
));
besidesMap
.
put
(
"endTime"
,
DateUtils
.
dateFormat
(
alertCalled
.
getRecDate
(),
DateUtils
.
DATE_TIME_PATTERN
));
besidesMap
.
put
(
"endTime"
,
DateUtils
.
dateFormat
(
alertCalled
.
getRecDate
(),
DateUtils
.
DATE_TIME_PATTERN
));
pushPowerTransferToAppAndWeb
(
AlertBusinessTypeEnum
.
警情结案
.
getCode
(),
besidesMap
,
smsParams
,
usIds
,
null
);
pushPowerTransferToAppAndWeb
(
AlertBusinessTypeEnum
.
警情结案
.
getCode
(),
besidesMap
,
smsParams
,
usIds
,
null
);
}
}
if
(
alertWay
.
equals
(
AlertBusinessTypeEnum
.
非警情确认
.
getCode
()))
{
if
(
alertWay
.
equals
(
AlertBusinessTypeEnum
.
非警情确认
.
getCode
()))
{
pushPowerTransferToAppAndWeb
(
AlertBusinessTypeEnum
.
非警情确认
.
getCode
(),
besidesMap
,
smsParams
,
usIds
,
null
);
pushPowerTransferToAppAndWeb
(
AlertBusinessTypeEnum
.
非警情确认
.
getCode
(),
besidesMap
,
smsParams
,
usIds
,
null
);
}
}
alertCalledAction
.
sendAlertCalleCmd
(
sCode
,
mobiles
,
smsParams
);
alertCalledAction
.
sendAlertCalleCmd
(
sCode
,
mobiles
,
smsParams
);
}
}
emqKeeper
.
getMqttClient
().
publish
(
topic
,
alertCalledId
.
getBytes
(),
RuleConfig
.
DEFAULT_QOS
,
false
);
emqKeeper
.
getMqttClient
().
publish
(
topic
,
alertCalledId
.
getBytes
(),
RuleConfig
.
DEFAULT_QOS
,
false
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
throw
new
RuntimeException
();
throw
new
RuntimeException
();
...
@@ -680,142 +667,142 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -680,142 +667,142 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
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
=
""
;
Date
endDate
=
null
;
Date
endDate
=
null
;
Map
<
String
,
String
>
map
=
new
HashMap
<>();
Map
<
String
,
String
>
map
=
new
HashMap
<>();
Set
<
String
>
mobiles
=
new
HashSet
<>();
Set
<
String
>
mobiles
=
new
HashSet
<>();
List
<
Long
>
userIds
=
new
ArrayList
<>();
List
<
Long
>
userIds
=
new
ArrayList
<>();
if
(
alertSubmittedId
==
null
)
{
if
(
alertSubmittedId
==
null
)
{
// 1.保存警情记录主表
// 1.保存警情记录主表
AlertSubmitted
alertSubmitted
=
new
AlertSubmitted
();
AlertSubmitted
alertSubmitted
=
new
AlertSubmitted
();
String
bussTypeCode
;
String
bussTypeCode
;
alertSubmitted
.
setAlertCalledId
(
alertSubmittedDto
.
getAlertCalledId
());
alertSubmitted
.
setAlertCalledId
(
alertSubmittedDto
.
getAlertCalledId
());
// 任务 4174 日常值班---融合调度----短信模版中的内容用户可以全部删除掉,按照自定义内容重新录入发送内容 by litw 2021年10月27日
// 任务 4174 日常值班---融合调度----短信模版中的内容用户可以全部删除掉,按照自定义内容重新录入发送内容 by litw 2021年10月27日
alertSubmitted
.
setBusinessTypeCode
(
alertSubmittedDto
.
getBusinessTypeCode
());
alertSubmitted
.
setBusinessTypeCode
(
alertSubmittedDto
.
getBusinessTypeCode
());
bussTypeCode
=
alertSubmittedDto
.
getBusinessTypeCode
();
bussTypeCode
=
alertSubmittedDto
.
getBusinessTypeCode
();
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
.
get
().
getName
());
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
.
get
().
getName
());
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
.
get
().
getName
());
// 任务 4174 日常值班---融合调度----短信模版中的内容用户可以全部删除掉,按照自定义内容重新录入发送内容 by litw 2021年10月27日
alertSubmitted
.
setBusinessTypeCode
(
alertSubmittedDto
.
getBusinessTypeCode
());
alertSubmittedDto
.
getSubmitContent
().
get
(
"recDate"
).
toString
();
endDate
=
DateUtils
.
dateParse
(
alertSubmittedDto
.
getSubmitContent
().
get
(
"recDate"
).
toString
(),
DateUtils
.
HOUR_PATTERN
);
alertSubmitted
.
setSubmissionContent
(
alertSubmittedDto
.
getSubmitContent
().
toJSONString
());
alertSubmitted
.
setSender
(
userName
);
alertSubmitted
.
setRecUserName
(
userName
);
alertSubmitted
.
setUpdateTime
(
new
Date
());
alertSubmitted
.
setSubmissionTime
(
new
Date
());
this
.
baseMapper
.
insert
(
alertSubmitted
);
alertSubmittedId
=
alertSubmitted
.
getSequenceNbr
();
}
// 2.保存任务表
// 任务 4174 日常值班---融合调度----短信模版中的内容用户可以全部删除掉,按照自定义内容重新录入发送内容 by litw 2021年10月27日
List
<
AlertSubmittedObject
>
alertSubmittedObjectList
=
Lists
.
newArrayList
();
alertSubmitted
.
setBusinessTypeCode
(
alertSubmittedDto
.
getBusinessTypeCode
());
Long
finalAlertSubmittedId
=
alertSubmittedId
;
alertSubmittedDto
.
getSubmitContent
().
get
(
"recDate"
).
toString
();
// 报送给单位
endDate
=
DateUtils
.
dateParse
(
alertSubmittedDto
.
getSubmitContent
().
get
(
"recDate"
).
toString
(),
DateUtils
.
HOUR_PATTERN
);
if
(
AlertSubmitTypeEnum
.
Org
.
getKey
().
equals
(
alertSubmittedDto
.
getType
()))
{
alertSubmittedDto
.
getSubmitCompanyList
().
forEach
(
company
->
{
alertSubmitted
.
setSubmissionContent
(
alertSubmittedDto
.
getSubmitContent
().
toJSONString
());
AlertSubmittedObject
alertSubmittedObject
=
new
AlertSubmittedObject
();
alertSubmittedObject
.
setAlertSubmittedId
(
finalAlertSubmittedId
);
alertSubmitted
.
setSender
(
userName
);
alertSubmittedObject
.
setType
(
true
);
alertSubmitted
.
setRecUserName
(
userName
);
alertSubmittedObject
.
setCompanyId
(
company
.
getCompanyId
());
alertSubmitted
.
setUpdateTime
(
new
Date
());
alertSubmittedObject
.
setCompanyName
(
company
.
getCompanyName
());
alertSubmitted
.
setSubmissionTime
(
new
Date
());
alertSubmittedObject
.
setRecUserName
(
userName
);
this
.
baseMapper
.
insert
(
alertSubmitted
);
alertSubmittedObjectList
.
add
(
alertSubmittedObject
);
});
alertSubmittedId
=
alertSubmitted
.
getSequenceNbr
();
}
else
{
}
// 报送给个人
alertSubmittedDto
.
getSubmitCompanyList
().
forEach
(
company
->
{
// 2.保存任务表
company
.
getPersonList
().
forEach
(
person
->
{
List
<
AlertSubmittedObject
>
alertSubmittedObjectList
=
Lists
.
newArrayList
();
Long
finalAlertSubmittedId
=
alertSubmittedId
;
// 报送给单位
if
(
AlertSubmitTypeEnum
.
Org
.
getKey
().
equals
(
alertSubmittedDto
.
getType
()))
{
alertSubmittedDto
.
getSubmitCompanyList
().
forEach
(
company
->
{
AlertSubmittedObject
alertSubmittedObject
=
new
AlertSubmittedObject
();
AlertSubmittedObject
alertSubmittedObject
=
new
AlertSubmittedObject
();
alertSubmittedObject
.
setAlertSubmittedId
(
finalAlertSubmittedId
);
alertSubmittedObject
.
setAlertSubmittedId
(
finalAlertSubmittedId
);
alertSubmittedObject
.
setType
(
fals
e
);
alertSubmittedObject
.
setType
(
tru
e
);
alertSubmittedObject
.
setCompanyId
(
company
.
getCompanyId
());
alertSubmittedObject
.
setCompanyId
(
company
.
getCompanyId
());
alertSubmittedObject
.
setCompanyName
(
company
.
getCompanyName
());
alertSubmittedObject
.
setCompanyName
(
company
.
getCompanyName
());
alertSubmittedObject
.
setUserId
(
person
.
getPersonId
());
userIds
.
add
(
person
.
getPersonId
());
alertSubmittedObject
.
setTheUser
(
person
.
getPersonName
());
alertSubmittedObject
.
setUserPhone
(
person
.
getPersonPhone
());
alertSubmittedObject
.
setRecUserName
(
userName
);
alertSubmittedObject
.
setRecUserName
(
userName
);
if
(!
ValidationUtil
.
isEmpty
(
person
.
getPersonPhone
()))
{
mobiles
.
add
(
person
.
getPersonPhone
());
}
alertSubmittedObjectList
.
add
(
alertSubmittedObject
);
alertSubmittedObjectList
.
add
(
alertSubmittedObject
);
});
});
});
}
else
{
}
// 报送给个人
alertSubmittedDto
.
getSubmitCompanyList
().
forEach
(
company
->
{
company
.
getPersonList
().
forEach
(
person
->
{
AlertSubmittedObject
alertSubmittedObject
=
new
AlertSubmittedObject
();
alertSubmittedObject
.
setAlertSubmittedId
(
finalAlertSubmittedId
);
alertSubmittedObject
.
setType
(
false
);
alertSubmittedObject
.
setCompanyId
(
company
.
getCompanyId
());
alertSubmittedObject
.
setCompanyName
(
company
.
getCompanyName
());
alertSubmittedObject
.
setUserId
(
person
.
getPersonId
());
userIds
.
add
(
person
.
getPersonId
());
alertSubmittedObject
.
setTheUser
(
person
.
getPersonName
());
alertSubmittedObject
.
setUserPhone
(
person
.
getPersonPhone
());
alertSubmittedObject
.
setRecUserName
(
userName
);
if
(!
ValidationUtil
.
isEmpty
(
person
.
getPersonPhone
()))
{
mobiles
.
add
(
person
.
getPersonPhone
());
}
alertSubmittedObjectList
.
add
(
alertSubmittedObject
);
});
});
}
// 查询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
>
usIds
=
new
ArrayList
<>();
List
<
String
>
usIds
=
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
()))
{
usIds
.
add
(
e
.
getAmosOrgId
());
usIds
.
add
(
e
.
getAmosOrgId
());
}
}
});
});
map
.
put
(
"usIds"
,
StringUtils
.
join
(
usIds
.
toArray
(
new
String
[
userIds
.
size
()]),
","
));
map
.
put
(
"usIds"
,
StringUtils
.
join
(
usIds
.
toArray
(
new
String
[
userIds
.
size
()]),
","
));
}
else
{
}
else
{
map
.
put
(
"usIds"
,
""
);
map
.
put
(
"usIds"
,
""
);
}
}
// alertSubmittedObjectServiceImpl.saveBatch(alertSubmittedObjectList);
// alertSubmittedObjectServiceImpl.saveBatch(alertSubmittedObjectList);
for
(
AlertSubmittedObject
object
:
alertSubmittedObjectList
)
{
for
(
AlertSubmittedObject
object
:
alertSubmittedObjectList
)
{
alertSubmittedObjectServiceImpl
.
save
(
object
);
alertSubmittedObjectServiceImpl
.
save
(
object
);
}
}
// 3.更新警情状态
// 3.更新警情状态
alertCalledService
.
updateAlertCalled
(
alertSubmittedDto
.
getAlertCalledId
(),
alertCalledService
.
updateAlertCalled
(
alertSubmittedDto
.
getAlertCalledId
(),
alertSubmittedDto
.
getBusinessTypeCode
(),
alertSubmittedDto
.
getBusinessTypeCode
(),
alertSubmittedDto
.
getSubmitContent
().
get
(
"trappedNum"
)!=
null
?
alertSubmittedDto
.
getSubmitContent
().
get
(
"trappedNum"
).
toString
():
null
,
alertSubmittedDto
.
getSubmitContent
().
get
(
"trappedNum"
)!=
null
?
alertSubmittedDto
.
getSubmitContent
().
get
(
"trappedNum"
).
toString
():
null
,
alertSubmittedDto
.
getSubmitContent
().
get
(
"casualtiesNum"
)!=
null
?
alertSubmittedDto
.
getSubmitContent
().
get
(
"casualtiesNum"
).
toString
():
null
,
alertSubmittedDto
.
getSubmitContent
().
get
(
"casualtiesNum"
)!=
null
?
alertSubmittedDto
.
getSubmitContent
().
get
(
"casualtiesNum"
).
toString
():
null
,
alertSubmittedDto
.
getSubmitContent
().
get
(
"recDate"
)!=
null
?
alertSubmittedDto
.
getSubmitContent
().
get
(
"recDate"
).
toString
():
null
alertSubmittedDto
.
getSubmitContent
().
get
(
"recDate"
)!=
null
?
alertSubmittedDto
.
getSubmitContent
().
get
(
"recDate"
).
toString
():
null
);
);
// 警情续报
// 警情续报
if
(
AlertBusinessTypeEnum
.
警情续报
.
getCode
().
equals
(
alertSubmittedDto
.
getBusinessTypeCode
()))
{
if
(
AlertBusinessTypeEnum
.
警情续报
.
getCode
().
equals
(
alertSubmittedDto
.
getBusinessTypeCode
()))
{
alertWay
=
AlertBusinessTypeEnum
.
警情续报
.
getCode
();
alertWay
=
AlertBusinessTypeEnum
.
警情续报
.
getCode
();
}
}
if
(
AlertBusinessTypeEnum
.
警情结案
.
getCode
().
equals
(
alertSubmittedDto
.
getBusinessTypeCode
()))
{
if
(
AlertBusinessTypeEnum
.
警情结案
.
getCode
().
equals
(
alertSubmittedDto
.
getBusinessTypeCode
()))
{
alertWay
=
AlertBusinessTypeEnum
.
警情结案
.
getCode
();
alertWay
=
AlertBusinessTypeEnum
.
警情结案
.
getCode
();
// 警情结案生成模板
// 警情结案生成模板
try
{
try
{
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
(
FileNotFoundException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
catch
(
ParseException
e
)
{
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
}
}
if
(
AlertBusinessTypeEnum
.
非警情确认
.
getCode
().
equals
(
alertSubmittedDto
.
getBusinessTypeCode
()))
{
if
(
AlertBusinessTypeEnum
.
非警情确认
.
getCode
().
equals
(
alertSubmittedDto
.
getBusinessTypeCode
()))
{
alertWay
=
AlertBusinessTypeEnum
.
非警情确认
.
getCode
();
alertWay
=
AlertBusinessTypeEnum
.
非警情确认
.
getCode
();
}
}
...
@@ -824,33 +811,33 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -824,33 +811,33 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
if
(
AlertBusinessTypeEnum
.
警情结案
.
getCode
().
equals
(
alertSubmittedDto
.
getBusinessTypeCode
())
if
(
AlertBusinessTypeEnum
.
警情结案
.
getCode
().
equals
(
alertSubmittedDto
.
getBusinessTypeCode
())
||
AlertBusinessTypeEnum
.
非警情确认
.
getCode
().
equals
(
alertSubmittedDto
.
getBusinessTypeCode
()))
{
||
AlertBusinessTypeEnum
.
非警情确认
.
getCode
().
equals
(
alertSubmittedDto
.
getBusinessTypeCode
()))
{
// 查询本次警情调派的车辆
// 查询本次警情调派的车辆
List
<
String
>
transferCarIdList
=
List
<
String
>
transferCarIdList
=
powerTransferService
.
queryTransferCarIdsByAlertCalledId
(
alertSubmittedDto
.
getAlertCalledId
());
powerTransferService
.
queryTransferCarIdsByAlertCalledId
(
alertSubmittedDto
.
getAlertCalledId
());
List
<
Object
>
carStatusInfoDtoList
=
Lists
.
newArrayList
();
List
<
Object
>
carStatusInfoDtoList
=
Lists
.
newArrayList
();
if
(!
ValidationUtil
.
isEmpty
(
transferCarIdList
))
{
if
(!
ValidationUtil
.
isEmpty
(
transferCarIdList
))
{
transferCarIdList
.
forEach
(
carId
->
{
transferCarIdList
.
forEach
(
carId
->
{
CarStatusInfoDto
carStatusInfo
=
new
CarStatusInfoDto
();
CarStatusInfoDto
carStatusInfo
=
new
CarStatusInfoDto
();
carStatusInfo
.
setSequenceNbr
(
carId
);
carStatusInfo
.
setSequenceNbr
(
carId
);
carStatusInfo
.
setStatus
(
FireCarStatusEnum
.
执勤
.
getCode
());
carStatusInfo
.
setStatus
(
FireCarStatusEnum
.
执勤
.
getCode
());
carStatusInfoDtoList
.
add
(
carStatusInfo
);
carStatusInfoDtoList
.
add
(
carStatusInfo
);
});
});
}
}
//修改调派车辆任务
//修改调派车辆任务
powerTransferCompanyResourcesService
.
updateByAlertCalledId
(
alertSubmittedDto
.
getAlertCalledId
());
powerTransferCompanyResourcesService
.
updateByAlertCalledId
(
alertSubmittedDto
.
getAlertCalledId
());
// 更新所有车辆状态为执勤
// 更新所有车辆状态为执勤
equipFeignClient
.
updateCarStatus
(
carStatusInfoDtoList
);
equipFeignClient
.
updateCarStatus
(
carStatusInfoDtoList
);
// //跟车辆状态
// //跟车辆状态
// powerTransferCompanyResourcesService.update(new UpdateWrapper<PowerTransferCompanyResources>().eq("resources_id", transferCarIdList).set("status", FireCarStatusEnum.返队.getCode()));
// powerTransferCompanyResourcesService.update(new UpdateWrapper<PowerTransferCompanyResources>().eq("resources_id", transferCarIdList).set("status", FireCarStatusEnum.返队.getCode()));
}
}
//警情結案推送
//警情結案推送
if
(
AlertBusinessTypeEnum
.
警情结案
.
getCode
().
equals
(
alertSubmittedDto
.
getBusinessTypeCode
()))
{
if
(
AlertBusinessTypeEnum
.
警情结案
.
getCode
().
equals
(
alertSubmittedDto
.
getBusinessTypeCode
()))
{
//tuisongxinjingqing
//tuisongxinjingqing
RequestData
par
=
new
RequestData
();
RequestData
par
=
new
RequestData
();
...
@@ -858,41 +845,41 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -858,41 +845,41 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
List
<
AlertCalledZhDto
>
list4
=
alertCalledService
.
alertCalledListByAlertStatus
(
null
,
null
,
par
);
List
<
AlertCalledZhDto
>
list4
=
alertCalledService
.
alertCalledListByAlertStatus
(
null
,
null
,
par
);
String
json
=
""
;
String
json
=
""
;
if
(
list
!=
null
&&
list
.
size
()>
0
){
if
(
list
!=
null
&&
list
.
size
()>
0
){
AlertCalledZhDto
ll
=
list4
.
get
(
0
);
AlertCalledZhDto
ll
=
list4
.
get
(
0
);
Map
<
String
,
String
>
map1
=
org
.
apache
.
commons
.
beanutils
.
BeanUtils
.
describe
((
Object
)
list4
.
get
(
0
));
Map
<
String
,
String
>
map1
=
org
.
apache
.
commons
.
beanutils
.
BeanUtils
.
describe
((
Object
)
list4
.
get
(
0
));
String
strDateFormat
=
"yyyy-MM-dd HH:mm:ss"
;
String
strDateFormat
=
"yyyy-MM-dd HH:mm:ss"
;
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
strDateFormat
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
strDateFormat
);
map1
.
put
(
"callTime"
,
ll
.
getCallTime
()!=
null
?
sdf
.
format
(
ll
.
getCallTime
()):
""
);
map1
.
put
(
"callTime"
,
ll
.
getCallTime
()!=
null
?
sdf
.
format
(
ll
.
getCallTime
()):
""
);
map
.
put
(
"sequenceNbr"
,
ll
.
getSequenceNbr
()+
""
);
map
.
put
(
"sequenceNbr"
,
ll
.
getSequenceNbr
()+
""
);
map1
.
put
(
"updateTime"
,
ll
.
getUpdateTime
()!=
null
?
sdf
.
format
(
ll
.
getUpdateTime
()):
""
);
map1
.
put
(
"updateTime"
,
ll
.
getUpdateTime
()!=
null
?
sdf
.
format
(
ll
.
getUpdateTime
()):
""
);
json
=
list
!=
null
&&
list
.
size
()>
0
?
JSONObject
.
toJSONString
(
map1
,
SerializerFeature
.
PrettyFormat
,
json
=
list
!=
null
&&
list
.
size
()>
0
?
JSONObject
.
toJSONString
(
map1
,
SerializerFeature
.
PrettyFormat
,
SerializerFeature
.
WriteMapNullValue
):
""
;
SerializerFeature
.
WriteMapNullValue
):
""
;
}
}
// String json=list4!=null&&list4.size()>0?JSONObject.toJSONString(list4.get(0), SerializerFeature.PrettyFormat, SerializerFeature.WriteMapNullValue):"";
// String json=list4!=null&&list4.size()>0?JSONObject.toJSONString(list4.get(0), SerializerFeature.PrettyFormat, SerializerFeature.WriteMapNullValue):"";
emqKeeper
.
getMqttClient
().
publish
(
topicJa
,
json
.
getBytes
(),
RuleConfig
.
DEFAULT_QOS
,
false
);
emqKeeper
.
getMqttClient
().
publish
(
topicJa
,
json
.
getBytes
(),
RuleConfig
.
DEFAULT_QOS
,
false
);
}
}
// 4.发送任务消息
// 4.发送任务消息
// 4.1组织短信内容 废弃
// 4.1组织短信内容 废弃
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调用短信发送接口 废弃
// alertCalledAction.sendAlertCalleCmd(smsCode, mobiles, smsParams);\
// alertCalledAction.sendAlertCalleCmd(smsCode, mobiles, smsParams);\
map
.
put
(
"feedBack"
,
feedBack
);
map
.
put
(
"feedBack"
,
feedBack
);
map
.
put
(
"alertWay"
,
alertWay
);
map
.
put
(
"alertWay"
,
alertWay
);
map
.
put
(
"mobiles"
,
StringUtils
.
join
(
mobiles
,
","
));
map
.
put
(
"mobiles"
,
StringUtils
.
join
(
mobiles
,
","
));
return
map
;
return
map
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
throw
new
RuntimeException
(
"报送失败,系统异常!"
);
throw
new
RuntimeException
(
"报送失败,系统异常!"
);
...
@@ -961,19 +948,19 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -961,19 +948,19 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
// 查询车辆资源
// 查询车辆资源
ArrayList
<
Long
>
longs
=
new
ArrayList
<>();
ArrayList
<
Long
>
longs
=
new
ArrayList
<>();
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"
);
}
}
}
}
list
.
add
(
dto
);
list
.
add
(
dto
);
...
@@ -1007,19 +994,19 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -1007,19 +994,19 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
// 查询车辆资源
// 查询车辆资源
ArrayList
<
Long
>
longs
=
new
ArrayList
<>();
ArrayList
<
Long
>
longs
=
new
ArrayList
<>();
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"
);
}
}
}
}
list
.
add
(
dto
);
list
.
add
(
dto
);
...
@@ -1076,7 +1063,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -1076,7 +1063,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
// String checkReportTemplatePath = this.getClass().getClassLoader().getResource("templates/check-report-template" +
// String checkReportTemplatePath = this.getClass().getClassLoader().getResource("templates/check-report-template" +
// ".docx").getFile();
// ".docx").getFile();
// String filePath = this.getClass().getClassLoader().getResource("templates").getPath();
// 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"
))
{
...
@@ -1286,7 +1273,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -1286,7 +1273,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
// 表格渲染和列表数据下标相反,需要翻转一下列表
// 表格渲染和列表数据下标相反,需要翻转一下列表
List
<
RowRenderData
>
reverseList
=
Lists
.
reverse
(
dangerList
);
List
<
RowRenderData
>
reverseList
=
Lists
.
reverse
(
dangerList
);
table
.
removeRow
(
dangerListDataStartRow
);
table
.
removeRow
(
dangerListDataStartRow
);
// 循环插入行
// 循环插入行
int
listLength
=
dangerList
.
size
();
int
listLength
=
dangerList
.
size
();
for
(
int
i
=
0
;
i
<
fSizs
;
i
++)
{
for
(
int
i
=
0
;
i
<
fSizs
;
i
++)
{
...
@@ -1672,13 +1659,13 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -1672,13 +1659,13 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
//List<Map<String, Object>> mapList = dynamicFormInstanceMapper.getFireRescueDepartmentStaff(one.getBizOrgName(),positionType);
//List<Map<String, Object>> mapList = dynamicFormInstanceMapper.getFireRescueDepartmentStaff(one.getBizOrgName(),positionType);
List
<
FirefightersDto
>
fireBrigade
=
firefightersService
.
queryById
(
groupCode
,
one
.
getBizOrgName
().
toString
());
List
<
FirefightersDto
>
fireBrigade
=
firefightersService
.
queryById
(
groupCode
,
one
.
getBizOrgName
().
toString
());
fireBrigade
.
stream
().
forEach
(
f
->
{
fireBrigade
.
stream
().
forEach
(
f
->
{
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"mobilePhone"
,
f
.
getMobilePhone
());
map
.
put
(
"mobilePhone"
,
f
.
getMobilePhone
());
map
.
put
(
"userId"
,
f
.
getSequenceNbr
());
map
.
put
(
"userId"
,
f
.
getSequenceNbr
());
map
.
put
(
"userName"
,
f
.
getName
());
map
.
put
(
"userName"
,
f
.
getName
());
map
.
put
(
"amosId"
,
f
.
getAmosUserId
());
map
.
put
(
"amosId"
,
f
.
getAmosUserId
());
sendUserIds
.
add
(
map
);
sendUserIds
.
add
(
map
);
});
});
// sendUserIds.addAll(mapList);
// sendUserIds.addAll(mapList);
}
}
//所在大队值班当日值班员;
//所在大队值班当日值班员;
...
@@ -1811,7 +1798,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -1811,7 +1798,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
alertSubmittedObjectSub
.
setUserPhone
(
map
.
get
(
"mobilePhone"
).
toString
());
alertSubmittedObjectSub
.
setUserPhone
(
map
.
get
(
"mobilePhone"
).
toString
());
}
}
alertSubmittedObjectListSub
.
add
(
alertSubmittedObjectSub
);
alertSubmittedObjectListSub
.
add
(
alertSubmittedObjectSub
);
// alertSubmittedObjectServiceImpl.saveBatch(alertSubmittedObjectListSub);
// alertSubmittedObjectServiceImpl.saveBatch(alertSubmittedObjectListSub);
// 调用短信发送接口
// 调用短信发送接口
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
>();
...
@@ -1877,22 +1864,22 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -1877,22 +1864,22 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
public
Set
<
Map
<
String
,
Object
>>
getwone
(
Set
<
Map
<
String
,
Object
>>
sendUserIds
){
public
Set
<
Map
<
String
,
Object
>>
getwone
(
Set
<
Map
<
String
,
Object
>>
sendUserIds
){
Map
<
String
,
Map
<
String
,
Object
>>
map
=
new
HashMap
<>();
Map
<
String
,
Map
<
String
,
Object
>>
map
=
new
HashMap
<>();
if
(
sendUserIds
!=
null
&&
sendUserIds
.
size
()>
0
){
if
(
sendUserIds
!=
null
&&
sendUserIds
.
size
()>
0
){
for
(
Map
<
String
,
Object
>
sendUserId
:
sendUserIds
)
{
for
(
Map
<
String
,
Object
>
sendUserId
:
sendUserIds
)
{
if
(
sendUserId
!=
null
&&
sendUserId
.
get
(
"amosId"
)!=
null
){
if
(
sendUserId
!=
null
&&
sendUserId
.
get
(
"amosId"
)!=
null
){
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
());
return
set
;
return
set
;
}
}
...
@@ -2017,7 +2004,7 @@ public Set<Map<String, Object>> getwone(Set<Map<String, Object>> sendUserIds){
...
@@ -2017,7 +2004,7 @@ public Set<Map<String, Object>> getwone(Set<Map<String, Object>> sendUserIds){
}
}
smsParams
.
put
(
"resourcesNum"
,
companyName
);
smsParams
.
put
(
"resourcesNum"
,
companyName
);
// 短信报送对象
// 短信报送对象
// alertSubmittedObjectServiceImpl.saveBatch(alertSubmittedObjectList);
// alertSubmittedObjectServiceImpl.saveBatch(alertSubmittedObjectList);
// 发送任务消息
// 发送任务消息
// 组织短信内容
// 组织短信内容
// 调用短信发送接口
// 调用短信发送接口
...
@@ -2159,7 +2146,7 @@ public Set<Map<String, Object>> getwone(Set<Map<String, Object>> sendUserIds){
...
@@ -2159,7 +2146,7 @@ public Set<Map<String, Object>> getwone(Set<Map<String, Object>> sendUserIds){
}
}
smsParams
.
put
(
"resourcesNum"
,
companyName
);
smsParams
.
put
(
"resourcesNum"
,
companyName
);
// 短信报送对象
// 短信报送对象
// alertSubmittedObjectServiceImpl.saveBatch(alertSubmittedObjectList);
// alertSubmittedObjectServiceImpl.saveBatch(alertSubmittedObjectList);
// 发送任务消息
// 发送任务消息
// 组织短信内容
// 组织短信内容
// 调用短信发送接口
// 调用短信发送接口
...
@@ -2262,5 +2249,4 @@ public Set<Map<String, Object>> getwone(Set<Map<String, Object>> sendUserIds){
...
@@ -2262,5 +2249,4 @@ public Set<Map<String, Object>> getwone(Set<Map<String, Object>> sendUserIds){
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
}
}
}
}
\ No newline at end of file
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