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
66588777
Commit
66588777
authored
Jun 28, 2022
by
maoying
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' into develop_dl_plan6
parents
ac42d664
252c4678
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
34 changed files
with
406 additions
and
184 deletions
+406
-184
FailureDetailsMapper.java
...s/boot/module/common/api/mapper/FailureDetailsMapper.java
+71
-67
FailureDetailsMapper.xml
...on-api/src/main/resources/mapper/FailureDetailsMapper.xml
+0
-0
FailureDetailsServiceImpl.java
...le/common/biz/service/impl/FailureDetailsServiceImpl.java
+30
-29
pom.xml
...e/amos-boot-module-biz/amos-boot-module-equip-biz/pom.xml
+4
-0
EquipmentAlarmController.java
...join/equipmanage/controller/EquipmentAlarmController.java
+13
-8
SocketClient.java
...in/amos/boot/module/jcs/biz/audioToText/SocketClient.java
+10
-8
SpeechTranscriberDemo.java
...odule/jcs/biz/audioToText/util/SpeechTranscriberDemo.java
+0
-0
PowerTransferCompanyResourcesServiceImpl.java
...ervice/impl/PowerTransferCompanyResourcesServiceImpl.java
+16
-8
ElasticSearchClientConfig.java
.../amos/knowledgebase/config/ElasticSearchClientConfig.java
+20
-1
pom.xml
amos-boot-module/amos-boot-module-biz/pom.xml
+4
-0
pom.xml
amos-boot-module/pom.xml
+4
-0
pom.xml
amos-boot-system-equip/pom.xml
+4
-0
pom.xml
amos-boot-system-jcs/pom.xml
+4
-0
application-dev.properties
...-system-jcs/src/main/resources/application-dev.properties
+4
-1
application.properties
...boot-system-jcs/src/main/resources/application.properties
+7
-0
pom.xml
amos-boot-system-knowledgebase/pom.xml
+4
-1
application-dev.properties
...owledgebase/src/main/resources/application-dev.properties
+2
-0
application.properties
...m-knowledgebase/src/main/resources/application.properties
+7
-2
pom.xml
amos-boot-system-latentdanger/pom.xml
+4
-0
application.properties
...em-latentdanger/src/main/resources/application.properties
+9
-2
pom.xml
amos-boot-system-maintenance/pom.xml
+4
-0
application.properties
...tem-maintenance/src/main/resources/application.properties
+5
-0
pom.xml
amos-boot-system-patrol/pom.xml
+4
-0
application.properties
...t-system-patrol/src/main/resources/application.properties
+7
-2
pom.xml
amos-boot-system-supervision/pom.xml
+4
-0
application.properties
...tem-supervision/src/main/resources/application.properties
+5
-0
KV.java
...ain/java/com/yeejoin/amos/boot/module/tzs/api/dto/KV.java
+9
-0
MsgLogMapper.java
...yeejoin/amos/boot/module/tzs/api/mapper/MsgLogMapper.java
+5
-2
MsgLogMapper.xml
...module-tzs-api/src/main/resources/mapper/MsgLogMapper.xml
+6
-0
MsgLogController.java
...amos/boot/module/tzs/biz/controller/MsgLogController.java
+58
-29
MsgLogServiceImpl.java
...s/boot/module/tzs/biz/service/impl/MsgLogServiceImpl.java
+54
-15
ElasticSearchClientConfig.java
.../yeejoin/amos/video/config/ElasticSearchClientConfig.java
+15
-9
application-dev.properties
...utils-video/src/main/resources/application-dev.properties
+2
-0
pom.xml
pom.xml
+11
-0
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/mapper/FailureDetailsMapper.java
View file @
66588777
...
@@ -39,55 +39,9 @@ public interface FailureDetailsMapper extends BaseMapper<FailureDetails> {
...
@@ -39,55 +39,9 @@ public interface FailureDetailsMapper extends BaseMapper<FailureDetails> {
Long
sequenceNbr
);
Long
sequenceNbr
);
int
selectAllCount
();
int
selectAllCount
();
/**
* 查询我发起的 分页
* current 当前页
* size 条数
*
* @param currentStatus 当前任务状态
* * @param startTime 起始时间
* * @param endTime 结束时间
* * @param submissionPid 报送人
* @return
*/
List
<
FailureDetails
>
selectISubPage
(
Long
current
,
Long
size
,
Long
currentStatus
,
String
startTime
,
String
endTime
,
Integer
submissionPid
);
/**
* 查询待处理 分页
*
* @param currentStatus 当前任务状态
* * @param startTime 起始时间
* * @param endTime 结束时间
* * @param submissionPid 报送人
* @param
* @return
*/
List
<
FailureDetails
>
selectInProcessing
(
Long
current
,
Long
size
,
Long
currentStatus
,
String
startTime
,
String
endTime
,
Integer
submissionPid
);
/**
* 查询待处理 应急指挥科人员分页
*
* @param
* @return
*/
List
<
FailureDetails
>
selectStatusWaitTj
(
Long
current
,
Long
size
,
Long
currentStatus
,
String
startTime
,
String
endTime
,
Integer
submissionPid
);
/**
* 查询待处理 维修人员分页
*
* @param currentStatus 当前任务状态
* * @param startTime 起始时间
* * @param endTime 结束时间
* * @param submissionPid 报送人
* @param
* @return
*/
List
<
FailureDetails
>
selectStatusWaitWx
(
Long
current
,
Long
size
,
Long
currentStatus
,
String
startTime
,
String
endTime
,
Integer
submissionPid
);
List
<
FailureDetails
>
queryForWaitManage
(
Long
current
,
Long
size
,
Long
currentStatus
,
String
startTime
,
String
endTime
,
Integer
submissionPid
,
String
ruleName
);
/**
/**
* 统计 全部
* 统计 全部
...
@@ -99,7 +53,23 @@ public interface FailureDetailsMapper extends BaseMapper<FailureDetails> {
...
@@ -99,7 +53,23 @@ public interface FailureDetailsMapper extends BaseMapper<FailureDetails> {
* @return
* @return
*/
*/
List
<
StatusDto
>
selectStatusCount
(
Long
currentStatus
,
String
startTime
,
String
endTime
,
Integer
submissionPid
);
List
<
StatusDto
>
selectStatusCount
(
Long
currentStatus
,
String
startTime
,
String
endTime
,
Integer
submissionPid
);
List
<
StatusDto
>
queryStatusCount
(
Long
currentStatus
,
String
startTime
,
String
endTime
,
Integer
submissionPid
,
String
ruleName
);
List
<
StatusDto
>
queryAcceptCount
(
Long
currentStatus
,
String
startTime
,
String
endTime
,
Integer
submissionPid
,
String
userId
,
String
ruleName
);
List
<
FailureDetails
>
selectForReceive
(
Long
currentStatus
,
String
startTime
,
String
endTime
,
Integer
submissionPid
,
String
userId
,
Long
current
,
Long
size
,
String
ruleName
);
/* List<StatusDto> selectAudit(Long currentStatus, String startTime, String endTime, Integer submissionPid, String userId);
List<StatusDto> selectMaintain(Long currentStatus, String startTime, String endTime, Integer submissionPid, String userId);
List<StatusDto> selectUserId(Long currentStatus, String startTime, String endTime, String userId);*/
/* List<FailureDetails> selectYJ(Long currentStatus, String startTime, String endTime, String userId,Long current, Long size);*/
/* List<FailureDetails> selectForAudit(Long currentStatus, String startTime, String endTime,Integer submissionPid, String userId,Long current, Long size);*/
/* List<FailureDetails> selectForMaintain(Long currentStatus, String startTime, String endTime, Integer submissionPid, String userId,Long current, Long size);*/
/**
/**
* 统计 维修人员
* 统计 维修人员
...
@@ -110,9 +80,9 @@ public interface FailureDetailsMapper extends BaseMapper<FailureDetails> {
...
@@ -110,9 +80,9 @@ public interface FailureDetailsMapper extends BaseMapper<FailureDetails> {
* @param submissionPid 报送人
* @param submissionPid 报送人
* @return
* @return
*/
*/
List
<
StatusDto
>
selectStatusWx
(
Long
currentStatus
,
String
startTime
,
String
endTime
,
Integer
submissionPid
);
/*
List<StatusDto> selectStatusWx(Long currentStatus, String startTime, String endTime, Integer submissionPid);
/**
*/
/**
* 统计 应急指挥科人员
* 统计 应急指挥科人员
*
*
* @param currentStatus 状态
* @param currentStatus 状态
...
@@ -120,10 +90,10 @@ public interface FailureDetailsMapper extends BaseMapper<FailureDetails> {
...
@@ -120,10 +90,10 @@ public interface FailureDetailsMapper extends BaseMapper<FailureDetails> {
* @param endTime 结束时间
* @param endTime 结束时间
* @param submissionPid 报送人
* @param submissionPid 报送人
* @return
* @return
*/
*/
/*
List<StatusDto> selectStatusFq(Long currentStatus, String startTime, String endTime, Integer submissionPid);
List<StatusDto> selectStatusFq(Long currentStatus, String startTime, String endTime, Integer submissionPid);
/**
*/
/**
* 统计 我发起
* 统计 我发起
*
*
* @param currentStatus 状态
* @param currentStatus 状态
...
@@ -131,10 +101,10 @@ public interface FailureDetailsMapper extends BaseMapper<FailureDetails> {
...
@@ -131,10 +101,10 @@ public interface FailureDetailsMapper extends BaseMapper<FailureDetails> {
* @param endTime 结束时间
* @param endTime 结束时间
* @param submissionPid 报送人
* @param submissionPid 报送人
* @return
* @return
*/
*/
/*
List<StatusDto> selectStatusFqp(Long currentStatus, String startTime, String endTime, Integer submissionPid);
List<StatusDto> selectStatusFqp(Long currentStatus, String startTime, String endTime, Integer submissionPid);
/**
*/
/**
* 统计 领导
* 统计 领导
*
*
* @param currentStatus 状态
* @param currentStatus 状态
...
@@ -142,22 +112,56 @@ public interface FailureDetailsMapper extends BaseMapper<FailureDetails> {
...
@@ -142,22 +112,56 @@ public interface FailureDetailsMapper extends BaseMapper<FailureDetails> {
* @param endTime 结束时间
* @param endTime 结束时间
* @param submissionPid 报送人
* @param submissionPid 报送人
* @return
* @return
*/
*//*
List
<
StatusDto
>
selectStatusLeader
(
Long
currentStatus
,
String
startTime
,
String
endTime
,
Integer
submissionPid
);
List<StatusDto> selectStatusLeader(Long currentStatus, String startTime, String endTime, Integer submissionPid);*/
List
<
StatusDto
>
selectAudit
(
Long
currentStatus
,
String
startTime
,
String
endTime
,
Integer
submissionPid
,
String
userId
);
List
<
StatusDto
>
selectMaintain
(
Long
currentStatus
,
String
startTime
,
String
endTime
,
Integer
submissionPid
,
String
userId
);
List
<
StatusDto
>
selectUserId
(
Long
currentStatus
,
String
startTime
,
String
endTime
,
String
userId
);
List
<
FailureDetails
>
selectYJ
(
Long
currentStatus
,
String
startTime
,
String
endTime
,
String
userId
,
Long
current
,
Long
size
);
List
<
FailureDetails
>
selectForAudit
(
Long
currentStatus
,
String
startTime
,
String
endTime
,
Integer
submissionPid
,
String
userId
,
Long
current
,
Long
size
);
/* /**
* 查询待处理 分页
*
* @param currentStatus 当前任务状态
* * @param startTime 起始时间
* * @param endTime 结束时间
* * @param submissionPid 报送人
* @param
* @return
*//*
List<FailureDetails> selectInProcessing(Long current, Long size, Long currentStatus,
String startTime, String endTime, Integer submissionPid);
List
<
FailureDetails
>
selectForMaintain
(
Long
currentStatus
,
String
startTime
,
String
endTime
,
Integer
submissionPid
,
String
userId
,
Long
current
,
Long
size
);
/**
* 查询待处理 应急指挥科人员分页
*
* @param
* @return
*//*
List<FailureDetails> selectStatusWaitTj(Long current, Long size, Long currentStatus,
String startTime, String endTime, Integer submissionPid);*/
/* /**
* 查询待处理 维修人员分页
*
* @param currentStatus 当前任务状态
* * @param startTime 起始时间
* * @param endTime 结束时间
* * @param submissionPid 报送人
* @param
* @return
*//*
List<FailureDetails> selectStatusWaitWx(Long current, Long size, Long currentStatus,
String startTime, String endTime, Integer submissionPid);*/
/* *//**
* 查询我发起的 分页
* current 当前页
* size 条数
*
* @param currentStatus 当前任务状态
* * @param startTime 起始时间
* * @param endTime 结束时间
* * @param submissionPid 报送人
* @return
*//*
List<FailureDetails> selectISubPage(Long current, Long size, Long currentStatus,
String startTime, String endTime, Integer submissionPid);*/
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/FailureDetailsMapper.xml
View file @
66588777
This diff is collapsed.
Click to expand it.
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/FailureDetailsServiceImpl.java
View file @
66588777
...
@@ -98,25 +98,37 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -98,25 +98,37 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
*/
*/
public
IPage
<
FailureDetails
>
queryForFailureDetailsPage
(
Page
<
FailureDetails
>
page
,
ReginParams
userInfo
,
Long
currentStatus
,
public
IPage
<
FailureDetails
>
queryForFailureDetailsPage
(
Page
<
FailureDetails
>
page
,
ReginParams
userInfo
,
Long
currentStatus
,
String
startTime
,
String
endTime
,
Integer
userId
,
Integer
type
)
{
String
startTime
,
String
endTime
,
Integer
userId
,
Integer
type
)
{
//当传递类型参数为全部查询时
//当传递类型参数为全部查询
或者 为我提交
时
if
(
type
.
equals
(
SELECY_ALL
))
{
if
(
type
.
equals
(
SELECY_ALL
)
)
{
List
<
FailureDetails
>
list
=
this
.
baseMapper
.
selectAllPage
(
page
.
getCurrent
(),
page
.
getSize
(),
currentStatus
,
startTime
,
endTime
,
userId
);
List
<
FailureDetails
>
list
=
this
.
baseMapper
.
selectAllPage
(
page
.
getCurrent
(),
page
.
getSize
(),
currentStatus
,
startTime
,
endTime
,
userId
);
IPage
<
FailureDetails
>
iPage
=
new
Page
<>();
IPage
<
FailureDetails
>
iPage
=
new
Page
<>();
iPage
.
setRecords
(
list
);
iPage
.
setRecords
(
list
);
return
iPage
;
return
iPage
;
}
}
//当传递类型参数为我提交时
//当传递类型参数 为我提交时
if
(
type
.
equals
(
SELECY_ISUBMIT
))
{
if
(
type
.
equals
(
SELECY_ISUBMIT
))
{
List
<
FailureDetails
>
list
=
baseMapper
.
selectISubPage
(
page
.
getCurrent
(),
page
.
getSize
(),
currentStatus
,
startTime
,
endTime
,
Integer
.
parseInt
(
userInfo
.
getUserModel
().
getUserId
()));
List
<
FailureDetails
>
list
=
this
.
baseMapper
.
selectAllPage
(
page
.
getCurrent
(),
page
.
getSize
(),
currentStatus
,
startTime
,
endTime
,
Integer
.
parseInt
(
userInfo
.
getUserModel
().
getUserId
()));
IPage
<
FailureDetails
>
iPage
=
new
Page
<>();
IPage
<
FailureDetails
>
iPage
=
new
Page
<>();
iPage
.
setRecords
(
list
);
iPage
.
setRecords
(
list
);
return
iPage
;
return
iPage
;
}
}
/* //当传递类型参数为我提交时
if (type.equals(SELECY_ISUBMIT)) {
List<FailureDetails> list = baseMapper.selectISubPage(page.getCurrent(), page.getSize(), currentStatus, startTime, endTime, Integer.parseInt(userInfo.getUserModel().getUserId()));
IPage<FailureDetails> iPage = new Page<>();
iPage.setRecords(list);
return iPage;
}*/
//当传递类型参数为我接收时
//当传递类型参数为我接收时
if
(
type
.
equals
(
SELECY_ACCEPT
))
{
if
(
type
.
equals
(
SELECY_ACCEPT
))
{
//当角色为维修人员时
//当角色为维修人员时
if
(
userInfo
.
getRole
().
getRoleName
().
equals
(
roleName
[
0
]))
{
List
<
FailureDetails
>
receiveList
=
baseMapper
.
selectForReceive
(
currentStatus
,
startTime
,
endTime
,
userId
,
userInfo
.
getUserModel
().
getUserId
(),
page
.
getCurrent
(),
page
.
getSize
(),
userInfo
.
getRole
().
getRoleName
());
IPage
<
FailureDetails
>
iPage
=
new
Page
<>();
iPage
.
setRecords
(
receiveList
);
return
iPage
;
/* if (userInfo.getRole().getRoleName().equals(roleName[0])) {
List<FailureDetails> failureDetails = baseMapper.selectForMaintain(currentStatus, startTime, endTime, userId, userInfo.getUserModel().getUserId(), page.getCurrent(), page.getSize());
List<FailureDetails> failureDetails = baseMapper.selectForMaintain(currentStatus, startTime, endTime, userId, userInfo.getUserModel().getUserId(), page.getCurrent(), page.getSize());
IPage<FailureDetails> iPage = new Page<>();
IPage<FailureDetails> iPage = new Page<>();
iPage.setRecords(failureDetails);
iPage.setRecords(failureDetails);
...
@@ -134,7 +146,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -134,7 +146,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
IPage<FailureDetails> iPage = new Page<>();
IPage<FailureDetails> iPage = new Page<>();
iPage.setRecords(failureDetails);
iPage.setRecords(failureDetails);
return iPage;
return iPage;
}
}
*/
}
}
//否则就查询待处理
//否则就查询待处理
return
this
.
queryForWaitManage
(
page
,
userInfo
,
currentStatus
,
startTime
,
endTime
,
userId
);
return
this
.
queryForWaitManage
(
page
,
userInfo
,
currentStatus
,
startTime
,
endTime
,
userId
);
...
@@ -160,7 +172,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -160,7 +172,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
public
IPage
<
FailureDetails
>
queryForWaitManage
(
Page
<
FailureDetails
>
page
,
ReginParams
userInfo
,
Long
currentStatus
,
public
IPage
<
FailureDetails
>
queryForWaitManage
(
Page
<
FailureDetails
>
page
,
ReginParams
userInfo
,
Long
currentStatus
,
String
startTime
,
String
endTime
,
Integer
userId
)
{
String
startTime
,
String
endTime
,
Integer
userId
)
{
if
(
userInfo
.
getRole
().
getRoleName
().
equals
(
roleName
[
0
]))
{
/*
if (userInfo.getRole().getRoleName().equals(roleName[0])) {
IPage<FailureDetails> wxIpage = new Page<FailureDetails>();
IPage<FailureDetails> wxIpage = new Page<FailureDetails>();
List<FailureDetails> list = baseMapper.selectStatusWaitWx(page.getCurrent(), page.getSize(), currentStatus, startTime, endTime, userId);
List<FailureDetails> list = baseMapper.selectStatusWaitWx(page.getCurrent(), page.getSize(), currentStatus, startTime, endTime, userId);
wxIpage.setRecords(list);
wxIpage.setRecords(list);
...
@@ -171,8 +183,8 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -171,8 +183,8 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
IPage<FailureDetails> iPage = new Page<>();
IPage<FailureDetails> iPage = new Page<>();
iPage.setRecords(list);
iPage.setRecords(list);
return iPage;
return iPage;
}
}
*/
List
<
FailureDetails
>
list
=
baseMapper
.
selectInProcessing
(
page
.
getCurrent
(),
page
.
getSize
(),
currentStatus
,
startTime
,
endTime
,
userId
);
List
<
FailureDetails
>
list
=
baseMapper
.
queryForWaitManage
(
page
.
getCurrent
(),
page
.
getSize
(),
currentStatus
,
startTime
,
endTime
,
userId
,
userInfo
.
getRole
().
getRoleName
()
);
IPage
<
FailureDetails
>
iPage
=
new
Page
<>();
IPage
<
FailureDetails
>
iPage
=
new
Page
<>();
iPage
.
setRecords
(
list
);
iPage
.
setRecords
(
list
);
return
iPage
;
return
iPage
;
...
@@ -196,21 +208,8 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -196,21 +208,8 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
* 根据状态查询
* 根据状态查询
*/
*/
public
List
<
FailureDetails
>
queryForFailureStatus
(
Long
currentStatus
)
{
public
List
<
FailureDetails
>
queryForFailureStatus
(
Long
currentStatus
)
{
String
status
=
""
;
List
<
FailureStatuEnum
>
list
=
new
ArrayList
<>();
list
.
add
(
FailureStatuEnum
.
WAITING_AUDIT
);
list
.
add
(
FailureStatuEnum
.
WAITING_SUBMIT
);
list
.
add
(
FailureStatuEnum
.
WAITING_MAINTAIN
);
list
.
add
(
FailureStatuEnum
.
WAITING_ACCEPTANCE
);
list
.
add
(
FailureStatuEnum
.
REFUSE
);
list
.
add
(
FailureStatuEnum
.
FINISH
);
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++)
{
if
(
currentStatus
.
equals
(
list
.
get
(
i
).
getCode
()))
{
status
=
list
.
get
(
i
).
getName
();
}
}
QueryWrapper
<
FailureDetails
>
queryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
FailureDetails
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"current_status"
,
s
tatus
).
orderByDesc
(
"submission_time"
);
queryWrapper
.
eq
(
"current_status"
,
currentS
tatus
).
orderByDesc
(
"submission_time"
);
return
baseMapper
.
selectList
(
queryWrapper
);
return
baseMapper
.
selectList
(
queryWrapper
);
}
}
...
@@ -219,7 +218,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -219,7 +218,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
*/
*/
public
List
<
CurrentStatusDto
>
queryStatusCount
(
ReginParams
userInfo
,
Integer
type
,
Long
currentStatus
,
String
startTime
,
String
endTime
,
Integer
userId
)
{
public
List
<
CurrentStatusDto
>
queryStatusCount
(
ReginParams
userInfo
,
Integer
type
,
Long
currentStatus
,
String
startTime
,
String
endTime
,
Integer
userId
)
{
List
<
StatusDto
>
statusDtos
=
null
;
List
<
StatusDto
>
statusDtos
=
null
;
if
(
type
.
equals
(
SELECY_STATUS
)
&&
userInfo
.
getRole
().
getRoleName
().
equals
(
roleName
[
0
]))
{
/*
if (type.equals(SELECY_STATUS) && userInfo.getRole().getRoleName().equals(roleName[0])) {
statusDtos = baseMapper.selectStatusWx(currentStatus, startTime, endTime, userId);
statusDtos = baseMapper.selectStatusWx(currentStatus, startTime, endTime, userId);
} else if (type.equals(SELECY_STATUS) && userInfo.getRole().getRoleName().equals(roleName[1])) {
} else if (type.equals(SELECY_STATUS) && userInfo.getRole().getRoleName().equals(roleName[1])) {
statusDtos = baseMapper.selectStatusFq(currentStatus, startTime, endTime, userId);
statusDtos = baseMapper.selectStatusFq(currentStatus, startTime, endTime, userId);
...
@@ -227,16 +226,17 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -227,16 +226,17 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
statusDtos = baseMapper.selectStatusFqp(currentStatus, startTime, endTime, Integer.parseInt(userInfo.getUserModel().getUserId()));
statusDtos = baseMapper.selectStatusFqp(currentStatus, startTime, endTime, Integer.parseInt(userInfo.getUserModel().getUserId()));
} else if (type.equals(SELECY_ALL)) {
} else if (type.equals(SELECY_ALL)) {
statusDtos = baseMapper.selectStatusCount(currentStatus, startTime, endTime, userId);
statusDtos = baseMapper.selectStatusCount(currentStatus, startTime, endTime, userId);
}
else
if
(
type
.
equals
(
SELECY_ACCEPT
))
{
} else
*/
if
(
type
.
equals
(
SELECY_ACCEPT
))
{
if
(
userInfo
.
getRole
().
getRoleName
().
equals
(
roleName
[
2
])
||
userInfo
.
getRole
().
getRoleName
().
equals
(
roleName
[
3
])){
/*
if (userInfo.getRole().getRoleName().equals(roleName[2]) || userInfo.getRole().getRoleName().equals(roleName[3])){
statusDtos = baseMapper.selectAudit(currentStatus, startTime, endTime, userId, userInfo.getUserModel().getUserId());
statusDtos = baseMapper.selectAudit(currentStatus, startTime, endTime, userId, userInfo.getUserModel().getUserId());
}else if (userInfo.getRole().getRoleName().equals(roleName[0])){
}else if (userInfo.getRole().getRoleName().equals(roleName[0])){
statusDtos = baseMapper.selectMaintain(currentStatus, startTime, endTime, userId, userInfo.getUserModel().getUserId());
statusDtos = baseMapper.selectMaintain(currentStatus, startTime, endTime, userId, userInfo.getUserModel().getUserId());
}else {
}else {
statusDtos = baseMapper.selectUserId(currentStatus, startTime, endTime, userInfo.getUserModel().getUserId());
statusDtos = baseMapper.selectUserId(currentStatus, startTime, endTime, userInfo.getUserModel().getUserId());
}
}*/
statusDtos
=
baseMapper
.
queryAcceptCount
(
currentStatus
,
startTime
,
endTime
,
userId
,
userInfo
.
getUserModel
().
getUserId
(),
userInfo
.
getRole
().
getRoleName
());
}
else
{
}
else
{
statusDtos
=
baseMapper
.
selectStatusLeader
(
currentStatus
,
startTime
,
endTime
,
userId
);
statusDtos
=
baseMapper
.
queryStatusCount
(
currentStatus
,
startTime
,
endTime
,
userId
,
userInfo
.
getRole
().
getRoleName
()
);
}
}
List
<
CurrentStatusDto
>
currentStatusDtoList
=
new
ArrayList
<>();
List
<
CurrentStatusDto
>
currentStatusDtoList
=
new
ArrayList
<>();
statusDtos
.
forEach
(
e
->
{
statusDtos
.
forEach
(
e
->
{
...
@@ -331,10 +331,11 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -331,10 +331,11 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
failureDetailsDto
.
getAttachment
());
failureDetailsDto
.
getAttachment
());
}
}
// 添加至报修日志
// 添加至报修日志
OrgUsr
orgUsr
=
iOrgUsrService
.
getById
(
failureDetailsDto
.
getBizCode
());
Long
faultId
=
model
.
getSequenceNbr
();
Long
faultId
=
model
.
getSequenceNbr
();
Integer
processAuditorId
=
model
.
getSubmissionPid
();
Integer
processAuditorId
=
model
.
getSubmissionPid
();
String
processResult
=
"重新提交报修单"
;
String
processResult
=
"重新提交报修单"
;
String
processDepartment
=
userInfo
.
getDepartment
().
getDepartmentName
()
;
String
processDepartment
=
orgUsr
.
getBizOrgName
()
;
Long
departmentId
=
failureDetailsDto
.
getBizCode
();
Long
departmentId
=
failureDetailsDto
.
getBizCode
();
Date
processTime
=
model
.
getSubmissionTime
();
Date
processTime
=
model
.
getSubmissionTime
();
String
processAuditorName
=
failureDetailsDto
.
getSubmissionName
();
String
processAuditorName
=
failureDetailsDto
.
getSubmissionName
();
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/pom.xml
View file @
66588777
...
@@ -31,6 +31,10 @@
...
@@ -31,6 +31,10 @@
<groupId>
org.typroject
</groupId>
<groupId>
org.typroject
</groupId>
<artifactId>
*
</artifactId>
<artifactId>
*
</artifactId>
</exclusion>
</exclusion>
<exclusion>
<groupId>
org.apache.logging.log4j
</groupId>
<artifactId>
log4j-api
</artifactId>
</exclusion>
</exclusions>
</exclusions>
</dependency>
</dependency>
<dependency>
<dependency>
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/EquipmentAlarmController.java
View file @
66588777
...
@@ -17,6 +17,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
...
@@ -17,6 +17,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
@@ -156,10 +157,12 @@ public class EquipmentAlarmController extends AbstractBaseController {
...
@@ -156,10 +157,12 @@ public class EquipmentAlarmController extends AbstractBaseController {
request12
.
setName
(
"isRemoveShield"
);
request12
.
setName
(
"isRemoveShield"
);
request12
.
setValue
(
StringUtil
.
isNotEmpty
(
isRemoveShield
)
?
StringUtils
.
trimToNull
(
isRemoveShield
)
:
null
);
request12
.
setValue
(
StringUtil
.
isNotEmpty
(
isRemoveShield
)
?
StringUtils
.
trimToNull
(
isRemoveShield
)
:
null
);
queryRequests
.
add
(
request12
);
queryRequests
.
add
(
request12
);
CommonRequest
request13
=
new
CommonRequest
();
if
(!
ValidationUtil
.
isEmpty
(
reginParams
.
getPersonIdentity
())){
request13
.
setName
(
"bizOrgCode"
);
CommonRequest
request13
=
new
CommonRequest
();
request13
.
setValue
(
StringUtil
.
isNotEmpty
(
reginParams
.
getPersonIdentity
().
getBizOrgCode
())
?
reginParams
.
getPersonIdentity
().
getBizOrgCode
()
:
null
);
request13
.
setName
(
"bizOrgCode"
);
queryRequests
.
add
(
request13
);
request13
.
setValue
(
StringUtil
.
isNotEmpty
(
reginParams
.
getPersonIdentity
().
getBizOrgCode
())
?
reginParams
.
getPersonIdentity
().
getBizOrgCode
()
:
null
);
queryRequests
.
add
(
request13
);
}
CommonPageInfoParam
param
=
CommonPageParamUtil
.
fillCommonPageInfoParam
(
queryRequests
,
commonPageable
);
CommonPageInfoParam
param
=
CommonPageParamUtil
.
fillCommonPageInfoParam
(
queryRequests
,
commonPageable
);
Page
<
Map
<
String
,
Object
>>
list
=
iEquipmentSpecificAlarmService
.
listPage
(
param
);
Page
<
Map
<
String
,
Object
>>
list
=
iEquipmentSpecificAlarmService
.
listPage
(
param
);
return
CommonResponseUtil
.
success
(
list
);
return
CommonResponseUtil
.
success
(
list
);
...
@@ -276,10 +279,12 @@ public class EquipmentAlarmController extends AbstractBaseController {
...
@@ -276,10 +279,12 @@ public class EquipmentAlarmController extends AbstractBaseController {
request13
.
setName
(
"isRemovedFire"
);
request13
.
setName
(
"isRemovedFire"
);
request13
.
setValue
(
StringUtil
.
isNotEmpty
(
isRemovedFire
)
?
StringUtils
.
trimToNull
(
isRemovedFire
)
:
null
);
request13
.
setValue
(
StringUtil
.
isNotEmpty
(
isRemovedFire
)
?
StringUtils
.
trimToNull
(
isRemovedFire
)
:
null
);
queryRequests
.
add
(
request13
);
queryRequests
.
add
(
request13
);
CommonRequest
request14
=
new
CommonRequest
();
if
(!
ValidationUtil
.
isEmpty
(
reginParams
.
getPersonIdentity
())){
request13
.
setName
(
"bizOrgCode"
);
CommonRequest
request14
=
new
CommonRequest
();
request13
.
setValue
(
StringUtil
.
isNotEmpty
(
reginParams
.
getPersonIdentity
().
getBizOrgCode
())
?
reginParams
.
getPersonIdentity
().
getBizOrgCode
()
:
null
);
request14
.
setName
(
"bizOrgCode"
);
queryRequests
.
add
(
request14
);
request14
.
setValue
(
StringUtil
.
isNotEmpty
(
reginParams
.
getPersonIdentity
().
getBizOrgCode
())
?
reginParams
.
getPersonIdentity
().
getBizOrgCode
()
:
null
);
queryRequests
.
add
(
request14
);
}
CommonPageInfoParam
param
=
CommonPageParamUtil
.
fillCommonPageInfoParam
(
queryRequests
,
commonPageable
);
CommonPageInfoParam
param
=
CommonPageParamUtil
.
fillCommonPageInfoParam
(
queryRequests
,
commonPageable
);
org
.
springframework
.
data
.
domain
.
Page
<
AlarmListDataVO
>
list
=
iEquipmentSpecificAlarmService
.
listAlarmsPage
(
param
);
org
.
springframework
.
data
.
domain
.
Page
<
AlarmListDataVO
>
list
=
iEquipmentSpecificAlarmService
.
listAlarmsPage
(
param
);
return
CommonResponseUtil
.
success
(
list
);
return
CommonResponseUtil
.
success
(
list
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/audioToText/SocketClient.java
View file @
66588777
...
@@ -11,6 +11,8 @@ import java.io.OutputStream;
...
@@ -11,6 +11,8 @@ import java.io.OutputStream;
import
java.net.*
;
import
java.net.*
;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.TimeUnit
;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
audioToText
.
util
.
SpeechTranscriberDemo
.
getSleepDelta
;
/**
/**
* 模拟客户端发送数据
* 模拟客户端发送数据
*/
*/
...
@@ -18,16 +20,14 @@ import java.util.concurrent.TimeUnit;
...
@@ -18,16 +20,14 @@ import java.util.concurrent.TimeUnit;
public
class
SocketClient
{
public
class
SocketClient
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
SocketClient
.
class
);
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
SocketClient
.
class
);
private
static
final
String
[]
testFilePath
=
{
private
static
final
String
[]
testFilePath
=
{
"D:\\ffmpeg-4.4-full_build-shared\\bin\\out3.pcm"
,
"C:\\Users\\DELL\\Desktop\\yuyin\\out1.pcm"
,
"D:\\ffmpeg-4.4-full_build-shared\\bin\\out4.pcm"
,
"C:\\Users\\DELL\\Desktop\\yuyin\\out.pcm"
,
"D:\\ffmpeg-4.4-full_build-shared\\bin\\record1.pcm"
,
"D:\\ffmpeg-4.4-full_build-shared\\bin\\record2.pcm"
,
};
};
public
static
void
main
(
String
[]
args
)
throws
SocketException
{
public
static
void
main
(
String
[]
args
)
throws
SocketException
{
SocketClient
socketClient
=
new
SocketClient
();
SocketClient
socketClient
=
new
SocketClient
();
//socketClient.processTcp(0, 0);
//socketClient.processTcp(0, 0);
socketClient
.
processUdp
(
10001
,
2
);
socketClient
.
processUdp
(
25002
,
1
);
}
}
@Async
@Async
...
@@ -36,13 +36,15 @@ public class SocketClient {
...
@@ -36,13 +36,15 @@ public class SocketClient {
if
(
type
>=
testFilePath
.
length
)
type
-=
1
;
if
(
type
>=
testFilePath
.
length
)
type
-=
1
;
DatagramSocket
datagramSocket
=
new
DatagramSocket
();
DatagramSocket
datagramSocket
=
new
DatagramSocket
();
try
{
try
{
FileInputStream
fis
=
new
FileInputStream
(
new
File
(
testFilePath
[
type
]
));
FileInputStream
fis
=
new
FileInputStream
(
new
File
(
"C:\\Users\\DELL\\Desktop\\ffmpeg-4.4-full_build-shared\\bin\\out.pcm"
));
byte
[]
b
=
new
byte
[
4096
];
byte
[]
b
=
new
byte
[
1280
];
int
len
;
int
len
;
while
((
len
=
fis
.
read
(
b
))
>
0
)
{
while
((
len
=
fis
.
read
(
b
))
>
0
)
{
logger
.
info
(
"send data pack length: "
+
len
);
logger
.
info
(
"send data pack length: "
+
len
);
datagramSocket
.
send
(
new
DatagramPacket
(
b
,
b
.
length
,
InetAddress
.
getLocalHost
(),
port
));
datagramSocket
.
send
(
new
DatagramPacket
(
b
,
b
.
length
,
InetAddress
.
getLocalHost
(),
port
));
TimeUnit
.
MILLISECONDS
.
sleep
(
200
);
int
deltaSleep
=
getSleepDelta
(
len
,
16000
);
Thread
.
sleep
(
deltaSleep
);
TimeUnit
.
MILLISECONDS
.
sleep
(
100
);
}
}
datagramSocket
.
close
();
datagramSocket
.
close
();
}
catch
(
Exception
e
)
{
}
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/audioToText/util/SpeechTranscriberDemo.java
0 → 100644
View file @
66588777
This diff is collapsed.
Click to expand it.
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/PowerTransferCompanyResourcesServiceImpl.java
View file @
66588777
...
@@ -94,17 +94,25 @@ public class PowerTransferCompanyResourcesServiceImpl extends BaseService<PowerT
...
@@ -94,17 +94,25 @@ public class PowerTransferCompanyResourcesServiceImpl extends BaseService<PowerT
try
{
try
{
if
(
type
==
2
)
{
if
(
type
==
2
)
{
powerTransferCompanyResources
.
setStatus
(
code
);
powerTransferCompanyResources
.
setStatus
(
code
);
powerTransferCompanyResources
.
setRemarks
(
remarks
);
powerTransferCompanyResources
.
setRemarks
(
remarks
);
powerTransferCompanyResourcesMapper
.
updateById
(
powerTransferCompanyResources
);
powerTransferCompanyResourcesMapper
.
updateById
(
powerTransferCompanyResources
);
List
<
Object
>
carStatusInfoDtoList
=
new
ArrayList
();
//修改装备信息
if
(
"finished"
.
equals
(
code
)){
CarStatusInfoDto
carStatusInfo
=
new
CarStatusInfoDto
();
List
<
Object
>
carStatusInfoDtoList
=
new
ArrayList
();
carStatusInfo
.
setSequenceNbr
(
carId
+
""
);
//修改装备信息
carStatusInfo
.
setStatus
(
FireCarStatusEnum
.
执勤
.
getCode
());
CarStatusInfoDto
carStatusInfo
=
new
CarStatusInfoDto
();
carStatusInfoDtoList
.
add
(
carStatusInfo
);
carStatusInfo
.
setSequenceNbr
(
carId
+
""
);
// 更新所有车辆状态为执勤
carStatusInfo
.
setStatus
(
FireCarStatusEnum
.
执勤
.
getCode
());
equipFeignClient
.
updateCarStatus
(
carStatusInfoDtoList
);
carStatusInfoDtoList
.
add
(
carStatusInfo
);
// 更新所有车辆状态为执勤
equipFeignClient
.
updateCarStatus
(
carStatusInfoDtoList
);
}
}
else
{
}
else
{
if
(
FireCarStatusEnum
.
到场
.
getCode
().
equals
(
code
)){
if
(
FireCarStatusEnum
.
到场
.
getCode
().
equals
(
code
)){
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-knowledgebase-biz/src/main/java/com/yeejoin/amos/knowledgebase/config/ElasticSearchClientConfig.java
View file @
66588777
...
@@ -2,7 +2,12 @@ package com.yeejoin.amos.knowledgebase.config;
...
@@ -2,7 +2,12 @@ package com.yeejoin.amos.knowledgebase.config;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.http.HttpHost
;
import
org.apache.http.HttpHost
;
import
org.apache.http.auth.AuthScope
;
import
org.apache.http.auth.UsernamePasswordCredentials
;
import
org.apache.http.client.CredentialsProvider
;
import
org.apache.http.client.config.RequestConfig
;
import
org.apache.http.client.config.RequestConfig
;
import
org.apache.http.impl.client.BasicCredentialsProvider
;
import
org.apache.http.impl.nio.client.HttpAsyncClientBuilder
;
import
org.elasticsearch.client.RestClient
;
import
org.elasticsearch.client.RestClient
;
import
org.elasticsearch.client.RestClientBuilder
;
import
org.elasticsearch.client.RestClientBuilder
;
import
org.elasticsearch.client.RestHighLevelClient
;
import
org.elasticsearch.client.RestHighLevelClient
;
...
@@ -16,17 +21,31 @@ public class ElasticSearchClientConfig {
...
@@ -16,17 +21,31 @@ public class ElasticSearchClientConfig {
@Value
(
"${spring.elasticsearch.rest.uris}"
)
@Value
(
"${spring.elasticsearch.rest.uris}"
)
private
String
uris
;
private
String
uris
;
@Value
(
"${elasticsearch.username}"
)
private
String
username
;
@Value
(
"${elasticsearch.password}"
)
private
String
password
;
@Bean
@Bean
@Qualifier
(
"highLevelClient"
)
@Qualifier
(
"highLevelClient"
)
public
RestHighLevelClient
restHighLevelClient
()
{
public
RestHighLevelClient
restHighLevelClient
()
{
final
CredentialsProvider
credentialsProvider
=
new
BasicCredentialsProvider
();
credentialsProvider
.
setCredentials
(
AuthScope
.
ANY
,
new
UsernamePasswordCredentials
(
username
,
password
));
try
{
try
{
String
url
=
uris
.
replace
(
"http://"
,
""
);
String
url
=
uris
.
replace
(
"http://"
,
""
);
final
String
[]
parts
=
StringUtils
.
split
(
url
,
":"
);
final
String
[]
parts
=
StringUtils
.
split
(
url
,
":"
);
HttpHost
httpHost
=
new
HttpHost
(
parts
[
0
],
Integer
.
parseInt
(
parts
[
1
]),
"http"
);
HttpHost
httpHost
=
new
HttpHost
(
parts
[
0
],
Integer
.
parseInt
(
parts
[
1
]),
"http"
);
RestClientBuilder
builder
=
RestClient
.
builder
(
httpHost
);
RestClientBuilder
builder
=
RestClient
.
builder
(
httpHost
);
builder
.
setHttpClientConfigCallback
(
new
RestClientBuilder
.
HttpClientConfigCallback
()
{
@Override
public
HttpAsyncClientBuilder
customizeHttpClient
(
HttpAsyncClientBuilder
httpClientBuilder
)
{
httpClientBuilder
.
disableAuthCaching
();
return
httpClientBuilder
.
setDefaultCredentialsProvider
(
credentialsProvider
);
}
});
builder
.
setRequestConfigCallback
(
new
RestClientBuilder
.
RequestConfigCallback
()
{
builder
.
setRequestConfigCallback
(
new
RestClientBuilder
.
RequestConfigCallback
()
{
// 该方法接收一个RequestConfig.Builder对象,对该对象进行修改后然后返回。
// 该方法接收一个RequestConfig.Builder对象,对该对象进行修改后然后返回。
@Override
@Override
...
...
amos-boot-module/amos-boot-module-biz/pom.xml
View file @
66588777
...
@@ -27,6 +27,10 @@
...
@@ -27,6 +27,10 @@
</exclusions>
</exclusions>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
org.apache.logging.log4j
</groupId>
<artifactId>
log4j-api
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework
</groupId>
<groupId>
org.springframework
</groupId>
<artifactId>
spring-mock
</artifactId>
<artifactId>
spring-mock
</artifactId>
<version>
2.0.8
</version>
<version>
2.0.8
</version>
...
...
amos-boot-module/pom.xml
View file @
66588777
...
@@ -30,6 +30,10 @@
...
@@ -30,6 +30,10 @@
<artifactId>
amos-feign-rule
</artifactId>
<artifactId>
amos-feign-rule
</artifactId>
<version>
1.7.0
</version>
<version>
1.7.0
</version>
</dependency>
</dependency>
<dependency>
<groupId>
org.apache.logging.log4j
</groupId>
<artifactId>
log4j-api
</artifactId>
</dependency>
</dependencies>
</dependencies>
<modules>
<modules>
...
...
amos-boot-system-equip/pom.xml
View file @
66588777
...
@@ -15,6 +15,10 @@
...
@@ -15,6 +15,10 @@
<artifactId>
amos-boot-module-equip-biz
</artifactId>
<artifactId>
amos-boot-module-equip-biz
</artifactId>
<version>
${amos-biz-boot.version}
</version>
<version>
${amos-biz-boot.version}
</version>
</dependency>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-security
</artifactId>
</dependency>
</dependencies>
</dependencies>
<build>
<build>
<plugins>
<plugins>
...
...
amos-boot-system-jcs/pom.xml
View file @
66588777
...
@@ -26,6 +26,10 @@
...
@@ -26,6 +26,10 @@
<groupId>
org.liquibase
</groupId>
<groupId>
org.liquibase
</groupId>
<artifactId>
liquibase-core
</artifactId>
<artifactId>
liquibase-core
</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-security
</artifactId>
</dependency>
</dependencies>
</dependencies>
<build>
<build>
...
...
amos-boot-system-jcs/src/main/resources/application-dev.properties
View file @
66588777
...
@@ -39,8 +39,11 @@ rule.definition.localIp=172.16.3.35
...
@@ -39,8 +39,11 @@ rule.definition.localIp=172.16.3.35
file.url
=
http://39.98.45.134:9000/
file.url
=
http://39.98.45.134:9000/
video.url
=
https://11.11.16.4:443/
video.url
=
https://11.11.16.4:443/
ifc.url
=
http://11.11.16.17/IFCInterface
ifc.url
=
http://11.11.16.17/IFCInterface
ifc.call-back.localIp
=
11.11.16.1
ifc.call-back.localIp
=
11.11.16.1
elasticsearch.username
=
elastic
elasticsearch.password
=
123456
amos-boot-system-jcs/src/main/resources/application.properties
View file @
66588777
...
@@ -29,6 +29,13 @@ spring.datasource.hikari.max-lifetime=120000
...
@@ -29,6 +29,13 @@ spring.datasource.hikari.max-lifetime=120000
spring.datasource.hikari.connection-timeout
=
30000
spring.datasource.hikari.connection-timeout
=
30000
spring.datasource.hikari.connection-test-query
=
SELECT 1
spring.datasource.hikari.connection-test-query
=
SELECT 1
endpoints.enabled
=
false
management.security.enabled
=
true
security.user.name
=
admin
security.user.password
=
admin
##liquibase
##liquibase
spring.liquibase.change-log
=
classpath:/db/changelog/changelog-master.xml
spring.liquibase.change-log
=
classpath:/db/changelog/changelog-master.xml
spring.liquibase.enabled
=
true
spring.liquibase.enabled
=
true
...
...
amos-boot-system-knowledgebase/pom.xml
View file @
66588777
...
@@ -15,7 +15,10 @@
...
@@ -15,7 +15,10 @@
<artifactId>
amos-boot-module-knowledgebase-biz
</artifactId>
<artifactId>
amos-boot-module-knowledgebase-biz
</artifactId>
<version>
${amos-biz-boot.version}
</version>
<version>
${amos-biz-boot.version}
</version>
</dependency>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-security
</artifactId>
</dependency>
</dependencies>
</dependencies>
<build>
<build>
...
...
amos-boot-system-knowledgebase/src/main/resources/application-dev.properties
View file @
66588777
...
@@ -40,6 +40,8 @@ eureka.instance.metadata-map.management.api-docs=http://localhost:${server.port}
...
@@ -40,6 +40,8 @@ eureka.instance.metadata-map.management.api-docs=http://localhost:${server.port}
spring.data.elasticsearch.cluster-name
=
elasticsearch
spring.data.elasticsearch.cluster-name
=
elasticsearch
spring.data.elasticsearch.cluster-nodes
=
172.16.10.66:9300
spring.data.elasticsearch.cluster-nodes
=
172.16.10.66:9300
spring.elasticsearch.rest.uris
=
http://172.16.10.66:9200
spring.elasticsearch.rest.uris
=
http://172.16.10.66:9200
elasticsearch.username
=
elastic
elasticsearch.password
=
123456
#emqx v4.0
#emqx v4.0
emqx.clean-session
=
true
emqx.clean-session
=
true
...
...
amos-boot-system-knowledgebase/src/main/resources/application.properties
View file @
66588777
...
@@ -20,4 +20,10 @@ mybatis-plus.type-aliases-super-type=org.typroject.tyboot.core.rdbms.orm.entity.
...
@@ -20,4 +20,10 @@ mybatis-plus.type-aliases-super-type=org.typroject.tyboot.core.rdbms.orm.entity.
mybatis-plus.global-config.db-config.id-type
=
id_worker
mybatis-plus.global-config.db-config.id-type
=
id_worker
mybatis-plus.mapper-locations
=
classpath:mapper/*
mybatis-plus.mapper-locations
=
classpath:mapper/*
## redis失效时间
## redis失效时间
redis.cache.failure.time
=
10800
redis.cache.failure.time
=
10800
\ No newline at end of file
endpoints.enabled
=
false
management.security.enabled
=
true
security.user.name
=
admin
security.user.password
=
admin
amos-boot-system-latentdanger/pom.xml
View file @
66588777
...
@@ -23,6 +23,10 @@
...
@@ -23,6 +23,10 @@
<artifactId>
pagehelper
</artifactId>
<artifactId>
pagehelper
</artifactId>
<version>
5.1.10
</version>
<version>
5.1.10
</version>
</dependency>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-security
</artifactId>
</dependency>
</dependencies>
</dependencies>
<build>
<build>
<plugins>
<plugins>
...
...
amos-boot-system-latentdanger/src/main/resources/application.properties
View file @
66588777
...
@@ -61,4 +61,12 @@ feign.httpclient.connection-timeout=5000
...
@@ -61,4 +61,12 @@ feign.httpclient.connection-timeout=5000
video.fegin.name
=
video
video.fegin.name
=
video
latentDanger.feign.name
=
AMOS-LATENT-DANGER
latentDanger.feign.name
=
AMOS-LATENT-DANGER
Knowledgebase.fegin.name
=
AMOS-API-KNOWLEDGEBASE
Knowledgebase.fegin.name
=
AMOS-API-KNOWLEDGEBASE
\ No newline at end of file
## 消防救援保障部ID
fire-rescue
=
1432549862557130753
endpoints.enabled
=
false
management.security.enabled
=
true
security.user.name
=
admin
security.user.password
=
admin
amos-boot-system-maintenance/pom.xml
View file @
66588777
...
@@ -13,6 +13,10 @@
...
@@ -13,6 +13,10 @@
<artifactId>
amos-boot-module-maintenance-biz
</artifactId>
<artifactId>
amos-boot-module-maintenance-biz
</artifactId>
<version>
${amos-biz-boot.version}
</version>
<version>
${amos-biz-boot.version}
</version>
</dependency>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-security
</artifactId>
</dependency>
</dependencies>
</dependencies>
<build>
<build>
<plugins>
<plugins>
...
...
amos-boot-system-maintenance/src/main/resources/application.properties
View file @
66588777
...
@@ -67,3 +67,8 @@ eureka.instance.metadata-map.management.context-path=${server.servlet.context-pa
...
@@ -67,3 +67,8 @@ eureka.instance.metadata-map.management.context-path=${server.servlet.context-pa
eureka.instance.status-page-url-path
=
/actuator/info
eureka.instance.status-page-url-path
=
/actuator/info
eureka.instance.metadata-map.management.api-docs
=
http://localhost:${server.port}${server.servlet.context-path}/swagger-ui.html
eureka.instance.metadata-map.management.api-docs
=
http://localhost:${server.port}${server.servlet.context-path}/swagger-ui.html
endpoints.enabled
=
false
management.security.enabled
=
true
security.user.name
=
admin
security.user.password
=
admin
amos-boot-system-patrol/pom.xml
View file @
66588777
...
@@ -16,6 +16,10 @@
...
@@ -16,6 +16,10 @@
<artifactId>
amos-boot-module-patrol-biz
</artifactId>
<artifactId>
amos-boot-module-patrol-biz
</artifactId>
<version>
${amos-biz-boot.version}
</version>
<version>
${amos-biz-boot.version}
</version>
</dependency>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-security
</artifactId>
</dependency>
</dependencies>
</dependencies>
<build>
<build>
<plugins>
<plugins>
...
...
amos-boot-system-patrol/src/main/resources/application.properties
View file @
66588777
...
@@ -56,4 +56,10 @@ rule.definition.model-package=com.yeejoin.amos.patrol.business.entity.mybatis
...
@@ -56,4 +56,10 @@ rule.definition.model-package=com.yeejoin.amos.patrol.business.entity.mybatis
rule.definition.default-agency
=
STATE_GRID
rule.definition.default-agency
=
STATE_GRID
jcs.fegin.name
=
JCS
jcs.fegin.name
=
JCS
emergency.command.section.id
=
1418223840361709569
emergency.command.section.id
=
1418223840361709569
\ No newline at end of file
endpoints.enabled
=
false
management.security.enabled
=
true
security.user.name
=
admin
security.user.password
=
admin
amos-boot-system-supervision/pom.xml
View file @
66588777
...
@@ -33,6 +33,10 @@
...
@@ -33,6 +33,10 @@
<groupId>
cn.jpush.api
</groupId>
<groupId>
cn.jpush.api
</groupId>
<artifactId>
jpush-client
</artifactId>
<artifactId>
jpush-client
</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-security
</artifactId>
</dependency>
</dependencies>
</dependencies>
<build>
<build>
<plugins>
<plugins>
...
...
amos-boot-system-supervision/src/main/resources/application.properties
View file @
66588777
...
@@ -73,3 +73,8 @@ eureka.instance.metadata-map.management.context-path=${server.servlet.context-pa
...
@@ -73,3 +73,8 @@ eureka.instance.metadata-map.management.context-path=${server.servlet.context-pa
eureka.instance.status-page-url-path
=
/actuator/info
eureka.instance.status-page-url-path
=
/actuator/info
eureka.instance.metadata-map.management.api-docs
=
http://localhost:${server.port}${server.servlet.context-path}/swagger-ui.html
eureka.instance.metadata-map.management.api-docs
=
http://localhost:${server.port}${server.servlet.context-path}/swagger-ui.html
endpoints.enabled
=
false
management.security.enabled
=
true
security.user.name
=
admin
security.user.password
=
admin
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/dto/KV.java
0 → 100644
View file @
66588777
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
dto
;
import
lombok.Data
;
@Data
public
class
KV
{
private
String
name
;
private
Object
value
;
}
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/mapper/MsgLogMapper.java
View file @
66588777
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
mapper
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
mapper
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.MsgLog
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.KV
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.MsgLog
;
import
java.util.List
;
/**
/**
* 消息流水表 Mapper 接口
* 消息流水表 Mapper 接口
...
@@ -10,5 +13,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
...
@@ -10,5 +13,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @date 2022-04-20
* @date 2022-04-20
*/
*/
public
interface
MsgLogMapper
extends
BaseMapper
<
MsgLog
>
{
public
interface
MsgLogMapper
extends
BaseMapper
<
MsgLog
>
{
List
<
KV
>
getMsgType
();
}
}
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/resources/mapper/MsgLogMapper.xml
View file @
66588777
...
@@ -2,4 +2,10 @@
...
@@ -2,4 +2,10 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!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.MsgLogMapper"
>
<mapper
namespace=
"com.yeejoin.amos.boot.module.tzs.api.mapper.MsgLogMapper"
>
<select
id=
"getMsgType"
resultType=
"com.yeejoin.amos.boot.module.tzs.api.dto.KV"
>
SELECT msg_type AS value, msg_type_name AS name
FROM tz_msg_log
GROUP BY msg_type
</select>
</mapper>
</mapper>
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/MsgLogController.java
View file @
66588777
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
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
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.KV
;
import
java.util.List
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.MsgLogDto
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.MsgLogServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.MsgLogServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
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.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.List
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.MsgLogDto
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
/**
/**
* 消息流水表
* 消息流水表
...
@@ -92,14 +89,13 @@ public class MsgLogController extends BaseController {
...
@@ -92,14 +89,13 @@ public class MsgLogController extends BaseController {
* 列表分页查询
* 列表分页查询
*
*
* @param current 当前页
* @param current 当前页
* @param
current
每页大小
* @param
size
每页大小
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/page"
)
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"消息流水表分页查询"
,
notes
=
"消息流水表分页查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"消息流水表分页查询"
,
notes
=
"消息流水表分页查询"
)
public
ResponseModel
<
Page
<
MsgLogDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
public
ResponseModel
<
Page
<
MsgLogDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
(
value
=
"size"
)
int
size
)
{
Page
<
MsgLogDto
>
page
=
new
Page
<
MsgLogDto
>();
Page
<
MsgLogDto
>
page
=
new
Page
<
MsgLogDto
>();
page
.
setCurrent
(
current
);
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
page
.
setSize
(
size
);
...
@@ -126,8 +122,7 @@ public class MsgLogController extends BaseController {
...
@@ -126,8 +122,7 @@ public class MsgLogController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"告警数量统计"
,
notes
=
"告警数量统计"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"告警数量统计"
,
notes
=
"告警数量统计"
)
@GetMapping
(
value
=
"/count"
)
@GetMapping
(
value
=
"/count"
)
public
ResponseModel
<
Integer
>
countByTerminalType
(
public
ResponseModel
<
Integer
>
countByTerminalType
(
@RequestParam
(
value
=
"terminalType"
,
required
=
false
)
String
terminalType
)
{
@RequestParam
(
value
=
"terminalType"
,
required
=
false
)
String
terminalType
)
{
return
ResponseHelper
.
buildResponse
(
msgLogServiceImpl
.
countByTerminalType
(
terminalType
));
return
ResponseHelper
.
buildResponse
(
msgLogServiceImpl
.
countByTerminalType
(
terminalType
));
}
}
...
@@ -135,21 +130,56 @@ public class MsgLogController extends BaseController {
...
@@ -135,21 +130,56 @@ public class MsgLogController extends BaseController {
* 列表分页查询
* 列表分页查询
*
*
* @param current 当前页
* @param current 当前页
* @param
current
每页大小
* @param
size
每页大小
* @param terminalType 终端类型
* @param terminalType 终端类型
* @param isRead 是否未读
* @param isRead 是否未读
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/page/terminalType"
)
@GetMapping
(
value
=
"/page/terminalType"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"消息流水表分页查询"
,
notes
=
"消息流水表分页查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"消息流水表分页查询"
,
notes
=
"消息流水表分页查询"
)
public
ResponseModel
<
Page
<
MsgLogDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
public
ResponseModel
<
Page
<
MsgLogDto
>>
queryForPage
(
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"terminalType"
)
String
terminalType
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
value
=
"isRead"
)
Boolean
isRead
)
{
@RequestParam
(
required
=
false
)
String
terminalType
,
Page
<
MsgLogDto
>
page
=
new
Page
<
MsgLogDto
>();
@RequestParam
(
required
=
false
)
Boolean
isRead
,
@RequestParam
(
required
=
false
)
String
sendTimeStart
,
@RequestParam
(
required
=
false
)
String
sendTimeEnd
,
@RequestParam
(
required
=
false
)
String
msgType
,
@RequestParam
(
required
=
false
)
String
body
)
{
Page
<
MsgLogDto
>
page
=
new
Page
<>();
page
.
setCurrent
(
current
);
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
msgLogServiceImpl
.
queryForMsgLogByTerminalTypePage
(
page
,
terminalType
,
isRead
));
return
ResponseHelper
.
buildResponse
(
msgLogServiceImpl
.
queryForMsgLogByTerminalTypePage
(
page
,
terminalType
,
isRead
,
sendTimeStart
,
sendTimeEnd
,
msgType
,
body
));
}
/**
* 获取消息类型
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/msgType"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取消息类型"
)
public
ResponseModel
<
List
<
KV
>>
queryForPage
()
{
return
ResponseHelper
.
buildResponse
(
msgLogServiceImpl
.
getType
());
}
/**
* 全部已读
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/allRead"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"全部已读"
)
public
ResponseModel
<
Boolean
>
allRead
()
{
return
ResponseHelper
.
buildResponse
(
msgLogServiceImpl
.
allRead
());
}
/**
* 批量删除
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/deleteByIds"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"批量删除"
)
public
ResponseModel
<
Boolean
>
deleteByIds
(
@RequestBody
Map
<
String
,
List
<
Long
>>
body
)
{
return
ResponseHelper
.
buildResponse
(
msgLogServiceImpl
.
deleteByIds
(
body
.
get
(
"ids"
)));
}
}
}
}
\ No newline at end of file
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/MsgLogServiceImpl.java
View file @
66588777
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertMsgDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertMsgDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertPaperInfoDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertPaperInfoDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.KV
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.MsgLogDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.MsgLogDto
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.MsgLog
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.MsgLog
;
import
com.yeejoin.amos.boot.module.tzs.api.enums.TerminalTypeEnum
;
import
com.yeejoin.amos.boot.module.tzs.api.mapper.MsgLogMapper
;
import
com.yeejoin.amos.boot.module.tzs.api.mapper.MsgLogMapper
;
import
com.yeejoin.amos.boot.module.tzs.api.service.IMsgLogService
;
import
com.yeejoin.amos.boot.module.tzs.api.service.IMsgLogService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.StringUtils
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.util.LinkedList
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -26,7 +31,7 @@ import java.util.List;
...
@@ -26,7 +31,7 @@ import java.util.List;
* @date 2022-04-20
* @date 2022-04-20
*/
*/
@Service
@Service
public
class
MsgLogServiceImpl
extends
BaseService
<
MsgLogDto
,
MsgLog
,
MsgLogMapper
>
implements
IMsgLogService
{
public
class
MsgLogServiceImpl
extends
BaseService
<
MsgLogDto
,
MsgLog
,
MsgLogMapper
>
implements
IMsgLogService
{
Logger
logger
=
LoggerFactory
.
getLogger
(
MsgLogServiceImpl
.
class
);
Logger
logger
=
LoggerFactory
.
getLogger
(
MsgLogServiceImpl
.
class
);
...
@@ -36,26 +41,25 @@ public class MsgLogServiceImpl extends BaseService<MsgLogDto,MsgLog,MsgLogMapper
...
@@ -36,26 +41,25 @@ public class MsgLogServiceImpl extends BaseService<MsgLogDto,MsgLog,MsgLogMapper
/**
/**
* 分页查询
* 分页查询
*/
*/
public
Page
<
MsgLogDto
>
queryForMsgLogPage
(
Page
<
MsgLogDto
>
page
)
{
public
Page
<
MsgLogDto
>
queryForMsgLogPage
(
Page
<
MsgLogDto
>
page
)
{
return
this
.
queryForPage
(
page
,
null
,
false
);
return
this
.
queryForPage
(
page
,
null
,
false
);
}
}
/**
/**
* 列表查询 示例
* 列表查询 示例
*/
*/
public
List
<
MsgLogDto
>
queryForMsgLogList
()
{
public
List
<
MsgLogDto
>
queryForMsgLogList
()
{
return
this
.
queryForList
(
""
,
false
);
return
this
.
queryForList
(
""
,
false
);
}
}
public
List
<
MsgLogDto
>
queryForWebMsgLogList
(
String
terminalType
)
{
public
List
<
MsgLogDto
>
queryForWebMsgLogList
(
String
terminalType
)
{
return
this
.
queryForList
(
""
,
false
,
terminalType
);
return
this
.
queryForList
(
""
,
false
,
terminalType
);
}
}
public
List
<
AlertMsgDto
>
queryForAlertMsg
(
List
<
String
>
regionCodes
)
{
public
List
<
AlertMsgDto
>
queryForAlertMsg
(
List
<
String
>
regionCodes
)
{
List
<
AlertMsgDto
>
alertMsgDtoList
=
Lists
.
newArrayList
();
List
<
AlertMsgDto
>
alertMsgDtoList
=
Lists
.
newArrayList
();
// 查询电梯警情预报消息
// 查询电梯警情预报消息
List
<
AlertPaperInfoDto
>
alertPaperInfoDtoList
=
List
<
AlertPaperInfoDto
>
alertPaperInfoDtoList
=
alertCalledService
.
getAlertPaperInfoList
(
alertCalledService
.
authRegionCodeList
(
regionCodes
),
false
);
alertCalledService
.
getAlertPaperInfoList
(
alertCalledService
.
authRegionCodeList
(
regionCodes
),
false
);
if
(!
ValidationUtil
.
isEmpty
(
alertPaperInfoDtoList
))
{
if
(!
ValidationUtil
.
isEmpty
(
alertPaperInfoDtoList
))
{
alertPaperInfoDtoList
.
forEach
(
msg
->
{
alertPaperInfoDtoList
.
forEach
(
msg
->
{
AlertMsgDto
alertMsgDto
=
new
AlertMsgDto
();
AlertMsgDto
alertMsgDto
=
new
AlertMsgDto
();
...
@@ -82,15 +86,51 @@ public class MsgLogServiceImpl extends BaseService<MsgLogDto,MsgLog,MsgLogMapper
...
@@ -82,15 +86,51 @@ public class MsgLogServiceImpl extends BaseService<MsgLogDto,MsgLog,MsgLogMapper
alertMsgDtoList
.
add
(
alertMsgDto
);
alertMsgDtoList
.
add
(
alertMsgDto
);
});
});
}
}
return
alertMsgDtoList
;
return
alertMsgDtoList
;
}
}
public
Integer
countByTerminalType
(
String
terminalType
)
{
public
Integer
countByTerminalType
(
String
terminalType
)
{
return
this
.
list
(
new
LambdaQueryWrapper
<
MsgLog
>().
eq
(
StringUtils
.
isNotEmpty
(
terminalType
),
MsgLog:
:
getTerminalType
,
terminalType
)).
size
();
return
this
.
list
(
new
LambdaQueryWrapper
<
MsgLog
>().
eq
(
StringUtils
.
hasText
(
terminalType
),
MsgLog:
:
getTerminalType
,
terminalType
)).
size
();
}
public
Page
<
MsgLogDto
>
queryForMsgLogByTerminalTypePage
(
Page
<
MsgLogDto
>
page
,
String
terminalType
,
Boolean
isRead
,
String
sendTimeStart
,
String
sendTimeEnd
,
String
msgType
,
String
body
)
{
Page
<
MsgLog
>
msgLogPage
=
new
Page
<>(
page
.
getCurrent
(),
page
.
getSize
());
LambdaQueryWrapper
<
MsgLog
>
wrapper
=
new
LambdaQueryWrapper
<>();
if
(!
StringUtils
.
hasText
(
terminalType
))
{
terminalType
=
TerminalTypeEnum
.
TERMINAL_TYPE_WEB
.
getCode
();
}
wrapper
.
eq
(
MsgLog:
:
getTerminalType
,
terminalType
);
wrapper
.
eq
(
isRead
!=
null
,
MsgLog:
:
getIsRead
,
isRead
);
wrapper
.
ge
(
StringUtils
.
hasText
(
sendTimeStart
),
MsgLog:
:
getSendTime
,
sendTimeStart
);
wrapper
.
le
(
StringUtils
.
hasText
(
sendTimeEnd
),
MsgLog:
:
getSendTime
,
sendTimeEnd
);
wrapper
.
eq
(
StringUtils
.
hasText
(
msgType
),
MsgLog:
:
getMsgType
,
msgType
);
wrapper
.
eq
(
MsgLog:
:
getIsDelete
,
0
);
wrapper
.
like
(
StringUtils
.
hasText
(
body
),
MsgLog:
:
getBody
,
body
);
page
(
msgLogPage
,
wrapper
);
LinkedList
<
MsgLogDto
>
msgLogDtos
=
new
LinkedList
<>();
for
(
MsgLog
record
:
msgLogPage
.
getRecords
())
{
MsgLogDto
msgLogDto
=
new
MsgLogDto
();
BeanUtils
.
copyProperties
(
record
,
msgLogDto
);
msgLogDtos
.
add
(
msgLogDto
);
}
page
.
setRecords
(
msgLogDtos
);
return
page
;
}
}
public
Page
<
MsgLogDto
>
queryForMsgLogByTerminalTypePage
(
Page
<
MsgLogDto
>
page
,
String
terminalType
,
Boolean
isRead
)
{
public
List
<
KV
>
getType
(
)
{
return
this
.
queryForPage
(
page
,
"rec_date"
,
false
,
terminalType
,
isRead
);
return
getBaseMapper
().
getMsgType
(
);
}
}
}
\ No newline at end of file
public
boolean
allRead
()
{
LambdaUpdateWrapper
<
MsgLog
>
wrapper
=
new
LambdaUpdateWrapper
<>();
wrapper
.
eq
(
MsgLog:
:
getIsRead
,
0
).
set
(
MsgLog:
:
getIsRead
,
1
);
return
update
(
wrapper
);
}
public
boolean
deleteByIds
(
List
<
Long
>
longs
)
{
LambdaUpdateWrapper
<
MsgLog
>
wrapper
=
new
LambdaUpdateWrapper
<>();
wrapper
.
in
(
MsgLog:
:
getSequenceNbr
,
longs
).
set
(
MsgLog:
:
getIsDelete
,
1
);
return
update
(
wrapper
);
}
}
amos-boot-utils/amos-boot-utils-video/src/main/java/com/yeejoin/amos/video/config/ElasticSearchClientConfig.java
View file @
66588777
...
@@ -24,6 +24,11 @@ public class ElasticSearchClientConfig {
...
@@ -24,6 +24,11 @@ public class ElasticSearchClientConfig {
@Value
(
"${spring.elasticsearch.rest.uris}"
)
@Value
(
"${spring.elasticsearch.rest.uris}"
)
private
String
uris
;
private
String
uris
;
@Value
(
"${elasticsearch.username}"
)
private
String
username
;
@Value
(
"${elasticsearch.password}"
)
private
String
password
;
@Bean
@Bean
@Qualifier
(
"highLevelClient"
)
@Qualifier
(
"highLevelClient"
)
...
@@ -35,8 +40,9 @@ public class ElasticSearchClientConfig {
...
@@ -35,8 +40,9 @@ public class ElasticSearchClientConfig {
HttpHost
httpHost
=
new
HttpHost
(
parts
[
0
],
Integer
.
parseInt
(
parts
[
1
]),
"http"
);
HttpHost
httpHost
=
new
HttpHost
(
parts
[
0
],
Integer
.
parseInt
(
parts
[
1
]),
"http"
);
RestClientBuilder
builder
=
RestClient
.
builder
(
httpHost
);
RestClientBuilder
builder
=
RestClient
.
builder
(
httpHost
);
//增加安全配置,使用kibana,勿删
//增加安全配置,使用kibana,勿删
final
CredentialsProvider
credentialsProvider
=
new
BasicCredentialsProvider
();
final
CredentialsProvider
credentialsProvider
=
new
BasicCredentialsProvider
();
credentialsProvider
.
setCredentials
(
AuthScope
.
ANY
,
new
UsernamePasswordCredentials
(
"elastic"
,
"es123456"
));
credentialsProvider
.
setCredentials
(
AuthScope
.
ANY
,
new
UsernamePasswordCredentials
(
username
,
password
));
builder
.
setRequestConfigCallback
(
new
RestClientBuilder
.
RequestConfigCallback
()
{
builder
.
setRequestConfigCallback
(
new
RestClientBuilder
.
RequestConfigCallback
()
{
// 该方法接收一个RequestConfig.Builder对象,对该对象进行修改后然后返回。
// 该方法接收一个RequestConfig.Builder对象,对该对象进行修改后然后返回。
@Override
@Override
...
@@ -47,13 +53,13 @@ public class ElasticSearchClientConfig {
...
@@ -47,13 +53,13 @@ public class ElasticSearchClientConfig {
}
}
});
// 调整最大重试超时时间(默认为30秒).setMaxRetryTimeoutMillis(60000);
});
// 调整最大重试超时时间(默认为30秒).setMaxRetryTimeoutMillis(60000);
//增加安全配置,使用kibana,勿删
//增加安全配置,使用kibana,勿删
//
builder.setHttpClientConfigCallback(new RestClientBuilder.HttpClientConfigCallback() {
builder
.
setHttpClientConfigCallback
(
new
RestClientBuilder
.
HttpClientConfigCallback
()
{
//
@Override
@Override
//
public HttpAsyncClientBuilder customizeHttpClient(HttpAsyncClientBuilder httpClientBuilder) {
public
HttpAsyncClientBuilder
customizeHttpClient
(
HttpAsyncClientBuilder
httpClientBuilder
)
{
//
httpClientBuilder.disableAuthCaching();
httpClientBuilder
.
disableAuthCaching
();
//
return httpClientBuilder.setDefaultCredentialsProvider(credentialsProvider);
return
httpClientBuilder
.
setDefaultCredentialsProvider
(
credentialsProvider
);
//
}
}
//
});
});
return
new
RestHighLevelClient
(
builder
);
return
new
RestHighLevelClient
(
builder
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
IllegalStateException
(
"Invalid ES nodes "
+
"property '"
+
uris
+
"'"
,
e
);
throw
new
IllegalStateException
(
"Invalid ES nodes "
+
"property '"
+
uris
+
"'"
,
e
);
...
...
amos-boot-utils/amos-boot-utils-video/src/main/resources/application-dev.properties
View file @
66588777
...
@@ -16,6 +16,8 @@ biz.elasticsearch.address=172.16.10.66
...
@@ -16,6 +16,8 @@ biz.elasticsearch.address=172.16.10.66
spring.data.elasticsearch.cluster-name
=
elasticsearch
spring.data.elasticsearch.cluster-name
=
elasticsearch
spring.data.elasticsearch.cluster-nodes
=
${biz.elasticsearch.address}:9300
spring.data.elasticsearch.cluster-nodes
=
${biz.elasticsearch.address}:9300
spring.elasticsearch.rest.uris
=
http://${biz.elasticsearch.address}:9200
spring.elasticsearch.rest.uris
=
http://${biz.elasticsearch.address}:9200
elasticsearch.username
=
elastic
elasticsearch.password
=
123456
##biz custem properties
##biz custem properties
biz.hk.video.url
=
http://11.11.16.12:9017/artemis-web/debug
biz.hk.video.url
=
http://11.11.16.12:9017/artemis-web/debug
...
...
pom.xml
View file @
66588777
...
@@ -37,6 +37,12 @@
...
@@ -37,6 +37,12 @@
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
<artifactId>
spring-boot-starter-web
</artifactId>
<exclusions>
<exclusion>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-logging
</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
com.netflix.hystrix
</groupId>
<groupId>
com.netflix.hystrix
</groupId>
...
@@ -279,6 +285,11 @@
...
@@ -279,6 +285,11 @@
<artifactId>
json-lib
</artifactId>
<artifactId>
json-lib
</artifactId>
<version>
2.4
</version>
<version>
2.4
</version>
</dependency>
</dependency>
<dependency>
<groupId>
org.apache.logging.log4j
</groupId>
<artifactId>
log4j-api
</artifactId>
<version>
2.17.0
</version>
</dependency>
</dependencies>
</dependencies>
</dependencyManagement>
</dependencyManagement>
<repositories>
<repositories>
...
...
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