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
40c00e9b
Commit
40c00e9b
authored
Nov 05, 2021
by
李腾威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
任务 4263 4264
parent
59c376ad
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
61 additions
and
5 deletions
+61
-5
AlertSubmittedZHDto.java
...oin/amos/boot/module/jcs/api/dto/AlertSubmittedZHDto.java
+4
-1
InstructionsZHDto.java
...ejoin/amos/boot/module/jcs/api/dto/InstructionsZHDto.java
+5
-1
IAlertCalledService.java
...amos/boot/module/jcs/api/service/IAlertCalledService.java
+2
-0
AlertCalledServiceImpl.java
...t/module/jcs/biz/service/impl/AlertCalledServiceImpl.java
+27
-0
AlertSubmittedServiceImpl.java
...odule/jcs/biz/service/impl/AlertSubmittedServiceImpl.java
+23
-3
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/dto/AlertSubmittedZHDto.java
View file @
40c00e9b
...
...
@@ -23,7 +23,7 @@ public class AlertSubmittedZHDto {
@ApiModelProperty
(
value
=
"主键ID"
)
protected
Long
sequenceNbr
;
@ApiModelProperty
(
value
=
"业务类型(警情续报、非警情确认、警情结案)"
)
@ApiModelProperty
(
value
=
"业务类型(警情续报、非警情确认、警情结案
,警情归并
)"
)
private
String
businessType
;
@ApiModelProperty
(
value
=
"报送时间"
)
...
...
@@ -38,4 +38,7 @@ public class AlertSubmittedZHDto {
@ApiModelProperty
(
value
=
"人员名称"
)
private
String
userName
;
@ApiModelProperty
(
value
=
"警情信息"
)
private
AlertCalledFormDto
alertCalledFormDto
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/dto/InstructionsZHDto.java
View file @
40c00e9b
...
...
@@ -31,13 +31,17 @@ public class InstructionsZHDto {
@ApiModelProperty
(
value
=
"发送单位"
)
private
String
company
=
"119值班中心"
;
@ApiModelProperty
(
value
=
"警情信息"
)
private
AlertCalledFormDto
alertCalledFormDto
;
public
InstructionsZHDto
(
Long
sequenceNbr
,
String
type
,
Date
submissionTime
,
String
content
)
{
public
InstructionsZHDto
(
Long
sequenceNbr
,
String
type
,
Date
submissionTime
,
String
content
,
AlertCalledFormDto
alertCalledFormDto
)
{
this
.
sequenceNbr
=
sequenceNbr
;
this
.
type
=
type
;
this
.
submissionTime
=
submissionTime
;
this
.
content
=
content
;
this
.
alertCalledFormDto
=
alertCalledFormDto
;
}
public
InstructionsZHDto
()
{
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/service/IAlertCalledService.java
View file @
40c00e9b
...
...
@@ -41,6 +41,8 @@ public interface IAlertCalledService {
* **/
Object
selectAlertCalledById
(
Long
id
);
Object
selectAlertCalledByIdNoRedis
(
Long
id
);
Map
<
String
,
Object
>
selectAlertCalledKeyValueLabelById
(
Long
id
);
...
...
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 @
40c00e9b
...
...
@@ -117,6 +117,8 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
private
String
topic
;
@Value
(
"${redis.cache.failure.time}"
)
private
long
time
;
@Value
(
"${mqtt.topic.command.power.deployment}"
)
private
String
topic1
;
@Autowired
private
OrgUsrServiceImpl
iOrgUsrService
;
...
...
@@ -247,6 +249,29 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
}
/**
* 根据灾情id 查询灾情详情
**/
@Override
public
Object
selectAlertCalledByIdNoRedis
(
Long
id
)
{
// 警情基本信息
AlertCalled
alertCalled
=
this
.
getById
(
id
);
QueryWrapper
<
AlertFormValue
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"alert_called_id"
,
id
);
// 警情动态表单数据
List
<
AlertFormValue
>
list
=
iAlertFormValueService
.
list
(
queryWrapper
);
List
<
FormValue
>
formValue
=
new
ArrayList
<
FormValue
>();
if
(
list
!=
null
&&
list
.
size
()
>
0
)
{
for
(
AlertFormValue
alertFormValue
:
list
)
{
FormValue
value
=
new
FormValue
(
alertFormValue
.
getFieldCode
(),
alertFormValue
.
getFieldName
(),
"text"
,
alertFormValue
.
getFieldValue
(),
alertFormValue
.
getBlock
());
formValue
.
add
(
value
);
}
}
AlertCalledFormDto
alertCalledFormVo
=
new
AlertCalledFormDto
(
alertCalled
,
formValue
);
return
alertCalledFormVo
;
}
/**
* <pre>
* 保存警情信息
* </pre>
...
...
@@ -304,6 +329,8 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
});
// 保存动态表单数据
iAlertFormValueService
.
saveBatch
(
alertFormValuelist
);
emqKeeper
.
getMqttClient
().
publish
(
topic1
,
"1"
.
getBytes
(),
RuleConfig
.
DEFAULT_QOS
,
true
);
}
else
{
// 警情报送
// ****************************************************待确认开发
...
...
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 @
40c00e9b
...
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jcs.biz.service.impl;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONException
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.google.common.collect.Lists
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
...
...
@@ -14,6 +15,7 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import
com.yeejoin.amos.boot.module.common.api.dto.FormValue
;
import
com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl
;
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.AlertCalledRo
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertSubmittedDto
;
...
...
@@ -43,7 +45,9 @@ 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.biz.rule.action.AlertCalledAction
;
import
com.yeejoin.amos.component.rule.config.RuleConfig
;
import
io.swagger.annotations.ApiModelProperty
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.checkerframework.checker.units.qual.A
;
import
org.eclipse.paho.client.mqttv3.MqttException
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -490,7 +494,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
}
else
{
content
=
"调派"
+
PowerTransferCompanyZHDto
.
getCompanyName
()
+
PowerTransferCompanyZHDto
.
getSubmissionContent
()
+
"前往"
+
PowerTransferCompanyZHDto
.
getAddress
();
}
InstructionsZHDto
instruct
=
new
InstructionsZHDto
(
PowerTransferCompanyZHDto
.
getSequenceNbr
(),
PowerTransferCompanyZHDto
.
getDispatchType
(),
PowerTransferCompanyZHDto
.
getRecDate
(),
content
);
InstructionsZHDto
instruct
=
new
InstructionsZHDto
(
PowerTransferCompanyZHDto
.
getSequenceNbr
(),
PowerTransferCompanyZHDto
.
getDispatchType
(),
PowerTransferCompanyZHDto
.
getRecDate
(),
content
,
null
);
listInstructionsZHDto
.
add
(
instruct
);
});
...
...
@@ -527,12 +531,28 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
break
;
}
InstructionsZHDto
instruct
=
new
InstructionsZHDto
(
AlertSubmittedZHDto
.
getSequenceNbr
(),
AlertSubmittedZHDto
.
getBusinessType
(),
AlertSubmittedZHDto
.
getSubmissionTime
(),
content
);
InstructionsZHDto
instruct
=
new
InstructionsZHDto
(
AlertSubmittedZHDto
.
getSequenceNbr
(),
AlertSubmittedZHDto
.
getBusinessType
(),
AlertSubmittedZHDto
.
getSubmissionTime
(),
content
,
null
);
listInstructionsZHDto
.
add
(
instruct
);
});
// 获取归并得警情信息
LambdaQueryWrapper
<
AlertCalled
>
queryWrapper
=
new
LambdaQueryWrapper
();
queryWrapper
.
eq
(
AlertCalled:
:
getFatherAlert
,
id
);
List
<
AlertCalled
>
alertCalleds
=
alertCalledService
.
getBaseMapper
().
selectList
(
queryWrapper
);
alertCalleds
.
stream
().
forEach
(
e
->{
AlertSubmittedZHDto
alertSubmittedZHDto
=
new
AlertSubmittedZHDto
();
AlertCalledFormDto
alertCalledFormDto
=
(
AlertCalledFormDto
)
alertCalledService
.
selectAlertCalledByIdNoRedis
(
e
.
getSequenceNbr
());
alertSubmittedZHDto
.
setAlertCalledFormDto
(
alertCalledFormDto
);
alertSubmittedZHDto
.
setSequenceNbr
(
e
.
getSequenceNbr
());
alertSubmittedZHDto
.
setBusinessType
(
"警情归并"
);
alertSubmittedZHDto
.
setSubmissionTime
(
alertCalledFormDto
.
getAlertCalled
().
getCallTime
());
alertSubmittedZHDto
.
setCompanyName
(
alertCalledFormDto
.
getAlertCalled
().
getCompanyName
());
alertSubmittedZHDto
.
setUserName
(
alertCalledFormDto
.
getAlertCalled
().
getRecUserName
());
InstructionsZHDto
instruct
=
new
InstructionsZHDto
(
alertSubmittedZHDto
.
getSequenceNbr
(),
alertSubmittedZHDto
.
getBusinessType
(),
alertSubmittedZHDto
.
getSubmissionTime
(),
null
,
alertSubmittedZHDto
.
getAlertCalledFormDto
());
listInstructionsZHDto
.
add
(
instruct
);
});
//排序时间倒序
/* Bug 2613 修改排序 按照发送时间排序 2021-09-01 陈召 开始*/
Collections
.
sort
(
listInstructionsZHDto
,
new
Comparator
<
InstructionsZHDto
>()
{
...
...
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