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
d5862f93
Commit
d5862f93
authored
Aug 13, 2021
by
李腾威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
日常管理-警情填报
parent
2625be26
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
11 deletions
+7
-11
AlertCalledController.java
...boot/module/tzs/biz/controller/AlertCalledController.java
+7
-11
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 @
d5862f93
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
controller
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
...
...
@@ -10,11 +9,10 @@ import com.google.common.collect.Maps;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.ExcelUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.NameUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.common.api.dto.OrgPersonExcelDto
;
import
com.yeejoin.amos.boot.module.common.api.excel.ExcelUtil
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlarmStatisticsDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCallInfoDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledObjsDto
;
...
...
@@ -24,7 +22,7 @@ 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.
dto.AlarmStatisticsDto
;
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
;
...
...
@@ -35,14 +33,12 @@ import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.poi.openxml4j.opc.internal.FileHelper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
...
...
@@ -124,7 +120,7 @@ public class AlertCalledController extends BaseController {
Page
<
ESAlertCalledDto
>
esAlertCalledDtoPage
=
eSAlertCalledService
.
queryByKeys
(
alertCalledVo
,
current
,
size
);
esAlertCalledDtoPage
.
getRecords
().
stream
().
forEach
(
e
->{
getResponseLevel
(
alertCalledVo
.
getSequenceNbr
(),
null
,
e
);
getResponseLevel
(
e
.
getSequenceNbr
(),
null
,
e
);
});
return
ResponseHelper
.
buildResponse
(
esAlertCalledDtoPage
);
}
...
...
@@ -268,7 +264,7 @@ public class AlertCalledController extends BaseController {
IPage
<
AlertCalledDto
>
calledVoIPage
=
AlertBeanDtoVoUtils
.
alertCalledIPageDto
(
page
);
calledVoIPage
.
getRecords
().
stream
().
forEach
(
e
->
e
.
setAlertAddress
(
e
.
getCity
()+
e
.
getDistrict
()));
calledVoIPage
.
getRecords
().
stream
().
forEach
(
e
->{
getResponseLevel
(
alertCalled
.
getSequenceNbr
(),
e
,
null
);
getResponseLevel
(
e
.
getSequenceNbr
(),
e
,
null
);
});
return
ResponseHelper
.
buildResponse
(
calledVoIPage
);
}
...
...
@@ -334,13 +330,13 @@ public class AlertCalledController extends BaseController {
DispatchPaper
dispatchPaper
=
dispatchPaperServiceImpl
.
getOne
(
dispatchPaperQueryWrapper
);
if
(
null
!=
dispatchPaper
)
{
QueryWrapper
<
AlertFormValue
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"alert_called_id"
,
dispatchPaper
.
getSe
ndUserId
()).
eq
(
"alert_type_code"
,
dispatchPaper
.
getAlertTyp
e
());
queryWrapper
.
eq
(
"alert_called_id"
,
dispatchPaper
.
getSe
quenceNbr
()).
eq
(
"alert_type_code"
,
DispatchPaperEnums
.
getEnumById
(
dispatchPaper
.
getAlertCode
()).
getDynamicCod
e
());
// 派遣单动态表单数据
List
<
AlertFormValue
>
list
=
iAlertFormValueService
.
list
(
queryWrapper
);
// map 存取数据
Map
<
String
,
String
>
dynamicParms
=
new
HashMap
<
String
,
String
>();
list
.
stream
().
forEach
(
paperFormValue
->
{
dynamicParms
.
put
(
"field_code"
,
"field_value"
);
dynamicParms
.
put
(
paperFormValue
.
getFieldCode
(),
paperFormValue
.
getFieldValue
()
);
});
String
responseLevel
=
dynamicParms
.
get
(
"response_level"
);
if
(
null
!=
alertCalledDto
)
{
...
...
@@ -369,7 +365,7 @@ public class AlertCalledController extends BaseController {
@PostMapping
(
"/exportSelectRecord"
)
public
void
exportAlertCalled
(
@RequestBody
AlertCalledQueryDto
alertCalledQueryDto
,
HttpServletResponse
response
)
{
List
<
AlertCalledQueryDto
>
list
=
iAlertCalledService
.
queryAlertListByQueryDto
(
alertCalledQueryDto
);
String
fileName
=
"警情事件记录"
+
new
Date
().
getTime
();
String
fileName
=
"警情事件记录"
+
System
.
currentTimeMillis
();
ExcelUtil
.
createTemplate
(
response
,
fileName
,
"警情事件记录"
,
list
,
AlertCalledQueryDto
.
class
,
null
,
false
);
}
...
...
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