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
95956f4c
Commit
95956f4c
authored
Nov 09, 2022
by
litengwei
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_dl_plan6_temp' into develop_dl_plan6_temp
parents
000026e5
256a2bb9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
105 additions
and
25 deletions
+105
-25
DataSyncServiceImpl.java
...t/module/common/biz/service/impl/DataSyncServiceImpl.java
+10
-2
CheckInputMapper.java
...oin/amos/patrol/business/dao/mapper/CheckInputMapper.java
+3
-0
AcceptEquipmentRules.java
.../patrol/business/service/action/AcceptEquipmentRules.java
+1
-0
CheckServiceImpl.java
...n/amos/patrol/business/service/impl/CheckServiceImpl.java
+2
-0
LatentDangerServiceImpl.java
...patrol/business/service/impl/LatentDangerServiceImpl.java
+2
-0
PatrolDataSyncServiceImpl.java
...trol/business/service/impl/PatrolDataSyncServiceImpl.java
+49
-10
IPatrolDataSyncService.java
...patrol/business/service/intfc/IPatrolDataSyncService.java
+2
-0
JobService.java
.../main/java/com/yeejoin/amos/patrol/quartz/JobService.java
+2
-0
application-dev.properties
...-system-jcs/src/main/resources/application-dev.properties
+4
-1
application-dev.properties
...stem-patrol/src/main/resources/application-dev.properties
+15
-12
CheckInputMapper.xml
...-patrol/src/main/resources/db/mapper/CheckInputMapper.xml
+15
-0
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/DataSyncServiceImpl.java
View file @
95956f4c
...
...
@@ -9,6 +9,7 @@ import com.yeejoin.amos.component.rule.config.RuleConfig;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
...
...
@@ -28,6 +29,9 @@ public class DataSyncServiceImpl implements IDataSyncService {
@Autowired
private
OrgUsrMapper
orgUsrMapper
;
@Value
(
"${emq.orgUsr.sync.switch}"
)
private
Boolean
orgUsrSyncSwitch
;
@Override
public
void
OrgUsrSyncDtoDataSync
(
Long
id
)
{
try
{
...
...
@@ -39,7 +43,9 @@ public class DataSyncServiceImpl implements IDataSyncService {
for
(
OrgUsrSyncDto
x
:
list
)
{
String
message
=
buildSyncMessage
(
DataSyncTopicEnum
.
ORG_USR
.
getTopic
(),
x
);
emqKeeper
.
getMqttClient
().
publish
(
DataSyncTopicEnum
.
EQM_PATROL_CREATED
.
getTopic
(),
message
.
getBytes
(),
RuleConfig
.
DEFAULT_QOS
,
false
);
emqKeeper
.
getMqttClient
().
publish
(
DataSyncTopicEnum
.
ORG_USR
.
getTopic
(),
JSONObject
.
toJSONString
(
x
).
getBytes
(),
RuleConfig
.
DEFAULT_QOS
,
false
);
if
(
orgUsrSyncSwitch
)
{
emqKeeper
.
getMqttClient
().
publish
(
DataSyncTopicEnum
.
ORG_USR
.
getTopic
(),
JSONObject
.
toJSONString
(
x
).
getBytes
(),
RuleConfig
.
DEFAULT_QOS
,
false
);
}
}
}
else
{
// 同步删除人员信息
...
...
@@ -47,7 +53,9 @@ public class DataSyncServiceImpl implements IDataSyncService {
orgUsrSyncDto
.
setSequenceNbr
(
id
);
String
message
=
buildSyncMessage
(
DataSyncTopicEnum
.
ORG_USR
.
getTopic
(),
orgUsrSyncDto
);
emqKeeper
.
getMqttClient
().
publish
(
DataSyncTopicEnum
.
EQM_PATROL_CREATED
.
getTopic
(),
message
.
getBytes
(),
RuleConfig
.
DEFAULT_QOS
,
false
);
emqKeeper
.
getMqttClient
().
publish
(
DataSyncTopicEnum
.
ORG_USR
.
getTopic
(),
JSONObject
.
toJSONString
(
orgUsrSyncDto
).
getBytes
(),
RuleConfig
.
DEFAULT_QOS
,
false
);
if
(
orgUsrSyncSwitch
)
{
emqKeeper
.
getMqttClient
().
publish
(
DataSyncTopicEnum
.
ORG_USR
.
getTopic
(),
JSONObject
.
toJSONString
(
orgUsrSyncDto
).
getBytes
(),
RuleConfig
.
DEFAULT_QOS
,
false
);
}
}
}
}
catch
(
Exception
e
)
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/dao/mapper/CheckInputMapper.java
View file @
95956f4c
...
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.patrol.business.dao.mapper;
import
com.yeejoin.amos.patrol.business.bo.CheckInputSyncBo
;
import
com.yeejoin.amos.patrol.business.dto.InputCheckDto
;
import
com.yeejoin.amos.patrol.dao.entity.CheckInput
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
...
...
@@ -15,4 +16,6 @@ public interface CheckInputMapper extends BaseMapper {
"itemId"
)
Long
itemId
,
@Param
(
value
=
"routePointItemId"
)
Long
routePointItemId
,
@Param
(
value
=
"checkInputId"
)
Long
checkInputId
);
List
<
CheckInputSyncBo
>
getCheckInputSyncBoList
(
Map
<
String
,
Object
>
map
);
List
<
CheckInput
>
findByIdIn
(
Map
<
String
,
Object
>
map
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/action/AcceptEquipmentRules.java
View file @
95956f4c
...
...
@@ -141,6 +141,7 @@ public class AcceptEquipmentRules {
map
.
put
(
"id"
,
checkInput
.
getId
());
List
<
CheckInputSyncBo
>
checkInputSyncBoList
=
checkInputMapper
.
getCheckInputSyncBoList
(
map
);
patrolDataSyncService
.
checkInputBoDataSync
(
checkInputSyncBoList
);
patrolDataSyncService
.
checkInputDataSync
(
checkInput
);
}
});
log
.
info
(
checkInput
.
getPointClassifyName
()+
"规则校验返回结果修改成功"
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/CheckServiceImpl.java
View file @
95956f4c
...
...
@@ -448,6 +448,7 @@ public class CheckServiceImpl implements ICheckService {
map
.
put
(
"idList"
,
checkInputList
.
stream
().
map
(
CheckInput:
:
getId
).
collect
(
Collectors
.
toList
()));
List
<
CheckInputSyncBo
>
checkInputSyncBoList
=
checkInputMapper
.
getCheckInputSyncBoList
(
map
);
patrolDataSyncService
.
checkInputBoDataSync
(
checkInputSyncBoList
);
patrolDataSyncService
.
checkInputDataSync
(
checkInputList
);
}
});
return
new
CheckDto
(
check
.
getId
(),
unqualifiedcheckItemList
);
...
...
@@ -699,6 +700,7 @@ public class CheckServiceImpl implements ICheckService {
map
.
put
(
"idList"
,
checkInputList
.
stream
().
map
(
CheckInput:
:
getId
).
collect
(
Collectors
.
toList
()));
List
<
CheckInputSyncBo
>
checkInputSyncBoList
=
checkInputMapper
.
getCheckInputSyncBoList
(
map
);
patrolDataSyncService
.
checkInputBoDataSync
(
checkInputSyncBoList
);
patrolDataSyncService
.
checkInputDataSync
(
checkInputList
);
}
});
return
checkDto
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/LatentDangerServiceImpl.java
View file @
95956f4c
...
...
@@ -399,6 +399,8 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
map
.
put
(
"id"
,
id
);
List
<
CheckInputSyncBo
>
checkInputSyncBoList
=
checkInputMapper
.
getCheckInputSyncBoList
(
map
);
patrolDataSyncService
.
checkInputBoDataSync
(
checkInputSyncBoList
);
List
<
CheckInput
>
checkInputList
=
checkInputMapper
.
findByIdIn
(
map
);
patrolDataSyncService
.
checkInputDataSync
(
checkInputList
);
}
});
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/PatrolDataSyncServiceImpl.java
View file @
95956f4c
This diff is collapsed.
Click to expand it.
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/intfc/IPatrolDataSyncService.java
View file @
95956f4c
...
...
@@ -21,6 +21,8 @@ public interface IPatrolDataSyncService {
void
checkDataSync
(
List
<
Check
>
checkList
);
void
checkInputDataSync
(
CheckInput
checkInput
);
void
checkInputDataSync
(
List
<
CheckInput
>
checkInputList
);
void
checkShotDataSync
(
List
<
CheckShot
>
checkShotList
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/quartz/JobService.java
View file @
95956f4c
...
...
@@ -388,6 +388,8 @@ public class JobService implements IJobService {
map
.
put
(
"idList"
,
checkInputIdList
);
List
<
CheckInputSyncBo
>
checkInputSyncBoList
=
checkInputMapper
.
getCheckInputSyncBoList
(
map
);
patrolDataSyncService
.
checkInputBoDataSync
(
checkInputSyncBoList
);
List
<
CheckInput
>
checkInputList
=
checkInputMapper
.
findByIdIn
(
map
);
patrolDataSyncService
.
checkInputDataSync
(
checkInputList
);
}
});
}
...
...
amos-boot-system-jcs/src/main/resources/application-dev.properties
View file @
95956f4c
...
...
@@ -40,9 +40,12 @@ rule.definition.default-agency=jcs
#spring.data.mongodb.uri=mongodb://172.16.6.60:27017/command_db
## file properties:
file.url
=
http://
39.98.45.134
:9000/
file.url
=
http://
172.16.11.201
:9000/
video.url
=
https://11.11.16.4:443/
ifc.url
=
http://11.11.16.17/IFCInterface
ifc.call-back.localIp
=
11.11.16.1
#人员消息同步开关
emq.orgUsr.sync.switch
=
true
amos-boot-system-patrol/src/main/resources/application-dev.properties
View file @
95956f4c
eureka.client.serviceUrl.defaultZone
=
http://172.16.1
0.21
1:10001/eureka/
eureka.client.serviceUrl.defaultZone
=
http://172.16.1
1.20
1:10001/eureka/
eureka.client.registry-fetch-interval-seconds
=
5
eureka.instance.prefer-ip-address
=
true
management.endpoint.health.show-details
=
always
...
...
@@ -18,7 +18,7 @@ ribbon.MaxAutoRetries = 1
xiy_amos_satety_business
spring.reactor.debug-agent.enabled
=
true
#DB properties:
spring.datasource.url
=
jdbc:mysql://172.16.1
0.211:3306/xiy_safety_business_v3.0.1_20100712
?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.datasource.url
=
jdbc:mysql://172.16.1
1.201:3306/dl_business_v3.0.1.3
?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.datasource.username
=
root
spring.datasource.password
=
Yeejoin@2020
spring.datasource.driver-class-name
=
com.mysql.jdbc.Driver
...
...
@@ -35,9 +35,9 @@ security.appKey=studio_normalapp_3168830
#redis 配置
spring.redis.database
=
1
spring.redis.host
=
172.16.1
0.21
1
spring.redis.host
=
172.16.1
1.20
1
spring.redis.port
=
6379
spring.redis.password
=
yeejoin@202
0
spring.redis.password
=
123456
0
spring.redis.jedis.pool.max-active
=
200
spring.redis.jedis.pool.max-wait
=
-1
spring.redis.jedis.pool.max-idle
=
10
...
...
@@ -63,15 +63,18 @@ jobs.cron = 0 0/1 22-23 * * ?
#jpush 推送配置项
params.isPush
=
false
#巡检消息同步开关
emq.patrol.sync.switch
=
true
params.work.flow.normalProcessDefinitionKey
=
normalHazardManagement
params.work.flow.processDefinitionKey
=
hazardManagement
params.work.flow.address
=
http://172.16.1
0.21
1:30040
params.work.flow.address
=
http://172.16.1
1.20
1:30040
params.spc.address
=
http://172.16.3.89:9001
#websocket
params.remoteWebsocketUrl
=
http://172.16.1
0.21
1:8080/
params.remoteWebsocketUrl
=
http://172.16.1
1.20
1:8080/
#websocket send message url
params.remoteWebSocketSendMsgUrl
=
http://172.16.1
0.21
1:10601/
params.remoteWebSocketSendMsgUrl
=
http://172.16.1
1.20
1:10601/
#上传文件配置
spring.http.multipart.maxFileSize
=
80480000
...
...
@@ -82,9 +85,9 @@ linux.img.path = /
## emqx
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${random.int[1024,65536]}-3578
emqx.broker
=
tcp://172.16.1
0.211:2
883
emqx.user-name
=
super
emqx.password
=
a123456
emqx.broker
=
tcp://172.16.1
1.201:1
883
emqx.user-name
=
admin
emqx.password
=
public
emqx.max-inflight
=
1000
file.url
=
http://39.98.45.134:9000/
\ No newline at end of file
file.url
=
http://172.16.11.201:9000/
\ No newline at end of file
amos-boot-system-patrol/src/main/resources/db/mapper/CheckInputMapper.xml
View file @
95956f4c
...
...
@@ -144,4 +144,18 @@
</if>
</where>
</select>
<select
id=
"findByIdIn"
resultType=
"com.yeejoin.amos.patrol.dao.entity.CheckInput"
>
select * from p_check_input
<where>
<if
test=
"id != null"
>
id = #{id}
</if>
<if
test=
"idList != null and idList.size() >0"
>
AND id IN
<foreach
collection=
"idList"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
</if>
</where>
</select>
</mapper>
\ No newline at end of file
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