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
197716b4
Commit
197716b4
authored
Jul 29, 2024
by
李松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加大屏应急处置详情-基本信息接口
parent
f3834b4a
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
205 additions
and
2 deletions
+205
-2
AlertCalledController.java
...module/elevator/biz/controller/AlertCalledController.java
+13
-1
AlertCalledServiceImpl.java
...ule/elevator/biz/service/impl/AlertCalledServiceImpl.java
+108
-0
emergencyInformation.json
...333-biz/src/main/resources/json/emergencyInformation.json
+63
-0
DPSubController.java
...boot/module/statistcs/biz/controller/DPSubController.java
+3
-1
emergency.json
...ule-statistics-biz/src/main/resources/json/emergency.json
+18
-0
No files found.
amos-boot-system-tzs/amos-boot-module-96333/amos-boot-module-96333-biz/src/main/java/com/yeejoin/amos/boot/module/elevator/biz/controller/AlertCalledController.java
View file @
197716b4
package
com
.
yeejoin
.
amos
.
boot
.
module
.
elevator
.
biz
.
controller
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
...
...
@@ -785,6 +786,17 @@ public class AlertCalledController extends BaseController {
/**
* 应急大屏使用
*
* @param id 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/detail/{id}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据id获取详细信息"
,
notes
=
"根据id获取详细信息"
)
public
ResponseModel
<
Object
>
getDetail
(
@PathVariable
Long
id
)
{
return
ResponseHelper
.
buildResponse
(
iAlertCalledService
.
getDetail
(
id
));
}
}
amos-boot-system-tzs/amos-boot-module-96333/amos-boot-module-96333-biz/src/main/java/com/yeejoin/amos/boot/module/elevator/biz/service/impl/AlertCalledServiceImpl.java
View file @
197716b4
...
...
@@ -34,6 +34,7 @@ import com.yeejoin.amos.boot.module.elevator.api.service.IAlertCalledService;
import
com.yeejoin.amos.boot.module.elevator.api.service.TzsAuthService
;
import
com.yeejoin.amos.boot.module.elevator.biz.utils.BeanDtoVoUtils
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
org.apache.commons.io.IOUtils
;
import
org.apache.commons.lang.text.StrBuilder
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.logging.log4j.LogManager
;
...
...
@@ -44,12 +45,16 @@ import org.redisson.api.RedissonClient;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.core.io.Resource
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
java.io.IOException
;
import
java.nio.charset.StandardCharsets
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.time.LocalDateTime
;
...
...
@@ -58,6 +63,8 @@ import java.time.temporal.ChronoUnit;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
static
com
.
alibaba
.
fastjson
.
JSON
.
parseArray
;
/**
* 警情接警填报记录服务实现类
*
...
...
@@ -127,6 +134,12 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
private
RAtomicLong
rAtomicLong
;
@Autowired
ElevatorServiceImpl
elevatorServiceImpl
;
@Value
(
"classpath:/json/emergencyInformation.json"
)
private
Resource
emergencyInformation
;
public
AlertCalledServiceImpl
(
RedissonClient
client
){
this
.
redissonClient
=
client
;
rAtomicLong
=
redissonClient
.
getAtomicLong
(
"AUTO_INCR_LONG"
);
...
...
@@ -944,4 +957,98 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
}
return
alertCalledMapper
.
getCountNum
(
userName
,
startTime
,
endTime
,
groupCode
);
}
public
Object
getDetail
(
Long
id
)
{
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
// 基本信息
Map
<
String
,
Object
>
keyInfo
=
getKeyInfo
(
id
);
// map.put("keyinfo", keyInfo);
return
keyInfo
;
}
public
Map
<
String
,
Object
>
getKeyInfo
(
Long
id
)
{
HashMap
<
String
,
Object
>
keyinfoData
=
new
HashMap
<>();
// 基本信息
List
<
FormValue
>
jsonData
=
getJsonData
(
emergencyInformation
);
AlertCalledFormDto
alertCalledFormVo
=
getAlertCalledFormDto
(
id
);
Map
<
String
,
Object
>
objectMap
=
Bean
.
BeantoMap
(
alertCalledFormVo
.
getAlertCalledDto
());
List
<
FormValue
>
dynamicFormAlert
=
alertCalledFormVo
.
getDynamicFormAlert
();
jsonData
.
forEach
(
f
->
{
Object
o
=
objectMap
.
get
(
f
.
getKey
());
if
(!
ObjectUtils
.
isEmpty
(
o
))
{
f
.
setValue
(
o
.
toString
());
}
dynamicFormAlert
.
add
(
f
);
});
// 使用单位信息
// 获取根据警情获取电梯信息
Map
<
String
,
Object
>
map
=
elevatorServiceImpl
.
selectByAlertId
(
id
);
// 根据设备id 获取使用单位信息
Map
<
String
,
Object
>
useUnitMap
=
elevatorServiceImpl
.
selectUseUnitByAlertId
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
)));
if
(!
ObjectUtils
.
isEmpty
(
useUnitMap
))
{
jsonData
.
forEach
(
f
->
{
// 单位名称
if
(
"useUnitName"
.
equals
(
f
.
getKey
()))
{
f
.
setValue
(
ObjectUtils
.
isEmpty
(
useUnitMap
.
get
(
"useUnitName"
))
?
null
:
String
.
valueOf
(
useUnitMap
.
get
(
"useUnitName"
)));
}
// 单位电话
// if ("principalPhone".equals(f.getKey())){
//
// }
// 单位地址
if
(
"unitAddress"
.
equals
(
f
.
getKey
()))
{
f
.
setValue
(
ObjectUtils
.
isEmpty
(
useUnitMap
.
get
(
"address"
))
?
null
:
String
.
valueOf
(
useUnitMap
.
get
(
"address"
)));
}
// 安全管理员
if
(
"securityAdministrator"
.
equals
(
f
.
getKey
()))
{
f
.
setValue
(
ObjectUtils
.
isEmpty
(
useUnitMap
.
get
(
"manager"
))
?
null
:
String
.
valueOf
(
useUnitMap
.
get
(
"manager"
)));
}
// 安全管理员电话
if
(
"securityAdministratorPhone"
.
equals
(
f
.
getKey
()))
{
f
.
setValue
(
ObjectUtils
.
isEmpty
(
useUnitMap
.
get
(
"managerPhone"
))
?
null
:
String
.
valueOf
(
useUnitMap
.
get
(
"managerPhone"
)));
}
});
}
// 处置记录
LambdaQueryWrapper
<
RepairConsult
>
queryWrapper
=
new
LambdaQueryWrapper
<
RepairConsult
>();
queryWrapper
.
eq
(
RepairConsult:
:
getParentId
,
id
).
orderByDesc
(
RepairConsult:
:
getRecDate
);
List
<
RepairConsult
>
list
=
repairConsultServiceImpl
.
list
(
queryWrapper
);
HashMap
<
String
,
Object
>
datas
=
new
HashMap
<>();
ArrayList
<
Map
<
String
,
Object
>>
records
=
new
ArrayList
<>();
list
.
forEach
(
r
->
{
HashMap
<
String
,
Object
>
data
=
new
HashMap
<>();
data
.
put
(
"label"
,
r
.
getAlertStatus
());
data
.
put
(
"operatingTime"
,
r
.
getRecDate
());
data
.
put
(
"operater"
,
r
.
getDescription
());
records
.
add
(
data
);
});
// 监管码
HashMap
<
String
,
Object
>
qrcode
=
new
HashMap
<>();
if
(!
ObjectUtils
.
isEmpty
(
alertCalledFormVo
.
getAlertCalledDto
()))
{
qrcode
.
put
(
"value"
,
alertCalledFormVo
.
getAlertCalledDto
().
getRegistrationCode
());
}
// 96333码
HashMap
<
String
,
Object
>
qrcode2
=
new
HashMap
<>();
if
(!
ObjectUtils
.
isEmpty
(
alertCalledFormVo
.
getAlertCalledDto
()))
{
qrcode2
.
put
(
"value"
,
alertCalledFormVo
.
getAlertCalledDto
().
getDeviceId
());
}
datas
.
put
(
"datas"
,
records
);
keyinfoData
.
put
(
"keyParams"
,
dynamicFormAlert
);
keyinfoData
.
put
(
"infoRecords"
,
datas
);
keyinfoData
.
put
(
"qrcode"
,
qrcode
);
keyinfoData
.
put
(
"qrcode2"
,
qrcode2
);
return
keyinfoData
;
}
private
List
<
FormValue
>
getJsonData
(
Resource
resource
)
{
String
json
;
try
{
json
=
IOUtils
.
toString
(
resource
.
getInputStream
(),
String
.
valueOf
(
StandardCharsets
.
UTF_8
));
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
e
);
}
return
parseArray
(
json
,
FormValue
.
class
);
}
}
\ No newline at end of file
amos-boot-system-tzs/amos-boot-module-96333/amos-boot-module-96333-biz/src/main/resources/json/emergencyInformation.json
0 → 100644
View file @
197716b4
[
{
"key"
:
"emergencyPerson"
,
"label"
:
"救援人姓名"
,
"type"
:
"text"
},
{
"key"
:
"callTime"
,
"label"
:
"接警时间"
,
"type"
:
"text"
},
{
"key"
:
"contactPhone"
,
"label"
:
"联系人电话"
,
"type"
:
"text"
},
{
"key"
:
"useSiteCategory"
,
"label"
:
"使用场所分类"
,
"type"
:
"text"
},
{
"key"
:
"deviceId"
,
"label"
:
"电梯识别码"
,
"type"
:
"text"
},
{
"key"
:
"useStatus"
,
"label"
:
"使用情况"
,
"type"
:
"text"
},
{
"key"
:
"address"
,
"label"
:
"地址"
,
"type"
:
"text"
},
{
"key"
:
"useUnitName"
,
"label"
:
"单位名称"
,
"type"
:
"text"
},
{
"key"
:
"principalPhone"
,
"label"
:
"单位电话"
,
"type"
:
"text"
},
{
"key"
:
"unitAddress"
,
"label"
:
"单位地址"
,
"type"
:
"text"
},
{
"key"
:
"securityAdministrator"
,
"label"
:
"电梯安全管理员"
,
"type"
:
"text"
},
{
"key"
:
"securityAdministratorPhone"
,
"label"
:
"电梯安全管理员电话"
,
"type"
:
"text"
}
]
\ No newline at end of file
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/controller/DPSubController.java
View file @
197716b4
...
...
@@ -38,7 +38,9 @@ public class DPSubController {
public
ResponseModel
<
JSONObject
>
commonQuery
(
@PathVariable
String
template
,
@RequestBody
Map
<
String
,
Object
>
param
)
{
if
(
template
.
equals
(
"company"
))
{
Assert
.
notNull
(
param
.
get
(
"useUnitCode"
),
"企业统一信用代码不能为空"
);
}
else
if
(
template
.
equals
(
"equip"
))
{
}
else
if
(
template
.
equals
(
"emergency"
)){
Assert
.
notNull
(
param
.
get
(
"id"
),
"id不能为空"
);
}
else
if
(
template
.
equals
(
"equip"
))
{
param
.
put
(
"record"
,
param
.
get
(
"SEQUENCE_NBR"
));
param
.
put
(
"equList"
,
param
.
get
(
"EQU_LIST_CODE"
));
Assert
.
notNull
(
param
.
get
(
"record"
),
"设备ID不能为空"
);
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/resources/json/emergency.json
0 → 100644
View file @
197716b4
{
"tabs"
:
[
{
"key"
:
"keyinfo"
,
"displayName"
:
"基本信息"
,
"renderType"
:
"keyinfo"
,
"dataConfig"
:
{
"api"
:
{
"httpMethod"
:
"GET"
,
"apiPath"
:
"/elevator/alert-called/detail/{id}"
}
}
}
],
"content"
:
{
}
}
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