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
43aba8c7
Commit
43aba8c7
authored
Apr 11, 2024
by
caotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.数据固化完成后根据网关发送消息。
parent
55d059f7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
AmosJxiopDasApplication.java
...c/main/java/com/yeejoin/amos/AmosJxiopDasApplication.java
+1
-1
DasServiceImpl.java
...oin/amos/boot/module/das/service/impl/DasServiceImpl.java
+6
-6
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-das/src/main/java/com/yeejoin/amos/AmosJxiopDasApplication.java
View file @
43aba8c7
...
@@ -32,7 +32,7 @@ import java.net.InetAddress;
...
@@ -32,7 +32,7 @@ import java.net.InetAddress;
@EnableScheduling
@EnableScheduling
@SpringBootApplication
(
exclude
=
{
DataSourceAutoConfiguration
.
class
,
DruidDataSourceAutoConfigure
.
class
})
@SpringBootApplication
(
exclude
=
{
DataSourceAutoConfiguration
.
class
,
DruidDataSourceAutoConfigure
.
class
})
@MapperScan
({
"com.yeejoin.amos.boot.module.das.mapper.msyql"
,
"com.yeejoin.amos.boot.module.das.mapper.tdengineanalysis"
,
"com.yeejoin.amos.boot.module.das.mapper.tdengineiot"
})
@MapperScan
({
"com.yeejoin.amos.boot.module.das.mapper.msyql"
,
"com.yeejoin.amos.boot.module.das.mapper.tdengineanalysis"
,
"com.yeejoin.amos.boot.module.das.mapper.tdengineiot"
})
@ComponentScan
({
"springfox.documentation.schema"
,
"com.yeejoin.amos.boot.module.das"
,
"com.yeejoin.amos.boot.module.das.service.impl"
})
@ComponentScan
({
"springfox.documentation.schema"
,
"com.yeejoin.amos.boot.module.das"
,
"com.yeejoin.amos.boot.module.das.service.impl"
,
"org.typroject.tyboot.component"
})
public
class
AmosJxiopDasApplication
{
public
class
AmosJxiopDasApplication
{
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-das/src/main/java/com/yeejoin/amos/boot/module/das/service/impl/DasServiceImpl.java
View file @
43aba8c7
...
@@ -18,7 +18,6 @@ import org.springframework.scheduling.annotation.Scheduled;
...
@@ -18,7 +18,6 @@ import org.springframework.scheduling.annotation.Scheduled;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -29,12 +28,12 @@ import java.util.stream.Collectors;
...
@@ -29,12 +28,12 @@ import java.util.stream.Collectors;
@Service
@Service
public
class
DasServiceImpl
implements
DasService
{
public
class
DasServiceImpl
implements
DasService
{
private
final
FrontGatewayDevicePointsMapper
frontGatewayDevicePointsMapper
;
private
final
FrontGatewayDevicePointsMapper
frontGatewayDevicePointsMapper
;
//
private final EmqKeeper emqKeeper;
private
final
EmqKeeper
emqKeeper
;
private
final
IndicatorDataMapper
indicatorDataMapper
;
private
final
IndicatorDataMapper
indicatorDataMapper
;
private
final
TdengineIotDataMapper
tdengineIotDataMapper
;
private
final
TdengineIotDataMapper
tdengineIotDataMapper
;
private
final
List
<
String
>
booleans
=
Arrays
.
asList
(
"true"
,
"false"
);
private
final
List
<
String
>
booleans
=
Arrays
.
asList
(
"true"
,
"false"
);
@Scheduled
(
cron
=
"0 */
3
* * * ?"
)
@Scheduled
(
cron
=
"0 */
10
* * * ?"
)
@Override
@Override
public
void
dataSolidification
()
{
public
void
dataSolidification
()
{
Long
startTime
=
System
.
currentTimeMillis
();
Long
startTime
=
System
.
currentTimeMillis
();
...
@@ -87,10 +86,11 @@ public class DasServiceImpl implements DasService {
...
@@ -87,10 +86,11 @@ public class DasServiceImpl implements DasService {
HashMap
<
String
,
String
>
syncFlag
=
new
HashMap
<>();
HashMap
<
String
,
String
>
syncFlag
=
new
HashMap
<>();
syncFlag
.
put
(
"gateway_id"
,
gatewayId
);
syncFlag
.
put
(
"gateway_id"
,
gatewayId
);
syncFlag
.
put
(
"sync_flag"
,
"success"
);
syncFlag
.
put
(
"sync_flag"
,
"success"
);
//
emqKeeper.getMqttClient().publish("sync_esdata_to_tdengine_notice", JSON.toJSONString(syncFlag).getBytes(), 0, false);
emqKeeper
.
getMqttClient
().
publish
(
"sync_esdata_to_tdengine_notice"
,
JSON
.
toJSONString
(
syncFlag
).
getBytes
(),
0
,
false
);
log
.
info
(
"同步
ES
数据至发发送消息给业务发送通知成功!"
);
log
.
info
(
"同步
物联监盘
数据至发发送消息给业务发送通知成功!"
);
}
catch
(
Exception
exception
)
{
}
catch
(
Exception
exception
)
{
log
.
info
(
"同步ES数据至发发送消息给业务发送通知失败!"
);
exception
.
printStackTrace
();
log
.
info
(
"同步物联监盘数据至发发送消息给业务发送通知失败!"
);
}
}
}
}
}
}
...
...
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