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
c72f1a09
Commit
c72f1a09
authored
Aug 18, 2021
by
李腾威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
日常管理-警情统计优化
parent
610dcaa1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
29 deletions
+2
-29
AlertCalledController.java
...boot/module/tzs/biz/controller/AlertCalledController.java
+2
-29
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/AlertCalledController.java
View file @
c72f1a09
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
controller
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
...
...
@@ -20,9 +19,6 @@ import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledQueryDto;
import
com.yeejoin.amos.boot.module.tzs.api.dto.ESAlertCalledDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.ESAlertCalledRequestDto
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.AlertCalled
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.AlertFormValue
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.DispatchPaper
;
import
com.yeejoin.amos.boot.module.tzs.api.enums.DispatchPaperEnums
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.AlertCalledServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.AlertFormValueServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.DispatchPaperServiceImpl
;
...
...
@@ -32,7 +28,6 @@ import com.yeejoin.amos.boot.module.tzs.biz.utils.BeanDtoVoUtils;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
...
@@ -54,7 +49,6 @@ import java.lang.reflect.Field;
import
java.text.ParseException
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -264,7 +258,7 @@ public class AlertCalledController extends BaseController {
page
=
iAlertCalledService
.
page
(
pageBean
,
alertCalledQueryWrapper
);
IPage
<
AlertCalledDto
>
calledVoIPage
=
AlertBeanDtoVoUtils
.
alertCalledIPageDto
(
page
);
calledVoIPage
.
getRecords
().
stream
().
forEach
(
e
->{
getResponseLevel
(
e
.
getSequenceNbr
(),
e
,
null
);
e
.
setAlertAddress
(
e
.
getAddress
()
);
});
return
ResponseHelper
.
buildResponse
(
calledVoIPage
);
}
...
...
@@ -324,28 +318,7 @@ public class AlertCalledController extends BaseController {
return
queryWrapper
;
}
void
getResponseLevel
(
Long
alertId
,
AlertCalledDto
alertCalledDto
,
ESAlertCalledDto
esAlertCalledDto
)
{
LambdaQueryWrapper
<
DispatchPaper
>
dispatchPaperQueryWrapper
=
new
LambdaQueryWrapper
<>();
dispatchPaperQueryWrapper
.
eq
(
DispatchPaper:
:
getAlertId
,
alertId
);
DispatchPaper
dispatchPaper
=
dispatchPaperServiceImpl
.
getOne
(
dispatchPaperQueryWrapper
);
if
(
null
!=
dispatchPaper
)
{
LambdaQueryWrapper
<
AlertFormValue
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
AlertFormValue:
:
getAlertCalledId
,
dispatchPaper
.
getSequenceNbr
()).
eq
(
AlertFormValue:
:
getAlertTypeCode
,
DispatchPaperEnums
.
getEnumById
(
dispatchPaper
.
getAlertCode
()).
getDynamicCode
());
// 派遣单动态表单数据
List
<
AlertFormValue
>
list
=
iAlertFormValueService
.
list
(
queryWrapper
);
// map 存取数据
Map
<
String
,
String
>
dynamicParms
=
new
HashMap
<
String
,
String
>();
list
.
stream
().
forEach
(
paperFormValue
->
{
dynamicParms
.
put
(
paperFormValue
.
getFieldCode
(),
paperFormValue
.
getFieldValue
());
});
String
responseLevel
=
dynamicParms
.
get
(
"response_level"
);
if
(
null
!=
alertCalledDto
)
{
alertCalledDto
.
setResponseLevel
(
responseLevel
);
}
else
{
esAlertCalledDto
.
setResponseLevel
(
responseLevel
);
}
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
...
...
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