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
209b0386
Commit
209b0386
authored
Jul 22, 2021
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
灾情详情接口编写
parent
08a25f4b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
68 additions
and
16 deletions
+68
-16
KeyValueLabel.java
...m/yeejoin/amos/boot/module/jcs/api/dto/KeyValueLabel.java
+22
-0
IAlertCalledService.java
...amos/boot/module/jcs/api/service/IAlertCalledService.java
+5
-0
AlertCalledMapper.xml
...e-jcs-api/src/main/resources/mapper/AlertCalledMapper.xml
+8
-0
CommandController.java
...boot/module/command/biz/controller/CommandController.java
+1
-12
AlertCalledServiceImpl.java
...t/module/jcs/biz/service/impl/AlertCalledServiceImpl.java
+32
-4
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/KeyValueLabel.java
0 → 100644
View file @
209b0386
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
dto
;
import
lombok.Data
;
@Data
public
class
KeyValueLabel
{
private
String
key
;
private
String
label
;
private
Object
value
;
public
KeyValueLabel
(
String
label
,
String
key
,
Object
value
)
{
super
();
this
.
label
=
label
;
this
.
key
=
key
;
this
.
value
=
value
;
}
public
KeyValueLabel
()
{
super
();
}
}
\ No newline at end of file
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 @
209b0386
...
...
@@ -2,10 +2,12 @@ package com.yeejoin.amos.boot.module.jcs.api.service;
import
com.yeejoin.amos.boot.module.common.api.dto.RequestData
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledZhDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.KeyValueLabel
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
java.util.List
;
import
java.util.Map
;
/**
* 警情接警记录 服务类
...
...
@@ -34,4 +36,7 @@ public interface IAlertCalledService {
*
* **/
Object
selectAlertCalledById
(
Long
id
);
Map
<
String
,
Object
>
selectAlertCalledKeyValueLabelById
(
Long
id
);
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/resources/mapper/AlertCalledMapper.xml
View file @
209b0386
...
...
@@ -54,4 +54,12 @@
</select>
</mapper>
amos-boot-module/amos-boot-module-biz/amos-boot-module-command-biz/src/main/java/com/yeejoin/amos/boot/module/command/biz/controller/CommandController.java
View file @
209b0386
package
com
.
yeejoin
.
amos
.
boot
.
module
.
command
.
biz
.
controller
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
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.MenuFrom
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.TreeParser
;
import
com.yeejoin.amos.boot.module.command.api.dao.SeismometeorologyDtoDao
;
import
com.yeejoin.amos.boot.module.command.api.dto.SeismometeorologyDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.*
;
import
com.yeejoin.amos.boot.module.common.api.entity.DataDictionary
;
import
com.yeejoin.amos.boot.module.common.api.entity.FireTeam
;
import
com.yeejoin.amos.boot.module.common.api.service.*
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledZhDto
;
...
...
@@ -20,14 +13,10 @@ import com.yeejoin.amos.boot.module.jcs.api.dto.InstructionsZHDto;
import
com.yeejoin.amos.boot.module.jcs.api.enums.AlertStageEnums
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IAlertCalledService
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IAlertSubmittedService
;
import
com.yeejoin.amos.component.rule.config.RuleConfig
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.eclipse.paho.client.mqttv3.MqttException
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.DateUtil
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
...
...
@@ -286,7 +275,7 @@ public class CommandController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据id查询灾情详情"
,
notes
=
"根据id查询灾情详情"
)
public
ResponseModel
<
Object
>
selectById
(
@PathVariable
Long
id
)
{
return
ResponseHelper
.
buildResponse
(
iAlertCalledService
.
selectAlertCalledById
(
id
));
return
ResponseHelper
.
buildResponse
(
iAlertCalledService
.
selectAlertCalled
KeyValueLabel
ById
(
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 @
209b0386
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
...
...
@@ -15,6 +16,7 @@ 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.AlertCalledZhDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.KeyValueLabel
;
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.Template
;
...
...
@@ -37,10 +39,7 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
...
...
@@ -340,4 +339,33 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
}
return
StringUtils
.
replaceEach
(
tempContent
,
keys
,
strList
.
toArray
(
new
String
[
strList
.
size
()]));
}
@Override
public
Map
<
String
,
Object
>
selectAlertCalledKeyValueLabelById
(
Long
id
)
{
// 警情基本信息
AlertCalled
alertCalled
=
this
.
getById
(
id
);
QueryWrapper
<
AlertFormValue
>
queryWrapper
=
new
QueryWrapper
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
();
map
.
put
(
"title"
,
"【"
+
alertCalled
.
getAlertType
()+
"】"
+
alertCalled
.
getAddress
());
queryWrapper
.
eq
(
"alert_called_id"
,
id
);
// 警情动态表单数据
List
<
KeyValueLabel
>
listdate
=
new
ArrayList
<>();
List
<
AlertFormValue
>
list
=
iAlertFormValueService
.
list
(
queryWrapper
);
listdate
.
add
(
new
KeyValueLabel
(
"接警时间"
,
"callTime"
,
alertCalled
.
getCallTime
()));
listdate
.
add
(
new
KeyValueLabel
(
"警情地点"
,
"address"
,
alertCalled
.
getAddress
()));
listdate
.
add
(
new
KeyValueLabel
(
"警情类型"
,
"alertType"
,
alertCalled
.
getAlertType
()));
listdate
.
add
(
new
KeyValueLabel
(
"警情阶段"
,
"alertStage"
,
alertCalled
.
getAlertStage
()));
listdate
.
add
(
new
KeyValueLabel
(
"警情等级"
,
"responseLevel"
,
"无"
));
listdate
.
add
(
new
KeyValueLabel
(
"被困人数"
,
"trappedNum"
,
alertCalled
.
getTrappedNum
()));
listdate
.
add
(
new
KeyValueLabel
(
"伤亡人数"
,
"casualtiesNum"
,
alertCalled
.
getCasualtiesNum
()));
listdate
.
add
(
new
KeyValueLabel
(
"联系人"
,
"contactUser"
,
alertCalled
.
getContactUser
()));
listdate
.
add
(
new
KeyValueLabel
(
"联系电话"
,
"contactPhone"
,
alertCalled
.
getContactPhone
()));
listdate
.
add
(
new
KeyValueLabel
(
"联系人电话"
,
"contactPhone"
,
alertCalled
.
getContactPhone
()));
list
.
stream
().
forEach
(
AlertFormValue
->{
listdate
.
add
(
new
KeyValueLabel
(
AlertFormValue
.
getFieldName
(),
AlertFormValue
.
getFieldCode
(),
AlertFormValue
.
getFieldValue
()));
});
map
.
put
(
"data"
,
listdate
);
return
map
;
}
}
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