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
722bf94a
Commit
722bf94a
authored
Nov 04, 2021
by
chenhao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://172.16.10.76/moa/amos-boot-biz
into developer
parents
df699c7d
6efedc40
Hide whitespace changes
Inline
Side-by-side
Showing
70 changed files
with
1987 additions
and
177 deletions
+1987
-177
IWorkflowExcuteService.java
.../amos/boot/biz/common/service/IWorkflowExcuteService.java
+9
-2
WorkflowExcuteServiceImpl.java
...ot/biz/common/service/impl/WorkflowExcuteServiceImpl.java
+25
-5
DateUtils.java
...ava/com/yeejoin/amos/boot/biz/common/utils/DateUtils.java
+21
-1
EquipmentIndexDto.java
...in/amos/boot/module/common/api/dto/EquipmentIndexDto.java
+70
-0
LinkageUnitVo.java
...eejoin/amos/boot/module/common/api/dto/LinkageUnitVo.java
+117
-0
PerfQuotaIotDTO.java
...join/amos/boot/module/common/api/dto/PerfQuotaIotDTO.java
+26
-0
WaterResourceDto.java
...oin/amos/boot/module/common/api/dto/WaterResourceDto.java
+10
-8
WaterResourceDyDto.java
...n/amos/boot/module/common/api/dto/WaterResourceDyDto.java
+36
-0
WaterResourceIndexDto.java
...mos/boot/module/common/api/dto/WaterResourceIndexDto.java
+40
-0
WaterResourceIndex.java
...mos/boot/module/common/api/entity/WaterResourceIndex.java
+55
-0
EquipFeignClient.java
...n/amos/boot/module/common/api/feign/EquipFeignClient.java
+13
-1
WaterResourceIndexMapper.java
...ot/module/common/api/mapper/WaterResourceIndexMapper.java
+14
-0
IOrgUsrService.java
...n/amos/boot/module/common/api/service/IOrgUsrService.java
+1
-1
IWaterResourceIndexService.java
...module/common/api/service/IWaterResourceIndexService.java
+12
-0
WaterResourceIndexMapper.xml
...pi/src/main/resources/mapper/WaterResourceIndexMapper.xml
+5
-0
IWaterResourceIndexService.java
...ot/module/jcs/api/service/IWaterResourceIndexService.java
+12
-0
ExecuteTypeEnum.java
...ejoin/amos/latentdanger/common/enums/ExecuteTypeEnum.java
+9
-0
PointClassify.java
...ava/com/yeejoin/amos/patrol/dao/entity/PointClassify.java
+128
-0
AlertPaperInfoDto.java
...ejoin/amos/boot/module/tzs/api/dto/AlertPaperInfoDto.java
+3
-0
RepairConsultDto.java
...eejoin/amos/boot/module/tzs/api/dto/RepairConsultDto.java
+4
-0
VoiceRecordFileDto.java
...join/amos/boot/module/tzs/api/dto/VoiceRecordFileDto.java
+9
-0
ESAlertCalled.java
...eejoin/amos/boot/module/tzs/api/entity/ESAlertCalled.java
+8
-0
RepairConsult.java
...eejoin/amos/boot/module/tzs/api/entity/RepairConsult.java
+6
-0
VoiceRecordFile.java
...join/amos/boot/module/tzs/api/entity/VoiceRecordFile.java
+7
-0
AlertCalledMapper.java
...in/amos/boot/module/tzs/api/mapper/AlertCalledMapper.java
+2
-0
VoiceRecordFileMapper.java
...mos/boot/module/tzs/api/mapper/VoiceRecordFileMapper.java
+13
-0
IVoiceRecordFileService.java
.../boot/module/tzs/api/service/IVoiceRecordFileService.java
+2
-0
TzsAuthService.java
...join/amos/boot/module/tzs/api/service/TzsAuthService.java
+12
-0
AlertCalledMapper.xml
...e-tzs-api/src/main/resources/mapper/AlertCalledMapper.xml
+35
-0
VoiceRecordFileMapper.xml
...s-api/src/main/resources/mapper/VoiceRecordFileMapper.xml
+42
-0
CommandController.java
...boot/module/command/biz/controller/CommandController.java
+4
-4
OrgUsrController.java
...s/boot/module/common/biz/controller/OrgUsrController.java
+1
-1
WaterResourceController.java
...module/common/biz/controller/WaterResourceController.java
+90
-19
WaterResourceIndexController.java
...e/common/biz/controller/WaterResourceIndexController.java
+116
-0
OrgUsrServiceImpl.java
...oot/module/common/biz/service/impl/OrgUsrServiceImpl.java
+3
-1
WaterResourceIndexServiceImpl.java
...ommon/biz/service/impl/WaterResourceIndexServiceImpl.java
+34
-0
WaterResourceServiceImpl.java
...ule/common/biz/service/impl/WaterResourceServiceImpl.java
+23
-14
AlertCalledController.java
...boot/module/jcs/biz/controller/AlertCalledController.java
+2
-0
AlertCalledServiceImpl.java
...t/module/jcs/biz/service/impl/AlertCalledServiceImpl.java
+5
-4
ESAlertCalledService.java
...oot/module/jcs/biz/service/impl/ESAlertCalledService.java
+1
-0
ExcelServiceImpl.java
...os/boot/module/jcs/biz/service/impl/ExcelServiceImpl.java
+16
-29
DangerExecuteSubmitDto.java
...mos/latentdanger/business/dto/DangerExecuteSubmitDto.java
+5
-0
LatentDangerServiceImpl.java
...danger/business/service/impl/LatentDangerServiceImpl.java
+4
-1
AsyncTask.java
...a/com/yeejoin/amos/latentdanger/core/async/AsyncTask.java
+84
-5
InputItemMapper.java
...join/amos/patrol/business/dao/mapper/InputItemMapper.java
+1
-1
IPointClassifyDao.java
...mos/patrol/business/dao/repository/IPointClassifyDao.java
+19
-1
PointClassifySynDto.java
...yeejoin/amos/patrol/business/dto/PointClassifySynDto.java
+47
-0
CheckServiceImpl.java
...n/amos/patrol/business/service/impl/CheckServiceImpl.java
+26
-26
PlanTaskServiceImpl.java
...mos/patrol/business/service/impl/PlanTaskServiceImpl.java
+3
-2
PointServiceImpl.java
...n/amos/patrol/business/service/impl/PointServiceImpl.java
+66
-2
IPointService.java
...oin/amos/patrol/business/service/intfc/IPointService.java
+3
-0
PointInputItemNewVo.java
.../yeejoin/amos/patrol/business/vo/PointInputItemNewVo.java
+77
-0
PatrolMqttListener.java
...java/com/yeejoin/amos/patrol/mqtt/PatrolMqttListener.java
+41
-0
CheckServiceImpl.java
...s/supervision/business/service/impl/CheckServiceImpl.java
+16
-1
AsyncTask.java
...va/com/yeejoin/amos/supervision/core/async/AsyncTask.java
+5
-5
AlertCalledController.java
...boot/module/tzs/biz/controller/AlertCalledController.java
+40
-2
TzsAuthController.java
...mos/boot/module/tzs/biz/controller/TzsAuthController.java
+64
-0
VoiceRecordFileController.java
.../module/tzs/biz/controller/VoiceRecordFileController.java
+45
-11
AlertCalledServiceImpl.java
...t/module/tzs/biz/service/impl/AlertCalledServiceImpl.java
+13
-0
CtiServiceImpl.java
...amos/boot/module/tzs/biz/service/impl/CtiServiceImpl.java
+4
-1
RepairConsultServiceImpl.java
...module/tzs/biz/service/impl/RepairConsultServiceImpl.java
+56
-4
TzsAuthServiceImpl.java
.../boot/module/tzs/biz/service/impl/TzsAuthServiceImpl.java
+77
-0
VoiceRecordFileServiceImpl.java
...dule/tzs/biz/service/impl/VoiceRecordFileServiceImpl.java
+18
-0
jcs-1.0.0.0.xml
...ystem-jcs/src/main/resources/db/changelog/jcs-1.0.0.0.xml
+23
-0
PatrolApplication.java
...rol/src/main/java/com/yeejoin/amos/PatrolApplication.java
+29
-0
application.properties
...t-system-patrol/src/main/resources/application.properties
+3
-1
patrol-3.0.1.xml
...m-patrol/src/main/resources/db/changelog/patrol-3.0.1.xml
+118
-0
dbTemplate_check.xml
...-patrol/src/main/resources/db/mapper/dbTemplate_check.xml
+9
-0
dbTemplate_input_item.xml
...ol/src/main/resources/db/mapper/dbTemplate_input_item.xml
+3
-2
pointMapper.xml
...ystem-patrol/src/main/resources/db/mapper/pointMapper.xml
+47
-22
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/service/IWorkflowExcuteService.java
View file @
722bf94a
package
com
.
yeejoin
.
amos
.
boot
.
biz
.
common
.
service
;
import
java.util.List
;
import
java.util.Map
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
...
...
@@ -59,6 +60,12 @@ public interface IWorkflowExcuteService{
* @throws Exception
*/
public
Object
getCurrentUserAllTaskList
(
String
key
,
ReginParams
userInfo
)
throws
Exception
;
/**
* 根据流程id获取下一节点操作人员userId集合
* @param procressId
* @return
* @throws Exception
*/
public
List
<
String
>
getUserIdsByWorkflow
(
String
procressId
,
String
checkLeaderId
)
throws
Exception
;
}
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/service/impl/WorkflowExcuteServiceImpl.java
View file @
722bf94a
...
...
@@ -16,11 +16,8 @@ import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Random
;
import
java.util.Set
;
import
java.util.*
;
import
java.util.stream.Collectors
;
@Service
public
class
WorkflowExcuteServiceImpl
implements
IWorkflowExcuteService
{
...
...
@@ -267,4 +264,27 @@ public class WorkflowExcuteServiceImpl implements IWorkflowExcuteService {
return
allTaskResultList
;
}
/**
* 根据工作流获取下一审核人角色下的所有用户ID
* @return
*/
@Override
public
List
<
String
>
getUserIdsByWorkflow
(
String
procressId
,
String
checkLeaderId
)
throws
Exception
{
List
<
String
>
userIds
=
new
ArrayList
<>();
JSONObject
teskObject
=
workflowFeignService
.
getTaskList
(
procressId
);
JSONArray
taskDetailArray
=
teskObject
.
getJSONArray
(
WorkFlowEnum
.
DATA
.
getCode
());
for
(
Object
obj
:
taskDetailArray
)
{
JSONObject
detail
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
obj
));
JSONArray
informerList
=
detail
.
getJSONArray
(
WorkFlowEnum
.
INFORMERLIST
.
getCode
());
if
(
informerList
.
size
()
>
0
)
{
userIds
=
informerList
.
stream
().
map
(
item
->
{
JSONObject
jsonItem
=
(
JSONObject
)
item
;
return
jsonItem
.
getString
(
"userId"
);
}).
collect
(
Collectors
.
toList
());
}
else
{
userIds
.
add
(
checkLeaderId
);
}
}
return
userIds
;
}
}
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/utils/DateUtils.java
View file @
722bf94a
...
...
@@ -604,7 +604,7 @@ public class DateUtils {
System.out.println(dateTimeToDateStringIfTimeEndZero(dateTimeToDate(new Date())));*/
//System.out.println(dateBetween(dateParse("2017-01-30", null), dateParse("2017-02-01", null)));
//System.out.println(dateBetweenIncludeToday(dateParse("2017-01-30", null), dateParse("2017-02-01", null)));
System
.
out
.
println
(
getDate
(
dateParse
(
"2017-01-17"
,
null
)));
//
System.out.println(getDate(dateParse("2017-01-17", null)));
/*
System.out.println(getDaysOfMonth(dateParse("2017-02-01", null)));
System.out.println(getDaysOfYear(dateParse("2017-01-30", null)));*/
...
...
@@ -612,6 +612,7 @@ public class DateUtils {
// .MONTH_PATTERN));
/*System.out.println(dateFormat(maxDateOfMonth(dateParse("2016-02", "yyyy-MM")), null));
System.out.println(dateFormat(minDateOfMonth(dateParse("2016-03-31", null)), null));*/
System
.
out
.
println
(
secondsToTimeStr
(
3600
));
}
/**
...
...
@@ -720,4 +721,23 @@ public class DateUtils {
String
dateString
=
formatter
.
format
(
currentTime
);
return
dateString
;
}
/**
* 将秒数转换为时分秒格式
* @param times
* @return
*/
public
static
String
secondsToTimeStr
(
int
times
)
{
if
(
times
<=
0
){
return
"00:00:00"
;
}
int
h
=
times
/
3600
;
int
m
=
(
times
-
h
*
3600
)/
60
;
int
s
=
times
-
h
*
3600
-
m
*
60
;
String
time
=
"%02d:%02d:%02d"
;
time
=
String
.
format
(
time
,
h
,
m
,
s
);
return
time
;
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/EquipmentIndexDto.java
0 → 100644
View file @
722bf94a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.Date
;
/**
* @author fengwang
* @date 2021-11-01.
*/
@Data
@ApiModel
(
value
=
"性能指标详情返回vo实体"
,
description
=
"性能指标详情返回vo实体"
)
public
class
EquipmentIndexDto
{
@ApiModelProperty
(
value
=
"id"
)
private
Long
id
;
@ApiModelProperty
(
value
=
"值"
)
private
String
value
;
@ApiModelProperty
(
value
=
"equipment_id"
)
private
String
equipmentId
;
@ApiModelProperty
(
value
=
"性能指标名称"
)
private
String
perfQuotaName
;
@ApiModelProperty
(
value
=
"性能指标id"
)
private
String
perfQuotaDefinitionId
;
@ApiModelProperty
(
value
=
"数量单位名称"
)
private
String
unitName
;
@ApiModelProperty
(
value
=
"否物联指标"
)
private
Integer
isIot
;
@ApiModelProperty
(
value
=
"物联指标"
)
private
String
typeName
;
@ApiModelProperty
(
value
=
"物联指标ID"
)
private
String
typeCode
;
@ApiModelProperty
(
value
=
"分类名称"
)
private
String
groupName
;
@ApiModelProperty
(
value
=
"指标原始id,从iot平台接口获取"
)
private
String
indexId
;
@ApiModelProperty
(
value
=
"性能指标"
)
private
String
perfQuotaStr
;
@ApiModelProperty
(
value
=
"是否是核心参数"
)
private
Boolean
isImportentParameter
;
@ApiModelProperty
(
value
=
"排序"
)
private
Integer
sortNum
;
@ApiModelProperty
(
value
=
"類型"
)
private
Integer
type
;
@ApiModelProperty
(
value
=
"物联nameKey"
)
private
String
nameKey
;
@ApiModelProperty
(
value
=
"创建日期"
)
private
Date
createDate
;
@ApiModelProperty
(
value
=
"更新日期"
)
private
Date
updateDate
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/LinkageUnitVo.java
0 → 100644
View file @
722bf94a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
dto
;
import
com.alibaba.excel.annotation.ExcelIgnore
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
com.yeejoin.amos.boot.module.common.api.entity.SourceFile
;
import
com.yeejoin.amos.boot.module.common.api.excel.CommonExplicitConstraint
;
import
com.yeejoin.amos.boot.module.common.api.excel.ExplicitConstraint
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
import
java.util.List
;
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"LinkageUnitVo"
,
description
=
"联动单位"
)
public
class
LinkageUnitVo
extends
BaseDto
{
@ExcelIgnore
private
static
final
long
serialVersionUID
=
1L
;
@ExcelProperty
(
value
=
"单位名称"
,
index
=
0
)
@ApiModelProperty
(
value
=
"单位名称"
)
private
String
unitName
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"单位code"
)
private
String
unitCode
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"父级单位id"
)
private
String
parentId
;
@ExcelProperty
(
value
=
"服务类别"
,
index
=
1
)
@ExplicitConstraint
(
type
=
"LDDWLB"
,
indexNum
=
1
,
sourceClass
=
CommonExplicitConstraint
.
class
)
//动态下拉内容
@ApiModelProperty
(
value
=
"服务类别"
)
private
String
linkageUnitType
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"联动单位类别code"
)
private
String
linkageUnitTypeCode
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"行政区划"
)
private
String
administrativeDivisions
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"行政区划代码"
)
private
String
administrativeDivisionsCode
;
@ExcelProperty
(
value
=
"地址"
,
index
=
2
)
@ApiModelProperty
(
value
=
"地址"
)
private
String
address
;
@ExcelProperty
(
value
=
"经度"
,
index
=
3
)
@ApiModelProperty
(
value
=
"经度"
)
private
String
longitude
;
@ExcelProperty
(
value
=
"纬度"
,
index
=
4
)
@ApiModelProperty
(
value
=
"纬度"
)
private
String
latitude
;
@ExcelProperty
(
value
=
"协议开始日期"
,
index
=
5
)
@ApiModelProperty
(
value
=
"协议开始日期"
)
private
Date
agreementStartDate
;
@ExcelProperty
(
value
=
"协议结束日期"
,
index
=
6
)
@ApiModelProperty
(
value
=
"协议结束日期"
)
private
Date
agreementEndDate
;
@ExcelProperty
(
value
=
"应急联动单位类别"
,
index
=
7
)
@ExplicitConstraint
(
type
=
"YJLDDW"
,
indexNum
=
7
,
sourceClass
=
CommonExplicitConstraint
.
class
)
//动态下拉内容
@ApiModelProperty
(
value
=
"应急联动单位类别"
)
private
String
emergencyLinkageUnit
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"应急联动单位类别code"
)
private
String
emergencyLinkageUnitCode
;
@ExcelProperty
(
value
=
"联系人"
,
index
=
8
)
@ApiModelProperty
(
value
=
"联系人 "
)
private
String
contactUser
;
@ExcelProperty
(
value
=
"联系人电话"
,
index
=
9
)
@ApiModelProperty
(
value
=
"联系人电话"
)
private
String
contactPhone
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"实例id"
)
private
Long
instanceId
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"组织机构代码"
)
private
String
orgCode
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"操作人名称"
)
private
String
recUserName
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"是否在协议期 "
)
private
String
inAgreement
;
@ExcelProperty
(
value
=
"消防救援能力"
,
index
=
10
)
@ApiModelProperty
(
value
=
"消防救援能力"
)
private
String
fireRescueCapability
;
@ExcelProperty
(
value
=
"职责_简要情况"
,
index
=
11
)
@ApiModelProperty
(
value
=
"职责_简要情况"
)
private
String
responsibilitiesSituation
;
@ExcelProperty
(
value
=
"应急服务内容"
,
index
=
12
)
@ApiModelProperty
(
value
=
"应急服务内容"
)
private
String
emergencyServiceContent
;
@ExcelProperty
(
value
=
"单位_简要情况"
,
index
=
13
)
@ApiModelProperty
(
value
=
"单位_简要情况"
)
private
String
unitSituation
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"联动单位图片"
)
private
List
<
SourceFile
>
image
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"车辆数量"
)
private
String
vehicleNumber
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"特岗人数"
)
private
String
personNumber
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/PerfQuotaIotDTO.java
0 → 100644
View file @
722bf94a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
dto
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.apache.poi.ss.formula.functions.T
;
/**
* @author litw
* @date 2021-11-02.
*/
@Data
public
class
PerfQuotaIotDTO
{
@ApiModelProperty
(
value
=
"分页 "
)
Page
<
EquipmentIndexDto
>
page
;
/**
* 分组id
*/
private
String
groupName
;
/**
* 装备id
*/
private
Long
equipmentId
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/WaterResourceDto.java
View file @
722bf94a
...
...
@@ -105,11 +105,11 @@ public class WaterResourceDto extends BaseDto {
@ApiModelProperty
(
value
=
"实景图"
)
private
String
realityImg
;
@ExcelProperty
(
value
=
"联系人姓名"
,
index
=
41
)
@ExcelProperty
(
value
=
"联系人姓名"
,
index
=
38
)
@ApiModelProperty
(
value
=
"联系人姓名"
)
private
String
contactUser
;
@ExcelProperty
(
value
=
"联系人电话"
,
index
=
42
)
@ExcelProperty
(
value
=
"联系人电话"
,
index
=
39
)
@ApiModelProperty
(
value
=
"联系人电话"
)
private
String
contactPhone
;
...
...
@@ -289,15 +289,16 @@ public class WaterResourceDto extends BaseDto {
@ApiModelProperty
(
value
=
"停车数量(个)"
)
private
Integer
parkingNum
;
@ExcelProperty
(
value
=
"储水量容积"
,
index
=
38
)
// 物联参数改为动态加载,原先字段作废,字段做隐藏
@ExcelIgnore
@ApiModelProperty
(
value
=
"储水量容积物联编码"
)
private
String
iotWaterStorage
;
@Excel
Property
(
value
=
"流量"
,
index
=
39
)
@Excel
Ignore
@ApiModelProperty
(
value
=
"流量物联编码"
)
private
String
iotFlowRate
;
@Excel
Property
(
value
=
"状态"
,
index
=
40
)
@Excel
Ignore
@ApiModelProperty
(
value
=
"状态物联编码"
)
private
String
iotStatus
;
...
...
@@ -308,7 +309,7 @@ public class WaterResourceDto extends BaseDto {
@ExcelIgnore
@ApiModelProperty
(
value
=
"物联参数"
)
private
WaterResourceIotDto
waterResourceIotDto
;
private
Map
<
String
,
Object
>
waterResourceIotDto
;
@ExcelIgnore
@ApiModelProperty
(
"设施定义id"
)
...
...
@@ -339,13 +340,14 @@ public class WaterResourceDto extends BaseDto {
@ApiModelProperty
(
value
=
"经度"
)
@ExcelProperty
(
value
=
"经度"
,
index
=
4
3
)
@ExcelProperty
(
value
=
"经度"
,
index
=
4
0
)
private
Double
longitude
;
@ApiModelProperty
(
value
=
"纬度"
)
@ExcelProperty
(
value
=
"纬度"
,
index
=
4
4
)
@ExcelProperty
(
value
=
"纬度"
,
index
=
4
1
)
private
Double
latitude
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"附件"
)
@TableField
(
exist
=
false
)
private
Map
<
String
,
List
<
AttachmentDto
>>
attachments
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/WaterResourceDyDto.java
0 → 100644
View file @
722bf94a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* @author ltw
* @date 2021-11-02.
*/
@Data
public
class
WaterResourceDyDto
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"表单key"
)
private
String
key
;
@ApiModelProperty
(
value
=
"表单名称"
)
private
String
label
;
@ApiModelProperty
(
value
=
"表单类型"
)
private
String
type
;
@ApiModelProperty
(
value
=
"是否一行显示"
)
private
Boolean
block
;
@ApiModelProperty
(
value
=
"是否隱藏"
)
private
Boolean
hide
;
@ApiModelProperty
(
value
=
"表单值"
)
private
String
data
;
public
WaterResourceDyDto
()
{
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/WaterResourceIndexDto.java
0 → 100644
View file @
722bf94a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
/**
* 消防水源物联参数
*
* @author litw
* @date 2021-11-02
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"WaterResourceIndexDto"
,
description
=
"消防水源物联参数"
)
public
class
WaterResourceIndexDto
extends
BaseDto
{
private
static
final
long
serialVersionUID
=
1L
;
private
Long
id
;
@ApiModelProperty
(
value
=
"指标拥有者ID:关联装备定义ID"
)
private
Long
equipmentId
;
@ApiModelProperty
(
value
=
"消防水源id"
)
private
Long
waterId
;
@ApiModelProperty
(
value
=
"名称"
)
private
String
name
;
private
String
nameKey
;
@ApiModelProperty
(
value
=
"指标值"
)
private
String
perfValue
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/entity/WaterResourceIndex.java
0 → 100644
View file @
722bf94a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
java.util.Date
;
/**
* 消防水源物联参数
*
* @author litw
* @date 2021-11-02
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@Accessors
(
chain
=
true
)
@TableName
(
"cb_water_resource_index"
)
public
class
WaterResourceIndex
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 指标拥有者ID:关联装备定义ID
*/
@TableField
(
"equipment_id"
)
private
Long
equipmentId
;
/**
* 消防水源id
*/
@TableField
(
"water_id"
)
private
Long
waterId
;
/**
* 名称
*/
@TableField
(
"name"
)
private
String
name
;
/**
*
*/
@TableField
(
"name_key"
)
private
String
nameKey
;
/**
* 指标值
*/
@TableField
(
"perf_value"
)
private
String
perfValue
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/feign/EquipFeignClient.java
View file @
722bf94a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
feign
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.common.api.dto.EquipmentIndexDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.PerfQuotaIotDTO
;
import
com.yeejoin.amos.boot.module.common.api.dto.VideoDto
;
import
com.yeejoin.amos.component.feign.config.InnerInvokException
;
import
org.springframework.cloud.openfeign.FeignClient
;
...
...
@@ -85,7 +88,8 @@ public interface EquipFeignClient {
@RequestParam
String
code
,
@RequestParam
String
pageNum
,
@RequestParam
String
pageSize
,
@RequestParam
Long
id
);
@RequestParam
Long
id
,
@RequestParam
Boolean
isNo
);
...
...
@@ -303,4 +307,12 @@ public interface EquipFeignClient {
*/
@RequestMapping
(
value
=
"/confirmAlarm/getMonitorEvent"
,
method
=
RequestMethod
.
GET
)
ResponseModel
<
Map
<
String
,
Object
>>
getMonitorEvent
();
/**
* 装备定义性能参数列表分页查询
*
* @return
*/
@RequestMapping
(
value
=
"/perf-quota/listAll"
,
method
=
RequestMethod
.
POST
)
ResponseModel
<
List
<
EquipmentIndexDto
>>
getEquipmentIndexDto
(
@RequestBody
PerfQuotaIotDTO
perfQuotaIotDTO
);
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/mapper/WaterResourceIndexMapper.java
0 → 100644
View file @
722bf94a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
mapper
;
import
com.yeejoin.amos.boot.module.common.api.entity.WaterResourceIndex
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* 消防水源物联参数 Mapper 接口
*
* @author litw
* @date 2021-11-02
*/
public
interface
WaterResourceIndexMapper
extends
BaseMapper
<
WaterResourceIndex
>
{
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/service/IOrgUsrService.java
View file @
722bf94a
...
...
@@ -117,7 +117,7 @@ public interface IOrgUsrService {
OrgUsrDto
saveOrgPerson
(
OrgPersonDto
OrgPersonDto
)
throws
Exception
;
void
updateByIdOrgUsr
(
OrgUsrDto
OrgUsrDto
,
Long
id
)
throws
Exception
;
OrgUsrDto
updateByIdOrgUsr
(
OrgUsrDto
OrgUsrDto
,
Long
id
)
throws
Exception
;
void
updateByIdOrgPerson
(
OrgPersonDto
OrgPersonDto
,
Long
id
)
throws
Exception
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/service/IWaterResourceIndexService.java
0 → 100644
View file @
722bf94a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
service
;
/**
* 消防水源物联参数接口类
*
* @author litw
* @date 2021-11-02
*/
public
interface
IWaterResourceIndexService
{
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/WaterResourceIndexMapper.xml
0 → 100644
View file @
722bf94a
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.common.api.mapper.WaterResourceIndexMapper"
>
</mapper>
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/service/IWaterResourceIndexService.java
0 → 100644
View file @
722bf94a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
service
;
/**
* 消防水源物联参数接口类
*
* @author litw
* @date 2021-11-02
*/
public
interface
IWaterResourceIndexService
{
}
amos-boot-module/amos-boot-module-api/amos-boot-module-latentdanger-api/src/main/java/com/yeejoin/amos/latentdanger/common/enums/ExecuteTypeEnum.java
View file @
722bf94a
...
...
@@ -66,4 +66,13 @@ public enum ExecuteTypeEnum {
}
return
null
;
}
public
static
String
getNameByCode
(
Integer
code
)
{
for
(
ExecuteTypeEnum
e
:
ExecuteTypeEnum
.
values
())
{
if
(
code
.
equals
(
e
.
getCode
()))
{
return
e
.
getName
();
}
}
return
null
;
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-patrol-api/src/main/java/com/yeejoin/amos/patrol/dao/entity/PointClassify.java
View file @
722bf94a
...
...
@@ -56,6 +56,61 @@ public class PointClassify extends BasicEntity{
@Column
(
name
=
"inspection_spec_name"
)
private
String
inspectionSpecName
;
/**
* 编号
*/
@Column
(
name
=
"code"
)
private
String
code
;
/**
* 分类名称
*/
@Column
(
name
=
"category_name"
)
private
String
categoryName
;
/**
* 分类id
*/
@Column
(
name
=
"category_code"
)
private
String
categoryCode
;
/**
* 位置
*/
@Column
(
name
=
"address"
)
private
String
address
;
/**
* 数据源code(1 消防装备 2 重点部位 3 自定义)
*/
@Column
(
name
=
"data_source_code"
)
private
String
dataSourceCode
;
/**
* 数据源名称(冗余)
*/
@Column
(
name
=
"data_source_name"
)
private
String
dataSourceName
;
/**
* 是否删除( 0未删除,1已删除 )
*/
@Column
(
name
=
"is_delete"
)
private
byte
isDelete
;
/**
* 建筑id
*/
@Column
(
name
=
"building_id"
)
private
String
buildingId
;
/**
* 建筑名称
*/
@Column
(
name
=
"building_name"
)
private
String
buildingName
;
public
String
getEquipmentId
()
{
return
equipmentId
;
}
...
...
@@ -115,4 +170,76 @@ public class PointClassify extends BasicEntity{
public
void
setOriginalId
(
String
originalId
)
{
this
.
originalId
=
originalId
;
}
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
String
getCategoryName
()
{
return
categoryName
;
}
public
void
setCategoryName
(
String
categoryName
)
{
this
.
categoryName
=
categoryName
;
}
public
String
getAddress
()
{
return
address
;
}
public
void
setAddress
(
String
address
)
{
this
.
address
=
address
;
}
public
String
getDataSourceCode
()
{
return
dataSourceCode
;
}
public
void
setDataSourceCode
(
String
dataSourceCode
)
{
this
.
dataSourceCode
=
dataSourceCode
;
}
public
String
getDataSourceName
()
{
return
dataSourceName
;
}
public
void
setDataSourceName
(
String
dataSourceName
)
{
this
.
dataSourceName
=
dataSourceName
;
}
public
byte
getIsDelete
()
{
return
isDelete
;
}
public
void
setIsDelete
(
byte
isDelete
)
{
this
.
isDelete
=
isDelete
;
}
public
String
getBuildingId
()
{
return
buildingId
;
}
public
void
setBuildingId
(
String
buildingId
)
{
this
.
buildingId
=
buildingId
;
}
public
String
getBuildingName
()
{
return
buildingName
;
}
public
void
setBuildingName
(
String
buildingName
)
{
this
.
buildingName
=
buildingName
;
}
public
String
getCategoryCode
()
{
return
categoryCode
;
}
public
void
setCategoryCode
(
String
categoryCode
)
{
this
.
categoryCode
=
categoryCode
;
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/dto/AlertPaperInfoDto.java
View file @
722bf94a
...
...
@@ -24,6 +24,9 @@ public class AlertPaperInfoDto {
@ApiModelProperty
(
value
=
"警情类别code"
)
private
String
alarmTypeCode
;
@ApiModelProperty
(
value
=
"警情类别"
)
private
String
alarmType
;
@ApiModelProperty
(
value
=
"所属区域"
)
private
String
area
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/dto/RepairConsultDto.java
View file @
722bf94a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
dto
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
...
...
@@ -42,4 +43,7 @@ public class RepairConsultDto extends BaseDto {
@ApiModelProperty
(
value
=
"警情阶段code"
)
private
String
alertStageCode
;
@ApiModelProperty
(
value
=
"阶段附件"
)
private
String
attachment
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/dto/VoiceRecordFileDto.java
View file @
722bf94a
...
...
@@ -54,4 +54,13 @@ public class VoiceRecordFileDto extends BaseDto {
@ApiModelProperty
(
value
=
"通话记录id"
)
private
String
connectId
;
@ApiModelProperty
(
value
=
"关联工单编号"
)
private
String
workNum
;
@ApiModelProperty
(
value
=
"通话开始时间str"
)
private
String
telStartTimeStr
;
@ApiModelProperty
(
value
=
"通话结束时间str"
)
private
String
telEndTimeStr
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/entity/ESAlertCalled.java
View file @
722bf94a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
entity
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
import
org.springframework.data.annotation.Id
;
...
...
@@ -96,4 +97,11 @@ public class ESAlertCalled {
@Field
(
type
=
FieldType
.
Text
)
private
String
emergencyCall
;
/**
* 所属区域编码
*/
@Field
(
type
=
FieldType
.
Text
)
private
String
regionCode
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/entity/RepairConsult.java
View file @
722bf94a
...
...
@@ -64,4 +64,10 @@ public class RepairConsult extends BaseEntity {
@TableField
(
"alert_stage_code"
)
private
String
alertStageCode
;
/**
* 阶段附件
*/
@TableField
(
"attachment"
)
private
String
attachment
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/entity/VoiceRecordFile.java
View file @
722bf94a
...
...
@@ -76,4 +76,11 @@ public class VoiceRecordFile extends BaseEntity {
@TableField
(
"alert_stage_code"
)
private
String
alertStageCode
;
/**
* 通话时长
*/
@TableField
(
"tel_time"
)
private
String
telTime
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/mapper/AlertCalledMapper.java
View file @
722bf94a
...
...
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledQueryDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledRecordDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertPaperInfoDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.WechatMyBusinessListDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.WechatMyBussinessDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.WechatMyTaskListDto
;
...
...
@@ -101,4 +102,5 @@ public interface AlertCalledMapper extends BaseMapper<AlertCalled> {
String
alertSource
,
String
alarmType
);
List
<
AlertPaperInfoDto
>
getAlertPaperInfoList
(
@Param
(
"regionCodes"
)
List
<
String
>
regionCodes
,
@Param
(
"isHistory"
)
Boolean
isHistory
);
}
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/mapper/VoiceRecordFileMapper.java
View file @
722bf94a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
mapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.VoiceRecordFileDto
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.VoiceRecordFile
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* 通话记录附件 Mapper 接口
...
...
@@ -11,4 +16,12 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public
interface
VoiceRecordFileMapper
extends
BaseMapper
<
VoiceRecordFile
>
{
Page
<
List
<
VoiceRecordFileDto
>>
queryRecordListByQueryDto
(
Page
<
VoiceRecordFileDto
>
page
,
@Param
(
"telStartTimeStr"
)
String
telStartTimeStr
,
@Param
(
"telEndTimeStr"
)
String
telEndTimeStr
,
@Param
(
"fileType"
)
String
fileType
,
@Param
(
"tel"
)
String
tel
,
@Param
(
"workNum"
)
String
workNum
,
@Param
(
"sortParam"
)
String
sortParam
,
@Param
(
"sortRule"
)
String
sortRule
);
}
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/service/IVoiceRecordFileService.java
View file @
722bf94a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.VoiceRecordFileDto
;
/**
...
...
@@ -13,4 +14,5 @@ public interface IVoiceRecordFileService {
void
publishRecord
(
VoiceRecordFileDto
model
);
Page
<
VoiceRecordFileDto
>
queryRecordListByQueryDto
(
Page
<
VoiceRecordFileDto
>
page
,
String
telEndTimeStr
,
String
telEndTimeStr1
,
String
fileType
,
String
tel
,
String
workNum
,
String
sortParam
,
String
sortRule
);
}
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/service/TzsAuthService.java
0 → 100644
View file @
722bf94a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
service
;
import
java.util.List
;
/**
* 特种设备权限服务类
*/
public
interface
TzsAuthService
{
List
<
String
>
getUserRegionCode
();
}
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/resources/mapper/AlertCalledMapper.xml
View file @
722bf94a
...
...
@@ -519,7 +519,42 @@
</select>
<select
id=
"getAlertPaperInfoList"
resultType=
"com.yeejoin.amos.boot.module.tzs.api.dto.AlertPaperInfoDto"
>
SELECT
a.sequence_nbr AS alertId,
a.region_code AS regionCode,
e.rescue_code AS rescueCode,
a.alarm_type_code AS alarmTypeCode,
a.alarm_type AS alarmType,
CONCAT(e.province ,e.city ,e.district) AS area,
a.address AS address,
a.call_time AS callTime,
e.longitude AS longitude,
e.latitude AS latitude,
a.alert_stage AS alertStatus,
e.sequence_nbr AS elevatorId,
e.register_code AS elevatorCode
FROM tz_alert_called a
LEFT JOIN tcb_elevator e ON e.sequence_nbr = a.equipment_id
WHERE a.is_delete = 0
<choose>
<when
test=
"isHistory == true"
>
AND a.alert_status = 1
AND
DATE_SUB(CURDATE(), INTERVAL 7 DAY)
<![CDATA[ <= ]]>
date(a.call_time)
</when>
<otherwise>
<if
test=
"regionCodes != null"
>
AND a.alert_status = 0
AND
<foreach
collection=
"regionCodes"
index=
"index"
item=
"item"
open=
"("
separator=
" OR "
close=
")"
>
a.region_code LIKE CONCAT('%', #{item}, '%')
</foreach>
</if>
</otherwise>
</choose>
</select>
</mapper>
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/resources/mapper/VoiceRecordFileMapper.xml
View file @
722bf94a
...
...
@@ -2,4 +2,46 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.tzs.api.mapper.VoiceRecordFileMapper"
>
<select
id=
"queryRecordListByQueryDto"
resultType=
"java.util.Map"
>
SELECT
r.sequence_nbr AS sequenceNbr,
r.file_path AS filePath,
r.file_type AS fileType,
r.tel AS tel,
r.tel_start_time AS telStartTime,
r.tel_end_time AS telEndTime,
r.alert_id AS alertId,
r.alert_stage AS alertStage,
r.alert_stage_code AS alertStageCode,
r.tel_time AS telTime,
a.work_order_number AS workNum
FROM
tz_voice_record_file r
LEFT JOIN tz_alert_called a ON a.sequence_nbr =
r.alert_id
WHERE r.is_delete = 0
<if
test=
"workNum != null and workNum != ''"
>
AND a.work_order_number like
CONCAT(CONCAT('%',#{workNum}),'%')
</if>
<if
test=
"telStartTimeStr != null "
>
and #{telStartTimeStr}
<![CDATA[ <= ]]>
r.tel_start_time
</if>
<if
test=
"telEndTimeStr != null "
>
and r.tel_end_time
<![CDATA[ <= ]]>
#{telEndTimeStr}
</if>
<if
test=
"tel != null and tel != ''"
>
AND r.tel like
CONCAT(CONCAT('%',#{tel}),'%')
</if>
<if
test=
"fileType != null and fileType != ''"
>
AND r.file_type = #{fileType}
</if>
<if
test=
"sortParam != null and sortParam != '' and sortRule != null and sortRule != '' "
>
ORDER BY ${sortParam} ${sortRule}
</if>
</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 @
722bf94a
...
...
@@ -1334,10 +1334,10 @@ public class CommandController extends BaseController {
Long
id
=
null
;
//获取用户已绑定车辆id、
UserCar
userCar
=
userCarService
.
selectByAmosUserId
(
Long
.
valueOf
(
agencyUserModel
.
getUserId
()));
if
(
isNo
!=
null
&&
isNo
){
id
=
userCar
!=
null
?
userCar
.
getCarId
():
null
;
}
ResponseModel
<
Object
>
data
=
equipFeignClient
.
equipmentCarList
(
teamId
,
name
,
code
,
pageNum
,
pageSize
,
id
);
id
=
userCar
!=
null
?
userCar
.
getCarId
():
null
;
ResponseModel
<
Object
>
data
=
equipFeignClient
.
equipmentCarList
(
teamId
,
name
,
code
,
pageNum
,
pageSize
,
id
,
isNo
);
Map
map
=
new
HashMap
();
map
.
put
(
"select"
,
userCar
!=
null
?
userCar
.
getCarId
():
null
);
map
.
put
(
"data"
,
data
!=
null
?
data
.
getResult
():
null
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/OrgUsrController.java
View file @
722bf94a
...
...
@@ -144,7 +144,7 @@ public class OrgUsrController extends BaseController {
OrgUsrVo
.
setBizOrgType
(
CommonConstant
.
BIZ_ORG_TYPE_COMPANY
);
iOrgUsrService
.
updateByIdOrgUsr
(
OrgUsrVo
,
id
);
return
ResponseHelper
.
buildResponse
(
null
);
return
ResponseHelper
.
buildResponse
(
iOrgUsrService
.
updateByIdOrgUsr
(
OrgUsrVo
,
id
)
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/WaterResourceController.java
View file @
722bf94a
...
...
@@ -3,7 +3,9 @@ package com.yeejoin.amos.boot.module.common.biz.controller;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
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.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.mysql.cj.x.protobuf.MysqlxDatatypes
;
import
com.yeejoin.amos.boot.biz.common.constants.BizConstant
;
...
...
@@ -20,6 +22,9 @@ import io.swagger.annotations.ApiOperation;
import
org.apache.commons.beanutils.BeanMap
;
import
org.apache.commons.collections.MapUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.poi.ss.formula.functions.T
;
import
org.checkerframework.checker.units.qual.K
;
import
org.openxmlformats.schemas.drawingml.x2006.chart.STRadarStyle
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.ObjectUtils
;
...
...
@@ -65,6 +70,10 @@ public class WaterResourceController extends BaseController {
WaterResourceIotServiceImpl
waterResourceIotService
;
@Autowired
SourceFileServiceImpl
sourceFileService
;
@Autowired
EquipFeignClient
equipFeignClient
;
@Autowired
WaterResourceIndexServiceImpl
waterResourceIndexServiceImpl
;
/**
* 新增
...
...
@@ -93,7 +102,7 @@ public class WaterResourceController extends BaseController {
model
.
setResourceTypeName
(
resourceTypeEnum
.
get
().
getName
());
model
.
setRealityImg
(
null
);
model
.
setOrientationImg
(
JSONArray
.
toJSONString
(
model
.
getOrientationImgList
())
);
model
.
setOrientationImg
(
null
);
/*2021-09-08 前端表示前端传递的address参数已经切割过,后端无需再切割获取 陈召 屏蔽代码 97-102行*/
/* if(model.getAddress()!=null){
JSONObject address = WaterResourceServiceImpl.getLongLatFromAddress(model.getAddress());
...
...
@@ -146,11 +155,17 @@ public class WaterResourceController extends BaseController {
break
;
}
// 新增物联信息
if
(
model
.
getIsIot
())
{
WaterResourceIotDto
waterResourceIotDto
=
model
.
getWaterResourceIotDto
();
waterResourceIotDto
.
setResourceType
(
model
.
getResourceType
());
waterResourceIotDto
.
setResourceId
(
model
.
getSequenceNbr
());
waterResourceIotService
.
createWithModel
(
waterResourceIotDto
);
if
(
null
!=
model
.
getWaterResourceIotDto
()
&&
model
.
getWaterResourceIotDto
().
size
()>
0
)
{
Map
<
String
,
Object
>
map
=
model
.
getWaterResourceIotDto
();
List
<
WaterResourceIndex
>
list
=
new
ArrayList
<>();
for
(
Map
.
Entry
<
String
,
Object
>
entry
:
map
.
entrySet
())
{
WaterResourceIndex
waterResourceIndex1
=
new
WaterResourceIndex
();
waterResourceIndex1
.
setNameKey
(
entry
.
getKey
());
waterResourceIndex1
.
setWaterId
(
model
.
getSequenceNbr
());
waterResourceIndex1
.
setPerfValue
(
entry
.
getValue
().
toString
());
list
.
add
(
waterResourceIndex1
);
}
waterResourceIndexServiceImpl
.
saveBatch
(
list
);
}
}
else
{
waterResourceServiceImpl
.
createWithModel
(
model
);
...
...
@@ -161,6 +176,47 @@ public class WaterResourceController extends BaseController {
return
ResponseHelper
.
buildResponse
(
model
);
}
/**
* 获取关联装备定义物联参数字段
*
* @param equipmentId 设备定义id
* @return 返回结果
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getIotField"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取关联装备定义物联参数字段"
,
notes
=
"获取关联装备定义物联参数字段"
)
public
ResponseModel
<
Object
>
getIotField
(
Long
equipmentId
)
{
PerfQuotaIotDTO
perfQuotaIotDTO
=
new
PerfQuotaIotDTO
();
Page
<
EquipmentIndexDto
>
page
=
new
Page
<>();
page
.
setCurrent
(
1
);
page
.
setSize
(
100
);
perfQuotaIotDTO
.
setEquipmentId
(
equipmentId
);
perfQuotaIotDTO
.
setGroupName
(
""
);
perfQuotaIotDTO
.
setPage
(
page
);
ResponseModel
<
List
<
EquipmentIndexDto
>>
equipmentIndexDto
=
equipFeignClient
.
getEquipmentIndexDto
(
perfQuotaIotDTO
);
if
(
equipmentIndexDto
.
getResult
().
size
()
==
0
)
{
return
ResponseHelper
.
buildResponse
(
null
);
}
List
<
EquipmentIndexDto
>
result
=
equipmentIndexDto
.
getResult
();
List
<
EquipmentIndexDto
>
list
=
result
.
stream
().
filter
(
e
->
1
==
e
.
getIsIot
()).
collect
(
Collectors
.
toList
());
List
<
WaterResourceDyDto
>
listWater
=
new
LinkedList
<>();
list
.
stream
().
forEach
(
e
->
{
WaterResourceDyDto
dyDto
=
new
WaterResourceDyDto
();
dyDto
.
setKey
(
e
.
getPerfQuotaDefinitionId
());
dyDto
.
setBlock
(
false
);
dyDto
.
setLabel
(
e
.
getPerfQuotaName
());
dyDto
.
setType
(
"input"
);
dyDto
.
setHide
(
false
);
listWater
.
add
(
dyDto
);
});
return
ResponseHelper
.
buildResponse
(
listWater
);
}
/**
* 根据sequenceNbr更新
*
...
...
@@ -235,12 +291,26 @@ public class WaterResourceController extends BaseController {
}
}
// 更新物联信息
if
(
model
.
getIsIot
()
!=
null
){
if
(
model
.
getIsIot
())
{
WaterResourceIotDto
waterResourceIotDto
=
model
.
getWaterResourceIotDto
();
waterResourceIotDto
.
setResourceId
(
sequenceNbr
);
waterResourceIotService
.
updateWithModel
(
waterResourceIotDto
);
if
(
null
!=
model
.
getWaterResourceIotDto
()
&&
model
.
getWaterResourceIotDto
().
size
()
>
0
){
Map
<
String
,
Object
>
map
=
model
.
getWaterResourceIotDto
();
List
<
WaterResourceIndex
>
list
=
new
ArrayList
<>();
for
(
Map
.
Entry
<
String
,
Object
>
entry
:
map
.
entrySet
())
{
LambdaQueryWrapper
<
WaterResourceIndex
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
WaterResourceIndex:
:
getNameKey
,
entry
.
getKey
());
queryWrapper
.
eq
(
WaterResourceIndex:
:
getWaterId
,
model
.
getSequenceNbr
());
WaterResourceIndex
waterResourceIndex
=
waterResourceIndexServiceImpl
.
getOne
(
queryWrapper
);
if
(
waterResourceIndex
!=
null
)
{
waterResourceIndex
.
setPerfValue
(
entry
.
getValue
().
toString
());
list
.
add
(
waterResourceIndex
);
}
else
{
WaterResourceIndex
waterResourceIndex1
=
new
WaterResourceIndex
();
waterResourceIndex1
.
setNameKey
(
entry
.
getKey
());
waterResourceIndex1
.
setWaterId
(
model
.
getSequenceNbr
());
waterResourceIndex1
.
setPerfValue
(
entry
.
getValue
().
toString
());
list
.
add
(
waterResourceIndex1
);
}
}
waterResourceIndexServiceImpl
.
saveOrUpdateBatch
(
list
);
}
return
ResponseHelper
.
buildResponse
(
waterResourceDto
);
}
...
...
@@ -342,14 +412,15 @@ public class WaterResourceController extends BaseController {
waterResourceDto
.
setSequenceNbr
(
sequenceNbr
);
waterResourceDto
.
setIsDelete
(
isDelete
);
// 查询物联参数
if
(
waterResourceDto
.
getIsIot
())
{
WaterResourceIot
waterResourceIot
=
waterResourceIotService
.
getOne
(
new
QueryWrapper
<
WaterResourceIot
>().
eq
(
"resource_id"
,
sequenceNbr
));
WaterResourceIotDto
waterResourceIotDto
=
new
WaterResourceIotDto
();
if
(!
ValidationUtil
.
isEmpty
(
waterResourceIot
))
{
BeanUtils
.
copyProperties
(
waterResourceIot
,
waterResourceIotDto
);
}
waterResourceDto
.
setWaterResourceIotDto
(
waterResourceIotDto
);
LambdaQueryWrapper
<
WaterResourceIndex
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
WaterResourceIndex:
:
getWaterId
,
waterResourceDto
.
getSequenceNbr
());
List
<
WaterResourceIndex
>
list
=
waterResourceIndexServiceImpl
.
list
(
queryWrapper
);
if
(
list
.
size
()>
0
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
list
.
stream
().
forEach
(
e
->{
map
.
put
(
e
.
getNameKey
(),
e
.
getPerfValue
());
});
waterResourceDto
.
setWaterResourceIotDto
(
map
);
}
return
ResponseHelper
.
buildResponse
(
waterResourceDto
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/WaterResourceIndexController.java
0 → 100644
View file @
722bf94a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
java.util.List
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.WaterResourceIndexServiceImpl
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
javax.servlet.http.HttpServletRequest
;
import
org.springframework.web.bind.annotation.*
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.common.api.dto.WaterResourceIndexDto
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
/**
* 消防水源物联参数
*
* @author litw
* @date 2021-11-02
*/
@RestController
@Api
(
tags
=
"消防水源物联参数Api"
)
@RequestMapping
(
value
=
"/water-resource-index"
)
public
class
WaterResourceIndexController
extends
BaseController
{
@Autowired
WaterResourceIndexServiceImpl
waterResourceIndexServiceImpl
;
/**
* 新增消防水源物联参数
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增消防水源物联参数"
,
notes
=
"新增消防水源物联参数"
)
public
ResponseModel
<
WaterResourceIndexDto
>
save
(
@RequestBody
WaterResourceIndexDto
model
)
{
model
=
waterResourceIndexServiceImpl
.
createWithModel
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
}
/**
* 根据sequenceNbr更新
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新消防水源物联参数"
,
notes
=
"根据sequenceNbr更新消防水源物联参数"
)
public
ResponseModel
<
WaterResourceIndexDto
>
updateBySequenceNbrWaterResourceIndex
(
@RequestBody
WaterResourceIndexDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
waterResourceIndexServiceImpl
.
updateWithModel
(
model
));
}
/**
* 根据sequenceNbr删除
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除消防水源物联参数"
,
notes
=
"根据sequenceNbr删除消防水源物联参数"
)
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
HttpServletRequest
request
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
){
return
ResponseHelper
.
buildResponse
(
waterResourceIndexServiceImpl
.
removeById
(
sequenceNbr
));
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个消防水源物联参数"
,
notes
=
"根据sequenceNbr查询单个消防水源物联参数"
)
public
ResponseModel
<
WaterResourceIndexDto
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
waterResourceIndexServiceImpl
.
queryBySeq
(
sequenceNbr
));
}
/**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"消防水源物联参数分页查询"
,
notes
=
"消防水源物联参数分页查询"
)
public
ResponseModel
<
Page
<
WaterResourceIndexDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
Page
<
WaterResourceIndexDto
>
page
=
new
Page
<
WaterResourceIndexDto
>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
waterResourceIndexServiceImpl
.
queryForWaterResourceIndexPage
(
page
));
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"消防水源物联参数列表全部数据查询"
,
notes
=
"消防水源物联参数列表全部数据查询"
)
@GetMapping
(
value
=
"/list"
)
public
ResponseModel
<
List
<
WaterResourceIndexDto
>>
selectForList
()
{
return
ResponseHelper
.
buildResponse
(
waterResourceIndexServiceImpl
.
queryForWaterResourceIndexList
());
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/OrgUsrServiceImpl.java
View file @
722bf94a
...
...
@@ -737,7 +737,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
}
@Override
public
void
updateByIdOrgUsr
(
OrgUsrDto
OrgUsrVo
,
Long
id
)
throws
Exception
{
public
OrgUsrDto
updateByIdOrgUsr
(
OrgUsrDto
OrgUsrVo
,
Long
id
)
throws
Exception
{
// 修改单位信息
OrgUsr
orgUsr
=
new
OrgUsr
();
OrgUsr
oriOrgUsr
=
getById
(
id
);
...
...
@@ -773,6 +773,8 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
* 同步保存ES
*/
eSOrgUsrService
.
saveAlertCalledToES
(
orgUsr
);
OrgUsrVo
.
setBizOrgCode
(
orgUsr
.
getBizOrgCode
());
return
OrgUsrVo
;
}
@Override
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/WaterResourceIndexServiceImpl.java
0 → 100644
View file @
722bf94a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
service
.
impl
;
import
com.yeejoin.amos.boot.module.common.api.entity.WaterResourceIndex
;
import
com.yeejoin.amos.boot.module.common.api.mapper.WaterResourceIndexMapper
;
import
com.yeejoin.amos.boot.module.common.api.service.IWaterResourceIndexService
;
import
com.yeejoin.amos.boot.module.common.api.dto.WaterResourceIndexDto
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
java.util.List
;
/**
* 消防水源物联参数服务实现类
*
* @author litw
* @date 2021-11-02
*/
@Service
public
class
WaterResourceIndexServiceImpl
extends
BaseService
<
WaterResourceIndexDto
,
WaterResourceIndex
,
WaterResourceIndexMapper
>
implements
IWaterResourceIndexService
{
/**
* 分页查询
*/
public
Page
<
WaterResourceIndexDto
>
queryForWaterResourceIndexPage
(
Page
<
WaterResourceIndexDto
>
page
)
{
return
this
.
queryForPage
(
page
,
null
,
false
);
}
/**
* 列表查询 示例
*/
public
List
<
WaterResourceIndexDto
>
queryForWaterResourceIndexList
()
{
return
this
.
queryForList
(
""
,
false
);
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/WaterResourceServiceImpl.java
View file @
722bf94a
...
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.common.biz.service.impl;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
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.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.constants.BizConstant
;
...
...
@@ -19,6 +20,7 @@ import com.yeejoin.amos.boot.module.common.api.dto.WaterResourceZhDto;
import
com.yeejoin.amos.boot.module.common.api.entity.WaterResource
;
import
com.yeejoin.amos.boot.module.common.api.entity.WaterResourceCrane
;
import
com.yeejoin.amos.boot.module.common.api.entity.WaterResourceHydrant
;
import
com.yeejoin.amos.boot.module.common.api.entity.WaterResourceIndex
;
import
com.yeejoin.amos.boot.module.common.api.entity.WaterResourceIot
;
import
com.yeejoin.amos.boot.module.common.api.entity.WaterResourceNatural
;
import
com.yeejoin.amos.boot.module.common.api.entity.WaterResourcePool
;
...
...
@@ -35,7 +37,9 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Optional
;
/**
...
...
@@ -59,6 +63,8 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate
WaterResourceIotServiceImpl
waterResourceIotService
;
@Resource
WaterResourceMapper
waterResourceMapper
;
@Autowired
WaterResourceIndexServiceImpl
waterResourceIndexServiceImpl
;
/**
* 分页查询
...
...
@@ -154,14 +160,14 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate
break
;
}
// 新增物联信息
if
(
model
.
getIsIot
())
{
WaterResourceIotDto
waterResourceIotDto
=
new
WaterResourceIotDto
();
BeanUtils
.
copyProperties
(
model
,
waterResourceIotDto
);
waterResourceIotDto
.
setSequenceNbr
(
null
);
waterResourceIotDto
.
setResourceType
(
model
.
getResourceType
());
waterResourceIotDto
.
setResourceId
(
model
.
getSequenceNbr
());
waterResourceIotService
.
createWithModel
(
waterResourceIotDto
);
}
//
if (model.getIsIot()) {
//
WaterResourceIotDto waterResourceIotDto = new WaterResourceIotDto();
//
BeanUtils.copyProperties(model, waterResourceIotDto);
//
waterResourceIotDto.setSequenceNbr(null);
//
waterResourceIotDto.setResourceType(model.getResourceType());
//
waterResourceIotDto.setResourceId(model.getSequenceNbr());
//
waterResourceIotService.createWithModel(waterResourceIotDto);
//
}
}
else
{
createWithModel
(
model
);
}
...
...
@@ -234,12 +240,15 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate
waterResourceDto
.
setSequenceNbr
(
sequenceNbr
);
waterResourceDto
.
setIsDelete
(
isDelete
);
// 查询物联参数
if
(
waterResourceDto
.
getIsIot
())
{
WaterResourceIot
waterResourceIot
=
waterResourceIotService
.
getOne
(
new
QueryWrapper
<
WaterResourceIot
>().
eq
(
"resource_id"
,
sequenceNbr
));
WaterResourceIotDto
waterResourceIotDto
=
new
WaterResourceIotDto
();
BeanUtils
.
copyProperties
(
waterResourceIot
,
waterResourceIotDto
);
waterResourceDto
.
setWaterResourceIotDto
(
waterResourceIotDto
);
LambdaQueryWrapper
<
WaterResourceIndex
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
WaterResourceIndex:
:
getWaterId
,
waterResourceDto
.
getSequenceNbr
());
List
<
WaterResourceIndex
>
list
=
waterResourceIndexServiceImpl
.
list
(
queryWrapper
);
if
(
list
.
size
()>
0
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
list
.
stream
().
forEach
(
e
->{
map
.
put
(
e
.
getNameKey
(),
e
.
getPerfValue
());
});
waterResourceDto
.
setWaterResourceIotDto
(
map
);
}
return
waterResourceDto
;
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/AlertCalledController.java
View file @
722bf94a
...
...
@@ -343,6 +343,8 @@ public class AlertCalledController extends BaseController {
throw
new
RuntimeException
(
"系统异常"
);
}
});
queryWrapper
.
or
().
eq
(
"sequence_nbr"
,
alertCalled
.
getFatherAlert
());
return
queryWrapper
;
}
...
...
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 @
722bf94a
...
...
@@ -328,12 +328,13 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
ruleAlertCalledService
.
fireAlertCalledRule
(
alertCalledObjsDto
);
// 通知实战指挥页面发送mqtt 默认发送 String 类型 0, 新警情 1 警情状态变化
emqKeeper
.
getMqttClient
().
publish
(
topic
,
"0"
.
getBytes
(),
RuleConfig
.
DEFAULT_QOS
,
true
);
/**
* 同步保存ES
*/
eSAlertCalledService
.
saveAlertCalledToES
(
alertCalled
);
}
/**
* 同步保存ES
*/
eSAlertCalledService
.
saveAlertCalledToES
(
alertCalled
);
return
alertCalledObjsDto
;
}
catch
(
Exception
e
)
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/ESAlertCalledService.java
View file @
722bf94a
...
...
@@ -81,6 +81,7 @@ public class ESAlertCalledService {
Date
date
=
new
Date
(
currentTime
);
wrapper
.
ge
(
"call_time"
,
date
);
wrapper
.
isNull
(
"father_alert"
);
List
<
AlertCalled
>
alertCalleds
=
alertCalledService
.
list
(
wrapper
);
if
(!
ValidationUtil
.
isEmpty
(
alertCalleds
))
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/ExcelServiceImpl.java
View file @
722bf94a
...
...
@@ -15,32 +15,7 @@ import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import
com.yeejoin.amos.boot.biz.common.utils.QRCodeUtil
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.common.api.dto.CompanyPerson
;
import
com.yeejoin.amos.boot.module.common.api.dto.DutyCarDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.DutyFireFightingDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.DutyFirstAidDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.DutyPersonDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.DutyPersonShiftDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.DutyShiftDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.DynamicFormInitDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.DynamicFormInstanceDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.ExcelDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FireChemicalDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FireExpertsDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FireStationDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FireTeamDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FirefightersDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FirefightersExcelDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FirefightersInfoDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.KeySiteExcleDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.MaintenancePersonExcleDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.OrgUsrDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.OrgUsrExcelDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.OrgUsrFormDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.RescueEquipmentDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.SpecialPositionStaffDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.WaterResourceDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.*
;
import
com.yeejoin.amos.boot.module.common.api.entity.DynamicFormColumn
;
import
com.yeejoin.amos.boot.module.common.api.entity.DynamicFormInstance
;
import
com.yeejoin.amos.boot.module.common.api.entity.FireChemical
;
...
...
@@ -341,15 +316,27 @@ public class ExcelServiceImpl {
LinkageUnitDto
.
class
);
List
<
LinkageUnitDto
>
detaiList
=
resultDtoList
.
stream
().
map
(
item
->
{
Date
now
=
new
Date
();
if
(
item
.
getLongitude
()
!=
null
){
}
boolean
isInAgreement
=
DateUtils
.
belongCalendar
(
now
,
item
.
getAgreementStartDate
(),
item
.
getAgreementEndDate
());
item
.
setInAgreement
(
isInAgreement
?
"是"
:
"否"
);
return
item
;
}).
filter
(
item
->
org
.
apache
.
commons
.
lang3
.
StringUtils
.
isEmpty
(
inAgreement
)
||
inAgreement
.
equals
(
item
.
getInAgreement
()))
.
collect
(
Collectors
.
toList
());
ExcelUtil
.
createTemplate
(
response
,
excelDto
.
getFileName
(),
excelDto
.
getSheetName
(),
detaiList
,
LinkageUnitDto
.
class
,
null
,
false
);
/*经纬度导出精度会丢失 转换成string导出 2021-11-02 陈召 开始*/
List
<
LinkageUnitVo
>
result
=
new
ArrayList
<>();
detaiList
.
forEach
(
d
->{
LinkageUnitVo
linkageUnitVo
=
new
LinkageUnitVo
();
BeanUtils
.
copyProperties
(
d
,
linkageUnitVo
);
linkageUnitVo
.
setLatitude
(
d
.
getLatitude
()
!=
null
?
String
.
valueOf
(
d
.
getLatitude
()):
" "
);
linkageUnitVo
.
setLongitude
(
d
.
getLongitude
()
!=
null
?
String
.
valueOf
(
d
.
getLongitude
()):
" "
);
result
.
add
(
linkageUnitVo
);
});
/*经纬度导出精度会丢失 转换成string导出 2021-11-02 陈召 结束*/
ExcelUtil
.
createTemplate
(
response
,
excelDto
.
getFileName
(),
excelDto
.
getSheetName
(),
result
,
LinkageUnitVo
.
class
,
null
,
false
);
break
;
default
:
break
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-latentdanger-biz/src/main/java/com/yeejoin/amos/latentdanger/business/dto/DangerExecuteSubmitDto.java
View file @
722bf94a
...
...
@@ -18,4 +18,9 @@ public class DangerExecuteSubmitDto extends ExecuteSubmitDto {
private
Long
dangerId
;
private
LatentDangerExecuteTypeEnum
executeTypeEnum
;
/**
* 检查组长userId
*/
private
String
checkLeaderId
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-latentdanger-biz/src/main/java/com/yeejoin/amos/latentdanger/business/service/impl/LatentDangerServiceImpl.java
View file @
722bf94a
...
...
@@ -287,6 +287,7 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
latentDanger
.
setCurrentFlowRecordId
(
inputRecord
.
getId
());
latentDanger
.
setInstanceId
(
instance
.
getString
(
"id"
));
latentDangerMapper
.
updateById
(
latentDanger
);
asyncTask
.
sendDangerMsg
(
RequestContext
.
cloneRequestContext
(),
latentDanger
,
onSiteConfirmRole
);
}
// TODO 使用远程调用替换
...
...
@@ -1213,6 +1214,7 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
// 4、在执行完节点后需要将检查组长id设置为下个节点执行人
Object
resultObj
=
workflowExecuteService
.
setTaskAssign
(
latentDanger
.
getInstanceId
(),
checkLeaderId
);
executeSubmitDto
.
setCheckLeaderId
(
userModel
.
getUserId
());
if
(!(
Boolean
)
resultObj
)
{
executeSubmitDto
.
setIsOk
(
false
);
...
...
@@ -2057,7 +2059,6 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
latentDanger
.
setPhotoUrls
(
Joiner
.
on
(
","
).
join
(
latentDangerDto
.
getPhotoUrl
()));
}
this
.
updateById
(
latentDanger
);
DangerExecuteSubmitDto
executeSubmitDto
=
new
DangerExecuteSubmitDto
();
LatentDangerExecuteParam
executeParam
=
new
LatentDangerExecuteParam
();
if
(
ValidationUtil
.
isEmpty
(
executeType
)
||
...
...
@@ -2078,6 +2079,8 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
if
(!
executeSubmitDto
.
getIsOk
())
{
throw
new
Exception
(
executeSubmitDto
.
getMsg
());
}
List
<
String
>
userIds
=
workflowExecuteService
.
getUserIdsByWorkflow
(
latentDanger
.
getInstanceId
(),
executeSubmitDto
.
getCheckLeaderId
());
asyncTask
.
sendDangerSubmitMsg
(
RequestContext
.
cloneRequestContext
(),
latentDanger
,
userIds
,
ExecuteTypeEnum
.
getNameByCode
(
executeType
));
return
executeSubmitDto
;
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-latentdanger-biz/src/main/java/com/yeejoin/amos/latentdanger/core/async/AsyncTask.java
View file @
722bf94a
...
...
@@ -4,12 +4,18 @@ import com.alibaba.fastjson.JSONArray;
import
com.alibaba.fastjson.JSONObject
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Maps
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.RoleModel
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.MessageModel
;
import
com.yeejoin.amos.latentdanger.business.param.JPushTypeEnum
;
import
com.yeejoin.amos.latentdanger.business.param.PushMsgParam
;
import
com.yeejoin.amos.latentdanger.business.util.DateUtil
;
import
com.yeejoin.amos.latentdanger.business.util.Toke
;
import
com.yeejoin.amos.latentdanger.common.enums.LatentDangerState
;
import
com.yeejoin.amos.latentdanger.common.enums.MsgSubscribeEnum
;
import
com.yeejoin.amos.latentdanger.dao.entity.LatentDanger
;
import
com.yeejoin.amos.latentdanger.dao.entity.Msg
;
import
com.yeejoin.amos.latentdanger.feign.RemoteSecurityService
;
import
org.slf4j.Logger
;
...
...
@@ -17,12 +23,12 @@ import org.slf4j.LoggerFactory;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Component
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.context.RequestContextModel
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
java.util.Date
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
* 异步执行任务
...
...
@@ -33,6 +39,7 @@ import java.util.Set;
public
class
AsyncTask
{
private
static
final
String
TAB
=
"\r\n"
;
private
final
Logger
log
=
LoggerFactory
.
getLogger
(
AsyncTask
.
class
);
private
final
String
msgType
=
"danger"
;
// @Autowired
// private IMsgDao iMsgDao;
// @Autowired
...
...
@@ -146,4 +153,76 @@ public class AsyncTask {
// messageService.pushMsg(toke.getToke(), toke.getProduct(), toke.getAppKey(), pushMsgParam);
}
}
/**
* 提交隐患发送消息至检查组员被检查单位确认隐患
*/
@Async
public
void
sendDangerMsg
(
RequestContextModel
requestContextModel
,
LatentDanger
latentDanger
,
String
roleName
){
RequestContext
.
setToken
(
requestContextModel
.
getToken
());
RequestContext
.
setProduct
(
requestContextModel
.
getProduct
());
RequestContext
.
setAppKey
(
requestContextModel
.
getAppKey
());
MessageModel
model
=
new
MessageModel
();
String
body
=
String
.
format
(
"隐患名称:%s;隐患级别:%s;治理方式:%s;当前状态:%s;推送时间:%s"
,
latentDanger
.
getDangerName
(),
latentDanger
.
getDangerLevelName
(),
latentDanger
.
getReformTypeName
(),
latentDanger
.
getDangerStateName
(),
DateUtil
.
date2LongStr
(
new
Date
()));
model
.
setBody
(
body
);
getMessageModel
(
model
,
latentDanger
);
try
{
List
<
RoleModel
>
result
=
Privilege
.
roleClient
.
queryRoleList
(
roleName
,
null
).
getResult
();
if
(
result
.
size
()
>
0
)
{
List
<
AgencyUserModel
>
userModels
=
Privilege
.
agencyUserClient
.
queryByRoleId
(
String
.
valueOf
(
result
.
get
(
0
).
getSequenceNbr
()),
null
).
getResult
();
List
<
String
>
userIds
=
userModels
.
stream
().
map
(
AgencyUserModel:
:
getUserId
).
collect
(
Collectors
.
toList
());
model
.
setRecivers
(
userIds
);
}
Systemctl
.
messageClient
.
create
(
model
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
/**
* 确认隐患发送消息
*/
@Async
public
void
sendDangerSubmitMsg
(
RequestContextModel
requestContextModel
,
LatentDanger
latentDanger
,
List
<
String
>
userIds
,
String
executeName
){
RequestContext
.
setToken
(
requestContextModel
.
getToken
());
RequestContext
.
setProduct
(
requestContextModel
.
getProduct
());
RequestContext
.
setAppKey
(
requestContextModel
.
getAppKey
());
MessageModel
model
=
new
MessageModel
();
String
body
=
String
.
format
(
"隐患名称:%s;隐患级别:%s;治理方式:%s;当前状态:%s;审核结果:%s;推送时间:%s"
,
latentDanger
.
getDangerName
(),
latentDanger
.
getDangerLevelName
(),
latentDanger
.
getReformTypeName
(),
latentDanger
.
getDangerStateName
(),
executeName
,
DateUtil
.
date2LongStr
(
new
Date
()));
model
.
setBody
(
body
);
model
.
setIsSendWeb
(
true
);
model
.
setRecivers
(
userIds
);
getMessageModel
(
model
,
latentDanger
);
try
{
Systemctl
.
messageClient
.
create
(
model
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
private
MessageModel
getMessageModel
(
MessageModel
model
,
LatentDanger
latentDanger
)
{
String
type
=
null
;
latentDanger
.
getDangerState
();
LatentDangerState
.
SupervisionDangerStateEnum
stateEnum
=
LatentDangerState
.
SupervisionDangerStateEnum
.
getEnumByCode
(
latentDanger
.
getDangerState
());
if
(!
ValidationUtil
.
isEmpty
(
stateEnum
))
{
if
(
stateEnum
.
getProcessState
().
equals
(
"1"
))
{
type
=
"1"
;
}
else
if
(
stateEnum
.
getProcessState
().
equals
(
"4"
))
{
type
=
"2"
;
}
}
if
(!
ValidationUtil
.
isEmpty
(
type
)){
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"type"
,
type
);
model
.
setExtras
(
map
);
}
model
.
setTitle
(
latentDanger
.
getDangerName
());
model
.
setIsSendApp
(
true
);
model
.
setMsgType
(
msgType
);
model
.
setRelationId
(
String
.
valueOf
(
latentDanger
.
getId
()));
return
model
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/dao/mapper/InputItemMapper.java
View file @
722bf94a
...
...
@@ -30,7 +30,7 @@ public interface InputItemMapper extends BaseMapper {
public
List
<
InputItemVo
>
getInputItemListByitemNos
(
@Param
(
"itemNos"
)
String
[]
itemNos
);
public
List
<
PointInputItemVo
>
queryCustomInputItemByPointId
(
@Param
(
"
pointId"
)
Long
pointId
,
@Param
(
"equipmentId"
)
String
equipmentName
);
public
List
<
PointInputItemVo
>
queryCustomInputItemByPointId
(
@Param
(
"
classifyId"
)
String
classifyId
);
public
PointInputItemVo
getInputItemByEquipmentName
(
@Param
(
"equipmentName"
)
String
equipmentName
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/dao/repository/IPointClassifyDao.java
View file @
722bf94a
...
...
@@ -14,7 +14,7 @@ public interface IPointClassifyDao extends BaseDao<PointClassify, Long> {
@Modifying
@Transactional
@Query
(
value
=
"select * from p_point_classify where point_id = ?1"
,
nativeQuery
=
true
)
@Query
(
value
=
"select * from p_point_classify where point_id = ?1
and is_delete = 0
"
,
nativeQuery
=
true
)
List
<
PointClassify
>
getPointClassifyByPointId
(
long
id
);
@Modifying
...
...
@@ -27,5 +27,23 @@ public interface IPointClassifyDao extends BaseDao<PointClassify, Long> {
@Query
(
value
=
"delete from p_point_classify where point_id in (?1)"
,
nativeQuery
=
true
)
void
deleteByPointId
(
List
<
Long
>
pointIds
);
/**
* 根据原始id逻辑删除
* @param id 原始id
*/
@Modifying
@Transactional
@Query
(
value
=
"UPDATE p_point_classify SET is_delete = 1 WHERE original_id = (?1)"
,
nativeQuery
=
true
)
void
deleteByOriginalId
(
String
id
);
/**
* 根据原始id查询
* @param id 原始id
* @return List<PointClassify> 返回
*/
@Query
(
value
=
"select * from p_point_classify WHERE original_id = (?1) and is_delete =0"
,
nativeQuery
=
true
)
List
<
PointClassify
>
selectByOriginalId
(
String
id
);
PointClassify
findByOriginalId
(
String
originalId
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/dto/PointClassifySynDto.java
0 → 100644
View file @
722bf94a
package
com
.
yeejoin
.
amos
.
patrol
.
business
.
dto
;
import
lombok.Data
;
/**
* @author DELL
*/
@Data
public
class
PointClassifySynDto
{
/**
* 原始数据id
*/
private
String
originalId
;
/**
* 原始数据name
*/
private
String
name
;
/**
* 编号
*/
private
String
code
;
/**
* 分类
*/
private
String
categoryName
;
/**
* 分类code
*/
private
String
categoryCode
;
/**
* 位置
*/
private
String
address
;
/**
* 建筑id
*/
private
String
buildingId
;
/**
* 建筑名称
*/
private
String
buildingName
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/CheckServiceImpl.java
View file @
722bf94a
...
...
@@ -1134,32 +1134,32 @@ public class CheckServiceImpl implements ICheckService {
e
.
put
(
"photoData"
,
photoList
);
});
equip
.
put
(
"equipIputLsit"
,
inputContent
);
LinkedHashMap
<
String
,
Object
>
jsonObject
=
equipment
.
getEquipDetail
(
Long
.
parseLong
(
equip
.
get
(
"equipmentId"
).
toString
()));
LinkedHashMap
<
String
,
Object
>
result
=
(
LinkedHashMap
<
String
,
Object
>)
jsonObject
.
get
(
"result"
);
if
(
result
!=
null
){
if
(
result
.
get
(
"sourceName"
)!=
null
){
equip
.
put
(
"arec"
,
result
.
get
(
"sourceName"
).
toString
());
}
else
{
equip
.
put
(
"arec"
,
""
);
}
if
(
result
.
get
(
"categoryName"
)!=
null
){
equip
.
put
(
"equipType"
,
result
.
get
(
"categoryName"
).
toString
());
}
else
{
equip
.
put
(
"equipType"
,
""
);
}
if
(
result
.
get
(
"fullName"
)!=
null
){
if
(
result
.
get
(
"area"
)!=
null
){
equip
.
put
(
"area"
,
result
.
get
(
"fullName"
).
toString
()+
result
.
get
(
"area"
));
}
else
{
equip
.
put
(
"area"
,
result
.
get
(
"fullName"
).
toString
());
}
}
else
{
equip
.
put
(
"area"
,
""
);
}
equip
.
put
(
"place"
,
result
.
get
(
"warehouseStructureName"
));
}
//
LinkedHashMap<String,Object> jsonObject = equipment.getEquipDetail(Long.parseLong(equip.get("equipmentId").toString()));
//
LinkedHashMap<String,Object> result = (LinkedHashMap<String, Object>) jsonObject.get("result");
//
if(result!=null){
//
if(result.get("sourceName")!=null){
//
equip.put("arec",result.get("sourceName").toString());
//
}else{
//
equip.put("arec","");
//
}
//
if(result.get("categoryName")!=null){
//
equip.put("equipType",result.get("categoryName").toString());
//
}else{
//
equip.put("equipType","");
//
}
//
if(result.get("fullName")!=null){
//
if(result.get("area")!=null){
//
equip.put("area",result.get("fullName").toString()+result.get("area"));
//
}else {
//
equip.put("area",result.get("fullName").toString());
//
}
//
//
}else{
//
equip.put("area","");
//
}
//
//
equip.put("place", result.get("warehouseStructureName"));
//
}
});
return
equipList
;
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/PlanTaskServiceImpl.java
View file @
722bf94a
...
...
@@ -781,9 +781,10 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
userNames
.
clear
();
String
[]
userIds1
=
e
.
get
(
"userId"
).
toString
().
split
(
","
);
for
(
String
userId
:
userIds1
)
{
userNames
.
add
(
userModelMap
.
get
(
userId
));
if
(!
ObjectUtils
.
isEmpty
(
userModelMap
.
get
(
userId
)))
{
userNames
.
add
(
userModelMap
.
get
(
userId
));
}
}
userNames
.
remove
(
null
);
if
(
userNames
.
size
()
>
0
)
{
e
.
put
(
"executiveName"
,
Joiner
.
on
(
","
).
join
(
userNames
));
}
else
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/PointServiceImpl.java
View file @
722bf94a
package
com
.
yeejoin
.
amos
.
patrol
.
business
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.google.common.base.Joiner
;
...
...
@@ -11,6 +12,7 @@ import com.yeejoin.amos.patrol.business.dao.mapper.InputItemMapper;
import
com.yeejoin.amos.patrol.business.dao.mapper.PointMapper
;
import
com.yeejoin.amos.patrol.business.dao.mapper.RouteMapper
;
import
com.yeejoin.amos.patrol.business.dao.repository.*
;
import
com.yeejoin.amos.patrol.business.dto.PointClassifySynDto
;
import
com.yeejoin.amos.patrol.business.entity.mybatis.CheckPtListBo
;
import
com.yeejoin.amos.patrol.business.entity.mybatis.PushTargetBo
;
import
com.yeejoin.amos.patrol.business.feign.EquipFeign
;
...
...
@@ -29,10 +31,13 @@ import com.yeejoin.amos.patrol.exception.YeeException;
import
com.yeejoin.amos.patrol.feign.RemoteSecurityService
;
import
com.yeejoin.amos.safety.common.cache.PointStatusCache
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.poi.ss.formula.functions.T
;
import
org.assertj.core.util.Sets
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanWrapper
;
import
org.springframework.beans.BeanWrapperImpl
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.*
;
import
org.springframework.data.jpa.domain.Specification
;
...
...
@@ -46,12 +51,14 @@ import javax.persistence.criteria.CriteriaBuilder;
import
javax.persistence.criteria.CriteriaQuery
;
import
javax.persistence.criteria.Predicate
;
import
javax.persistence.criteria.Root
;
import
java.beans.PropertyDescriptor
;
import
java.math.BigInteger
;
import
java.util.*
;
import
java.util.stream.Collector
;
import
java.util.stream.Collectors
;
@Service
(
"pointService"
)
@Slf4j
public
class
PointServiceImpl
implements
IPointService
{
@Autowired
...
...
@@ -320,6 +327,15 @@ public class PointServiceImpl implements IPointService {
newPointClassify
.
setCreatorId
(
point
.
getCreatorId
());
newPointClassify
.
setPointId
(
pointId
);
newPointClassify
.
setOrderNo
(
pointClassify
.
getOrderNo
());
newPointClassify
.
setDataSourceCode
(
pointClassify
.
getDataSourceCode
());
newPointClassify
.
setDataSourceName
(
pointClassify
.
getDataSourceName
());
newPointClassify
.
setAddress
(
pointClassify
.
getAddress
());
newPointClassify
.
setBuildingId
(
pointClassify
.
getBuildingId
());
newPointClassify
.
setOriginalId
(
pointClassify
.
getOriginalId
());
newPointClassify
.
setCategoryCode
(
pointClassify
.
getCategoryCode
());
newPointClassify
.
setCategoryName
(
pointClassify
.
getCategoryName
());
newPointClassify
.
setCode
(
pointClassify
.
getCode
());
newPointClassify
.
setBuildingName
(
pointClassify
.
getBuildingName
());
if
(!
optionalPointClassify
.
isPresent
())
{
pointResult
=
iPointClassifyDao
.
saveAndFlush
(
newPointClassify
);
}
else
{
...
...
@@ -1502,8 +1518,8 @@ public class PointServiceImpl implements IPointService {
public
List
<
Map
<
String
,
Object
>>
queryEquipPointInputItem
(
Long
pointId
)
{
List
<
Map
<
String
,
Object
>>
content
=
pointMapper
.
queryEquipPointInputItem
(
pointId
);
content
.
forEach
(
e
->{
if
(
e
.
get
(
"
equipmentId"
)!=
null
&&
!
StringUtils
.
isBlank
(
e
.
get
(
"equipmentI
d"
).
toString
())){
List
<
PointInputItemVo
>
inputItems
=
inputItemMapper
.
queryCustomInputItemByPointId
(
pointId
,
e
.
get
(
"equipmentI
d"
).
toString
());
if
(
e
.
get
(
"
id"
)!=
null
&&
!
StringUtils
.
isBlank
(
e
.
get
(
"i
d"
).
toString
())){
List
<
PointInputItemVo
>
inputItems
=
inputItemMapper
.
queryCustomInputItemByPointId
(
e
.
get
(
"i
d"
).
toString
());
e
.
put
(
"equipIputDetailData"
,
inputItems
);
}
});
...
...
@@ -1628,4 +1644,52 @@ public class PointServiceImpl implements IPointService {
public
LinkedHashMap
<
String
,
Object
>
getRegionTress
()
{
return
equipFeign
.
getRegionTress
();
}
@Override
public
void
syncPointClassify
(
Map
<
String
,
Object
>
map
)
{
if
(
ObjectUtils
.
isEmpty
(
map
))
{
log
.
info
(
"消息内容为空!!!"
);
return
;
}
String
method
=
map
.
get
(
"method"
).
toString
();
PointClassifySynDto
pointClassifySynDto
=
JSON
.
parseObject
(
map
.
get
(
"data"
).
toString
(),
PointClassifySynDto
.
class
);
switch
(
method
)
{
case
"DELETE"
:
iPointClassifyDao
.
deleteByOriginalId
(
pointClassifySynDto
.
getOriginalId
());
break
;
case
"UPDATE"
:
List
<
PointClassify
>
pointClassifyList
=
iPointClassifyDao
.
selectByOriginalId
(
pointClassifySynDto
.
getOriginalId
());
if
(
ObjectUtils
.
isEmpty
(
pointClassifyList
))
{
log
.
info
(
"数据不存在!"
);
}
pointClassifyList
.
forEach
(
pointClassify
->
{
BeanUtils
.
copyProperties
(
pointClassifySynDto
,
pointClassify
,
getNullPropertyNames
(
pointClassifySynDto
));
iPointClassifyDao
.
saveAndFlush
(
pointClassify
);
});
break
;
default
:
log
.
info
(
"方法参数错误!!!"
);
break
;
}
}
/**
* 获取控制字段列表
* @param source 对象
* @return 为空数组
*/
private
static
String
[]
getNullPropertyNames
(
Object
source
)
{
final
BeanWrapper
src
=
new
BeanWrapperImpl
(
source
);
PropertyDescriptor
[]
pds
=
src
.
getPropertyDescriptors
();
Set
<
String
>
emptyNames
=
new
HashSet
<
String
>();
for
(
PropertyDescriptor
pd
:
pds
)
{
Object
srcValue
=
src
.
getPropertyValue
(
pd
.
getName
());
if
(
srcValue
==
null
)
{
emptyNames
.
add
(
pd
.
getName
());
}
}
String
[]
result
=
new
String
[
emptyNames
.
size
()];
return
emptyNames
.
toArray
(
result
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/intfc/IPointService.java
View file @
722bf94a
...
...
@@ -343,4 +343,7 @@ public interface IPointService {
List
queryItemList4RoutePoint
(
Long
pointId
,
Long
equipId
);
LinkedHashMap
<
String
,
Object
>
getRegionTress
();
void
syncPointClassify
(
Map
<
String
,
Object
>
map
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/vo/PointInputItemNewVo.java
View file @
722bf94a
...
...
@@ -65,6 +65,35 @@ public class PointInputItemNewVo{
* 序号
*/
private
Integer
orderNo
;
/**
* 数据源名称(冗余)
*/
private
String
dataSourceName
;
/**
* 数据源code(1 消防装备 2 重点部位 3 自定义)
*/
private
String
dataSourceCode
;
/**
* 编号
*/
private
String
code
;
/**
* 建筑id
*/
private
String
buildingId
;
/**
* 建筑name
*/
private
String
buildingName
;
/**
* 原始id
*/
private
String
originalId
;
private
List
<
PointInputItemVo
>
equipIputDetailData
=
new
ArrayList
<
PointInputItemVo
>();
...
...
@@ -178,4 +207,52 @@ public class PointInputItemNewVo{
public
void
setMaintenanceName
(
String
maintenanceName
)
{
this
.
maintenanceName
=
maintenanceName
;
}
public
String
getDataSourceName
()
{
return
dataSourceName
;
}
public
void
setDataSourceName
(
String
dataSourceName
)
{
this
.
dataSourceName
=
dataSourceName
;
}
public
String
getDataSourceCode
()
{
return
dataSourceCode
;
}
public
void
setDataSourceCode
(
String
dataSourceCode
)
{
this
.
dataSourceCode
=
dataSourceCode
;
}
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
String
getBuildingId
()
{
return
buildingId
;
}
public
void
setBuildingId
(
String
buildingId
)
{
this
.
buildingId
=
buildingId
;
}
public
String
getOriginalId
()
{
return
originalId
;
}
public
void
setOriginalId
(
String
originalId
)
{
this
.
originalId
=
originalId
;
}
public
String
getBuildingName
()
{
return
buildingName
;
}
public
void
setBuildingName
(
String
buildingName
)
{
this
.
buildingName
=
buildingName
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/mqtt/PatrolMqttListener.java
0 → 100644
View file @
722bf94a
package
com
.
yeejoin
.
amos
.
patrol
.
mqtt
;
import
com.alibaba.fastjson.JSON
;
import
com.yeejoin.amos.patrol.business.service.intfc.IPointService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.eclipse.paho.client.mqttv3.MqttMessage
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Component
;
import
org.typroject.tyboot.component.emq.EmqxListener
;
import
java.util.Map
;
/**
* @author DELL
*/
@Component
@Slf4j
public
class
PatrolMqttListener
extends
EmqxListener
{
@Value
(
"${patrol.point.classify.topic}"
)
private
String
pointClassifyTopic
;
@Autowired
private
IPointService
iPointService
;
@Override
public
void
processMessage
(
String
topic
,
MqttMessage
message
)
{
if
(
log
.
isInfoEnabled
()){
log
.
info
(
"收到消息主题:{},消息内容:{}"
,
topic
,
message
.
toString
());
}
try
{
Map
<
String
,
Object
>
msg
=
JSON
.
parseObject
(
message
.
toString
());
if
(
pointClassifyTopic
.
equals
(
topic
))
{
iPointService
.
syncPointClassify
(
msg
);
}
log
.
info
(
"巡检对象同步完成"
);
}
catch
(
Exception
e
)
{
log
.
info
(
"巡检对象同步失败:{}"
,
e
.
getMessage
());
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/impl/CheckServiceImpl.java
View file @
722bf94a
package
com
.
yeejoin
.
amos
.
supervision
.
business
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.google.common.base.Joiner
;
...
...
@@ -29,6 +30,7 @@ import com.yeejoin.amos.supervision.business.vo.CheckAnalysisVo;
import
com.yeejoin.amos.supervision.business.vo.CheckInfoVo
;
import
com.yeejoin.amos.supervision.business.vo.CheckVo
;
import
com.yeejoin.amos.supervision.common.enums.*
;
import
com.yeejoin.amos.supervision.core.async.AsyncTask
;
import
com.yeejoin.amos.supervision.core.common.dto.DangerDto
;
import
com.yeejoin.amos.supervision.core.common.request.CommonPageable
;
import
com.yeejoin.amos.supervision.core.common.response.*
;
...
...
@@ -47,7 +49,9 @@ import org.springframework.data.domain.Page;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
javax.annotation.Resource
;
import
javax.transaction.Transactional
;
...
...
@@ -97,6 +101,12 @@ public class CheckServiceImpl implements ICheckService {
IPlanTaskService
planTaskService
;
@Autowired
private
IPlanService
planService
;
@Autowired
private
AsyncTask
asyncTask
;
@Autowired
DangerFeignClient
DangerFeignClient
;
@Autowired
...
...
@@ -1414,7 +1424,6 @@ public class CheckServiceImpl implements ICheckService {
if
(!
depName
.
contains
(
personIdentity
.
getCompanyName
()))
{
check
.
setDepName
(
depName
+
","
+
personIdentity
.
getCompanyName
());
}
}
List
<
CheckInputParam
>
list
=
recordParam
.
getCheckItems
();
...
...
@@ -1560,6 +1569,12 @@ public class CheckServiceImpl implements ICheckService {
planTaskDetailMapper
.
finishTaskDetail
(
Long
.
parseLong
(
detail
.
get
(
"planTaskDetailId"
).
toString
()),
recordParam
.
getPointId
(),
recordParam
.
getPlanTaskId
(),
mtUserSeq
,
userName
,
size
,
planTaskStatus
);
Plan
plan
=
planService
.
queryPlanById
(
planTask
.
getPlanId
());
// 计划完成,发送消息
if
(
PlanStatusEnum
.
COMPLETED
.
getValue
()
==
plan
.
getStatus
()){
asyncTask
.
sendPlanMsgToLeadPeople
(
RequestContext
.
cloneRequestContext
(),
plan
);
}
// p_plan_task_detail更新隐患个数
planTaskDetailMapper
.
updateDanger
(
Long
.
parseLong
(
detail
.
get
(
"planTaskDetailId"
).
toString
()));
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/core/async/AsyncTask.java
View file @
722bf94a
...
...
@@ -318,7 +318,7 @@ public class AsyncTask {
public
void
sendAddPlanMsg
(
RequestContextModel
requestContextModel
,
Plan
plan
,
List
<
String
>
userIds
,
boolean
isSendWeb
,
boolean
isSendApp
){
MessageModel
model
=
new
MessageModel
();
model
.
setTitle
(
plan
.
getName
());
String
body
=
String
.
format
(
"计划名称:%s;检查类型:%s;
创建
时间:%s"
,
String
body
=
String
.
format
(
"计划名称:%s;检查类型:%s;
推送
时间:%s"
,
plan
.
getName
(),
plan
.
getCheckTypeName
(),
DateUtil
.
date2LongStr
(
new
Date
()));
model
.
setBody
(
body
);
try
{
...
...
@@ -327,7 +327,7 @@ public class AsyncTask {
model
.
setMsgType
(
msgType
);
model
.
setRelationId
(
String
.
valueOf
(
plan
.
getId
()));
model
.
setRecivers
(
userIds
);
//
remoteSecurityService.addMessage(requestContextModel, model);
remoteSecurityService
.
addMessage
(
requestContextModel
,
model
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
...
...
@@ -341,7 +341,7 @@ public class AsyncTask {
public
void
sendPlanMsgToLeadPeople
(
RequestContextModel
requestContextModel
,
Plan
plan
){
MessageModel
model
=
new
MessageModel
();
model
.
setTitle
(
plan
.
getName
());
String
body
=
String
.
format
(
"计划名称:%s;检查类型:%s;
创建
时间:%s"
,
String
body
=
String
.
format
(
"计划名称:%s;检查类型:%s;
推送
时间:%s"
,
plan
.
getName
(),
plan
.
getCheckTypeName
(),
DateUtil
.
date2LongStr
(
new
Date
()));
model
.
setBody
(
body
);
String
leadPeopleIds
=
plan
.
getLeadPeopleIds
();
...
...
@@ -355,7 +355,7 @@ public class AsyncTask {
model
.
setMsgType
(
msgType
);
model
.
setRelationId
(
String
.
valueOf
(
plan
.
getId
()));
model
.
setRecivers
(
recivers
);
//
remoteSecurityService.addMessage(requestContextModel, model);
remoteSecurityService
.
addMessage
(
requestContextModel
,
model
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
...
...
@@ -369,7 +369,7 @@ public class AsyncTask {
public
void
sendPlanMsg
(
RequestContextModel
requestContextModel
,
Plan
plan
){
MessageModel
model
=
new
MessageModel
();
model
.
setTitle
(
plan
.
getName
());
String
body
=
String
.
format
(
"计划名称:%s;检查类型:%s;
创建
时间:%s"
,
String
body
=
String
.
format
(
"计划名称:%s;检查类型:%s;
推送
时间:%s"
,
plan
.
getName
(),
plan
.
getCheckTypeName
(),
DateUtil
.
date2LongStr
(
new
Date
()));
model
.
setBody
(
body
);
String
leadPeopleIds
=
plan
.
getLeadPeopleIds
();
...
...
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 @
722bf94a
...
...
@@ -35,6 +35,7 @@ import com.yeejoin.amos.boot.module.tzs.api.entity.WechatRelation;
import
com.yeejoin.amos.boot.module.tzs.api.enums.AlertStageEnums
;
import
com.yeejoin.amos.boot.module.tzs.api.service.IMaintenanceUnitService
;
import
com.yeejoin.amos.boot.module.tzs.api.service.IUseUnitService
;
import
com.yeejoin.amos.boot.module.tzs.api.service.TzsAuthService
;
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
;
...
...
@@ -44,6 +45,7 @@ import com.yeejoin.amos.boot.module.tzs.biz.service.impl.TemplateExportServiceIm
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.WechatRelationServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.biz.utils.AlertBeanDtoVoUtils
;
import
com.yeejoin.amos.boot.module.tzs.biz.utils.BeanDtoVoUtils
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -71,6 +73,8 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.UnsupportedEncodingException
;
import
java.text.ParseException
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
...
...
@@ -125,6 +129,10 @@ public class AlertCalledController extends BaseController {
@Value
(
"${mqtt.topic.alertInfo.push}"
)
private
String
alertInfopushTopic
;
@Autowired
TzsAuthService
tzsAuthService
;
/**
* 新增警情接警填报记录
*
...
...
@@ -172,8 +180,7 @@ public class AlertCalledController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/saveMobile"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增警情接警填报记录"
,
notes
=
"新增警情接警填报记录"
)
public
ResponseModel
<
AlertCalledDto
>
saveMobile
(
@RequestBody
AlertCalledDto
alertCalledDto
)
{
public
ResponseModel
<
AlertCalledDto
>
saveMobile
(
@RequestBody
AlertCalledDto
alertCalledDto
)
{
if
(
ValidationUtil
.
isEmpty
(
alertCalledDto
))
{
throw
new
BadRequest
(
"参数校验失败."
);
}
...
...
@@ -207,6 +214,7 @@ public class AlertCalledController extends BaseController {
alertCalledDto
.
setEquipmentClassification
(
"电梯"
);
alertCalledDto
.
setEquipmentClassificationCode
(
"3000"
);
alertCalledDto
.
setCity
(
elevator
.
getCity
());
alertCalledDto
.
setRegionCode
(
elevator
.
getRegionCode
());
alertCalledDto
.
setDistrict
(
elevator
.
getDistrict
());
AlertCalledDto
alertCalledDtoReturn
=
iAlertCalledService
.
createAlertCalled
(
alertCalledDto
);
return
ResponseHelper
.
buildResponse
(
alertCalledDtoReturn
);
...
...
@@ -661,5 +669,35 @@ public class AlertCalledController extends BaseController {
}
/**
* 根据regionCode 获取区域内实时警情
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/getActualAlert"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"根据regionCode 获取区域内实时警情"
,
notes
=
"根据regionCode 获取区域内实时警情"
)
public
ResponseModel
<
List
<
AlertPaperInfoDto
>>
getActualAlert
(
@RequestParam
(
name
=
"regionCodes"
,
required
=
false
)
List
<
String
>
regionCodes
)
{
// 警情id 警情地址 警情状态 警情类型 警情发生时间
if
(
regionCodes
==
null
)
{
regionCodes
=
tzsAuthService
.
getUserRegionCode
();
}
return
ResponseHelper
.
buildResponse
(
iAlertCalledService
.
getAlertPaperInfoList
(
regionCodes
,
false
));
}
/**
* 根据regionCode 获取区域内历史警情 七日内
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/getHistoryAlert"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"根据regionCode 获取区域内七日内历史警情"
,
notes
=
"根据regionCode 获取区域内七日内历史警情"
)
public
ResponseModel
<
List
<
AlertPaperInfoDto
>>
getHistoryAlert
(
@RequestParam
(
name
=
"regionCodes"
,
required
=
false
)
List
<
String
>
regionCodes
)
{
// 警情id 警情地址 警情状态 警情类型 警情发生时间
if
(
regionCodes
==
null
)
{
regionCodes
=
tzsAuthService
.
getUserRegionCode
();
}
return
ResponseHelper
.
buildResponse
(
iAlertCalledService
.
getAlertPaperInfoList
(
regionCodes
,
true
));
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/TzsAuthController.java
0 → 100644
View file @
722bf94a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
controller
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.tzs.api.service.TzsAuthService
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* 特种设备权限controller
*/
@RestController
@Api
(
tags
=
"特种设备权限Api"
)
@RequestMapping
(
value
=
"/tzs-auth-api"
)
public
class
TzsAuthController
extends
BaseController
{
@Autowired
TzsAuthService
tzsAuthService
;
/**
* 判断用户是否是管理员
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/isUserAdmin"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"判断用户是否是管理员"
,
notes
=
"判断用户是否是管理员"
)
public
ResponseModel
<
Boolean
>
isUserAdmin
()
{
Boolean
flag
=
false
;
AgencyUserModel
me
=
Privilege
.
agencyUserClient
.
getme
().
getResult
();
if
(
me
.
getUserName
().
equals
(
"tzs_wjl"
))
{
flag
=
true
;
}
return
ResponseHelper
.
buildResponse
(
flag
);
}
/**
* 获取用户regionCode
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getUserRegincode"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取用户regionCode"
,
notes
=
"获取用户regionCode"
)
public
ResponseModel
<
List
<
String
>>
getHistoryAlert
()
{
List
<
String
>
regionList
=
new
ArrayList
<>();
AgencyUserModel
me
=
Privilege
.
agencyUserClient
.
getme
().
getResult
();
regionList
.
add
(
"610100"
);
regionList
.
add
(
"610300"
);
return
ResponseHelper
.
buildResponse
(
regionList
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/VoiceRecordFileController.java
View file @
722bf94a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
controller
;
import
com.alibaba.fastjson.JSONArray
;
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.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.RedisKey
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledFormDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledQueryDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.VoiceRecordFileDto
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.AlertCalled
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.VoiceRecordFile
;
import
com.yeejoin.amos.boot.module.tzs.api.service.ICtiService
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.AlertCalledServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.VoiceRecordFileServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.biz.utils.AlertBeanDtoVoUtils
;
import
com.yeejoin.amos.boot.module.tzs.biz.utils.BeanDtoVoUtils
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Async
;
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.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
...
...
@@ -29,13 +36,9 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.UUID
;
/**
...
...
@@ -104,9 +107,6 @@ public class VoiceRecordFileController extends BaseController {
VoiceRecordFileDto
target
=
new
VoiceRecordFileDto
();
// 把原对象数据拷贝到新对象
BeanUtils
.
copyProperties
(
voiceRecord
,
target
);
if
(
voiceRecord
.
getTelStartTime
()
!=
null
&&
voiceRecord
.
getTelEndTime
()
!=
null
)
{
target
.
setTelTime
(
DateUtils
.
getTimestr
(
voiceRecord
.
getTelEndTime
(),
voiceRecord
.
getTelStartTime
()));
}
dtoList
.
add
(
target
);
});
return
ResponseHelper
.
buildResponse
(
dtoList
);
...
...
@@ -132,4 +132,38 @@ public class VoiceRecordFileController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询通话记录"
,
notes
=
"查询通话记录"
)
@GetMapping
(
"/selectRecord"
)
public
ResponseModel
<
Page
<
VoiceRecordFileDto
>>
queryVoiceCodeByPager
(
VoiceRecordFileDto
model
,
@RequestParam
(
value
=
"pageNum"
)
int
pageNum
,
@RequestParam
(
value
=
"pageSize"
)
int
pageSize
,
String
sort
)
{
Page
<
VoiceRecordFileDto
>
page
=
new
Page
<
VoiceRecordFileDto
>();
page
.
setCurrent
(
pageNum
);
page
.
setSize
(
pageSize
);
String
sortParam
=
""
;
String
sortRule
=
""
;
if
(
sort
!=
null
)
{
// 排序失效
String
[]
date
=
sort
.
split
(
","
);
if
(
date
[
1
].
equals
(
"ascend"
))
{
sortParam
=
RedisKey
.
humpToLine
(
date
[
0
]);
sortRule
=
"asc"
;
}
else
{
sortParam
=
RedisKey
.
humpToLine
(
date
[
0
]);
sortRule
=
"desc"
;
}
}
else
{
sortParam
=
"call_time"
;
sortRule
=
"desc"
;
}
Page
<
VoiceRecordFileDto
>
pageBean
=
voiceRecordFileServiceImpl
.
queryRecordListByQueryDto
(
page
,
model
.
getTelStartTimeStr
(),
model
.
getTelEndTimeStr
(),
model
.
getFileType
(),
model
.
getTel
(),
model
.
getWorkNum
(),
sortParam
,
sortRule
);
Page
<
VoiceRecordFileDto
>
result
=
new
Page
<
VoiceRecordFileDto
>(
pageNum
,
pageSize
);
long
totle
=
pageBean
.
getTotal
();
result
.
setRecords
(
pageBean
.
getRecords
());
result
.
setTotal
(
totle
);
return
ResponseHelper
.
buildResponse
(
result
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/AlertCalledServiceImpl.java
View file @
722bf94a
...
...
@@ -486,6 +486,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
alertCalled
.
setEquipmentId
(
elevator
.
getSequenceNbr
());
alertCalled
.
setCity
(
elevator
.
getCity
());
alertCalled
.
setDistrict
(
elevator
.
getDistrict
());
alertCalled
.
setRegionCode
(
elevator
.
getRegionCode
());
this
.
save
(
alertCalled
);
// 动态表单
...
...
@@ -670,4 +671,15 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
// }
// }
}
public
List
<
AlertPaperInfoDto
>
getAlertPaperInfoList
(
List
<
String
>
regionCodes
,
Boolean
isHistory
)
{
List
<
AlertPaperInfoDto
>
temp
=
baseMapper
.
getAlertPaperInfoList
(
regionCodes
,
isHistory
);
temp
.
stream
().
forEach
(
t
->
{
DispatchPaper
paper
=
dispatchPaperService
.
getOne
(
new
LambdaQueryWrapper
<
DispatchPaper
>().
eq
(
DispatchPaper:
:
getIsDelete
,
false
).
eq
(
DispatchPaper:
:
getAlertId
,
t
.
getAlertId
()));
if
(
paper
!=
null
)
{
t
.
setFinishTime
(
paper
.
getFeedbackFinishTime
());
}
});
return
temp
;
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/CtiServiceImpl.java
View file @
722bf94a
...
...
@@ -7,6 +7,8 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import
com.yeejoin.amos.boot.module.tzs.api.service.ICtiService
;
import
com.yeejoin.amos.boot.module.tzs.biz.utils.HttpUtils
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
...
...
@@ -85,6 +87,7 @@ public class CtiServiceImpl implements ICtiService {
String
token
=
this
.
getAccessToken
();
// gid code extphone 目前写死 后面根据用户获取
String
gid
=
"61,默认,0"
;
AgencyUserModel
me
=
Privilege
.
agencyUserClient
.
getme
().
getResult
();
String
code
=
"1001"
;
String
extphone
=
"10001001"
;
String
loginUrl
=
ctiUrl
+
"/cti/login"
+
"?accessToken="
+
token
;
...
...
@@ -133,7 +136,7 @@ public class CtiServiceImpl implements ICtiService {
JSONArray
loginData
=
response
.
getJSONArray
(
"data"
);
return
loginData
;
}
catch
(
Exception
e
)
{
throw
new
BadRequest
(
"获取
loginData 出错:
"
+
e
.
getMessage
());
throw
new
BadRequest
(
"获取
话单出错:
"
+
e
.
getMessage
());
}
}
else
{
//登陆失败
throw
new
BadRequest
(
"获取话单出错:"
+
response
.
getString
(
"msg"
));
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/RepairConsultServiceImpl.java
View file @
722bf94a
...
...
@@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto
;
import
com.yeejoin.amos.boot.module.common.api.service.ISourceFileService
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledFormDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.DispatchPaperFormDto
;
...
...
@@ -79,6 +81,10 @@ public class RepairConsultServiceImpl extends BaseService<RepairConsultDto,Repai
@Value
(
"${mqtt.topic.alertMatrix.push}"
)
private
String
alertMatrixpushTopic
;
@Autowired
ISourceFileService
sourceFileService
;
/**
* 记录处置日志同时修改案件的状态
* @param alertId
...
...
@@ -109,6 +115,7 @@ public class RepairConsultServiceImpl extends BaseService<RepairConsultDto,Repai
String
content
=
template
.
getContent
();
String
createTime
=
DateUtils
.
getDateNowString
();
DispatchPaperEnums
CZHJ
=
null
;
StringBuffer
attach
=
new
StringBuffer
();
// 公众号生成接警记录
if
(
AlertStageEnums
.
JJ
.
getCode
().
equals
(
type
))
{
// 接警的处置环节为已接警
...
...
@@ -142,6 +149,15 @@ public class RepairConsultServiceImpl extends BaseService<RepairConsultDto,Repai
throw
new
BadRequest
(
"警情类型缺失"
);
content
=
content
.
replace
(
"$createTime"
,
createTime
).
replace
(
"$call"
,
emergency_call
);
content
=
content
.
replace
(
"$area"
,
area
).
replace
(
"$alertType"
,
alertType
);
// 小程序接警 记录添加图片附件 bykongfm 2021-11-02 task-4217
Map
<
String
,
List
<
AttachmentDto
>>
imgMap
=
sourceFileService
.
getAttachments
(
alertId
);
List
<
AttachmentDto
>
mapList
=
imgMap
.
get
(
"imgs"
);
if
(
mapList
!=
null
&&
mapList
.
size
()
>
0
)
{
mapList
.
stream
().
forEach
(
m
->
{
attach
.
append
(
","
);
attach
.
append
(
m
.
getUrl
());
});
}
}
else
if
(
TzsCommonParam
.
PQ
.
equals
(
type
))
{
// 派遣的处置环节为已派遣
CZHJ
=
DispatchPaperEnums
.
dispatched
;
...
...
@@ -216,6 +232,15 @@ public class RepairConsultServiceImpl extends BaseService<RepairConsultDto,Repai
// 反馈方式从动态表单中取得
String
FKFS
=
tempMap
.
get
(
"FKFS"
)
==
null
?
""
:
tempMap
.
get
(
"FKFS"
);
content
=
content
.
replace
(
"$FKFS"
,
FKFS
).
replace
(
"$fixResult"
,
tempMap
.
get
(
"fixResult"
));
// 小程序维修反馈 记录添加图片附件 bykongfm 2021-11-02 task-4217
Map
<
String
,
List
<
AttachmentDto
>>
imgMap
=
sourceFileService
.
getAttachments
(
dispatchTask
.
getPaperId
());
List
<
AttachmentDto
>
mapList
=
imgMap
.
get
(
"imgs"
);
if
(
mapList
!=
null
&&
mapList
.
size
()
>
0
)
{
mapList
.
stream
().
forEach
(
m
->
{
attach
.
append
(
","
);
attach
.
append
(
m
.
getUrl
());
});
}
}
else
if
(
TzsCommonParam
.
WXFK_TS
.
equals
(
type
))
{
//从派遣单获取数据
//投诉的维修反馈修改成维保已处置
CZHJ
=
DispatchPaperEnums
.
disposed
;
...
...
@@ -235,6 +260,15 @@ public class RepairConsultServiceImpl extends BaseService<RepairConsultDto,Repai
});
content
=
content
.
replace
(
"$FKFS"
,
tempMap
.
get
(
TzsCommonParam
.
FKFS
)).
replace
(
"$fixResult"
,
tempMap
.
get
(
"fixResult"
));
type
=
TzsCommonParam
.
WXFK
;
// 小程序维修反馈 记录添加图片附件 bykongfm 2021-11-02 task-4217
Map
<
String
,
List
<
AttachmentDto
>>
imgMap
=
sourceFileService
.
getAttachments
(
dispatchTask
.
getPaperId
());
List
<
AttachmentDto
>
mapList
=
imgMap
.
get
(
"imgs"
);
if
(
mapList
!=
null
&&
mapList
.
size
()
>
0
)
{
mapList
.
stream
().
forEach
(
m
->
{
attach
.
append
(
","
);
attach
.
append
(
m
.
getUrl
());
});
}
}
else
if
(
TzsCommonParam
.
BXFK
.
equals
(
type
))
{
//报修反馈
CZHJ
=
DispatchPaperEnums
.
reportorBack
;
...
...
@@ -249,6 +283,15 @@ public class RepairConsultServiceImpl extends BaseService<RepairConsultDto,Repai
}
});
content
=
content
.
replace
(
"$FKFS"
,
dispatchPaperFormDto
.
getDispatchPaper
().
getFeedbackType
()).
replace
(
"$feedbackResult"
,
tempMap
.
get
(
"feedbackResult"
));
// 小程序报修人反馈 记录添加图片附件 bykongfm 2021-11-02 task-4217
Map
<
String
,
List
<
AttachmentDto
>>
imgMap
=
sourceFileService
.
getAttachments
(
alertId
);
List
<
AttachmentDto
>
mapList
=
imgMap
.
get
(
"feedbacks"
);
if
(
mapList
!=
null
&&
mapList
.
size
()
>
0
)
{
mapList
.
stream
().
forEach
(
m
->
{
attach
.
append
(
","
);
attach
.
append
(
m
.
getUrl
());
});
}
}
else
if
(
TzsCommonParam
.
TSRFK
.
equals
(
type
))
{
//投诉人已反馈
CZHJ
=
DispatchPaperEnums
.
complainantBack
;
...
...
@@ -263,12 +306,25 @@ public class RepairConsultServiceImpl extends BaseService<RepairConsultDto,Repai
}
});
content
=
content
.
replace
(
"$FKFS"
,
dispatchPaperFormDto
.
getDispatchPaper
().
getFeedbackType
()).
replace
(
"$feedbackResult"
,
tempMap
.
get
(
"feedbackResult"
));
// 小程序投诉人反馈记录添加图片附件 bykongfm 2021-11-02 task-4217
Map
<
String
,
List
<
AttachmentDto
>>
imgMap
=
sourceFileService
.
getAttachments
(
alertId
);
List
<
AttachmentDto
>
mapList
=
imgMap
.
get
(
"feedbacks"
);
if
(
mapList
!=
null
&&
mapList
.
size
()
>
0
)
{
mapList
.
stream
().
forEach
(
m
->
{
attach
.
append
(
","
);
attach
.
append
(
m
.
getUrl
());
});
}
}
AlertStageEnums
RZHJ
=
AlertStageEnums
.
getEnumByCode
(
type
);
repairConsult
.
setType
(
RZHJ
.
getCode
());
repairConsult
.
setAlertStageCode
(
RZHJ
.
getId
());
repairConsult
.
setAlertStatus
(
RZHJ
.
getValue
());
repairConsult
.
setDescription
(
content
);
if
(
attach
.
length
()
>
0
)
{
String
attachment
=
attach
.
toString
().
substring
(
1
);
repairConsult
.
setAttachment
(
attachment
);
}
flag
=
this
.
save
(
repairConsult
);
if
(
flag
)
{
// 记录处置记录后修改 案件状态
...
...
@@ -296,7 +352,4 @@ public class RepairConsultServiceImpl extends BaseService<RepairConsultDto,Repai
return
flag
;
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/TzsAuthServiceImpl.java
0 → 100644
View file @
722bf94a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.google.common.collect.Maps
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto
;
import
com.yeejoin.amos.boot.module.common.api.service.ISourceFileService
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledFormDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledObjsDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledQueryDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledRecordDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertHandlerDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertHandlerInfoDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertPaperInfoDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.DutySeatDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.FormValue
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.WechatMyBusinessListDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.WechatMyBussinessDto
;
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.entity.DispatchTask
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.Elevator
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.VoiceRecordFile
;
import
com.yeejoin.amos.boot.module.tzs.api.enums.AlertStageEnums
;
import
com.yeejoin.amos.boot.module.tzs.api.enums.DispatchPaperEnums
;
import
com.yeejoin.amos.boot.module.tzs.api.enums.TzsCommonParam
;
import
com.yeejoin.amos.boot.module.tzs.api.mapper.AlertCalledMapper
;
import
com.yeejoin.amos.boot.module.tzs.api.service.IAlertCalledService
;
import
com.yeejoin.amos.boot.module.tzs.api.service.TzsAuthService
;
import
com.yeejoin.amos.boot.module.tzs.biz.utils.BeanDtoVoUtils
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
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.util.ArrayList
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
* 特种设备权限服务实现类
*/
@Service
public
class
TzsAuthServiceImpl
implements
TzsAuthService
{
@Override
public
List
<
String
>
getUserRegionCode
()
{
List
<
String
>
regionList
=
new
ArrayList
<>();
AgencyUserModel
me
=
Privilege
.
agencyUserClient
.
getme
().
getResult
();
regionList
.
add
(
"610100"
);
return
regionList
;
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/VoiceRecordFileServiceImpl.java
View file @
722bf94a
...
...
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.yeejoin.amos.boot.biz.common.feign.AmosFeignService
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledFormDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledQueryDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.VoiceRecordFileDto
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.VoiceRecordFile
;
import
com.yeejoin.amos.boot.module.tzs.api.mapper.VoiceRecordFileMapper
;
...
...
@@ -92,6 +93,8 @@ public class VoiceRecordFileServiceImpl extends BaseService<VoiceRecordFileDto,V
}
catch
(
Exception
e
)
{
logger
.
error
(
"日期转换错误"
);
}
int
times
=
recordInfo
.
getIntValue
(
"times"
);
model
.
setTelTime
(
DateUtils
.
secondsToTimeStr
(
times
));
model
.
setTelStartTime
(
telStartTime
);
model
.
setTelEndTime
(
telEndTime
);
if
(
1
==
recordInfo
.
getInteger
(
"callType"
))
{
...
...
@@ -128,4 +131,18 @@ public class VoiceRecordFileServiceImpl extends BaseService<VoiceRecordFileDto,V
}
@Override
public
Page
<
VoiceRecordFileDto
>
queryRecordListByQueryDto
(
Page
<
VoiceRecordFileDto
>
page
,
String
telStartTimeStr
,
String
telEndTimeStr
,
String
fileType
,
String
tel
,
String
workNum
,
String
sortParam
,
String
sortRule
)
{
Page
<
List
<
VoiceRecordFileDto
>>
list
=
baseMapper
.
queryRecordListByQueryDto
(
page
,
telStartTimeStr
,
telEndTimeStr
,
fileType
,
tel
,
workNum
,
sortParam
,
sortRule
);
Page
<
VoiceRecordFileDto
>
page1
=
new
Page
<>();
List
<
VoiceRecordFileDto
>
resultDtoList
=
JSONArray
.
parseArray
(
JSONArray
.
toJSONString
(
list
.
getRecords
()),
VoiceRecordFileDto
.
class
);
page1
.
setCurrent
(
page
.
getCurrent
());
page1
.
setSize
(
page
.
getSize
());
page1
.
setTotal
(
list
.
getTotal
());
page1
.
setRecords
(
resultDtoList
);
return
page1
;
}
}
\ No newline at end of file
amos-boot-system-jcs/src/main/resources/db/changelog/jcs-1.0.0.0.xml
View file @
722bf94a
...
...
@@ -2070,6 +2070,29 @@
</sql>
</changeSet>
<changeSet
author=
"litw"
id=
"2021-11-03-01"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<tableExists
tableName=
"cb_water_resource_index"
/>
</not>
</preConditions>
<comment>
create table cb_water_resource_index
</comment>
<sql>
CREATE TABLE `cb_water_resource_index` (
`sequence_nbr` bigint(20) NOT NULL,
`equipment_id` bigint(20) NULL COMMENT '指标拥有者ID:关联装备定义ID',
`water_id` bigint(20) NOT NULL COMMENT '消防水源id',
`name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '名称',
`name_key` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT null,
`perf_value` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '指标值',
`rec_user_id` bigint(20) NOT NULL COMMENT '更新人id',
`rec_user_name` varchar(30) NOT NULL COMMENT '更新人名称',
`rec_date` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`is_delete` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除(0:未删除,1:已删除)',
PRIMARY KEY (`sequence_nbr`) USING BTREE
) COMMENT = '消防水源物联参数' ;
</sql>
</changeSet>
</databaseChangeLog>
amos-boot-system-patrol/src/main/java/com/yeejoin/amos/PatrolApplication.java
View file @
722bf94a
package
com
.
yeejoin
.
amos
;
import
com.yeejoin.amos.patrol.mqtt.PatrolMqttListener
;
import
org.eclipse.paho.client.mqttv3.MqttException
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
...
...
@@ -20,6 +24,7 @@ import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
import
org.springframework.web.client.RestTemplate
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
import
org.typroject.tyboot.core.restful.config.JsonSerializerManage
;
import
org.typroject.tyboot.core.restful.exception.GlobalExceptionHandler
;
...
...
@@ -59,6 +64,15 @@ public class PatrolApplication {
return
new
RestTemplate
();
}
@Autowired
private
PatrolMqttListener
patrolMqttListener
;
@Autowired
private
EmqKeeper
emqKeeper
;
@Value
(
"${patrol.topic}"
)
private
String
patrolTopic
;
/**
* 启动amosop-server
*
...
...
@@ -81,4 +95,18 @@ public class PatrolApplication {
"----------------------------------------------------------"
);
}
/**
* 初始化MQTT
* @throws MqttException
*/
@Bean
void
initMqtt
()
{
try
{
emqKeeper
.
getMqttClient
().
subscribe
(
patrolTopic
,
1
,
patrolMqttListener
);
}
catch
(
MqttException
e
)
{
e
.
printStackTrace
();
logger
.
error
(
"EMQ初始化连接失败!"
);
}
}
}
\ No newline at end of file
amos-boot-system-patrol/src/main/resources/application.properties
View file @
722bf94a
spring.application.name
=
AMOS-PATROL
-tb
spring.application.name
=
AMOS-PATROL
server.servlet.context-path
=
/patrol
server.port
=
8082
...
...
@@ -44,6 +44,8 @@ Push.fegin.name=APPMESSAGEPUSHSERVICE
amos.flowWork.topic
=
/STATE_GRID/hazardManagement
amosRefresh.danger.topic
=
patrolDangerInsertOrUpdate
amosRefresh.patrol.topic
=
patrolCheckInsert
patrol.point.classify.topic
=
patrol/point/classify
patrol.topic
=
patrol/#
#停止通过WEB公开所有端点
management.endpoints.web.exposure.exclude
=
*
## redis失效时间
...
...
amos-boot-system-patrol/src/main/resources/db/changelog/patrol-3.0.1.xml
View file @
722bf94a
...
...
@@ -313,4 +313,121 @@
</sql>
</changeSet>
<changeSet
author=
"xixinzhao"
id=
"20211102-19"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"p_point_classify"
columnName=
"code"
/>
</not>
</preConditions>
<comment>
p_point_classify add column code
</comment>
<sql>
ALTER TABLE `p_point_classify`
ADD COLUMN `code` varchar(255) DEFAULT NULL COMMENT '编号';
</sql>
</changeSet>
<changeSet
author=
"xixinzhao"
id=
"20211102-20"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"p_point_classify"
columnName=
"category_name"
/>
</not>
</preConditions>
<comment>
p_point_classify add column category_name
</comment>
<sql>
ALTER TABLE `p_point_classify`
ADD COLUMN `category_name` varchar(255) DEFAULT NULL COMMENT '分类名称';
</sql>
</changeSet>
<changeSet
author=
"xixinzhao"
id=
"20211102-22"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"p_point_classify"
columnName=
"address"
/>
</not>
</preConditions>
<comment>
p_point_classify add column address
</comment>
<sql>
ALTER TABLE `p_point_classify`
ADD COLUMN `address` varchar(255) DEFAULT NULL COMMENT '位置';
</sql>
</changeSet>
<changeSet
author=
"xixinzhao"
id=
"20211102-23"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"p_point_classify"
columnName=
"data_source_code"
/>
</not>
</preConditions>
<comment>
p_point_classify add column data_source_code
</comment>
<sql>
ALTER TABLE `p_point_classify`
ADD COLUMN `data_source_code` int(10) DEFAULT NULL COMMENT '数据源code(1 消防装备 2 重点部位 3 自定义)';
</sql>
</changeSet>
<changeSet
author=
"xixinzhao"
id=
"20211102-24"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"p_point_classify"
columnName=
"data_source_name"
/>
</not>
</preConditions>
<comment>
p_point_classify add column data_source_name
</comment>
<sql>
ALTER TABLE `p_point_classify`
ADD COLUMN `data_source_name` varchar(255) DEFAULT NULL COMMENT '数据源名称(冗余)';
</sql>
</changeSet>
<changeSet
author=
"xixinzhao"
id=
"20211102-26"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"p_point_classify"
columnName=
"building_id"
/>
</not>
</preConditions>
<comment>
p_point_classify add column building_id
</comment>
<sql>
ALTER TABLE `p_point_classify`
ADD COLUMN `building_id` varchar(255) DEFAULT NULL COMMENT '建筑id';
</sql>
</changeSet>
<changeSet
author=
"xixinzhao"
id=
"20211102-27"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"p_point_classify"
columnName=
"building_name"
/>
</not>
</preConditions>
<comment>
p_point_classify add column building_name
</comment>
<sql>
ALTER TABLE `p_point_classify`
ADD COLUMN `building_name` varchar(255) DEFAULT NULL COMMENT '建筑名称';
</sql>
</changeSet>
<changeSet
author=
"xixinzhao"
id=
"20211102-28"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"p_point_classify"
columnName=
"category_code"
/>
</not>
</preConditions>
<comment>
p_point_classify add column category_code
</comment>
<sql>
ALTER TABLE `p_point_classify`
ADD COLUMN `category_code` varchar(255) DEFAULT NULL COMMENT '分类id';
</sql>
</changeSet>
<changeSet
author=
"xixinzhao"
id=
"20211102-29"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"p_point_classify"
columnName=
"is_delete"
/>
</not>
</preConditions>
<comment>
p_point_classify add column is_delete
</comment>
<sql>
ALTER TABLE `p_point_classify`
ADD COLUMN `is_delete` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除( 0未删除,1已删除 )';
</sql>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
amos-boot-system-patrol/src/main/resources/db/mapper/dbTemplate_check.xml
View file @
722bf94a
...
...
@@ -846,6 +846,15 @@
classify.id as classifyId,
classify.name as equipmentName,
classify.equipment_id as equipmentId,
classify.original_id as originalId,
classify.code,
classify.category_name as categoryName,
classify.address as area,
classify.data_source_code as dataSourceCode,
classify.data_source_name as equipType,
classify.building_id as buildingId,
classify.building_name as place,
classify.category_code as categoryCode,
(SELECT create_date FROM p_check WHERE id = #{checkID}) as createDate
FROM
p_point_classify classify
...
...
amos-boot-system-patrol/src/main/resources/db/mapper/dbTemplate_input_item.xml
View file @
722bf94a
...
...
@@ -188,8 +188,9 @@
LEFT JOIN p_input_item pii ON pii.id = ppi.input_item_id
lEFT JOIN p_route_point_item prpi ON prpi.point_input_item_id = pii.id
WHERE pii.is_delete = '0'
<if
test=
"pointId!=null and pointId !='' "
>
AND ppc.point_id = #{pointId}
</if>
<if
test=
"equipmentId!=null and equipmentId !='' "
>
AND ppc.equipment_id = #{equipmentId}
</if>
<if
test=
"classifyId!=null and classifyId !='' "
>
AND ppc.id = #{classifyId}
</if>
<!-- <if test="pointId!=null and pointId !='' "> AND ppc.point_id = #{pointId}</if>-->
<!-- <if test="equipmentId!=null and equipmentId !='' "> AND ppc.equipment_id = #{equipmentId}</if>-->
</select>
<select
id=
"getInputItemListByitemNos"
resultType=
"com.yeejoin.amos.patrol.business.vo.InputItemVo"
>
SELECT
...
...
amos-boot-system-patrol/src/main/resources/db/mapper/pointMapper.xml
View file @
722bf94a
...
...
@@ -942,32 +942,57 @@
AND p.org_code = #{orgCode}
AND c.is_delete = 0
</select>
<!-- <select id="queryEquipPointInputItem" resultType="java.util.Map">-->
<!-- SELECT-->
<!-- distinct cast(spec.id as char) AS equipmentId,-->
<!-- we.name AS name,-->
<!-- structure.source_id AS sourceId,-->
<!-- structure.source_code AS sourceCode,-->
<!-- spec.system_id AS systemId,-->
<!-- spec.code AS code,-->
<!-- cast(ppc.id as char) AS id,-->
<!-- category.NAME AS categoryName,-->
<!-- category.CODE AS categoryCode,-->
<!-- equipment_detail.area AS address,-->
<!-- structure.NAME AS acre,-->
<!-- we.inspection_spec as inspectionName,-->
<!-- ppc.order_no as orderNo-->
<!-- FROM-->
<!-- p_point_classify ppc-->
<!-- LEFT JOIN wl_equipment_specific spec ON spec.id=ppc.equipment_id-->
<!-- LEFT JOIN wl_equipment_detail equipment_detail ON equipment_detail.id = spec.equipment_detail_id-->
<!-- LEFT JOIN wl_stock_detail detail ON detail.equipment_specific_id = spec.id-->
<!-- LEFT JOIN wl_warehouse_structure structure ON detail.warehouse_structure_id = structure.id-->
<!-- LEFT JOIN f_fire_fighting_system AS manage ON manage.id = spec.system_id-->
<!-- LEFT JOIN wl_equipment we ON we.id = equipment_detail.equipment_id-->
<!-- LEFT JOIN wl_equipment_category category ON category.id = we.category_id-->
<!-- WHERE-->
<!-- <if test = "pointId!=''" > ppc.point_id = #{pointId} </if>-->
<!-- </select>-->
<select
id=
"queryEquipPointInputItem"
resultType=
"java.util.Map"
>
SELECT
distinct cast(spec.id as char) AS equipmentId,
we.name AS name,
structure.source_id AS sourceId,
structure.source_code AS sourceCode,
spec.system_id AS systemId,
spec.code AS code,
cast(ppc.id as char) AS id,
category.NAME AS categoryName,
category.CODE AS categoryCode,
equipment_detail.area AS address,
structure.NAME AS acre,
we.inspection_spec as inspectionName,
ppc.order_no as orderNo
ppc.id,
ppc.point_id pointId,
ppc.name,
ppc.code,
ppc.creator_id creatorId,
ppc.create_date createDate,
ppc.order_no orderNo,
ppc.original_id originalId,
ppc.equipment_id equipmentId,
ppc.inspection_spec_name inspectionSpecName,
ppc.category_name categoryName,
ppc.address,
ppc.data_source_code dataSourceCode,
ppc.data_source_name dataSourceName,
ppc.building_id buildingId,
ppc.building_name buildingName,
ppc.category_code categoryCode
FROM
p_point_classify ppc
LEFT JOIN wl_equipment_specific spec ON spec.id=ppc.equipment_id
LEFT JOIN wl_equipment_detail equipment_detail ON equipment_detail.id = spec.equipment_detail_id
LEFT JOIN wl_stock_detail detail ON detail.equipment_specific_id = spec.id
LEFT JOIN wl_warehouse_structure structure ON detail.warehouse_structure_id = structure.id
LEFT JOIN f_fire_fighting_system AS manage ON manage.id = spec.system_id
LEFT JOIN wl_equipment we ON we.id = equipment_detail.equipment_id
LEFT JOIN wl_equipment_category category ON category.id = we.category_id
p_point_classify ppc
WHERE
<if
test =
"pointId!=''"
>
ppc.point_id = #{pointId}
</if>
ppc.is_delete = 0
<if
test =
"pointId!=''"
>
AND ppc.point_id = #{pointId}
</if>
</select>
<select
id=
"queryPointCount4Route"
parameterType=
"long"
resultType=
"int"
>
...
...
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