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
d0f65e16
Commit
d0f65e16
authored
Oct 13, 2021
by
chenzhao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://172.16.10.76/moa/amos-boot-biz
into developer
parents
7eddaafc
d87545b6
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
148 additions
and
73 deletions
+148
-73
LatentDangerState.java
...oin/amos/latentdanger/common/enums/LatentDangerState.java
+6
-6
AlertCalledMapper.xml
...e-tzs-api/src/main/resources/mapper/AlertCalledMapper.xml
+3
-2
LatentDangerMapper.java
.../latentdanger/business/dao/mapper/LatentDangerMapper.java
+2
-2
LatentDangerServiceImpl.java
...danger/business/service/impl/LatentDangerServiceImpl.java
+23
-10
AsyncTask.java
...a/com/yeejoin/amos/latentdanger/core/async/AsyncTask.java
+6
-1
ElevatorController.java
...os/boot/module/tzs/biz/controller/ElevatorController.java
+1
-1
ESElevatorServiceImpl.java
...ot/module/tzs/biz/service/impl/ESElevatorServiceImpl.java
+51
-46
jcs-1.0.0.0.xml
...ystem-jcs/src/main/resources/db/changelog/jcs-1.0.0.0.xml
+28
-0
application-dev.properties
...atentdanger/src/main/resources/application-dev.properties
+1
-0
latent-danger-1.0.0.xml
...r/src/main/resources/db/changelog/latent-danger-1.0.0.xml
+10
-0
LatentDangerMapper.xml
...anger/src/main/resources/db/mapper/LatentDangerMapper.xml
+16
-4
pom.xml
pom.xml
+1
-1
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-latentdanger-api/src/main/java/com/yeejoin/amos/latentdanger/common/enums/LatentDangerState.java
View file @
d0f65e16
...
@@ -55,27 +55,27 @@ public interface LatentDangerState {
...
@@ -55,27 +55,27 @@ public interface LatentDangerState {
/**
/**
* 提交整改资料
* 提交整改资料
*/
*/
提交整改资料
(
"提交整改资料"
,
"governFileSubmit"
,
"governChargerConfirm"
,
""
,
"
2
"
),
提交整改资料
(
"提交整改资料"
,
"governFileSubmit"
,
"governChargerConfirm"
,
""
,
"
3
"
),
/**
/**
* 整改检查组长确认
* 整改检查组长确认
*/
*/
整改检查组长确认
(
"整改检查组长确认"
,
"governLeaderConfirm"
,
"governChargerConfirm"
,
"governFileSubmit"
,
"
3
"
),
整改检查组长确认
(
"整改检查组长确认"
,
"governLeaderConfirm"
,
"governChargerConfirm"
,
"governFileSubmit"
,
"
4
"
),
/**
/**
* 整改检查负责人确认
* 整改检查负责人确认
*/
*/
整改检查负责人确认
(
"整改检查负责人确认"
,
"governChargerConfirm"
,
"governLeadershipConfirm"
,
"governFileSubmit"
,
"
3
"
),
整改检查负责人确认
(
"整改检查负责人确认"
,
"governChargerConfirm"
,
"governLeadershipConfirm"
,
"governFileSubmit"
,
"
4
"
),
/**
/**
* 整改检查分管领导确认(根据计划类型不同,分管领导确认完流程不同)
* 整改检查分管领导确认(根据计划类型不同,分管领导确认完流程不同)
*/
*/
整改检查分管领导确认
(
"整改检查分管领导确认"
,
"governLeadershipConfirm"
,
"governLeaderReviewConfirm"
,
"governFileSubmit"
,
"
3
"
),
整改检查分管领导确认
(
"整改检查分管领导确认"
,
"governLeadershipConfirm"
,
"governLeaderReviewConfirm"
,
"governFileSubmit"
,
"
4
"
),
/**
/**
* 整改检查组长复查确认
* 整改检查组长复查确认
*/
*/
整改检查组长复查确认
(
"整改检查组长复查确认"
,
"governLeaderReviewConfirm"
,
"governSecondReviewConfirm"
,
"governFileSubmit"
,
"
3
"
),
整改检查组长复查确认
(
"整改检查组长复查确认"
,
"governLeaderReviewConfirm"
,
"governSecondReviewConfirm"
,
"governFileSubmit"
,
"
4
"
),
/**
/**
* 整改二次审核确认
* 整改二次审核确认
*/
*/
整改二次审核确认
(
"整改二次审核确认"
,
"governSecondReviewConfirm"
,
"endOfGovernance"
,
"governFileSubmit"
,
"
3
"
),
整改二次审核确认
(
"整改二次审核确认"
,
"governSecondReviewConfirm"
,
"endOfGovernance"
,
"governFileSubmit"
,
"
4
"
),
/**
/**
* 整改完毕
* 整改完毕
*/
*/
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/resources/mapper/AlertCalledMapper.xml
View file @
d0f65e16
...
@@ -261,7 +261,7 @@
...
@@ -261,7 +261,7 @@
<select
id=
"getTodayEmergencyCount"
resultType=
"java.util.Map"
>
<select
id=
"getTodayEmergencyCount"
resultType=
"java.util.Map"
>
SELECT
SELECT
COUNT(tz.alarm_type_code = '960'
) as sleepyTncidentTotal,
sum(case when tz.alarm_type_code = '960' then 1 else 0 end
) as sleepyTncidentTotal,
sum(
sum(
CASE
CASE
WHEN
WHEN
...
@@ -412,9 +412,10 @@
...
@@ -412,9 +412,10 @@
AND field_code IN ('injured_num', 'die_num')
AND field_code IN ('injured_num', 'die_num')
and tz_alert_form_value.is_delete=0
and tz_alert_form_value.is_delete=0
group by alert_called_id
group by alert_called_id
)
)
and alarm_type_code = '960' and is_delete=0
) tzs left join tcb_elevator te on tzs.equipment_id = te.sequence_nbr
) tzs left join tcb_elevator te on tzs.equipment_id = te.sequence_nbr
where 1=1
where 1=1
and tzs.call_time >= (select current_date())
and tzs.call_time >= (select current_date())
and (select date_add(current_date(), interval 1 day)) >= tzs.call_time
and (select date_add(current_date(), interval 1 day)) >= tzs.call_time
<if
test=
"regionCode != null and regionCode != ''"
>
<if
test=
"regionCode != null and regionCode != ''"
>
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-latentdanger-biz/src/main/java/com/yeejoin/amos/latentdanger/business/dao/mapper/LatentDangerMapper.java
View file @
d0f65e16
...
@@ -29,7 +29,7 @@ public interface LatentDangerMapper extends BaseMapper<LatentDanger> {
...
@@ -29,7 +29,7 @@ public interface LatentDangerMapper extends BaseMapper<LatentDanger> {
LatentDangerBo
getByInstanceId
(
String
instanceId
);
LatentDangerBo
getByInstanceId
(
String
instanceId
);
List
<
LatentDangerBo
>
listOfOvertime
();
List
<
LatentDangerBo
>
listOfOvertime
(
@Param
(
"dangerStateList"
)
List
<
String
>
dangerStateList
);
Integer
countNotFinishByFlowId
(
String
flowId
);
Integer
countNotFinishByFlowId
(
String
flowId
);
...
@@ -79,5 +79,5 @@ public interface LatentDangerMapper extends BaseMapper<LatentDanger> {
...
@@ -79,5 +79,5 @@ public interface LatentDangerMapper extends BaseMapper<LatentDanger> {
* @param paramMap
* @param paramMap
* @return
* @return
*/
*/
IPage
<
LatentDanger
>
selectPageByParam
(
Page
<
LatentDanger
>
page
,
@Param
(
"paramMap"
)
Map
<
String
,
Object
>
paramMap
);
IPage
<
LatentDanger
>
selectPageByParam
(
@Param
(
"page"
)
Page
<
LatentDanger
>
page
,
@Param
(
"paramMap"
)
Map
<
String
,
Object
>
paramMap
);
}
}
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 @
d0f65e16
...
@@ -273,11 +273,11 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
...
@@ -273,11 +273,11 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
// LatentDangerPatrolBo patrolBo = latentDangerPatrolMapper.getByDangerId(latentDanger.getId());
// LatentDangerPatrolBo patrolBo = latentDangerPatrolMapper.getByDangerId(latentDanger.getId());
// sendMessage(latentDanger, LatentDangerExecuteTypeEnum.填写隐患完成, patrolBo,
// sendMessage(latentDanger, LatentDangerExecuteTypeEnum.填写隐患完成, patrolBo,
// "巡检隐患排查与治理", this.getNextExecuteUsers(latentDanger.getInstanceId()), userRealName, departmentName);
// "巡检隐患排查与治理", this.getNextExecuteUsers(latentDanger.getInstanceId()), userRealName, departmentName);
try
{
//
try {
webMqttComponent
.
publish
(
dangerTopic
,
""
);
//
webMqttComponent.publish(dangerTopic, "");
}
catch
(
Exception
e
)
{
//
} catch (Exception e) {
logger
.
error
(
"巡检隐患提交数字换流站页面推送失败-----------"
+
e
.
getMessage
());
//
logger.error("巡检隐患提交数字换流站页面推送失败-----------" + e.getMessage());
}
//
}
dangerList
.
add
(
latentDanger
);
dangerList
.
add
(
latentDanger
);
}
}
...
@@ -981,7 +981,8 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
...
@@ -981,7 +981,8 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
dangerState
=
"taskDispatch,governFileSubmit,governLeaderConfirm,governChargerConfirm,"
+
dangerState
=
"taskDispatch,governFileSubmit,governLeaderConfirm,governChargerConfirm,"
+
"governLeadershipConfirm,governLeaderReviewConfirm,governSecondReviewConfirm"
;
"governLeadershipConfirm,governLeaderReviewConfirm,governSecondReviewConfirm"
;
}
}
List
<
LatentDangerBo
>
overtimeList
=
latentDangerMapper
.
listOfOvertime
();
List
<
String
>
dangerStateList
=
Lists
.
newArrayList
(
dangerState
.
split
(
","
));
List
<
LatentDangerBo
>
overtimeList
=
latentDangerMapper
.
listOfOvertime
(
dangerStateList
);
LambdaQueryWrapper
<
LatentDanger
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
LatentDanger
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
// queryWrapper
// queryWrapper
List
<
LatentDanger
>
overtimeDangerList
=
this
.
baseMapper
.
selectList
(
queryWrapper
);
List
<
LatentDanger
>
overtimeDangerList
=
this
.
baseMapper
.
selectList
(
queryWrapper
);
...
@@ -1254,8 +1255,8 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
...
@@ -1254,8 +1255,8 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
if
((
"supervised"
.
equals
(
planType
)
&&
if
((
"supervised"
.
equals
(
planType
)
&&
LatentDangerState
.
SupervisionDangerStateEnum
.
整改检查分管领导确认
.
getCode
().
equals
(
currentDangerState
))
LatentDangerState
.
SupervisionDangerStateEnum
.
整改检查分管领导确认
.
getCode
().
equals
(
currentDangerState
))
||
LatentDangerState
.
SupervisionDangerStateEnum
.
整改二次审核确认
.
getCode
().
equals
(
currentDangerState
))
{
||
LatentDangerState
.
SupervisionDangerStateEnum
.
整改二次审核确认
.
getCode
().
equals
(
currentDangerState
))
{
latentDanger
.
setDangerState
(
LatentDangerState
.
SupervisionDangerStateEnum
.
整改完毕
.
getCode
()
);
nextState
=
LatentDangerState
.
SupervisionDangerStateEnum
.
整改完毕
.
getCode
(
);
latentDanger
.
setDangerStateName
(
LatentDangerState
.
SupervisionDangerStateEnum
.
整改完毕
.
getName
()
);
nextStateName
=
LatentDangerState
.
SupervisionDangerStateEnum
.
整改完毕
.
getName
(
);
}
}
executeResultMsg
=
currentStateEnum
.
getName
()
+
ExecuteTypeEnum
.
通过
.
getName
();
executeResultMsg
=
currentStateEnum
.
getName
()
+
ExecuteTypeEnum
.
通过
.
getName
();
}
else
{
}
else
{
...
@@ -1806,9 +1807,21 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
...
@@ -1806,9 +1807,21 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
if
(!
ValidationUtil
.
isEmpty
(
dangerIdList
))
{
if
(!
ValidationUtil
.
isEmpty
(
dangerIdList
))
{
pageParam
.
put
(
"dangerIds"
,
dangerIdList
);
pageParam
.
put
(
"dangerIds"
,
dangerIdList
);
}
}
Page
page
=
new
Page
();
if
(
pageParam
.
get
(
"current"
)
instanceof
String
&&
pageParam
.
get
(
"size"
)
instanceof
String
)
{
int
current
=
Integer
.
valueOf
((
String
)
pageParam
.
get
(
"current"
));
int
size
=
Integer
.
valueOf
((
String
)
pageParam
.
get
(
"current"
));
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
}
else
{
page
.
setCurrent
((
Integer
)(
pageParam
.
get
(
"current"
)));
page
.
setSize
((
Integer
)(
pageParam
.
get
(
"size"
)));
}
if
(
ValidationUtil
.
isEmpty
(
pageParam
.
get
(
"order"
)))
{
pageParam
.
put
(
"order"
,
"1"
);
}
IPage
<
LatentDanger
>
iPage
=
this
.
baseMapper
.
selectPageByParam
(
new
Page
(((
Integer
)
pageParam
.
get
(
"current"
)).
longValue
(),
IPage
<
LatentDanger
>
iPage
=
this
.
baseMapper
.
selectPageByParam
(
page
,
(
Map
<
String
,
Object
>)
pageParam
);
((
Integer
)
pageParam
.
get
(
"size"
)).
longValue
()),
(
Map
<
String
,
Object
>)
pageParam
);
Map
<
String
,
Object
>
buildingAbsolutePositionMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
buildingAbsolutePositionMap
=
new
HashMap
<>();
if
(!
ValidationUtil
.
isEmpty
(
iPage
.
getRecords
()))
{
if
(!
ValidationUtil
.
isEmpty
(
iPage
.
getRecords
()))
{
try
{
try
{
...
...
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 @
d0f65e16
...
@@ -4,6 +4,8 @@ import com.alibaba.fastjson.JSONArray;
...
@@ -4,6 +4,8 @@ import com.alibaba.fastjson.JSONArray;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Maps
;
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.JPushTypeEnum
;
import
com.yeejoin.amos.latentdanger.business.param.PushMsgParam
;
import
com.yeejoin.amos.latentdanger.business.param.PushMsgParam
;
import
com.yeejoin.amos.latentdanger.business.util.Toke
;
import
com.yeejoin.amos.latentdanger.business.util.Toke
;
...
@@ -92,7 +94,10 @@ public class AsyncTask {
...
@@ -92,7 +94,10 @@ public class AsyncTask {
if
(
pointName
!=
null
)
{
if
(
pointName
!=
null
)
{
body
+=
"关联检查点:"
+
pointName
+
TAB
;
body
+=
"关联检查点:"
+
pointName
+
TAB
;
}
}
saveAndSendMsg
(
orgCode
,
informerList
,
msgTypeEnum
.
getTitle
(),
body
,
msgTypeEnum
.
getMsgType
(),
riskFactorId
,
null
,
""
);
MessageModel
messageModel
=
new
MessageModel
();
messageModel
.
setBody
(
body
);
// Systemctl.messageClient.create(messageModel);
// saveAndSendMsg(orgCode, informerList, msgTypeEnum.getTitle(), body, msgTypeEnum.getMsgType(), riskFactorId, null, "");
}
}
private
void
saveAndSendMsg
(
String
orgCode
,
String
informerList
,
private
void
saveAndSendMsg
(
String
orgCode
,
String
informerList
,
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/ElevatorController.java
View file @
d0f65e16
...
@@ -395,7 +395,7 @@ public class ElevatorController extends BaseController {
...
@@ -395,7 +395,7 @@ public class ElevatorController extends BaseController {
IPage
<
Elevator
>
elevatorPage
=
new
Page
<>();
IPage
<
Elevator
>
elevatorPage
=
new
Page
<>();
Integer
count
=
elevatorService
.
count
();
Integer
count
=
elevatorService
.
count
();
for
(
int
i
=
0
;
i
<=
(
ValidationUtil
.
isEmpty
(
num
)
?
count
:
num
);
i
++
)
{
for
(
int
i
=
0
;
i
<=
(
ValidationUtil
.
isEmpty
(
num
)
?
count
%
500
:
num
);
++
i
)
{
elevatorPage
.
setCurrent
(
i
);
elevatorPage
.
setCurrent
(
i
);
elevatorPage
.
setSize
(
500
);
elevatorPage
.
setSize
(
500
);
elevatorPage
=
elevatorService
.
page
(
elevatorPage
);
elevatorPage
=
elevatorService
.
page
(
elevatorPage
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/ESElevatorServiceImpl.java
View file @
d0f65e16
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.tzs.biz.service.impl;
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.tzs.biz.service.impl;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.EsElevatorDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.EsElevatorDto
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.AlertCalled
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.AlertCalled
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.Elevator
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.Elevator
;
...
@@ -16,10 +17,14 @@ import org.springframework.data.elasticsearch.core.SearchHit;
...
@@ -16,10 +17,14 @@ import org.springframework.data.elasticsearch.core.SearchHit;
import
org.springframework.data.elasticsearch.core.SearchHits
;
import
org.springframework.data.elasticsearch.core.SearchHits
;
import
org.springframework.data.elasticsearch.core.query.NativeSearchQueryBuilder
;
import
org.springframework.data.elasticsearch.core.query.NativeSearchQueryBuilder
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.LinkedList
;
import
java.util.LinkedList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
/**
*
*
...
@@ -64,17 +69,7 @@ public class ESElevatorServiceImpl {
...
@@ -64,17 +69,7 @@ public class ESElevatorServiceImpl {
public
EsElevator
saveEsElevatorToES
(
Elevator
elevator
)
public
EsElevator
saveEsElevatorToES
(
Elevator
elevator
)
{
{
EsElevator
esElevator
=
new
EsElevator
();
EsElevator
esElevator
=
new
EsElevator
();
esElevator
.
setSequenceNbr
(
elevator
.
getSequenceNbr
());
Bean
.
toPo
(
elevator
,
esElevator
);
esElevator
.
setProvince
(
elevator
.
getProvince
());
esElevator
.
setAddress
(
elevator
.
getAddress
());
esElevator
.
setCity
(
elevator
.
getCity
());
esElevator
.
setDistrict
(
elevator
.
getDistrict
());
esElevator
.
setLatitude
(
elevator
.
getLatitude
());
esElevator
.
setLongitude
(
elevator
.
getLongitude
());
esElevator
.
setRegisterCode
(
elevator
.
getRegisterCode
());
esElevator
.
setRegionCode
(
elevator
.
getRegionCode
());
esElevator
.
setRescueCode
(
elevator
.
getRescueCode
());
esElavtorRepository
.
save
(
esElevator
);
esElavtorRepository
.
save
(
esElevator
);
return
esElevator
;
return
esElevator
;
}
}
...
@@ -93,6 +88,7 @@ public class ESElevatorServiceImpl {
...
@@ -93,6 +88,7 @@ public class ESElevatorServiceImpl {
String
address
=
elevatorDto
.
getAddress
();
String
address
=
elevatorDto
.
getAddress
();
String
regionCode
=
elevatorDto
.
getRegionCode
();
String
regionCode
=
elevatorDto
.
getRegionCode
();
String
alertId
=
elevatorDto
.
getAlertId
();
String
alertId
=
elevatorDto
.
getAlertId
();
Long
equipmentId
=
elevatorDto
.
getSequenceNbr
();
/**
/**
* 通用匹配规则,条件构建
* 通用匹配规则,条件构建
...
@@ -102,31 +98,33 @@ public class ESElevatorServiceImpl {
...
@@ -102,31 +98,33 @@ public class ESElevatorServiceImpl {
BoolQueryBuilder
qb0
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
qb0
=
QueryBuilders
.
boolQuery
();
LambdaQueryWrapper
<
AlertCalled
>
queryWrapper
=
new
LambdaQueryWrapper
();
LambdaQueryWrapper
<
AlertCalled
>
queryWrapper
=
new
LambdaQueryWrapper
();
if
(!
ValidationUtil
.
isEmpty
(
alarmTypeCode
))
{
if
(!
ValidationUtil
.
isEmpty
(
alarmTypeCode
)
&&
!
"all"
.
equals
(
alarmTypeCode
)
)
{
queryWrapper
.
eq
(
AlertCalled:
:
getAlarmTypeCode
,
alarmTypeCode
);
queryWrapper
.
eq
(
AlertCalled:
:
getAlarmTypeCode
,
alarmTypeCode
);
}
}
AlertCalled
alertCalled
=
null
;
AlertCalled
alertCalled
=
null
;
List
<
AlertCalled
>
alertCalleds
=
null
;
List
<
AlertCalled
>
alertCalleds
=
null
;
// if(!ValidationUtil.isEmpty(alertId)) {
if
(!
ValidationUtil
.
isEmpty
(
alertId
))
{
// alertCalled = iAlertCalledService.getById(elevatorDto.getAlertId());
alertCalled
=
iAlertCalledService
.
getById
(
elevatorDto
.
getAlertId
());
// BoolQueryBuilder qb4 = QueryBuilders.boolQuery();
BoolQueryBuilder
qb4
=
QueryBuilders
.
boolQuery
();
// qb4.must(QueryBuilders.termQuery("sequenceNbr", alertCalled.getEquipmentId()));
qb4
.
must
(
QueryBuilders
.
termQuery
(
"sequenceNbr"
,
alertCalled
.
getEquipmentId
()));
// boolMust.must(qb4);
boolMust
.
must
(
qb4
);
// } else {
}
else
{
// if(elevatorDto.getIsToday() != null && elevatorDto.getIsToday()) {
if
(!
ValidationUtil
.
isEmpty
(
alarmTypeCode
))
{
// queryWrapper.ge(AlertCalled::getCallTime, DateUtils.stampToDate(System.currentTimeMillis(),DateUtils.DATE_PATTERN));
if
(
elevatorDto
.
getIsToday
()
!=
null
&&
elevatorDto
.
getIsToday
())
{
// queryWrapper.le(AlertCalled::getCallTime, DateUtils.stampToDate(DateUtils.dateAddDays(new Date(),1).getTime(),DateUtils.DATE_PATTERN));
queryWrapper
.
ge
(
AlertCalled:
:
getCallTime
,
DateUtils
.
stampToDate
(
System
.
currentTimeMillis
(),
DateUtils
.
DATE_PATTERN
));
// }
queryWrapper
.
le
(
AlertCalled:
:
getCallTime
,
DateUtils
.
stampToDate
(
DateUtils
.
dateAddDays
(
new
Date
(),
1
).
getTime
(),
DateUtils
.
DATE_PATTERN
));
// alertCalleds = iAlertCalledService.list(queryWrapper);
}
// List<Long> stringList = new ArrayList<>();
alertCalleds
=
iAlertCalledService
.
list
(
queryWrapper
);
// for (AlertCalled al: alertCalleds
List
<
Long
>
stringList
=
new
ArrayList
<>();
// ) {
for
(
AlertCalled
al:
alertCalleds
// stringList.add(al.getEquipmentId());
)
{
// }
stringList
.
add
(
al
.
getEquipmentId
());
// List<Long> listL = stringList.stream().distinct().collect(Collectors.toList());
}
// qb0.should(QueryBuilders.termsQuery("sequenceNbr", listL.toArray()));
List
<
Long
>
listL
=
stringList
.
stream
().
distinct
().
collect
(
Collectors
.
toList
());
// boolMust.must(qb0);
qb0
.
should
(
QueryBuilders
.
termsQuery
(
"sequenceNbr"
,
listL
.
toArray
()));
// }
boolMust
.
must
(
qb0
);
}
}
if
(!
ValidationUtil
.
isEmpty
(
address
))
{
if
(!
ValidationUtil
.
isEmpty
(
address
))
{
...
@@ -143,6 +141,12 @@ public class ESElevatorServiceImpl {
...
@@ -143,6 +141,12 @@ public class ESElevatorServiceImpl {
boolMust
.
must
(
qb2
);
boolMust
.
must
(
qb2
);
}
}
if
(!
ValidationUtil
.
isEmpty
(
equipmentId
))
{
BoolQueryBuilder
qb3
=
QueryBuilders
.
boolQuery
().
filter
(
QueryBuilders
.
termQuery
(
"sequenceNbr"
,
equipmentId
));
boolMust
.
must
(
qb3
);
}
// 创建查询构造器
// 创建查询构造器
NativeSearchQueryBuilder
queryBuilder
=
new
NativeSearchQueryBuilder
()
NativeSearchQueryBuilder
queryBuilder
=
new
NativeSearchQueryBuilder
()
// 分页
// 分页
...
@@ -161,20 +165,21 @@ public class ESElevatorServiceImpl {
...
@@ -161,20 +165,21 @@ public class ESElevatorServiceImpl {
{
{
JSONObject
jsonObject
=
(
JSONObject
)
JSONObject
.
toJSON
(
searchHit
.
getContent
());
JSONObject
jsonObject
=
(
JSONObject
)
JSONObject
.
toJSON
(
searchHit
.
getContent
());
EsElevatorDto
esElevatorDto
=
JSONObject
.
toJavaObject
(
jsonObject
,
EsElevatorDto
.
class
);
EsElevatorDto
esElevatorDto
=
JSONObject
.
toJavaObject
(
jsonObject
,
EsElevatorDto
.
class
);
list
.
add
(
esElevatorDto
);
if
(
null
!=
alertCalleds
)
{
// if(null != alertCalleds) {
for
(
AlertCalled
al:
alertCalleds
// for (AlertCalled al: alertCalleds
)
{
// ) {
if
(
al
.
getEquipmentId
().
equals
(
esElevatorDto
.
getSequenceNbr
()))
{
// if(al.getEquipmentId().equals(esElevatorDto.getSequenceNbr())) {
esElevatorDto
.
setHappenTime
(
al
.
getCallTime
());
// esElevatorDto.setHappenTime(al.getCallTime());
esElevatorDto
.
setAlertId
(
String
.
valueOf
(
al
.
getSequenceNbr
()));
// esElevatorDto.setAlertId(String.valueOf(al.getSequenceNbr()));
esElevatorDto
.
setAlarmTypeCode
(
al
.
getAlarmTypeCode
());
// esElevatorDto.setAlarmTypeCode(al.getAlarmTypeCode());
esElevatorDto
.
setType
(
al
.
getAlertStage
());
// esElevatorDto.setType(al.getAlertStage());
list
.
add
(
esElevatorDto
);
// list.add(esElevatorDto);
break
;
// break;
}
// }
}
// }
}
else
{
// }
list
.
add
(
esElevatorDto
);
}
}
}
}
}
catch
(
Exception
e
)
catch
(
Exception
e
)
...
...
amos-boot-system-jcs/src/main/resources/db/changelog/jcs-1.0.0.0.xml
View file @
d0f65e16
...
@@ -1573,6 +1573,34 @@
...
@@ -1573,6 +1573,34 @@
ALTER TABLE `cb_fire_experts` add residence_detail_val varchar(255) COMMENT '现居住地详细地址';
ALTER TABLE `cb_fire_experts` add residence_detail_val varchar(255) COMMENT '现居住地详细地址';
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
id=
"2021-10-13"
author=
"chenhao-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<tableExists
tableName=
"cb_dynamic_form_group"
/>
<primaryKeyExists
primaryKeyName=
"sequence_nbr"
tableName=
"cb_dynamic_form_group"
/>
</preConditions>
<comment>
add data cb_dynamic_form_group
</comment>
<sql>
INSERT INTO cb_dynamic_form_group (`sequence_nbr`, `group_name`, `group_code`, `parent_id`, `group_config`, `org_code`, `sort`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`) VALUES ('132828674815', '值班消防', 'dutyFireFighting', '0', NULL, '10', '1', NULL, NULL, '2021-09-28 10:34:05', '\0');
</sql>
</changeSet>
<changeSet
id=
"2021-10-13"
author=
"chenhao-2"
>
<preConditions
onFail=
"MARK_RAN"
>
<tableExists
tableName=
"cb_dynamic_form_column"
/>
<primaryKeyExists
primaryKeyName=
"sequence_nbr"
tableName=
"cb_dynamic_form_column"
/>
</preConditions>
<comment>
add data cb_dynamic_form_column
</comment>
<sql>
INSERT INTO cb_dynamic_form_column (`sequence_nbr`, `field_code`, `field_name`, `field_type`, `group_id`, `query_strategy`, `not_null`, `block`, `group_code`, `column_config`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `remark`, `sort`, `org_code`) VALUES ('132828674812067', 'userId', '用户id', 'input', '132828674815', 'eq', '\0', '\0', 'dutyFireFighting', NULL, NULL, NULL, '2021-09-28 10:34:05', '\0', NULL, NULL, NULL);
INSERT INTO cb_dynamic_form_column (`sequence_nbr`, `field_code`, `field_name`, `field_type`, `group_id`, `query_strategy`, `not_null`, `block`, `group_code`, `column_config`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `remark`, `sort`, `org_code`) VALUES ('132828674812068', 'userName', '用户名称', 'input', '132828674815', 'like', '\0', '\0', 'dutyFireFighting', NULL, NULL, NULL, '2021-09-28 10:34:05', '\0', NULL, NULL, NULL);
INSERT INTO cb_dynamic_form_column (`sequence_nbr`, `field_code`, `field_name`, `field_type`, `group_id`, `query_strategy`, `not_null`, `block`, `group_code`, `column_config`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `remark`, `sort`, `org_code`) VALUES ('132828674812071', 'postType', '岗位id', 'input', '132828674815', 'eq', '\0', '\0', 'dutyFireFighting', NULL, NULL, NULL, '2021-09-28 10:34:05', '\0', NULL, NULL, NULL);
INSERT INTO cb_dynamic_form_column (`sequence_nbr`, `field_code`, `field_name`, `field_type`, `group_id`, `query_strategy`, `not_null`, `block`, `group_code`, `column_config`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `remark`, `sort`, `org_code`) VALUES ('132828674812072', 'postTypeName', '岗位名称', 'input', '132828674815', 'like', '\0', '\0', 'dutyFireFighting', NULL, NULL, NULL, '2021-09-28 10:34:05', '\0', NULL, NULL, NULL);
INSERT INTO cb_dynamic_form_column (`sequence_nbr`, `field_code`, `field_name`, `field_type`, `group_id`, `query_strategy`, `not_null`, `block`, `group_code`, `column_config`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `remark`, `sort`, `org_code`) VALUES ('132828674812073', 'fireFighting', '微型消防站', 'input', '132828674815', 'like', '\0', '\0', 'dutyFireFighting', NULL, NULL, NULL, '2021-09-28 10:34:05', '\0', NULL, NULL, NULL);
INSERT INTO cb_dynamic_form_column (`sequence_nbr`, `field_code`, `field_name`, `field_type`, `group_id`, `query_strategy`, `not_null`, `block`, `group_code`, `column_config`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `remark`, `sort`, `org_code`) VALUES ('132828674812074', 'fireFightingId', '微型消防站Id', 'input', '132828674815', 'eq', '\0', '\0', 'dutyFireFighting', NULL, NULL, NULL, '2021-09-28 10:34:05', '\0', NULL, NULL, NULL);
INSERT INTO cb_dynamic_form_column (`sequence_nbr`, `field_code`, `field_name`, `field_type`, `group_id`, `query_strategy`, `not_null`, `block`, `group_code`, `column_config`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `remark`, `sort`, `org_code`) VALUES ('132828674812075', 'teamId', '单位名称id', 'input', '132828674815', 'eq', '\0', '\0', 'dutyFireFighting', NULL, NULL, NULL, '2021-09-28 10:34:05', '\0', NULL, NULL, NULL);
INSERT INTO cb_dynamic_form_column (`sequence_nbr`, `field_code`, `field_name`, `field_type`, `group_id`, `query_strategy`, `not_null`, `block`, `group_code`, `column_config`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `remark`, `sort`, `org_code`) VALUES ('132828674812076', 'teamName', '单位名称', 'input', '132828674815', 'like', '\0', '\0', 'dutyFireFighting', NULL, NULL, NULL, '2021-09-28 10:34:05', '\0', NULL, NULL, NULL);
</sql>
</changeSet>
<changeSet
id=
"2021-10-09"
author=
"tw01"
>
<changeSet
id=
"2021-10-09"
author=
"tw01"
>
...
...
amos-boot-system-latentdanger/src/main/resources/application-dev.properties
View file @
d0f65e16
...
@@ -8,6 +8,7 @@ eureka.instance.lease-expiration-duration-in-seconds=10
...
@@ -8,6 +8,7 @@ eureka.instance.lease-expiration-duration-in-seconds=10
eureka.instance.lease-renewal-interval-in-seconds
=
5
eureka.instance.lease-renewal-interval-in-seconds
=
5
eureka.instance.metadata-map.management.context-path
=
${server.servlet.context-path}/actuator
eureka.instance.metadata-map.management.context-path
=
${server.servlet.context-path}/actuator
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}/doc.html
ribbon.eureka.enabled
=
true
ribbon.eureka.enabled
=
true
ribbon.ConnectTimeout
=
5000
ribbon.ConnectTimeout
=
5000
...
...
amos-boot-system-latentdanger/src/main/resources/db/changelog/latent-danger-1.0.0.xml
View file @
d0f65e16
...
@@ -6,4 +6,13 @@
...
@@ -6,4 +6,13 @@
xsi:schemaLocation=
"http://www.liquibase.org/xml/ns/dbchangelog
xsi:schemaLocation=
"http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd"
>
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd"
>
<changeSet
id=
"20211013-1"
author=
"tb"
>
<preConditions>
<columnExists
tableName=
"p_latent_danger"
columnName=
"biz_info"
/>
</preConditions>
<comment>
修改业务信息字段biz_info字段类型为text
</comment>
<sql>
ALTER TABLE p_latent_danger MODIFY COLUMN biz_info text DEFAULT NULL COMMENT '业务信息'
</sql>
</changeSet>
</databaseChangeLog>
</databaseChangeLog>
\ No newline at end of file
amos-boot-system-latentdanger/src/main/resources/db/mapper/LatentDangerMapper.xml
View file @
d0f65e16
...
@@ -254,6 +254,22 @@
...
@@ -254,6 +254,22 @@
select * from p_latent_danger where deleted = 0 and instance_id = #{instanceId} and danger_state = 3 limit 1
select * from p_latent_danger where deleted = 0 and instance_id = #{instanceId} and danger_state = 3 limit 1
</select>
</select>
<select
id=
"listOfOvertime"
resultType=
"com.yeejoin.amos.latentdanger.business.entity.mybatis.extend.LatentDangerBo"
>
select *
from p_latent_danger
where now() > reform_limit_date
and overtime_state = 0
and deleted = 0
<if
test=
"dangerStateList != null and dangerStateList.size() > 0"
>
and danger_state in
<foreach
collection=
"dangerStateList"
item=
"dangerState"
open=
"("
separator=
","
close=
")"
>
#{dangerState}
</foreach>
</if>
</select>
<select
id=
"listByMap"
resultType=
"com.yeejoin.amos.latentdanger.business.entity.mybatis.extend.LatentDangerBo"
>
<select
id=
"listByMap"
resultType=
"com.yeejoin.amos.latentdanger.business.entity.mybatis.extend.LatentDangerBo"
>
select
select
a.*
a.*
...
@@ -350,10 +366,6 @@
...
@@ -350,10 +366,6 @@
</where>
</where>
</select>
</select>
<select
id=
"listOfOvertime"
resultType=
"com.yeejoin.amos.latentdanger.business.entity.mybatis.extend.LatentDangerBo"
>
select * from p_latent_danger where now()>reform_limit_date and overtime_state = 0 and deleted = 0 and danger_state in (2,3,4)
</select>
<select
id=
"countNotFinishByFlowId"
resultType=
"java.lang.Integer"
>
<select
id=
"countNotFinishByFlowId"
resultType=
"java.lang.Integer"
>
select
select
count(1)
count(1)
...
...
pom.xml
View file @
d0f65e16
...
@@ -207,7 +207,7 @@
...
@@ -207,7 +207,7 @@
<dependency>
<dependency>
<groupId>
com.yeejoin
</groupId>
<groupId>
com.yeejoin
</groupId>
<artifactId>
amos-feign-systemctl
</artifactId>
<artifactId>
amos-feign-systemctl
</artifactId>
<version>
1.6.
3
-SNAPSHOT
</version>
<version>
1.6.
4
-SNAPSHOT
</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
io.swagger
</groupId>
<groupId>
io.swagger
</groupId>
...
...
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